/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* input.h :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: mc +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/10/17 14:43:09 by mcolonna #+# #+# */ /* Updated: 2024/11/01 20:59:28 by mc ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef INPUT_H # define INPUT_H # include "include.h" /// @brief For g_input_actions typedef struct s_input_actions { bool left; bool right; bool up; bool down; bool quit; } t_input_actions; /// @brief Modified by the input of the user. A value becomes true /// when the user presses the corresponding key. extern t_input_actions g_input_actions; /// @brief To call when a specific key is newly pressed. /// /// @param keycode Key pressed. /// @return Unused. int hook_keypress(int keycode); /// @brief To call when a specific key is released. /// /// @param keycode Key released. /// @return Unused. int hook_keyrelease(int keycode); /// @brief To call at the start of the program. void input_init(void); #endif