objc

Instance Methods
<InputManagerDelegate> Protocol Reference

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...
 

Detailed Description

A protocol that defines the methods for an input manager delegate.

Definition at line 30 of file InputManager+Protocols.h.

Method Documentation

◆ keyEvent:code:scanCode:char:state:()

- (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.

Parameters
senderThe source of the event (input device or source object).
codeThe platform-independent logical key code (see KEYCODE_*).
scanCodeHardware scan code or platform-specific scancode; may be 0 if unavailable.
chThe character produced by the key event, or 0 if none.
stateBitmask 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.

◆ moveEvent:point:slot:()

- (void) moveEvent: (id< InputManagerSource >)  sender
point: (NXPoint point
slot: (uint8_t)  slot 

Delegate callback for pointer movement (mouse or touchscreen).

Parameters
senderThe source of the movement event.
pointThe X/Y coordinates.
slotFor 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.


The documentation for this protocol was generated from the following file: