home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / ihandle.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  11.6 KB  |  370 lines

  1. #ifndef _IHANDLE_
  2. #define _IHANDLE_
  3. /*******************************************************************************
  4. * FILE NAME: ihandle.hpp                                                       *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the classes:                                                *
  8. *     IWindowHandle                                                            *
  9. *     IAnchorBlockHandle                                                       *
  10. *     IModuleHandle                                                            *
  11. *     IPointerHandle                                                           *
  12. *     IStringHandle                                                            *
  13. *     IPresSpaceHandle                                                         *
  14. *     IBitmapHandle                                                            *
  15. *     IProfileHandle                                                           *
  16. *     IMessageQueueHandle                                                      *
  17. *     IAccelTblHandle                                                          *
  18. *     ISystemPointerHandle                                                     *
  19. *     ISystemBitmapHandle                                                      *
  20. *     IThreadId                                                                *
  21. *     IProcessId                                                               *
  22. *     IEnumHandle                                                              *
  23. *     IRegionHandle                                                            *
  24. *     IContextHandle                                                           *
  25. *     IDisplayHandle                                                           *
  26. *     IMenuHandle                                                              *
  27. *                                                                              *
  28. * COPYRIGHT:                                                                   *
  29. *   IBM Open Class Library                                                     *
  30. *   (C) Copyright International Business Machines Corporation 1992, 1996       *
  31. *   Licensed Material - Program-Property of IBM - All Rights Reserved.         *
  32. *   US Government Users Restricted Rights - Use, duplication, or disclosure    *
  33. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  34. *                                                                              *
  35. *******************************************************************************/
  36. #include <ibase.hpp>
  37. #include <ibhandle.hpp>
  38. #include <ievtdata.hpp>
  39.  
  40. struct _WidgetRec;
  41. struct _XtAppStruct;
  42. struct _XGC;
  43. struct _XDisplay;
  44. struct _XrmHashBucketRec;
  45.  
  46. #pragma pack(4)
  47.  
  48. class IWindowHandle : public IHandle {
  49. typedef IHandle
  50.   Inherited;
  51. public:
  52. /*------------------------------- Constructors -------------------------------*/
  53.   IWindowHandle ( Value hwnd = 0 );
  54.  
  55. /*-------------------------------- Operators ---------------------------------*/
  56.  
  57. /*--------------------------------- Testing ----------------------------------*/
  58. Boolean
  59.   isValid ( ) const;
  60.  
  61. /*----------------------- Sending and Posting Events -------------------------*/
  62. enum BroadcastTo {
  63.   descendants,
  64.   frames,
  65.   frameDescendants
  66.   };
  67.  
  68. IEventResult
  69.   sendEvent  ( unsigned long           eventId,
  70.                const IEventParameter1& parm1 = 0ul,
  71.                const IEventParameter2& parm2 = 0ul ) const;
  72.  
  73. void
  74.   sendEvents ( unsigned long           eventId,
  75.                const IEventParameter1& parm1 = 0ul,
  76.                const IEventParameter2& parm2 = 0ul,
  77.                BroadcastTo             value = descendants ) const;
  78.  
  79. void
  80.   postEvent  ( unsigned long           eventId,
  81.                const IEventParameter1& parm1 = 0ul,
  82.                const IEventParameter2& parm2 = 0ul ) const,
  83.  
  84.   postEvents ( unsigned long           eventId,
  85.                const IEventParameter1& parm1 = 0ul,
  86.                const IEventParameter2& parm2 = 0ul,
  87.                BroadcastTo             value = descendants ) const;
  88.  
  89. }; // class IWindowHandle
  90.  
  91. class IAnchorBlockHandle : public IHandle {
  92. typedef IHandle
  93.   Inherited;
  94. public:
  95. /*------------------------------- Constructors -------------------------------*/
  96.   IAnchorBlockHandle ( Value hab = 0 );
  97.  
  98. /*-------------------------------- Operators ---------------------------------*/
  99.  
  100. }; // class IAnchorBlockHandle
  101.  
  102.  
  103. class IModuleHandle : public IHandle {
  104. typedef IHandle
  105.   Inherited;
  106. public:
  107. /*------------------------------- Constructors -------------------------------*/
  108.   IModuleHandle ( Value hmod = 0 );
  109.  
  110. /*-------------------------------- Operators ---------------------------------*/
  111.  
  112. }; // class IModuleHandle
  113.  
  114.  
  115.  
  116. class IPointerHandle : public IHandle {
  117. typedef IHandle
  118.   Inherited;
  119. public:
  120. /*------------------------------- Constructors -------------------------------*/
  121.   IPointerHandle ( Value                 hpointer = 0 );
  122.   IPointerHandle ( const IPointerHandle& aHandle );
  123.  ~IPointerHandle ( );
  124.  
  125. IPointerHandle
  126.  &operator =     ( const IPointerHandle& aHandle );
  127.  
  128. /*-------------------------------- Operators ---------------------------------*/
  129.  
  130. }; // class IPointerHandle
  131.  
  132. class ISystemPointerHandle : public IPointerHandle {
  133. typedef IPointerHandle
  134.   Inherited;
  135. public:
  136. /*------------------------ System Pointer Identifiers ------------------------*/
  137. enum Identifier {
  138.   arrow,
  139.   text,
  140.   wait,
  141.   move,
  142.   sizeNWSE,
  143.   sizeNESW,
  144.   sizeHorizontal,
  145.   sizeVertical,
  146.   standardApplication,
  147.   information,
  148.   question,
  149.   error,
  150.   warning,
  151.   illegalOperation,
  152.   singleFile,
  153.   multipleFile,
  154.   folder,
  155.   program,
  156.   dragFade
  157.   };
  158.  
  159. /*------------------------------- Constructors -------------------------------*/
  160.   ISystemPointerHandle ( Identifier pointerId,
  161.                          Boolean    makeCopy = false );
  162.  ~ISystemPointerHandle ( );
  163.  
  164. }; // class ISysPointerHandle
  165.  
  166. class IStringHandle : public IHandle {
  167. typedef IHandle
  168.   Inherited;
  169. public:
  170. /*------------------------------- Constructors -------------------------------*/
  171.   IStringHandle ( Value hstr = 0 );
  172.  
  173. /*-------------------------------- Operators ---------------------------------*/
  174.  
  175. }; // class IStringHandle
  176.  
  177.  
  178. class IPresSpaceHandle : public IHandle {
  179. typedef IHandle
  180.   Inherited;
  181. public:
  182. /*------------------------------- Constructors -------------------------------*/
  183.   IPresSpaceHandle ( Value hps = 0 );
  184. }; // class IPresSpaceHandle
  185.  
  186. class IBitmapHandle : public IHandle {
  187. typedef IHandle
  188.   Inherited;
  189. public:
  190. /*------------------------------- Constructors -------------------------------*/
  191.   IBitmapHandle ( Value value = 0 );
  192.   IBitmapHandle ( const IBitmapHandle& aHandle );
  193.  ~IBitmapHandle ( );
  194.  
  195. IBitmapHandle
  196.  &operator =    ( const IBitmapHandle& aHandle );
  197.  
  198. /*-------------------------------- Operators ---------------------------------*/
  199.  
  200. }; // class IBitmapHandle
  201.  
  202. class ISystemBitmapHandle : public IBitmapHandle {
  203. typedef IBitmapHandle
  204.   Inherited;
  205. public:
  206. /*------------------------- System Bitmap Identifiers ------------------------*/
  207. enum Identifier {
  208.   systemMenu,
  209.   systemMenuPressed,
  210.   scrollBarUpArrow,
  211.   scrollBarUpArrowPressed,
  212.   scrollBarUpArrowDisabled,
  213.   scrollBarDownArrow,
  214.   scrollBarDownArrowPressed,
  215.   scrollBarDownArrowDisabled,
  216.   scrollBarRightArrow,
  217.   scrollBarRightArrowPressed,
  218.   scrollBarRightArrowDisabled,
  219.   scrollBarLeftArrow,
  220.   scrollBarLeftArrowPressed,
  221.   scrollBarLeftArrowDisabled,
  222.   menuCheckMark,
  223.   menuAttached,
  224.   checkBoxCheck,
  225.   comboBoxDownArrow,
  226.   pushButtonCorners,
  227.   minimizeButton,
  228.   minimizeButtonPressed,
  229.   maximizeButton,
  230.   maximizeButtonPressed,
  231.   restoreButton,
  232.   restoreButtonPressed,
  233.   childSystemMenu,
  234.   childSystemMenuPressed,
  235.   drive,
  236.   file,
  237.   folder,
  238.   collapsedTree,
  239.   expandedTree,
  240.   program,
  241.   sizeBox,
  242.   smallSystemMenu
  243.   };
  244.  
  245. /*------------------------------- Constructors -------------------------------*/
  246.   ISystemBitmapHandle ( Identifier bitmapId );
  247.  ~ISystemBitmapHandle ( );
  248.  
  249. }; // class ISystemBitmapHandle
  250.  
  251. class IProfileHandle : public IHandle {
  252. typedef IHandle
  253.   Inherited;
  254. public:
  255. /*------------------------------- Constructors -------------------------------*/
  256.   IProfileHandle ( Value hini = 0 );
  257.  
  258. /*------------------------------- Operators ----------------------------------*/
  259. }; // class IProfileHandle
  260.  
  261. class IMessageQueueHandle : public IHandle {
  262. typedef IHandle
  263.   Inherited;
  264. public:
  265. /*------------------------------- Constructors -------------------------------*/
  266.   IMessageQueueHandle ( Value hmq = 0 );
  267.  
  268. /*-------------------------------- Operators ---------------------------------*/
  269.  
  270. /*-------------------------------- Post Event --------------------------------*/
  271. void
  272.   postEvent  ( unsigned long           eventId,
  273.                const IEventParameter1& parm1 = 0ul,
  274.                const IEventParameter2& parm2 = 0ul ) const;
  275. static void
  276.   postEvent  ( const IMessageQueueHandle&    handle,
  277.                unsigned long           eventId,
  278.                const IEventParameter1& parm1 = 0ul,
  279.                const IEventParameter2& parm2 = 0ul ),
  280.  
  281.   postEvents ( unsigned long           eventId,
  282.                const IEventParameter1& parm1 = 0ul,
  283.                const IEventParameter2& parm2 = 0ul );
  284. }; // class IMessageQueueHandle
  285.  
  286. class IAccelTblHandle : public IHandle {
  287. typedef IHandle
  288.   Inherited;
  289. public:
  290. /*------------------------------- Constructors -------------------------------*/
  291.   IAccelTblHandle ( Value haccel = 0 );
  292.  
  293. /*-------------------------------- Operators ---------------------------------*/
  294.  
  295. }; // class IAccelTblHandle
  296.  
  297. class IThreadId : public IHandle {
  298. typedef IHandle
  299.   Inherited;
  300. public:
  301. /*------------------------------- Constructors -------------------------------*/
  302.   IThreadId ( Value tid = 0 );
  303.  
  304. /*-------------------------------- Operators ---------------------------------*/
  305.  
  306. }; // class IThreadID
  307.  
  308. class IThreadHandle : public IHandle {
  309. typedef IHandle
  310.   Inherited;
  311. public:
  312. /*------------------------------- Constructors -------------------------------*/
  313.   IThreadHandle ( Value thread = 0 );
  314.  
  315. /*-------------------------- Thread Handle Specifics -------------------------*/
  316. static const IThreadHandle
  317.   IC_IMPORTU noHandle;
  318.  
  319. }; // class IThreadHandle
  320.  
  321. class IProcessId : public IHandle {
  322. typedef IHandle
  323.   Inherited;
  324. public:
  325. /*------------------------------- Constructors -------------------------------*/
  326.   IProcessId ( Value pid = 0 );
  327.  
  328. /*-------------------------------- Operators ---------------------------------*/
  329.  
  330. }; // class IProcessId
  331.  
  332. class IEnumHandle : public IHandle {
  333. typedef IHandle
  334.   Inherited;
  335. public:
  336. /*------------------------------- Constructors -------------------------------*/
  337.   IEnumHandle ( Value henum = 0 );
  338.  
  339. /*-------------------------------- Operators ---------------------------------*/
  340.  
  341. }; // class IEnumHandle
  342.  
  343. class IRegionHandle : public IHandle {
  344. typedef IHandle
  345.   Inherited;
  346. public:
  347. /*------------------------------- Constructors -------------------------------*/
  348.   IRegionHandle ( Value hregion = 0 );
  349.  
  350. /*-------------------------------- Operators ---------------------------------*/
  351.  
  352. }; // class IEnumHandle
  353.  
  354.  
  355.  
  356. class IMenuHandle : public IHandle {
  357. typedef IHandle
  358.   Inherited;
  359. public:
  360. /*------------------------------- Constructors -------------------------------*/
  361.   IMenuHandle ( Value hmenu = 0 );
  362.  
  363. }; // class IMenuHandle
  364.  
  365. #pragma pack()
  366.  
  367.   #include <ihandle.inl>
  368.  
  369. #endif // _IHANDLE_
  370.