home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / header45.zip / wpclrpal.xh < prev    next >
Text File  |  1999-03-15  |  9KB  |  354 lines

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: E:\cwpsh\rel\os2c\include\base\os2\wpclrpal.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.29.1.14
  7.  *     SOM Emitter emitxh: 2.43
  8.  */
  9.  
  10. /*
  11.  *   Module Header
  12.  * 
  13.  *   Module Name: WPCLRPAL
  14.  * 
  15.  *   OS/2 Presentation Manager Workplace class definitions
  16.  * 
  17.  *   Copyright (c) International Business Machines Corporation 1991, 1992
  18.  * 
  19.  */
  20.  
  21.  
  22. #ifndef SOM_WPColorPalette_xh
  23. #define SOM_WPColorPalette_xh
  24.  
  25. class WPColorPalette;
  26.  
  27. #define WPColorPalette_MajorVersion 1
  28. #define WPColorPalette_MinorVersion 2
  29.  
  30. /* C++ SOM defs */
  31. #include <somcls.xh>
  32. #include <somcm.xh>
  33.  
  34. /* C++ parent defs */
  35. #ifndef SOM_WPPalette_xh
  36. #include <wppalet.xh>
  37. #endif
  38.  
  39. #ifndef WPColorPalette_API
  40. #define WPColorPalette_API
  41. /*
  42.  * -- The Class API
  43.  */
  44.  
  45. /*
  46.  * Start of bindings for IDL types
  47.  */
  48.  
  49. class SOMClass;
  50. class SOMObject;
  51. class WPFolder;
  52. class M_WPObject;
  53. class WPObject;
  54. class WPImageFile;
  55. class M_WPAbstract;
  56. class M_WPPalette;
  57. class M_WPColorPalette;
  58.  
  59. /*
  60.  * End of bindings for IDL types.
  61.  */
  62.  
  63. /*
  64.  * Passthru lines: File: "C.h", "after"
  65.  */
  66.  
  67.       /* Paintpot structure */
  68.  
  69.       typedef struct _PAINTPOT
  70.       {
  71.          CELL        cell;     /* Size of the data that follows */
  72.          ULONG       ulRGB;    /* Color of this paintpot */
  73.       } PAINTPOT;
  74.       typedef PAINTPOT *PPAINTPOT;
  75.  
  76.  
  77. /* A procedure to create the WPColorPalette Class */
  78. class M_WPColorPalette;
  79. SOMEXTERN M_WPColorPalette * SOMLINK WPColorPaletteNewClass(
  80.         integer4 majorVersion,
  81.         integer4 minorVersion);
  82.  
  83. /* The API to the WPColorPalette class object, and the methods it introduces. */
  84. SOMEXTERN struct WPColorPaletteClassDataStructure {
  85.     M_WPColorPalette *classObject;
  86. } SOMDLINK WPColorPaletteClassData;
  87. #define _WPColorPalette WPColorPaletteClassData.classObject
  88.  
  89. /* The API to parentMtabs for WPColorPalette, and the instance data it introduces. */
  90. SOMEXTERN struct WPColorPaletteCClassDataStructure {
  91.     somMethodTabs parentMtab;
  92.     somDToken              instanceDataToken;
  93. } SOMDLINK WPColorPaletteCClassData;
  94.  
  95. /*
  96.  * -- Typedefs for WPColorPalette Method Procedures
  97.  */
  98. SOMEXTERN {
  99.  
  100. /*
  101.  * -- Typedefs for Reintroduced Wrapper Methods
  102.  */
  103. typedef M_WPColorPalette*   SOMLINK somTP_WPColorPalette_somGetClass(WPColorPalette *somSelf);
  104. typedef somTP_WPColorPalette_somGetClass *somTD_WPColorPalette_somGetClass;
  105. }
  106.  
  107. #endif /* WPColorPalette_API */
  108.  
  109.  
  110. /*
  111.  * -- This emitter treats Method Tokens as Thunks by default.
  112.  * -- Use the sc modifier "nothunks" to change this default
  113.  */
  114. #undef somresolve_
  115. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  116.  
  117. /*
  118.  * -- The C++ Wrapper Class for WPColorPalette
  119.  */
  120. class WPColorPalette : public WPPalette
  121. {
  122. public:
  123.  
  124. // WPColorPalette::new creates the class object if necessary, and then uses somNewNoInit
  125. // to allocate memory and create the object. Initialization is in ctors.
  126. void *operator new(size_t)
  127. {
  128.    if (!_WPColorPalette) WPColorPaletteNewClass(WPColorPalette_MajorVersion,WPColorPalette_MinorVersion);
  129.    return (void*)
  130.       SOM_Resolve(_WPColorPalette,SOMClass,somNewNoInit)
  131.          ((SOMClass *)((void*)_WPColorPalette));
  132. }
  133.  
  134. // WPColorPalette::delete uses somDestruct.
  135. void operator delete(void * obj)
  136. {
  137.    if (obj && *(void**)obj) {
  138.       SOM_Resolve(obj,SOMObject,somDestruct)
  139.          ((SOMObject*)obj, 1, 0);
  140.    }
  141. }
  142.  
  143. WPColorPalette& operator=(WPColorPalette& fromObj)
  144. {
  145.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  146.    return *this;
  147. }
  148.  
  149. WPColorPalette()
  150. {
  151.    if (*(void**)this != 
  152.        ((somParentMtabStructPtr)
  153.         (WPColorPaletteCClassData.parentMtab))->mtab)
  154.       return;
  155.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  156. }
  157.  
  158. WPColorPalette(WPColorPalette* fromObj)
  159. {
  160.    if (*(void**)this != 
  161.        ((somParentMtabStructPtr)
  162.         (WPColorPaletteCClassData.parentMtab))->mtab)
  163.       return;
  164.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  165. }
  166.  
  167. WPColorPalette(const WPColorPalette* fromObj)
  168. {
  169.    if (*(void**)this != 
  170.        ((somParentMtabStructPtr)
  171.         (WPColorPaletteCClassData.parentMtab))->mtab)
  172.       return;
  173.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  174. }
  175.  
  176.  
  177. /*
  178.  * Reintroduce inherited methods
  179.  */
  180.  
  181. /* method: somGetClass */
  182. M_WPColorPalette*  somGetClass()
  183. {
  184. /*
  185.  *  Return the receiver's class.
  186.  */
  187.    return SOM_ResolveD(this,WPColorPalette,SOMObject,somGetClass)
  188.     (this);
  189. }
  190.  
  191.  
  192.  
  193. };   /* WPColorPalette */
  194.  
  195.  
  196.  
  197. #endif       /* SOM_WPColorPalette_xh */
  198.  
  199. #ifndef SOM_M_WPColorPalette_xh
  200. #define SOM_M_WPColorPalette_xh
  201.  
  202. class M_WPColorPalette;
  203.  
  204. #define M_WPColorPalette_MajorVersion 1
  205. #define M_WPColorPalette_MinorVersion 2
  206.  
  207. /* C++ SOM defs */
  208. #include <somcls.xh>
  209. #include <somcm.xh>
  210.  
  211. /* C++ parent defs */
  212. #ifndef SOM_M_WPPalette_xh
  213. #include <wppalet.xh>
  214. #endif
  215.  
  216. #ifndef M_WPColorPalette_API
  217. #define M_WPColorPalette_API
  218. /*
  219.  * -- The Class API
  220.  */
  221.  
  222. /*
  223.  * Start of bindings for IDL types
  224.  */
  225.  
  226.  
  227. /*
  228.  * End of bindings for IDL types.
  229.  */
  230.  
  231. /*
  232.  * -- M_WPColorPalette is a metaclass for WPColorPalette. Make sure WPColorPalette is known.
  233.  */
  234. class WPColorPalette;
  235.  
  236.  
  237. /* A procedure to create the M_WPColorPalette Class */
  238. SOMEXTERN SOMClass * SOMLINK M_WPColorPaletteNewClass(
  239.         integer4 majorVersion,
  240.         integer4 minorVersion);
  241.  
  242. /* The API to the M_WPColorPalette class object, and the methods it introduces. */
  243. SOMEXTERN struct M_WPColorPaletteClassDataStructure {
  244.     SOMClass *classObject;
  245. } SOMDLINK M_WPColorPaletteClassData;
  246. #define _M_WPColorPalette M_WPColorPaletteClassData.classObject
  247.  
  248. /* The API to parentMtabs for M_WPColorPalette, and the instance data it introduces. */
  249. SOMEXTERN struct M_WPColorPaletteCClassDataStructure {
  250.     somMethodTabs parentMtab;
  251.     somDToken              instanceDataToken;
  252. } SOMDLINK M_WPColorPaletteCClassData;
  253.  
  254. /*
  255.  * -- Typedefs for M_WPColorPalette Method Procedures
  256.  */
  257. SOMEXTERN {
  258.  
  259. /*
  260.  * -- Typedefs for Reintroduced Wrapper Methods
  261.  */
  262. typedef WPColorPalette*   SOMLINK somTP_M_WPColorPalette_somNew(M_WPColorPalette *somSelf);
  263. typedef somTP_M_WPColorPalette_somNew *somTD_M_WPColorPalette_somNew;
  264. }
  265.  
  266. #endif /* M_WPColorPalette_API */
  267.  
  268.  
  269. /*
  270.  * -- This emitter treats Method Tokens as Thunks by default.
  271.  * -- Use the sc modifier "nothunks" to change this default
  272.  */
  273. #undef somresolve_
  274. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  275.  
  276. /*
  277.  * -- The C++ Wrapper Class for M_WPColorPalette
  278.  */
  279. class M_WPColorPalette : public M_WPPalette
  280. {
  281. public:
  282.  
  283. // M_WPColorPalette::new creates the class object if necessary, and then uses somNewNoInit
  284. // to allocate memory and create the object. Initialization is in ctors.
  285. void *operator new(size_t)
  286. {
  287.    if (!_M_WPColorPalette) M_WPColorPaletteNewClass(M_WPColorPalette_MajorVersion,M_WPColorPalette_MinorVersion);
  288.    return (void*)
  289.       SOM_Resolve(_M_WPColorPalette,SOMClass,somNewNoInit)
  290.          ((SOMClass *)((void*)_M_WPColorPalette));
  291. }
  292.  
  293. // M_WPColorPalette::delete uses somDestruct.
  294. void operator delete(void * obj)
  295. {
  296.    if (obj && *(void**)obj) {
  297.       SOM_Resolve(obj,SOMObject,somDestruct)
  298.          ((SOMObject*)obj, 1, 0);
  299.    }
  300. }
  301.  
  302. M_WPColorPalette& operator=(M_WPColorPalette& fromObj)
  303. {
  304.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  305.    return *this;
  306. }
  307.  
  308. M_WPColorPalette()
  309. {
  310.    if (*(void**)this != 
  311.        ((somParentMtabStructPtr)
  312.         (M_WPColorPaletteCClassData.parentMtab))->mtab)
  313.       return;
  314.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  315. }
  316.  
  317. M_WPColorPalette(M_WPColorPalette* fromObj)
  318. {
  319.    if (*(void**)this != 
  320.        ((somParentMtabStructPtr)
  321.         (M_WPColorPaletteCClassData.parentMtab))->mtab)
  322.       return;
  323.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  324. }
  325.  
  326. M_WPColorPalette(const M_WPColorPalette* fromObj)
  327. {
  328.    if (*(void**)this != 
  329.        ((somParentMtabStructPtr)
  330.         (M_WPColorPaletteCClassData.parentMtab))->mtab)
  331.       return;
  332.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  333. }
  334.  
  335.  
  336. /*
  337.  * Reintroduce inherited methods
  338.  */
  339.  
  340. /* method: somNew */
  341. WPColorPalette*  somNew()
  342. {
  343.    return SOM_ResolveD(this,M_WPColorPalette,SOMClass,somNew)
  344.     (this);
  345. }
  346.  
  347.  
  348.  
  349. };   /* M_WPColorPalette */
  350.  
  351.  
  352.  
  353. #endif       /* SOM_M_WPColorPalette_xh */
  354.