Evince
Evince is a document viewer capable of displaying multiple and single page document formats like PDF and Postscript.
Main Page
Related Pages
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
ev-document-annotations.c
Go to the documentation of this file.
1
/* ev-document-annotations.c
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20
*/
21
22
#include "
ev-document-annotations.h
"
23
24
G_DEFINE_INTERFACE (
EvDocumentAnnotations
, ev_document_annotations, 0)
25
26
static
void
27
ev_document_annotations_default_init
(
EvDocumentAnnotationsInterface
*klass)
28
{
29
}
30
31
EvMappingList
*
32
ev_document_annotations_get_annotations
(
EvDocumentAnnotations
*document_annots,
33
EvPage
*page)
34
{
35
EvDocumentAnnotationsInterface
*iface =
EV_DOCUMENT_ANNOTATIONS_GET_IFACE
(document_annots);
36
37
return
iface->
get_annotations
(document_annots, page);
38
}
39
40
gboolean
41
ev_document_annotations_document_is_modified
(
EvDocumentAnnotations
*document_annots)
42
{
43
EvDocumentAnnotationsInterface
*iface =
EV_DOCUMENT_ANNOTATIONS_GET_IFACE
(document_annots);
44
45
return
(iface->
document_is_modified
) ? iface->
document_is_modified
(document_annots) :
FALSE
;
46
}
47
48
void
49
ev_document_annotations_save_annotation
(
EvDocumentAnnotations
*document_annots,
50
EvAnnotation
*annot,
51
EvAnnotationsSaveMask
mask)
52
{
53
EvDocumentAnnotationsInterface
*iface =
EV_DOCUMENT_ANNOTATIONS_GET_IFACE
(document_annots);
54
55
iface->
save_annotation
(document_annots, annot, mask);
56
}
57
58
void
59
ev_document_annotations_add_annotation
(
EvDocumentAnnotations
*document_annots,
60
EvAnnotation
*annot,
61
EvRectangle
*rect)
62
{
63
EvDocumentAnnotationsInterface
*iface =
EV_DOCUMENT_ANNOTATIONS_GET_IFACE
(document_annots);
64
65
if
(iface->
add_annotation
)
66
iface->
add_annotation
(document_annots, annot, rect);
67
}
68
69
gboolean
70
ev_document_annotations_can_add_annotation
(
EvDocumentAnnotations
*document_annots)
71
{
72
EvDocumentAnnotationsInterface
*iface =
EV_DOCUMENT_ANNOTATIONS_GET_IFACE
(document_annots);
73
74
return
iface->
add_annotation
!= NULL;
75
}
76
77
void
78
ev_document_annotations_remove_annotation
(
EvDocumentAnnotations
*document_annots,
79
EvAnnotation
*annot)
80
{
81
EvDocumentAnnotationsInterface
*iface =
EV_DOCUMENT_ANNOTATIONS_GET_IFACE
(document_annots);
82
83
if
(iface->
remove_annotation
)
84
iface->
remove_annotation
(document_annots, annot);
85
}
86
87
gboolean
88
ev_document_annotations_can_remove_annotation
(
EvDocumentAnnotations
*document_annots)
89
{
90
EvDocumentAnnotationsInterface
*iface =
EV_DOCUMENT_ANNOTATIONS_GET_IFACE
(document_annots);
91
92
return
iface->
remove_annotation
!= NULL;
93
}
evince-master
libdocument
ev-document-annotations.c
Generated on Thu Jul 13 2017 13:41:45 for Evince by
1.8.4