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 #ifndef EV_ANNOTATION_H
23 #define EV_ANNOTATION_H
25 #include <glib-object.h>
27 #include "ev-document.h"
32 #define EV_TYPE_ANNOTATION (ev_annotation_get_type())
33 #define EV_ANNOTATION(object) (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_ANNOTATION, EvAnnotation))
34 #define EV_ANNOTATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_ANNOTATION, EvAnnotationClass))
35 #define EV_IS_ANNOTATION(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_ANNOTATION))
36 #define EV_IS_ANNOTATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_ANNOTATION))
37 #define EV_ANNOTATION_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_ANNOTATION, EvAnnotationClass))
39 /* EvAnnotationMarkup */
40 #define EV_TYPE_ANNOTATION_MARKUP (ev_annotation_markup_get_type ())
41 #define EV_ANNOTATION_MARKUP(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EV_TYPE_ANNOTATION_MARKUP, EvAnnotationMarkup))
42 #define EV_ANNOTATION_MARKUP_IFACE(k) (G_TYPE_CHECK_CLASS_CAST((k), EV_TYPE_ANNOTATION_MARKUP, EvAnnotationMarkupIface))
43 #define EV_IS_ANNOTATION_MARKUP(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EV_TYPE_ANNOTATION_MARKUP))
44 #define EV_IS_ANNOTATION_MARKUP_IFACE(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EV_TYPE_ANNOTATION_MARKUP))
45 #define EV_ANNOTATION_MARKUP_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), EV_TYPE_ANNOTATION_MARKUP, EvAnnotationMarkupIface))
47 /* EvAnnotationText */
48 #define EV_TYPE_ANNOTATION_TEXT (ev_annotation_text_get_type())
49 #define EV_ANNOTATION_TEXT(object) (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_ANNOTATION_TEXT, EvAnnotationText))
50 #define EV_ANNOTATION_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EV_TYPE_ANNOTATION_TEXT, EvAnnotationTextClass))
51 #define EV_IS_ANNOTATION_TEXT(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_ANNOTATION_TEXT))
52 #define EV_IS_ANNOTATION_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_ANNOTATION_TEXT))
53 #define EV_ANNOTATION_TEXT_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_ANNOTATION_TEXT, EvAnnotationTextClass))
55 typedef struct _EvAnnotation EvAnnotation;
56 typedef struct _EvAnnotationClass EvAnnotationClass;
58 typedef struct _EvAnnotationMarkup EvAnnotationMarkup;
59 typedef struct _EvAnnotationMarkupIface EvAnnotationMarkupIface;
61 typedef struct _EvAnnotationText EvAnnotationText;
62 typedef struct _EvAnnotationTextClass EvAnnotationTextClass;
78 struct _EvAnnotationClass
80 GObjectClass parent_class;
83 struct _EvAnnotationMarkupIface
85 GTypeInterface base_iface;
88 struct _EvAnnotationText
95 struct _EvAnnotationTextClass
97 EvAnnotationClass parent_class;
101 GType ev_annotation_get_type (void) G_GNUC_CONST;
103 /* EvAnnotationMarkup */
104 GType ev_annotation_markup_get_type (void) G_GNUC_CONST;
105 gchar *ev_annotation_markup_get_label (EvAnnotationMarkup *markup);
106 void ev_annotation_markup_set_label (EvAnnotationMarkup *markup,
108 gdouble ev_annotation_markup_get_opacity (EvAnnotationMarkup *markup);
109 void ev_annotation_markup_set_opacity (EvAnnotationMarkup *markup,
111 void ev_annotation_markup_get_rectangle (EvAnnotationMarkup *markup,
112 EvRectangle *ev_rect);
113 gboolean ev_annotation_markup_get_is_open (EvAnnotationMarkup *markup);
114 void ev_annotation_markup_set_is_open (EvAnnotationMarkup *markup,
117 /* EvAnnotationText */
118 GType ev_annotation_text_get_type (void) G_GNUC_CONST;
119 EvAnnotation *ev_annotation_text_new (EvPage *page);
122 /* Annotation Mapping stuff */
123 typedef struct _EvAnnotationMapping EvAnnotationMapping;
124 struct _EvAnnotationMapping
126 EvAnnotation *annotation;
133 void ev_annotation_mapping_free (GList *annotation_mapping);
134 EvAnnotation *ev_annotation_mapping_find (GList *annotation_mapping,
137 void ev_annotation_mapping_get_area (GList *annotation_mapping,
138 EvAnnotation *annotation,
143 #endif /* EV_ANNOTATION_H */