/* @(#)Z 1.8 com/src/ui/idl/Disptch.idl, odui, od96nt, odnt9712d 97/03/21 16:49:39 (96/10/21 16:55:17) */

/********************************************************************/
/*  Licensed Materials - Property of IBM                            */
/*                                                                  */
/*                                                                  */
/* Copyright (C) International Business Machines Corp., 1994.       */
/* Copyright (C) Apple Computer, Inc., 1994                         */
/*                                                                  */
/*  US Government Users Restricted Rights -                         */
/*  Use, duplication, or disclosure restricted                      */
/*  by GSA ADP Schedule Contract with IBM Corp.                     */
/*                                                                  */
/*                                                                  */
/********************************************************************/
//	Copyright:	(r) 1993 - 1995 by Apple Computer, Inc., all rights reserved.

#ifndef _DISPTCH_
#define _DISPTCH_

#ifndef _ODOBJECT_
#include "ODObject.idl"
#endif

//=====================================================================================
// Classes defined in this interface
//=====================================================================================

interface  ODDispatcher;

//=====================================================================================
// Classes used by this interface
//=====================================================================================

interface  ODDispatchModule;
interface  ODFrame;
interface  ODPart;



//=====================================================================================
// ODDispatcher
//=====================================================================================

interface ODDispatcher :  ODObject
{
	void AddDispatchModule(in ODEventType eventType,
						   in ODDispatchModule dispatchModule); 

	ODDispatchModule GetDispatchModule(in ODEventType eventType); 

	void RemoveDispatchModule(in ODEventType eventType); 

	void AddMonitor(in ODEventType eventType, 
					in ODDispatchModule dispatchModule);

	void RemoveMonitor(in ODEventType eventType,
					   in ODDispatchModule dispatchModule); 

	ODBoolean Dispatch(inout ODEventData eventData); 

	ODBoolean Redispatch(inout ODEventData eventData, inout ODEventInfo eventInfo); 

	void Exit(); 

	ODBoolean ShouldExit(); 

#ifdef _PLATFORM_MACINTOSH_

   void RegisterIdle(in ODPart part,
   					 in ODFrame frame,
					 in ODIdleFrequency frequency);

   void UnregisterIdle(in ODPart part,
   					   in ODFrame frame);

   void SetIdleFrequency(in ODPart part,
   						 in ODFrame frame,
						 in ODIdleFrequency frequency);

   void Yield(in ODFrame frame);

   void SetMouseRegion(in ODRgnHandle area);

   ODRgnHandle GetMouseRegion();

   void InvalidateFacetUnderMouse();

   ODSLong GetSleepTime();

#endif // _PLATFORM_MACINTOSH_

#ifdef _PLATFORM_UNIX_

   void SetXtDispatchMode(in ODBoolean mode);

   ODBoolean GetXtDispatchMode();

#endif // _PLATFORM_UNIX_


#ifdef __SOMIDL__

  implementation
  {
 		majorversion = 1; minorversion = 0;

 		functionprefix = ODDispatcher;

		override:
			somUninit,
			Purge;

		releaseorder:
			AddDispatchModule,
			GetDispatchModule,
			RemoveDispatchModule,
			AddMonitor,
			RemoveMonitor,
			Dispatch,
			Redispatch,
			Exit,
			ShouldExit,
#ifdef _PLATFORM_MACINTOSH_		// Macintosh-only public methods
			RegisterIdle,				 
			UnregisterIdle,
			SetIdleFrequency,
			Yield,
			SetMouseRegion,
			GetMouseRegion,
			InvalidateFacetUnderMouse,
			GetSleepTime,
#endif // _PLATFORM_MACINTOSH_

#ifdef _PLATFORM_UNIX_			// UNIX-only public methods
			SetXtDispatchMode,
			GetXtDispatchMode,
#endif // _PLATFORM_UNIX_

			reserved1,
#ifdef _PLATFORM_MACINTOSH_
			reserved2,
			reserved3,
			reserved4,
			reserved5,
			reserved6,
			reserved7,
			reserved8,
#endif // _PLATFORM_MACINTOSH_

			reserved_end;	// end of releaseorder


  };
#endif // __SOMIDL__

};

#endif // _DISPTCH_
