1
by RabbitBot
Initial import, version 3.14.2-0ubuntu2 |
1 |
/* ev-document-layers.c
|
2 |
* this file is part of evince, a gnome document_links viewer
|
|
3 |
*
|
|
4 |
* Copyright (C) 2008 Carlos Garcia Campos <carlosgc@gnome.org>
|
|
5 |
*
|
|
6 |
* Evince is free software; you can redistribute it and/or modify it
|
|
7 |
* under the terms of the GNU General Public License as published by
|
|
8 |
* the Free Software Foundation; either version 2 of the License, or
|
|
9 |
* (at your option) any later version.
|
|
10 |
*
|
|
11 |
* Evince is distributed in the hope that it will be useful, but
|
|
12 |
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
14 |
* General Public License for more details.
|
|
15 |
*
|
|
16 |
* You should have received a copy of the GNU General Public License
|
|
17 |
* along with this program; if not, write to the Free Software
|
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
19 |
*/
|
|
20 |
||
21 |
#include "config.h" |
|
22 |
||
23 |
#include "ev-document-layers.h" |
|
24 |
#include "ev-document.h" |
|
25 |
||
26 |
G_DEFINE_INTERFACE (EvDocumentLayers, ev_document_layers, 0) |
|
27 |
||
28 |
static void |
|
29 |
ev_document_layers_default_init (EvDocumentLayersInterface *klass) |
|
30 |
{
|
|
31 |
}
|
|
32 |
||
33 |
gboolean
|
|
34 |
ev_document_layers_has_layers (EvDocumentLayers *document_layers) |
|
35 |
{
|
|
36 |
EvDocumentLayersInterface *iface = EV_DOCUMENT_LAYERS_GET_IFACE (document_layers); |
|
37 |
||
38 |
return iface->has_layers (document_layers); |
|
39 |
}
|
|
40 |
||
41 |
/**
|
|
42 |
* ev_document_layers_get_layers:
|
|
43 |
* @document_layers: an #EvDocumentLayers
|
|
44 |
*
|
|
45 |
* Returns: (transfer full): a #GtkTreeModel
|
|
46 |
*/
|
|
47 |
GtkTreeModel * |
|
48 |
ev_document_layers_get_layers (EvDocumentLayers *document_layers) |
|
49 |
{
|
|
50 |
EvDocumentLayersInterface *iface = EV_DOCUMENT_LAYERS_GET_IFACE (document_layers); |
|
51 |
||
52 |
return iface->get_layers (document_layers); |
|
53 |
}
|
|
54 |
||
55 |
void
|
|
56 |
ev_document_layers_show_layer (EvDocumentLayers *document_layers, |
|
57 |
EvLayer *layer) |
|
58 |
{
|
|
59 |
EvDocumentLayersInterface *iface = EV_DOCUMENT_LAYERS_GET_IFACE (document_layers); |
|
60 |
||
61 |
iface->show_layer (document_layers, layer); |
|
62 |
}
|
|
63 |
||
64 |
void
|
|
65 |
ev_document_layers_hide_layer (EvDocumentLayers *document_layers, |
|
66 |
EvLayer *layer) |
|
67 |
{
|
|
68 |
EvDocumentLayersInterface *iface = EV_DOCUMENT_LAYERS_GET_IFACE (document_layers); |
|
69 |
||
70 |
iface->hide_layer (document_layers, layer); |
|
71 |
}
|
|
72 |
||
73 |
gboolean
|
|
74 |
ev_document_layers_layer_is_visible (EvDocumentLayers *document_layers, |
|
75 |
EvLayer *layer) |
|
76 |
{
|
|
77 |
EvDocumentLayersInterface *iface = EV_DOCUMENT_LAYERS_GET_IFACE (document_layers); |
|
78 |
||
79 |
return iface->layer_is_visible (document_layers, layer); |
|
80 |
}
|