]> www.fi.muni.cz Git - evince.git/blob - backend/ev-document-info.h
3930910fee42ce3ee106ae14bd7691de83b378e6
[evince.git] / backend / 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 #include "ev-link.h"
27
28 G_BEGIN_DECLS
29
30 typedef struct _EvDocumentInfo    EvDocumentInfo;
31
32 typedef enum
33 {
34         EV_DOCUMENT_LAYOUT_SINGLE_PAGE,
35         EV_DOCUMENT_LAYOUT_ONE_COLUMN,
36         EV_DOCUMENT_LAYOUT_TWO_COLUMN_LEFT,
37         EV_DOCUMENT_LAYOUT_TWO_COLUMN_RIGHT,
38         EV_DOCUMENT_LAYOUT_TWO_PAGE_LEFT,
39         EV_DOCUMENT_LAYOUT_TWO_PAGE_RIGHT,
40 } EvDocumentLayout;
41
42 typedef enum
43 {
44         EV_DOCUMENT_MODE_NONE,
45         EV_DOCUMENT_MODE_USE_OC,
46         EV_DOCUMENT_MODE_USE_THUMBS,
47         EV_DOCUMENT_MODE_FULL_SCREEN,
48         EV_DOCUMENT_MODE_USE_ATTACHMENTS,
49         EV_DOCUMENT_MODE_PRESENTATION = EV_DOCUMENT_MODE_FULL_SCREEN /* Will these be different? */
50 } EvDocumentMode;
51
52 typedef enum
53 {
54         EV_DOCUMENT_UI_HINT_HIDE_TOOLBAR = 1 << 0,
55         EV_DOCUMENT_UI_HINT_HIDE_MENUBAR = 1 << 1,
56         EV_DOCUMENT_UI_HINT_HIDE_WINDOWUI = 1 << 2,
57         EV_DOCUMENT_UI_HINT_FIT_WINDOW = 1 << 3,
58         EV_DOCUMENT_UI_HINT_CENTER_WINDOW = 1 << 4,
59         EV_DOCUMENT_UI_HINT_DISPLAY_DOC_TITLE = 1 << 5,
60         EV_DOCUMENT_UI_HINT_DIRECTION_RTL = 1 << 6,
61 } EvDocumentUIHints;
62
63
64 typedef enum
65 {
66         EV_DOCUMENT_PERMISSIONS_OK_TO_PRINT = 1 << 0,
67         EV_DOCUMENT_PERMISSIONS_OK_TO_MODIFY = 1 << 1,
68         EV_DOCUMENT_PERMISSIONS_OK_TO_COPY = 1 << 2,
69         EV_DOCUMENT_PERMISSIONS_OK_TO_ADD_NOTES = 1 << 3,
70         EV_DOCUMENT_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),
74 } EvDocumentPermissions;
75
76 typedef enum
77 {
78         EV_DOCUMENT_INFO_TITLE = 1 << 0,
79         EV_DOCUMENT_INFO_FORMAT = 1 << 1,
80         EV_DOCUMENT_INFO_AUTHOR = 1 << 2,
81         EV_DOCUMENT_INFO_SUBJECT = 1 << 3,
82         EV_DOCUMENT_INFO_KEYWORDS = 1 << 4,
83         EV_DOCUMENT_INFO_LAYOUT = 1 << 5,
84         EV_DOCUMENT_INFO_CREATOR = 1 << 6,
85         EV_DOCUMENT_INFO_PRODUCER = 1 << 7,
86         EV_DOCUMENT_INFO_CREATION_DATE = 1 << 8,
87         EV_DOCUMENT_INFO_MOD_DATE = 1 << 9,
88         EV_DOCUMENT_INFO_LINEARIZED = 1 << 10,
89         EV_DOCUMENT_INFO_START_MODE = 1 << 11,
90         EV_DOCUMENT_INFO_UI_HINTS = 1 << 12,
91         EV_DOCUMENT_INFO_PERMISSIONS = 1 << 13,
92         EV_DOCUMENT_INFO_N_PAGES = 1 << 14,
93         EV_DOCUMENT_INFO_SECURITY = 1 << 15
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
115         /* Mask of all the valid fields */
116         guint fields_mask;
117 };
118
119 void ev_document_info_free (EvDocumentInfo *info);
120
121 G_END_DECLS
122
123 #endif /* EV_DOCUMENT_INFO_H */