Abstractify some modules completely: timer, keyboard and mouse.

If this commit breaks some project file(s), well ...
I AM RUDE AND I WILL BREAK EVERYTHING, AHAHAHAHAHAHAHHAHAHAHAHA!
This commit is contained in:
rude
2011-10-28 10:47:16 +02:00
parent cd66b01da3
commit 2753c62985
18 changed files with 239 additions and 201 deletions
+26
View File
@@ -184,6 +184,32 @@ namespace keyboard
virtual ~Keyboard(){}
/**
* Checks whether a certain key is down or not.
* @param key A key identifier.
* @return boolean
**/
virtual bool isDown(Key * keylist) const = 0;
/**
* Enables key repeating.
* @param delay The amount of delay before repeating the key (in milliseconds)
* @param interval Specifies the amount of time between repeats (in milliseconds)
**/
virtual void setKeyRepeat(int delay, int interval) const = 0;
/**
* Gets the specified delay for the key repeat.
* @return int
**/
virtual int getKeyRepeatDelay() const = 0;
/**
* Gets the specified interval for the key repeat.
* @return int
**/
virtual int getKeyRepeatInterval() const = 0;
static bool getConstant(const char * in, Key & out);
static bool getConstant(Key in, const char *& out);