13.2. Data Definitions for libXft

This section defines global identifiers and their values that are associated with interfaces contained in libXft. These definitions are organized into groups that correspond to system headers. This convention is used as a convenience for the reader, and does not imply the existence of these headers, or their content. Where an interface is defined as requiring a particular system header file all of the data definitions for that system header file presented here shall be in effect.

This section gives data definitions to promote binary application portability, not to repeat source interface definitions available elsewhere. System providers and application developers should use this ABI to supplement - not to replace - source interface definition specifications.

This specification uses the ISO C (1999) C Language as the reference programming language, and data definitions are specified in ISO C format. The C language is used here as a convenient notation. Using a C language description of these data objects does not preclude their use by other programming languages.

13.2.1. X11/Xft/Xft.h


#define _XFT_H_
#define XFT_VERSION	 \
	((XFT_MAJOR * 10000) + (XFT_MINOR * 100) + (XFT_REVISION))
#define XFT_CORE	"core"
#define XFT_MAX_GLYPH_MEMORY	"maxglyphmemory"
#define XFT_MAX_UNREF_FONTS	"maxunreffonts"
#define XFT_RENDER	"render"
#define XFT_XLFD	"xlfd"
#define XFT_MINOR	1
#define XFT_MAJOR	2
#define XFT_NMISSING	256
#define XFT_REVISION	8
#define XftVersion	XFT_VERSION

typedef struct _XftDraw XftDraw;
typedef struct _XftColor {
    unsigned long int pixel;
    XRenderColor color;
} XftColor;
typedef struct _XftFont {
    int ascent;
    int descent;
    int height;
    int max_advance_width;
    FcCharSet *charset;
    FcPattern **pattern;
} XftFont;
typedef struct _XftGlyphSpec {
    FT_UInt glyph;
    short x;
    short y;
} XftGlyphSpec;
typedef struct _XftCharSpec {
    FcChar32 ucs4;
    short x;
    short y;
} XftCharSpec;
typedef struct _XftFtFile XftFtFile;
typedef struct _XftFontInfo XftFontInfo;
typedef struct _XftCharFontSpec {
    XftFont *font;
    FcChar32 ucs4;
    short x;
    short y;
} XftCharFontSpec;
typedef struct _XftGlyphFontSpec {
    XftFont *font;
    FT_UInt glyph;
    short x;
    short y;
} XftGlyphFontSpec;
extern FcBool XftCharExists(Display *, XftFont *, FcChar32);
extern void XftCharFontSpecRender(Display *, int, Picture, Picture, int,
				  int, const XftCharFontSpec *, int);
extern FT_UInt XftCharIndex(Display *, XftFont *, FcChar32);
extern void XftCharSpecRender(Display *, int, Picture, XftFont *, Picture,
			      int, int, const XftCharSpec *, int);
extern int XftColorAllocName(Display *, const Visual *, Colormap,
			     const char *, XftColor *);
extern int XftColorAllocValue(Display *, Visual *, Colormap,
			      const XRenderColor *, XftColor *);
extern void XftColorFree(Display *, Visual *, Colormap, XftColor *);
extern int XftDefaultHasRender(Display *);
extern int XftDefaultSet(Display *, FcPattern *);
extern void XftDefaultSubstitute(Display *, int, FcPattern *);
extern void XftDrawChange(XftDraw *, Drawable);
extern void XftDrawCharFontSpec(XftDraw *, const XftColor *,
				const XftCharFontSpec *, int);
extern void XftDrawCharSpec(XftDraw *, const XftColor *, XftFont *,
			    const XftCharSpec *, int);
extern Colormap XftDrawColormap(XftDraw *);
extern XftDraw *XftDrawCreate(Display *, Drawable, Visual *, Colormap);
extern XftDraw *XftDrawCreateAlpha(Display *, Pixmap, int);
extern XftDraw *XftDrawCreateBitmap(Display *, Pixmap);
extern void XftDrawDestroy(XftDraw *);
extern Display *XftDrawDisplay(XftDraw *);
extern Drawable XftDrawDrawable(XftDraw *);
extern void XftDrawGlyphFontSpec(XftDraw *, const XftColor *,
				 const XftGlyphFontSpec *, int);
extern void XftDrawGlyphSpec(XftDraw *, const XftColor *, XftFont *,
			     const XftGlyphSpec *, int);
extern void XftDrawGlyphs(XftDraw *, const XftColor *, XftFont *, int, int,
			  const FT_UInt *, int);
extern Picture XftDrawPicture(XftDraw *);
extern void XftDrawRect(XftDraw *, const XftColor *, int, int,
			unsigned int, unsigned int);
extern int XftDrawSetClip(XftDraw *, Region);
extern int XftDrawSetClipRectangles(XftDraw *, int, int,
				    const XRectangle *, int);
extern void XftDrawSetSubwindowMode(XftDraw *, int);
extern Picture XftDrawSrcPicture(XftDraw *, const XftColor *);
extern void XftDrawString16(XftDraw *, const XftColor *, XftFont *, int,
			    int, const FcChar16 *, int);
extern void XftDrawString32(XftDraw *, const XftColor *, XftFont *, int,
			    int, const FcChar32 *, int);
extern void XftDrawString8(XftDraw *, const XftColor *, XftFont *, int,
			   int, const FcChar8 *, int);
extern void XftDrawStringUtf16(XftDraw *, const XftColor *, XftFont *, int,
			       int, const FcChar8 *, FcEndian, int);
extern void XftDrawStringUtf8(XftDraw *, const XftColor *, XftFont *, int,
			      int, const FcChar8 *, int);
extern Visual *XftDrawVisual(XftDraw *);
extern FcBool XftFontCheckGlyph(Display *, XftFont *, FcBool, FT_UInt,
				FT_UInt *, int *);
extern void XftFontClose(Display *, XftFont *);
extern XftFont *XftFontCopy(Display *, XftFont *);
extern XftFontInfo *XftFontInfoCreate(Display *, const FcPattern *);
extern void XftFontInfoDestroy(Display *, XftFontInfo *);
extern FcBool XftFontInfoEqual(const XftFontInfo *, const XftFontInfo *);
extern FcChar32 XftFontInfoHash(const XftFontInfo *);
extern void XftFontLoadGlyphs(Display *, XftFont *, FcBool,
			      const FT_UInt *, int);
extern FcPattern *XftFontMatch(Display *, int, const FcPattern *,
			       FcResult *);
extern XftFont *XftFontOpen(Display *, int, ...);
extern XftFont *XftFontOpenInfo(Display *, FcPattern *, XftFontInfo *);
extern XftFont *XftFontOpenName(Display *, int, const char *);
extern XftFont *XftFontOpenPattern(Display *, FcPattern *);
extern XftFont *XftFontOpenXlfd(Display *, int, const char *);
extern void XftFontUnloadGlyphs(Display *, XftFont *, const FT_UInt *,
				int);
extern int XftGetVersion(void);
extern void XftGlyphExtents(Display *, XftFont *, const FT_UInt *, int,
			    XGlyphInfo *);
extern void XftGlyphFontSpecRender(Display *, int, Picture, Picture, int,
				   int, const XftGlyphFontSpec *, int);
extern void XftGlyphRender(Display *, int, Picture, XftFont *, Picture,
			   int, int, int, int, const FT_UInt *, int);
extern void XftGlyphSpecRender(Display *, int, Picture, XftFont *, Picture,
			       int, int, const XftGlyphSpec *, int);
extern int XftInit(const char *);
extern FcBool XftInitFtLibrary(void);
extern FcFontSet *XftListFonts(Display *, int, ...);
extern FT_Face XftLockFace(XftFont *);
extern FcPattern *XftNameParse(const char *);
extern void XftTextExtents16(Display *, XftFont *, const FcChar16 *, int,
			     XGlyphInfo *);
extern void XftTextExtents32(Display *, XftFont *, const FcChar32 *, int,
			     XGlyphInfo *);
extern void XftTextExtents8(Display *, XftFont *, const FcChar8 *, int,
			    XGlyphInfo *);
extern void XftTextExtentsUtf16(Display *, XftFont *, const FcChar8 *,
				FcEndian, int, XGlyphInfo *);
extern void XftTextExtentsUtf8(Display *, XftFont *, const FcChar8 *, int,
			       XGlyphInfo *);
extern void XftTextRender16(Display *, int, Picture, XftFont *, Picture,
			    int, int, int, int, const FcChar16 *, int);
extern void XftTextRender16BE(Display *, int, Picture, XftFont *, Picture,
			      int, int, int, int, const FcChar8 *, int);
extern void XftTextRender16LE(Display *, int, Picture, XftFont *, Picture,
			      int, int, int, int, const FcChar8 *, int);
extern void XftTextRender32(Display *, int, Picture, XftFont *, Picture,
			    int, int, int, int, const FcChar32 *, int);
extern void XftTextRender32BE(Display *, int, Picture, XftFont *, Picture,
			      int, int, int, int, const FcChar8 *, int);
extern void XftTextRender32LE(Display *, int, Picture, XftFont *, Picture,
			      int, int, int, int, const FcChar8 *, int);
extern void XftTextRender8(Display *, int, Picture, XftFont *, Picture,
			   int, int, int, int, const FcChar8 *, int);
extern void XftTextRenderUtf16(Display *, int, Picture, XftFont *, Picture,
			       int, int, int, int, const FcChar8 *,
			       FcEndian, int);
extern void XftTextRenderUtf8(Display *, int, Picture, XftFont *, Picture,
			      int, int, int, int, const FcChar8 *, int);
extern void XftUnlockFace(XftFont *);
extern FcPattern *XftXlfdParse(const char *, FcBool, FcBool);

13.2.2. X11/Xft/XftCompat.h


#define XFT_ENCODING	"encoding"
#define XftConfigSubstitute(p)	FcConfigSubstitute (0, p, FcMatchPattern)
#define XftFontSetDestroy	FcFontSetDestroy
#define XftFontSetMatch	FcFontSetMatch
#define XftMatrixEqual	FcMatrixEqual
#define XftMatrixInit(m)	FcMatrixInit(m)
#define XftMatrixMultiply	FcMatrixMultiply
#define XftMatrixRotate	FcMatrixRotate
#define XftMatrixScale	FcMatrixScale
#define XftMatrixShear	FcMatrixShear
#define XftObjectSetAdd	FcObjectSetAdd
#define XftObjectSetBuild	FcObjectSetBuild
#define XftObjectSetCreate	FcObjectSetCreate
#define XftObjectSetDestroy	FcObjectSetDestroy
#define XftObjectSetVaBuild	FcObjectSetVaBuild
#define XftPatternAdd	FcPatternAdd
#define XftPatternAddBool	FcPatternAddBool
#define XftPatternAddDouble	FcPatternAddDouble
#define XftPatternAddInteger	FcPatternAddInteger
#define XftPatternAddMatrix	FcPatternAddMatrix
#define XftPatternAddString(p,e,s)	FcPatternAddString(p,e,(FcChar8 *)(s))
#define XftPatternBuild	FcPatternBuild
#define XftPatternCreate	FcPatternCreate
#define XftPatternDel	FcPatternDel
#define XftPatternDestroy	FcPatternDestroy
#define XftPatternDuplicate	FcPatternDuplicate
#define XftPatternGet	FcPatternGet
#define XftPatternGetBool	FcPatternGetBool
#define XftPatternGetDouble	FcPatternGetDouble
#define XftPatternGetInteger	FcPatternGetInteger
#define XftPatternGetMatrix	FcPatternGetMatrix
#define XftPatternGetString(p,e,i,n)	FcPatternGetString(p,e,i,(FcChar8 **) (n))
#define XftPatternVaBuild	FcPatternVaBuild
#define XftResultMatch	FcResultMatch
#define XftResultNoId	FcResultNoId
#define XftResultNoMatch	FcResultNoMatch
#define XftResultTypeMismatch	FcResultTypeMismatch
#define XftTypeBool	FcTypeBool
#define XftTypeDouble	FcTypeDouble
#define XftTypeInteger	FcTypeInteger
#define XftTypeMatrix	FcTypeMatrix
#define XftTypeString	FcTypeString
#define XftTypeVoid	FcTypeVoid
#define XftUtf8Len	FcUtf8Len
#define XftUtf8ToUcs4	FcUtf8ToUcs4
#define XftValueDestroy	FcValueDestroy
#define XFT_ANTIALIAS	FC_ANTIALIAS
#define XFT_CHARCELL	FC_CHARCELL
#define XFT_CHAR_HEIGHT	FC_CHAR_HEIGHT
#define XFT_CHAR_WIDTH	FC_CHAR_WIDTH
#define XFT_DPI	FC_DPI
#define XFT_FAMILY	FC_FAMILY
#define XFT_FILE	FC_FILE
#define XFT_FOUNDRY	FC_FOUNDRY
#define XFT_INDEX	FC_INDEX
#define XFT_MATRIX	FC_MATRIX
#define XFT_MINSPACE	FC_MINSPACE
#define XFT_MONO	FC_MONO
#define XFT_OUTLINE	FC_OUTLINE
#define XFT_PIXEL_SIZE	FC_PIXEL_SIZE
#define XFT_PROPORTIONAL	FC_PROPORTIONAL
#define XFT_RASTERIZER	FC_RASTERIZER
#define XFT_RGBA	FC_RGBA
#define XFT_RGBA_BGR	FC_RGBA_BGR
#define XFT_RGBA_NONE	FC_RGBA_NONE
#define XFT_RGBA_RGB	FC_RGBA_RGB
#define XFT_RGBA_UNKNOWN	FC_RGBA_UNKNOWN
#define XFT_RGBA_VBGR	FC_RGBA_VBGR
#define XFT_RGBA_VRGB	FC_RGBA_VRGB
#define XFT_SCALABLE	FC_SCALABLE
#define XFT_SCALE	FC_SCALE
#define XFT_SIZE	FC_SIZE
#define XFT_SLANT	FC_SLANT
#define XFT_SLANT_ITALIC	FC_SLANT_ITALIC
#define XFT_SLANT_OBLIQUE	FC_SLANT_OBLIQUE
#define XFT_SLANT_ROMAN	FC_SLANT_ROMAN
#define XFT_SPACING	FC_SPACING
#define XFT_STYLE	FC_STYLE
#define XFT_WEIGHT	FC_WEIGHT
#define XFT_WEIGHT_BLACK	FC_WEIGHT_BLACK
#define XFT_WEIGHT_BOLD	FC_WEIGHT_BOLD
#define XFT_WEIGHT_DEMIBOLD	FC_WEIGHT_DEMIBOLD
#define XFT_WEIGHT_LIGHT	FC_WEIGHT_LIGHT
#define XFT_WEIGHT_MEDIUM	FC_WEIGHT_MEDIUM
#define XftGlyphExists	XftCharExists

typedef unsigned char XftChar8;
typedef unsigned short XftChar16;
typedef unsigned int XftChar32;
typedef enum _FcType XftType;
typedef struct _FcMatrix XftMatrix;
typedef enum _FcResult XftResult;
typedef struct _FcValue XftValue;
typedef struct _FcPattern XftPattern;
typedef struct _FcFontSet XftFontSet;
typedef struct _FcObjectSet XftObjectSet;