GEOS SDK TechDocs
|
|
1.2 Input Manager and GenSystem
|
1.4 Input Hierarchies
GEOS uses three basic types of input events. These three types make up all the events necessary for mouse, keyboard, and pen input. They are Pointer events , Button events , and Keyboard events .
Pointer and Button events deal with mouse and pen input. Keyboard events provide keyboard key press information. Pointer and Button events are often referred to as "mouse" events and are dealt with together because most objects interested in one type will also be interested in the other.
A Pointer event details motion of the mouse pointer. If the user moves the mouse, a
MSG_META_MOUSE_PTR
will be generated by the Input Manager and sent to the proper application. The type of Pointer event (not always
MSG_META_MOUSE_PTR
) is affected by the current keyboard state, mouse state, and other context information.
A Button event details the press or release of a particular mouse button. Because different Specific UIs have different meanings for each mouse button, the function of the button determines which message is sent out. In the OSF/Motif specific UI, the left mouse button is used for selection; therefore, presses on that button cause
MSG_META_START_SELECT
, and releases cause
MSG_META_END_SELECT
. The exact message sent out, like Pointer events, can also be affected by input state information.
Mouse events also carry with them several flags indicating various statistics about the event: whether the click is actually a double-click, whether any keys on the keyboard are being held down, etc.
A Keyboard event details the press or release of a particular key on the user's keyboard. Usually, objects interested in Keyboard events will only be interested in presses and can ignore releases.
MSG_META_KBD_CHAR
is the basic Keyboard event, and it carries flags detailing the state of the various modifier keys (e.g., Shift, Ctrl, Alt, NumLock). This message is always sent to the current focus.
Pen input comes in the form of a special data structure called
Ink
. Ink input is instigated in the same manner as Button events, but it is handled in a completely separate manner. An object expecting Ink input must be aware when Ink events are being passed as opposed to normal mouse events. Special flags are used for this; see Pen Input and Ink
.
GEOS SDK TechDocs
|
|
1.2 Input Manager and GenSystem
|
1.4 Input Hierarchies