home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / video / scrollmon / usr.4.0.x / include / wfmclient.h next >
Encoding:
C/C++ Source or Header  |  1994-08-02  |  6.2 KB  |  250 lines

  1. #ifndef WFMCLIENTDEF
  2. #define WFMCLIENTDEF
  3.  
  4. #include <fmclient.h>
  5.  
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9.  
  10. void wfm_init(void);
  11.  
  12. void wfm_cmov(
  13.     float                       /* x */, 
  14.     float                       /* y */, 
  15.     float                       /* z */
  16. );
  17.  
  18. void wfm_cmov2(
  19.     float                       /* x */, 
  20.     float                       /* y */
  21. );
  22.  
  23. void wfm_cmovi(
  24.     int                         /* x */, 
  25.     int                         /* y */, 
  26.     int                         /* z */
  27. );
  28.  
  29. void wfm_cmov2i(
  30.     int                         /* x */, 
  31.     int                         /* y */
  32. );
  33.  
  34. void wfm_cmovs(
  35.     short                       /* x */, 
  36.     short                       /* y */, 
  37.     short                       /* z */
  38. );
  39.  
  40. void wfm_cmov2s(
  41.     short                       /* x */, 
  42.     short                       /* y */
  43. );
  44.  
  45. void wfm_enumerate(
  46.     void (*callback)(char *)
  47. );
  48.  
  49. void wfm_sizeenumerate(
  50.     char *                      /* name */, 
  51.     void (*callback)(long)
  52. );
  53.  
  54. void wfm_fontunits(
  55.     float                       /* pixelsperpoint */
  56. );
  57.  
  58. long wfm_makefont(
  59.     long                        /* fontnum */, 
  60.     char *                      /* name */, 
  61.     float[2][2]                 /* mat */, 
  62.     int                         /* charnamec */, 
  63.     char **                     /* charnamev */
  64. );
  65.  
  66. long wfm_font(
  67.     long                        /* fontnum */
  68. );
  69.  
  70. long wfm_getfont(
  71.     void
  72. );
  73.  
  74. void wfm_charstr(
  75.     const char *                /* str */
  76. );
  77.  
  78. void wfm_charstrn(
  79.     const char *                /* str */, 
  80.     int                         /* chrcount */
  81. );
  82.  
  83. void wfm_charstrl(
  84.     void *                      /* str */, 
  85.     int                         /* chrcount */,
  86.     int                         /* bytesperchr */
  87. );
  88.  
  89. void wfm_skipspace(
  90.     float                       /* wid */
  91. );
  92.  
  93. float wfm_strwidth(
  94.     const char *                /* str */
  95. );
  96.  
  97. /* bytesperchr can be 1, 2, or 4 in a call to wfm_strnwidth */
  98. float wfm_strnwidth(
  99.     void *                      /* str */, 
  100.     int                         /* chrcount */, 
  101.     int                         /* bytesperchr */
  102. );
  103.  
  104. void wfm_strbounds(
  105.     const char *                /* str */, 
  106.     long *                      /* llx */, 
  107.     long *                      /* lly */, 
  108.     long *                      /* urx */, 
  109.     long *                      /* ury */
  110. );
  111.  
  112. /* bytesperchr can be 1, 2, or 4 in a call to wfm_strnbounds */
  113. void wfm_strnbounds(
  114.     void *                      /* str */, 
  115.     int                         /* chrcount */, 
  116.     int                         /* bytesperchr */, 
  117.     long *                      /* llx */, 
  118.     long *                      /* lly */, 
  119.     long *                      /* urx */, 
  120.     long *                      /* ury */
  121. );
  122.  
  123. void wfm_freefont(
  124.     long                        /* fontnum */
  125. );
  126.  
  127. void wfm_setfontpath(
  128.     const char *                /* path */
  129. );
  130.  
  131. void wfm_fontpath(
  132.     char *                      /* path */, 
  133.     long                        /* len */
  134. );
  135.  
  136. void wfm_makefontmat(
  137.     float[2][2]                 /* mat */, 
  138.     float                       /* angle */, 
  139.     float                       /* size */
  140. );
  141.  
  142. void wfm_cpack(
  143.     long                        /* c */
  144. );
  145.  
  146. void wfm_color(
  147.     int                         /* c */
  148. );
  149.  
  150. void wfm_aacolor(
  151.     int                         /* cfull */,
  152.     int                         /* fhalf */
  153. );
  154.  
  155. void wfm_aacpack(
  156.     long                        /* cfull */, 
  157.     long                        /* fhalf */
  158. );
  159.  
  160. void wfm_hint(
  161.     long                        /* hinttype */, 
  162.     long                        /* value */
  163. );
  164.  
  165. long wfm_getfontinfo(
  166.     long                        /* fontnum */,
  167.     fmfontinfo *                /* info */
  168. );
  169.  
  170. long wfm_getcharmetrics(
  171.     long                        /* fontnum */, 
  172.     fmglyphinfo *               /* glyphinfo */
  173. );
  174.  
  175. long wfm_outchar(
  176.     const unsigned int          /* code */
  177. );
  178.  
  179. void wfm_pos(
  180.     float                       /* x */,
  181.     float                       /* y */
  182. );
  183.  
  184. void wfm_rpos(
  185.     float                       /* x */, 
  186.     float                       /* y */
  187. );
  188.  
  189. /* values for the font type hint FONTHINT_TYPE */
  190. #define FM_FONTTYPE_ALL     0     /* use all types of fonts      */
  191. #define FM_FONTTYPE_BITMAP  1     /* use only bitmap fonts       */
  192. #define FM_FONTTYPE_OUTLINE 2     /* use only outline fonts      */
  193.  
  194. #define FONTHINT_SCALETHRESH    (1)    /* bound to font */
  195. #define FONTHINT_MINOUTLINESIZE (2)    /* bound to font */
  196. #define FONTHINT_MAXAASIZE    (3)    /* bound to font */
  197. #define FONTHINT_ROUNDADVANCE    (4)    /* bound to font */
  198. #define FONTHINT_AABITMAPFONTS    (5)    /* bound to font */
  199. #define FONTHINT_TYPE           (6)     /* font type hint */
  200. #define FONTHINT_ENCODING       (7)     /* font encoding hint */
  201.  
  202. /* values for the font encoding hint FONTHINT_ENCODING */
  203. #define FM_ENC_ALL       0   /* all encodings (default)              */
  204. #define FM_ENC_ASCII     1   /* ASCII                                */
  205. #define FM_ENC_ISO88591  2   /* ISO8859-1                            */
  206. #define FM_ENC_ADOBE     4   /* Adobe (228) characters in text fonts */
  207. #define FM_ENC_SPECIFIC  8   /* font specific (e.g., Symbol font)    */
  208. #define FM_ENC_JISX020819760  16   /* JISX0208.1976-0 */
  209. #define FM_ENC_JISX020119760  32   /* JISX0201.1976-0 */
  210. #define FM_ENC_JISX020819830  64   /* JISX0208.1983-0 */
  211. #define FM_ENC_DECTECH       128   /* DEC DECTECH */
  212. #define FM_ENC_SUNOLCURSOR1  256   /* SUN OLD CURSOR 1 */
  213. #define FM_ENC_SUNOLGLYPH1  1024   /* SUN OLD GLYPH 1 */
  214.  
  215. #define MAX_VERTEX      500
  216. #define MAX_OUTLINE     10
  217.  
  218. /* structure for returning outline */
  219. typedef struct { float x; float y; } pt2;
  220. typedef struct
  221. {
  222.     short       outlinecount;
  223.     short       *vertexcount;
  224.     pt2         **vertex;
  225.     float       xadvance;
  226.     float       yadvance;
  227. } wfmoutline;
  228. wfmoutline *wfm_getoutline(
  229.     int                         /* character */, 
  230.     float                       /* tolerance */
  231. );
  232.  
  233. void wfm_freeoutline(
  234.     wfmoutline *                /* outline */
  235. );
  236.  
  237. void wfm_getbbox(
  238.     int                         /* character */, 
  239.     float *                     /* llx */, 
  240.     float *                     /* lly */, 
  241.     float *                     /* urx */, 
  242.     float *                     /* ury */
  243. );
  244.  
  245. #ifdef __cplusplus
  246. }
  247. #endif
  248.  
  249. #endif
  250.