Evince
Evince is a document viewer capable of displaying multiple and single page document formats like PDF and Postscript.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ev-layer.c
Go to the documentation of this file.
1 /* this file is part of evince, a gnome document viewer
2  *
3  * Copyright (C) 2008 Carlos Garcia Campos <carlosgc@gnome.org>
4  *
5  * Evince is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * Evince is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  */
19 
20 #include <config.h>
21 
22 #include "ev-layer.h"
23 
25  gboolean is_parent;
26  gint rb_group;
27 };
28 
29 #define EV_LAYER_GET_PRIVATE(object) \
30  (G_TYPE_INSTANCE_GET_PRIVATE ((object), EV_TYPE_LAYER, EvLayerPrivate))
31 
32 G_DEFINE_TYPE (EvLayer, ev_layer, G_TYPE_OBJECT)
33 
34 static void
36 {
37  GObjectClass *g_object_class = G_OBJECT_CLASS (klass);
38 
39  g_type_class_add_private (g_object_class, sizeof (EvLayerPrivate));
40 }
41 
42 static void
44 {
45  layer->priv = EV_LAYER_GET_PRIVATE (layer);
46 }
47 
48 EvLayer *
49 ev_layer_new (gboolean is_parent,
50  gint rb_group)
51 {
52  EvLayer *layer;
53 
54  layer = EV_LAYER (g_object_new (EV_TYPE_LAYER, NULL));
55  layer->priv->is_parent = is_parent;
56  layer->priv->rb_group = rb_group;
57 
58  return layer;
59 }
60 
61 gboolean
63 {
64  g_return_val_if_fail (EV_IS_LAYER (layer), FALSE);
65 
66  return layer->priv->is_parent;
67 }
68 
69 gint
71 {
72  g_return_val_if_fail (EV_IS_LAYER (layer), 0);
73 
74  return layer->priv->rb_group;
75 }