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

Tablet Class Reference

#include <tablet.H>

Inheritance diagram for Tablet:

Inheritance graph
[legend]
Collaboration diagram for Tablet:

Collaboration graph
[legend]
List of all members.

Public Types

enum  TTYparity { TTY_ODD, TTY_EVEN, TTY_NONE }

Public Member Functions

 Tablet (FD_MANAGER *, TabletDesc::TabletType t, const char *tty=NULL, const char *name="DEV_TABLET")
virtual int activate ()
DEVice_2dstylus ()
DEVice_buttonsstylus_buttons ()
void mod_setting_bit (int bit_num, int val)
void add_handler (DEVhandler *h)
virtual void sample ()
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 reset ()
virtual void except ()
int fd ()

Protected Types

enum  { MAX_REC_SIZE = 128 }

Protected Attributes

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 99 of file tablet.H.


Member Enumeration Documentation

anonymous enum [protected, inherited]
 

Enumerator:
MAX_REC_SIZE 

Definition at line 79 of file tty.H.

enum TTYfd::TTYparity [inherited]
 

Enumerator:
TTY_ODD 
TTY_EVEN 
TTY_NONE 

Definition at line 96 of file tty.H.


Constructor & Destructor Documentation

Tablet::Tablet FD_MANAGER ,
TabletDesc::TabletType  t,
const char *  tty = NULL,
const char *  name = "DEV_TABLET"
 

Definition at line 40 of file tablet.C.

References TTYfd::_dev.


Member Function Documentation

int Tablet::activate  )  [virtual]
 

Reimplemented from TTYfd.

Definition at line 52 of file tablet.C.

References TabletDesc::_baud, _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 Tablet::add_handler DEVhandler h  )  [inline]
 

Reimplemented in TabletMultimode.

Definition at line 119 of file tablet.H.

References _styl_buttons, _stylus, and DEVice::add_handler().

Referenced by TabletMultimode::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().

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
 

Definition at line 74 of file tablet.C.

References _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 TabletMultimode::enqueue_available_tablet_events(), 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().

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().

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

Reimplemented in TabletMultimode.

Definition at line 46 of file tty.H.

virtual void TTYfd::sample  )  [inline, virtual, inherited]
 

Implements FD_EVENT.

Reimplemented in TabletMultimode.

Definition at line 104 of file tty.H.

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 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 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 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 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]
 

Definition at line 114 of file tablet.H.

References _stylus.

DEVice_buttons& Tablet::stylus_buttons  )  [inline]
 

Definition at line 115 of file tablet.H.

References _styl_buttons.

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 activate(), and mod_setting_bit().


Member Data Documentation

TabletDesc Tablet::_desc [protected]
 

Definition at line 106 of file tablet.H.

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

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

Definition at line 80 of file tty.H.

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

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().

DEVice_buttons Tablet::_styl_buttons [protected]
 

Definition at line 105 of file tablet.H.

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

DEVice_2d Tablet::_stylus [protected]
 

Definition at line 104 of file tablet.H.

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

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().

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

Definition at line 92 of file tty.H.

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

double Tablet::_yres [protected]
 

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:28 2006 for jot by  doxygen 1.4.4