18 #ifndef GNASH_INPUTDEVICE_H
19 #define GNASH_INPUTDEVICE_H
25 #include <boost/scoped_array.hpp>
26 #include <boost/shared_array.hpp>
27 #include <boost/scoped_ptr.hpp>
28 #include <boost/shared_ptr.hpp>
29 #include <boost/cstdint.hpp>
32 #include <linux/input.h>
33 #ifdef HAVE_LINUX_UINPUT_H
34 #include <linux/uinput.h>
48 static const int DEFAULT_BUFFER_SIZE = 256;
58 const char *
id() {
return "Uinput"; };
64 bool moveTo(
int x,
int y);
67 std::string _filespec;
117 virtual const char *
id() = 0;
124 virtual bool init(
const std::string &filespec,
size_t size) = 0;
125 virtual bool check() = 0;
133 boost::shared_array<boost::uint8_t>
readData(
size_t size);
136 boost::shared_ptr<InputDevice::input_data_t> input;
139 input =
_data.front();
164 std::queue<boost::shared_ptr<input_data_t> >
_data;
174 const char *
id() {
return "Mouse"; };
176 bool init(
const std::string &filespec,
size_t size);
179 static std::vector<boost::shared_ptr<InputDevice> >
scanForDevices();
182 bool command(
unsigned char cmd,
unsigned char *buf,
int count);
192 const char *
id() {
return "TouchScreen"; };
196 bool init(
const std::string &filespec,
size_t size);
201 static std::vector<boost::shared_ptr<InputDevice> >
scanForDevices();
205 struct tsdev *_tsDev;
212 const char *
id() {
return "InputEvent"; };
214 virtual bool init(
const std::string &filespec,
size_t size);
215 virtual bool check();
220 static std::vector<boost::shared_ptr<InputDevice> >
scanForDevices();
224 bool keyb_lshift, keyb_rshift, keyb_lctrl, keyb_rctrl, keyb_lalt, keyb_ralt;
225 struct input_id _device_info;
const char * id()
Definition: InputDevice.h:174
const char * id()
Definition: InputDevice.h:192
modifier
Definition: GnashKey.h:33
bool check()
Definition: TouchDevice.cpp:109
bool init()
Definition: MouseDevice.cpp:128
Definition: InputDevice.h:169
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:40
static std::vector< boost::shared_ptr< InputDevice > > scanForDevices()
Definition: EventDevice.cpp:676
type
Definition: GnashKey.h:329
Definition: klash_part.cpp:329
virtual bool init()
Definition: EventDevice.cpp:54
~MouseDevice()
Definition: MouseDevice.cpp:44
TouchDevice()
Definition: TouchDevice.cpp:50
Definition: InputDevice.h:208
code
Definition: GnashKey.h:43
bool check()
Definition: MouseDevice.cpp:237
EventDevice()
Definition: EventDevice.cpp:40
virtual ~TouchDevice()
Definition: TouchDevice.cpp:55
static std::vector< boost::shared_ptr< InputDevice > > scanForDevices()
Definition: MouseDevice.cpp:50
Definition: klash_part.cpp:329
boost::int32_t x
Definition: BitmapData_as.cpp:434
#define DSOEXPORT
Definition: dsodefs.h:55
Definition: InputDevice.h:189
virtual bool check()
Definition: EventDevice.cpp:254
static std::vector< boost::shared_ptr< InputDevice > > scanForDevices()
Definition: TouchDevice.cpp:271
const char * id()
Definition: InputDevice.h:212
boost::int32_t y
Definition: BitmapData_as.cpp:435
MouseDevice()
Definition: MouseDevice.cpp:37
bool command(unsigned char cmd, unsigned char *buf, int count)
Sends a command to the mouse and waits for the response.
Definition: MouseDevice.cpp:369
gnash::key::code scancode_to_gnash_key(int code, bool shift)
Definition: EventDevice.cpp:556
bool init()
Definition: TouchDevice.cpp:65
void apply_ts_calibration(float *cx, float *cy, int rawx, int rawy)
Definition: TouchDevice.cpp:149