source: trunk/Lucide/SOURCE/plugins/lujpeg/lujpeg.xih @ 2

Last change on this file since 2 was 2, checked in by Eugene Romanenko, 15 years ago

First import

File size: 18.5 KB
Line 
1
2/*
3 * This file was generated by the SOM Compiler.
4 * FileName: lujpeg.xih.
5 * Generated using:
6 *     SOM Precompiler somipc: 2.29.1.17
7 *     SOM Emitter emitxih: 2.47
8 */
9
10/*
11 * -- By default, for classes declared using IDL,
12 * -- this emitter doesn't define redispatch/apply stubs.
13 * -- Instead, it requests that the SOM kernel produce them.
14 * -- To override this default, use the "notc" modifier.
15 */
16
17#ifndef SOM_LuJpegDocument_xih
18#define SOM_LuJpegDocument_xih
19
20#include <somcls.xh>
21#include <somcm.xh>
22
23#ifndef SOM_LuJpegDocument_xh
24#include <lujpeg.xh>
25#endif
26
27/*
28 * Set the scope of methods functions
29 */
30#ifndef SOM_Scope
31#define SOM_Scope static
32#endif
33
34#define LuJpegDocument_MaxNoMethods 0
35
36/*
37 * -- Instance Data
38 */
39typedef struct {
40        void* data;
41} LuJpegDocumentData;
42
43/*
44 * -- Getdata Macro
45 */
46
47/*
48 * -- This emitter treats Data Tokens as Thunks by default.
49 * -- Use the sc modifier "nothunks" to override this default.
50 */
51typedef LuJpegDocumentData* (SOMLINK * somTD_LuJpegDocument_DataThunk)(void*);
52#define LuJpegDocumentGetData(somSelf) \
53   (((somTD_LuJpegDocument_DataThunk)(LuJpegDocumentCClassData.instanceDataToken))(somSelf))
54
55/*
56 * -- Instance Data Access Macros for use in Method Procedures
57 */
58#ifdef VARIABLE_MACROS
59  #define _data (somThis->data)
60#endif
61
62
63/*
64 * -- Primary Implementation File Support
65 */
66#if (defined(LuJpegDocument_Class_Source) || defined(SOM_Module_lujpeg_Source))
67
68/*
69 * Trace/Debug macro
70 */
71#ifndef LuJpegDocumentMethodDebug
72   #define LuJpegDocumentMethodDebug(c,m) SOMMethodDebug(c,m)
73#endif
74
75/*
76 * -- Method Macros for use in Method Procedures
77 */
78#ifdef METHOD_MACROS
79  #define _loadFile somSelf->loadFile
80  #define _isScalable somSelf->isScalable
81  #define _isRotable somSelf->isRotable
82  #define _getPageCount somSelf->getPageCount
83  #define _getPageSize somSelf->getPageSize
84  #define _renderPageToPixbuf somSelf->renderPageToPixbuf
85  #define _isHaveText somSelf->isHaveText
86  #define _getSelectionRectangles somSelf->getSelectionRectangles
87  #define _freeRectangles somSelf->freeRectangles
88  #define _getText somSelf->getText
89  #define _isHaveLinks somSelf->isHaveLinks
90  #define _getLinkMapping somSelf->getLinkMapping
91  #define _freeLinkMapping somSelf->freeLinkMapping
92  #define _isSaveable somSelf->isSaveable
93  #define _saveAs somSelf->saveAs
94  #define _isPSExportable somSelf->isPSExportable
95  #define _exportToPS somSelf->exportToPS
96  #define _isHaveFontInfo somSelf->isHaveFontInfo
97  #define _getFontInfo somSelf->getFontInfo
98  #define _freeFontInfo somSelf->freeFontInfo
99  #define _isHaveIndex somSelf->isHaveIndex
100  #define _getIndex somSelf->getIndex
101  #define _getDocumentInfo somSelf->getDocumentInfo
102  #define _freeDocumentInfo somSelf->freeDocumentInfo
103  #define _getThumbnailSize somSelf->getThumbnailSize
104  #define _getThumbnail somSelf->getThumbnail
105  #define _searchText somSelf->searchText
106  #define _somDefaultInit somSelf->somDefaultInit
107  #define _somDestruct somSelf->somDestruct
108  #define _somDefaultCopyInit somSelf->somDefaultCopyInit
109  #define _somDefaultAssign somSelf->somDefaultAssign
110  #define _somDefaultConstCopyInit somSelf->somDefaultConstCopyInit
111  #define _somDefaultVCopyInit somSelf->somDefaultVCopyInit
112  #define _somDefaultConstVCopyInit somSelf->somDefaultConstVCopyInit
113  #define _somDefaultConstAssign somSelf->somDefaultConstAssign
114  #define _somDefaultVAssign somSelf->somDefaultVAssign
115  #define _somDefaultConstVAssign somSelf->somDefaultConstVAssign
116  #define _somInit somSelf->somInit
117  #define _somFree somSelf->somFree
118  #define _somUninit somSelf->somUninit
119  #define _somGetClass somSelf->somGetClass
120  #define _somGetClassName somSelf->somGetClassName
121  #define _somGetSize somSelf->somGetSize
122  #define _somIsA somSelf->somIsA
123  #define _somIsInstanceOf somSelf->somIsInstanceOf
124  #define _somRespondsTo somSelf->somRespondsTo
125  #define _somDispatch somSelf->somDispatch
126  #define _somClassDispatch somSelf->somClassDispatch
127  #define _somCastObj somSelf->somCastObj
128  #define _somResetObj somSelf->somResetObj
129  #define _somDispatchV somSelf->somDispatchV
130  #define _somDispatchL somSelf->somDispatchL
131  #define _somDispatchA somSelf->somDispatchA
132  #define _somDispatchD somSelf->somDispatchD
133  #define _somPrintSelf somSelf->somPrintSelf
134  #define _somDumpSelf somSelf->somDumpSelf
135  #define _somDumpSelfInt somSelf->somDumpSelfInt
136  #define _loadFile somSelf->loadFile
137  #define _getPageCount somSelf->getPageCount
138  #define _getPageSize somSelf->getPageSize
139  #define _renderPageToPixbuf somSelf->renderPageToPixbuf
140  #define _somDefaultInit somSelf->somDefaultInit
141  #define _somDestruct somSelf->somDestruct
142#endif
143
144
145/*
146 * -- The LuJpegDocument ClassData Structure
147 */
148SOMEXTERN struct LuJpegDocumentClassDataStructure SOMDLINK LuJpegDocumentClassData = {(SOMClass *) NULL};
149
150/*
151 * -- The auxiliary LuJpegDocument ClassData structure
152 */
153SOMEXTERN struct LuJpegDocumentCClassDataStructure SOMDLINK LuJpegDocumentCClassData = {(somMethodTabs) NULL};
154
155
156/*
157 * Overridden method: loadFile
158 */
159SOM_Scope boolean  SOMLINK loadFile(LuJpegDocument *somSelf, Environment *ev,
160                string filename,
161                string password,
162                string* error);
163static char *somMN_LuJpegDocumentloadFile = "LuDocument::loadFile";
164static somId somId_LuJpegDocumentloadFile = &somMN_LuJpegDocumentloadFile;
165#ifdef somId_loadFile
166#undef somId_loadFile
167#else
168#define somId_loadFile somId_LuJpegDocumentloadFile
169#endif
170typedef boolean   SOMLINK somTP_xih_LuJpegDocument_loadFile(LuJpegDocument *somSelf, Environment *ev,
171                string filename,
172                string password,
173                string* error);
174typedef somTP_xih_LuJpegDocument_loadFile *somTD_xih_LuJpegDocument_loadFile;
175/* define the parent method call macro */
176static somMethodProc* LuJpegDocument_parent_LuDocument_loadFile_resolved;
177#define LuJpegDocument_parent_LuDocument_loadFile(somSelf,ev,filename,password,error) \
178  ((( somTD_xih_LuJpegDocument_loadFile ) \
179      LuJpegDocument_parent_LuDocument_loadFile_resolved) \
180        (somSelf,ev,filename,password,error))
181/* define a variety of (possibly ambiguous) short forms */
182#ifndef SOMGD_pmc_parent_loadFile
183  #ifdef parent_loadFile
184    #define SOMGD_pmc_parent_loadFile
185    #undef parent_loadFile
186  #else
187#define parent_loadFile LuJpegDocument_parent_LuDocument_loadFile
188  #endif
189#endif
190#ifndef SOMGD_pmc_parent_LuDocument_loadFile
191  #ifdef parent_LuDocument_loadFile
192    #define SOMGD_pmc_parent_LuDocument_loadFile
193    #undef parent_LuDocument_loadFile
194  #else
195    #define parent_LuDocument_loadFile LuJpegDocument_parent_LuDocument_loadFile
196  #endif
197#endif
198#define LuJpegDocument_parents_loadFile(somSelf,ev,filename,password,error) (\
199   LuJpegDocument_parent_LuDocument_loadFile(somSelf,ev,filename,password,error))
200
201/*
202 * Overridden method: getPageCount
203 */
204SOM_Scope long  SOMLINK getPageCount(LuJpegDocument *somSelf, Environment *ev);
205static char *somMN_LuJpegDocumentgetPageCount = "LuDocument::getPageCount";
206static somId somId_LuJpegDocumentgetPageCount = &somMN_LuJpegDocumentgetPageCount;
207#ifdef somId_getPageCount
208#undef somId_getPageCount
209#else
210#define somId_getPageCount somId_LuJpegDocumentgetPageCount
211#endif
212typedef long   SOMLINK somTP_xih_LuJpegDocument_getPageCount(LuJpegDocument *somSelf, Environment *ev);
213typedef somTP_xih_LuJpegDocument_getPageCount *somTD_xih_LuJpegDocument_getPageCount;
214/* define the parent method call macro */
215static somMethodProc* LuJpegDocument_parent_LuDocument_getPageCount_resolved;
216#define LuJpegDocument_parent_LuDocument_getPageCount(somSelf,ev) \
217  ((( somTD_xih_LuJpegDocument_getPageCount ) \
218      LuJpegDocument_parent_LuDocument_getPageCount_resolved) \
219        (somSelf,ev))
220/* define a variety of (possibly ambiguous) short forms */
221#ifndef SOMGD_pmc_parent_getPageCount
222  #ifdef parent_getPageCount
223    #define SOMGD_pmc_parent_getPageCount
224    #undef parent_getPageCount
225  #else
226#define parent_getPageCount LuJpegDocument_parent_LuDocument_getPageCount
227  #endif
228#endif
229#ifndef SOMGD_pmc_parent_LuDocument_getPageCount
230  #ifdef parent_LuDocument_getPageCount
231    #define SOMGD_pmc_parent_LuDocument_getPageCount
232    #undef parent_LuDocument_getPageCount
233  #else
234    #define parent_LuDocument_getPageCount LuJpegDocument_parent_LuDocument_getPageCount
235  #endif
236#endif
237#define LuJpegDocument_parents_getPageCount(somSelf,ev) (\
238   LuJpegDocument_parent_LuDocument_getPageCount(somSelf,ev))
239
240/*
241 * Overridden method: getPageSize
242 */
243SOM_Scope void  SOMLINK getPageSize(LuJpegDocument *somSelf, Environment *ev,
244                long pagenum,
245                double* width,
246                double* height);
247static char *somMN_LuJpegDocumentgetPageSize = "LuDocument::getPageSize";
248static somId somId_LuJpegDocumentgetPageSize = &somMN_LuJpegDocumentgetPageSize;
249#ifdef somId_getPageSize
250#undef somId_getPageSize
251#else
252#define somId_getPageSize somId_LuJpegDocumentgetPageSize
253#endif
254typedef void   SOMLINK somTP_xih_LuJpegDocument_getPageSize(LuJpegDocument *somSelf, Environment *ev,
255                long pagenum,
256                double* width,
257                double* height);
258typedef somTP_xih_LuJpegDocument_getPageSize *somTD_xih_LuJpegDocument_getPageSize;
259/* define the parent method call macro */
260static somMethodProc* LuJpegDocument_parent_LuDocument_getPageSize_resolved;
261#define LuJpegDocument_parent_LuDocument_getPageSize(somSelf,ev,pagenum,width,height) \
262  ((( somTD_xih_LuJpegDocument_getPageSize ) \
263      LuJpegDocument_parent_LuDocument_getPageSize_resolved) \
264        (somSelf,ev,pagenum,width,height))
265/* define a variety of (possibly ambiguous) short forms */
266#ifndef SOMGD_pmc_parent_getPageSize
267  #ifdef parent_getPageSize
268    #define SOMGD_pmc_parent_getPageSize
269    #undef parent_getPageSize
270  #else
271#define parent_getPageSize LuJpegDocument_parent_LuDocument_getPageSize
272  #endif
273#endif
274#ifndef SOMGD_pmc_parent_LuDocument_getPageSize
275  #ifdef parent_LuDocument_getPageSize
276    #define SOMGD_pmc_parent_LuDocument_getPageSize
277    #undef parent_LuDocument_getPageSize
278  #else
279    #define parent_LuDocument_getPageSize LuJpegDocument_parent_LuDocument_getPageSize
280  #endif
281#endif
282#define LuJpegDocument_parents_getPageSize(somSelf,ev,pagenum,width,height) (\
283   LuJpegDocument_parent_LuDocument_getPageSize(somSelf,ev,pagenum,width,height))
284
285/*
286 * Overridden method: renderPageToPixbuf
287 */
288SOM_Scope void  SOMLINK renderPageToPixbuf(LuJpegDocument *somSelf, Environment *ev,
289                long pagenum,
290                long src_x,
291                long src_y,
292                long src_width,
293                long src_height,
294                double scale,
295                long rotation,
296                LuPixbuf* pixbuf);
297static char *somMN_LuJpegDocumentrenderPageToPixbuf = "LuDocument::renderPageToPixbuf";
298static somId somId_LuJpegDocumentrenderPageToPixbuf = &somMN_LuJpegDocumentrenderPageToPixbuf;
299#ifdef somId_renderPageToPixbuf
300#undef somId_renderPageToPixbuf
301#else
302#define somId_renderPageToPixbuf somId_LuJpegDocumentrenderPageToPixbuf
303#endif
304typedef void   SOMLINK somTP_xih_LuJpegDocument_renderPageToPixbuf(LuJpegDocument *somSelf, Environment *ev,
305                long pagenum,
306                long src_x,
307                long src_y,
308                long src_width,
309                long src_height,
310                double scale,
311                long rotation,
312                LuPixbuf* pixbuf);
313typedef somTP_xih_LuJpegDocument_renderPageToPixbuf *somTD_xih_LuJpegDocument_renderPageToPixbuf;
314/* define the parent method call macro */
315static somMethodProc* LuJpegDocument_parent_LuDocument_renderPageToPixbuf_resolved;
316#define LuJpegDocument_parent_LuDocument_renderPageToPixbuf(somSelf,ev,pagenum,src_x,src_y,src_width,src_height,scale,rotation,pixbuf) \
317  ((( somTD_xih_LuJpegDocument_renderPageToPixbuf ) \
318      LuJpegDocument_parent_LuDocument_renderPageToPixbuf_resolved) \
319        (somSelf,ev,pagenum,src_x,src_y,src_width,src_height,scale,rotation,pixbuf))
320/* define a variety of (possibly ambiguous) short forms */
321#ifndef SOMGD_pmc_parent_renderPageToPixbuf
322  #ifdef parent_renderPageToPixbuf
323    #define SOMGD_pmc_parent_renderPageToPixbuf
324    #undef parent_renderPageToPixbuf
325  #else
326#define parent_renderPageToPixbuf LuJpegDocument_parent_LuDocument_renderPageToPixbuf
327  #endif
328#endif
329#ifndef SOMGD_pmc_parent_LuDocument_renderPageToPixbuf
330  #ifdef parent_LuDocument_renderPageToPixbuf
331    #define SOMGD_pmc_parent_LuDocument_renderPageToPixbuf
332    #undef parent_LuDocument_renderPageToPixbuf
333  #else
334    #define parent_LuDocument_renderPageToPixbuf LuJpegDocument_parent_LuDocument_renderPageToPixbuf
335  #endif
336#endif
337#define LuJpegDocument_parents_renderPageToPixbuf(somSelf,ev,pagenum,src_x,src_y,src_width,src_height,scale,rotation,pixbuf) (\
338   LuJpegDocument_parent_LuDocument_renderPageToPixbuf(somSelf,ev,pagenum,src_x,src_y,src_width,src_height,scale,rotation,pixbuf))
339
340/*
341 * Overridden method: somDefaultInit
342 */
343SOM_Scope void  SOMLINK somDefaultInit(LuJpegDocument *somSelf,
344                som3InitCtrl* ctrl);
345static char *somMN_LuJpegDocumentsomDefaultInit = "SOMObject::somDefaultInit";
346static somId somId_LuJpegDocumentsomDefaultInit = &somMN_LuJpegDocumentsomDefaultInit;
347#ifdef somId_somDefaultInit
348#undef somId_somDefaultInit
349#else
350#define somId_somDefaultInit somId_LuJpegDocumentsomDefaultInit
351#endif
352
353/*
354 * Overridden method: somDestruct
355 */
356SOM_Scope void  SOMLINK somDestruct(LuJpegDocument *somSelf,
357                octet doFree,
358                som3DestructCtrl* ctrl);
359static char *somMN_LuJpegDocumentsomDestruct = "SOMObject::somDestruct";
360static somId somId_LuJpegDocumentsomDestruct = &somMN_LuJpegDocumentsomDestruct;
361#ifdef somId_somDestruct
362#undef somId_somDestruct
363#else
364#define somId_somDestruct somId_LuJpegDocumentsomDestruct
365#endif
366
367/*
368 * -- Routines and Structures to create the class object
369 */
370
371
372/*
373 * Declare the Override Methods table.
374 */
375static somOverrideMethod_t LuJpegDocumentOM[] = {
376    {    &somId_LuJpegDocumentloadFile,
377         (somMethodProc *) loadFile  },
378    {    &somId_LuJpegDocumentgetPageCount,
379         (somMethodProc *) getPageCount  },
380    {    &somId_LuJpegDocumentgetPageSize,
381         (somMethodProc *) getPageSize  },
382    {    &somId_LuJpegDocumentrenderPageToPixbuf,
383         (somMethodProc *) renderPageToPixbuf  },
384    {    &somId_LuJpegDocumentsomDefaultInit,
385         (somMethodProc *) somDefaultInit  },
386    {    &somId_LuJpegDocumentsomDestruct,
387         (somMethodProc *) somDestruct  },
388};
389
390
391/*
392 *  class Ids
393 */
394static char * somCN_LuJpegDocument = "LuJpegDocument";
395static char * somPCN_LuJpegDocument_LuDocument = "LuDocument";
396
397static somId somPCLuJpegDocument[] = {
398    &somPCN_LuJpegDocument_LuDocument,
399};
400
401static somStaticClassInfo LuJpegDocumentSCI = {
402    4, 0, 6, 0, 0, 0, /* layout version 4 */
403    LuJpegDocument_MajorVersion, LuJpegDocument_MinorVersion,
404    sizeof(LuJpegDocumentData), LuJpegDocument_MaxNoMethods, 1,
405    &somCN_LuJpegDocument,
406    (somId) NULL, 1,
407    somPCLuJpegDocument,
408    (somClassDataStructure *) &LuJpegDocumentClassData,
409    (somCClassDataStructure *) &LuJpegDocumentCClassData,
410    (somStaticMethod_t *) NULL, LuJpegDocumentOM,
411    (char *) NULL,
412    (somNonInternalData_t *) NULL,
413   (somProcMethods_t *) NULL,
414    (somVarargsFuncs_t *) NULL,
415    (somTP_somClassInitFunc *) NULL,
416    4, /* type code alignment */
417    -1, /* use parents as DirectInitClasses */
418    0, /* no explicit DirectInitClasses */
419    0, /* number of general methods */
420    (somMethods_t *) NULL,
421    0, /* no public data offset */
422    0, /* no sci development level check */
423    0, /* number of SelectInheritedMethods */
424    0, /* no SelectInheritedMethods */
425    0, /* number of classdata entries */
426    0, /* no list provided currently */
427    0, /* number of migrated methods */
428    0, /* no migrated method implementations */
429    0, /* number of initializers */
430    0, /* no initializers */
431    0, /* not DTS a class */
432    0, /* no dynamically computed info */
433};
434
435
436/*
437 * Class Creation and Initialization
438 */
439
440SOMClass * SOMLINK LuJpegDocumentNewClass (integer4 somtmajorVersion,
441                integer4 somtminorVersion)
442{
443    SOMClass *result;
444    if (_LuJpegDocument && _LuJpegDocument->somCheckVersion(somtmajorVersion, somtminorVersion))
445          return ((SOMClass*)((void*)_LuJpegDocument));
446    LuDocumentNewClass(LuDocument_MajorVersion,LuDocument_MinorVersion);        /* static reference */
447    result = (SOMClass*)((void*)somBuildClass(0xFFFFFFFF,&LuJpegDocumentSCI, somtmajorVersion, somtminorVersion));
448    LuJpegDocument_parent_LuDocument_renderPageToPixbuf_resolved =
449        somParentNumResolve(LuJpegDocumentCClassData.parentMtab, 1, LuDocumentClassData.renderPageToPixbuf);
450    LuJpegDocument_parent_LuDocument_getPageSize_resolved =
451        somParentNumResolve(LuJpegDocumentCClassData.parentMtab, 1, LuDocumentClassData.getPageSize);
452    LuJpegDocument_parent_LuDocument_getPageCount_resolved =
453        somParentNumResolve(LuJpegDocumentCClassData.parentMtab, 1, LuDocumentClassData.getPageCount);
454    LuJpegDocument_parent_LuDocument_loadFile_resolved =
455        somParentNumResolve(LuJpegDocumentCClassData.parentMtab, 1, LuDocumentClassData.loadFile);
456    return result;
457}
458
459/*
460 * Functions for attributes.
461 */
462
463/*
464 * Macros for initializer/destructor entry/exit
465 */
466#define LuJpegDocument_BeginInitializer_somDefaultInit \
467   if (!ctrl) { \
468      ctrl = &globalCtrl; \
469      memcpy(ctrl,&(((somParentMtabStructPtr)LuJpegDocumentCClassData.parentMtab)->initCtrl),sizeof(somInitCtrl)); \
470   } \
471   myMask = ctrl->mask; \
472   somThis = (LuJpegDocumentData*)((char*)somSelf + ctrl->info->dataOffset);\
473   ctrl->info = (somInitInfo*)(ctrl->infoSize + (char*)(ctrl->info)); \
474   ctrl->mask += 1;
475#define LuJpegDocument_BeginDestructor \
476   if (!ctrl) { \
477      ctrl = &globalCtrl; \
478      memcpy(ctrl,&(((somParentMtabStructPtr)LuJpegDocumentCClassData.parentMtab)->destructCtrl),sizeof(somDestructCtrl)); \
479   } \
480   somThis = (LuJpegDocumentData*)((char*)somSelf + ctrl->info->dataOffset);\
481   myMask = ctrl->mask;
482#define LuJpegDocument_EndDestructor \
483   ctrl->info = (somDestructInfo*)(ctrl->infoSize + (char*)(ctrl->info)); \
484   ctrl->mask += 1; \
485   LuJpegDocument_DeInit_LuDocument_somDestruct(somSelf,0,ctrl); \
486   if (doFree) _LuJpegDocument->somDeallocate((string)somSelf);
487
488/*
489 * Ancestor_Init/DeInit Macros
490 */
491
492/* ...for LuDocument */
493#define LuJpegDocument_Init_LuDocument_somDefaultInit(somSelf, ctrl) \
494        if (myMask[0]&1) \
495           ((somTD_SOMObject_somDefaultInit) \
496               ctrl->info->defaultInit) \
497                   ((SOMObject *)((void *) somSelf), ctrl)
498#define LuJpegDocument_DeInit_LuDocument_somDestruct(somSelf, doFree, ctrl) \
499        if (myMask[0]&1) \
500           ((somTD_SOMObject_somDestruct) \
501               ctrl->info->defaultDestruct) \
502                   ((SOMObject *)((void *) somSelf), 0, ctrl)
503
504#endif /* Primary Implementation Support */
505
506#endif       /* SOM_LuJpegDocument_xih */
Note: See TracBrowser for help on using the repository browser.