]> 4ch.mooo.com Git - 16.git/blob - 16/xlib/XTEXT.H
added xlib to the project and i gotta convert the damn makefile -.-
[16.git] / 16 / xlib / XTEXT.H
1 /*-----------------------------------------------------------------------\r
2 ;\r
3 ; XTEXT - header file\r
4 ;\r
5 ;\r
6 ;\r
7 ; ****** XLIB - Mode X graphics library                ****************\r
8 ; ******                                               ****************\r
9 ; ****** Written By Themie Gouthas                     ****************\r
10 ;\r
11 ; egg@dstos3.dsto.gov.au\r
12 ; teg@bart.dsto.gov.au\r
13 ;\r
14 ;  Terminology & notes:\r
15 ;         VRAM ==   Video RAM\r
16 ;         SRAM ==   System RAM\r
17 ;         X coordinates are in pixels unless explicitly stated\r
18 ;\r
19 ;-----------------------------------------------------------------------*/\r
20 \r
21 #ifndef _XTEXT_H_\r
22 #define _XTEXT_H_\r
23 \r
24 \r
25 #define FONT_8x8  0\r
26 #define FONT_8x15 1\r
27 #define FONT_USER 2\r
28 \r
29 /* FUNCTIONS =========================================================== */\r
30 \r
31 #ifdef __cplusplus\r
32 extern "C" {\r
33 #endif\r
34 \r
35 WORD x_text_init(void);            /* Initialize text functionns  */\r
36 \r
37 void x_set_font(\r
38          WORD FontId);             /* Set the font style          */\r
39 \r
40 void x_register_userfont(          /* register a user defined font */\r
41          char far *UserFontPtr);\r
42 \r
43 unsigned int  x_char_put(          /* Draw a text character using  */\r
44          char ch,                  /* the currently active font    */\r
45          WORD X,\r
46          WORD Y,\r
47          WORD PgOffs,\r
48          WORD Color);\r
49 \r
50 \r
51 unsigned int  x_get_char_width(    /* Get the character width      */\r
52          char ch);\r
53 \r
54 \r
55 /* the folowing function is from xprintf.c but is included due to its     */\r
56 /* close relationship with this module                                    */\r
57 \r
58 void x_printf(                          /* formatted text output */\r
59         WORD x,\r
60         WORD y,\r
61         WORD ScrnOffs,\r
62         WORD color,\r
63         char *ln,...);\r
64 \r
65 void x_bgprintf(                          /* formatted text output */\r
66         WORD x,\r
67         WORD y,\r
68         WORD ScrnOffs,\r
69         WORD fgcolor,\r
70         WORD bgcolor,\r
71         char *ln,...);\r
72 \r
73 #ifdef __cplusplus\r
74 }\r
75 #endif\r
76 \r
77 \r
78 /* VARIABLES =========================================================== */\r
79 \r
80 extern BYTE CharHeight;     /* Char height of currently active font        */\r
81 extern BYTE CharWidth;      /* Char width of currently active font         */\r
82 extern BYTE FirstChar;      /* First char in the curr. active font         */\r
83 \r
84 extern BYTE UserCharHeight; /* Char height of currentle regist'd user font */\r
85 extern BYTE UserCharWidth;  /* Char height of currentle regist'd user font */\r
86 extern BYTE UserFirstChar;  /* First char of the curr. regist'd usera font */\r
87 \r
88 \r
89 #endif\r
90 \r
91 \r