]> www.fi.muni.cz Git - evince.git/blob - libdocument/ev-annotation.h
[build] Include git.mk in all Makefiles
[evince.git] / libdocument / ev-annotation.h
1 /* ev-annotation.h
2  *  this file is part of evince, a gnome document viewer
3  *
4  * Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org>
5  * Copyright (C) 2007 IƱigo Martinez <inigomartinez@gmail.com>
6  *
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.
11  *
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.
16  *
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.
20  */
21
22 #if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION)
23 #error "Only <evince-document.h> can be included directly."
24 #endif
25
26 #ifndef EV_ANNOTATION_H
27 #define EV_ANNOTATION_H
28
29 #include <glib-object.h>
30
31 #include "ev-document.h"
32
33 G_BEGIN_DECLS
34
35 /* EvAnnotation */
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))
42
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))
50
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))
58
59 typedef struct _EvAnnotation             EvAnnotation;
60 typedef struct _EvAnnotationClass        EvAnnotationClass;
61
62 typedef struct _EvAnnotationMarkup       EvAnnotationMarkup;
63 typedef struct _EvAnnotationMarkupIface  EvAnnotationMarkupIface;
64
65 typedef struct _EvAnnotationText         EvAnnotationText;
66 typedef struct _EvAnnotationTextClass    EvAnnotationTextClass;
67
68 struct _EvAnnotation
69 {
70         GObject parent;
71
72         EvPage  *page;
73         gboolean changed;
74
75         gchar   *contents;
76         gchar   *name;
77         gchar   *modified;
78         GdkColor color;
79
80 };
81
82 struct _EvAnnotationClass
83 {
84         GObjectClass parent_class;
85 };
86
87 struct _EvAnnotationMarkupIface
88 {
89         GTypeInterface base_iface;
90 };
91
92 struct _EvAnnotationText
93 {
94         EvAnnotation parent;
95
96         gboolean is_open : 1;
97 };
98
99 struct _EvAnnotationTextClass
100 {
101         EvAnnotationClass parent_class;
102 };
103
104 /* EvAnnotation */
105 GType         ev_annotation_get_type             (void) G_GNUC_CONST;
106
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,
111                                                   const gchar        *label);
112 gdouble       ev_annotation_markup_get_opacity   (EvAnnotationMarkup *markup);
113 void          ev_annotation_markup_set_opacity   (EvAnnotationMarkup *markup,
114                                                   gdouble             opacity);
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,
120                                                   gboolean            is_open);
121
122 /* EvAnnotationText */
123 GType         ev_annotation_text_get_type        (void) G_GNUC_CONST;
124 EvAnnotation *ev_annotation_text_new             (EvPage             *page);
125
126 G_END_DECLS
127
128 #endif /* EV_ANNOTATION_H */