openATV enigma2
openATV is an open source SetTopBox Graphical user interface.
rcsdl.h
Go to the documentation of this file.
1 #ifndef __lib_driver_rcsdl_h
2 #define __lib_driver_rcsdl_h
3 
4 #include <lib/driver/rc.h>
5 
6 #include <SDL2/SDL.h>
7 
8 class eSDLInputDevice : public eRCDevice
9 {
10 private:
11  bool m_escape;
12  unsigned int m_unicode;
13  int translateKey(SDL_Keycode key);
14 
15 public:
18 
19  virtual void handleCode(long arg);
20  virtual const char *getDescription() const;
21 };
22 
23 class eSDLInputDriver : public eRCDriver
24 {
25 private:
26  static eSDLInputDriver *instance;
27 
28 public:
31 
32  static eSDLInputDriver *getInstance() { return instance; }
33 
34  void keyPressed(const SDL_KeyboardEvent *key);
35 };
36 
37 #endif
A remote control.
Definition: rc.h:27
eRCDriver * driver
Definition: rc.h:30
Definition: rc.h:73
Definition: rcsdl.h:9
~eSDLInputDevice()
Definition: rcsdl.cpp:15
virtual const char * getDescription() const
Get user readable description.
Definition: rcsdl.cpp:73
virtual void handleCode(long arg)
Handles a device specific code.
Definition: rcsdl.cpp:19
eSDLInputDevice(eRCDriver *driver)
Definition: rcsdl.cpp:11
Definition: rcsdl.h:24
eSDLInputDriver()
Definition: rcsdl.cpp:350
~eSDLInputDriver()
Definition: rcsdl.cpp:356
static eSDLInputDriver * getInstance()
Definition: rcsdl.h:32
void keyPressed(const SDL_KeyboardEvent *key)
Definition: rcsdl.cpp:361
arg
Definition: UnitConversions.py:88