home *** CD-ROM | disk | FTP | other *** search
/ No Fragments Archive 12: Textmags & Docs / nf_archive_12.iso / MAGS / SOURCES / ATARI_SRC.ZIP / atari source / FALCON / ACC / OUTLINE.ACC / FONTHEAD.H < prev    next >
Encoding:
C/C++ Source or Header  |  2001-02-10  |  3.5 KB  |  117 lines

  1. /* FONT_HEAD.H
  2.  * ====================================================================
  3.  * Contains structures and misc #defines for the Fonts ACC
  4.  *
  5.  * CREATED:  Dec  27, 1989 k.soohoo
  6.  * Modified: June 26, 1991 cjg
  7.  *          Dec   7, 1992 cjg - still not shipped...
  8.  *         Dec  15, 1992 cjg - Merry Christmas
  9.  *                   - Remove Bitmap Fonts
  10.  *                   - Remove Devices
  11.  */
  12.  
  13. /* INCLUDES
  14.  * ====================================================================
  15.  */
  16. #include <sys\gemskel.h>
  17. #include <string.h>
  18. #include <tos.h>
  19. #include <stdio.h>
  20. #include <stdlib.h>
  21. #include <ctype.h>
  22. #include <ext.h>
  23. #include <errno.h>
  24.  
  25. #define MAX_POINTS    10    /* Maximum # of point sizes per font */
  26.                 /* This is the predefined ones in the*/
  27.                 /* extend.sys file.             */
  28. #define MAX_FONTS    400    /* Max # fonts allowed - Bitmap + outline*/
  29.  
  30. #define MAX_FONT_SIZE    999    /* Largest predefined point size allowed */
  31. #define MIN_FONT_SIZE    1    /* Minimum predefined point size allowed */
  32. #define FRONT_LENGTH    32    /* # of characters across do display     */
  33.  
  34. #define E_OK         0
  35.  
  36. #define TRUE        1
  37. #define FALSE        0
  38.  
  39. #define SPD_FONT    1
  40. #define BITMAP_FONT     2
  41.  
  42. #define WIND_H        10
  43.  
  44. #if 0
  45. #define mouse_on()    graf_mouse(M_ON, 0L)
  46. #define mouse_off()    graf_mouse(M_OFF, 0L)
  47. #define mouse_busy()    graf_mouse(BUSY_BEE, 0L)
  48. #define mouse_arrow()    graf_mouse(ARROW, 0L)
  49. #endif
  50.  
  51. #define find_newline(x)    while ((bufptr[x] != '\n') && (x < alen)) {++x;}
  52.  
  53.  
  54.  
  55.  
  56. /* STRUCTURES
  57.  * ====================================================================
  58.  */
  59.  
  60. /* FONT STRUCTURE
  61.  * ====================================================================
  62.  * 99 bytes per node - 9900 bytes for 100 nodes
  63.  *              34650 bytes for 350 nodes
  64.  *              39600 bytes for 400 nodes
  65.  *              45540 bytes for 450 nodes
  66.  *              49500 bytes for 500 nodes
  67.  */
  68. typedef struct f_node
  69. {
  70.     char font_name[33];    /* Pointer to name of the font */
  71.     char font_file[16];    /* File name this font obeys + .SPD */
  72.     int  font_id;        /* font id number   */
  73.     char font_set[2];    /* Character Set ID */
  74.     BOOLEAN select;        /* TRUE - INSTALLED FONT, FALSE - AVAILABLE*/
  75.     long fsize;        /* Size of file in bytes */
  76.     int  type;        /* Type of font 1 - SPD, 2 - BitMap*/
  77.     BOOLEAN aflag;        /* 0 - Deselect/ 1 = Selected      
  78.                     * This is the actual state visible on 
  79.                     * the screen of the filename node.
  80.                     */
  81.        BOOLEAN sflag;        /* The Shadow flag, this is what the Action
  82.                     * Flag 'WAS' before it was toggled.
  83.                     * It is used for the scrolling toggle
  84.                     * routines.
  85.                     */
  86.        long   FBuffSize;    /* Minimum Font Buffer Size      */
  87.        long   CBuffSize;    /* Minimum Character Buffer Size */             
  88.  
  89.     struct f_node *fnext;    /* Link to next font in alpha order */
  90.     struct f_node *fprev;    /* Link to previous font in alpha order */
  91.     int points[ MAX_POINTS ];/* Point Sizes for this font */                    
  92. } FON, *FON_PTR;
  93.  
  94.  
  95. /* MACROS
  96.  * ====================================================================
  97.  */
  98. #define FNEXT(ptr)    ptr->fnext
  99. #define FPREV(ptr)    ptr->fprev
  100. #define FTYPE(ptr)    ptr->type
  101. #define SEL(ptr)    ptr->select
  102. #define FNAME(ptr)    ptr->font_name
  103. #define FFNAME(ptr)    ptr->font_file
  104. #define FSIZE(ptr)    ptr->fsize
  105. #define AFLAG(ptr)    ptr->aflag
  106. #define SFLAG(ptr)    ptr->sflag
  107.  
  108. #define POINT_SIZE(ptr) ptr->font_id
  109. #define FONTID(ptr)    ptr->font_id
  110. #define POINTS(ptr)    ptr->points
  111.  
  112. #define FBUFF_SIZE(ptr) ptr->FBuffSize
  113. #define CBUFF_SIZE(ptr) ptr->CBuffSize
  114. #define FCHARSET(ptr)   ptr->font_set
  115.  
  116.  
  117.