1 | |
---|
2 | /* |
---|
3 | * This file was generated by the SOM Compiler. |
---|
4 | * Generated using: |
---|
5 | * SOM incremental update: 2.24 |
---|
6 | */ |
---|
7 | |
---|
8 | |
---|
9 | /* ***** BEGIN LICENSE BLOCK ***** |
---|
10 | * Version: CDDL 1.0/LGPL 2.1 |
---|
11 | * |
---|
12 | * The contents of this file are subject to the COMMON DEVELOPMENT AND |
---|
13 | * DISTRIBUTION LICENSE (CDDL) Version 1.0 (the "License"); you may not use |
---|
14 | * this file except in compliance with the License. You may obtain a copy of |
---|
15 | * the License at http://www.sun.com/cddl/ |
---|
16 | * |
---|
17 | * Software distributed under the License is distributed on an "AS IS" basis, |
---|
18 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License |
---|
19 | * for the specific language governing rights and limitations under the |
---|
20 | * License. |
---|
21 | * |
---|
22 | * The Initial Developer of the Original Code is |
---|
23 | * Eugene Romanenko, netlabs.org. |
---|
24 | * Portions created by the Initial Developer are Copyright (C) 2006 |
---|
25 | * the Initial Developer. All Rights Reserved. |
---|
26 | * |
---|
27 | * Contributor(s): |
---|
28 | * |
---|
29 | * Alternatively, the contents of this file may be used under the terms of |
---|
30 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), |
---|
31 | * in which case the provisions of the LGPL are applicable instead of those |
---|
32 | * above. If you wish to allow use of your version of this file only under the |
---|
33 | * terms of the LGPL, and not to allow others to use your version of this file |
---|
34 | * under the terms of the CDDL, indicate your decision by deleting the |
---|
35 | * provisions above and replace them with the notice and other provisions |
---|
36 | * required by the LGPL. If you do not delete the provisions above, a recipient |
---|
37 | * may use your version of this file under the terms of any one of the CDDL |
---|
38 | * or the LGPL. |
---|
39 | * |
---|
40 | * ***** END LICENSE BLOCK ***** */ |
---|
41 | |
---|
42 | |
---|
43 | |
---|
44 | /* |
---|
45 | * This file was generated by the SOM Compiler and Emitter Framework. |
---|
46 | * Generated using template emitter: |
---|
47 | * SOM Emitter emitxtm: 2.23.1.9 |
---|
48 | */ |
---|
49 | |
---|
50 | #ifndef SOM_Module_ludoc_Source |
---|
51 | #define SOM_Module_ludoc_Source |
---|
52 | #endif |
---|
53 | #define LuDocument_Class_Source |
---|
54 | |
---|
55 | #include "ludoc.xih" |
---|
56 | |
---|
57 | |
---|
58 | unsigned _System LibMain( unsigned hmod, unsigned termination ) |
---|
59 | { |
---|
60 | if ( termination ) { |
---|
61 | /* DLL is detaching from process */ |
---|
62 | } else { |
---|
63 | /* DLL is attaching to process */ |
---|
64 | } |
---|
65 | return( 1 ); |
---|
66 | } |
---|
67 | |
---|
68 | |
---|
69 | extern "C" LuDocument * _System createObject() |
---|
70 | { |
---|
71 | return new LuDocument; |
---|
72 | } |
---|
73 | |
---|
74 | extern "C" char * _System getSupportedExtensions() |
---|
75 | { |
---|
76 | return ""; |
---|
77 | } |
---|
78 | |
---|
79 | extern "C" char * _System getDescription() |
---|
80 | { |
---|
81 | return "NULL plugin, abstract base class for Lucide plugins."; |
---|
82 | } |
---|
83 | |
---|
84 | |
---|
85 | /* |
---|
86 | * SOM_Scope long SOMLINK getBpp(LuDocument *somSelf, Environment *ev) |
---|
87 | */ |
---|
88 | |
---|
89 | /* |
---|
90 | * The prototype for getBpp was replaced by the following prototype: |
---|
91 | */ |
---|
92 | SOM_Scope short SOMLINK getBpp(LuDocument *somSelf, Environment *ev) |
---|
93 | { |
---|
94 | // Abstract method does nothing |
---|
95 | return 0; |
---|
96 | } |
---|
97 | |
---|
98 | SOM_Scope boolean SOMLINK isScalable(LuDocument *somSelf, Environment *ev) |
---|
99 | { |
---|
100 | return FALSE; |
---|
101 | } |
---|
102 | |
---|
103 | |
---|
104 | SOM_Scope boolean SOMLINK isFixedImage(LuDocument *somSelf, |
---|
105 | Environment *ev) |
---|
106 | { |
---|
107 | return TRUE; |
---|
108 | } |
---|
109 | |
---|
110 | |
---|
111 | SOM_Scope boolean SOMLINK isRotable(LuDocument *somSelf, Environment *ev) |
---|
112 | { |
---|
113 | return FALSE; |
---|
114 | } |
---|
115 | |
---|
116 | |
---|
117 | SOM_Scope long SOMLINK getPageCount(LuDocument *somSelf, Environment *ev) |
---|
118 | { |
---|
119 | // Abstract method does nothing |
---|
120 | return 0; |
---|
121 | } |
---|
122 | |
---|
123 | |
---|
124 | SOM_Scope void SOMLINK getPageSize(LuDocument *somSelf, Environment *ev, |
---|
125 | long pagenum, double* width, |
---|
126 | double* height) |
---|
127 | { |
---|
128 | // Abstract method does nothing |
---|
129 | } |
---|
130 | |
---|
131 | |
---|
132 | SOM_Scope void SOMLINK renderPageToPixbuf(LuDocument *somSelf, |
---|
133 | Environment *ev, |
---|
134 | long pagenum, long src_x, |
---|
135 | long src_y, long src_width, |
---|
136 | long src_height, double scale, |
---|
137 | long rotation, LuPixbuf* pixbuf) |
---|
138 | { |
---|
139 | // Abstract method does nothing |
---|
140 | } |
---|
141 | |
---|
142 | |
---|
143 | SOM_Scope boolean SOMLINK isAsynchRenderingSupported(LuDocument *somSelf, |
---|
144 | Environment *ev) |
---|
145 | { |
---|
146 | return FALSE; |
---|
147 | } |
---|
148 | |
---|
149 | |
---|
150 | SOM_Scope void SOMLINK renderPageToPixbufAsynch(LuDocument *somSelf, |
---|
151 | Environment *ev, |
---|
152 | long pagenum, |
---|
153 | long src_x, |
---|
154 | long src_y, |
---|
155 | long src_width, |
---|
156 | long src_height, |
---|
157 | double scale, |
---|
158 | long rotation, |
---|
159 | LuPixbuf* pixbuf, |
---|
160 | LuDocument_asynchCallbackFn fnd, |
---|
161 | LuDocument_asynchCallbackFn fna, |
---|
162 | somToken fndata) |
---|
163 | { |
---|
164 | // Abstract method does nothing |
---|
165 | } |
---|
166 | |
---|
167 | |
---|
168 | SOM_Scope boolean SOMLINK isRenderIntoPS(LuDocument *somSelf, |
---|
169 | Environment *ev) |
---|
170 | { |
---|
171 | return FALSE; |
---|
172 | } |
---|
173 | |
---|
174 | SOM_Scope void SOMLINK renderPageToPS(LuDocument *somSelf, Environment *ev, |
---|
175 | long pagenum, long src_x, |
---|
176 | long src_y, long src_width, |
---|
177 | long src_height, double scale, |
---|
178 | long rotation, unsigned long hps, |
---|
179 | somMToken rect) |
---|
180 | { |
---|
181 | // Abstract method does nothing |
---|
182 | } |
---|
183 | |
---|
184 | |
---|
185 | SOM_Scope boolean SOMLINK isHaveText(LuDocument *somSelf, |
---|
186 | Environment *ev) |
---|
187 | { |
---|
188 | return FALSE; |
---|
189 | } |
---|
190 | |
---|
191 | |
---|
192 | SOM_Scope LuDocument_LuRectSequence* SOMLINK getSelectionRectangles(LuDocument *somSelf, |
---|
193 | Environment *ev, |
---|
194 | long pagenum, |
---|
195 | LuRectangle* selection) |
---|
196 | { |
---|
197 | // Abstract method does nothing |
---|
198 | return NULL; |
---|
199 | } |
---|
200 | |
---|
201 | |
---|
202 | SOM_Scope void SOMLINK freeRectangles(Environment *ev, |
---|
203 | LuDocument_LuRectSequence* rectangles) |
---|
204 | { |
---|
205 | if ( rectangles != NULL ) |
---|
206 | { |
---|
207 | if ( ( ( rectangles->_maximum != 0 ) || |
---|
208 | ( rectangles->_length != 0 ) ) && |
---|
209 | ( rectangles->_buffer != NULL ) ) |
---|
210 | { |
---|
211 | SOMFree( rectangles->_buffer ); |
---|
212 | } |
---|
213 | SOMFree( rectangles ); |
---|
214 | } |
---|
215 | } |
---|
216 | |
---|
217 | |
---|
218 | SOM_Scope string SOMLINK getText(LuDocument *somSelf, Environment *ev, |
---|
219 | long pagenum, LuRectangle* selection) |
---|
220 | { |
---|
221 | // Abstract method does nothing |
---|
222 | return NULL; |
---|
223 | } |
---|
224 | |
---|
225 | |
---|
226 | SOM_Scope boolean SOMLINK isHaveLinks(LuDocument *somSelf, Environment *ev) |
---|
227 | { |
---|
228 | return FALSE; |
---|
229 | } |
---|
230 | |
---|
231 | |
---|
232 | SOM_Scope LuDocument_LuLinkMapSequence* SOMLINK getLinkMapping(LuDocument *somSelf, |
---|
233 | Environment *ev, |
---|
234 | long pagenum) |
---|
235 | { |
---|
236 | // Abstract method does nothing |
---|
237 | return NULL; |
---|
238 | } |
---|
239 | |
---|
240 | |
---|
241 | SOM_Scope void SOMLINK freeLinkMapping(Environment *ev, |
---|
242 | LuDocument_LuLinkMapSequence* mapping) |
---|
243 | { |
---|
244 | if ( mapping != NULL ) |
---|
245 | { |
---|
246 | if ( ( ( mapping->_maximum != 0 ) || |
---|
247 | ( mapping->_length != 0 ) ) && |
---|
248 | ( mapping->_buffer != NULL ) ) |
---|
249 | { |
---|
250 | for ( int i = 0; i < mapping->_length; i++ ) |
---|
251 | { |
---|
252 | if ( mapping->_buffer[ i ].link.title != NULL ) { |
---|
253 | SOMFree( mapping->_buffer[ i ].link.title ); |
---|
254 | } |
---|
255 | if ( mapping->_buffer[ i ].link.uri != NULL ) { |
---|
256 | SOMFree( mapping->_buffer[ i ].link.uri ); |
---|
257 | } |
---|
258 | } |
---|
259 | |
---|
260 | SOMFree( mapping->_buffer ); |
---|
261 | } |
---|
262 | SOMFree( mapping ); |
---|
263 | } |
---|
264 | } |
---|
265 | |
---|
266 | |
---|
267 | SOM_Scope boolean SOMLINK isSaveable(LuDocument *somSelf, Environment *ev) |
---|
268 | { |
---|
269 | return FALSE; |
---|
270 | } |
---|
271 | |
---|
272 | |
---|
273 | SOM_Scope boolean SOMLINK saveAs(LuDocument *somSelf, Environment *ev, |
---|
274 | string filename) |
---|
275 | { |
---|
276 | // Abstract method does nothing |
---|
277 | return FALSE; |
---|
278 | } |
---|
279 | |
---|
280 | |
---|
281 | SOM_Scope boolean SOMLINK isPostScriptExportable(LuDocument *somSelf, |
---|
282 | Environment *ev) |
---|
283 | { |
---|
284 | return FALSE; |
---|
285 | } |
---|
286 | |
---|
287 | |
---|
288 | SOM_Scope boolean SOMLINK exportToPostScript(LuDocument *somSelf, |
---|
289 | Environment *ev, |
---|
290 | string filename, |
---|
291 | long first_page, |
---|
292 | long last_page, |
---|
293 | double width, double height, |
---|
294 | boolean duplex, |
---|
295 | boolean* brkExport) |
---|
296 | { |
---|
297 | // Abstract method does nothing |
---|
298 | return FALSE; |
---|
299 | } |
---|
300 | |
---|
301 | |
---|
302 | SOM_Scope boolean SOMLINK isHaveFontInfo(LuDocument *somSelf, |
---|
303 | Environment *ev) |
---|
304 | { |
---|
305 | return FALSE; |
---|
306 | } |
---|
307 | |
---|
308 | |
---|
309 | SOM_Scope LuDocument_LuFontInfoSequence* SOMLINK getFontInfo(LuDocument *somSelf, |
---|
310 | Environment *ev) |
---|
311 | { |
---|
312 | // Abstract method does nothing |
---|
313 | return NULL; |
---|
314 | } |
---|
315 | |
---|
316 | |
---|
317 | SOM_Scope void SOMLINK freeFontInfo(Environment *ev, |
---|
318 | LuDocument_LuFontInfoSequence* fonts) |
---|
319 | { |
---|
320 | if ( fonts != NULL ) |
---|
321 | { |
---|
322 | if ( ( ( fonts->_maximum != 0 ) || |
---|
323 | ( fonts->_length != 0 ) ) && |
---|
324 | ( fonts->_buffer != NULL ) ) |
---|
325 | { |
---|
326 | for ( int i = 0; i < fonts->_length; i++ ) |
---|
327 | { |
---|
328 | if ( fonts->_buffer[ i ].name != NULL ) { |
---|
329 | SOMFree( fonts->_buffer[ i ].name ); |
---|
330 | } |
---|
331 | if ( fonts->_buffer[ i ].type != NULL ) { |
---|
332 | SOMFree( fonts->_buffer[ i ].type ); |
---|
333 | } |
---|
334 | } |
---|
335 | |
---|
336 | SOMFree( fonts->_buffer ); |
---|
337 | } |
---|
338 | SOMFree( fonts ); |
---|
339 | } |
---|
340 | } |
---|
341 | |
---|
342 | |
---|
343 | SOM_Scope boolean SOMLINK isHaveIndex(LuDocument *somSelf, Environment *ev) |
---|
344 | { |
---|
345 | return FALSE; |
---|
346 | } |
---|
347 | |
---|
348 | |
---|
349 | SOM_Scope LuIndexNode* SOMLINK getIndex(LuDocument *somSelf, |
---|
350 | Environment *ev) |
---|
351 | { |
---|
352 | // Abstract method does nothing |
---|
353 | return NULL; |
---|
354 | } |
---|
355 | |
---|
356 | |
---|
357 | SOM_Scope LuDocumentInfo* SOMLINK getDocumentInfo(LuDocument *somSelf, |
---|
358 | Environment *ev) |
---|
359 | { |
---|
360 | LuDocumentInfo *info = (LuDocumentInfo *)SOMMalloc( sizeof( LuDocumentInfo ) ); |
---|
361 | memset( info, 0, sizeof( LuDocumentInfo ) ); |
---|
362 | return info; |
---|
363 | } |
---|
364 | |
---|
365 | |
---|
366 | SOM_Scope void SOMLINK freeDocumentInfo(Environment *ev, LuDocumentInfo* info) |
---|
367 | { |
---|
368 | if ( info != NULL ) |
---|
369 | { |
---|
370 | if ( info->fields_mask & LU_DOCUMENT_INFO_TITLE ) { |
---|
371 | SOMFree( info->title ); |
---|
372 | } |
---|
373 | if ( info->fields_mask & LU_DOCUMENT_INFO_FORMAT ) { |
---|
374 | SOMFree( info->format ); |
---|
375 | } |
---|
376 | if ( info->fields_mask & LU_DOCUMENT_INFO_AUTHOR ) { |
---|
377 | SOMFree( info->author ); |
---|
378 | } |
---|
379 | if ( info->fields_mask & LU_DOCUMENT_INFO_SUBJECT ) { |
---|
380 | SOMFree( info->subject ); |
---|
381 | } |
---|
382 | if ( info->fields_mask & LU_DOCUMENT_INFO_KEYWORDS ) { |
---|
383 | SOMFree( info->keywords ); |
---|
384 | } |
---|
385 | if ( info->fields_mask & LU_DOCUMENT_INFO_CREATOR ) { |
---|
386 | SOMFree( info->creator ); |
---|
387 | } |
---|
388 | if ( info->fields_mask & LU_DOCUMENT_INFO_PRODUCER ) { |
---|
389 | SOMFree( info->producer ); |
---|
390 | } |
---|
391 | |
---|
392 | SOMFree( info ); |
---|
393 | } |
---|
394 | } |
---|
395 | |
---|
396 | |
---|
397 | SOM_Scope boolean SOMLINK getThumbnailSize(LuDocument *somSelf, |
---|
398 | Environment *ev, |
---|
399 | long pagenum, |
---|
400 | short suggested_width, |
---|
401 | short* width, short* height) |
---|
402 | { |
---|
403 | // Abstract method does nothing |
---|
404 | return FALSE; |
---|
405 | } |
---|
406 | |
---|
407 | |
---|
408 | SOM_Scope LuPixbuf* SOMLINK getThumbnail(LuDocument *somSelf, |
---|
409 | Environment *ev, long pagenum, |
---|
410 | short suggested_width) |
---|
411 | { |
---|
412 | // Abstract method does nothing |
---|
413 | return NULL; |
---|
414 | } |
---|
415 | |
---|
416 | |
---|
417 | SOM_Scope LuDocument_LuRectSequence* SOMLINK searchText(LuDocument *somSelf, |
---|
418 | Environment *ev, |
---|
419 | long pagenum, |
---|
420 | string text, |
---|
421 | boolean caseSensitive ) |
---|
422 | { |
---|
423 | // Abstract method does nothing |
---|
424 | return NULL; |
---|
425 | } |
---|
426 | |
---|
427 | |
---|
428 | SOM_Scope void SOMLINK somDefaultInit(LuDocument *somSelf, som3InitCtrl* ctrl) |
---|
429 | { |
---|
430 | somInitCtrl globalCtrl; |
---|
431 | somBooleanVector myMask; |
---|
432 | LuDocument_BeginInitializer_somDefaultInit; |
---|
433 | LuDocument_Init_SOMObject_somDefaultInit(somSelf, ctrl); |
---|
434 | } |
---|
435 | |
---|
436 | |
---|
437 | SOM_Scope boolean SOMLINK loadFile(LuDocument *somSelf, Environment *ev, |
---|
438 | string filename, string password, |
---|
439 | string* error) |
---|
440 | { |
---|
441 | // Abstract method does nothing |
---|
442 | return FALSE; |
---|
443 | } |
---|
444 | |
---|