1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; c-indent-level: 8 -*- */
3 * Copyright (C) 2000-2003 Marco Pesenti Gritti
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 #if !defined (__EV_EVINCE_DOCUMENT_H_INSIDE__) && !defined (EVINCE_COMPILATION)
22 #error "Only <evince-document.h> can be included directly."
25 #ifndef EV_DOCUMENT_INFO_H
26 #define EV_DOCUMENT_INFO_H
28 #include <glib-object.h>
33 typedef struct _EvDocumentInfo EvDocumentInfo;
34 typedef struct _EvDocumentLicense EvDocumentLicense;
36 #define EV_TYPE_DOCUMENT_INFO (ev_document_info_get_type())
40 EV_DOCUMENT_LAYOUT_SINGLE_PAGE,
41 EV_DOCUMENT_LAYOUT_ONE_COLUMN,
42 EV_DOCUMENT_LAYOUT_TWO_COLUMN_LEFT,
43 EV_DOCUMENT_LAYOUT_TWO_COLUMN_RIGHT,
44 EV_DOCUMENT_LAYOUT_TWO_PAGE_LEFT,
45 EV_DOCUMENT_LAYOUT_TWO_PAGE_RIGHT
50 EV_DOCUMENT_MODE_NONE,
51 EV_DOCUMENT_MODE_USE_OC,
52 EV_DOCUMENT_MODE_USE_THUMBS,
53 EV_DOCUMENT_MODE_FULL_SCREEN,
54 EV_DOCUMENT_MODE_USE_ATTACHMENTS,
55 EV_DOCUMENT_MODE_PRESENTATION = EV_DOCUMENT_MODE_FULL_SCREEN /* Will these be different? */
60 EV_DOCUMENT_UI_HINT_HIDE_TOOLBAR = 1 << 0,
61 EV_DOCUMENT_UI_HINT_HIDE_MENUBAR = 1 << 1,
62 EV_DOCUMENT_UI_HINT_HIDE_WINDOWUI = 1 << 2,
63 EV_DOCUMENT_UI_HINT_FIT_WINDOW = 1 << 3,
64 EV_DOCUMENT_UI_HINT_CENTER_WINDOW = 1 << 4,
65 EV_DOCUMENT_UI_HINT_DISPLAY_DOC_TITLE = 1 << 5,
66 EV_DOCUMENT_UI_HINT_DIRECTION_RTL = 1 << 6
69 /* This define is needed because glib-mkenums chokes with multiple lines */
70 #define PERMISSIONS_FULL (EV_DOCUMENT_PERMISSIONS_OK_TO_PRINT \
71 | EV_DOCUMENT_PERMISSIONS_OK_TO_MODIFY \
72 | EV_DOCUMENT_PERMISSIONS_OK_TO_COPY \
73 | EV_DOCUMENT_PERMISSIONS_OK_TO_ADD_NOTES)
77 EV_DOCUMENT_PERMISSIONS_OK_TO_PRINT = 1 << 0,
78 EV_DOCUMENT_PERMISSIONS_OK_TO_MODIFY = 1 << 1,
79 EV_DOCUMENT_PERMISSIONS_OK_TO_COPY = 1 << 2,
80 EV_DOCUMENT_PERMISSIONS_OK_TO_ADD_NOTES = 1 << 3,
81 EV_DOCUMENT_PERMISSIONS_FULL = PERMISSIONS_FULL
82 } EvDocumentPermissions;
86 EV_DOCUMENT_INFO_TITLE = 1 << 0,
87 EV_DOCUMENT_INFO_FORMAT = 1 << 1,
88 EV_DOCUMENT_INFO_AUTHOR = 1 << 2,
89 EV_DOCUMENT_INFO_SUBJECT = 1 << 3,
90 EV_DOCUMENT_INFO_KEYWORDS = 1 << 4,
91 EV_DOCUMENT_INFO_LAYOUT = 1 << 5,
92 EV_DOCUMENT_INFO_CREATOR = 1 << 6,
93 EV_DOCUMENT_INFO_PRODUCER = 1 << 7,
94 EV_DOCUMENT_INFO_CREATION_DATE = 1 << 8,
95 EV_DOCUMENT_INFO_MOD_DATE = 1 << 9,
96 EV_DOCUMENT_INFO_LINEARIZED = 1 << 10,
97 EV_DOCUMENT_INFO_START_MODE = 1 << 11,
98 EV_DOCUMENT_INFO_UI_HINTS = 1 << 12,
99 EV_DOCUMENT_INFO_PERMISSIONS = 1 << 13,
100 EV_DOCUMENT_INFO_N_PAGES = 1 << 14,
101 EV_DOCUMENT_INFO_SECURITY = 1 << 15,
102 EV_DOCUMENT_INFO_PAPER_SIZE = 1 << 16,
103 EV_DOCUMENT_INFO_LICENSE = 1 << 17,
105 } EvDocumentInfoFields;
107 struct _EvDocumentInfo
110 char *format; /* eg, "pdf-1.5" */
120 EvDocumentLayout layout;
127 EvDocumentLicense *license;
129 /* Mask of all the valid fields */
133 GType ev_document_info_get_type (void) G_GNUC_CONST;
134 EvDocumentInfo *ev_document_info_copy (EvDocumentInfo *info);
135 void ev_document_info_free (EvDocumentInfo *info);
137 /* EvDocumentLicense */
138 #define EV_TYPE_DOCUMENT_LICENSE (ev_document_license_get_type())
139 struct _EvDocumentLicense {
142 gchar *web_statement;
144 GType ev_document_license_get_type (void) G_GNUC_CONST;
145 EvDocumentLicense *ev_document_license_new (void);
146 EvDocumentLicense *ev_document_license_copy (EvDocumentLicense *license);
147 void ev_document_license_free (EvDocumentLicense *license);
148 const gchar *ev_document_license_get_text (EvDocumentLicense *license);
149 const gchar *ev_document_license_get_uri (EvDocumentLicense *license);
150 const gchar *ev_document_license_get_web_statement (EvDocumentLicense *license);
154 #endif /* EV_DOCUMENT_INFO_H */