|
hollyhock
|
Functions used to retrieve user input via the touch screen or keypad. More...
#include <stdint.h>#include <stdbool.h>
Go to the source code of this file.
Macros | |
| #define | __UCONCAT(a, b) #a b |
| #define | _UCONCAT(a, b) __UCONCAT(a, b) |
| #define | UCONCAT(b) _UCONCAT(__USER_LABEL_PREFIX__, b) |
Functions | |
| struct | __attribute__ ((packed)) Input_Event |
Variables | |
| int(* | GetInput )(struct Input_Event *event, uint32_t unknown1, uint32_t unknown2) __attribute__((access(write_only |
| int(*) bool(* | Input_GetKeyStateU )(uint16_t *scancode) __asm__(UCONCAT("Input_GetKeyState")) __attribute__((access(read_only |
| bool(* | Input_IsAnyKeyDown )() |
Functions used to retrieve user input via the touch screen or keypad.
Provides the GetInput method, a function which polls for input events (screen touches and key presses).
| struct __attribute__ | ( | (packed) | ) |
Information about an input event returned from GetInput. See documentation for individual members for more information.
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.
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.
The direction the key traveled. One of KEY_PRESSED, KEY_HELD or KEY_RELEASED.
The key code for the key. See macros beginning with KEYCODE_.
The direction of the touch. One of TOUCH_DOWN, TOUCH_HOLD_DRAG, TOUCH_ACT_BAR, or TOUCH_UP.
The X position of the cursor, in screen pixels. May be negative or be greater than or equal to the width of the screen.
The Y position of the cursor, in screen pixels. May be negative or be greater than or equal to the height of the screen.
|
extern |
Polls for any input events.
The event structure should be zeroed before calling GetInput.
| [out] | event | The input event's data. |
| unknown1 | An unknown value. The value 0xFFFFFFFF or 0 must be supplied meaning wait or do not wait for a event. | |
| unknown2 | An unknown value. The value 0x10 must be supplied. |
|
extern |
Returns true if any key on the keyboard is currently down.