2018-02-15 19:07:47 +08:00
|
|
|
#ifndef INPUTMANAGER_H
|
|
|
|
#define INPUTMANAGER_H
|
|
|
|
|
2019-03-03 06:52:22 +08:00
|
|
|
#include <stdbool.h>
|
|
|
|
|
2018-02-15 19:07:47 +08:00
|
|
|
#include "common.h"
|
|
|
|
#include "controller.h"
|
2018-08-15 23:01:54 +08:00
|
|
|
#include "fps_counter.h"
|
2019-03-02 22:16:55 +08:00
|
|
|
#include "video_buffer.h"
|
2018-02-15 19:07:47 +08:00
|
|
|
#include "screen.h"
|
|
|
|
|
|
|
|
struct input_manager {
|
|
|
|
struct controller *controller;
|
2019-03-02 22:16:55 +08:00
|
|
|
struct video_buffer *video_buffer;
|
2018-02-15 19:07:47 +08:00
|
|
|
struct screen *screen;
|
2019-03-03 06:52:22 +08:00
|
|
|
bool control;
|
2018-02-15 19:07:47 +08:00
|
|
|
};
|
|
|
|
|
2019-03-03 03:09:56 +08:00
|
|
|
void
|
|
|
|
input_manager_process_text_input(struct input_manager *input_manager,
|
|
|
|
const SDL_TextInputEvent *event);
|
|
|
|
|
|
|
|
void
|
|
|
|
input_manager_process_key(struct input_manager *input_manager,
|
|
|
|
const SDL_KeyboardEvent *event);
|
|
|
|
|
|
|
|
void
|
|
|
|
input_manager_process_mouse_motion(struct input_manager *input_manager,
|
|
|
|
const SDL_MouseMotionEvent *event);
|
|
|
|
|
|
|
|
void
|
|
|
|
input_manager_process_mouse_button(struct input_manager *input_manager,
|
|
|
|
const SDL_MouseButtonEvent *event);
|
|
|
|
|
|
|
|
void
|
|
|
|
input_manager_process_mouse_wheel(struct input_manager *input_manager,
|
|
|
|
const SDL_MouseWheelEvent *event);
|
2018-02-15 19:07:47 +08:00
|
|
|
|
|
|
|
#endif
|