home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / odtlktv4.zip / ODTLKT / TOOLKIT / IDL / DISPTCH.IDL < prev    next >
Text File  |  1995-12-13  |  4KB  |  151 lines

  1. /********************************************************************/
  2. /*  Licensed Materials - Property of IBM                            */
  3. /*                                                                  */
  4. /*                                                                  */
  5. /* Copyright (C) International Business Machines Corp., 1994.       */
  6. /* Copyright (C) Apple Computer, Inc., 1994                         */
  7. /*                                                                  */
  8. /*  US Government Users Restricted Rights -                         */
  9. /*  Use, duplication, or disclosure restricted                      */
  10. /*  by GSA ADP Schedule Contract with IBM Corp.                     */
  11. /*                                                                  */
  12. /*                                                                  */
  13. /********************************************************************/
  14.  
  15. #ifndef _DISPATCH_
  16. #define _DISPATCH_
  17.  
  18. #ifndef _ODOBJECT_
  19. #include "ODObject.idl"
  20. #endif
  21.  
  22. //=====================================================================================
  23. // Classes defined in this interface
  24. //=====================================================================================
  25.  
  26. interface  ODDispatcher;
  27.  
  28. //=====================================================================================
  29. // Classes used by this interface
  30. //=====================================================================================
  31.  
  32. interface  ODDispatchModule;
  33. interface  ODFacet;
  34. interface  ODFrame;
  35. interface  ODPart;
  36. interface  ODSession;
  37.  
  38.  
  39. //=====================================================================================
  40. // ODDispatcher
  41. //=====================================================================================
  42.  
  43. #if defined(_PLATFORM_MACINTOSH_) || defined(_PLATFORM_OS2_)
  44.  
  45. interface ODDispatcher :  ODObject
  46. {
  47.   void AddDispatchModule(in ODEventType eventType,
  48.                in ODDispatchModule dispatchModule); 
  49.  
  50.   ODDispatchModule GetDispatchModule(in ODEventType eventType); 
  51.  
  52.   void RemoveDispatchModule(in ODEventType eventType); 
  53.  
  54.   void AddMonitor(in ODEventType eventType, 
  55.           in ODDispatchModule dispatchModule);
  56.  
  57.   void RemoveMonitor(in ODEventType eventType,
  58.              in ODDispatchModule dispatchModule); 
  59.  
  60.   ODBoolean Dispatch(inout ODEventData eventData); 
  61.  
  62.   ODBoolean Redispatch(inout ODEventData eventData, inout ODEventInfo eventInfo); 
  63.  
  64.     void Exit(); 
  65.  
  66.   ODBoolean ShouldExit(); 
  67.  
  68. #ifndef _PLATFORM_OS2_
  69.  
  70.    void RegisterIdle(in ODPart part,
  71.               in ODFrame frame,
  72.            in ODIdleFrequency frequency);
  73.  
  74.    void UnregisterIdle(in ODPart part,
  75.                 in ODFrame frame);
  76.  
  77.    void SetIdleFrequency(in ODPart part,
  78.                 in ODFrame frame,
  79.              in ODIdleFrequency frequency);
  80.  
  81.    void Yield(in ODFrame frame);
  82.  
  83.    void SetMouseRegion(in ODRgnHandle area);
  84.  
  85.    ODRgnHandle GetMouseRegion();
  86.  
  87.    void InvalidateFacetUnderMouse();
  88.  
  89.    ODSLong GetSleepTime();
  90.  
  91. #endif
  92.  
  93.  
  94. #ifdef __SOMIDL__
  95.   implementation
  96.   {
  97.     functionprefix = ODDispatcher;
  98.  
  99.     override:
  100.       somInit,
  101.       somUninit,
  102.       Purge;
  103.  
  104.     releaseorder:
  105.       AddDispatchModule,
  106.       GetDispatchModule,
  107.       RemoveDispatchModule,
  108.       AddMonitor,
  109.       RemoveMonitor,
  110.       Dispatch,
  111.       Redispatch,
  112.       Exit,
  113.       ShouldExit,
  114.  
  115. #ifndef _PLATFORM_OS2_ // CED
  116.       RegisterIdle,
  117.       UnregisterIdle,
  118.       SetIdleFrequency,
  119.       Yield,
  120.       SetMouseRegion,
  121.       GetMouseRegion,
  122.       InvalidateFacetUnderMouse,
  123.       GetSleepTime,
  124. #endif // _PLATFORM_OS2_
  125. #ifndef _PLATFORM_OS2_ // CED
  126.       reserved1,
  127.       reserved2,
  128.       reserved3,
  129.       reserved4,
  130.       reserved5,
  131.       reserved6,
  132.       reserved7,
  133.       reserved8;
  134. #else
  135.       reserved1,
  136.       reserved2;
  137. #endif // _PLATFORM_OS2_
  138.  
  139.     majorversion = 1; minorversion = 0;
  140.  
  141.  
  142.   };
  143. #endif
  144. };
  145.  
  146. #endif // _PLATFORM_MACINTOSH_ || _PLATFORM_OS2_
  147. // #endif // _PLATFORM_MACINTOSH_
  148.  
  149. #endif // _DISPATCH_
  150.  
  151.