This repository has been archived on 2023-07-11. You can view files and clone it, but cannot push or open issues or pull requests.
SoftwareRasterizer/include/vm/vm_input.h
Gered 648832d939 bit of src tree shuffling. main.cpp to be replaced with test programs
full disclosure: i'm a bit unsure of what is the best way to do this
at this point in time. the end goal with this project is that it
becomes a library to be used by other apps (of course), but need tests
to test various library functionality. unsure how best to organize this
with cmake (and since i'm using clion, i kind of would prefer it works
nicely and integrated with the ide...).

i figure this is going to be a trial and error approach that will
evolve over the next while
2015-01-11 22:52:55 -05:00

31 lines
670 B
C

#pragma once
#ifdef __cplusplus
extern "C" {
#endif
#include "vm/vm_stdinc.h"
#include "vm/vm_input_codes.h"
#include "SDL.h"
bool input_init();
void input_destroy();
void input_on_key_event(SDL_Event *event);
void input_on_mouse_event(SDL_Event *event);
bool input_is_key_down(KEYS key);
bool input_is_key_pressed(KEYS key);
void input_lock_key(KEYS key);
bool input_is_mouse_button_down(MOUSE_BUTTONS button);
bool input_is_mouse_button_pressed(MOUSE_BUTTONS button);
void input_lock_mouse_button(MOUSE_BUTTONS button);
int input_get_mouse_delta_x();
int input_get_mouse_delta_y();
uint input_get_mouse_x();
uint input_get_mouse_y();
#ifdef __cplusplus
}
#endif