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

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: E:\cwpsh\rel\os2c\include\base\os2\wpdesk.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: WPDESK
  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_WPDesktop_xh
  23. #define SOM_WPDesktop_xh
  24.  
  25. class WPDesktop;
  26.  
  27. #define WPDesktop_MajorVersion 1
  28. #define WPDesktop_MinorVersion 2
  29.  
  30. /* C++ SOM defs */
  31. #include <somcls.xh>
  32. #include <somcm.xh>
  33.  
  34. /* C++ parent defs */
  35. #ifndef SOM_WPFolder_xh
  36. #include <wpfolder.xh>
  37. #endif
  38.  
  39. #ifndef WPDesktop_API
  40. #define WPDesktop_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_WPFileSystem;
  56. class M_WPFolder;
  57. class M_WPDesktop;
  58.  
  59. /*
  60.  * End of bindings for IDL types.
  61.  */
  62.  
  63. /* A procedure to create the WPDesktop Class */
  64. class M_WPDesktop;
  65. SOMEXTERN M_WPDesktop * SOMLINK WPDesktopNewClass(
  66.         integer4 majorVersion,
  67.         integer4 minorVersion);
  68.  
  69. /* The API to the WPDesktop class object, and the methods it introduces. */
  70. SOMEXTERN struct WPDesktopClassDataStructure {
  71.     M_WPDesktop *classObject;
  72.     somMToken wpIsCurrentDesktop;
  73.     somMToken wpAddDesktopLockup1Page;
  74.     somMToken wpAddDesktopLockup2Page;
  75.     somMToken wpAddDesktopLockup3Page;
  76.     somMToken wpAddDesktopArcRest1Page;
  77.     somMToken wpAddDesktopDefDT1Page;
  78.     somMToken wpQueryDefaultDropOp;
  79.     somMToken wpSetDefaultDropOp;
  80.     somMToken wpQueryAutoLockup;
  81.     somMToken wpSetAutoLockup;
  82.     somMToken wpQueryLockupTimeout;
  83.     somMToken wpSetLockupTimeout;
  84.     somMToken wpQueryLockupOnStartup;
  85.     somMToken wpSetLockupOnStartup;
  86.     somMToken wpQueryLockupFullScreen;
  87.     somMToken wpSetLockupFullScreen;
  88.     somMToken wpQueryLockupAutoDim;
  89.     somMToken wpSetLockupAutoDim;
  90.     somMToken wpQueryLockupBackground;
  91.     somMToken wpSetLockupBackground;
  92. } SOMDLINK WPDesktopClassData;
  93. #define _WPDesktop WPDesktopClassData.classObject
  94.  
  95. /* The API to parentMtabs for WPDesktop, and the instance data it introduces. */
  96. SOMEXTERN struct WPDesktopCClassDataStructure {
  97.     somMethodTabs parentMtab;
  98.     somDToken              instanceDataToken;
  99. } SOMDLINK WPDesktopCClassData;
  100.  
  101. /*
  102.  * -- Typedefs for WPDesktop Method Procedures
  103.  */
  104. SOMEXTERN {
  105. typedef BOOL   SOMLINK somTP_WPDesktop_wpIsCurrentDesktop(WPDesktop *somSelf);
  106. typedef somTP_WPDesktop_wpIsCurrentDesktop *somTD_WPDesktop_wpIsCurrentDesktop;
  107. typedef ULONG   SOMLINK somTP_WPDesktop_wpAddDesktopLockup1Page(WPDesktop *somSelf, 
  108.         HWND hwndNotebook);
  109. typedef somTP_WPDesktop_wpAddDesktopLockup1Page *somTD_WPDesktop_wpAddDesktopLockup1Page;
  110. typedef ULONG   SOMLINK somTP_WPDesktop_wpAddDesktopLockup2Page(WPDesktop *somSelf, 
  111.         HWND hwndNotebook);
  112. typedef somTP_WPDesktop_wpAddDesktopLockup2Page *somTD_WPDesktop_wpAddDesktopLockup2Page;
  113. typedef ULONG   SOMLINK somTP_WPDesktop_wpAddDesktopLockup3Page(WPDesktop *somSelf, 
  114.         HWND hwndNotebook);
  115. typedef somTP_WPDesktop_wpAddDesktopLockup3Page *somTD_WPDesktop_wpAddDesktopLockup3Page;
  116. typedef ULONG   SOMLINK somTP_WPDesktop_wpAddDesktopArcRest1Page(WPDesktop *somSelf, 
  117.         HWND hwndNotebook);
  118. typedef somTP_WPDesktop_wpAddDesktopArcRest1Page *somTD_WPDesktop_wpAddDesktopArcRest1Page;
  119. typedef ULONG   SOMLINK somTP_WPDesktop_wpAddDesktopDefDT1Page(WPDesktop *somSelf, 
  120.         HWND hwndNotebook);
  121. typedef somTP_WPDesktop_wpAddDesktopDefDT1Page *somTD_WPDesktop_wpAddDesktopDefDT1Page;
  122. typedef ULONG   SOMLINK somTP_WPDesktop_wpQueryDefaultDropOp(WPDesktop *somSelf);
  123. typedef somTP_WPDesktop_wpQueryDefaultDropOp *somTD_WPDesktop_wpQueryDefaultDropOp;
  124. typedef BOOL   SOMLINK somTP_WPDesktop_wpSetDefaultDropOp(WPDesktop *somSelf, 
  125.         ULONG ulDefaultDropOp);
  126. typedef somTP_WPDesktop_wpSetDefaultDropOp *somTD_WPDesktop_wpSetDefaultDropOp;
  127. typedef BOOL   SOMLINK somTP_WPDesktop_wpQueryAutoLockup(WPDesktop *somSelf);
  128. typedef somTP_WPDesktop_wpQueryAutoLockup *somTD_WPDesktop_wpQueryAutoLockup;
  129. typedef void   SOMLINK somTP_WPDesktop_wpSetAutoLockup(WPDesktop *somSelf, 
  130.         BOOL bAutoLockup);
  131. typedef somTP_WPDesktop_wpSetAutoLockup *somTD_WPDesktop_wpSetAutoLockup;
  132. typedef ULONG   SOMLINK somTP_WPDesktop_wpQueryLockupTimeout(WPDesktop *somSelf);
  133. typedef somTP_WPDesktop_wpQueryLockupTimeout *somTD_WPDesktop_wpQueryLockupTimeout;
  134. typedef void   SOMLINK somTP_WPDesktop_wpSetLockupTimeout(WPDesktop *somSelf, 
  135.         ULONG ulLockupTimeout);
  136. typedef somTP_WPDesktop_wpSetLockupTimeout *somTD_WPDesktop_wpSetLockupTimeout;
  137. typedef BOOL   SOMLINK somTP_WPDesktop_wpQueryLockupOnStartup(WPDesktop *somSelf);
  138. typedef somTP_WPDesktop_wpQueryLockupOnStartup *somTD_WPDesktop_wpQueryLockupOnStartup;
  139. typedef void   SOMLINK somTP_WPDesktop_wpSetLockupOnStartup(WPDesktop *somSelf, 
  140.         BOOL bLockupOnStartup);
  141. typedef somTP_WPDesktop_wpSetLockupOnStartup *somTD_WPDesktop_wpSetLockupOnStartup;
  142. typedef BOOL   SOMLINK somTP_WPDesktop_wpQueryLockupFullScreen(WPDesktop *somSelf);
  143. typedef somTP_WPDesktop_wpQueryLockupFullScreen *somTD_WPDesktop_wpQueryLockupFullScreen;
  144. typedef void   SOMLINK somTP_WPDesktop_wpSetLockupFullScreen(WPDesktop *somSelf, 
  145.         BOOL bLockupFullScreen);
  146. typedef somTP_WPDesktop_wpSetLockupFullScreen *somTD_WPDesktop_wpSetLockupFullScreen;
  147. typedef BOOL   SOMLINK somTP_WPDesktop_wpQueryLockupAutoDim(WPDesktop *somSelf);
  148. typedef somTP_WPDesktop_wpQueryLockupAutoDim *somTD_WPDesktop_wpQueryLockupAutoDim;
  149. typedef void   SOMLINK somTP_WPDesktop_wpSetLockupAutoDim(WPDesktop *somSelf, 
  150.         BOOL bLockupAutoDim);
  151. typedef somTP_WPDesktop_wpSetLockupAutoDim *somTD_WPDesktop_wpSetLockupAutoDim;
  152. typedef void   SOMLINK somTP_WPDesktop_wpQueryLockupBackground(WPDesktop *somSelf, 
  153.         PSZ* ppszImageFileName, 
  154.         ULONG* pulImageMode, 
  155.         ULONG* pulScaleFactor, 
  156.         ULONG* pulBackgroundType, 
  157.         long* plBackgroundColor);
  158. typedef somTP_WPDesktop_wpQueryLockupBackground *somTD_WPDesktop_wpQueryLockupBackground;
  159. typedef void   SOMLINK somTP_WPDesktop_wpSetLockupBackground(WPDesktop *somSelf, 
  160.         PSZ pszImageFileName, 
  161.         ULONG ulImageMode, 
  162.         ULONG ulScaleFactor, 
  163.         ULONG ulBackgroundType, 
  164.         long lBackgroundColor);
  165. typedef somTP_WPDesktop_wpSetLockupBackground *somTD_WPDesktop_wpSetLockupBackground;
  166.  
  167. /*
  168.  * -- Typedefs for Reintroduced Wrapper Methods
  169.  */
  170. typedef M_WPDesktop*   SOMLINK somTP_WPDesktop_somGetClass(WPDesktop *somSelf);
  171. typedef somTP_WPDesktop_somGetClass *somTD_WPDesktop_somGetClass;
  172. }
  173.  
  174. #endif /* WPDesktop_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 WPDesktop
  186.  */
  187. class WPDesktop : public WPFolder
  188. {
  189. public:
  190.  
  191. // WPDesktop::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 (!_WPDesktop) WPDesktopNewClass(WPDesktop_MajorVersion,WPDesktop_MinorVersion);
  196.    return (void*)
  197.       SOM_Resolve(_WPDesktop,SOMClass,somNewNoInit)
  198.          ((SOMClass *)((void*)_WPDesktop));
  199. }
  200.  
  201. // WPDesktop::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. WPDesktop& operator=(WPDesktop& fromObj)
  211. {
  212.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  213.    return *this;
  214. }
  215.  
  216. WPDesktop()
  217. {
  218.    if (*(void**)this != 
  219.        ((somParentMtabStructPtr)
  220.         (WPDesktopCClassData.parentMtab))->mtab)
  221.       return;
  222.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  223. }
  224.  
  225. WPDesktop(WPDesktop* fromObj)
  226. {
  227.    if (*(void**)this != 
  228.        ((somParentMtabStructPtr)
  229.         (WPDesktopCClassData.parentMtab))->mtab)
  230.       return;
  231.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  232. }
  233.  
  234. WPDesktop(const WPDesktop* fromObj)
  235. {
  236.    if (*(void**)this != 
  237.        ((somParentMtabStructPtr)
  238.         (WPDesktopCClassData.parentMtab))->mtab)
  239.       return;
  240.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  241. }
  242.  
  243.  
  244. /* method: wpIsCurrentDesktop */
  245. BOOL   wpIsCurrentDesktop()
  246. {
  247.    return SOM_ResolveD(this,WPDesktop,WPDesktop,wpIsCurrentDesktop)
  248.     (this);
  249. }
  250.  
  251.  
  252. /* method: wpAddDesktopLockup1Page */
  253. ULONG   wpAddDesktopLockup1Page(HWND hwndNotebook)
  254. {
  255.    return SOM_ResolveD(this,WPDesktop,WPDesktop,wpAddDesktopLockup1Page)
  256.     (this,hwndNotebook);
  257. }
  258.  
  259.  
  260. /* method: wpAddDesktopLockup2Page */
  261. ULONG   wpAddDesktopLockup2Page(HWND hwndNotebook)
  262. {
  263.    return SOM_ResolveD(this,WPDesktop,WPDesktop,wpAddDesktopLockup2Page)
  264.     (this,hwndNotebook);
  265. }
  266.  
  267.  
  268. /* method: wpAddDesktopLockup3Page */
  269. ULONG   wpAddDesktopLockup3Page(HWND hwndNotebook)
  270. {
  271.    return SOM_ResolveD(this,WPDesktop,WPDesktop,wpAddDesktopLockup3Page)
  272.     (this,hwndNotebook);
  273. }
  274.  
  275.  
  276. /* method: wpAddDesktopArcRest1Page */
  277. ULONG   wpAddDesktopArcRest1Page(HWND hwndNotebook)
  278. {
  279.    return SOM_ResolveD(this,WPDesktop,WPDesktop,wpAddDesktopArcRest1Page)
  280.     (this,hwndNotebook);
  281. }
  282.  
  283.  
  284. /* method: wpAddDesktopDefDT1Page */
  285. ULONG   wpAddDesktopDefDT1Page(HWND hwndNotebook)
  286. {
  287.    return SOM_ResolveD(this,WPDesktop,WPDesktop,wpAddDesktopDefDT1Page)
  288.     (this,hwndNotebook);
  289. }
  290.  
  291.  
  292. /* method: wpQueryDefaultDropOp */
  293. ULONG   wpQueryDefaultDropOp()
  294. {
  295.    return SOM_ResolveD(this,WPDesktop,WPDesktop,wpQueryDefaultDropOp)
  296.     (this);
  297. }
  298.  
  299.  
  300. /* method: wpSetDefaultDropOp */
  301. BOOL   wpSetDefaultDropOp(ULONG ulDefaultDropOp)
  302. {
  303.    return SOM_ResolveD(this,WPDesktop,WPDesktop,wpSetDefaultDropOp)
  304.     (this,ulDefaultDropOp);
  305. }
  306.  
  307.  
  308. /* method: wpQueryAutoLockup */
  309. BOOL   wpQueryAutoLockup()
  310. {
  311.    return SOM_ResolveD(this,WPDesktop,WPDesktop,wpQueryAutoLockup)
  312.     (this);
  313. }
  314.  
  315.  
  316. /* method: wpSetAutoLockup */
  317. void   wpSetAutoLockup(BOOL bAutoLockup)
  318. {
  319.    SOM_ResolveD(this,WPDesktop,WPDesktop,wpSetAutoLockup)
  320.     (this,bAutoLockup);
  321. }
  322.  
  323.  
  324. /* method: wpQueryLockupTimeout */
  325. ULONG   wpQueryLockupTimeout()
  326. {
  327.    return SOM_ResolveD(this,WPDesktop,WPDesktop,wpQueryLockupTimeout)
  328.     (this);
  329. }
  330.  
  331.  
  332. /* method: wpSetLockupTimeout */
  333. void   wpSetLockupTimeout(ULONG ulLockupTimeout)
  334. {
  335.    SOM_ResolveD(this,WPDesktop,WPDesktop,wpSetLockupTimeout)
  336.     (this,ulLockupTimeout);
  337. }
  338.  
  339.  
  340. /* method: wpQueryLockupOnStartup */
  341. BOOL   wpQueryLockupOnStartup()
  342. {
  343.    return SOM_ResolveD(this,WPDesktop,WPDesktop,wpQueryLockupOnStartup)
  344.     (this);
  345. }
  346.  
  347.  
  348. /* method: wpSetLockupOnStartup */
  349. void   wpSetLockupOnStartup(BOOL bLockupOnStartup)
  350. {
  351.    SOM_ResolveD(this,WPDesktop,WPDesktop,wpSetLockupOnStartup)
  352.     (this,bLockupOnStartup);
  353. }
  354.  
  355.  
  356. /* method: wpQueryLockupFullScreen */
  357. BOOL   wpQueryLockupFullScreen()
  358. {
  359.    return SOM_ResolveD(this,WPDesktop,WPDesktop,wpQueryLockupFullScreen)
  360.     (this);
  361. }
  362.  
  363.  
  364. /* method: wpSetLockupFullScreen */
  365. void   wpSetLockupFullScreen(BOOL bLockupFullScreen)
  366. {
  367.    SOM_ResolveD(this,WPDesktop,WPDesktop,wpSetLockupFullScreen)
  368.     (this,bLockupFullScreen);
  369. }
  370.  
  371.  
  372. /* method: wpQueryLockupAutoDim */
  373. BOOL   wpQueryLockupAutoDim()
  374. {
  375.    return SOM_ResolveD(this,WPDesktop,WPDesktop,wpQueryLockupAutoDim)
  376.     (this);
  377. }
  378.  
  379.  
  380. /* method: wpSetLockupAutoDim */
  381. void   wpSetLockupAutoDim(BOOL bLockupAutoDim)
  382. {
  383.    SOM_ResolveD(this,WPDesktop,WPDesktop,wpSetLockupAutoDim)
  384.     (this,bLockupAutoDim);
  385. }
  386.  
  387.  
  388. /* method: wpQueryLockupBackground */
  389. void   wpQueryLockupBackground(PSZ* ppszImageFileName, 
  390.         ULONG* pulImageMode, 
  391.         ULONG* pulScaleFactor, 
  392.         ULONG* pulBackgroundType, 
  393.         long* plBackgroundColor)
  394. {
  395.    SOM_ResolveD(this,WPDesktop,WPDesktop,wpQueryLockupBackground)
  396.     (this,ppszImageFileName,pulImageMode,pulScaleFactor,pulBackgroundType,plBackgroundColor);
  397. }
  398.  
  399.  
  400. /* method: wpSetLockupBackground */
  401. void   wpSetLockupBackground(PSZ pszImageFileName, 
  402.         ULONG ulImageMode, 
  403.         ULONG ulScaleFactor, 
  404.         ULONG ulBackgroundType, 
  405.         long lBackgroundColor)
  406. {
  407.    SOM_ResolveD(this,WPDesktop,WPDesktop,wpSetLockupBackground)
  408.     (this,pszImageFileName,ulImageMode,ulScaleFactor,ulBackgroundType,lBackgroundColor);
  409. }
  410.  
  411.  
  412. /*
  413.  * Reintroduce inherited methods
  414.  */
  415.  
  416. /* method: somGetClass */
  417. M_WPDesktop*  somGetClass()
  418. {
  419. /*
  420.  *  Return the receiver's class.
  421.  */
  422.    return SOM_ResolveD(this,WPDesktop,SOMObject,somGetClass)
  423.     (this);
  424. }
  425.  
  426.  
  427.  
  428. };   /* WPDesktop */
  429.  
  430.  
  431.  
  432. #endif       /* SOM_WPDesktop_xh */
  433.  
  434. #ifndef SOM_M_WPDesktop_xh
  435. #define SOM_M_WPDesktop_xh
  436.  
  437. class M_WPDesktop;
  438.  
  439. #define M_WPDesktop_MajorVersion 1
  440. #define M_WPDesktop_MinorVersion 2
  441.  
  442. /* C++ SOM defs */
  443. #include <somcls.xh>
  444. #include <somcm.xh>
  445.  
  446. /* C++ parent defs */
  447. #ifndef SOM_M_WPFolder_xh
  448. #include <wpfolder.xh>
  449. #endif
  450.  
  451. #ifndef M_WPDesktop_API
  452. #define M_WPDesktop_API
  453. /*
  454.  * -- The Class API
  455.  */
  456.  
  457. /*
  458.  * Start of bindings for IDL types
  459.  */
  460.  
  461.  
  462. /*
  463.  * End of bindings for IDL types.
  464.  */
  465.  
  466. /*
  467.  * -- M_WPDesktop is a metaclass for WPDesktop. Make sure WPDesktop is known.
  468.  */
  469. class WPDesktop;
  470.  
  471.  
  472. /* A procedure to create the M_WPDesktop Class */
  473. SOMEXTERN SOMClass * SOMLINK M_WPDesktopNewClass(
  474.         integer4 majorVersion,
  475.         integer4 minorVersion);
  476.  
  477. /* The API to the M_WPDesktop class object, and the methods it introduces. */
  478. SOMEXTERN struct M_WPDesktopClassDataStructure {
  479.     SOMClass *classObject;
  480.     somMToken wpclsQueryObjectFromFrame;
  481.     somMToken wpclsQueryActiveDesktop;
  482.     somMToken wpclsQueryActiveDesktopHWND;
  483. } SOMDLINK M_WPDesktopClassData;
  484. #define _M_WPDesktop M_WPDesktopClassData.classObject
  485.  
  486. /* The API to parentMtabs for M_WPDesktop, and the instance data it introduces. */
  487. SOMEXTERN struct M_WPDesktopCClassDataStructure {
  488.     somMethodTabs parentMtab;
  489.     somDToken              instanceDataToken;
  490. } SOMDLINK M_WPDesktopCClassData;
  491.  
  492. /*
  493.  * -- Typedefs for M_WPDesktop Method Procedures
  494.  */
  495. SOMEXTERN {
  496. typedef WPObject*   SOMLINK somTP_M_WPDesktop_wpclsQueryObjectFromFrame(M_WPDesktop *somSelf, 
  497.         HWND hwndFrame);
  498. typedef somTP_M_WPDesktop_wpclsQueryObjectFromFrame *somTD_M_WPDesktop_wpclsQueryObjectFromFrame;
  499. typedef HWND   SOMLINK somTP_M_WPDesktop_wpclsQueryActiveDesktopHWND(M_WPDesktop *somSelf);
  500. typedef somTP_M_WPDesktop_wpclsQueryActiveDesktopHWND *somTD_M_WPDesktop_wpclsQueryActiveDesktopHWND;
  501. typedef WPObject*   SOMLINK somTP_M_WPDesktop_wpclsQueryActiveDesktop(M_WPDesktop *somSelf);
  502. typedef somTP_M_WPDesktop_wpclsQueryActiveDesktop *somTD_M_WPDesktop_wpclsQueryActiveDesktop;
  503.  
  504. /*
  505.  * -- Typedefs for Reintroduced Wrapper Methods
  506.  */
  507. typedef WPDesktop*   SOMLINK somTP_M_WPDesktop_somNew(M_WPDesktop *somSelf);
  508. typedef somTP_M_WPDesktop_somNew *somTD_M_WPDesktop_somNew;
  509. }
  510.  
  511. #endif /* M_WPDesktop_API */
  512.  
  513.  
  514. /*
  515.  * -- This emitter treats Method Tokens as Thunks by default.
  516.  * -- Use the sc modifier "nothunks" to change this default
  517.  */
  518. #undef somresolve_
  519. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  520.  
  521. /*
  522.  * -- The C++ Wrapper Class for M_WPDesktop
  523.  */
  524. class M_WPDesktop : public M_WPFolder
  525. {
  526. public:
  527.  
  528. // M_WPDesktop::new creates the class object if necessary, and then uses somNewNoInit
  529. // to allocate memory and create the object. Initialization is in ctors.
  530. void *operator new(size_t)
  531. {
  532.    if (!_M_WPDesktop) M_WPDesktopNewClass(M_WPDesktop_MajorVersion,M_WPDesktop_MinorVersion);
  533.    return (void*)
  534.       SOM_Resolve(_M_WPDesktop,SOMClass,somNewNoInit)
  535.          ((SOMClass *)((void*)_M_WPDesktop));
  536. }
  537.  
  538. // M_WPDesktop::delete uses somDestruct.
  539. void operator delete(void * obj)
  540. {
  541.    if (obj && *(void**)obj) {
  542.       SOM_Resolve(obj,SOMObject,somDestruct)
  543.          ((SOMObject*)obj, 1, 0);
  544.    }
  545. }
  546.  
  547. M_WPDesktop& operator=(M_WPDesktop& fromObj)
  548. {
  549.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  550.    return *this;
  551. }
  552.  
  553. M_WPDesktop()
  554. {
  555.    if (*(void**)this != 
  556.        ((somParentMtabStructPtr)
  557.         (M_WPDesktopCClassData.parentMtab))->mtab)
  558.       return;
  559.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  560. }
  561.  
  562. M_WPDesktop(M_WPDesktop* fromObj)
  563. {
  564.    if (*(void**)this != 
  565.        ((somParentMtabStructPtr)
  566.         (M_WPDesktopCClassData.parentMtab))->mtab)
  567.       return;
  568.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  569. }
  570.  
  571. M_WPDesktop(const M_WPDesktop* fromObj)
  572. {
  573.    if (*(void**)this != 
  574.        ((somParentMtabStructPtr)
  575.         (M_WPDesktopCClassData.parentMtab))->mtab)
  576.       return;
  577.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  578. }
  579.  
  580.  
  581. /* method: wpclsQueryObjectFromFrame */
  582. WPObject*   wpclsQueryObjectFromFrame(HWND hwndFrame)
  583. {
  584.    return SOM_ResolveD(this,M_WPDesktop,M_WPDesktop,wpclsQueryObjectFromFrame)
  585.     (this,hwndFrame);
  586. }
  587.  
  588.  
  589. /* method: wpclsQueryActiveDesktopHWND */
  590. HWND   wpclsQueryActiveDesktopHWND()
  591. {
  592.    return SOM_ResolveD(this,M_WPDesktop,M_WPDesktop,wpclsQueryActiveDesktopHWND)
  593.     (this);
  594. }
  595.  
  596.  
  597. /* method: wpclsQueryActiveDesktop */
  598. WPObject*   wpclsQueryActiveDesktop()
  599. {
  600.    return SOM_ResolveD(this,M_WPDesktop,M_WPDesktop,wpclsQueryActiveDesktop)
  601.     (this);
  602. }
  603.  
  604.  
  605. /*
  606.  * Reintroduce inherited methods
  607.  */
  608.  
  609. /* method: somNew */
  610. WPDesktop*  somNew()
  611. {
  612.    return SOM_ResolveD(this,M_WPDesktop,SOMClass,somNew)
  613.     (this);
  614. }
  615.  
  616.  
  617.  
  618. };   /* M_WPDesktop */
  619.  
  620.  
  621.  
  622. #endif       /* SOM_M_WPDesktop_xh */
  623.