diff options
Diffstat (limited to 'include/rodeo/input_t.h')
| -rw-r--r-- | include/rodeo/input_t.h | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/include/rodeo/input_t.h b/include/rodeo/input_t.h index 39385da..6013eed 100644 --- a/include/rodeo/input_t.h +++ b/include/rodeo/input_t.h @@ -5,6 +5,7 @@ // -- system -- #include <stdbool.h> +#include <stdint.h> // - SDL code start - @@ -765,8 +766,17 @@ rodeo_input_binary_mouseButton_t; typedef enum { + rodeo_input_positional_mouse_X = 1, + rodeo_input_positional_mouse_Y = 2 +} +rodeo_input_positional_mouse_t; + +typedef +enum +{ rodeo_input_type_Invalid = (1 << 0), - rodeo_input_type_Binary = (1 << 1) + rodeo_input_type_Binary = (1 << 1), + rodeo_input_type_Positional = (1 << 2), } rodeo_input_type_t ; @@ -788,12 +798,15 @@ enum } rodeo_input_binary_state_t; +typedef int64_t rodeo_input_positional_state_t; + typedef struct { union { rodeo_input_binary_state_t binary_state; + rodeo_input_positional_state_t positional_state; } data; rodeo_input_type_t input_type; @@ -818,12 +831,17 @@ void #define i_tag input_binary_mouseButtons #include <stc/cset.h> +#define i_val rodeo_input_positional_mouse_t +#define i_tag input_positional_mouse +#include <stc/cset.h> + typedef struct { uint32_t valid_types; // rodeo_input_type_t - //rodeo_input_callback_function *callback; + cset_input_callback_functions callbacks; + // binary struct { @@ -831,6 +849,13 @@ struct cset_input_binary_mouseButtons mouse_buttons; } binary; + + // unbounded range + struct + { + cset_input_positional_mouse mouse_position; + } + unbounded_range; } rodeo_input_command_t; |
