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-page.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-page.h"
23 
24 G_DEFINE_TYPE (EvPage, ev_page, G_TYPE_OBJECT)
25 
26 static void
28 {
29 }
30 
31 static void
32 ev_page_finalize (GObject *object)
33 {
34  EvPage *page = EV_PAGE (object);
35 
36  if (page->backend_destroy_func) {
37  page->backend_destroy_func (page->backend_page);
38  page->backend_destroy_func = NULL;
39  }
40  page->backend_page = NULL;
41 
42  (* G_OBJECT_CLASS (ev_page_parent_class)->finalize) (object);
43 }
44 
45 static void
47 {
48  GObjectClass *object_class = G_OBJECT_CLASS (klass);
49 
50  object_class->finalize = ev_page_finalize;
51 }
52 
53 EvPage *
54 ev_page_new (gint index)
55 {
56  EvPage *page;
57 
58  page = EV_PAGE (g_object_new (EV_TYPE_PAGE, NULL));
59  page->index = index;
60 
61  return page;
62 }