[evince/wip/highlight: 44/59] libdocument: adding class EvAnnotationTextMarkup
- From: Giselle Reis <gisellemnr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/wip/highlight: 44/59] libdocument: adding class EvAnnotationTextMarkup
- Date: Sun, 2 Nov 2014 10:58:44 +0000 (UTC)
commit ac911a9cafc36e3ad219a492b537d0b7bb73f6d6
Author: Giselle Reis <gisellemnr src gnome org>
Date: Thu Aug 7 15:57:46 2014 +0200
libdocument: adding class EvAnnotationTextMarkup
Implementing the (trivial) class
EvAnnotationTextMarkup and fixing a typo.
libdocument/ev-annotation.c | 41 ++++++++++++++++++++++++++++++++++++++---
libdocument/ev-annotation.h | 16 +++++++++++++++-
2 files changed, 53 insertions(+), 4 deletions(-)
---
diff --git a/libdocument/ev-annotation.c b/libdocument/ev-annotation.c
index 5309f06..83861af 100644
--- a/libdocument/ev-annotation.c
+++ b/libdocument/ev-annotation.c
@@ -66,9 +66,18 @@ struct _EvAnnotationAttachmentClass {
EvAnnotationClass parent_class;
};
-static void ev_annotation_markup_default_init (EvAnnotationMarkupInterface *iface);
-static void ev_annotation_text_markup_iface_init (EvAnnotationMarkupInterface *iface);
-static void ev_annotation_attachment_markup_iface_init (EvAnnotationMarkupInterface *iface);
+struct _EvAnnotationTextMarkup {
+ EvAnnotation parent;
+};
+
+struct _EvAnnotationTextMarkupClass {
+ EvAnnotationClass parent_class;
+};
+
+static void ev_annotation_markup_default_init (EvAnnotationMarkupInterface *iface);
+static void ev_annotation_text_markup_iface_init (EvAnnotationMarkupInterface *iface);
+static void ev_annotation_attachment_markup_iface_init (EvAnnotationMarkupInterface *iface);
+static void ev_annotation_text_markup_markup_iface_init (EvAnnotationMarkupInterface *iface);
/* EvAnnotation */
enum {
@@ -114,6 +123,11 @@ G_DEFINE_TYPE_WITH_CODE (EvAnnotationAttachment, ev_annotation_attachment, EV_TY
G_IMPLEMENT_INTERFACE (EV_TYPE_ANNOTATION_MARKUP,
ev_annotation_attachment_markup_iface_init);
});
+G_DEFINE_TYPE_WITH_CODE (EvAnnotationTextMarkup, ev_annotation_text_markup, EV_TYPE_ANNOTATION,
+ {
+ G_IMPLEMENT_INTERFACE (EV_TYPE_ANNOTATION_MARKUP,
+ ev_annotation_text_markup_markup_iface_init);
+ });
/* EvAnnotation */
static void
@@ -1230,3 +1244,24 @@ ev_annotation_attachment_set_attachment (EvAnnotationAttachment *annot,
return TRUE;
}
+
+/* EvAnnotationTextMarkup */
+static void
+ev_annotation_text_markup_init (EvAnnotationTextMarkup *annot)
+{
+ EV_ANNOTATION (annot)->type = EV_ANNOTATION_TYPE_UNKNOWN;
+}
+
+static void
+ev_annotation_text_markup_class_init (EvAnnotationTextMarkupClass *class)
+{
+ GObjectClass *g_object_class = G_OBJECT_CLASS (class);
+
+ ev_annotation_markup_class_install_properties (g_object_class);
+}
+
+static void
+ev_annotation_text_markup_markup_iface_init (EvAnnotationMarkupInterface *iface)
+{
+}
+
diff --git a/libdocument/ev-annotation.h b/libdocument/ev-annotation.h
index 6f85e5d..de27e64 100644
--- a/libdocument/ev-annotation.h
+++ b/libdocument/ev-annotation.h
@@ -58,7 +58,7 @@ G_BEGIN_DECLS
#define EV_IS_ANNOTATION_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_ANNOTATION_TEXT))
#define EV_ANNOTATION_TEXT_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object),
EV_TYPE_ANNOTATION_TEXT, EvAnnotationTextClass))
-/* EvAnnotationText */
+/* EvAnnotationAttachment */
#define EV_TYPE_ANNOTATION_ATTACHMENT (ev_annotation_attachment_get_type())
#define EV_ANNOTATION_ATTACHMENT(object) (G_TYPE_CHECK_INSTANCE_CAST((object),
EV_TYPE_ANNOTATION_ATTACHMENT, EvAnnotationAttachment))
#define EV_ANNOTATION_ATTACHMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),
EV_TYPE_ANNOTATION_ATTACHMENT, EvAnnotationAttachmentClass))
@@ -66,6 +66,14 @@ G_BEGIN_DECLS
#define EV_IS_ANNOTATION_ATTACHMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),
EV_TYPE_ANNOTATION_ATTACHMENT))
#define EV_ANNOTATION_ATTACHMENT_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object),
EV_TYPE_ANNOTATION_ATTACHMENT, EvAnnotationAttachmentClass))
+/* EvAnnotationTextMarkup */
+#define EV_TYPE_ANNOTATION_TEXT_MARKUP (ev_annotation_text_markup_get_type ())
+#define EV_ANNOTATION_TEXT_MARKUP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object),
EV_TYPE_ANNOTATION_TEXT_MARKUP, EvAnnotationTextMarkup))
+#define EV_ANNOTATION_TEXT_MARKUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),
EV_TYPE_ANNOTATION_TEXT_MARKUP, EvAnnotationTextMarkupClass))
+#define EV_IS_ANNOTATION_TEXT_MARKUP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object),
EV_TYPE_ANNOTATION_TEXT_MARKUP))
+#define EV_IS_ANNOTATION_TEXT_MARKUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),
EV_TYPE_ANNOTATION_TEXT_MARKUP))
+#define EV_ANNOTATION_TEXT_MARKUP_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object),
EV_TYPE_ANNOTATION_TEXT_MARKUP, EvAnnotationTextMarkupClass))
+
typedef struct _EvAnnotation EvAnnotation;
typedef struct _EvAnnotationClass EvAnnotationClass;
@@ -78,6 +86,9 @@ typedef struct _EvAnnotationTextClass EvAnnotationTextClass;
typedef struct _EvAnnotationAttachment EvAnnotationAttachment;
typedef struct _EvAnnotationAttachmentClass EvAnnotationAttachmentClass;
+typedef struct _EvAnnotationTextMarkup EvAnnotationTextMarkup;
+typedef struct _EvAnnotationTextMarkupClass EvAnnotationTextMarkupClass;
+
typedef enum {
EV_ANNOTATION_TYPE_UNKNOWN,
EV_ANNOTATION_TYPE_TEXT,
@@ -163,6 +174,9 @@ EvAttachment *ev_annotation_attachment_get_attachment (EvAnnotationAttach
gboolean ev_annotation_attachment_set_attachment (EvAnnotationAttachment *annot,
EvAttachment *attachment);
+/* EvAnnotationTextMarkup */
+GType ev_annotation_text_markup_get_type (void) G_GNUC_CONST;
+
G_END_DECLS
#endif /* EV_ANNOTATION_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]