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;