Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

TScreen Class Reference

The interface to the system. More...

#include <system.h>

Inheritance diagram for TScreen::

TDisplay TApplication List of all members.

Public Methods

 TScreen ()
 ~TScreen ()

Static Public Methods

void getEvent (TEvent &event)
void makeBeep ()
void putEvent (TEvent &event)
void resume ()
void suspend ()
void drawCursor (int show)
void drawMouse (int show)
void moveCursor (int x, int y)
void writeRow (int dst, ushort *src, int len)

Static Public Attributes

ushort screenMode
uchar screenWidth
uchar screenHeight
ushortscreenBuffer
fd_set fdSetRead
fd_set fdSetWrite
fd_set fdSetExcept
fd_set fdActualRead
fd_set fdActualWrite
fd_set fdActualExcept

Detailed Description

A low-level class used to interface to the system.

TScreen provides low-level video attributes and functions. This class is used internally by TVision. You do not need to use it explicitly for normal applications.

Since this class was rewritten in the porting process, it is not a standard class and you should not use it. Otherwise you may end with a non-portable program.

Definition at line 489 of file system.h.


Constructor & Destructor Documentation

TScreen::TScreen ( )
 

Constructor.

Reads enviroment variables, acquires screen size, opens mouse and screen devices, catches some useful signals and starts an interval timer.

TScreen::~TScreen ( )
 

Destructor.

Releases the resources allocated by the constructor.


Member Function Documentation

void TScreen::drawCursor ( int show ) [static]
 

Shows or hides the cursor.

Flag `show' specifies the operation to perform.

void TScreen::drawMouse ( int show ) [static]
 

Shows or hides the mouse pointer.

Flag `show' specifies the operation to perform.

void TScreen::getEvent ( TEvent & event ) [static]
 

Returns the first available event.

Reimplemented in TApplication.

void TScreen::makeBeep ( ) [static]
 

Emits a beep.

void TScreen::moveCursor ( int x,
int y ) [static]
 

Moves the cursor to another place.

Parameters `x' and `y' are 0-based.

void TScreen::putEvent ( TEvent & event ) [static]
 

Puts an event in the event queue.

Do not use it, use TProgram::putEvent() if you need.

void TScreen::resume ( ) [static]
 

Recovers the execution of the application.

Resumes the execution of the process after the user stopped it. Called by TApplication::resume(). You should call the latter method.

Reimplemented in TApplication.

void TScreen::suspend ( void ) [static]
 

Stops the execution of the application.

Suspends execution of the process. Called by TApplication::suspend(). You should call the latter method.

Reimplemented in TApplication.

void TScreen::writeRow ( int dst,
ushort * src,
int len ) [static]
 

Writes a row of character & attribute pairs on the screen.

`dst' is the destination position, `src' is a pointer to the source buffer and `len' is the size of the buffer expressed as the number of pairs.


Member Data Documentation

fd_set TScreen::fdActualExcept [static]
 

File descriptor set to indicate I/O exceptions.

This set is returned by select() within getEvent(). It can be tested to handle exceptions on files mentioned in fdSetExcept.

Definition at line 630 of file system.h.

fd_set TScreen::fdActualRead [static]
 

File descriptor set to indicate read() availability.

This set is returned by select() within getEvent(). It can be tested to handle operations on files mentioned in fdSetRead.

Definition at line 616 of file system.h.

fd_set TScreen::fdActualWrite [static]
 

File descriptor set to indicate write() completion.

This set is returned by select() within getEvent(). It can be tested to handle operations on files mentioned in fdSetWrite.

Definition at line 623 of file system.h.

fd_set TScreen::fdSetExcept [static]
 

File descriptor set to watch for I/O exceptions.

This set is used in select() within getEvent(). It is empty by default and can be used freely.

Definition at line 609 of file system.h.

fd_set TScreen::fdSetRead [static]
 

File descriptor set to watch for read operations.

This set is used to watch for incoming mouse and keyboard data. Do not FD_ZERO() it in your program. However, FD_SET() and FD_CLR() are OK.

Definition at line 595 of file system.h.

fd_set TScreen::fdSetWrite [static]
 

File descriptor set to watch for write operations.

This set is used in select() within getEvent(). It is empty by default and can be used freely.

Definition at line 602 of file system.h.

ushort * TScreen::screenBuffer [static]
 

Holds the current screen buffer address.

It is initialized by the constructor of this class.

Definition at line 587 of file system.h.

uchar TScreen::screenHeight [static]
 

Holds the current screen height.

It is initialized by the constructor of this class.

Definition at line 581 of file system.h.

ushort TScreen::screenMode [static]
 

Holds the current screen mode.

It is initialized by the constructor if this class. It is read by TProgram::initScreen().

See also:
TDisplay

Definition at line 569 of file system.h.

uchar TScreen::screenWidth [static]
 

Holds the current screen width.

It is initialized by the constructor of this class.

Definition at line 575 of file system.h.


The documentation for this class was generated from the following file:
Generated at Sat Sep 22 20:19:33 2001 for TVision by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001