]> www.fi.muni.cz Git - evince.git/blob - libview/ev-document-model.h
[presentation] fixed update scale after screen change||window move
[evince.git] / libview / ev-document-model.h
1 /* this file is part of evince, a gnome document viewer
2  *
3  *  Copyright (C) 2009 Carlos Garcia Campos
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 #if !defined (__EV_EVINCE_VIEW_H_INSIDE__) && !defined (EVINCE_COMPILATION)
21 #error "Only <evince-view.h> can be included directly."
22 #endif
23
24 #ifndef __EV_DOCUMENT_MODEL_H__
25 #define __EV_DOCUMENT_MODEL_H__
26
27 #include <glib-object.h>
28 #include <evince-document.h>
29
30 G_BEGIN_DECLS
31
32 #define EV_TYPE_DOCUMENT_MODEL            (ev_document_model_get_type ())
33 #define EV_DOCUMENT_MODEL(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), EV_TYPE_DOCUMENT_MODEL, EvDocumentModel))
34 #define EV_IS_DOCUMENT_MODEL(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EV_TYPE_DOCUMENT_MODEL))
35
36 typedef enum {
37         EV_SIZING_BEST_FIT,
38         EV_SIZING_FIT_WIDTH,
39         EV_SIZING_FREE,
40 } EvSizingMode;
41
42 typedef struct _EvDocumentModel        EvDocumentModel;
43 typedef struct _EvDocumentModelClass   EvDocumentModelClass;
44
45 GType            ev_document_model_get_type          (void) G_GNUC_CONST;
46 EvDocumentModel *ev_document_model_new               (void);
47 EvDocumentModel *ev_document_model_new_with_document (EvDocument      *document);
48
49 void             ev_document_model_set_document      (EvDocumentModel *model,
50                                                       EvDocument      *document);
51 EvDocument      *ev_document_model_get_document      (EvDocumentModel *model);
52 void             ev_document_model_set_page          (EvDocumentModel *model,
53                                                       gint             page);
54 void             ev_document_model_set_page_by_label (EvDocumentModel *model,
55                                                       const gchar     *page_label);
56 gint             ev_document_model_get_page          (EvDocumentModel *model);
57 void             ev_document_model_set_scale         (EvDocumentModel *model,
58                                                       gdouble          scale);
59 gdouble          ev_document_model_get_scale         (EvDocumentModel *model);
60 void             ev_document_model_set_max_scale     (EvDocumentModel *model,
61                                                       gdouble          max_scale);
62 gdouble          ev_document_model_get_max_scale     (EvDocumentModel *model);
63 void             ev_document_model_set_min_scale     (EvDocumentModel *model,
64                                                       gdouble          min_scale);
65 gdouble          ev_document_model_get_min_scale     (EvDocumentModel *model);
66 void             ev_document_model_set_sizing_mode   (EvDocumentModel *model,
67                                                       EvSizingMode     mode);
68 EvSizingMode     ev_document_model_get_sizing_mode   (EvDocumentModel *model);
69 void             ev_document_model_set_rotation      (EvDocumentModel *model,
70                                                       gint             rotation);
71 gint             ev_document_model_get_rotation      (EvDocumentModel *model);
72 void           ev_document_model_set_inverted_colors (EvDocumentModel *model,
73                                                       gboolean         inverted_colors);
74 gboolean       ev_document_model_get_inverted_colors (EvDocumentModel *model);
75 void             ev_document_model_set_continuous    (EvDocumentModel *model,
76                                                       gboolean         continuous);
77 gboolean         ev_document_model_get_continuous    (EvDocumentModel *model);
78 void             ev_document_model_set_dual_page     (EvDocumentModel *model,
79                                                       gboolean         dual_page);
80 gboolean         ev_document_model_get_dual_page     (EvDocumentModel *model);
81 void             ev_document_model_set_fullscreen    (EvDocumentModel *model,
82                                                       gboolean         fullscreen);
83 gboolean         ev_document_model_get_fullscreen    (EvDocumentModel *model);
84
85 G_END_DECLS
86
87 #endif /* __EV_DOCUMENT_MODEL_H__ */