diff options
author | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-14 16:48:44 +0000 |
---|---|---|
committer | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-14 16:48:44 +0000 |
commit | 5be5f868949cb6cd23acf73db79193c9adca9681 (patch) | |
tree | d47b7af12725a85299140373acdfb72af7847376 | |
parent | d551e3eaf4060cb24ed68eee06323337f12a95ad (diff) |
XFree86 4.3.0.1xf86-4_3_0_1PRE_xf86-4_3_0_1
-rw-r--r-- | FS.h | 10 | ||||
-rw-r--r-- | FSproto.h | 3 | ||||
-rw-r--r-- | font.h | 72 | ||||
-rw-r--r-- | fontstruct.h | 260 |
4 files changed, 162 insertions, 183 deletions
@@ -50,27 +50,23 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/include/fonts/FS.h,v 1.8 2001/12/14 19:53:31 dawes Exp $ */ #ifndef _FS_H_ #define _FS_H_ -#include "fsmasks.h" +#include <X11/Xdefs.h> +#include <X11/fonts/fsmasks.h> #define FS_PROTOCOL 2 #define FS_PROTOCOL_MINOR 0 -typedef unsigned long FSID; - #ifndef X_PROTOCOL /* protocol familes */ #define FamilyInternet 0 #define FamilyDECnet 1 #define FamilyChaos 2 -typedef unsigned long Mask; - -typedef FSID Font; -typedef FSID AccContext; typedef unsigned int FSDrawDirection; #endif @@ -43,11 +43,12 @@ in this Software without prior written authorization from The Open Group. * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ +/* $XFree86: xc/include/fonts/FSproto.h,v 1.3 2001/12/14 19:53:31 dawes Exp $ */ #ifndef _FS_PROTO_H_ #define _FS_PROTO_H_ -#include "FS.h" +#include <X11/fonts/FS.h> #define sz_fsPropOffset 20 #define sz_fsPropInfo 8 @@ -21,7 +21,8 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $NCDId: @(#)font.h,v 1.7 1991/06/24 17:00:23 lemke Exp $ */ +/* $XFree86: xc/include/fonts/font.h,v 3.5 2001/01/17 17:53:26 dawes Exp $ */ +/* $NCDXorg: @(#)font.h,v 1.7 1991/06/24 17:00:23 lemke Exp $ */ #ifndef FONT_H #define FONT_H @@ -95,34 +96,71 @@ typedef int DrawDirection; #define CACHING_OFF 0 #define CACHE_16_BIT_GLYPHS 1 #define CACHE_ALL_GLYPHS 2 -#define DEFAULT_GLYPH_CACHING_MODE CACHING_OFF +#define DEFAULT_GLYPH_CACHING_MODE CACHE_16_BIT_GLYPHS extern int glyphCachingMode; +struct _Client; + extern int StartListFontsWithInfo( -#if NeedFunctionPrototypes - ClientPtr /*client*/, + struct _Client * /*client*/, int /*length*/, - unsigned char */*pattern*/, + unsigned char * /*pattern*/, int /*max_names*/ -#endif ); -extern FontNamesPtr MakeFontNamesRecord( /* size */ ); -extern void FreeFontNames(); -extern int AddFontNamesName(); +extern FontNamesPtr MakeFontNamesRecord( + unsigned /* size */ +); -extern int FontToFSError(); +extern void FreeFontNames( + FontNamesPtr /* pFN*/ +); -extern FontResolutionPtr GetClientResolutions(); +extern int AddFontNamesName( + FontNamesPtr /* names */, + char * /* name */, + int /* length */ +); + +#if 0 /* unused */ +extern int FontToFSError(); +extern FontResolutionPtr GetClientResolution(); +#endif typedef struct _FontPatternCache *FontPatternCachePtr; -extern FontPatternCachePtr MakeFontPatternCache (); -extern void FreeFontPatternCache (); -extern void EmtpyFontPatternCache (); -extern void CacheFontPattern (); -extern FontPtr FindCachedFontPattern (); -extern void RemoveCachedFontPattern (); +extern FontPatternCachePtr MakeFontPatternCache ( + void +); + +extern void FreeFontPatternCache ( + FontPatternCachePtr /* cache */ +); + +extern void EmptyFontPatternCache ( + FontPatternCachePtr /* cache */ +); + +extern void CacheFontPattern ( + FontPatternCachePtr /* cache */, + char * /* pattern */, + int /* patlen */, + FontPtr /* pFont */ +); +extern FontResolutionPtr GetClientResolutions( + int * /* num */ +); + +extern FontPtr FindCachedFontPattern ( + FontPatternCachePtr /* cache */, + char * /* pattern */, + int /* patlen */ +); + +extern void RemoveCachedFontPattern ( + FontPatternCachePtr /* cache */, + FontPtr /* pFont */ +); typedef enum { Linear8Bit, TwoD8Bit, Linear16Bit, TwoD16Bit diff --git a/fontstruct.h b/fontstruct.h index 0ccf399..7eb3925 100644 --- a/fontstruct.h +++ b/fontstruct.h @@ -21,6 +21,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ +/* $XFree86: xc/include/fonts/fontstruct.h,v 3.4 2001/01/17 17:53:26 dawes Exp $ */ #ifndef FONTSTR_H #define FONTSTR_H @@ -28,6 +29,7 @@ SOFTWARE. #include <X11/Xproto.h> #include "font.h" #include <X11/Xfuncproto.h> +#include <X11/Xdefs.h> /* * This version of the server font data strucutre is only for describing @@ -107,36 +109,20 @@ typedef struct _Font { char glyph; char scan; fsBitmapFormat format; - int (*get_glyphs) ( -#if NeedNestedPrototypes - FontPtr /* font */, - unsigned long /* count */, - unsigned char * /* chars */, - FontEncoding /* encoding */, - unsigned long * /* count */, - CharInfoPtr * /* glyphs */ -#endif -); - int (*get_metrics) ( -#if NeedNestedPrototypes - FontPtr /* font */, - unsigned long /* count */, - unsigned char * /* chars */, - FontEncoding /* encoding */, - unsigned long * /* count */, - xCharInfo ** /* glyphs */ -#endif -); - void (*unload_font) ( -#if NeedNestedPrototypes - FontPtr /* font */ -#endif -); - void (*unload_glyphs) ( -#if NeedNestedPrototypes - FontPtr /* font */ -#endif -); + int (*get_glyphs) (FontPtr /* font */, + unsigned long /* count */, + unsigned char * /* chars */, + FontEncoding /* encoding */, + unsigned long * /* count */, + CharInfoPtr * /* glyphs */); + int (*get_metrics) (FontPtr /* font */, + unsigned long /* count */, + unsigned char * /* chars */, + FontEncoding /* encoding */, + unsigned long * /* count */, + xCharInfo ** /* glyphs */); + void (*unload_font) (FontPtr /* font */); + void (*unload_glyphs) (FontPtr /* font */); FontPathElementPtr fpe; pointer svrPrivate; pointer fontPrivate; @@ -145,9 +131,6 @@ typedef struct _Font { pointer *devPrivates; } FontRec; -extern Bool _FontSetNewPrivate (/* pFont, n, ptr */); -extern int AllocateFontPrivateIndex (); - #define FontGetPrivate(pFont,n) ((n) > (pFont)->maxPrivate ? (pointer) 0 : \ (pFont)->devPrivates[n]) @@ -171,114 +154,88 @@ typedef struct _FontPathElement { pointer private; } FontPathElementRec; +typedef Bool (*NameCheckFunc) (char *name); +typedef int (*InitFpeFunc) (FontPathElementPtr fpe); +typedef int (*FreeFpeFunc) (FontPathElementPtr fpe); +typedef int (*ResetFpeFunc) (FontPathElementPtr fpe); +typedef int (*OpenFontFunc) ( pointer client, + FontPathElementPtr fpe, + Mask flags, + char* name, + int namelen, + fsBitmapFormat format, + fsBitmapFormatMask fmask, + XID id, + FontPtr* pFont, + char** aliasName, + FontPtr non_cachable_font); +typedef void (*CloseFontFunc) (FontPathElementPtr fpe, FontPtr pFont); +typedef int (*ListFontsFunc) (pointer client, + FontPathElementPtr fpe, + char* pat, + int len, + int max, + FontNamesPtr names); + +typedef int (*StartLfwiFunc) (pointer client, + FontPathElementPtr fpe, + char* pat, + int len, + int max, + pointer* privatep); + +typedef int (*NextLfwiFunc) (pointer client, + FontPathElementPtr fpe, + char** name, + int* namelen, + FontInfoPtr* info, + int* numFonts, + pointer private); + +typedef int (*WakeupFpeFunc) (FontPathElementPtr fpe, + unsigned long* LastSelectMask); + +typedef void (*ClientDiedFunc) (pointer client, + FontPathElementPtr fpe); + +typedef int (*LoadGlyphsFunc) (pointer client, + FontPtr pfont, + Bool range_flag, + unsigned int nchars, + int item_size, + unsigned char* data); + +typedef int (*StartLaFunc) (pointer client, + FontPathElementPtr fpe, + char* pat, + int len, + int max, + pointer* privatep); + +typedef int (*NextLaFunc) (pointer client, + FontPathElementPtr fpe, + char** namep, + int* namelenp, + char** resolvedp, + int* resolvedlenp, + pointer private); + +typedef void (*SetPathFunc)(void); + typedef struct _FPEFunctions { - int (*name_check) ( -#if NeedFunctionPrototypes - char* /* name */ -#endif - ); - int (*init_fpe) ( -#if NeedNestedPrototypes - FontPathElementPtr /* fpe */ -#endif - ); - int (*reset_fpe) ( -#if NeedNestedPrototypes - FontPathElementPtr /* fpe */ -#endif - ); - int (*free_fpe) ( -#if NeedNestedPrototypes - FontPathElementPtr /* fpe */ -#endif - ); - int (*open_font) ( -#if NeedNestedPrototypes - pointer /* client */, - FontPathElementPtr /* fpe */, - int /* flags */, - char* /* name */, - int /* namelen */, - fsBitmapFormat /* format */, - fsBitmapFormatMask /* fmask */, - unsigned long /* id (type XID or FSID) */, - FontPtr* /* pFont */, - char** /* aliasName */, - FontPtr /* non_cachable_font */ -#endif - ); - - int (*close_font) ( -#if NeedNestedPrototypes - FontPathElementPtr /* fpe */, - FontPtr /* pFont */ -#endif - ); - int (*list_fonts) ( -#if NeedNestedPrototypes - pointer /* client */, - FontPathElementPtr /* fpe */, - char* /* pat */, - int /* len */, - int /* max */, - FontNamesPtr /* names */ -#endif - ); - int (*start_list_fonts_and_aliases) ( -#if NeedNestedPrototypes - pointer /* client */, - FontPathElementPtr /* fpe */, - char* /* pat */, - int /* len */, - int /* max */, - pointer* /* privatep */ -#endif - ); - int (*list_next_font_or_alias) ( -#if NeedNestedPrototypes - pointer /* client */, - FontPathElementPtr /* fpe */, - char** /* namep */, - int* /* namelenp */, - char** /* resolvedp */, - int* /* resolvedlenp */, - pointer /* private */ -#endif - ); - int (*start_list_fonts_with_info) ( -#if NeedNestedPrototypes - pointer /* client */, - FontPathElementPtr /* fpe */, - char* /* pat */, - int /* patlen */, - int /* maxnames */, - pointer* /* privatep */ -#endif - ); - int (*list_next_font_with_info) ( /* client, fpe, name, namelen, - info, num, data */ -#if NeedNestedPrototypes - pointer /* client */, - FontPathElementPtr /* fpe */, - char** /* name */, - int* /* namelen */, - FontInfoPtr* /* info */, - int* /* numFonts */, - pointer /* private */ -#endif - ); - int (*wakeup_fpe) ( -#if NeedNestedPrototypes - FontPathElementPtr /* fpe */, - unsigned long* /* LastSelectMask */ -#endif - ); - int (*client_died) ( -#if NeedNestedPrototypes - pointer /* client */, - FontPathElementPtr /* fpe */ -#endif - ); + NameCheckFunc name_check; + InitFpeFunc init_fpe; + ResetFpeFunc reset_fpe; + FreeFpeFunc free_fpe; + OpenFontFunc open_font; + CloseFontFunc close_font; + ListFontsFunc list_fonts; + StartLaFunc start_list_fonts_and_aliases; + NextLaFunc list_next_font_or_alias; + StartLfwiFunc start_list_fonts_with_info; + NextLfwiFunc list_next_font_with_info; + WakeupFpeFunc wakeup_fpe; + ClientDiedFunc client_died; /* for load_glyphs, range_flag = 0 -> nchars = # of characters in data item_size = bytes/char @@ -287,24 +244,9 @@ typedef struct _FPEFunctions { nchars = # of fsChar2b's in data item_size is ignored data = list of fsChar2b's */ - int (*load_glyphs) ( -#if NeedNestedPrototypes - pointer /* client */, - FontPtr /* pfont */, - Bool /* range_flag */, - unsigned int /* nchars */, - int /* item_size */, - unsigned char* /* data */ -#endif - ); - void (*set_path_hook)( -#if NeedFunctionPrototypes - void -#endif - ); -} FPEFunctionsRec, FPEFunctions; - -extern int InitFPETypes(); + LoadGlyphsFunc load_glyphs; + SetPathFunc set_path_hook; +} FPEFunctionsRec, FPEFunctions; /* * Various macros for computing values based on contents of @@ -348,4 +290,6 @@ extern int InitFPETypes(); (pi)->ink_maxbounds.characterWidth) #define FONT_MAX_WIDTH(pi) (FONT_MAX_RIGHT(pi) - FONT_MIN_LEFT(pi)) +#include "fontproto.h" + #endif /* FONTSTR_H */ |