home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v1.zip / IBMCPP / IBMCLASS / IHANDLE.HPP < prev    next >
C/C++ Source or Header  |  1993-10-22  |  32KB  |  611 lines

  1. #ifndef _IHANDLE_
  2. #define _IHANDLE_
  3. /*******************************************************************************
  4. * FILE NAME: ihandle.hpp                                                       *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   This file contains the declaration(s) of the class(es):                    *
  8. *     IHandle              - Generic "handle" base class.                      *            *
  9. *     IWindowHandle        - Window handle (PM type HWND).                     *
  10. *     IAnchorBlockHandle   - Anchor block handle (PM type HAB).                *
  11. *     IModuleHandle        - Module handle (OS/2 type HMODULE).                *
  12. *     IPointerHandle       - Pointer handle (PM type HPOINTER).                *
  13. *     IStringHandle        - String handle (PM type HSTR).                     *
  14. *     ISemaphoreHandle     - Semaphore handle (OS/2 type HSEM).                *
  15. *     IPresSpaceHandle     - Presentation space handle (PM type HPS).          *
  16. *     IBitmapHandle        - Bit-map handle (PM type HBITMAP).                 *
  17. *     IProfileHandle       - Profile file handle (PM type HINI).               *
  18. *     IMessageQueueHandle  - Message queue handle (PM type HMQ).               *
  19. *     IAccelTblHandle      - Accelerator table handle (PM type HACCEL).        *
  20. *     ISystemPointerHandle - For predefined system icons.                      *
  21. *     ISystemBitmapHandle  - For predefined system bit maps.                   *
  22. *     IThreadId            - Thread ID (OS/2 type TID).                        *
  23. *     IProcessId           - Process ID (OS/2 type PID).                       *
  24. *     IEnumHandle          - Window enumeration handle (PM type HENUM)         *
  25. *                                                                              *
  26. * COPYRIGHT:                                                                   *
  27. *   Licensed Materials - Property of IBM                                       *
  28. *   (C) Copyright IBM Corporation 1992, 1993                                   *
  29. *   All Rights Reserved                                                        *
  30. *   US Government Users Restricted Rights - Use, duplication, or               *
  31. *   disclosure                                                                 *
  32. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  33. *                                                                              *
  34. *******************************************************************************/
  35. #ifndef _IBASE_
  36.   #include <ibase.hpp>
  37. #endif
  38.  
  39. #ifndef _IEVTDATA_
  40.   #include <ievtdata.hpp>
  41. #endif
  42.  
  43. /*----------------------------------------------------------------------------*/
  44. /* Align classes on four byte boundary.                                       */
  45. /*----------------------------------------------------------------------------*/
  46. #pragma pack(4)
  47.  
  48. class ostream;
  49. class IString;
  50.  
  51. class IHandle : public IBase {
  52. typedef IBase
  53.   Inherited;
  54. /*******************************************************************************
  55. * The IHandle class is an abstract base class for all the concrete handle      *
  56. * subclasses.  Instances of this class can be created, although the utility    *
  57. * of such objects is limited.  The User Interface Class Library APIs all       *
  58. * specify certain IHandle subclasses.                                          *
  59. *                                                                              *
  60. * The advantage of providing separate classes for each handle type is that     *
  61. * they become distinct enough to prevent a user from passing the wrong handle  *
  62. * type to a given function.                                                    *
  63. *                                                                              *
  64. * This base class manages the unsigned long handle data member by:             *
  65. *                                                                              *
  66. *    - Defining a constructor that accepts an unsigned long and storing the    *
  67. *      handle in the handle field.                                             *
  68. *                                                                              *
  69. *    - Defining a user conversion operator as type IHandle.  This operator     *
  70. *      permits IHandle instances to be used anywhere an IHandle is required    *
  71. *      (typically on OS/2 and Presentation Manager system APIs).               *
  72. *                                                                              *
  73. * There are numerous subclasses of IHandle to represent each of the supported  *
  74. * system handle types.                                                         *
  75. *******************************************************************************/
  76. protected:
  77. /*------------------------------ Related Types ---------------------------------
  78. | Value - This typedef defines the type of the value held by objects of this   |
  79. |         class.                                                               |
  80. ------------------------------------------------------------------------------*/
  81. typedef unsigned long
  82.   Value;
  83.  
  84. public:
  85. /*------------------------------- Constructor ----------------------------------
  86. | The constructor accepts an IHandle type value as an argument.  Typically,    |
  87. | this value originates in an OS/2 system API call.                            |
  88. ------------------------------------------------------------------------------*/
  89. IHandle( Value value );
  90.  
  91. /*-------------------------------- Accessors -----------------------------------
  92. | The following functions provide means of getting and setting the accessible  |
  93. | attributes of instances of this class:                                       |
  94. |   operator Value - Returns the handle value as a type.                       |
  95. |   asString       - Returns the handle as a string of form "nnnn".            |
  96. |   asDebugInfo    - Returns the handle as a string that contains diagnostic   |
  97. |                    information.                                              |
  98. |   operator <<    - Applied to an object of type ostream to permit            |
  99. |                    displaying objects of this class.                         |
  100. ------------------------------------------------------------------------------*/
  101.   operator Value ( ) const;
  102.  
  103. IString
  104.   asString    ( ) const,
  105.   asDebugInfo ( ) const;
  106.  
  107. friend ostream
  108.  &operator << ( ostream &aStream, const IHandle &aHandle );
  109.  
  110. protected:
  111. /*---------------------------------- Value -------------------------------------
  112. | This function is used to hold a value:                                       |
  113. |   handle - Holds the handle value.                                           |
  114. ------------------------------------------------------------------------------*/
  115. Value
  116.   handle;
  117. }; // class IHandle
  118.  
  119. class IWindowHandle : public IHandle {
  120. typedef IHandle
  121.   Inherited;
  122. /*******************************************************************************
  123. * Use instances of the IWindowHandle class to access windows.                  *
  124. *                                                                              *
  125. * IWindowHandle is an alias for the Presentation Manager Toolkit type HWND.    *
  126. *******************************************************************************/
  127. public:
  128. /*------------------------------- Constructor ----------------------------------
  129. | Objects of this class are constructed from a window handle (a value of       |
  130. | type IHandle::Value), defaulting to 0.                                       |
  131. ------------------------------------------------------------------------------*/
  132.   IWindowHandle ( Value hwnd = 0 );
  133.  
  134. /*--------------------------------- Testing ------------------------------------
  135. | This function is used to test the window handle:                             |
  136. |   isValid - Returns true if the window handle is valid.                      |
  137. ------------------------------------------------------------------------------*/
  138. Boolean
  139.   isValid ( ) const;
  140.  
  141. /*-------------------------- Related Types -------------------------------------
  142. | The following enumeration is defined:                                        |
  143. |   BroadcastTo - Enumeration that posts and sends event broadcasting          |
  144. |                 attributes.  The valid values are:                           |
  145. |                   descendants      - Broadcasts the event to all the         |
  146. |                                      descendants of this window handle.      |
  147. |                   frames           - Broadcasts the event to frame windows   |
  148. |                                      only.                                   |
  149. |                   frameDescendants - Broadcasts the event to all the frame   |
  150. |                                      window descendants of this window       |
  151. |                                      handle.                                 |
  152. ------------------------------------------------------------------------------*/
  153. enum BroadcastTo { descendants, frames, frameDescendants };
  154.  
  155. /*----------------------------- Send/Post Event --------------------------------
  156. | These functions provide a simplified means of sending or posting an event    |
  157. | to a window handle or handles.                                               |
  158. |   sendEvent  - Sends an event constructed from the arguments to the window   |
  159. |                identified by this handle.                                    |
  160. |   sendEvents - Broadcasts one event to multiple windows.                     |
  161. |   postEvent  - Posts an event constructed from the arguments to the window   |
  162. |                identified by this handle.                                    |
  163. |   postEvents - Posts one event to multiple windows.                          |
  164. ------------------------------------------------------------------------------*/
  165. IEventResult
  166.   sendEvent  ( unsigned long           eventId,
  167.                const IEventParameter1 &parm1 = 0ul,
  168.                const IEventParameter2 &parm2 = 0ul ) const;
  169.  
  170. void
  171.   sendEvents ( unsigned long           eventId,
  172.                const IEventParameter1 &parm1 = 0ul,
  173.                const IEventParameter2 &parm2 = 0ul,
  174.                BroadcastTo             value = descendants ) const;
  175.  
  176. void
  177.   postEvent  ( unsigned long           eventId,
  178.                const IEventParameter1 &parm1 = 0ul,
  179.                const IEventParameter2 &parm2 = 0ul ) const,
  180.  
  181.   postEvents ( unsigned long           eventId,
  182.                const IEventParameter1 &parm1 = 0ul,
  183.                const IEventParameter2 &parm2 = 0ul,
  184.                BroadcastTo             value = descendants ) const;
  185.  
  186. }; // class IWindowHandle
  187.  
  188. class IAnchorBlockHandle : public IHandle {
  189. typedef IHandle
  190.   Inherited;
  191. /*******************************************************************************
  192. * Use instances of the IAnchorBlockHandle class to allow the system to access
  193. * an application's thread-specific data.
  194. *
  195. * IAnchorBlockHandle is an alias for the Presentation Manager Toolkit type
  196. * HAB.
  197. *******************************************************************************/
  198. public:
  199. /*------------------------------- Constructor ----------------------------------
  200. | You can construct objects of this class from an anchor block handle          |
  201. | (a value of type IHandle::Value), defaulting to 0.                           |
  202. ------------------------------------------------------------------------------*/
  203.   IAnchorBlockHandle ( Value hab = 0 );
  204.  
  205. }; // class IAnchorBlockHandle
  206.  
  207.  
  208.  
  209. class IModuleHandle : public IHandle {
  210. typedef IHandle
  211.   Inherited;
  212. /*******************************************************************************
  213. * Use instances of the IModuleHandle class to access application modules.      *
  214. *                                                                              *
  215. * IModuleHandle is an alias for the Presentation Manager Toolkit type HMODULE. *
  216. *******************************************************************************/
  217. public:
  218. /*------------------------------- Constructor ----------------------------------
  219. | Objects of this class are constructed from a module handle (a value of type  |
  220. | IHandle::Value), defaulting to 0.                                            |
  221. ------------------------------------------------------------------------------*/
  222.   IModuleHandle ( Value hmod = 0 );
  223.  
  224. }; // class IModuleHandle
  225.  
  226.  
  227.  
  228. class IPointerHandle : public IHandle {
  229. typedef IHandle
  230.   Inherited;
  231. /*******************************************************************************
  232. * Use instances of the IPointerHandle class to access and manage pointer       *
  233. * resources for a pointing device, such as a mouse.  IPointerHandle objects    *
  234. * manage pointer resources through reference counting.  Reference counting     *
  235. * allows one bit map (a pointer is a type of bit map) to be used in multiple   *
  236. * places, and the lifetime of this bit map is maintained until all users are   *
  237. * finished with it.                                                            *
  238. *                                                                              *
  239. * IPointerHandle is an alias for the Presentation Manager Toolkit type         *
  240. * HPOINTER.                                                                    *
  241. *******************************************************************************/
  242. public:
  243. /*------------------------- Constructors/Destructor ----------------------------
  244. | Objects of this class are constructed from a pointer handle (a value of      |
  245. | type IHandle::Value), defaulting to 0.  The class also provides a copy       |
  246. | constructor and destructor in order to track references to the associated    |
  247. | pointer resource.                                                            |
  248. ------------------------------------------------------------------------------*/
  249.   IPointerHandle ( Value                 hpointer = 0 );
  250.   IPointerHandle ( const IPointerHandle &aHandle );
  251.   ~IPointerHandle ( );
  252. /*-------------------------------- Assignment ----------------------------------
  253. | This operator is used for assignment:                                        |
  254. |   operator = - Assigns the value of one pointer handle to another.           |
  255. ------------------------------------------------------------------------------*/
  256. IPointerHandle
  257.  &operator = ( const IPointerHandle &aHandle );
  258.  
  259. }; // class IPointerHandle
  260.  
  261. class ISystemPointerHandle : public IPointerHandle {
  262. typedef IHandle
  263.   Inherited;
  264. /*******************************************************************************
  265. * Use instances of the ISystemPointerHandle class to access system pointer     *
  266. * resources.  A system pointer is a special type of pointer that is not        *
  267. * loaded from a resource file.                                                 *
  268. *******************************************************************************/
  269. public:
  270. /*------------------------ System Pointer Identifiers --------------------------
  271. | The following enumeration identifies system pointers:                        |
  272. |   Identifier - Enumeration that specifies identifiers for the various        |
  273. |                system pointers.                                              |
  274. ------------------------------------------------------------------------------*/
  275. enum Identifier
  276.   {
  277.   arrow,
  278.   text,
  279.   wait,
  280.   move,
  281.   sizeNWSE,
  282.   sizeNESW,
  283.   sizeHorizontal,
  284.   sizeVertical,
  285.   standardApplication,
  286.   information,
  287.   question,
  288.   error,
  289.   warning,
  290.   illegalOperation,
  291.   singleFile,
  292.   multipleFile,
  293.   folder,
  294.   program,
  295.   dragFade
  296.   };
  297.  
  298. /*------------------------------- Constructor ----------------------------------
  299. | The constructor for this class requires the identifier for the desired       |
  300. | system pointer.  These are defined by the Identifier enumeration.            |
  301. |                                                                              |
  302. | The constructor also accepts an optional Boolean flag that specifies         |
  303. | whether a copy of the system pointer is to be made.  Specify makeCopy=true   |
  304. | if the pointer is to be modified.  The default is makeCopy=false.            |
  305. ------------------------------------------------------------------------------*/
  306.   ISystemPointerHandle ( Identifier pointerId,
  307.                          Boolean    makeCopy = false );
  308.  ~ISystemPointerHandle ( );
  309.  
  310. }; // class ISysPointerHandle
  311.  
  312. class IStringHandle : public IHandle {
  313. typedef IHandle
  314.   Inherited;
  315. /*******************************************************************************
  316. * Use instances of the IStringHandle class to access a string.                 *
  317. *                                                                              *
  318. * IStringHandle is an alias for the Presentation Manager Toolkit type HSTR.    *
  319. *******************************************************************************/
  320. public:
  321. /*------------------------------- Constructor ----------------------------------
  322. | Objects of this class are constructed from a HSTR (a value of                |
  323. | type IHandle::Value), defaulting to 0.                                       |
  324. ------------------------------------------------------------------------------*/
  325.   IStringHandle ( Value hstr = 0 );
  326.  
  327. }; // class IStringHandle
  328.  
  329.  
  330.  
  331. class ISemaphoreHandle : public IHandle {
  332. typedef IHandle
  333.   Inherited;
  334. /*******************************************************************************
  335. * Use instances of the ISemaphoreHandle class to access semaphores.  An        *
  336. * example of a semaphore is a flag in a multi-user application that prevents   *
  337. * simultaneous access to a file.                                               *
  338. *                                                                              *
  339. * ISemaphoreHandle is an alias for the Presentation Manager Toolkit type HSEM. *
  340. *******************************************************************************/
  341. public:
  342. /*------------------------------- Constructor ----------------------------------
  343. | Objects of this class are constructed from a semaphore handle (a value of    |
  344. | type IHandle::Value), defaulting to 0.                                       |
  345. ------------------------------------------------------------------------------*/
  346.   ISemaphoreHandle ( Value hsem = 0 );
  347.  
  348. }; // class ISemaphoreHandle
  349.  
  350. class IPresSpaceHandle : public IHandle {
  351. typedef IHandle
  352.   Inherited;
  353. /*******************************************************************************
  354. * Use instances of the IPresSpaceHandle class to access a presentation space.  *
  355. *                                                                              *
  356. * IPresSpaceHandle is an alias for the Presentation Manger Toolkit type HPS.   *
  357. *******************************************************************************/
  358. public:
  359. /*------------------------------- Constructor ----------------------------------
  360. | Objects of this class are constructed from a presentation space handle       |
  361. | (a value of type IHandle::Value), defaulting to 0.                           |
  362. ------------------------------------------------------------------------------*/
  363.   IPresSpaceHandle ( Value hps = 0 );
  364.  
  365. }; // class IPresSpaceHandle
  366.  
  367. class IBitmapHandle : public IHandle {
  368. typedef IHandle
  369.   Inherited;
  370. /*******************************************************************************
  371. * Use instances of the IBitmapHandle class to access and manage bit-map        *
  372. * resources.  IBitmapHandle objects manage bit-map resources through           *
  373. * reference counting.  Reference counting allows one bit map to be used in     *
  374. * multiple places, and the lifetime of this bit map is maintained until all    *
  375. * users are finished with it.                                                  *
  376. *                                                                              *
  377. * IBitmapHandle is an alias for the Presentation Manager Toolkit type HBITMAP. *
  378. *******************************************************************************/
  379. public:
  380. /*------------------------- Constructors/Destructor ---------------------------
  381. | You can construct objects of this class from either a bit-map handle         |
  382. | (a value of type IHandle::Value) or an existing IBitmapHandle object.        |
  383. |                                                                              |
  384. | The copy constructor, destructor, and assignment operator are provided in    |
  385. | order to keep track of references to the bit map so that its resources can   |
  386. | be freed when no longer needed.                                              |
  387. ------------------------------------------------------------------------------*/
  388.   IBitmapHandle ( Value value = 0 );
  389.   IBitmapHandle ( const IBitmapHandle &aHandle);
  390.   ~IBitmapHandle ( );
  391.  
  392. /*-------------------------------- Assignment ----------------------------------
  393. | This function is used for assignment:                                        |
  394. |   operator = - Assigns the value of one bit-map handle to another while      |
  395. |                managing the references to the two handles.  If the reference |
  396. |                count of the bit map previously associated with the target    |
  397. |                handle reaches zero, the bit map is destroyed.
  398. ------------------------------------------------------------------------------*/
  399. IBitmapHandle
  400.  &operator = ( const IBitmapHandle &handle );
  401.  
  402. }; // class IBitmapHandle
  403.  
  404. class ISystemBitmapHandle : public IBitmapHandle {
  405. typedef IBitmapHandle
  406.   Inherited;
  407. /*******************************************************************************
  408. * Use instances of the ISystemBitmapHandle class to access system bit-map      *
  409. * resources.  A system bit map is a special type of bit map that is not        *
  410. * loaded from a resource file.                                                 *
  411. *******************************************************************************/
  412. public:
  413. /*------------------------ System Bit Map Identifiers --------------------------
  414. | This enumeration is used to identify system bit-map resources:               |
  415. |   Identifier - Enumeration that defines identifiers for each of the system   |
  416. |                bit-map resources.                                            |
  417. ------------------------------------------------------------------------------*/
  418. enum Identifier
  419.   {
  420.   systemMenu,
  421.   systemMenuPressed,
  422.   scrollBarUpArrow,
  423.   scrollBarUpArrowPressed,
  424.   scrollBarUpArrowDisabled,
  425.   scrollBarDownArrow,
  426.   scrollBarDownArrowPressed,
  427.   scrollBarDownArrowDisabled,
  428.   scrollBarRightArrow,
  429.   scrollBarRightArrowPressed,
  430.   scrollBarRightArrowDisabled,
  431.   scrollBarLeftArrow,
  432.   scrollBarLeftArrowPressed,
  433.   scrollBarLeftArrowDisabled,
  434.   menuCheckMark,
  435.   menuAttached,
  436.   checkBoxCheck,
  437.   comboBoxDownArrow,
  438.   pushButtonCorners,
  439.   minimizeButton,
  440.   minimizeButtonPressed,
  441.   maximizeButton,
  442.   maximizeButtonPressed,
  443.   restoreButton,
  444.   restoreButtonPressed,
  445.   childSystemMenu,
  446.   childSystemMenuPressed,
  447.   drive,
  448.   file,
  449.   folder,
  450.   collapsedTree,
  451.   expandedTree,
  452.   program,
  453.   sizeBox
  454.   };
  455.  
  456. /*-------------------------- Constructors/Destructor ---------------------------
  457. | ISysBitmapHandles are constructed from an identifier for the specific        |
  458. | system bit-map resource to be associated with this handle.  The set of       |
  459. | values is defined by the ID enumeration type.                                |
  460. |                                                                              |
  461. ------------------------------------------------------------------------------*/
  462.  ISystemBitmapHandle ( Identifier bitmapId );
  463. ~ISystemBitmapHandle ( );
  464.  
  465. }; // class ISystemBitmapHandle
  466.  
  467. class IProfileHandle : public IHandle {
  468. typedef IHandle
  469.   Inherited;
  470. /*******************************************************************************
  471. * Use instances of the IProfileHandle class to access profiles.                *
  472. *                                                                              *
  473. * IProfileHandle is an alias for the Presentation Manager Toolkit type HINI.   *
  474. *******************************************************************************/
  475. public:
  476. /*------------------------------- Constructor ----------------------------------
  477. | Objects of this class are constructed from a profile handle (a value of      |
  478. | type IHandle::Value), defaulting to 0.                                       |
  479. ------------------------------------------------------------------------------*/
  480.   IProfileHandle ( Value hini = 0 );
  481.  
  482. }; // class IProfileHandle
  483.  
  484. class IMessageQueueHandle : public IHandle {
  485. typedef IHandle
  486.   Inherited;
  487. /*******************************************************************************
  488. * Use instances of the IMessageQueueHandle class to access application         *
  489. * message queues.                                                              *
  490. *                                                                              *
  491. * IMessageQueueHandle is an alias for the Presentation Manager Toolkit type    *
  492. * HMQ.                                                                         *
  493. *******************************************************************************/
  494. public:
  495. /*------------------------------- Constructor ----------------------------------
  496. | You can construct objects of this class from a message queue handle          |
  497. | (a value of type IHandle::Value), defaulting to 0.                           |
  498. ------------------------------------------------------------------------------*/
  499.   IMessageQueueHandle ( Value hmq = 0 );
  500.  
  501. /*----------------------------- Send/Post Event --------------------------------
  502. | These functions provide a simplified means of sending or posting an event    |
  503. | to message queue handle(s).                                                  |
  504. |   postEvent  - Posts an event constructed from the arguments to the          |
  505. |                instance of the message queue handle or other message         |
  506. |                queue handles.                                                |
  507. |   postEvents - Broadcasts an event to other message queue handles            |
  508. |                asynchronously.                                               |
  509. ------------------------------------------------------------------------------*/
  510. void
  511.   postEvent  ( unsigned long           eventId,
  512.                const IEventParameter1 &parm1 = 0ul,
  513.                const IEventParameter2 &parm2 = 0ul ) const;
  514.  
  515. static void
  516.   postEvent  ( const IMessageQueueHandle&    handle,
  517.                unsigned long           eventId,
  518.                const IEventParameter1 &parm1 = 0ul,
  519.                const IEventParameter2 &parm2 = 0ul ),
  520.  
  521.   postEvents ( unsigned long           eventId,
  522.                const IEventParameter1 &parm1 = 0ul,
  523.                const IEventParameter2 &parm2 = 0ul );
  524.  
  525. }; // class IMessageQueueHandle
  526.  
  527. class IAccelTblHandle : public IHandle {
  528. typedef IHandle
  529.   Inherited;
  530. /*******************************************************************************
  531. * Use instances of the IAccelTblHandle class to access accelerator tables.     *
  532. * Accelerator tables are also referred to as shortcut tables.                  *
  533. *                                                                              *
  534. * IAccelTblHandle is an alias for the Presentation Manager Toolkit type        *
  535. * HACCEL.                                                                      *
  536. *******************************************************************************/
  537. public:
  538. /*------------------------------- Constructor ----------------------------------
  539. | You can construct objects of this class from an accelerator table handle     |
  540. | (a value of type IHandle::Value), defaulting to 0.                           |
  541. ------------------------------------------------------------------------------*/
  542.   IAccelTblHandle ( Value haccel = 0 );
  543.  
  544. }; // class IAccelTblHandle
  545.  
  546. class IThreadId : public IHandle {
  547. typedef IHandle
  548.   Inherited;
  549. /*******************************************************************************
  550. * Use instances of the IThreadId class to access numeric identifiers for       *
  551. * threads.                                                                     *
  552. *                                                                              *
  553. * IThreadId is an alias for the Presentation Manager Toolkit type TID.         *
  554. *******************************************************************************/
  555. public:
  556. /*------------------------------- Constructor ----------------------------------
  557. | Objects of this class are constructed from a thread ID (a value of           |
  558. | type IHandle::Value), defaulting to 0.                                       |
  559. ------------------------------------------------------------------------------*/
  560.   IThreadId ( Value tid = 0 );
  561.  
  562. }; // class IThreadID
  563.  
  564. class IProcessId : public IHandle {
  565. typedef IHandle
  566.   Inherited;
  567. /*******************************************************************************
  568. * Use instances of the IProcessId class to access numeric identifiers for      *
  569. * processes.                                                                   *
  570. *                                                                              *
  571. * IProcessId is an alias for the Presentation Manager Toolkit type PID.        *
  572. *******************************************************************************/
  573. public:
  574. /*------------------------------- Constructor ----------------------------------
  575. | Objects of this class are constructed from a process ID (a value of          |
  576. | type IHandle::Value), defaulting to 0.                                       |
  577. ------------------------------------------------------------------------------*/
  578.   IProcessId  ( Value pid = 0 );
  579.  
  580. }; // class IProcessId
  581.  
  582. class IEnumHandle : public IHandle {
  583. typedef IHandle
  584.   Inherited;
  585. /*******************************************************************************
  586. * Use instances of the IEnumHandle class to access lists of enumerated items.  *
  587. * For example, an enumeration list can contain the handles of all the child    *
  588. * windows for a given parent window.                                           *
  589. *                                                                              *
  590. * IEnumHandle is an alias for the Presentation Manager Toolkit type HENUM.     *
  591. *******************************************************************************/
  592. public:
  593. /*------------------------------- Constructor ----------------------------------
  594. | You can construct objects of this class from an enumeration handle           |
  595. | (a value of type IHandle::Value), defaulting to 0.                           |
  596. ------------------------------------------------------------------------------*/
  597.   IEnumHandle ( Value henum = 0 );
  598.  
  599. }; // class IEnumHandle
  600.  
  601. /*----------------------------------------------------------------------------*/
  602. /* Resume compiler default packing.                                           */
  603. /*----------------------------------------------------------------------------*/
  604. #pragma pack()
  605.  
  606. #ifndef I_NO_INLINES
  607.   #include <ihandle.inl>
  608. #endif
  609.  
  610. #endif // _IHANDLE_
  611.