1 /* this file is part of evince, a gnome document viewer
3 * Copyright (C) 2008 Carlos Garcia Campos <carlosgc@gnome.org>
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.
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.
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.
24 struct _EvLayerPrivate {
29 #define EV_LAYER_GET_PRIVATE(object) \
30 (G_TYPE_INSTANCE_GET_PRIVATE ((object), EV_TYPE_LAYER, EvLayerPrivate))
32 G_DEFINE_TYPE (EvLayer, ev_layer, G_TYPE_OBJECT)
35 ev_layer_class_init (EvLayerClass *klass)
37 GObjectClass *g_object_class = G_OBJECT_CLASS (klass);
39 g_type_class_add_private (g_object_class, sizeof (EvLayerPrivate));
43 ev_layer_init (EvLayer *layer)
45 layer->priv = EV_LAYER_GET_PRIVATE (layer);
49 ev_layer_new (gboolean is_parent,
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;
62 ev_layer_is_parent (EvLayer *layer)
64 g_return_val_if_fail (EV_IS_LAYER (layer), FALSE);
66 return layer->priv->is_parent;
70 ev_layer_get_rb_group (EvLayer *layer)
72 g_return_val_if_fail (EV_IS_LAYER (layer), 0);
74 return layer->priv->rb_group;