summaryrefslogtreecommitdiff
path: root/dviware/dvgtk/vdu.h
blob: 431f7c8da0a8cbb241593dfa168dbd3151996465 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
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 */