| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | #ifndef FONT_H |
| 25 | #define FONT_H |
| 26 | |
| 27 | #include <X11/Xfuncproto.h> |
| 28 | |
| 29 | #ifndef BitmapFormatByteOrderMask |
| 30 | #include "fsmasks.h" |
| 31 | #endif |
| 32 | |
| 33 | |
| 34 | #ifndef _XTYPEDEF_FONTPTR |
| 35 | typedef struct _Font *FontPtr; |
| 36 | #define _XTYPEDEF_FONTPTR |
| 37 | #endif |
| 38 | |
| 39 | typedef struct _FontInfo *FontInfoPtr; |
| 40 | typedef struct _FontProp *FontPropPtr; |
| 41 | typedef struct _ExtentInfo *ExtentInfoPtr; |
| 42 | typedef struct _FontPathElement *FontPathElementPtr; |
| 43 | |
| 44 | #ifndef _XTYPEDEF_CHARINFOPTR |
| 45 | typedef struct _CharInfo *CharInfoPtr; |
| 46 | #define _XTYPEDEF_CHARINFOPTR |
| 47 | #endif |
| 48 | |
| 49 | typedef struct _FontNames *FontNamesPtr; |
| 50 | typedef struct _FontResolution *FontResolutionPtr; |
| 51 | |
| 52 | #define NullCharInfo ((CharInfoPtr) 0) |
| 53 | #define NullFont ((FontPtr) 0) |
| 54 | #define NullFontInfo ((FontInfoPtr) 0) |
| 55 | |
| 56 | |
| 57 | #define LeftToRight 0 |
| 58 | #define RightToLeft 1 |
| 59 | #define BottomToTop 2 |
| 60 | #define TopToBottom 3 |
| 61 | typedef int DrawDirection; |
| 62 | |
| 63 | #define NO_SUCH_CHAR -1 |
| 64 | |
| 65 | |
| 66 | #define FontAliasType 0x1000 |
| 67 | |
| 68 | #define AllocError 80 |
| 69 | #define StillWorking 81 |
| 70 | #define FontNameAlias 82 |
| 71 | #define BadFontName 83 |
| 72 | #define Suspended 84 |
| 73 | #define Successful 85 |
| 74 | #define BadFontPath 86 |
| 75 | #define BadCharRange 87 |
| 76 | #define BadFontFormat 88 |
| 77 | #define FPEResetFailed 89 |
| 78 | |
| 79 | |
| 80 | #define FontLoadInfo 0x0001 |
| 81 | #define FontLoadProps 0x0002 |
| 82 | #define FontLoadMetrics 0x0004 |
| 83 | #define FontLoadBitmaps 0x0008 |
| 84 | #define FontLoadAll 0x000f |
| 85 | #define FontOpenSync 0x0010 |
| 86 | #define FontReopen 0x0020 |
| 87 | |
| 88 | |
| 89 | #define LoadAll 0x1 |
| 90 | #define FinishRamge 0x2 |
| 91 | #define EightBitFont 0x4 |
| 92 | #define SixteenBitFont 0x8 |
| 93 | |
| 94 | |
| 95 | #define CACHING_OFF 0 |
| 96 | #define CACHE_16_BIT_GLYPHS 1 |
| 97 | #define CACHE_ALL_GLYPHS 2 |
| 98 | #define DEFAULT_GLYPH_CACHING_MODE CACHE_16_BIT_GLYPHS |
| 99 | extern int glyphCachingMode; |
| 100 | |
| 101 | struct _Client; |
| 102 | |
| 103 | extern int StartListFontsWithInfo( |
| 104 | struct _Client * , |
| 105 | int , |
| 106 | unsigned char * , |
| 107 | int |
| 108 | ); |
| 109 | |
| 110 | extern FontNamesPtr MakeFontNamesRecord( |
| 111 | unsigned |
| 112 | ); |
| 113 | |
| 114 | extern void FreeFontNames( |
| 115 | FontNamesPtr |
| 116 | ); |
| 117 | |
| 118 | extern int AddFontNamesName( |
| 119 | FontNamesPtr , |
| 120 | char * , |
| 121 | int |
| 122 | ); |
| 123 | |
| 124 | #if 0 |
| 125 | extern int FontToFSError(); |
| 126 | extern FontResolutionPtr GetClientResolution(); |
| 127 | #endif |
| 128 | |
| 129 | typedef struct _FontPatternCache *FontPatternCachePtr; |
| 130 | |
| 131 | extern FontPatternCachePtr MakeFontPatternCache ( |
| 132 | void |
| 133 | ); |
| 134 | |
| 135 | extern void FreeFontPatternCache ( |
| 136 | FontPatternCachePtr |
| 137 | ); |
| 138 | |
| 139 | extern void EmptyFontPatternCache ( |
| 140 | FontPatternCachePtr |
| 141 | ); |
| 142 | |
| 143 | extern void CacheFontPattern ( |
| 144 | FontPatternCachePtr , |
| 145 | const char * , |
| 146 | int , |
| 147 | FontPtr |
| 148 | ); |
| 149 | extern _X_EXPORT FontResolutionPtr GetClientResolutions( |
| 150 | int * |
| 151 | ); |
| 152 | |
| 153 | extern FontPtr FindCachedFontPattern ( |
| 154 | FontPatternCachePtr , |
| 155 | const char * , |
| 156 | int |
| 157 | ); |
| 158 | |
| 159 | extern void RemoveCachedFontPattern ( |
| 160 | FontPatternCachePtr , |
| 161 | FontPtr |
| 162 | ); |
| 163 | |
| 164 | typedef enum { |
| 165 | Linear8Bit, TwoD8Bit, Linear16Bit, TwoD16Bit |
| 166 | } FontEncoding; |
| 167 | |
| 168 | #endif |