2024-09-16 06:07:01 +00:00
|
|
|
#ifndef TWN_INPUT_H
|
|
|
|
#define TWN_INPUT_H
|
2024-07-08 00:44:20 +00:00
|
|
|
|
2024-10-07 15:05:53 +00:00
|
|
|
#include "twn_types.h"
|
2024-08-26 21:33:37 +00:00
|
|
|
#include "twn_engine_api.h"
|
2024-10-08 07:12:30 +00:00
|
|
|
#include "twn_control.h"
|
2024-07-08 00:44:20 +00:00
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdbool.h>
|
2024-10-06 20:49:05 +00:00
|
|
|
#include <stddef.h>
|
2024-07-08 00:44:20 +00:00
|
|
|
|
|
|
|
|
2024-10-08 07:12:30 +00:00
|
|
|
TWN_API void input_bind_action_control(const char *action_name, Control control);
|
|
|
|
TWN_API void input_unbind_action_control(const char *action_name, Control control);
|
2024-07-08 00:44:20 +00:00
|
|
|
|
2024-10-08 07:12:30 +00:00
|
|
|
TWN_API void input_add_action(const char *action_name);
|
|
|
|
TWN_API void input_delete_action(const char *action_name);
|
2024-07-08 00:44:20 +00:00
|
|
|
|
2024-10-08 07:12:30 +00:00
|
|
|
TWN_API bool input_is_action_pressed(const char *action_name);
|
|
|
|
TWN_API bool input_is_action_just_pressed(const char *action_name);
|
|
|
|
TWN_API bool input_is_action_just_released(const char *action_name);
|
2024-07-08 00:44:20 +00:00
|
|
|
|
2024-10-08 07:12:30 +00:00
|
|
|
TWN_API Vec2 input_get_action_position(const char *action_name);
|
2024-07-30 21:05:28 +00:00
|
|
|
|
2024-10-08 07:12:30 +00:00
|
|
|
TWN_API void input_set_mouse_captured(bool enabled);
|
|
|
|
TWN_API bool input_is_mouse_captured(void);
|
2024-07-08 00:44:20 +00:00
|
|
|
|
|
|
|
#endif
|