home *** CD-ROM | disk | FTP | other *** search
/ Executor 2.0 / executorv2.0.iso / pc / dos / extra / source / browser / browser.hqx / Browser / fontda.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-29  |  1.6 KB  |  109 lines

  1. #if !defined(_FONTDA_H_)
  2. #define _FONTDA_H_
  3.  
  4. enum useful_fontda_constants
  5. {
  6.   DRVR_MIN = 12,
  7.   DRVR_MAX = 31,
  8.   FONT_MIN = 0,
  9.   FONT_MAX = 32767,
  10.   NFNT_MIN = 0,
  11.   NFNT_MAX = 32767,
  12.   FOND_MIN = 0,
  13.   FOND_MAX = 32767
  14. };
  15.  
  16. #define CHARS_NEEDED(n) ((((long) n)+31)/32*4)
  17.  
  18. typedef unsigned char uchar;
  19.  
  20. typedef short boolean_t;
  21.  
  22. typedef struct
  23. {
  24.   ResType type;
  25.   long max;
  26.   long free;
  27.   uchar bitmap[CHARS_NEEDED(DRVR_MAX)];
  28. } drvr_map_t;
  29.  
  30. typedef struct
  31. {
  32.   ResType type;
  33.   long max;
  34.   long free;
  35.   uchar bitmap[CHARS_NEEDED(FONT_MAX)];
  36. } font_map_t;
  37.  
  38. typedef struct
  39. {
  40.   ResType type;
  41.   long max;
  42.   long free;
  43.   uchar bitmap[CHARS_NEEDED(NFNT_MAX)];
  44. } nfnt_map_t;
  45.  
  46. typedef struct
  47. {
  48.   ResType type;
  49.   long max;
  50.   long free;
  51.   uchar bitmap[CHARS_NEEDED(FOND_MAX)];
  52. } fond_map_t;
  53.  
  54. enum constant_to_allow_compilation
  55. {
  56.   SHIM_FOR_GENERIC_MAP_TO_COMPILE = 4
  57. };
  58.  
  59. typedef struct
  60. {
  61.   ResType type;
  62.   long max;
  63.   long free;
  64.   uchar bitmap[SHIM_FOR_GENERIC_MAP_TO_COMPILE];
  65. } generic_map_t;
  66.  
  67. typedef struct
  68. {
  69.   drvr_map_t drvr_map;
  70.   font_map_t font_map;
  71.   nfnt_map_t nfnt_map;
  72.   fond_map_t fond_map;
  73.   ResType sentinel;
  74. } in_use_t, *in_use_ptr, **in_use_hand;
  75.  
  76. typedef struct mapping_link_str
  77. {
  78.   short old_id;
  79.   short new_id;
  80.   struct mapping_link_str *next;
  81. } mapping_link_t;
  82.  
  83. typedef struct
  84. {
  85.   ResType type;
  86.   mapping_link_t *head;
  87. } mapping_list_t;
  88.  
  89. typedef struct
  90. {
  91.   mapping_list_t list[4];
  92. } mapping_t;
  93.  
  94. typedef struct
  95. {
  96.   short size;
  97.   short style;
  98.   short id;
  99. } font_assoc_t;
  100.  
  101. typedef struct link_str
  102. {
  103.   struct link_str *next;
  104.   Handle resource;
  105. } link_t;
  106.  
  107. OSErr AddToMasterFile (short from_file_rn, short master_file_rn);
  108.  
  109. #endif