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;
117 bool init(devicetype_e
type);
118 bool init(devicetype_e
type,
size_t size);
119 bool init(devicetype_e
type,
const std::string &filespec);
120 bool init(devicetype_e
type,
const std::string &filespec,
size_t size);
121 virtual bool init(
const std::string &filespec,
size_t size) = 0;
122 virtual bool check() = 0;
124 static DSOEXPORT std::vector<std::shared_ptr<InputDevice> > scanForDevices();
130 std::unique_ptr<std::uint8_t[]> readData(
size_t size);
133 std::shared_ptr<InputDevice::input_data_t> input;
136 input = _data.front();
142 static DSOEXPORT std::unique_ptr<int[]> convertAbsCoords(
int x,
int y,
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);
196 void apply_ts_calibration(
float* cx,
float* cy,
int rawx,
int rawy);
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
Definition: InputDevice.h:166
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:40
type
Definition: GnashKey.h:329
Definition: klash_part.cpp:329
Definition: InputDevice.h:205
code
Definition: GnashKey.h:43
Definition: klash_part.cpp:329
std::int32_t x
Definition: BitmapData_as.cpp:434
#define DSOEXPORT
Definition: dsodefs.h:55
Definition: InputDevice.h:186
const char * id()
Definition: InputDevice.h:209
std::int32_t y
Definition: BitmapData_as.cpp:435