home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 14 / CDACTUAL.iso / cdactual / demobin / share / program / c / XLIB04C.ZIP / XTEXT.H < prev    next >
Encoding:
C/C++ Source or Header  |  1993-02-15  |  2.4 KB  |  84 lines

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