Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

TabletMultimode Class Reference

#include <tablet.H>

Inheritance diagram for TabletMultimode:

Inheritance graph
[legend]
Collaboration diagram for TabletMultimode:

Collaboration graph
[legend]
List of all members.

Public Types

enum  { STYLUS = 0, PUCK = 1 }
enum  TTYparity { TTY_ODD, TTY_EVEN, TTY_NONE }

Public Member Functions

 TabletMultimode (FD_MANAGER *, TabletDesc::TabletType type=TabletDesc::LARGE, const char *tty=NULL, const char *name="DEV_TABLET")
void enqueue_available_tablet_events ()
virtual void sample ()
DEVice_2d_absrelpuck ()
DEVice_buttonspuck_buttons ()
double stylus_pressure ()
void add_handler (DEVhandler *h)
void reset ()
virtual int activate ()
DEVice_2dstylus ()
DEVice_buttonsstylus_buttons ()
void mod_setting_bit (int bit_num, int val)
virtual int deactivate ()
int open ()
int close ()
int not_configured (int, int)
int clear ()
int send_break (int duration)
void print_flags ()
int set_speed (long speed)
int set_stopbits (int num)
int set_charsize (short size)
int set_parity (TTYparity parity)
int set_min_and_time (int min_num_chars, int min_delay_between_chars_or_total_time)
int set_flags ()
int get_flags ()
int read_synchronized (char sentinel, int sentinel_bit, int which, int record_size, char *buf)
int read_synchronized (char sentinel, int record_size, char *buf)
int read_synchronized (int sentinel_bit, int record_size, char *buf)
int read_all (char *buf, int maxbytes)
int nread (char *buf, int readnum, int timeout_millisecs)
int drain ()
int write (const char *buf, int writenum, int timeout_millisecs)
int setup ()
virtual void except ()
int fd ()

Protected Types

enum  { MAX_REC_SIZE = 128 }

Protected Attributes

DEVice_2d_absrel _puck
DEVice_buttons _puck_buttons
int _device_to_report
int _num_bytes_left_from_last_read
char _tablet_data_buffer [4096]
TabletQueue _stylus_queue
TabletQueue _puck_queue
int _using_stylus_eraser
double _stylus_pressure
double _yres
DEVice_2d _stylus
DEVice_buttons _styl_buttons
TabletDesc _desc
char _dev [256]
char _synch_buf [MAX_REC_SIZE]
int _synch_pos
termios _ios_saved
termios _ios_current
FD_MANAGER_manager
int _fd

Static Protected Attributes

static int _timeout = 0

Detailed Description

Definition at line 131 of file tablet.H.


Member Enumeration Documentation

anonymous enum [protected, inherited]
 

Enumerator:
MAX_REC_SIZE 

Definition at line 79 of file tty.H.

anonymous enum
 

Enumerator:
STYLUS 
PUCK 

Definition at line 149 of file tablet.H.

enum TTYfd::TTYparity [inherited]
 

Enumerator:
TTY_ODD 
TTY_EVEN 
TTY_NONE 

Definition at line 96 of file tty.H.


Constructor & Destructor Documentation

TabletMultimode::TabletMultimode FD_MANAGER ,
TabletDesc::TabletType  type = TabletDesc::LARGE,
const char *  tty = NULL,
const char *  name = "DEV_TABLET"
 

Definition at line 287 of file tablet.C.

References _num_bytes_left_from_last_read, _puck_queue, _stylus_queue, and TabletQueue::reset().


Member Function Documentation

int Tablet::activate  )  [virtual, inherited]
 

Reimplemented from TTYfd.

Definition at line 52 of file tablet.C.

References TabletDesc::_baud, Tablet::_desc, TabletDesc::_init_str, TTYfd::activate(), TTYfd::set_charsize(), TTYfd::set_parity(), TTYfd::set_speed(), TTYfd::set_stopbits(), TTYfd::TTY_NONE, and TTYfd::write().

void TabletMultimode::add_handler DEVhandler h  )  [inline]
 

Reimplemented from Tablet.

Definition at line 167 of file tablet.H.

References _puck, _puck_buttons, Tablet::add_handler(), and DEVice::add_handler().

int TTYfd::clear  )  [inherited]
 

Definition at line 195 of file tty.C.

References FD_EVENT::_fd, and HANDLE().

Referenced by TTYfd::activate(), and TTYfd::read_synchronized().

int TTYfd::close  )  [inherited]
 

Definition at line 801 of file tty.C.

References FD_EVENT::_fd, TTYfd::_ios_current, TTYfd::_ios_saved, HANDLE(), and TTYfd::set_flags().

Referenced by TTYfd::deactivate().

int TTYfd::deactivate  )  [virtual, inherited]
 

Definition at line 884 of file tty.C.

References FD_EVENT::_fd, TTYfd::_manager, TTYfd::close(), and FD_MANAGER::rem().

Referenced by TTYfd::~TTYfd().

int TTYfd::drain  )  [inherited]
 

Definition at line 660 of file tty.C.

References FD_EVENT::_fd, and HANDLE().

void TabletMultimode::enqueue_available_tablet_events  ) 
 

Definition at line 302 of file tablet.C.

References Tablet::_desc, _num_bytes_left_from_last_read, _puck_queue, TabletDesc::_rec_len, _stylus_queue, _tablet_data_buffer, TTYfd::_timeout, BIT, debug, TabletQueue::enqueue(), TabletEvent::get_device(), TabletEvent::is_valid(), TTYfd::nread(), and TabletEvent::STYLUS.

Referenced by sample().

virtual void FD_EVENT::except  )  [inline, virtual, inherited]
 

Definition at line 47 of file tty.H.

int FD_EVENT::fd  )  [inline, inherited]
 

Definition at line 48 of file tty.H.

References FD_EVENT::_fd.

Referenced by Network::connect_to(), NetStream::interpret(), and WIN_MANAGER::tty_to_id::ready().

int TTYfd::get_flags  )  [inherited]
 

Definition at line 155 of file tty.C.

References FD_EVENT::_fd, TTYfd::_ios_current, and HANDLE().

Referenced by TTYfd::open(), TTYfd::print_flags(), TTYfd::set_charsize(), TTYfd::set_min_and_time(), TTYfd::set_parity(), TTYfd::set_speed(), TTYfd::set_stopbits(), and TTYfd::setup().

void Tablet::mod_setting_bit int  bit_num,
int  val
[inherited]
 

Definition at line 74 of file tablet.C.

References Tablet::_desc, TabletDesc::_type, TabletDesc::INTUOS, TabletDesc::LARGE, TabletDesc::LCD, TabletDesc::MULTI_MODE, TTYfd::nread(), TabletDesc::SMALL, TabletDesc::TINY, and TTYfd::write().

int TTYfd::not_configured int  ,
int 
[inherited]
 

Definition at line 139 of file tty.C.

References TTYfd::_ios_current.

Referenced by TTYfd::nread(), TTYfd::read_all(), and TTYfd::set_min_and_time().

int TTYfd::nread char *  buf,
int  readnum,
int  timeout_millisecs
[inherited]
 

Definition at line 526 of file tty.C.

References FD_EVENT::_fd, HANDLE(), MILLISEC_TO_TIME, TTYfd::not_configured(), SELECT, TTYfd::set_min_and_time(), TTYdebug, VMIN_CHARACTERS, and VTIME_LENGTH.

Referenced by enqueue_available_tablet_events(), Tablet::mod_setting_bit(), and TTYfd::read_synchronized().

int TTYfd::open  )  [inherited]
 

Definition at line 832 of file tty.C.

References TTYfd::_dev, FD_EVENT::_fd, TTYfd::_ios_current, TTYfd::_ios_saved, TTYfd::get_flags(), and HANDLE().

Referenced by TTYfd::activate().

void TTYfd::print_flags  )  [inherited]
 

Definition at line 256 of file tty.C.

References TTYfd::_ios_current, brcase, cspeed(), and TTYfd::get_flags().

DEVice_2d_absrel& TabletMultimode::puck  )  [inline]
 

Definition at line 162 of file tablet.H.

References _puck.

DEVice_buttons& TabletMultimode::puck_buttons  )  [inline]
 

Definition at line 163 of file tablet.H.

References _puck_buttons.

int TTYfd::read_all char *  buf,
int  maxbytes
[inherited]
 

Definition at line 474 of file tty.C.

References FD_EVENT::_fd, HANDLE(), TTYfd::not_configured(), TTYfd::set_min_and_time(), and TTYdebug.

int TTYfd::read_synchronized int  sentinel_bit,
int  record_size,
char *  buf
[inherited]
 

Definition at line 594 of file tty.C.

References TTYfd::read_synchronized().

int TTYfd::read_synchronized char  sentinel,
int  record_size,
char *  buf
[inherited]
 

Definition at line 584 of file tty.C.

References TTYfd::read_synchronized().

int TTYfd::read_synchronized char  sentinel,
int  sentinel_bit,
int  which,
int  record_size,
char *  buf
[inherited]
 

Definition at line 604 of file tty.C.

References TTYfd::_synch_buf, TTYfd::_synch_pos, TTYfd::_timeout, BIT, TTYfd::clear(), TTYfd::MAX_REC_SIZE, and TTYfd::nread().

Referenced by TTYfd::read_synchronized().

void TabletMultimode::reset  )  [inline, virtual]
 

Reimplemented from FD_EVENT.

Definition at line 171 of file tablet.H.

References _puck_queue, _stylus_queue, and TabletQueue::reset().

void TabletMultimode::sample  )  [virtual]
 

Reimplemented from TTYfd.

Definition at line 382 of file tablet.C.

References Tablet::_desc, _device_to_report, _puck, _puck_buttons, _puck_queue, Tablet::_styl_buttons, Tablet::_stylus, _stylus_pressure, _stylus_queue, TabletDesc::_type, _using_stylus_eraser, BIT, TabletQueue::dequeue(), DEVice_buttons::DOWN, TabletQueue::empty(), enqueue_available_tablet_events(), DEVice_2d::event(), DEVice_buttons::event(), DEVice_buttons::get(), TabletEvent::get_buttons(), TabletEvent::get_device(), TabletEvent::get_pos(), TabletDesc::INTUOS, TabletEvent::is_eraser(), DEVmod_gen::mods(), TabletEvent::PUCK, PUCK, DEVice_2d::set_pressure(), TabletEvent::STYLUS, STYLUS, TabletEvent::stylus_pressure(), TabletEvent::touching_tablet(), and DEVice_buttons::UP.

int TTYfd::send_break int  duration  )  [inherited]
 

Definition at line 211 of file tty.C.

References FD_EVENT::_fd, and HANDLE().

int TTYfd::set_charsize short  size  )  [inherited]
 

Definition at line 381 of file tty.C.

References TTYfd::_ios_current, TTYfd::get_flags(), int(), and TTYfd::set_flags().

Referenced by Tablet::activate().

int TTYfd::set_flags  )  [inherited]
 

Definition at line 178 of file tty.C.

References FD_EVENT::_fd, TTYfd::_ios_current, and HANDLE().

Referenced by TTYfd::close(), TTYfd::set_charsize(), TTYfd::set_min_and_time(), TTYfd::set_parity(), TTYfd::set_speed(), TTYfd::set_stopbits(), and TTYfd::setup().

int TTYfd::set_min_and_time int  min_num_chars,
int  min_delay_between_chars_or_total_time
[inherited]
 

Definition at line 443 of file tty.C.

References TTYfd::_ios_current, TTYfd::get_flags(), TTYfd::not_configured(), and TTYfd::set_flags().

Referenced by TTYfd::nread(), and TTYfd::read_all().

int TTYfd::set_parity TTYparity  parity  )  [inherited]
 

Definition at line 402 of file tty.C.

References TTYfd::_ios_current, brcase, TTYfd::get_flags(), TTYfd::set_flags(), TTYfd::TTY_EVEN, TTYfd::TTY_NONE, and TTYfd::TTY_ODD.

Referenced by Tablet::activate().

int TTYfd::set_speed long  speed  )  [inherited]
 

Definition at line 332 of file tty.C.

References TTYfd::_ios_current, TTYfd::get_flags(), and TTYfd::set_flags().

Referenced by Tablet::activate().

int TTYfd::set_stopbits int  num  )  [inherited]
 

Definition at line 355 of file tty.C.

References TTYfd::_ios_current, TTYfd::get_flags(), and TTYfd::set_flags().

Referenced by Tablet::activate().

int TTYfd::setup  )  [inherited]
 

Definition at line 731 of file tty.C.

References FD_EVENT::_fd, TTYfd::_ios_current, TTYfd::get_flags(), TTYfd::set_flags(), TRUE, VMIN_CHARACTERS, and VTIME_LENGTH.

Referenced by TTYfd::activate().

DEVice_2d& Tablet::stylus  )  [inline, inherited]
 

Definition at line 114 of file tablet.H.

References Tablet::_stylus.

DEVice_buttons& Tablet::stylus_buttons  )  [inline, inherited]
 

Definition at line 115 of file tablet.H.

References Tablet::_styl_buttons.

double TabletMultimode::stylus_pressure  )  [inline]
 

Definition at line 165 of file tablet.H.

References _stylus_pressure.

int TTYfd::write const char *  buf,
int  writenum,
int  timeout_millisecs
[inherited]
 

Definition at line 673 of file tty.C.

References FD_EVENT::_fd, HANDLE(), MILLISEC_TO_TIME, SELECT, and TTYdebug.

Referenced by Tablet::activate(), and Tablet::mod_setting_bit().


Member Data Documentation

TabletDesc Tablet::_desc [protected, inherited]
 

Definition at line 106 of file tablet.H.

Referenced by Tablet::activate(), enqueue_available_tablet_events(), Tablet::mod_setting_bit(), and sample().

char TTYfd::_dev[256] [protected, inherited]
 

Definition at line 80 of file tty.H.

Referenced by TTYfd::activate(), TTYfd::open(), Tablet::Tablet(), and TTYfd::TTYfd().

int TabletMultimode::_device_to_report [protected]
 

Definition at line 137 of file tablet.H.

Referenced by sample().

int FD_EVENT::_fd [protected, inherited]
 

Definition at line 41 of file tty.H.

Referenced by NetStream::_die(), NetStream::attached(), TTYfd::clear(), TTYfd::close(), Network::configure(), TTYfd::deactivate(), TTYfd::drain(), FD_EVENT::fd(), TTYfd::get_flags(), NetStream::NetStream(), NetStream::no_tcp_delay(), TTYfd::nread(), TTYfd::open(), TTYfd::read_all(), NetStream::read_from_net(), TTYfd::send_break(), NetStream::set_blocking(), TTYfd::set_flags(), TTYfd::setup(), Network::wait_for_connect(), TTYfd::write(), NetStream::write_to_net(), and NetStream::~NetStream().

struct termios TTYfd::_ios_current [protected, inherited]
 

Definition at line 85 of file tty.H.

Referenced by TTYfd::close(), TTYfd::get_flags(), TTYfd::not_configured(), TTYfd::open(), TTYfd::print_flags(), TTYfd::set_charsize(), TTYfd::set_flags(), TTYfd::set_min_and_time(), TTYfd::set_parity(), TTYfd::set_speed(), TTYfd::set_stopbits(), and TTYfd::setup().

struct termios TTYfd::_ios_saved [protected, inherited]
 

Definition at line 84 of file tty.H.

Referenced by TTYfd::close(), and TTYfd::open().

FD_MANAGER* TTYfd::_manager [protected, inherited]
 

Definition at line 93 of file tty.H.

Referenced by TTYfd::activate(), and TTYfd::deactivate().

int TabletMultimode::_num_bytes_left_from_last_read [protected]
 

Definition at line 138 of file tablet.H.

Referenced by enqueue_available_tablet_events(), and TabletMultimode().

DEVice_2d_absrel TabletMultimode::_puck [protected]
 

Definition at line 134 of file tablet.H.

Referenced by add_handler(), puck(), and sample().

DEVice_buttons TabletMultimode::_puck_buttons [protected]
 

Definition at line 135 of file tablet.H.

Referenced by add_handler(), puck_buttons(), and sample().

TabletQueue TabletMultimode::_puck_queue [protected]
 

Definition at line 142 of file tablet.H.

Referenced by enqueue_available_tablet_events(), reset(), sample(), and TabletMultimode().

DEVice_buttons Tablet::_styl_buttons [protected, inherited]
 

Definition at line 105 of file tablet.H.

Referenced by Tablet::add_handler(), sample(), and Tablet::stylus_buttons().

DEVice_2d Tablet::_stylus [protected, inherited]
 

Definition at line 104 of file tablet.H.

Referenced by Tablet::add_handler(), sample(), and Tablet::stylus().

double TabletMultimode::_stylus_pressure [protected]
 

Definition at line 145 of file tablet.H.

Referenced by sample(), and stylus_pressure().

TabletQueue TabletMultimode::_stylus_queue [protected]
 

Definition at line 141 of file tablet.H.

Referenced by enqueue_available_tablet_events(), reset(), sample(), and TabletMultimode().

char TTYfd::_synch_buf[MAX_REC_SIZE] [protected, inherited]
 

Definition at line 81 of file tty.H.

Referenced by TTYfd::read_synchronized().

int TTYfd::_synch_pos [protected, inherited]
 

Definition at line 82 of file tty.H.

Referenced by TTYfd::read_synchronized().

char TabletMultimode::_tablet_data_buffer[4096] [protected]
 

Definition at line 139 of file tablet.H.

Referenced by enqueue_available_tablet_events().

int TTYfd::_timeout = 0 [static, protected, inherited]
 

Definition at line 92 of file tty.H.

Referenced by enqueue_available_tablet_events(), TTYfd::read_synchronized(), and TTYfd::TTYfd().

int TabletMultimode::_using_stylus_eraser [protected]
 

Definition at line 144 of file tablet.H.

Referenced by sample().

double Tablet::_yres [protected, inherited]
 

Definition at line 103 of file tablet.H.


The documentation for this class was generated from the following files:
Generated on Mon Sep 18 11:47:29 2006 for jot by  doxygen 1.4.4