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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, 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"
36 #define EV_TYPE_ANNOTATION (ev_annotation_get_type())
37 #define EV_ANNOTATION(object) (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_ANNOTATION, EvAnnotation))
38 #define EV_ANNOTATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_ANNOTATION, EvAnnotationClass))
39 #define EV_IS_ANNOTATION(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_ANNOTATION))
40 #define EV_IS_ANNOTATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_ANNOTATION))
41 #define EV_ANNOTATION_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_ANNOTATION, EvAnnotationClass))
43 /* EvAnnotationMarkup */
44 #define EV_TYPE_ANNOTATION_MARKUP (ev_annotation_markup_get_type ())
45 #define EV_ANNOTATION_MARKUP(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EV_TYPE_ANNOTATION_MARKUP, EvAnnotationMarkup))
46 #define EV_ANNOTATION_MARKUP_IFACE(k) (G_TYPE_CHECK_CLASS_CAST((k), EV_TYPE_ANNOTATION_MARKUP, EvAnnotationMarkupIface))
47 #define EV_IS_ANNOTATION_MARKUP(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EV_TYPE_ANNOTATION_MARKUP))
48 #define EV_IS_ANNOTATION_MARKUP_IFACE(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EV_TYPE_ANNOTATION_MARKUP))
49 #define EV_ANNOTATION_MARKUP_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), EV_TYPE_ANNOTATION_MARKUP, EvAnnotationMarkupIface))
51 /* EvAnnotationText */
52 #define EV_TYPE_ANNOTATION_TEXT (ev_annotation_text_get_type())
53 #define EV_ANNOTATION_TEXT(object) (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_ANNOTATION_TEXT, EvAnnotationText))
54 #define EV_ANNOTATION_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_ANNOTATION_TEXT, EvAnnotationTextClass))
55 #define EV_IS_ANNOTATION_TEXT(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_ANNOTATION_TEXT))
56 #define EV_IS_ANNOTATION_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_ANNOTATION_TEXT))
57 #define EV_ANNOTATION_TEXT_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_ANNOTATION_TEXT, EvAnnotationTextClass))
59 typedef struct _EvAnnotation EvAnnotation;
60 typedef struct _EvAnnotationClass EvAnnotationClass;
62 typedef struct _EvAnnotationMarkup EvAnnotationMarkup;
63 typedef struct _EvAnnotationMarkupIface EvAnnotationMarkupIface;
65 typedef struct _EvAnnotationText EvAnnotationText;
66 typedef struct _EvAnnotationTextClass EvAnnotationTextClass;
82 struct _EvAnnotationClass
84 GObjectClass parent_class;
87 struct _EvAnnotationMarkupIface
89 GTypeInterface base_iface;
92 struct _EvAnnotationText
99 struct _EvAnnotationTextClass
101 EvAnnotationClass parent_class;
105 GType ev_annotation_get_type (void) G_GNUC_CONST;
107 /* EvAnnotationMarkup */
108 GType ev_annotation_markup_get_type (void) G_GNUC_CONST;
109 gchar *ev_annotation_markup_get_label (EvAnnotationMarkup *markup);
110 void ev_annotation_markup_set_label (EvAnnotationMarkup *markup,
112 gdouble ev_annotation_markup_get_opacity (EvAnnotationMarkup *markup);
113 void ev_annotation_markup_set_opacity (EvAnnotationMarkup *markup,
115 gboolean ev_annotation_markup_has_popup (EvAnnotationMarkup *markup);
116 void ev_annotation_markup_get_rectangle (EvAnnotationMarkup *markup,
117 EvRectangle *ev_rect);
118 gboolean ev_annotation_markup_get_is_open (EvAnnotationMarkup *markup);
119 void ev_annotation_markup_set_is_open (EvAnnotationMarkup *markup,
122 /* EvAnnotationText */
123 GType ev_annotation_text_get_type (void) G_GNUC_CONST;
124 EvAnnotation *ev_annotation_text_new (EvPage *page);
128 #endif /* EV_ANNOTATION_H */