home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v5.zip / TOOLKT21 / CPLUS / OS2H / WPCLRPAL.XH < prev    next >
Text File  |  1993-05-03  |  4KB  |  195 lines

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: wpclrpal.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler spc: 1.22
  7.  *     SOM Emitter emitxh: 1.11
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *  Module Header
  13.  * 
  14.  *  Module Name: WPCLRPAL
  15.  * 
  16.  *  OS/2 Presentation Manager Workplace class definitions
  17.  * 
  18.  *  Copyright (c) International Business Machines Corporation 1991, 1992
  19.  * 
  20.  */
  21.  
  22. #ifndef wpclrpal_xh
  23. #define wpclrpal_xh
  24. class WPColorPalette;
  25.  
  26. #define WPColorPalette_MajorVersion 1
  27. #define WPColorPalette_MinorVersion 2
  28.  
  29. /* C++ som defs */
  30. #include <somcls.xh>
  31.  
  32. /* C++ parent def */
  33. #ifndef wppalet_xh
  34. #include "wppalet.xh"
  35. #endif
  36.  
  37. /*
  38.  * Passthru lines: File: "C.xh", "after"
  39.  */
  40.  
  41.       /* Paintpot structure */
  42.  
  43.       typedef struct _PAINTPOT
  44.       {
  45.          CELL        cell;     /* Size of the data that follows */
  46.          ULONG       ulRGB;    /* Color of this paintpot */
  47.       } PAINTPOT;
  48.       typedef PAINTPOT *PPAINTPOT;
  49.  
  50.  
  51. #ifndef WPColorPalette_API
  52. #define WPColorPalette_API
  53. /*
  54.  * The Class API
  55.  */
  56.  
  57. /* A procedure to create the WPColorPalette Class */
  58. SOMEXTERN SOMClass * SOMLINK WPColorPaletteNewClass(
  59.         integer4 majorVersion,
  60.         integer4 minorVersion);
  61.  
  62. /* A macro to return the WPColorPalette class object */
  63. class M_WPColorPalette;
  64. #define _WPColorPalette ((M_WPColorPalette*)WPColorPaletteClassData.classObject)
  65.  
  66. /* The static interface to WPColorPalette and its instances */
  67. SOMEXTERN struct WPColorPaletteClassDataStructure {
  68.     SOMClass *classObject;
  69. } WPColorPaletteClassData;
  70.  
  71. /*
  72.  * -- Typedefs for Procedures that support WPColorPalette Methods
  73.  */
  74. extern "C" {
  75. }
  76.  
  77.  
  78. #endif /* WPColorPalette_API */
  79.  
  80.  
  81. /*
  82.  * -- The C++ Wrapper Class for WPColorPalette
  83.  */
  84. class WPColorPalette : public WPPalette
  85. {
  86. public:
  87.  
  88. void *operator new(size_t size)
  89. {
  90.    (void) size;
  91.    if (!WPColorPaletteClassData.classObject) 
  92.       WPColorPaletteNewClass(WPColorPalette_MajorVersion,WPColorPalette_MinorVersion);
  93.    return (void *)
  94.       ((somTD_SOMClass_somNew)
  95.       somResolve(SOM_TestCls((SOMAny *)(WPColorPaletteClassData.classObject),
  96.                              SOMClassClassData.classObject),
  97.                  SOMClassClassData.somNew))
  98.          ((SOMClass*)(WPColorPaletteClassData.classObject));
  99. }
  100.  
  101. void operator delete(void * obj)
  102. {
  103.    ((SOMObject *)obj)->somFree();
  104. }
  105.  
  106.  
  107. };   /* WPColorPalette */
  108.  
  109.  
  110.  
  111. #endif       /* wpclrpal_xh */
  112.  
  113. /*
  114.  * This file was generated by the SOM Compiler.
  115.  * FileName: wpclrpal.xh.
  116.  * Generated using:
  117.  *     SOM Precompiler spc: 1.22
  118.  *     SOM Emitter emitxh: 1.11
  119.  */
  120. #ifndef wpclrpal_mxh
  121. #define wpclrpal_mxh
  122. class M_WPColorPalette;
  123.  
  124. #define M_WPColorPalette_MajorVersion 1
  125. #define M_WPColorPalette_MinorVersion 2
  126.  
  127. /* C++ som defs */
  128. #include <somcls.xh>
  129.  
  130. /* C++ parent def */
  131. #ifndef wppalet_xh
  132. #include "wppalet.xh"
  133. #endif
  134.  
  135. #ifndef M_WPColorPalette_API
  136. #define M_WPColorPalette_API
  137. /*
  138.  * The Class API
  139.  */
  140.  
  141. /* A procedure to create the M_WPColorPalette Class */
  142. SOMEXTERN SOMClass * SOMLINK M_WPColorPaletteNewClass(
  143.         integer4 majorVersion,
  144.         integer4 minorVersion);
  145.  
  146. /* A macro to return the M_WPColorPalette class object */
  147. #define _M_WPColorPalette ((SOMClass*)M_WPColorPaletteClassData.classObject)
  148.  
  149. /* The static interface to M_WPColorPalette and its instances */
  150. SOMEXTERN struct M_WPColorPaletteClassDataStructure {
  151.     SOMClass *classObject;
  152. } M_WPColorPaletteClassData;
  153.  
  154. /*
  155.  * -- Typedefs for Procedures that support M_WPColorPalette Methods
  156.  */
  157. extern "C" {
  158. }
  159.  
  160.  
  161. #endif /* M_WPColorPalette_API */
  162.  
  163.  
  164. /*
  165.  * -- The C++ Wrapper Class for M_WPColorPalette
  166.  */
  167. class M_WPColorPalette : public M_WPPalette
  168. {
  169. public:
  170.  
  171. void *operator new(size_t size)
  172. {
  173.    (void) size;
  174.    if (!M_WPColorPaletteClassData.classObject) 
  175.       M_WPColorPaletteNewClass(M_WPColorPalette_MajorVersion,M_WPColorPalette_MinorVersion);
  176.    return (void *)
  177.       ((somTD_SOMClass_somNew)
  178.       somResolve(SOM_TestCls((SOMAny *)(M_WPColorPaletteClassData.classObject),
  179.                              SOMClassClassData.classObject),
  180.                  SOMClassClassData.somNew))
  181.          ((SOMClass*)(M_WPColorPaletteClassData.classObject));
  182. }
  183.  
  184. void operator delete(void * obj)
  185. {
  186.    ((SOMObject *)obj)->somFree();
  187. }
  188.  
  189.  
  190. };   /* M_WPColorPalette */
  191.  
  192.  
  193.  
  194. #endif       /* wpclrpal_mxh */
  195.