input Class Reference
Handles keyboard and mouse
input.
More...
#include <input.h>
List of all members.
|
Static Public Member Functions |
static void | init () |
| Initialise the input system.
|
static void | shutdown () |
| Free resources occupied by the input system.
|
static void | update () |
| Update the input state.
|
static bool | is_pushed (SDLKey key) |
| Returns whether a key is currently pushed or not.
|
static bool | has_been_pushed (SDLKey key) |
| Returns whether a key has been pushed since last function call, false otherwise.
|
static s_int32 | get_next_key () |
| Returns the code of the next key on the input queue.
|
static s_int32 | get_next_unicode () |
| Returns the next unicode on the input queue.
|
static void | set_key_repeat (int delay=SDL_DEFAULT_REPEAT_DELAY, int interval=SDL_DEFAULT_REPEAT_INTERVAL) |
| Sets whether the key repeat is active or not.
|
static void | clear_keys_queue () |
| Totally clears the key queue.
|
Detailed Description
Handles keyboard and mouse
input.
- Todo:
- Rewrite it!
Definition at line 40 of file input.h.
Member Function Documentation
void input::init |
( |
|
) |
[static] |
void input::shutdown |
( |
|
) |
[static] |
Free resources occupied by the input system.
Definition at line 58 of file input.cc.
void input::update |
( |
|
) |
[static] |
bool input::is_pushed |
( |
SDLKey |
key |
) |
[static] |
Returns whether a key is currently pushed or not.
- Parameters:
-
- Returns:
- true if key is currently pushed, false otherwise.
Definition at line 68 of file input.cc.
bool input::has_been_pushed |
( |
SDLKey |
key |
) |
[static] |
Returns whether a key has been pushed since last function call, false otherwise.
- Parameters:
-
- Returns:
- true if the key has been pushed since last call, false otherwise.
Definition at line 76 of file input.cc.
s_int32 input::get_next_key |
( |
|
) |
[static] |
Returns the code of the next key on the input queue.
- Returns:
- Code of the next key that has been pushed.
Definition at line 89 of file input.cc.
s_int32 input::get_next_unicode |
( |
|
) |
[static] |
Returns the next unicode on the input queue.
- Returns:
- Unicode of the next key that has been pushed.
Definition at line 107 of file input.cc.
void input::set_key_repeat |
( |
int |
delay = SDL_DEFAULT_REPEAT_DELAY , |
|
|
int |
interval = SDL_DEFAULT_REPEAT_INTERVAL | |
|
) |
| | [static] |
Sets whether the key repeat is active or not.
- Parameters:
-
| delay | delay (in ms) before repetition. |
| interval | interval (in ms) between repetitions. |
Definition at line 84 of file input.cc.
void input::clear_keys_queue |
( |
|
) |
[static] |
Totally clears the key queue.
Definition at line 128 of file input.cc.
The documentation for this class was generated from the following files: