home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
odtlktv4.zip
/
ODTLKT
/
TOOLKIT
/
IDL
/
ARBITRAT.IDL
next >
Wrap
Text File
|
1995-12-13
|
6KB
|
160 lines
/********************************************************************/
/* 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. */
/* */
/* */
/********************************************************************/
#ifndef _ARBITRAT_
#define _ARBITRAT_
#ifndef _ODOBJECT_
#include "ODObject.idl"
#endif
//==============================================================================
// Theory of Operation
//==============================================================================
/*
The arbitrator is used to manage competition for facilities which can only
be controlled by a single part at a time. These facilities are referred to
as "focus types". An example is the keystroke focus. Keyboard events are
sent to the part which has the keystroke focus. Another example is the menu
focus. One part owns the menu bar at any time. Many focus types are related
to event distribution, but focus types could also be associated with ports,
for example.
Rather than having an all-encompassing notion of "active" part, parts simply
request ownership of a set of focus types. It is possible, in principle, to
have one part receive keystroke events while another receives sound input,
though the human interface guidelines may encourage parts to request and
relinquish most focus types along with the menu focus.
New focus types can be added. This might be done by a part handler which is
associated with some exotic input device.
Parts request ownership of a set of focus types. This is necessary to
avoid deadlock.
*/
//==============================================================================
// Constants
//==============================================================================
//==============================================================================
// Scalar Types
//==============================================================================
//=====================================================================================
// Class defined in this interface
//=====================================================================================
interface ODArbitrator;
//=====================================================================================
// Classes used by this interface
//=====================================================================================
interface ODFocusModule;
interface ODFocusSet;
interface ODFocusOwnerIterator;
interface ODSession;
interface ODFrame;
//=====================================================================================
// Implementation Types
//=====================================================================================
//=====================================================================================
// Global Variables
//=====================================================================================
//=====================================================================================
// Class ODArbitrator
//=====================================================================================
interface ODArbitrator : ODObject
{
ODBoolean RequestFocusSet(in ODFocusSet focusSet,
in ODFrame requestingFrame);
ODBoolean RequestFocus(in ODTypeToken focus,
in ODFrame requestingFrame);
void RelinquishFocusSet(in ODFocusSet focusSet,
in ODFrame relinquishingFrame);
void RelinquishFocus(in ODTypeToken focus,
in ODFrame relinquishingFrame);
void TransferFocus(in ODTypeToken focus,
in ODFrame transferringFrame,
in ODFrame newOwner);
void TransferFocusSet(in ODFocusSet focusSet,
in ODFrame transferringFrame,
in ODFrame newOwner);
ODFrame AcquireFocusOwner(in ODTypeToken focus);
ODFocusOwnerIterator CreateOwnerIterator(in ODTypeToken focus);
void RegisterFocus(in ODTypeToken focus,
in ODFocusModule focusModule);
void UnregisterFocus(in ODTypeToken focus);
ODBoolean IsFocusRegistered(in ODTypeToken focus);
ODBoolean IsFocusExclusive(in ODTypeToken focus);
ODFocusModule GetFocusModule(in ODTypeToken focus);
ODFocusSet CreateFocusSet();
#ifdef __SOMIDL__
implementation
{
functionprefix = ODArbitrator;
override:
somInit,
somUninit,
Purge;
releaseorder:
RequestFocusSet,
RequestFocus,
RelinquishFocusSet,
RelinquishFocus,
TransferFocus,
TransferFocusSet,
AcquireFocusOwner,
CreateOwnerIterator,
RegisterFocus,
UnregisterFocus,
IsFocusRegistered,
IsFocusExclusive,
GetFocusModule,
CreateFocusSet,
reserved1;
majorversion = 1; minorversion = 0;
};
#endif
};
#endif // _ARBITRAT_