diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /dviware/dvgtk/vdu.h |
Initial commit
Diffstat (limited to 'dviware/dvgtk/vdu.h')
-rw-r--r-- | dviware/dvgtk/vdu.h | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/dviware/dvgtk/vdu.h b/dviware/dvgtk/vdu.h new file mode 100644 index 0000000000..431f7c8da0 --- /dev/null +++ b/dviware/dvgtk/vdu.h @@ -0,0 +1,87 @@ +/* vdu.h - VDU driver interface + $Id: vdu.h,v 0.2 1997/03/28 03:14:10 tjchol01 Exp $ + Authors: Andrew Trevorrow, Ian Dall, Geoffrey Tobin, Tomasz J. Cholewo + */ + +#ifndef VDU_H +#define VDU_H + +#include "dvgt.h" + +/* VDU implements the screen-driving routines used by DVItoVDU. + InitVDU initializes the parameters for the VDU screen. + After starting up, DVItoVDU breaks the screen into 2 parts: + + 1. The DIALOGUE REGION will consist of the top 4 text lines on the screen. + This region is used to display DVI and window status information, + various kinds of messages and the command prompt. DVItoVDU assumes + text lines on the screen start at 1 and increase downwards. The bottom + text line on the screen is given by the parameter bottoml (also the total + number of text lines). + + 2. The WINDOW REGION is typically the remaining area of the screen and + is used to display some sort of representation of the current DVI page. + The user can move the window over any part of the current page, + or even completely outside the page edges (but only just). + The user can scale the page display by changing the width and height of + the window region; windowwd and windowht are the initial, unscaled + dimensions where one paper pixel equals one screen pixel. + When addressing screen pixels, DVItoVDU assumes the top left pixel + in the screen is at (0,0); horizontal coordinates increase to the right + and vertical coordinates increase down the screen. The top left pixel + in the window region is at (windowh,windowv) in this coordinate scheme. + + The following diagram illustrates the screen coordinate system used by + DVItoVDU and shows what the VDU parameters refer to. + + --> h increases to the right + h,v=(0,0) *------------------------------------------------ + | DVIstatusl | top text line = 1 + | | DIALOGUE REGION windowstatusl | (lines increase + V | messagel | downwards) + | commandl | + v * (windowh,windowv) ----------------------------| --- + increases | | | + down | | | + | | | + | | | + | WINDOW REGION | windowht + | contains windowwd * windowht pixels | | + | | | + | | | + | bottoml | | + ------------------------------------------------- --- + + |------------------ windowwd -------------------| + +*/ + +extern int DVIstatusl; /* DVI status line */ +extern int windowstatusl; /* window status line */ +extern int messagel; /* message line */ +extern int commandl; /* command line */ +extern int bottoml; /* bottom line; also num. of text lines in screen */ + +extern int windowh; /* horizontal coord for window's top left screen pixel */ +extern int windowv; /* vertical coord for window's top left screen pixel */ +extern int windowwd; /* width of window in screen pixels */ +extern int windowht; /* height of window in screen pixels */ + +extern boolean vdu_clears_lines; /* Can current VDU clear a single line? */ + +extern void InitVDU (); +extern void ClearScreen (); + +extern void StartText (); +extern void MoveToTextLine PARAMS ((int line)); +extern void ClearTextLine PARAMS ((int line)); +extern void ClearScreen (); +extern void StartGraphics (); +extern void LoadFont PARAMS ((char *fontname, int fontsize, double mag, double hscale, double vscale)); +extern void ShowChar PARAMS ((int screenh, int screenv, char ch)); +extern void ShowRectangle PARAMS ((int screenh, int screenv, int width, int height, char ch)); +extern void ResetVDU (); + +#endif /* VDU_H */ + +/* end vdu.h */ |