Gnash  0.8.10
Public Member Functions | Static Public Member Functions
gnash::EventDevice Class Reference

#include <InputDevice.h>

Inheritance diagram for gnash::EventDevice:
gnash::InputDevice

List of all members.

Public Member Functions

 EventDevice ()
const char * id ()
virtual bool init ()
virtual bool init (const std::string &filespec, size_t size)
virtual bool check ()
gnash::key::code scancode_to_gnash_key (int code, bool shift)

Static Public Member Functions

static std::vector
< boost::shared_ptr
< InputDevice > > 
scanForDevices ()

Constructor & Destructor Documentation

gnash::EventDevice::EventDevice ( )

Referenced by scanForDevices().


Member Function Documentation

bool gnash::EventDevice::check ( ) [virtual]
Note:
A typical touchscreen event is actually a series of events, one for each piece of data. The sequence is terminated by the EV_SYN message. An example from evtests looks like this: Event: time 697585.633672, type 3 (Absolute), code 0 (X), value 127 Event: time 697585.633679, type 3 (Absolute), code 1 (Y), value 72 Event: time 697585.633681, type 3 (Absolute), code 24 (Pressure), value 41 Event: time 697585.633684, type 1 (Key), code 330 (Touch), value 1 Event: time 697585.633686, -------------- Report Sync ------------

Everytime we get the EV_SYN message we add this fully populated event to queue of events. As the GUI polls for events, there may be multiple events in the queue by the time the main event loop comes around to process the events.

Implements gnash::InputDevice.

References gnash::InputDevice::_fd, gnash::InputDevice::readData(), _, EV_SYN, gnash::InputDevice::_input_data, gnash::InputDevice::input_data_t::pressed, gnash::InputDevice::input_data_t::key, gnash::InputDevice::input_data_t::modifier, gnash::InputDevice::input_data_t::x, gnash::InputDevice::input_data_t::y, gnash::InputDevice::input_data_t::button, gnash::InputDevice::input_data_t::position, gnash::InputDevice::input_data_t::pressure, gnash::InputDevice::input_data_t::volumne, gnash::InputDevice::input_data_t::distance, gnash::InputDevice::input_data_t::rx, gnash::InputDevice::input_data_t::ry, gnash::InputDevice::input_data_t::rz, gnash::InputDevice::input_data_t::throttle, gnash::InputDevice::input_data_t::rudder, gnash::InputDevice::input_data_t::gas, gnash::InputDevice::input_data_t::brake, gnash::InputDevice::input_data_t::tiltX, gnash::InputDevice::input_data_t::tiltY, gnash::InputDevice::_data, scancode_to_gnash_key(), gnash::key::GNASH_MOD_NONE, gnash::key::GNASH_MOD_SHIFT, gnash::key::GNASH_MOD_CONTROL, gnash::key::GNASH_MOD_ALT, and gnash::InputDevice::input_data_t::z.

const char* gnash::EventDevice::id ( ) [inline, virtual]

Implements gnash::InputDevice.

bool gnash::EventDevice::init ( ) [virtual]

Reimplemented from gnash::InputDevice.

bool gnash::EventDevice::init ( const std::string &  filespec,
size_t  size 
) [virtual]
gnash::key::code gnash::EventDevice::scancode_to_gnash_key ( int  code,
bool  shift 
)

References gnash::key::_1, gnash::key::EXCLAM, gnash::key::_2, gnash::key::DOUBLE_QUOTE, gnash::key::_3, gnash::key::HASH, gnash::key::_4, gnash::key::DOLLAR, gnash::key::_5, gnash::key::PERCENT, gnash::key::_6, gnash::key::AMPERSAND, gnash::key::_7, gnash::key::SINGLE_QUOTE, gnash::key::_8, gnash::key::PAREN_LEFT, gnash::key::_9, gnash::key::PAREN_RIGHT, gnash::key::_0, gnash::key::ASTERISK, gnash::key::A, gnash::key::a, gnash::key::B, gnash::key::b, gnash::key::C, gnash::key::c, D, gnash::key::d, gnash::key::E, gnash::key::e, gnash::key::F, gnash::key::f, gnash::key::G, gnash::key::g, gnash::key::H, gnash::key::h, gnash::key::I, gnash::key::i, gnash::key::J, gnash::key::j, gnash::key::K, gnash::key::k, gnash::key::L, gnash::key::l, gnash::key::M, gnash::key::m, gnash::key::N, gnash::key::n, gnash::key::O, gnash::key::o, gnash::key::P, gnash::key::p, gnash::key::Q, gnash::key::q, gnash::key::R, gnash::key::r, gnash::key::S, gnash::key::s, gnash::key::T, gnash::key::t, gnash::key::U, gnash::key::u, gnash::key::V, test::v, gnash::key::W, test::w, gnash::key::X, x, gnash::key::Y, y, gnash::key::Z, gnash::key::z, gnash::key::F1, gnash::key::F2, gnash::key::F3, gnash::key::F4, gnash::key::F5, gnash::key::F6, gnash::key::F7, gnash::key::F8, gnash::key::F9, gnash::key::F10, gnash::key::F11, gnash::key::F12, gnash::key::KP_0, gnash::key::KP_1, gnash::key::KP_2, gnash::key::KP_3, gnash::key::KP_4, gnash::key::KP_5, gnash::key::KP_6, gnash::key::KP_7, gnash::key::KP_8, gnash::key::KP_9, gnash::key::KP_SUBTRACT, gnash::key::KP_ADD, gnash::key::KP_DECIMAL, gnash::key::KP_MULTIPLY, gnash::key::KP_ENTER, gnash::key::ESCAPE, gnash::key::MINUS, gnash::key::EQUALS, gnash::key::BACKSPACE, gnash::key::TAB, gnash::key::LEFT_BRACE, gnash::key::RIGHT_BRACE, gnash::key::ENTER, gnash::key::CONTROL, gnash::key::SEMICOLON, gnash::key::SHIFT, gnash::key::BACKSLASH, gnash::key::COMMA, gnash::key::SLASH, gnash::key::ALT, SPACE, gnash::key::CAPSLOCK, gnash::key::NUM_LOCK, gnash::key::UP, gnash::key::DOWN, gnash::key::LEFT, gnash::key::RIGHT, gnash::key::PGUP, gnash::key::PGDN, gnash::key::INSERT, gnash::key::DELETEKEY, gnash::key::HOME, gnash::key::END, and gnash::key::INVALID.

Referenced by check().

std::vector< boost::shared_ptr< InputDevice > > gnash::EventDevice::scanForDevices ( ) [static]

Reimplemented from gnash::InputDevice.

References _, EventDevice(), and free().


The documentation for this class was generated from the following files: