2 * this file is part of evince, a gnome document viewer
4 * Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org>
5 * Copyright (C) 2007 IƱigo Martinez <inigomartinez@gmail.com>
7 * Evince is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * Evince is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 #if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION)
23 #error "Only <evince-document.h> can be included directly."
26 #ifndef EV_ANNOTATION_H
27 #define EV_ANNOTATION_H
29 #include <glib-object.h>
31 #include "ev-document.h"
32 #include "ev-attachment.h"
37 #define EV_TYPE_ANNOTATION (ev_annotation_get_type())
38 #define EV_ANNOTATION(object) (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_ANNOTATION, EvAnnotation))
39 #define EV_ANNOTATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_ANNOTATION, EvAnnotationClass))
40 #define EV_IS_ANNOTATION(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_ANNOTATION))
41 #define EV_IS_ANNOTATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_ANNOTATION))
42 #define EV_ANNOTATION_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_ANNOTATION, EvAnnotationClass))
44 /* EvAnnotationMarkup */
45 #define EV_TYPE_ANNOTATION_MARKUP (ev_annotation_markup_get_type ())
46 #define EV_ANNOTATION_MARKUP(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EV_TYPE_ANNOTATION_MARKUP, EvAnnotationMarkup))
47 #define EV_ANNOTATION_MARKUP_IFACE(k) (G_TYPE_CHECK_CLASS_CAST((k), EV_TYPE_ANNOTATION_MARKUP, EvAnnotationMarkupInterface))
48 #define EV_IS_ANNOTATION_MARKUP(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EV_TYPE_ANNOTATION_MARKUP))
49 #define EV_IS_ANNOTATION_MARKUP_IFACE(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EV_TYPE_ANNOTATION_MARKUP))
50 #define EV_ANNOTATION_MARKUP_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), EV_TYPE_ANNOTATION_MARKUP, EvAnnotationMarkupInterface))
52 /* EvAnnotationText */
53 #define EV_TYPE_ANNOTATION_TEXT (ev_annotation_text_get_type())
54 #define EV_ANNOTATION_TEXT(object) (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_ANNOTATION_TEXT, EvAnnotationText))
55 #define EV_ANNOTATION_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_ANNOTATION_TEXT, EvAnnotationTextClass))
56 #define EV_IS_ANNOTATION_TEXT(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_ANNOTATION_TEXT))
57 #define EV_IS_ANNOTATION_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_ANNOTATION_TEXT))
58 #define EV_ANNOTATION_TEXT_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_ANNOTATION_TEXT, EvAnnotationTextClass))
60 /* EvAnnotationText */
61 #define EV_TYPE_ANNOTATION_ATTACHMENT (ev_annotation_attachment_get_type())
62 #define EV_ANNOTATION_ATTACHMENT(object) (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_ANNOTATION_ATTACHMENT, EvAnnotationAttachment))
63 #define EV_ANNOTATION_ATTACHMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_ANNOTATION_ATTACHMENT, EvAnnotationAttachmentClass))
64 #define EV_IS_ANNOTATION_ATTACHMENT(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_ANNOTATION_ATTACHMENT))
65 #define EV_IS_ANNOTATION_ATTACHMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_ANNOTATION_ATTACHMENT))
66 #define EV_ANNOTATION_ATTACHMENT_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_ANNOTATION_ATTACHMENT, EvAnnotationAttachmentClass))
68 typedef struct _EvAnnotation EvAnnotation;
69 typedef struct _EvAnnotationClass EvAnnotationClass;
71 typedef struct _EvAnnotationMarkup EvAnnotationMarkup;
72 typedef struct _EvAnnotationMarkupInterface EvAnnotationMarkupInterface;
74 typedef struct _EvAnnotationText EvAnnotationText;
75 typedef struct _EvAnnotationTextClass EvAnnotationTextClass;
77 typedef struct _EvAnnotationAttachment EvAnnotationAttachment;
78 typedef struct _EvAnnotationAttachmentClass EvAnnotationAttachmentClass;
81 EV_ANNOTATION_TYPE_UNKNOWN,
82 EV_ANNOTATION_TYPE_TEXT,
83 EV_ANNOTATION_TYPE_ATTACHMENT
87 EV_ANNOTATION_TEXT_ICON_NOTE,
88 EV_ANNOTATION_TEXT_ICON_COMMENT,
89 EV_ANNOTATION_TEXT_ICON_KEY,
90 EV_ANNOTATION_TEXT_ICON_HELP,
91 EV_ANNOTATION_TEXT_ICON_NEW_PARAGRAPH,
92 EV_ANNOTATION_TEXT_ICON_PARAGRAPH,
93 EV_ANNOTATION_TEXT_ICON_INSERT,
94 EV_ANNOTATION_TEXT_ICON_CROSS,
95 EV_ANNOTATION_TEXT_ICON_CIRCLE,
96 EV_ANNOTATION_TEXT_ICON_UNKNOWN
97 } EvAnnotationTextIcon;
100 GType ev_annotation_get_type (void) G_GNUC_CONST;
101 EvAnnotationType ev_annotation_get_annotation_type (EvAnnotation *annot);
102 EvPage *ev_annotation_get_page (EvAnnotation *annot);
103 guint ev_annotation_get_page_index (EvAnnotation *annot);
104 gboolean ev_annotation_equal (EvAnnotation *annot,
105 EvAnnotation *other);
106 const gchar *ev_annotation_get_contents (EvAnnotation *annot);
107 gboolean ev_annotation_set_contents (EvAnnotation *annot,
108 const gchar *contents);
109 const gchar *ev_annotation_get_name (EvAnnotation *annot);
110 gboolean ev_annotation_set_name (EvAnnotation *annot,
112 const gchar *ev_annotation_get_modified (EvAnnotation *annot);
113 gboolean ev_annotation_set_modified (EvAnnotation *annot,
114 const gchar *modified);
115 gboolean ev_annotation_set_modified_from_time (EvAnnotation *annot,
117 void ev_annotation_get_color (EvAnnotation *annot,
119 gboolean ev_annotation_set_color (EvAnnotation *annot,
120 const GdkColor *color);
122 /* EvAnnotationMarkup */
123 GType ev_annotation_markup_get_type (void) G_GNUC_CONST;
124 const gchar *ev_annotation_markup_get_label (EvAnnotationMarkup *markup);
125 gboolean ev_annotation_markup_set_label (EvAnnotationMarkup *markup,
127 gdouble ev_annotation_markup_get_opacity (EvAnnotationMarkup *markup);
128 gboolean ev_annotation_markup_set_opacity (EvAnnotationMarkup *markup,
130 gboolean ev_annotation_markup_has_popup (EvAnnotationMarkup *markup);
131 gboolean ev_annotation_markup_set_has_popup (EvAnnotationMarkup *markup,
133 void ev_annotation_markup_get_rectangle (EvAnnotationMarkup *markup,
134 EvRectangle *ev_rect);
135 gboolean ev_annotation_markup_set_rectangle (EvAnnotationMarkup *markup,
136 const EvRectangle *ev_rect);
137 gboolean ev_annotation_markup_get_popup_is_open (EvAnnotationMarkup *markup);
138 gboolean ev_annotation_markup_set_popup_is_open (EvAnnotationMarkup *markup,
141 /* EvAnnotationText */
142 GType ev_annotation_text_get_type (void) G_GNUC_CONST;
143 EvAnnotation *ev_annotation_text_new (EvPage *page);
144 EvAnnotationTextIcon ev_annotation_text_get_icon (EvAnnotationText *text);
145 gboolean ev_annotation_text_set_icon (EvAnnotationText *text,
146 EvAnnotationTextIcon icon);
147 gboolean ev_annotation_text_get_is_open (EvAnnotationText *text);
148 gboolean ev_annotation_text_set_is_open (EvAnnotationText *text,
151 /* EvAnnotationAttachment */
152 GType ev_annotation_attachment_get_type (void) G_GNUC_CONST;
153 EvAnnotation *ev_annotation_attachment_new (EvPage *page,
154 EvAttachment *attachment);
155 EvAttachment *ev_annotation_attachment_get_attachment (EvAnnotationAttachment *annot);
156 gboolean ev_annotation_attachment_set_attachment (EvAnnotationAttachment *annot,
157 EvAttachment *attachment);
161 #endif /* EV_ANNOTATION_H */