]> www.fi.muni.cz Git - evince.git/blob - libdocument/ev-document-info.h
51d5f7d9e4c099339168886134e91f3cdc7f15dc
[evince.git] / libdocument / ev-document-info.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; c-indent-level: 8 -*- */
2 /*
3  *  Copyright (C) 2000-2003 Marco Pesenti Gritti
4  *
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)
8  *  any later version.
9  *
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.
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18  *
19  */
20
21 #ifndef EV_DOCUMENT_INFO_H
22 #define EV_DOCUMENT_INFO_H
23
24 #include <glib-object.h>
25 #include <glib.h>
26
27 G_BEGIN_DECLS
28
29 typedef struct _EvDocumentInfo    EvDocumentInfo;
30
31 #define EV_TYPE_DOCUMENT_INFO (ev_document_info_get_type())
32
33 typedef enum
34 {
35         EV_DOCUMENT_LAYOUT_SINGLE_PAGE,
36         EV_DOCUMENT_LAYOUT_ONE_COLUMN,
37         EV_DOCUMENT_LAYOUT_TWO_COLUMN_LEFT,
38         EV_DOCUMENT_LAYOUT_TWO_COLUMN_RIGHT,
39         EV_DOCUMENT_LAYOUT_TWO_PAGE_LEFT,
40         EV_DOCUMENT_LAYOUT_TWO_PAGE_RIGHT
41 } EvDocumentLayout;
42
43 typedef enum
44 {
45         EV_DOCUMENT_MODE_NONE,
46         EV_DOCUMENT_MODE_USE_OC,
47         EV_DOCUMENT_MODE_USE_THUMBS,
48         EV_DOCUMENT_MODE_FULL_SCREEN,
49         EV_DOCUMENT_MODE_USE_ATTACHMENTS,
50         EV_DOCUMENT_MODE_PRESENTATION = EV_DOCUMENT_MODE_FULL_SCREEN /* Will these be different? */
51 } EvDocumentMode;
52
53 typedef enum
54 {
55         EV_DOCUMENT_UI_HINT_HIDE_TOOLBAR = 1 << 0,
56         EV_DOCUMENT_UI_HINT_HIDE_MENUBAR = 1 << 1,
57         EV_DOCUMENT_UI_HINT_HIDE_WINDOWUI = 1 << 2,
58         EV_DOCUMENT_UI_HINT_FIT_WINDOW = 1 << 3,
59         EV_DOCUMENT_UI_HINT_CENTER_WINDOW = 1 << 4,
60         EV_DOCUMENT_UI_HINT_DISPLAY_DOC_TITLE = 1 << 5,
61         EV_DOCUMENT_UI_HINT_DIRECTION_RTL = 1 << 6
62 } EvDocumentUIHints;
63
64 /* This define is needed because glib-mkenums chokes with multiple lines */
65 #define PERMISSIONS_FULL (EV_DOCUMENT_PERMISSIONS_OK_TO_PRINT  \
66                         | EV_DOCUMENT_PERMISSIONS_OK_TO_MODIFY \
67                         | EV_DOCUMENT_PERMISSIONS_OK_TO_COPY   \
68                         | EV_DOCUMENT_PERMISSIONS_OK_TO_ADD_NOTES)
69
70 typedef enum
71 {
72         EV_DOCUMENT_PERMISSIONS_OK_TO_PRINT = 1 << 0,
73         EV_DOCUMENT_PERMISSIONS_OK_TO_MODIFY = 1 << 1,
74         EV_DOCUMENT_PERMISSIONS_OK_TO_COPY = 1 << 2,
75         EV_DOCUMENT_PERMISSIONS_OK_TO_ADD_NOTES = 1 << 3,
76         EV_DOCUMENT_PERMISSIONS_FULL = PERMISSIONS_FULL
77 } EvDocumentPermissions;
78
79 typedef enum
80 {
81         EV_DOCUMENT_INFO_TITLE = 1 << 0,
82         EV_DOCUMENT_INFO_FORMAT = 1 << 1,
83         EV_DOCUMENT_INFO_AUTHOR = 1 << 2,
84         EV_DOCUMENT_INFO_SUBJECT = 1 << 3,
85         EV_DOCUMENT_INFO_KEYWORDS = 1 << 4,
86         EV_DOCUMENT_INFO_LAYOUT = 1 << 5,
87         EV_DOCUMENT_INFO_CREATOR = 1 << 6,
88         EV_DOCUMENT_INFO_PRODUCER = 1 << 7,
89         EV_DOCUMENT_INFO_CREATION_DATE = 1 << 8,
90         EV_DOCUMENT_INFO_MOD_DATE = 1 << 9,
91         EV_DOCUMENT_INFO_LINEARIZED = 1 << 10,
92         EV_DOCUMENT_INFO_START_MODE = 1 << 11,
93         EV_DOCUMENT_INFO_UI_HINTS = 1 << 12,
94         EV_DOCUMENT_INFO_PERMISSIONS = 1 << 13,
95         EV_DOCUMENT_INFO_N_PAGES = 1 << 14,
96         EV_DOCUMENT_INFO_SECURITY = 1 << 15,
97         EV_DOCUMENT_INFO_PAPER_SIZE = 1 << 16
98 } EvDocumentInfoFields;
99
100 struct _EvDocumentInfo
101 {
102         char *title;
103         char *format; /* eg, "pdf-1.5" */
104         char *author;
105         char *subject;
106         char *keywords;
107         char *creator;
108         char *producer;
109         char *linearized;
110         char *security;
111         GTime creation_date;
112         GTime modified_date;
113         EvDocumentLayout layout;
114         EvDocumentMode mode;
115         guint ui_hints;
116         guint permissions;
117         int   n_pages;
118         double paper_height;
119         double paper_width;
120
121         /* Mask of all the valid fields */
122         guint fields_mask;
123 };
124
125 GType           ev_document_info_get_type (void) G_GNUC_CONST;
126 EvDocumentInfo *ev_document_info_copy     (EvDocumentInfo *info);
127 void            ev_document_info_free     (EvDocumentInfo *info);
128
129 G_END_DECLS
130
131 #endif /* EV_DOCUMENT_INFO_H */