A protocol that defines the methods for an input manager delegate. More...
#import <Application/Application.h>
Instance Methods | |
(void) | - keyEvent:code:scanCode:char:state: |
Delegate callback for key/button events. More... | |
(void) | - moveEvent:point:slot: |
Delegate callback for pointer movement (mouse or touchscreen). More... | |
A protocol that defines the methods for an input manager delegate.
Definition at line 30 of file InputManager+Protocols.h.
- (void) keyEvent: | (id< InputManagerSource >) | sender | |
code: | (uint16_t) | keyCode | |
scanCode: | (uint16_t) | scanCode | |
char: | (char) | ch | |
state: | (NXInputState) | state | |
Delegate callback for key/button events.
sender | The source of the event (input device or source object). |
code | The platform-independent logical key code (see KEYCODE_*). |
scanCode | Hardware scan code or platform-specific scancode; may be 0 if unavailable. |
ch | The character produced by the key event, or 0 if none. |
state | Bitmask of NXInputState flags representing the current key/button state and modifier state (clicks, repeat, shift, control, etc.). |
Called when a key, button, or touchscreen press is reported to the input manager. The delegate receives both the logical key code and the hardware scan code (if available), along with a character value when the event produces a printable character.
If the event represents a touchscreen press, the input manager will emit KEYCODE_BTNTOUCH
as the logical code and set the corresponding state flags.
- (void) moveEvent: | (id< InputManagerSource >) | sender | |
point: | (NXPoint) | point | |
slot: | (uint8_t) | slot | |
Delegate callback for pointer movement (mouse or touchscreen).
sender | The source of the movement event. |
point | The X/Y coordinates. |
slot | For touch events this may contain the contact slot/index; for simple pointer devices this will typically be 0. |
Reports pointer motion from mice, touchpads, or touchscreens. The point
parameter should be interpreted as an absolute value, which can be positive or negative, depending on the device.