1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #pragma once
- #include <stdint.h>
- #include <stdbool.h>
- #include <switch/services/hid.h>
- typedef struct
- {
- uint64_t down;
- uint64_t held;
- uint64_t up;
- int32_t t_count;
- HidTouchState t_pos;
- } input_t;
- void init_input(void);
- //
- input_t get_input(void);
- // this is used to check if the user was already touching the screen when entering a function that checks for screen touches.
- // this is useful to know whether to lock touching until the user touches the screen again.
- bool is_touch(void);
- //
- int check_if_touch_yesno(const input_t *input);
- //
- bool check_if_touch_error(void);
- //
- int check_if_option(const input_t *input);
- //
- uint32_t move_cursor_up(uint32_t cursor, uint32_t cursor_max);
- //
- uint32_t move_cursor_down(uint32_t cursor, uint32_t cursor_max);
|