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

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: E:\cwpsh\rel\os2c\include\base\os2\wpdevice.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: WPDEVICE
  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_WPDevice_xh
  23. #define SOM_WPDevice_xh
  24.  
  25. class WPDevice;
  26.  
  27. #define WPDevice_MajorVersion 1
  28. #define WPDevice_MinorVersion 2
  29.  
  30. /*
  31.  * Passthru lines: File: "C.h", "before"
  32.  */
  33.  
  34.  
  35.  
  36. /* C++ SOM defs */
  37. #include <somcls.xh>
  38. #include <somcm.xh>
  39.  
  40. /* C++ parent defs */
  41. #ifndef SOM_WPTransient_xh
  42. #include <wptrans.xh>
  43. #endif
  44.  
  45. #ifndef WPDevice_API
  46. #define WPDevice_API
  47. /*
  48.  * -- The Class API
  49.  */
  50.  
  51. /*
  52.  * Start of bindings for IDL types
  53.  */
  54.  
  55. class SOMClass;
  56. class SOMObject;
  57. class WPFolder;
  58. class M_WPObject;
  59. class WPObject;
  60. class WPImageFile;
  61. class M_WPTransient;
  62. class M_WPDevice;
  63.  
  64. /*
  65.  * End of bindings for IDL types.
  66.  */
  67.  
  68. /* A procedure to create the WPDevice Class */
  69. class M_WPDevice;
  70. SOMEXTERN M_WPDevice * SOMLINK WPDeviceNewClass(
  71.         integer4 majorVersion,
  72.         integer4 minorVersion);
  73.  
  74. /* The API to the WPDevice class object, and the methods it introduces. */
  75. SOMEXTERN struct WPDeviceClassDataStructure {
  76.     M_WPDevice *classObject;
  77.     somMToken wpDevicePrivate1;
  78.     somMToken wpDevicePrivate2;
  79.     somMToken wpDevicePrivate3;
  80.     somMToken wpDevicePrivate4;
  81.     somMToken wpDevicePrivate5;
  82.     somMToken wpDevicePrivate6;
  83.     somMToken wpDevicePrivate7;
  84.     somMToken wpDevicePrivate8;
  85.     somMToken wpDevicePrivate9;
  86.     somMToken wpDevicePrivate10;
  87.     somMToken wpDevicePrivate11;
  88.     somMToken wpDevicePrivate12;
  89.     somMToken wpDevicePrivate13;
  90.     somMToken wpDevicePrivate14;
  91.     somMToken wpDevicePrivate15;
  92.     somMToken wpDevicePrivate16;
  93.     somMToken wpDevicePrivate17;
  94.     somMToken wpDevicePrivate18;
  95.     somMToken wpDevicePrivate19;
  96.     somMToken wpDevicePrivate20;
  97.     somMToken wpDevicePrivate21;
  98.     somMToken wpDevicePrivate22;
  99.     somMToken wpDevicePrivate23;
  100.     somMToken wpDevicePrivate24;
  101.     somMToken wpDevicePrivate25;
  102.     somMToken wpDevicePrivate26;
  103.     somMToken wpDevicePrivate27;
  104.     somMToken wpDevicePrivate28;
  105.     somMToken wpDevicePrivate29;
  106.     somMToken wpDevicePrivate30;
  107.     somMToken wpDevicePrivate31;
  108.     somMToken wpDevicePrivate32;
  109.     somMToken wpDevicePrivate33;
  110.     somMToken wpDevicePrivate34;
  111.     somMToken wpDevicePrivate35;
  112.     somMToken wpDevicePrivate36;
  113.     somMToken wpDevicePrivate37;
  114.     somMToken wpDevicePrivate38;
  115.     somMToken wpDevicePrivate39;
  116.     somMToken wpDevicePrivate40;
  117.     somMToken wpDevicePrivate41;
  118.     somMToken wpDevicePrivate42;
  119.     somMToken wpDevicePrivate43;
  120.     somMToken wpDevicePrivate44;
  121.     somMToken wpDevicePrivate45;
  122.     somMToken wpDevicePrivate46;
  123.     somMToken wpDevicePrivate47;
  124.     somMToken wpDevicePrivate48;
  125.     somMToken wpDevicePrivate49;
  126.     somMToken wpDevicePrivate50;
  127.     somMToken wpDevicePrivate51;
  128.     somMToken wpDevicePrivate52;
  129.     somMToken wpAddDeviceDevice1Page;
  130.     somMToken wpAddDeviceDevice2Page;
  131.     somMToken wpAddDeviceDMA1Page;
  132.     somMToken wpAddDeviceIRQ1Page;
  133.     somMToken wpAddDeviceMemory1Page;
  134.     somMToken wpAddDeviceIO1Page;
  135. } SOMDLINK WPDeviceClassData;
  136. #define _WPDevice WPDeviceClassData.classObject
  137.  
  138. /* The API to parentMtabs for WPDevice, and the instance data it introduces. */
  139. SOMEXTERN struct WPDeviceCClassDataStructure {
  140.     somMethodTabs parentMtab;
  141.     somDToken              instanceDataToken;
  142. } SOMDLINK WPDeviceCClassData;
  143.  
  144. /*
  145.  * -- Typedefs for WPDevice Method Procedures
  146.  */
  147. SOMEXTERN {
  148. typedef ULONG   SOMLINK somTP_WPDevice_wpAddDeviceDevice1Page(WPDevice *somSelf, 
  149.         HWND hwndNotebook);
  150. typedef somTP_WPDevice_wpAddDeviceDevice1Page *somTD_WPDevice_wpAddDeviceDevice1Page;
  151. typedef ULONG   SOMLINK somTP_WPDevice_wpAddDeviceDevice2Page(WPDevice *somSelf, 
  152.         HWND hwndNotebook);
  153. typedef somTP_WPDevice_wpAddDeviceDevice2Page *somTD_WPDevice_wpAddDeviceDevice2Page;
  154. typedef ULONG   SOMLINK somTP_WPDevice_wpAddDeviceDMA1Page(WPDevice *somSelf, 
  155.         HWND hwndNotebook);
  156. typedef somTP_WPDevice_wpAddDeviceDMA1Page *somTD_WPDevice_wpAddDeviceDMA1Page;
  157. typedef ULONG   SOMLINK somTP_WPDevice_wpAddDeviceIRQ1Page(WPDevice *somSelf, 
  158.         HWND hwndNotebook);
  159. typedef somTP_WPDevice_wpAddDeviceIRQ1Page *somTD_WPDevice_wpAddDeviceIRQ1Page;
  160. typedef ULONG   SOMLINK somTP_WPDevice_wpAddDeviceMemory1Page(WPDevice *somSelf, 
  161.         HWND hwndNotebook);
  162. typedef somTP_WPDevice_wpAddDeviceMemory1Page *somTD_WPDevice_wpAddDeviceMemory1Page;
  163. typedef ULONG   SOMLINK somTP_WPDevice_wpAddDeviceIO1Page(WPDevice *somSelf, 
  164.         HWND hwndNotebook);
  165. typedef somTP_WPDevice_wpAddDeviceIO1Page *somTD_WPDevice_wpAddDeviceIO1Page;
  166.  
  167. /*
  168.  * -- Typedefs for Reintroduced Wrapper Methods
  169.  */
  170. typedef M_WPDevice*   SOMLINK somTP_WPDevice_somGetClass(WPDevice *somSelf);
  171. typedef somTP_WPDevice_somGetClass *somTD_WPDevice_somGetClass;
  172. }
  173.  
  174. #endif /* WPDevice_API */
  175.  
  176.  
  177. /*
  178.  * -- This emitter treats Method Tokens as Thunks by default.
  179.  * -- Use the sc modifier "nothunks" to change this default
  180.  */
  181. #undef somresolve_
  182. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  183.  
  184. /*
  185.  * -- The C++ Wrapper Class for WPDevice
  186.  */
  187. class WPDevice : public WPTransient
  188. {
  189. public:
  190.  
  191. // WPDevice::new creates the class object if necessary, and then uses somNewNoInit
  192. // to allocate memory and create the object. Initialization is in ctors.
  193. void *operator new(size_t)
  194. {
  195.    if (!_WPDevice) WPDeviceNewClass(WPDevice_MajorVersion,WPDevice_MinorVersion);
  196.    return (void*)
  197.       SOM_Resolve(_WPDevice,SOMClass,somNewNoInit)
  198.          ((SOMClass *)((void*)_WPDevice));
  199. }
  200.  
  201. // WPDevice::delete uses somDestruct.
  202. void operator delete(void * obj)
  203. {
  204.    if (obj && *(void**)obj) {
  205.       SOM_Resolve(obj,SOMObject,somDestruct)
  206.          ((SOMObject*)obj, 1, 0);
  207.    }
  208. }
  209.  
  210. WPDevice& operator=(WPDevice& fromObj)
  211. {
  212.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  213.    return *this;
  214. }
  215.  
  216. WPDevice()
  217. {
  218.    if (*(void**)this != 
  219.        ((somParentMtabStructPtr)
  220.         (WPDeviceCClassData.parentMtab))->mtab)
  221.       return;
  222.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  223. }
  224.  
  225. WPDevice(WPDevice* fromObj)
  226. {
  227.    if (*(void**)this != 
  228.        ((somParentMtabStructPtr)
  229.         (WPDeviceCClassData.parentMtab))->mtab)
  230.       return;
  231.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  232. }
  233.  
  234. WPDevice(const WPDevice* fromObj)
  235. {
  236.    if (*(void**)this != 
  237.        ((somParentMtabStructPtr)
  238.         (WPDeviceCClassData.parentMtab))->mtab)
  239.       return;
  240.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  241. }
  242.  
  243.  
  244. /* method: wpAddDeviceDevice1Page */
  245. ULONG   wpAddDeviceDevice1Page(HWND hwndNotebook)
  246. {
  247.    return SOM_ResolveD(this,WPDevice,WPDevice,wpAddDeviceDevice1Page)
  248.     (this,hwndNotebook);
  249. }
  250.  
  251.  
  252. /* method: wpAddDeviceDevice2Page */
  253. ULONG   wpAddDeviceDevice2Page(HWND hwndNotebook)
  254. {
  255.    return SOM_ResolveD(this,WPDevice,WPDevice,wpAddDeviceDevice2Page)
  256.     (this,hwndNotebook);
  257. }
  258.  
  259.  
  260. /* method: wpAddDeviceDMA1Page */
  261. ULONG   wpAddDeviceDMA1Page(HWND hwndNotebook)
  262. {
  263.    return SOM_ResolveD(this,WPDevice,WPDevice,wpAddDeviceDMA1Page)
  264.     (this,hwndNotebook);
  265. }
  266.  
  267.  
  268. /* method: wpAddDeviceIRQ1Page */
  269. ULONG   wpAddDeviceIRQ1Page(HWND hwndNotebook)
  270. {
  271.    return SOM_ResolveD(this,WPDevice,WPDevice,wpAddDeviceIRQ1Page)
  272.     (this,hwndNotebook);
  273. }
  274.  
  275.  
  276. /* method: wpAddDeviceMemory1Page */
  277. ULONG   wpAddDeviceMemory1Page(HWND hwndNotebook)
  278. {
  279.    return SOM_ResolveD(this,WPDevice,WPDevice,wpAddDeviceMemory1Page)
  280.     (this,hwndNotebook);
  281. }
  282.  
  283.  
  284. /* method: wpAddDeviceIO1Page */
  285. ULONG   wpAddDeviceIO1Page(HWND hwndNotebook)
  286. {
  287.    return SOM_ResolveD(this,WPDevice,WPDevice,wpAddDeviceIO1Page)
  288.     (this,hwndNotebook);
  289. }
  290.  
  291.  
  292. /*
  293.  * Reintroduce inherited methods
  294.  */
  295.  
  296. /* method: somGetClass */
  297. M_WPDevice*  somGetClass()
  298. {
  299. /*
  300.  *  Return the receiver's class.
  301.  */
  302.    return SOM_ResolveD(this,WPDevice,SOMObject,somGetClass)
  303.     (this);
  304. }
  305.  
  306.  
  307.  
  308. };   /* WPDevice */
  309.  
  310.  
  311.  
  312. #endif       /* SOM_WPDevice_xh */
  313.  
  314. #ifndef SOM_M_WPDevice_xh
  315. #define SOM_M_WPDevice_xh
  316.  
  317. class M_WPDevice;
  318.  
  319. #define M_WPDevice_MajorVersion 1
  320. #define M_WPDevice_MinorVersion 2
  321.  
  322. /* C++ SOM defs */
  323. #include <somcls.xh>
  324. #include <somcm.xh>
  325.  
  326. /* C++ parent defs */
  327. #ifndef SOM_M_WPTransient_xh
  328. #include <wptrans.xh>
  329. #endif
  330.  
  331. #ifndef M_WPDevice_API
  332. #define M_WPDevice_API
  333. /*
  334.  * -- The Class API
  335.  */
  336.  
  337. /*
  338.  * Start of bindings for IDL types
  339.  */
  340.  
  341.  
  342. /*
  343.  * End of bindings for IDL types.
  344.  */
  345.  
  346. /*
  347.  * -- M_WPDevice is a metaclass for WPDevice. Make sure WPDevice is known.
  348.  */
  349. class WPDevice;
  350.  
  351.  
  352. /* A procedure to create the M_WPDevice Class */
  353. SOMEXTERN SOMClass * SOMLINK M_WPDeviceNewClass(
  354.         integer4 majorVersion,
  355.         integer4 minorVersion);
  356.  
  357. /* The API to the M_WPDevice class object, and the methods it introduces. */
  358. SOMEXTERN struct M_WPDeviceClassDataStructure {
  359.     SOMClass *classObject;
  360. } SOMDLINK M_WPDeviceClassData;
  361. #define _M_WPDevice M_WPDeviceClassData.classObject
  362.  
  363. /* The API to parentMtabs for M_WPDevice, and the instance data it introduces. */
  364. SOMEXTERN struct M_WPDeviceCClassDataStructure {
  365.     somMethodTabs parentMtab;
  366.     somDToken              instanceDataToken;
  367. } SOMDLINK M_WPDeviceCClassData;
  368.  
  369. /*
  370.  * -- Typedefs for M_WPDevice Method Procedures
  371.  */
  372. SOMEXTERN {
  373.  
  374. /*
  375.  * -- Typedefs for Reintroduced Wrapper Methods
  376.  */
  377. typedef WPDevice*   SOMLINK somTP_M_WPDevice_somNew(M_WPDevice *somSelf);
  378. typedef somTP_M_WPDevice_somNew *somTD_M_WPDevice_somNew;
  379. }
  380.  
  381. #endif /* M_WPDevice_API */
  382.  
  383.  
  384. /*
  385.  * -- This emitter treats Method Tokens as Thunks by default.
  386.  * -- Use the sc modifier "nothunks" to change this default
  387.  */
  388. #undef somresolve_
  389. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  390.  
  391. /*
  392.  * -- The C++ Wrapper Class for M_WPDevice
  393.  */
  394. class M_WPDevice : public M_WPTransient
  395. {
  396. public:
  397.  
  398. // M_WPDevice::new creates the class object if necessary, and then uses somNewNoInit
  399. // to allocate memory and create the object. Initialization is in ctors.
  400. void *operator new(size_t)
  401. {
  402.    if (!_M_WPDevice) M_WPDeviceNewClass(M_WPDevice_MajorVersion,M_WPDevice_MinorVersion);
  403.    return (void*)
  404.       SOM_Resolve(_M_WPDevice,SOMClass,somNewNoInit)
  405.          ((SOMClass *)((void*)_M_WPDevice));
  406. }
  407.  
  408. // M_WPDevice::delete uses somDestruct.
  409. void operator delete(void * obj)
  410. {
  411.    if (obj && *(void**)obj) {
  412.       SOM_Resolve(obj,SOMObject,somDestruct)
  413.          ((SOMObject*)obj, 1, 0);
  414.    }
  415. }
  416.  
  417. M_WPDevice& operator=(M_WPDevice& fromObj)
  418. {
  419.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  420.    return *this;
  421. }
  422.  
  423. M_WPDevice()
  424. {
  425.    if (*(void**)this != 
  426.        ((somParentMtabStructPtr)
  427.         (M_WPDeviceCClassData.parentMtab))->mtab)
  428.       return;
  429.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  430. }
  431.  
  432. M_WPDevice(M_WPDevice* fromObj)
  433. {
  434.    if (*(void**)this != 
  435.        ((somParentMtabStructPtr)
  436.         (M_WPDeviceCClassData.parentMtab))->mtab)
  437.       return;
  438.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  439. }
  440.  
  441. M_WPDevice(const M_WPDevice* fromObj)
  442. {
  443.    if (*(void**)this != 
  444.        ((somParentMtabStructPtr)
  445.         (M_WPDeviceCClassData.parentMtab))->mtab)
  446.       return;
  447.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  448. }
  449.  
  450.  
  451. /*
  452.  * Reintroduce inherited methods
  453.  */
  454.  
  455. /* method: somNew */
  456. WPDevice*  somNew()
  457. {
  458.    return SOM_ResolveD(this,M_WPDevice,SOMClass,somNew)
  459.     (this);
  460. }
  461.  
  462.  
  463.  
  464. };   /* M_WPDevice */
  465.  
  466.  
  467.  
  468. #endif       /* SOM_M_WPDevice_xh */
  469.