18 #ifndef GNASH_INPUTDEVICE_H
19 #define GNASH_INPUTDEVICE_H
29 #include <linux/input.h>
30 #ifdef HAVE_LINUX_UINPUT_H
31 #include <linux/uinput.h>
45 static const int DEFAULT_BUFFER_SIZE = 256;
55 const char *
id() {
return "Uinput"; };
61 bool moveTo(
int x,
int y);
64 std::string _filespec;
114 virtual const char *
id() = 0;
121 virtual bool init(
const std::string &filespec,
size_t size) = 0;
122 virtual bool check() = 0;
130 std::unique_ptr<std::uint8_t[]>
readData(
size_t size);
133 std::shared_ptr<InputDevice::input_data_t> input;
136 input =
_data.front();
161 std::queue<std::shared_ptr<input_data_t> >
_data;
171 const char *
id() {
return "Mouse"; };
173 bool init(
const std::string &filespec,
size_t size);
176 static std::vector<std::shared_ptr<InputDevice> >
scanForDevices();
179 bool command(
unsigned char cmd,
unsigned char *buf,
int count);
189 const char *
id() {
return "TouchScreen"; };
193 bool init(
const std::string &filespec,
size_t size);
198 static std::vector<std::shared_ptr<InputDevice> >
scanForDevices();
202 struct tsdev *_tsDev;
209 const char *
id() {
return "InputEvent"; };
211 virtual bool init(
const std::string &filespec,
size_t size);
212 virtual bool check();
217 static std::vector<std::shared_ptr<InputDevice> >
scanForDevices();
221 bool keyb_lshift, keyb_rshift, keyb_lctrl, keyb_rctrl, keyb_lalt, keyb_ralt;
222 struct input_id _device_info;
const char * id()
Definition: InputDevice.h:171
const char * id()
Definition: InputDevice.h:189
modifier
Definition: GnashKey.h:33
bool check()
Definition: TouchDevice.cpp:109
bool init()
Definition: MouseDevice.cpp:127
Definition: InputDevice.h:166
static std::vector< std::shared_ptr< InputDevice > > scanForDevices()
Definition: TouchDevice.cpp:271
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:40
type
Definition: GnashKey.h:329
Definition: klash_part.cpp:329
virtual bool init()
Definition: EventDevice.cpp:53
~MouseDevice()
Definition: MouseDevice.cpp:43
TouchDevice()
Definition: TouchDevice.cpp:50
Definition: InputDevice.h:205
code
Definition: GnashKey.h:43
bool check()
Definition: MouseDevice.cpp:236
EventDevice()
Definition: EventDevice.cpp:40
virtual ~TouchDevice()
Definition: TouchDevice.cpp:55
Definition: klash_part.cpp:329
std::int32_t x
Definition: BitmapData_as.cpp:434
static std::vector< std::shared_ptr< InputDevice > > scanForDevices()
Definition: EventDevice.cpp:679
#define DSOEXPORT
Definition: dsodefs.h:55
static std::vector< std::shared_ptr< InputDevice > > scanForDevices()
Definition: MouseDevice.cpp:49
Definition: InputDevice.h:186
virtual bool check()
Definition: EventDevice.cpp:253
const char * id()
Definition: InputDevice.h:209
std::int32_t y
Definition: BitmapData_as.cpp:435
MouseDevice()
Definition: MouseDevice.cpp:36
bool command(unsigned char cmd, unsigned char *buf, int count)
Sends a command to the mouse and waits for the response.
Definition: MouseDevice.cpp:368
gnash::key::code scancode_to_gnash_key(int code, bool shift)
Definition: EventDevice.cpp:559
bool init()
Definition: TouchDevice.cpp:65
void apply_ts_calibration(float *cx, float *cy, int rawx, int rawy)
Definition: TouchDevice.cpp:149