hollyhock
|
#include <input.hpp>
Public Attributes | |
uint16_t | type |
uint16_t | zero |
union { | |
struct { | |
uint32_t direction | |
uint16_t keyCode | |
} key | |
struct { | |
uint32_t direction | |
int32_t p1_x | |
int32_t p1_y | |
uint16_t adc_x1 | |
uint16_t adc_y1 | |
uint16_t adc_z1 | |
uint16_t adc_z2 | |
uint16_t adc_x2 | |
uint16_t adc_y2 | |
uint16_t adc_gh | |
uint16_t adc_dm | |
} touch_single | |
struct { | |
uint32_t direction | |
int32_t p1_x | |
int32_t p1_y | |
int32_t p1_z | |
int32_t p2_x | |
int32_t p2_y | |
int32_t p2_z | |
uint32_t distance | |
uint16_t adc_x1 | |
uint16_t adc_y1 | |
uint16_t adc_z1 | |
uint16_t adc_z2 | |
uint16_t adc_x2 | |
uint16_t adc_y2 | |
uint16_t adc_gh | |
uint16_t adc_dm | |
} touch_multi | |
} | data |
Information about an input event returned from GetInput. See documentation for individual members for more information.
union { ... } InputEvent::data |
The data associated with the event. Under no circumstances should the sub-structure for an event type other than the one communicated by eventType
be accessed.
Corresponding members:
EVENT_KEY:
key
EVENT_TOUCH:
touch_single
The events EVENT_ACTBAR_RESIZE
, EVENT_ACTBAR_SWAP
, EVENT_ACTBAR_ROTATE
, EVENT_ACTBAR_ESC
, and EVENT_ACTBAR_SETTINGS
do not report any data.
uint32_t InputEvent::direction |
The direction the key traveled. One of KEY_PRESSED
, KEY_HELD
or KEY_RELEASED
.
The direction of the touch. One of TOUCH_DOWN
, TOUCH_HOLD_DRAG
, TOUCH_ACT_BAR
, or TOUCH_UP
.
uint16_t InputEvent::keyCode |
The key code for the key. See macros beginning with KEYCODE_
.
int32_t InputEvent::p1_x |
The X position of the cursor, in screen pixels. May be negative or be greater than or equal to the width of the screen.
int32_t InputEvent::p1_y |
The Y position of the cursor, in screen pixels. May be negative or be greater than or equal to the height of the screen.
uint16_t InputEvent::type |
Code representing which event occurred. Events with a value for this field which do not correspond to a macro beginning with EVENT_
must be ignored.