Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
None.
Inherited By:
TSimpleEventTargetter
TTransactionEventTargetter
Purpose:
An abstract base class that defines the protocol for specifying a TEventReceiver that fulfills a given policy. TEventReceiverTargetters live in the driver task for a hardware device.
Framework developers provide TEventReceiverTargetter derived classes to encapsulate a given style of event targeting. For example, a framework developer can provide a targeter that targets the window under the mouse cursor, or the frontmost application. The client need only know the targeter's policy in terms of the targeterŐs interface, and does not need to know the specific policy.
TEventReceiverTargetters are used by developers of input device frameworks--the same developers who use TEventSenders. When an event should be sent through a TEventSender, the client can either invoke the TEventSender protocol that specifies a given TEventReceiver, or a protocol that works in terms of an TEventReceiverTargetter. The former approach has the advantage of insulating the input device developer from having to know the details of the event targeting policy, thus allowing the system designer to change that policy when necessary.
Instantiation:
Abstract base class; do not allocate.
Deriving Classes:
Classes deriving from TEventReceiverTargetter must override the pure virtual function GetEventReceiverTarget.
TEventReceiverTargetter uses nothing outside of the Input system. TEventReceiverTargetter derived classes are expected to use other information (for example, the Window server) to determine the identity of their target TEventReceivers.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
- TEventReceiverTargetter ()
- TEventReceiverTargetter (const TEventReceiverTargetter & copy)
Interface Category:
API.
Purpose:
- Default constructor.
- Copy constructor.
Calling Context:
- Called by the stream-in operators.
- Called to copy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TEventReceiverTargetter ()
Interface Category:
API.
Purpose:
Destructor.
Calling Context:
Called to destroy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
TEventReceiverTargetter & operator =(const TEventReceiverTargetter & assign)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Call this function by using the operator in an assignment statement.
Parameters:
Return Value:
Returns a const reference to the left-hand side object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TStream & operator >>=(TStream & writeTo) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & writeTo -The stream to which the object streams itself out.
Return Value:
Returns a reference to the stream the object streams itself out to.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TStream & operator <<= (TStream & readFrom)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & readFrom -The stream from which the object streams itself in.
Return Value:
Returns a reference to the stream the object streams itself in from.
Exceptions:
Throws a TInvalidVersionError if the version of the object on the stream is unknown to the version of the shared library installed.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual bool GetEventReceiverTarget (TEventReceiverSurrogate & target)
Interface Category:
API.
Purpose:
Determines and returns the event receiver. This function returns the event receiver through the target parameter.
This function implements the targeterŐs event targeting policy and returns the event receiver that fulfills that policy. For example, if this targeterŐs policy is to target the window under the mouse cursor, then this function returns (via the target parameter) the window that is currently under the mouse.
It's possible for no object to fulfill the targeterŐs policy, such as when there is no window under the mouse. If no object fulfills the targeterŐs policy, this function returns true and the target parameter is invalid. You can create an invalid target with the default constructor.
It's also possible that the policy is to target the user-focused event receiver. This function returns false to indicate such a policy.
Calling Context:
Called from the Input system framework.
Parameters:
Return Value:
Returns true if this function implements a policy that does not target the user-focused event receiver; otherwise, returns false.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
This function is a pure virtual function and must be overridden by classes deriving from TEventReceiverTargetter.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.