Go to the documentation of this file.
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;
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);
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;
pixel_iterator< T > begin(GnashImage &im)
Definition: ImageIterators.h:191
@ height
Definition: klash_part.cpp:329
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
TouchDevice()
Definition: TouchDevice.cpp:50
void log_debug(StringType msg, Args... args)
Definition: log.h:301
std::int32_t y
Definition: BitmapData_as.cpp:435
virtual bool init()
Definition: EventDevice.cpp:53
virtual ~TouchDevice()
Definition: TouchDevice.cpp:55
#define _(String)
Definition: log.h:44
modifier
Definition: GnashKey.h:34
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:41
bool check()
Definition: TouchDevice.cpp:109
#define GNASH_REPORT_FUNCTION
Definition: log.h:452
Definition: InputDevice.h:187
void log_error(StringType msg, Args... args)
Definition: log.h:283
~MouseDevice()
Definition: MouseDevice.cpp:43
bool check()
Definition: MouseDevice.cpp:236
type
Definition: GnashKey.h:330
code
Definition: GnashKey.h:44
const char * id()
Definition: InputDevice.h:171
EventDevice()
Definition: EventDevice.cpp:40
virtual bool check()
Definition: EventDevice.cpp:253
static std::vector< std::shared_ptr< InputDevice > > scanForDevices()
Definition: MouseDevice.cpp:49
static std::vector< std::shared_ptr< InputDevice > > scanForDevices()
Definition: EventDevice.cpp:679
gnash::key::code scancode_to_gnash_key(int code, bool shift)
Definition: EventDevice.cpp:559
Definition: InputDevice.h:206
const char * id()
Definition: InputDevice.h:189
#define DSOEXPORT
Definition: dsodefs.h:55
static std::vector< std::shared_ptr< InputDevice > > scanForDevices()
Definition: TouchDevice.cpp:271
const char * id()
Definition: InputDevice.h:209
MouseDevice()
Definition: MouseDevice.cpp:36
bool init()
Definition: TouchDevice.cpp:65
@ width
Definition: klash_part.cpp:329
Definition: InputDevice.h:167
std::int32_t x
Definition: BitmapData_as.cpp:434
bool init()
Definition: MouseDevice.cpp:127
void apply_ts_calibration(float *cx, float *cy, int rawx, int rawy)
Definition: TouchDevice.cpp:149