Include and link physfs properly.
[tuxanci.git] / src / client / keyboardBuffer.h
blobe3596efc45a9ea4453d0c731232b70746b7f9035
1 #ifndef KEYBOARD_BUFFER_H
2 #define KEYBOARD_BUFFER_H
4 #include <SDL.h>
5 #include "main.h"
7 typedef struct {
8 SDL_keysym *buff; /* buffer of keys (code according to the SDLKey enum) */
9 int size; /* up-to-date size of allocated buffer (size == number of saveable keys) */
10 int count; /* up-to-date number of keys saved in the buffer */
11 int begin; /* pointer to the beginning of the buffer (i.e. where to add new keys to) */
12 int end; /* pointer to the end of the buffer (i.e. where to remove old keys from) */
13 } keyboardBuffer_t;
15 extern void keyboard_buffer_init(int size);
16 extern void keyboard_buffer_clear();
17 extern bool_t keyboard_buffer_push(SDL_keysym key);
18 extern SDL_keysym keyboard_buffer_pop();
19 extern int keyboard_buffer_get_size();
20 extern int keyboard_buffer_get_count();
21 extern bool_t keyboard_buffer_is_any_key();
22 extern void keyboard_buffer_quit();
24 #endif /* KEYBOARD_BUFFER_H */