home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / opendc12.zip / od124os2.exe / od12osr1.exe / src / Disptch.idl < prev    next >
Text File  |  1997-03-21  |  9KB  |  309 lines

  1. /* @(#)Z 1.8 com/src/ui/idl/Disptch.idl, odui, od96os2, odos29712d 97/03/21 17:20:47 (96/10/21 16:55:17) */
  2. //#====START_GENERATED_PROLOG======================================
  3. //#
  4. //#
  5. //#   COMPONENT_NAME: odui
  6. //#
  7. //#   CLASSES: none
  8. //#
  9. //#   ORIGINS: 82,27
  10. //#
  11. //#
  12. //#   (C) COPYRIGHT International Business Machines Corp. 1995,1996
  13. //#   All Rights Reserved
  14. //#   Licensed Materials - Property of IBM
  15. //#   US Government Users Restricted Rights - Use, duplication or
  16. //#   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  17. //#       
  18. //#   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  19. //#   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  20. //#   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  21. //#   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  22. //#   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  23. //#   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
  24. //#   OR PERFORMANCE OF THIS SOFTWARE.
  25. //#
  26. //#====END_GENERATED_PROLOG========================================
  27. //#
  28. /********************************************************************/
  29. /*  Licensed Materials - Property of IBM                            */
  30. /*                                                                  */
  31. /*                                                                  */
  32. /* Copyright (C) International Business Machines Corp., 1994.       */
  33. /* Copyright (C) Apple Computer, Inc., 1994                         */
  34. /*                                                                  */
  35. /*  US Government Users Restricted Rights -                         */
  36. /*  Use, duplication, or disclosure restricted                      */
  37. /*  by GSA ADP Schedule Contract with IBM Corp.                     */
  38. /*                                                                  */
  39. /*                                                                  */
  40. /********************************************************************/
  41. #ifdef __PRIVATE__
  42. // IBM Change History (most recent first):                         */
  43. //  107819  5/25/95 aml  Added RemoveDispatchModuleEntries         */
  44. //  120349  5/15/95 map  Fix problem with //# comment on #endifs   */
  45. //  120349  5/15/95 map  Fix up IDL copyright                      */
  46. //******************************************************************/
  47. //
  48. //    File:        Disptch.idl
  49. //
  50. //    Contains:    Class definition for ODDispatcher
  51. //
  52. //    Owned by:    Richard Rodseth
  53. //
  54. //    Copyright:    (C) 1993 - 1995 by Apple Computer, Inc., all rights reserved.
  55. //
  56. //    Change History (most recent first):
  57. //
  58. //        <10>     8/15/95    RR        #1275241 IDL Review
  59. //         <9>      8/3/95    RR        #1257260: Collapse B classes. Remove
  60. //                                    somInit methods. Don't call IsInitialized
  61. //                                    or SubclassResponsibility
  62. //         <8>     6/15/95    RR        #1254828/1255536 Added Redispatch
  63. //         <7>      6/8/95    RR        #1257260 Collapse base classes. #1214898
  64. //                                    StdTypes.r -> ODTypes.r
  65. //         <6>      4/4/95    RR        # 1211085 Removed redundant
  66. //                                    fThreadsAvailable
  67. //         <5>    11/28/94    RR        Added fThreadsAvailable
  68. //         <4>     8/15/94    JBS        1181156: UI API Cleanup
  69. //         <3>      8/4/94    eeh        bug 1177981: add GetDispatchModule
  70. //         <2>     6/16/94    RR        Added function prefix
  71. //         <1>      6/8/94    RR        first checked in
  72. //         <6>      6/7/94    RR        Privatise change log
  73. //         <1>      5/9/94    VL        first checked in
  74. //
  75. //    To Do:
  76. //
  77. #else
  78. //    Copyright:    (r) 1993 - 1995 by Apple Computer, Inc., all rights reserved.
  79. #endif
  80.  
  81. #ifndef _DISPTCH_
  82. #define _DISPTCH_
  83.  
  84. #ifndef _ODOBJECT_
  85. #include "ODObject.idl"
  86. #endif
  87.  
  88. //=====================================================================================
  89. // Classes defined in this interface
  90. //=====================================================================================
  91.  
  92. interface  ODDispatcher;
  93.  
  94. //=====================================================================================
  95. // Classes used by this interface
  96. //=====================================================================================
  97.  
  98. interface  ODDispatchModule;
  99. interface  ODFrame;
  100. interface  ODPart;
  101.  
  102. #ifdef __PRIVATE__
  103. interface  ODSession;
  104. interface  ODFacet;
  105. #endif // __PRIVATE__
  106.  
  107. #ifdef __PRIVATE__
  108. //=====================================================================================
  109. // Implementation Types
  110. //=====================================================================================
  111.  
  112. #if defined(_PLATFORM_MACINTOSH_)
  113. typedef somToken IdleList;
  114. #endif // _PLATFORM_MACINTOSH_
  115.  
  116. typedef somToken DispatchTable;
  117.  
  118. #endif // __PRIVATE__
  119.  
  120. //=====================================================================================
  121. // ODDispatcher
  122. //=====================================================================================
  123.  
  124. interface ODDispatcher :  ODObject
  125. {
  126.     void AddDispatchModule(in ODEventType eventType,
  127.                            in ODDispatchModule dispatchModule); 
  128.   
  129.     ODDispatchModule GetDispatchModule(in ODEventType eventType); 
  130.   
  131.     void RemoveDispatchModule(in ODEventType eventType); 
  132.   
  133.     void AddMonitor(in ODEventType eventType, 
  134.                     in ODDispatchModule dispatchModule);
  135.   
  136.     void RemoveMonitor(in ODEventType eventType,
  137.                        in ODDispatchModule dispatchModule); 
  138.   
  139.     ODBoolean Dispatch(inout ODEventData eventData); 
  140.  
  141.     ODBoolean Redispatch(inout ODEventData eventData, inout ODEventInfo eventInfo); 
  142.   
  143.     void Exit(); 
  144.   
  145.     ODBoolean ShouldExit(); 
  146.  
  147. #ifdef _PLATFORM_MACINTOSH_
  148.  
  149.    void RegisterIdle(in ODPart part,
  150.                         in ODFrame frame,
  151.                      in ODIdleFrequency frequency);
  152.  
  153.    void UnregisterIdle(in ODPart part,
  154.                           in ODFrame frame);
  155.  
  156.    void SetIdleFrequency(in ODPart part,
  157.                             in ODFrame frame,
  158.                          in ODIdleFrequency frequency);
  159.  
  160.    void Yield(in ODFrame frame);
  161.  
  162.    void SetMouseRegion(in ODRgnHandle area);
  163.  
  164.    ODRgnHandle GetMouseRegion();
  165.  
  166.    void InvalidateFacetUnderMouse();
  167.  
  168.    ODSLong GetSleepTime();
  169.  
  170. #endif // _PLATFORM_MACINTOSH_
  171.  
  172. #ifdef _PLATFORM_UNIX_
  173.  
  174.    void SetXtDispatchMode(in ODBoolean mode);
  175.  
  176.    ODBoolean GetXtDispatchMode();
  177.  
  178. #endif // _PLATFORM_UNIX_
  179.  
  180. #ifdef __PRIVATE__
  181.  
  182.     void InitDispatcher(in ODSession session);
  183.  
  184. #ifdef _PLATFORM_MACINTOSH_
  185.  
  186.    void InvalidateMouseRegion();
  187.  
  188.    ODFacet  GetFacetUnderMouse();
  189.  
  190.    void SetFacetUnderMouse(in ODFacet facet);
  191.  
  192.    ODBoolean HandleNullEvent(in ODEventData event,
  193.                                 in  ODFrame skipFrame);
  194.  
  195.    ODBoolean MouseRegionIsInvalid();
  196.    
  197.    void ComputeMouseRegion();
  198.    
  199.    void CheckFacetUnderMouse();
  200.  
  201. #endif // _PLATFORM_MACINTOSH_
  202.  
  203. #endif // __PRIVATE__
  204.  
  205. #ifdef __SOMIDL__
  206.  
  207.   implementation
  208.   {
  209.          majorversion = 1; minorversion = 0;
  210.  
  211.          functionprefix = ODDispatcher;
  212.     
  213.         override:
  214.             somUninit,
  215.             Purge;
  216.         
  217.         releaseorder:
  218.             AddDispatchModule,
  219.             GetDispatchModule,
  220.             RemoveDispatchModule,
  221.             AddMonitor,
  222.             RemoveMonitor,
  223.             Dispatch,
  224.             Redispatch,
  225.             Exit,
  226.             ShouldExit,
  227. #ifdef _PLATFORM_MACINTOSH_        // Macintosh-only public methods
  228.             RegisterIdle,                 
  229.             UnregisterIdle,
  230.             SetIdleFrequency,
  231.             Yield,
  232.             SetMouseRegion,
  233.             GetMouseRegion,
  234.             InvalidateFacetUnderMouse,
  235.             GetSleepTime,
  236. #endif // _PLATFORM_MACINTOSH_
  237.  
  238. #ifdef _PLATFORM_UNIX_            // UNIX-only public methods
  239.             SetXtDispatchMode,
  240.             GetXtDispatchMode,
  241. #endif // _PLATFORM_UNIX_
  242.  
  243. #ifdef __PRIVATE__            // cross-platform private methods 
  244.             InitDispatcher,
  245. #else
  246.             reserved1,
  247. #endif // __PRIVATE__
  248. #ifdef _PLATFORM_MACINTOSH_
  249.     #ifdef __PRIVATE__        // Macintosh-only private methods
  250.             InvalidateMouseRegion,
  251.             GetFacetUnderMouse,
  252.             SetFacetUnderMouse,
  253.             HandleNullEvent,
  254.             MouseRegionIsInvalid,
  255.             ComputeMouseRegion,
  256.             CheckFacetUnderMouse,
  257.     #else
  258.             reserved2,
  259.             reserved3,
  260.             reserved4,
  261.             reserved5,
  262.             reserved6,
  263.             reserved7,
  264.             reserved8,
  265.     #endif
  266. #endif // _PLATFORM_MACINTOSH_
  267.  
  268.             reserved_end;    // end of releaseorder
  269.         
  270.     #ifdef __PRIVATE__
  271.             passthru C_xih =
  272.             ""
  273.             "class DispatchTable;"
  274.             ""
  275.         #if defined(_PLATFORM_MACINTOSH_)
  276.             "class IdleList;"
  277.         #endif // _PLATFORM_MACINTOSH_
  278.             ""
  279.             "";
  280.  
  281.             ODSession        fSession;
  282.             ODBoolean        fExit;
  283.  
  284.             DispatchTable*        fDispatchTable;
  285.  
  286.         #if defined(_PLATFORM_MACINTOSH_)
  287.             IdleList*        fIdleList;
  288.         #endif // _PLATFORM_MACINTOSH_
  289.  
  290.         #ifdef _PLATFORM_MACINTOSH_
  291.             ODRgnHandle        fMouseRegion;
  292.             ODRgnHandle        fPartMouseRegion;
  293.             ODFacet            fFacetUnderMouse;
  294.         #endif // _PLATFORM_MACINTOSH_
  295.  
  296.         #ifdef _PLATFORM_UNIX_
  297.             void*            fXtDisplay;
  298.             ODBoolean        fXtDispatchMode;
  299.         #endif // PLATFORM_UNIX
  300.     
  301.     #endif // __PRIVATE__
  302.     
  303.   };
  304. #endif // __SOMIDL__
  305.  
  306. };
  307.  
  308. #endif // _DISPTCH_
  309.