]> www.fi.muni.cz Git - evince.git/blob - backend/ev-document.h
Redo size handling.
[evince.git] / backend / ev-document.h
1 /*
2  *  Copyright (C) 2000-2003 Marco Pesenti Gritti
3  *
4  *  This program is free software; you can redistribute it and/or modify
5  *  it under the terms of the GNU General Public License as published by
6  *  the Free Software Foundation; either version 2, or (at your option)
7  *  any later version.
8  *
9  *  This program is distributed in the hope that it will be useful,
10  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  *  GNU General Public License for more details.
13  *
14  *  You should have received a copy of the GNU General Public License
15  *  along with this program; if not, write to the Free Software
16  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17  *
18  *  $Id$
19  */
20
21 #ifndef EV_DOCUMENT_H
22 #define EV_DOCUMENT_H
23
24 #include <glib-object.h>
25 #include <glib.h>
26 #include <gdk/gdk.h>
27
28 G_BEGIN_DECLS
29
30 #define EV_TYPE_DOCUMENT            (ev_document_get_type ())
31 #define EV_DOCUMENT(o)              (G_TYPE_CHECK_INSTANCE_CAST ((o), EV_TYPE_DOCUMENT, EvDocument))
32 #define EV_DOCUMENT_IFACE(k)        (G_TYPE_CHECK_CLASS_CAST((k), EV_TYPE_DOCUMENT, EvDocumentIface))
33 #define EV_IS_DOCUMENT(o)           (G_TYPE_CHECK_INSTANCE_TYPE ((o), EV_TYPE_DOCUMENT))
34 #define EV_IS_DOCUMENT_IFACE(k)     (G_TYPE_CHECK_CLASS_TYPE ((k), EV_TYPE_DOCUMENT))
35 #define EV_DOCUMENT_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), EV_TYPE_DOCUMENT, EvDocumentIface))
36
37 typedef struct _EvDocument      EvDocument;
38 typedef struct _EvDocumentIface EvDocumentIface;
39
40 struct _EvDocumentIface
41 {
42         GTypeInterface base_iface;
43
44         /* Methods  */
45         gboolean    (* load)            (EvDocument *document,
46                                          const char *uri,
47                                          GError    **error);
48         int         (* get_n_pages)     (EvDocument *document);
49         void        (* set_page)        (EvDocument  *document,
50                                          int          page);
51         void        (* set_target)      (EvDocument  *document,
52                                          GdkDrawable *target);
53         void        (* set_scale)       (EvDocument  *document,
54                                          double       scale);
55         void        (* set_page_offset) (EvDocument  *document,
56                                          int          x,
57                                          int          y);
58         void        (* get_page_size)   (EvDocument  *document,
59                                          int         *width,
60                                          int         *height);
61         void        (* render)          (EvDocument  *document,
62                                          int          clip_x,
63                                          int          clip_y,
64                                          int          clip_width,
65                                          int          clip_height);
66 };
67
68 GType ev_document_get_type (void);
69
70 gboolean ev_document_load            (EvDocument   *document,
71                                       const char   *uri,
72                                       GError      **error);
73 int      ev_document_get_n_pages     (EvDocument   *document);
74 void     ev_document_set_page        (EvDocument   *document,
75                                       int           page);
76 void     ev_document_set_target      (EvDocument   *document,
77                                       GdkDrawable  *target);
78 void     ev_document_set_scale       (EvDocument   *document,
79                                       double        scale);
80 void     ev_document_set_page_offset (EvDocument   *document,
81                                       int           x,
82                                       int           y);
83 void     ev_document_get_page_size   (EvDocument   *document,
84                                       int          *width,
85                                       int          *height);
86 void     ev_document_render          (EvDocument   *document,
87                                       int           clip_x,
88                                       int           clip_y,
89                                       int           clip_width,
90                                       int           clip_height);
91
92 G_END_DECLS
93
94 #endif