Gnash  0.8.11dev
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
gnash::InputDevice Class Referenceabstract

#include <InputDevice.h>

Inheritance diagram for gnash::InputDevice:
gnash::EventDevice gnash::MouseDevice gnash::TouchDevice

Classes

struct  input_data_t
 

Public Types

enum  devicetype_e {
  UNKNOWN, KEYBOARD, UMOUSE, MOUSE,
  TABLET, TOUCHSCREEN, TOUCHMOUSE, POWERBUTTON,
  SLEEPBUTTON, SERIALUSB, INFRARED, UINPUT,
  TSLIB
}
 

Public Member Functions

 InputDevice ()
 
 InputDevice (int x, int y)
 
virtual ~InputDevice ()
 
virtual const char * id ()=0
 
virtual bool init ()
 
bool init (devicetype_e type)
 
bool init (devicetype_e type, size_t size)
 
bool init (devicetype_e type, const std::string &filespec)
 
bool init (devicetype_e type, const std::string &filespec, size_t size)
 
virtual bool init (const std::string &filespec, size_t size)=0
 
virtual bool check ()=0
 
InputDevice::devicetype_e getType ()
 
void setType (InputDevice::devicetype_e x)
 
std::unique_ptr< std::uint8_t[]> readData (size_t size)
 
std::shared_ptr< input_data_tpopData ()
 
void setScreenSize (int x, int y)
 
void dump () const
 

Static Public Member Functions

static DSOEXPORT std::vector< std::shared_ptr< InputDevice > > scanForDevices ()
 
static DSOEXPORT std::unique_ptr< int[]> convertAbsCoords (int x, int y, int width, int height)
 

Protected Member Functions

void addData (bool pressed, key::code key, int modifier, int x, int y)
 

Protected Attributes

devicetype_e _type
 
std::string _filespec
 
int _fd
 
input_data_t _input_data
 
std::unique_ptr< std::uint8_t[]> _buffer
 
std::queue< std::shared_ptr< input_data_t > > _data
 
int _screen_width
 
int _screen_height
 

Member Enumeration Documentation

§ devicetype_e

Enumerator
UNKNOWN 
KEYBOARD 
UMOUSE 
MOUSE 
TABLET 
TOUCHSCREEN 
TOUCHMOUSE 
POWERBUTTON 
SLEEPBUTTON 
SERIALUSB 
INFRARED 
UINPUT 
TSLIB 

Constructor & Destructor Documentation

§ InputDevice() [1/2]

gnash::InputDevice::InputDevice ( )

§ InputDevice() [2/2]

gnash::InputDevice::InputDevice ( int  x,
int  y 
)

§ ~InputDevice()

gnash::InputDevice::~InputDevice ( )
virtual

Member Function Documentation

§ addData()

void gnash::InputDevice::addData ( bool  pressed,
key::code  key,
int  modifier,
int  x,
int  y 
)
protected

References _data, x, and y.

Referenced by gnash::MouseDevice::check(), and gnash::TouchDevice::check().

§ check()

virtual bool gnash::InputDevice::check ( )
pure virtual

§ convertAbsCoords()

std::unique_ptr< int[]> gnash::InputDevice::convertAbsCoords ( int  x,
int  y,
int  width,
int  height 
)
static

§ dump()

void gnash::InputDevice::dump ( ) const

References _fd, _filespec, and _type.

§ getType()

InputDevice::devicetype_e gnash::InputDevice::getType ( )
inline

§ id()

virtual const char* gnash::InputDevice::id ( )
pure virtual

§ init() [1/6]

bool gnash::InputDevice::init ( )
virtual

Reimplemented in gnash::EventDevice, gnash::TouchDevice, and gnash::MouseDevice.

Referenced by init().

§ init() [2/6]

bool gnash::InputDevice::init ( InputDevice::devicetype_e  type)

References GNASH_REPORT_FUNCTION, and init().

§ init() [3/6]

bool gnash::InputDevice::init ( InputDevice::devicetype_e  type,
size_t  size 
)

References GNASH_REPORT_FUNCTION, and init().

§ init() [4/6]

bool gnash::InputDevice::init ( devicetype_e  type,
const std::string &  filespec 
)

§ init() [5/6]

bool gnash::InputDevice::init ( InputDevice::devicetype_e  type,
const std::string &  filespec,
size_t  size 
)

§ init() [6/6]

virtual bool gnash::InputDevice::init ( const std::string &  filespec,
size_t  size 
)
pure virtual

§ popData()

std::shared_ptr<input_data_t> gnash::InputDevice::popData ( )
inline

§ readData()

std::unique_ptr< std::uint8_t[]> gnash::InputDevice::readData ( size_t  size)

§ scanForDevices()

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

§ setScreenSize()

void gnash::InputDevice::setScreenSize ( int  x,
int  y 
)
inline

References x, and y.

§ setType()

void gnash::InputDevice::setType ( InputDevice::devicetype_e  x)
inline

References x.

Member Data Documentation

§ _buffer

std::unique_ptr<std::uint8_t[]> gnash::InputDevice::_buffer
protected

§ _data

std::queue<std::shared_ptr<input_data_t> > gnash::InputDevice::_data
protected

§ _fd

int gnash::InputDevice::_fd
protected

§ _filespec

std::string gnash::InputDevice::_filespec
protected

§ _input_data

input_data_t gnash::InputDevice::_input_data
protected

§ _screen_height

int gnash::InputDevice::_screen_height
protected

§ _screen_width

int gnash::InputDevice::_screen_width
protected

§ _type

devicetype_e gnash::InputDevice::_type
protected

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