source: trunk/Lucide/SOURCE/plugins/ludoc/lupixbuf.xih @ 2

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

First import

File size: 14.2 KB
Line 
1
2/*
3 * This file was generated by the SOM Compiler.
4 * FileName: lupixbuf.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_LuPixbuf_xih
18#define SOM_LuPixbuf_xih
19
20#include <somcls.xh>
21#include <somcm.xh>
22
23#ifndef SOM_LuPixbuf_xh
24#include <lupixbuf.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 LuPixbuf_MaxNoMethods 7
35
36/*
37 * -- Instance Data
38 */
39typedef struct {
40        long width;
41        long height;
42        short bpp;
43        long dlen;
44        long rowsize;
45        void* data;
46} LuPixbufData;
47
48/*
49 * -- Getdata Macro
50 */
51
52/*
53 * -- This emitter treats Data Tokens as Thunks by default.
54 * -- Use the sc modifier "nothunks" to override this default.
55 */
56typedef LuPixbufData* (SOMLINK * somTD_LuPixbuf_DataThunk)(void*);
57#define LuPixbufGetData(somSelf) \
58   (((somTD_LuPixbuf_DataThunk)(LuPixbufCClassData.instanceDataToken))(somSelf))
59
60/*
61 * -- Instance Data Access Macros for use in Method Procedures
62 */
63#ifdef VARIABLE_MACROS
64  #define _width (somThis->width)
65  #define _height (somThis->height)
66  #define _bpp (somThis->bpp)
67  #define _dlen (somThis->dlen)
68  #define _rowsize (somThis->rowsize)
69  #define _data (somThis->data)
70#endif
71
72
73/*
74 * -- Primary Implementation File Support
75 */
76#if (defined(LuPixbuf_Class_Source) || defined(SOM_Module_lupixbuf_Source))
77
78/*
79 * Trace/Debug macro
80 */
81#ifndef LuPixbufMethodDebug
82   #define LuPixbufMethodDebug(c,m) SOMMethodDebug(c,m)
83#endif
84
85/*
86 * -- Method Macros for use in Method Procedures
87 */
88#ifdef METHOD_MACROS
89  #define _somDefaultInit somSelf->somDefaultInit
90  #define _somDestruct somSelf->somDestruct
91  #define _somDefaultCopyInit somSelf->somDefaultCopyInit
92  #define _somDefaultAssign somSelf->somDefaultAssign
93  #define _somDefaultConstCopyInit somSelf->somDefaultConstCopyInit
94  #define _somDefaultVCopyInit somSelf->somDefaultVCopyInit
95  #define _somDefaultConstVCopyInit somSelf->somDefaultConstVCopyInit
96  #define _somDefaultConstAssign somSelf->somDefaultConstAssign
97  #define _somDefaultVAssign somSelf->somDefaultVAssign
98  #define _somDefaultConstVAssign somSelf->somDefaultConstVAssign
99  #define _somInit somSelf->somInit
100  #define _somFree somSelf->somFree
101  #define _somUninit somSelf->somUninit
102  #define _somGetClass somSelf->somGetClass
103  #define _somGetClassName somSelf->somGetClassName
104  #define _somGetSize somSelf->somGetSize
105  #define _somIsA somSelf->somIsA
106  #define _somIsInstanceOf somSelf->somIsInstanceOf
107  #define _somRespondsTo somSelf->somRespondsTo
108  #define _somDispatch somSelf->somDispatch
109  #define _somClassDispatch somSelf->somClassDispatch
110  #define _somCastObj somSelf->somCastObj
111  #define _somResetObj somSelf->somResetObj
112  #define _somDispatchV somSelf->somDispatchV
113  #define _somDispatchL somSelf->somDispatchL
114  #define _somDispatchA somSelf->somDispatchA
115  #define _somDispatchD somSelf->somDispatchD
116  #define _somPrintSelf somSelf->somPrintSelf
117  #define _somDumpSelf somSelf->somDumpSelf
118  #define _somDumpSelfInt somSelf->somDumpSelfInt
119  #define _LuPixbufInit somSelf->LuPixbufInit
120  #define _getWidth somSelf->getWidth
121  #define _getHeight somSelf->getHeight
122  #define _getRowSize somSelf->getRowSize
123  #define _getDataLen somSelf->getDataLen
124  #define _getDataPtr somSelf->getDataPtr
125  #define _putAt somSelf->putAt
126  #define _somDestruct somSelf->somDestruct
127#endif
128
129
130/*
131 * -- The LuPixbuf ClassData Structure
132 */
133SOMEXTERN struct LuPixbufClassDataStructure SOMDLINK LuPixbufClassData = {(SOMClass *) NULL};
134
135/*
136 * -- The auxiliary LuPixbuf ClassData structure
137 */
138SOMEXTERN struct LuPixbufCClassDataStructure SOMDLINK LuPixbufCClassData = {(somMethodTabs) NULL};
139
140
141/*
142 * New Method: LuPixbufInit
143 */
144SOM_Scope void  SOMLINK LuPixbufInit(LuPixbuf *somSelf, Environment *ev,
145                somInitCtrl* ctrl,
146                long w,
147                long h);
148#ifndef somMN_LuPixbufInit_defined
149#define somMN_LuPixbufInit_defined
150static char *somMN_LuPixbufInit = "LuPixbufInit";
151static somId somId_LuPixbufInit = &somMN_LuPixbufInit;
152#endif  /* somMN_LuPixbufInit_defined */
153#ifndef somDS_LuPixbufInit_defined
154#define somDS_LuPixbufInit_defined
155static char *somDS_LuPixbufInit = "::LuPixbuf::LuPixbufInit";
156static somId somDI_LuPixbufInit = &somDS_LuPixbufInit;
157#endif  /* somDS_LuPixbufInit_defined */
158#define LuPixbufInit_somApRdDefault
159
160/*
161 * New Method: getWidth
162 */
163SOM_Scope long  SOMLINK getWidth(LuPixbuf *somSelf, Environment *ev);
164#ifndef somMN_getWidth_defined
165#define somMN_getWidth_defined
166static char *somMN_getWidth = "getWidth";
167static somId somId_getWidth = &somMN_getWidth;
168#endif  /* somMN_getWidth_defined */
169#ifndef somDS_getWidth_defined
170#define somDS_getWidth_defined
171static char *somDS_getWidth = "::LuPixbuf::getWidth";
172static somId somDI_getWidth = &somDS_getWidth;
173#endif  /* somDS_getWidth_defined */
174#define getWidth_somApRdDefault
175
176/*
177 * New Method: getHeight
178 */
179SOM_Scope long  SOMLINK getHeight(LuPixbuf *somSelf, Environment *ev);
180#ifndef somMN_getHeight_defined
181#define somMN_getHeight_defined
182static char *somMN_getHeight = "getHeight";
183static somId somId_getHeight = &somMN_getHeight;
184#endif  /* somMN_getHeight_defined */
185#ifndef somDS_getHeight_defined
186#define somDS_getHeight_defined
187static char *somDS_getHeight = "::LuPixbuf::getHeight";
188static somId somDI_getHeight = &somDS_getHeight;
189#endif  /* somDS_getHeight_defined */
190#define getHeight_somApRdDefault
191
192/*
193 * New Method: getRowSize
194 */
195SOM_Scope long  SOMLINK getRowSize(LuPixbuf *somSelf, Environment *ev);
196#ifndef somMN_getRowSize_defined
197#define somMN_getRowSize_defined
198static char *somMN_getRowSize = "getRowSize";
199static somId somId_getRowSize = &somMN_getRowSize;
200#endif  /* somMN_getRowSize_defined */
201#ifndef somDS_getRowSize_defined
202#define somDS_getRowSize_defined
203static char *somDS_getRowSize = "::LuPixbuf::getRowSize";
204static somId somDI_getRowSize = &somDS_getRowSize;
205#endif  /* somDS_getRowSize_defined */
206#define getRowSize_somApRdDefault
207
208/*
209 * New Method: getDataLen
210 */
211SOM_Scope long  SOMLINK getDataLen(LuPixbuf *somSelf, Environment *ev);
212#ifndef somMN_getDataLen_defined
213#define somMN_getDataLen_defined
214static char *somMN_getDataLen = "getDataLen";
215static somId somId_getDataLen = &somMN_getDataLen;
216#endif  /* somMN_getDataLen_defined */
217#ifndef somDS_getDataLen_defined
218#define somDS_getDataLen_defined
219static char *somDS_getDataLen = "::LuPixbuf::getDataLen";
220static somId somDI_getDataLen = &somDS_getDataLen;
221#endif  /* somDS_getDataLen_defined */
222#define getDataLen_somApRdDefault
223
224/*
225 * New Method: getDataPtr
226 */
227SOM_Scope void*  SOMLINK getDataPtr(LuPixbuf *somSelf, Environment *ev);
228#ifndef somMN_getDataPtr_defined
229#define somMN_getDataPtr_defined
230static char *somMN_getDataPtr = "getDataPtr";
231static somId somId_getDataPtr = &somMN_getDataPtr;
232#endif  /* somMN_getDataPtr_defined */
233#ifndef somDS_getDataPtr_defined
234#define somDS_getDataPtr_defined
235static char *somDS_getDataPtr = "::LuPixbuf::getDataPtr";
236static somId somDI_getDataPtr = &somDS_getDataPtr;
237#endif  /* somDS_getDataPtr_defined */
238#define getDataPtr_somApRdDefault
239
240/*
241 * New Method: putAt
242 */
243SOM_Scope void  SOMLINK putAt(LuPixbuf *somSelf, Environment *ev,
244                LuPixbuf* p,
245                long x,
246                long y);
247#ifndef somMN_putAt_defined
248#define somMN_putAt_defined
249static char *somMN_putAt = "putAt";
250static somId somId_putAt = &somMN_putAt;
251#endif  /* somMN_putAt_defined */
252#ifndef somDS_putAt_defined
253#define somDS_putAt_defined
254static char *somDS_putAt = "::LuPixbuf::putAt";
255static somId somDI_putAt = &somDS_putAt;
256#endif  /* somDS_putAt_defined */
257#define putAt_somApRdDefault
258
259/*
260 * Overridden method: somDestruct
261 */
262SOM_Scope void  SOMLINK somDestruct(LuPixbuf *somSelf,
263                octet doFree,
264                som3DestructCtrl* ctrl);
265static char *somMN_LuPixbufsomDestruct = "SOMObject::somDestruct";
266static somId somId_LuPixbufsomDestruct = &somMN_LuPixbufsomDestruct;
267#ifdef somId_somDestruct
268#undef somId_somDestruct
269#else
270#define somId_somDestruct somId_LuPixbufsomDestruct
271#endif
272
273/*
274 * -- Routines and Structures to create the class object
275 */
276
277
278/*
279 * Declare the Static Methods table.
280 */
281static somStaticMethod_t LuPixbufSM[] = {
282    {    &LuPixbufClassData.LuPixbufInit,
283         &somId_LuPixbufInit,
284         &somDI_LuPixbufInit,
285         (somMethodProc *) LuPixbufInit,
286         (somMethodProc *)((void*)-1),
287#ifdef LuPixbufInit_somApRdDefault
288         0},
289#else
290         (somMethodProc *) ((void*) &LuPixbufInitStubs) },
291#endif
292    {    &LuPixbufClassData.getWidth,
293         &somId_getWidth,
294         &somDI_getWidth,
295         (somMethodProc *) getWidth,
296         (somMethodProc *)((void*)-1),
297#ifdef getWidth_somApRdDefault
298         0},
299#else
300         (somMethodProc *) ((void*) &getWidthStubs) },
301#endif
302    {    &LuPixbufClassData.getHeight,
303         &somId_getHeight,
304         &somDI_getHeight,
305         (somMethodProc *) getHeight,
306         (somMethodProc *)((void*)-1),
307#ifdef getHeight_somApRdDefault
308         0},
309#else
310         (somMethodProc *) ((void*) &getHeightStubs) },
311#endif
312    {    &LuPixbufClassData.getRowSize,
313         &somId_getRowSize,
314         &somDI_getRowSize,
315         (somMethodProc *) getRowSize,
316         (somMethodProc *)((void*)-1),
317#ifdef getRowSize_somApRdDefault
318         0},
319#else
320         (somMethodProc *) ((void*) &getRowSizeStubs) },
321#endif
322    {    &LuPixbufClassData.getDataLen,
323         &somId_getDataLen,
324         &somDI_getDataLen,
325         (somMethodProc *) getDataLen,
326         (somMethodProc *)((void*)-1),
327#ifdef getDataLen_somApRdDefault
328         0},
329#else
330         (somMethodProc *) ((void*) &getDataLenStubs) },
331#endif
332    {    &LuPixbufClassData.getDataPtr,
333         &somId_getDataPtr,
334         &somDI_getDataPtr,
335         (somMethodProc *) getDataPtr,
336         (somMethodProc *)((void*)-1),
337#ifdef getDataPtr_somApRdDefault
338         0},
339#else
340         (somMethodProc *) ((void*) &getDataPtrStubs) },
341#endif
342    {    &LuPixbufClassData.putAt,
343         &somId_putAt,
344         &somDI_putAt,
345         (somMethodProc *) putAt,
346         (somMethodProc *)((void*)-1),
347#ifdef putAt_somApRdDefault
348         0},
349#else
350         (somMethodProc *) ((void*) &putAtStubs) },
351#endif
352};
353
354
355/*
356 * Declare the Override Methods table.
357 */
358static somOverrideMethod_t LuPixbufOM[] = {
359    {    &somId_LuPixbufsomDestruct,
360         (somMethodProc *) somDestruct  },
361};
362
363
364/*
365 *  class Ids
366 */
367static char * somCN_LuPixbuf = "LuPixbuf";
368static char * somPCN_LuPixbuf_SOMObject = "SOMObject";
369
370static somId somPCLuPixbuf[] = {
371    &somPCN_LuPixbuf_SOMObject,
372};
373
374static somId somINITLuPixbuf[] = {
375    &somMN_LuPixbufInit,
376};
377
378static somStaticClassInfo LuPixbufSCI = {
379    4, 7, 1, 0, 0, 0, /* layout version 4 */
380    LuPixbuf_MajorVersion, LuPixbuf_MinorVersion,
381    sizeof(LuPixbufData), LuPixbuf_MaxNoMethods, 1,
382    &somCN_LuPixbuf,
383    (somId) NULL, 1,
384    somPCLuPixbuf,
385    (somClassDataStructure *) &LuPixbufClassData,
386    (somCClassDataStructure *) &LuPixbufCClassData,
387    LuPixbufSM, LuPixbufOM,
388    (char *) NULL,
389    (somNonInternalData_t *) NULL,
390   (somProcMethods_t *) NULL,
391    (somVarargsFuncs_t *) NULL,
392    (somTP_somClassInitFunc *) NULL,
393    4, /* type code alignment */
394    -1, /* use parents as DirectInitClasses */
395    0, /* no explicit DirectInitClasses */
396    0, /* number of general methods */
397    (somMethods_t *) NULL,
398    0, /* no public data offset */
399    0, /* no sci development level check */
400    0, /* number of SelectInheritedMethods */
401    0, /* no SelectInheritedMethods */
402    7, /* number of classdata entries */
403    0, /* no list provided currently */
404    0, /* number of migrated methods */
405    0, /* no migrated method implementations */
406    1, /* number of initializers */
407    somINITLuPixbuf, /* initializers */
408    0, /* not DTS a class */
409    0, /* no dynamically computed info */
410};
411
412
413/*
414 * Class Creation and Initialization
415 */
416
417SOMClass * SOMLINK LuPixbufNewClass (integer4 somtmajorVersion,
418                integer4 somtminorVersion)
419{
420    SOMClass *result;
421    if (_LuPixbuf && _LuPixbuf->somCheckVersion(somtmajorVersion, somtminorVersion))
422          return ((SOMClass*)((void*)_LuPixbuf));
423    SOMObjectNewClass(SOMObject_MajorVersion,SOMObject_MinorVersion);   /* static reference */
424    result = (SOMClass*)((void*)somBuildClass(0xFFFFFFFF,&LuPixbufSCI, somtmajorVersion, somtminorVersion));
425    return result;
426}
427
428/*
429 * Functions for attributes.
430 */
431
432/*
433 * Macros for initializer/destructor entry/exit
434 */
435#define LuPixbuf_BeginDestructor \
436   if (!ctrl) { \
437      ctrl = &globalCtrl; \
438      memcpy(ctrl,&(((somParentMtabStructPtr)LuPixbufCClassData.parentMtab)->destructCtrl),sizeof(somDestructCtrl)); \
439   } \
440   somThis = (LuPixbufData*)((char*)somSelf + ctrl->info->dataOffset);\
441   myMask = ctrl->mask;
442#define LuPixbuf_EndDestructor \
443   ctrl->info = (somDestructInfo*)(ctrl->infoSize + (char*)(ctrl->info)); \
444   ctrl->mask += 1; \
445   LuPixbuf_DeInit_SOMObject_somDestruct(somSelf,0,ctrl); \
446   if (doFree) _LuPixbuf->somDeallocate((string)somSelf);
447#define LuPixbuf_BeginInitializer_LuPixbufInit \
448   if (!ctrl) { \
449      ctrl = &globalCtrl; \
450      memcpy(ctrl,&(((somParentMtabStructPtr)LuPixbufCClassData.parentMtab)->initCtrl),sizeof(somInitCtrl)); \
451   } \
452   myMask = ctrl->mask; \
453   somThis = (LuPixbufData*)((char*)somSelf + ctrl->info->dataOffset);\
454   ctrl->info = (somInitInfo*)(ctrl->infoSize + (char*)(ctrl->info)); \
455   ctrl->mask += 1;
456
457/*
458 * Ancestor_Init/DeInit Macros
459 */
460
461/* ...for SOMObject */
462#define LuPixbuf_Init_SOMObject_somDefaultInit(somSelf, ctrl) \
463        if (myMask[0]&1) \
464        /* special case SOMObject */\
465        ctrl->info = (somInitInfo*)(ctrl->infoSize + (char*)(ctrl->info));
466#define LuPixbuf_DeInit_SOMObject_somDestruct(somSelf, doFree, ctrl) \
467        if (myMask[0]&1) \
468        /* special case SOMObject */\
469        ctrl->info = (somDestructInfo*)(ctrl->infoSize + (char*)(ctrl->info));
470
471#endif /* Primary Implementation Support */
472
473#endif       /* SOM_LuPixbuf_xih */
Note: See TracBrowser for help on using the repository browser.