Brief Index      Full Index      Events Index      I.M. Reference

Show_Location_Source

Functions

void Show_Location_Source (char *locater, char *display, char *action, int *status)
 

Detailed Description

Function Documentation

void Show_Location_Source ( char *  locater,
char *  display,
char *  action,
int *  status 
)

Returns the locater-device segment and the user action that gave rise to the current location event.

Parameters
locater- The segment associated with the physical locaterdevice that initiated the current event. Passed by reference always. Returned to user.
display- The segment associated with the physical displaydevice on which a cursor is being echoed, if any. Passed by reference always. Returned to user.
action- A special string indicating the user action that gave rise to the current event. Currently either "v", "^", "*", or "O". See Enable_Location_Events() for details. Passed by reference always. Returned to user.
status- Bit-encoded value representing the state (or the new state, if the state just changed) of the mouse buttons and the key board. Passed by reference always. Returned to user.

DETAILS

Show_Location_Source() is one of a family of routines that extracts information from the current event (presumably a location event) and returns it to you. In particular, Show_Location_Source() returns the locater segment and user action combination that was originally enabled for location events, and which then gave rise to the location event now at hand.

This information might be of interest if your program is handling several input devices simultaneously, or if you need to respond differently depending on the user's precise action.

Status is a device-dependent bit-encoded value representing the state of the mouse buttons and (if the information is available) the value representing the keyboard shift keys at the time of the event. You can use this information to differentiate between one button and another on a multi-button mouse, or to implement "control-mouse-click" and "shift-mouse-click" functionality.

If the first modifier key was currently pressed (usually the leftmost mouse button), then bit zero of status will be on. If the second modifier key was currently pressed, then bit one will be on independently of the state of bit zero, etc.

NOTES

If you're using the status value it should mean that you're sure about the kind of keyboard and operating system interface you're going to have—none of the bits of status are guaranteed to exist. (If a bit has no definition, it will always be set to zero.)

If your programming language doesn't allow for explicitly testing bit N of integer status, an equivalent test you might use is

RESTRICTIONS

See Also
Enable_Location_Events, Show_Location, Show_Selection_Source.

Brief Index      Full Index      Events Index      I.M. Reference