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 #include <linux/uinput.h>
46 static const int DEFAULT_BUFFER_SIZE = 256;
56 const char *
id() {
return "Uinput"; };
62 bool moveTo(
int x,
int y);
65 std::string _filespec;
115 virtual const char *
id() = 0;
122 virtual bool init(
const std::string &filespec,
size_t size) = 0;
123 virtual bool check() = 0;
131 boost::shared_array<boost::uint8_t>
readData(
size_t size);
134 boost::shared_ptr<InputDevice::input_data_t> input;
137 input =
_data.front();
162 std::queue<boost::shared_ptr<input_data_t> >
_data;
172 const char *
id() {
return "Mouse"; };
174 bool init(
const std::string &filespec,
size_t size);
177 static std::vector<boost::shared_ptr<InputDevice> >
scanForDevices();
180 bool command(
unsigned char cmd,
unsigned char *buf,
int count);
190 const char *
id() {
return "TouchScreen"; };
194 bool init(
const std::string &filespec,
size_t size);
199 static std::vector<boost::shared_ptr<InputDevice> >
scanForDevices();
203 struct tsdev *_tsDev;
210 const char *
id() {
return "InputEvent"; };
212 virtual bool init(
const std::string &filespec,
size_t size);
213 virtual bool check();
218 static std::vector<boost::shared_ptr<InputDevice> >
scanForDevices();
222 bool keyb_lshift, keyb_rshift, keyb_lctrl, keyb_rctrl, keyb_lalt, keyb_ralt;
223 struct input_id _device_info;