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

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: E:\cwpsh\rel\os2c\include\base\os2\wpport.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: WPPORT
  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_WPPort_xh
  23. #define SOM_WPPort_xh
  24.  
  25. class WPPort;
  26.  
  27. #define WPPort_MajorVersion 1
  28. #define WPPort_MinorVersion 1
  29.  
  30. /*
  31.  * Passthru lines: File: "C.h", "before"
  32.  */
  33.  
  34. /* common context menu ids */
  35. #define WPPOIDM_PORT_REDIRECT       7100
  36. #define WPPOIDM_PORT_INSTALL        8001
  37.  
  38.  
  39. /* C++ SOM defs */
  40. #include <somcls.xh>
  41. #include <somcm.xh>
  42.  
  43. /* C++ parent defs */
  44. #ifndef SOM_WPTransient_xh
  45. #include <wptrans.xh>
  46. #endif
  47.  
  48. #ifndef WPPort_API
  49. #define WPPort_API
  50. /*
  51.  * -- The Class API
  52.  */
  53.  
  54. /*
  55.  * Start of bindings for IDL types
  56.  */
  57.  
  58. class SOMClass;
  59. class SOMObject;
  60. class WPFolder;
  61. class M_WPObject;
  62. class WPObject;
  63. class WPImageFile;
  64. class M_WPTransient;
  65. class M_WPPort;
  66.  
  67. /*
  68.  * End of bindings for IDL types.
  69.  */
  70.  
  71. /* A procedure to create the WPPort Class */
  72. class M_WPPort;
  73. SOMEXTERN M_WPPort * SOMLINK WPPortNewClass(
  74.         integer4 majorVersion,
  75.         integer4 minorVersion);
  76.  
  77. /* The API to the WPPort class object, and the methods it introduces. */
  78. SOMEXTERN struct WPPortClassDataStructure {
  79.     M_WPPort *classObject;
  80.     somMToken prtGetPortInfo;
  81.     somMToken prtSetPortInfo;
  82.     somMToken prtSettings;
  83.     somMToken prtGetDeviceObject;
  84.     somMToken prtSetPortDiscardhwndDlg;
  85.     somMToken prtSetPortInstallhwndDlg;
  86.     somMToken prtPrintPort;
  87.     somMToken prtSetIcon;
  88.     somMToken prtChangePort;
  89.     somMToken prtGetStatus;
  90.     somMToken prtGetComputername;
  91.     somMToken prtSetStatus;
  92.     somMToken prtGetPDSelf;
  93.     somMToken prtSetPDSelf;
  94.     somMToken prtSetUlStatus;
  95.     somMToken prtGetUlStatus;
  96.     somMToken prtGetPortName;
  97.     somMToken prtGetPanelList;
  98.     somMToken prtIncThreadCnt;
  99.     somMToken prtDecThreadCnt;
  100.     somMToken prtSetDevicename;
  101. } SOMDLINK WPPortClassData;
  102. #define _WPPort WPPortClassData.classObject
  103.  
  104. /* The API to parentMtabs for WPPort, and the instance data it introduces. */
  105. SOMEXTERN struct WPPortCClassDataStructure {
  106.     somMethodTabs parentMtab;
  107.     somDToken              instanceDataToken;
  108. } SOMDLINK WPPortCClassData;
  109.  
  110. /*
  111.  * -- Typedefs for WPPort Method Procedures
  112.  */
  113. SOMEXTERN {
  114.  
  115. /*
  116.  * -- Typedefs for Reintroduced Wrapper Methods
  117.  */
  118. typedef M_WPPort*   SOMLINK somTP_WPPort_somGetClass(WPPort *somSelf);
  119. typedef somTP_WPPort_somGetClass *somTD_WPPort_somGetClass;
  120. }
  121.  
  122. #endif /* WPPort_API */
  123.  
  124.  
  125. /*
  126.  * -- This emitter normally treats Method Tokens as Thunks,
  127.  * -- but the sc modifier "nothunks" was used, so somResolve will be called.
  128.  */
  129. #undef somresolve_
  130. #define somresolve_(obj,mToken) (somResolve(obj,mToken))
  131.  
  132. /*
  133.  * -- The C++ Wrapper Class for WPPort
  134.  */
  135. class WPPort : public WPTransient
  136. {
  137. public:
  138.  
  139. // WPPort::new creates the class object if necessary, and then uses somNewNoInit
  140. // to allocate memory and create the object. Initialization is in ctors.
  141. void *operator new(size_t)
  142. {
  143.    if (!_WPPort) WPPortNewClass(WPPort_MajorVersion,WPPort_MinorVersion);
  144.    return (void*)
  145.       SOM_Resolve(_WPPort,SOMClass,somNewNoInit)
  146.          ((SOMClass *)((void*)_WPPort));
  147. }
  148.  
  149. // WPPort::delete uses somDestruct.
  150. void operator delete(void * obj)
  151. {
  152.    if (obj && *(void**)obj) {
  153.       SOM_Resolve(obj,SOMObject,somDestruct)
  154.          ((SOMObject*)obj, 1, 0);
  155.    }
  156. }
  157.  
  158. WPPort& operator=(WPPort& fromObj)
  159. {
  160.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  161.    return *this;
  162. }
  163.  
  164. WPPort()
  165. {
  166.    if (*(void**)this != 
  167.        ((somParentMtabStructPtr)
  168.         (WPPortCClassData.parentMtab))->mtab)
  169.       return;
  170.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  171. }
  172.  
  173. WPPort(WPPort* fromObj)
  174. {
  175.    if (*(void**)this != 
  176.        ((somParentMtabStructPtr)
  177.         (WPPortCClassData.parentMtab))->mtab)
  178.       return;
  179.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  180. }
  181.  
  182. WPPort(const WPPort* fromObj)
  183. {
  184.    if (*(void**)this != 
  185.        ((somParentMtabStructPtr)
  186.         (WPPortCClassData.parentMtab))->mtab)
  187.       return;
  188.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  189. }
  190.  
  191.  
  192. /*
  193.  * Reintroduce inherited methods
  194.  */
  195.  
  196. /* method: somGetClass */
  197. M_WPPort*  somGetClass()
  198. {
  199. /*
  200.  *  Return the receiver's class.
  201.  */
  202.    return SOM_ResolveD(this,WPPort,SOMObject,somGetClass)
  203.     (this);
  204. }
  205.  
  206.  
  207.  
  208. };   /* WPPort */
  209.  
  210.  
  211.  
  212. #endif       /* SOM_WPPort_xh */
  213.  
  214. #ifndef SOM_M_WPPort_xh
  215. #define SOM_M_WPPort_xh
  216.  
  217. class M_WPPort;
  218.  
  219. #define M_WPPort_MajorVersion 1
  220. #define M_WPPort_MinorVersion 1
  221.  
  222. /* C++ SOM defs */
  223. #include <somcls.xh>
  224. #include <somcm.xh>
  225.  
  226. /* C++ parent defs */
  227. #ifndef SOM_M_WPTransient_xh
  228. #include <wptrans.xh>
  229. #endif
  230.  
  231. #ifndef M_WPPort_API
  232. #define M_WPPort_API
  233. /*
  234.  * -- The Class API
  235.  */
  236.  
  237. /*
  238.  * Start of bindings for IDL types
  239.  */
  240.  
  241.  
  242. /*
  243.  * End of bindings for IDL types.
  244.  */
  245.  
  246. /*
  247.  * -- M_WPPort is a metaclass for WPPort. Make sure WPPort is known.
  248.  */
  249. class WPPort;
  250.  
  251.  
  252. /* A procedure to create the M_WPPort Class */
  253. SOMEXTERN SOMClass * SOMLINK M_WPPortNewClass(
  254.         integer4 majorVersion,
  255.         integer4 minorVersion);
  256.  
  257. /* The API to the M_WPPort class object, and the methods it introduces. */
  258. SOMEXTERN struct M_WPPortClassDataStructure {
  259.     SOMClass *classObject;
  260. } SOMDLINK M_WPPortClassData;
  261. #define _M_WPPort M_WPPortClassData.classObject
  262.  
  263. /* The API to parentMtabs for M_WPPort, and the instance data it introduces. */
  264. SOMEXTERN struct M_WPPortCClassDataStructure {
  265.     somMethodTabs parentMtab;
  266.     somDToken              instanceDataToken;
  267. } SOMDLINK M_WPPortCClassData;
  268.  
  269. /*
  270.  * -- Typedefs for M_WPPort Method Procedures
  271.  */
  272. SOMEXTERN {
  273.  
  274. /*
  275.  * -- Typedefs for Reintroduced Wrapper Methods
  276.  */
  277. typedef WPPort*   SOMLINK somTP_M_WPPort_somNew(M_WPPort *somSelf);
  278. typedef somTP_M_WPPort_somNew *somTD_M_WPPort_somNew;
  279. }
  280.  
  281. #endif /* M_WPPort_API */
  282.  
  283.  
  284. /*
  285.  * -- This emitter normally treats Method Tokens as Thunks,
  286.  * -- but the sc modifier "nothunks" was used, so somResolve will be called.
  287.  */
  288. #undef somresolve_
  289. #define somresolve_(obj,mToken) (somResolve(obj,mToken))
  290.  
  291. /*
  292.  * -- The C++ Wrapper Class for M_WPPort
  293.  */
  294. class M_WPPort : public M_WPTransient
  295. {
  296. public:
  297.  
  298. // M_WPPort::new creates the class object if necessary, and then uses somNewNoInit
  299. // to allocate memory and create the object. Initialization is in ctors.
  300. void *operator new(size_t)
  301. {
  302.    if (!_M_WPPort) M_WPPortNewClass(M_WPPort_MajorVersion,M_WPPort_MinorVersion);
  303.    return (void*)
  304.       SOM_Resolve(_M_WPPort,SOMClass,somNewNoInit)
  305.          ((SOMClass *)((void*)_M_WPPort));
  306. }
  307.  
  308. // M_WPPort::delete uses somDestruct.
  309. void operator delete(void * obj)
  310. {
  311.    if (obj && *(void**)obj) {
  312.       SOM_Resolve(obj,SOMObject,somDestruct)
  313.          ((SOMObject*)obj, 1, 0);
  314.    }
  315. }
  316.  
  317. M_WPPort& operator=(M_WPPort& fromObj)
  318. {
  319.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  320.    return *this;
  321. }
  322.  
  323. M_WPPort()
  324. {
  325.    if (*(void**)this != 
  326.        ((somParentMtabStructPtr)
  327.         (M_WPPortCClassData.parentMtab))->mtab)
  328.       return;
  329.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  330. }
  331.  
  332. M_WPPort(M_WPPort* fromObj)
  333. {
  334.    if (*(void**)this != 
  335.        ((somParentMtabStructPtr)
  336.         (M_WPPortCClassData.parentMtab))->mtab)
  337.       return;
  338.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  339. }
  340.  
  341. M_WPPort(const M_WPPort* fromObj)
  342. {
  343.    if (*(void**)this != 
  344.        ((somParentMtabStructPtr)
  345.         (M_WPPortCClassData.parentMtab))->mtab)
  346.       return;
  347.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  348. }
  349.  
  350.  
  351. /*
  352.  * Reintroduce inherited methods
  353.  */
  354.  
  355. /* method: somNew */
  356. WPPort*  somNew()
  357. {
  358.    return SOM_ResolveD(this,M_WPPort,SOMClass,somNew)
  359.     (this);
  360. }
  361.  
  362.  
  363.  
  364. };   /* M_WPPort */
  365.  
  366.  
  367.  
  368. #endif       /* SOM_M_WPPort_xh */
  369.