This file contains everything having to do with input on deskop environments from keyboards and mice. Gamepads and touch controls will likely be handled separately at a future date.
More...
|
b8 | input_system_initialize (u64 *memory_requirement, void *state, void *config) |
| Initializes the input system. Call twice; once to obtain memory requirement (passing state = 0), then a second time passing allocated memory to state. More...
|
|
void | input_system_shutdown (void *state) |
| Shuts the input system down. More...
|
|
void | input_update (const struct frame_data *p_frame_data) |
| Updates the input system every frame. More...
|
|
KAPI void | input_key_repeats_enable (b8 enable) |
| Enables/disables keyboard key repeats. More...
|
|
KAPI b8 | input_is_key_down (keys key) |
| Indicates if the given key is currently pressed down. More...
|
|
KAPI b8 | input_is_key_up (keys key) |
| Indicates if the given key is NOT currently pressed down. More...
|
|
KAPI b8 | input_was_key_down (keys key) |
| Indicates if the given key was previously pressed down on the last frame. More...
|
|
KAPI b8 | input_was_key_up (keys key) |
| Indicates if the given key was previously pressed down in the last frame. More...
|
|
void | input_process_key (keys key, b8 pressed) |
| Sets the state for the given key. More...
|
|
KAPI b8 | input_is_button_down (mouse_buttons button) |
| Indicates if the given mouse button is currently pressed. More...
|
|
KAPI b8 | input_is_button_up (mouse_buttons button) |
| Indicates if the given mouse button is currently released. More...
|
|
KAPI b8 | input_was_button_down (mouse_buttons button) |
| Indicates if the given mouse button was previously pressed in the last frame. More...
|
|
KAPI b8 | input_was_button_up (mouse_buttons button) |
| Indicates if the given mouse button was previously released in the last frame. More...
|
|
KAPI b8 | input_is_button_dragging (mouse_buttons button) |
| Indicates if the mouse is currently being dragged with the provided button being held down. More...
|
|
KAPI void | input_get_mouse_position (i32 *x, i32 *y) |
| Obtains the current mouse position. More...
|
|
KAPI void | input_get_previous_mouse_position (i32 *x, i32 *y) |
| Obtains the previous mouse position. More...
|
|
void | input_process_button (mouse_buttons button, b8 pressed) |
| Sets the press state of the given mouse button. More...
|
|
void | input_process_mouse_move (i16 x, i16 y) |
| Sets the current position of the mouse to the given x and y positions. Also updates the previous position beforehand. More...
|
|
void | input_process_mouse_wheel (i8 z_delta) |
| Processes mouse wheel scrolling. More...
|
|
KAPI const char * | input_keycode_str (keys key) |
| Returns a string representation of the provided key. Ex. "tab" for the tab key. More...
|
|
KAPI void | input_keymap_push (const struct keymap *map) |
| Pushes a new keymap onto the keymap stack, making it the active keymap. A copy of the keymap is taken when pushing onto the stack. More...
|
|
KAPI b8 | input_keymap_pop (void) |
| Attempts to pop the top-most keymap from the stack, if there is one. More...
|
|
This file contains everything having to do with input on deskop environments from keyboards and mice. Gamepads and touch controls will likely be handled separately at a future date.
- Author
- Travis Vroman (travi.nosp@m.s@ko.nosp@m.hieng.nosp@m.ine..nosp@m.com)
- Version
- 1.0
- Date
- 2022-01-10
- Copyright
- Kohi Game Engine is Copyright (c) Travis Vroman 2021-2024