]> git.karo-electronics.de Git - karo-tx-redboot.git/blob - packages/services/gfx/mw/v2_0/src/drivers/romfont.h
Initial revision
[karo-tx-redboot.git] / packages / services / gfx / mw / v2_0 / src / drivers / romfont.h
1 /*
2  * Copyright (c) 1999 Greg Haerr <greg@censoft.com>
3  *
4  * Screen Driver Utilities
5  *
6  * PC ROM Font Routine Header (PC ROM font format)
7  *
8  * These routines are screen driver entry points.
9  */
10
11 /* compiled in fonts*/
12 #define NUMBER_FONTS    1       /* rom font only for now*/
13
14 #define ROM_CHAR_WIDTH  8       /* number of pixels for character width */
15 #define MAX_ROM_HEIGHT  16      /* max rom character height*/
16 #define FONT_CHARS      256     /* number of characters in font tables */
17
18 /* int10 functions*/
19 #define FNGETROMADDR    0x1130  /* function for address of rom character table*/
20 #define GETROM8x14      0x0200  /* want address of ROM 8x14 char table*/
21
22 /* entry points*/
23 void    pcrom_init(PSD psd);
24 MWBOOL  pcrom_getfontinfo(PMWFONT pfont,PMWFONTINFO pfontinfo);
25 void    pcrom_gettextsize(PMWFONT pfont, const void *text, int cc,
26                 MWCOORD *pwidth, MWCOORD *pheight, MWCOORD *pbase);
27 void    pcrom_gettextbits(PMWFONT pfont, int ch, MWIMAGEBITS *retmap,
28                 MWCOORD *pwidth, MWCOORD *pheight, MWCOORD *pbase);
29 void    pcrom_unloadfont(PMWFONT pfont);
30
31 void    corefont_drawtext(PMWFONT pfont, PSD psd, MWCOORD x, MWCOORD y,
32                 const void *text, int cc, int flags);
33
34 /* local data*/
35 extern int      ROM_CHAR_HEIGHT; /* number of scan lines in fonts in ROM */
36 extern FARADDR  rom_char_addr;
37 extern MWCOREFONT pcrom_fonts[NUMBER_FONTS];
38
39 /* the following aren't used yet*/
40 void    pcrom_drawtext(PMWFONT pfont, PSD psd, MWCOORD x, MWCOORD y,
41                 const void *text, int n, MWPIXELVAL fg);
42 void    gen_drawbitmap(PSD psd,MWCOORD x,MWCOORD y,MWCOORD width,MWCOORD height,
43                 MWIMAGEBITS *table, MWPIXELVAL fgcolor);