Adonthell  0.4
input Class Reference

Handles keyboard and mouse input. More...

#include <input.h>

Static Public Member Functions

static void init ()
 Initialise the input system. More...
 
static void shutdown ()
 Free resources occupied by the input system. More...
 
static void update ()
 Update the input state. More...
 
static bool is_pushed (SDLKey key)
 Returns whether a key is currently pushed or not. More...
 
static bool has_been_pushed (SDLKey key)
 Returns whether a key has been pushed since last function call, false otherwise. More...
 
static s_int32 get_next_key ()
 Returns the code of the next key on the input queue. More...
 
static s_int32 get_next_unicode ()
 Returns the next unicode on the input queue. More...
 
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. More...
 
static void clear_keys_queue ()
 Totally clears the key queue. More...
 

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

Initialise the input system.

Definition at line 46 of file input.cc.

void input::shutdown ( )
static

Free resources occupied by the input system.

Definition at line 58 of file input.cc.

void input::update ( )
static

Update the input state.

Definition at line 63 of file input.cc.

bool input::is_pushed ( SDLKey  key)
static

Returns whether a key is currently pushed or not.

Parameters
keykey to test.
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
keykey to test.
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
delaydelay (in ms) before repetition.
intervalinterval (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: