]> www.fi.muni.cz Git - evince.git/blob - libdocument/ev-document-info.h
Fix a headers problem with ev-link
[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 typedef enum
32 {
33         EV_DOCUMENT_LAYOUT_SINGLE_PAGE,
34         EV_DOCUMENT_LAYOUT_ONE_COLUMN,
35         EV_DOCUMENT_LAYOUT_TWO_COLUMN_LEFT,
36         EV_DOCUMENT_LAYOUT_TWO_COLUMN_RIGHT,
37         EV_DOCUMENT_LAYOUT_TWO_PAGE_LEFT,
38         EV_DOCUMENT_LAYOUT_TWO_PAGE_RIGHT,
39 } EvDocumentLayout;
40
41 typedef enum
42 {
43         EV_DOCUMENT_MODE_NONE,
44         EV_DOCUMENT_MODE_USE_OC,
45         EV_DOCUMENT_MODE_USE_THUMBS,
46         EV_DOCUMENT_MODE_FULL_SCREEN,
47         EV_DOCUMENT_MODE_USE_ATTACHMENTS,
48         EV_DOCUMENT_MODE_PRESENTATION = EV_DOCUMENT_MODE_FULL_SCREEN /* Will these be different? */
49 } EvDocumentMode;
50
51 typedef enum
52 {
53         EV_DOCUMENT_UI_HINT_HIDE_TOOLBAR = 1 << 0,
54         EV_DOCUMENT_UI_HINT_HIDE_MENUBAR = 1 << 1,
55         EV_DOCUMENT_UI_HINT_HIDE_WINDOWUI = 1 << 2,
56         EV_DOCUMENT_UI_HINT_FIT_WINDOW = 1 << 3,
57         EV_DOCUMENT_UI_HINT_CENTER_WINDOW = 1 << 4,
58         EV_DOCUMENT_UI_HINT_DISPLAY_DOC_TITLE = 1 << 5,
59         EV_DOCUMENT_UI_HINT_DIRECTION_RTL = 1 << 6,
60 } EvDocumentUIHints;
61
62
63 typedef enum
64 {
65         EV_DOCUMENT_PERMISSIONS_OK_TO_PRINT = 1 << 0,
66         EV_DOCUMENT_PERMISSIONS_OK_TO_MODIFY = 1 << 1,
67         EV_DOCUMENT_PERMISSIONS_OK_TO_COPY = 1 << 2,
68         EV_DOCUMENT_PERMISSIONS_OK_TO_ADD_NOTES = 1 << 3,
69         EV_DOCUMENT_PERMISSIONS_FULL = (EV_DOCUMENT_PERMISSIONS_OK_TO_PRINT
70                                         | EV_DOCUMENT_PERMISSIONS_OK_TO_MODIFY
71                                         | EV_DOCUMENT_PERMISSIONS_OK_TO_COPY
72                                         | EV_DOCUMENT_PERMISSIONS_OK_TO_ADD_NOTES),
73 } EvDocumentPermissions;
74
75 typedef enum
76 {
77         EV_DOCUMENT_INFO_TITLE = 1 << 0,
78         EV_DOCUMENT_INFO_FORMAT = 1 << 1,
79         EV_DOCUMENT_INFO_AUTHOR = 1 << 2,
80         EV_DOCUMENT_INFO_SUBJECT = 1 << 3,
81         EV_DOCUMENT_INFO_KEYWORDS = 1 << 4,
82         EV_DOCUMENT_INFO_LAYOUT = 1 << 5,
83         EV_DOCUMENT_INFO_CREATOR = 1 << 6,
84         EV_DOCUMENT_INFO_PRODUCER = 1 << 7,
85         EV_DOCUMENT_INFO_CREATION_DATE = 1 << 8,
86         EV_DOCUMENT_INFO_MOD_DATE = 1 << 9,
87         EV_DOCUMENT_INFO_LINEARIZED = 1 << 10,
88         EV_DOCUMENT_INFO_START_MODE = 1 << 11,
89         EV_DOCUMENT_INFO_UI_HINTS = 1 << 12,
90         EV_DOCUMENT_INFO_PERMISSIONS = 1 << 13,
91         EV_DOCUMENT_INFO_N_PAGES = 1 << 14,
92         EV_DOCUMENT_INFO_SECURITY = 1 << 15,
93         EV_DOCUMENT_INFO_PAPER_SIZE = 1 << 16
94 } EvDocumentInfoFields;
95
96 struct _EvDocumentInfo
97 {
98         char *title;
99         char *format; /* eg, "pdf-1.5" */
100         char *author;
101         char *subject;
102         char *keywords;
103         char *creator;
104         char *producer;
105         char *linearized;
106         char *security;
107         GTime creation_date;
108         GTime modified_date;
109         EvDocumentLayout layout;
110         EvDocumentMode mode;
111         guint ui_hints;
112         guint permissions;
113         int   n_pages;
114         double paper_height;
115         double paper_width;
116
117         /* Mask of all the valid fields */
118         guint fields_mask;
119 };
120
121 void ev_document_info_free (EvDocumentInfo *info);
122
123 G_END_DECLS
124
125 #endif /* EV_DOCUMENT_INFO_H */