GetMouse
Gets mouse events.
Synopsis
Err GetMouse( int32 mouseNumber, int32 wait,MouseEventData *data )
Description
This convenience call allows a task to easily monitor mouse events.
This function is similar to GetControlPad()
but gets events from a specified mouse instead of a specified controller pad. It specifies a mouse to monitor, specifies whether the call should return immediately or wait until something happens on the mouse, and provides a data structure for data from the mouse.
When the function executes, it either returns immediately with event information or waits there is a change in the mouse before returning. If an event has occurred, the task must check the MouseEventData data structure for details about the event.
Arguments
- mouseNumber
- Sets the number of the generic mouse on the control port (i.e., the first, second, third, and so on mouse in the control port daisy chain, counting out from the 3DO unit) that the task wants to monitor. The first mouse is 1, the second is 2, and so on.
- wait
- A boolean value that specifies the event brokersresponse.IfitisTRUE(a non zero value), the event broker waits along with the task until an event occurs on the specified pad and only returns with data when there is a change in the pad. If it is FALSE
- (zero), the event broker immediately returns with the status of the pad.
- data
- A pointer to a MouseEventData data structure that contains the mouse data that is returned.
Return Value
This function returns 1 if an event has occurred on the mouse, 0 if no event has occurred on the mouse, or an error code (a negative value) if an error occurred when attempting to retrieve an event.
Implementation
Convenience call implemented in input.lib V20.
Associated Files
event.h, input.lib
See Also
InitEventUtility
(), GetControlPad(), KillEventUtility()