source: trunk/Lucide/SOURCE/plugins/ludoc/lutypes.h @ 213

Last change on this file since 213 was 213, checked in by Eugene Romanenko, 14 years ago

Opening external files from links in document

File size: 5.4 KB
Line 
1/* ***** BEGIN LICENSE BLOCK *****
2 * Version: CDDL 1.0/LGPL 2.1
3 *
4 * The contents of this file are subject to the COMMON DEVELOPMENT AND
5 * DISTRIBUTION LICENSE (CDDL) Version 1.0 (the "License"); you may not use
6 * this file except in compliance with the License. You may obtain a copy of
7 * the License at http://www.sun.com/cddl/
8 *
9 * Software distributed under the License is distributed on an "AS IS" basis,
10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 * for the specific language governing rights and limitations under the
12 * License.
13 *
14 * The Initial Developer of the Original Code is
15 * Eugene Romanenko, netlabs.org.
16 * Portions created by the Initial Developer are Copyright (C) 2006
17 * the Initial Developer. All Rights Reserved.
18 *
19 * Contributor(s):
20 *
21 * Alternatively, the contents of this file may be used under the terms of
22 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
23 * in which case the provisions of the LGPL are applicable instead of those
24 * above. If you wish to allow use of your version of this file only under the
25 * terms of the LGPL, and not to allow others to use your version of this file
26 * under the terms of the CDDL, indicate your decision by deleting the
27 * provisions above and replace them with the notice and other provisions
28 * required by the LGPL. If you do not delete the provisions above, a recipient
29 * may use your version of this file under the terms of any one of the CDDL
30 * or the LGPL.
31 *
32 * ***** END LICENSE BLOCK ***** */
33
34
35#ifndef lutypes_h
36#define lutypes_h
37
38
39struct LuRectangle
40{ 
41        double x1;
42        double y1;
43        double x2;
44        double y2; 
45};
46
47
48#define LU_LINK_TYPE_TITLE         0
49#define LU_LINK_TYPE_PAGE          1
50#define LU_LINK_TYPE_EXTERNAL_URI  2
51#define LU_LINK_TYPE_EXTERNAL_FILE 3
52#define LU_LINK_TYPE_LAUNCH        4
53
54
55struct LuLink
56{
57        char *title;
58        char *uri;
59        long type;
60        long page;
61};
62
63
64struct LuLinkMapping
65{
66        LuLink link;
67        LuRectangle area;
68};
69
70
71#define LU_FONTEMBED_NOT_EMBEDDED               0
72#define LU_FONTEMBED_EMBEDDED                   1
73#define LU_FONTEMBED_EMBEDDED_SUBSET    2
74
75struct LuFontInfo
76{
77        char  *name;
78        char  *type;
79        short embedded;
80};
81
82       
83#define LU_DOCUMENT_LAYOUT_SINGLE_PAGE       0
84#define LU_DOCUMENT_LAYOUT_ONE_COLUMN        1
85#define LU_DOCUMENT_LAYOUT_TWO_COLUMN_LEFT   2
86#define LU_DOCUMENT_LAYOUT_TWO_COLUMN_RIGHT  3
87#define LU_DOCUMENT_LAYOUT_TWO_PAGE_LEFT     4
88#define LU_DOCUMENT_LAYOUT_TWO_PAGE_RIGHT    5
89
90       
91#define LU_DOCUMENT_MODE_NONE             0
92#define LU_DOCUMENT_MODE_USE_OC           1
93#define LU_DOCUMENT_MODE_USE_THUMBS       2
94#define LU_DOCUMENT_MODE_FULL_SCREEN      3
95#define LU_DOCUMENT_MODE_USE_ATTACHMENTS  4
96#define LU_DOCUMENT_MODE_PRESENTATION     LU_DOCUMENT_MODE_FULL_SCREEN
97
98
99#define LU_DOCUMENT_UI_HINT_HIDE_TOOLBAR       0x0001
100#define LU_DOCUMENT_UI_HINT_HIDE_MENUBAR       0x0002
101#define LU_DOCUMENT_UI_HINT_HIDE_WINDOWUI      0x0004
102#define LU_DOCUMENT_UI_HINT_FIT_WINDOW         0x0008
103#define LU_DOCUMENT_UI_HINT_CENTER_WINDOW      0x0010
104#define LU_DOCUMENT_UI_HINT_DISPLAY_DOC_TITLE  0x0020
105#define LU_DOCUMENT_UI_HINT_DIRECTION_RTL      0x0040
106
107
108
109#define LU_DOCUMENT_PERMISSIONS_OK_TO_PRINT      0x0001
110#define LU_DOCUMENT_PERMISSIONS_OK_TO_MODIFY     0x0002
111#define LU_DOCUMENT_PERMISSIONS_OK_TO_COPY       0x0004
112#define LU_DOCUMENT_PERMISSIONS_OK_TO_ADD_NOTES  0x0008
113#define LU_DOCUMENT_PERMISSIONS_FULL  (LU_DOCUMENT_PERMISSIONS_OK_TO_PRINT|LU_DOCUMENT_PERMISSIONS_OK_TO_MODIFY|LU_DOCUMENT_PERMISSIONS_OK_TO_COPY|LU_DOCUMENT_PERMISSIONS_OK_TO_ADD_NOTES)
114
115
116#define LU_DOCUMENT_INFO_TITLE          0x0001
117#define LU_DOCUMENT_INFO_FORMAT         0x0002
118#define LU_DOCUMENT_INFO_AUTHOR         0x0004
119#define LU_DOCUMENT_INFO_SUBJECT        0x0008
120#define LU_DOCUMENT_INFO_KEYWORDS       0x0010
121#define LU_DOCUMENT_INFO_LAYOUT         0x0020
122#define LU_DOCUMENT_INFO_CREATOR        0x0040
123#define LU_DOCUMENT_INFO_PRODUCER       0x0080
124#define LU_DOCUMENT_INFO_CREATION_DATE  0x0100
125#define LU_DOCUMENT_INFO_MOD_DATE       0x0200
126#define LU_DOCUMENT_INFO_LINEARIZED     0x0400
127#define LU_DOCUMENT_INFO_START_MODE     0x0800
128#define LU_DOCUMENT_INFO_UI_HINTS       0x1000
129#define LU_DOCUMENT_INFO_PERMISSIONS    0x2000
130#define LU_DOCUMENT_INFO_N_PAGES        0x4000
131#define LU_DOCUMENT_INFO_SECURITY       0x8000
132
133
134struct LuDocumentInfo
135{
136        char *title;
137        char *format;
138        char *author;
139        char *subject;
140        char *keywords;
141        char *creator;
142        char *producer;
143        long security;
144        long linearized;
145        unsigned long creation_date;
146        unsigned long modified_date;
147        unsigned long layout;
148        unsigned long mode;
149        unsigned long ui_hints;
150        unsigned long permissions;
151        long n_pages;
152
153        // Mask of all valid fields
154        unsigned long fields_mask;
155};
156
157#ifndef __SOMIDL__
158typedef long (_System *_asynchCallbackFn)( void *data );
159//typedef _asynchCallbackFn *asynchCallbackFn;
160#endif
161
162// Load errors
163#define LU_LDERR_NO_ERROR       0
164#define LU_LDERR_CUSTOM         1
165#define LU_LDERR_OUT_OF_MEMORY  2
166#define LU_LDERR_OPEN_ERROR     3
167#define LU_LDERR_READ_ERROR     4
168#define LU_LDERR_DAMAGED        5
169#define LU_LDERR_WRONG_FORMAT   6
170#define LU_LDERR_ENCRYPTED      7
171
172// Render errors/warnings
173#define LU_RERR_NO_ERROR              0
174#define LU_RERR_CUSTOM                1
175#define LU_RERR_OUT_OF_MEMORY         2
176#define LU_RERR_CORRUPTED_PAGE_DATA   3
177#define LU_RERR_FONT_NOT_FOUND        4
178
179
180#endif // lutypes_h
Note: See TracBrowser for help on using the repository browser.