InputServer Class Reference
[Framework Module]

#include <inputserver.h>

Inheritance diagram for InputServer:

RootServer< InputServer > Root Server< InputServer > Object TreeNode< Root > Referenced Counted Serialized List< Root > ListNode< Root > GlfwInputServer

List of all members.

Detailed Description

GFX server interface.

Public Types

typedef bool(* ActionCallbackFun )(const string &, int, void *data)
typedef bool(* KeyCallbackFun )(KeyCode, KeyState)
typedef bool(* CharCallbackFun )(int, KeyState)
typedef bool(* MousePosCallbackFun )(ushort_t, ushort_t)
typedef bool(* MouseRelPosCallbackFun )(int, int)
typedef bool(* MouseWheelCallbackFun )(int)
typedef bool(* MouseRelWheelCallbackFun )(int)

Public Member Functions

 InputServer (const char *id)
virtual ~InputServer ()
virtual void RegisterCallbacks ()
virtual bool Trigger ()
virtual void WaitForEvent ()
const char * GetKeyName (KeyCode key)
KeyCode GetKeyCode (const string &key_id)
KeyState GetKeyState (const string &state_id)
SliderCode GetSliderCode (const string &slider_id)
bool IsKeyPressed (KeyCode key)
void GetMousePosition (ushort_t &x, ushort_t &y)
void GetAbsMousePosition (int &x, int &y)
void GetRelMousePosition (int &dx, int &dy)
int GetMouseWheel ()
void FixMouse (bool fix)
virtual void SetMousePosition (ushort_t x, ushort_t y)
void ResetInput ()
void AddActionCallback (ActionCallbackFun cbfun, void *data=NULL)
void AddActionCallback (const char *script_cbfun)
bool RemoveActionCallback (ActionCallbackFun cbfun)
bool RemoveActionCallback (const char *script_cbfun)
void SetKeyCallback (KeyCallbackFun cbfun)
void SetCharCallback (CharCallbackFun cbfun)
void SetMousePosCallback (MousePosCallbackFun cbfun)
void SetMouseRelPosCallback (MouseRelPosCallbackFun cbfun)
void SetMouseWheelCallback (MouseWheelCallbackFun cbfun)
void SetMouseRelWheelCallback (MouseRelWheelCallbackFun cbfun)
bool Bind (const char *definition, const char *action)
void UnbindAll ()

Protected Types

typedef list
< ActionInfo
typedef list
< ActionInfo >

Protected Member Functions

bool RemoveBind (KeyCode key, KeyState state, SliderCode slider)
void EmitAction (const string &action, int pos)

Protected Attributes

ActionList callback_action
KeyCallbackFun callback_key
CharCallbackFun callback_char
MousePosCallbackFun callback_position
MouseRelPosCallbackFun callback_relposition
MouseWheelCallbackFun callback_wheel
MouseRelWheelCallbackFun callback_relwheel
KeyCallbackFun gui_callback_key
CharCallbackFun gui_callback_char
MousePosCallbackFun gui_callback_position
MouseRelPosCallbackFun gui_callback_relposition
MouseWheelCallbackFun gui_callback_wheel
MouseRelWheelCallbackFun gui_callback_relwheel
ushort_t mouse_x
ushort_t mouse_y
int mouse_absx
int mouse_absy
int mouse_reldx
int mouse_reldy
int mouse_wheel
bool mouse_fixed
KeyInfo keys [KEY_COUNT]
SliderInfo sliders [SLIDER_COUNT]
vector< BindInfo * > bind_list
vector< KeyCodepressed_list


class GuiServer


struct  ActionInfo
struct  BindInfo
struct  KeyInfo
struct  SliderInfo

Member Typedef Documentation

typedef bool(* InputServer::ActionCallbackFun)(const string &, int, void *data)

typedef bool(* InputServer::KeyCallbackFun)(KeyCode, KeyState)

typedef bool(* InputServer::CharCallbackFun)(int, KeyState)

typedef bool(* InputServer::MousePosCallbackFun)(ushort_t, ushort_t)

typedef bool(* InputServer::MouseRelPosCallbackFun)(int, int)

typedef bool(* InputServer::MouseWheelCallbackFun)(int)

typedef bool(* InputServer::MouseRelWheelCallbackFun)(int)

typedef list<ActionInfo> InputServer::ActionList [protected]

typedef list<ActionInfo>::iterator InputServer::ActionIterator [protected]

Constructor & Destructor Documentation

InputServer::InputServer ( const char *  id  ) 

InputServer::~InputServer (  )  [virtual]

Member Function Documentation

void InputServer::RegisterCallbacks (  )  [virtual]

Reimplemented in GlfwInputServer.

bool InputServer::Trigger (  )  [virtual]

Reimplemented from Server< InputServer >.

Reimplemented in GlfwInputServer.

void InputServer::WaitForEvent (  )  [virtual]

Reimplemented in GlfwInputServer.

const char * InputServer::GetKeyName ( KeyCode  key  ) 

KeyCode InputServer::GetKeyCode ( const string &  key_id  ) 

KeyState InputServer::GetKeyState ( const string &  state_id  ) 

SliderCode InputServer::GetSliderCode ( const string &  slider_id  ) 

bool InputServer::IsKeyPressed ( KeyCode  key  )  [inline]

void InputServer::GetMousePosition ( ushort_t x,
ushort_t y 
) [inline]

void InputServer::GetAbsMousePosition ( int &  x,
int &  y 
) [inline]

void InputServer::GetRelMousePosition ( int &  dx,
int &  dy 
) [inline]

int InputServer::GetMouseWheel (  )  [inline]

void InputServer::FixMouse ( bool  fix  )  [inline]

void InputServer::SetMousePosition ( ushort_t  x,
ushort_t  y 
) [virtual]

Reimplemented in GlfwInputServer.

void InputServer::ResetInput (  )  [inline]

void InputServer::AddActionCallback ( ActionCallbackFun  cbfun,
void *  data = NULL 
) [inline]

void InputServer::AddActionCallback ( const char *  script_cbfun  )  [inline]

bool InputServer::RemoveActionCallback ( ActionCallbackFun  cbfun  )  [inline]

bool InputServer::RemoveActionCallback ( const char *  script_cbfun  )  [inline]

void InputServer::SetKeyCallback ( KeyCallbackFun  cbfun  )  [inline]

void InputServer::SetCharCallback ( CharCallbackFun  cbfun  )  [inline]

void InputServer::SetMousePosCallback ( MousePosCallbackFun  cbfun  )  [inline]

void InputServer::SetMouseRelPosCallback ( MouseRelPosCallbackFun  cbfun  )  [inline]

void InputServer::SetMouseWheelCallback ( MouseWheelCallbackFun  cbfun  )  [inline]

void InputServer::SetMouseRelWheelCallback ( MouseRelWheelCallbackFun  cbfun  )  [inline]

bool InputServer::Bind ( const char *  definition,
const char *  action 

void InputServer::UnbindAll (  ) 

bool InputServer::RemoveBind ( KeyCode  key,
KeyState  state,
SliderCode  slider 
) [protected]

void InputServer::EmitAction ( const string &  action,
int  pos 
) [protected]

Akcie volat cez hashovaciu tabulku. (Kluc akcia, hodnoty CallbaciInfo).

Friends And Related Function Documentation

friend class GuiServer [friend]

Member Data Documentation

ActionList InputServer::callback_action [protected]

KeyCallbackFun InputServer::callback_key [protected]

CharCallbackFun InputServer::callback_char [protected]

MousePosCallbackFun InputServer::callback_position [protected]

MouseRelPosCallbackFun InputServer::callback_relposition [protected]

MouseWheelCallbackFun InputServer::callback_wheel [protected]

MouseRelWheelCallbackFun InputServer::callback_relwheel [protected]

KeyCallbackFun InputServer::gui_callback_key [protected]

CharCallbackFun InputServer::gui_callback_char [protected]

MousePosCallbackFun InputServer::gui_callback_position [protected]

MouseRelPosCallbackFun InputServer::gui_callback_relposition [protected]

MouseWheelCallbackFun InputServer::gui_callback_wheel [protected]

MouseRelWheelCallbackFun InputServer::gui_callback_relwheel [protected]

ushort_t InputServer::mouse_x [protected]

ushort_t InputServer::mouse_y [protected]

int InputServer::mouse_absx [protected]

int InputServer::mouse_absy [protected]

int InputServer::mouse_reldx [protected]

int InputServer::mouse_reldy [protected]

int InputServer::mouse_wheel [protected]

bool InputServer::mouse_fixed [protected]

KeyInfo InputServer::keys[KEY_COUNT] [protected]

SliderInfo InputServer::sliders[SLIDER_COUNT] [protected]

vector<BindInfo *> InputServer::bind_list [protected]

vector<KeyCode> InputServer::pressed_list [protected]

The documentation for this class was generated from the following files:
Generated on Sat Oct 20 14:47:32 2007 for Dark Oberon by  doxygen 1.5.3