45e9809aff7304721fddb95654901b32195c9c7avboxsync/***********************************************************
45e9809aff7304721fddb95654901b32195c9c7avboxsyncCopyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync All Rights Reserved
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncPermission to use, copy, modify, and distribute this software and its
45e9809aff7304721fddb95654901b32195c9c7avboxsyncdocumentation for any purpose and without fee is hereby granted,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncprovided that the above copyright notice appear in all copies and that
45e9809aff7304721fddb95654901b32195c9c7avboxsyncboth that copyright notice and this permission notice appear in
45e9809aff7304721fddb95654901b32195c9c7avboxsyncsupporting documentation, and that the name of Digital not be
45e9809aff7304721fddb95654901b32195c9c7avboxsyncused in advertising or publicity pertaining to distribution of the
45e9809aff7304721fddb95654901b32195c9c7avboxsyncsoftware without specific, written prior permission.
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncDIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
45e9809aff7304721fddb95654901b32195c9c7avboxsyncALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
45e9809aff7304721fddb95654901b32195c9c7avboxsyncDIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
45e9809aff7304721fddb95654901b32195c9c7avboxsyncANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
45e9809aff7304721fddb95654901b32195c9c7avboxsyncSOFTWARE.
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync******************************************************************/
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifndef DIXFONT_H
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define DIXFONT_H 1
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include "dix.h"
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <X11/fonts/font.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include "closure.h"
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <X11/fonts/fontstruct.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define NullDIXFontProp ((DIXFontPropPtr)0)
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef struct _DIXFontProp *DIXFontPropPtr;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern FPEFunctions *fpe_functions;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int FontToXError(int /*err*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern Bool SetDefaultFont(char * /*defaultfontname*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void QueueFontWakeup(FontPathElementPtr /*fpe*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void RemoveFontWakeup(FontPathElementPtr /*fpe*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void FontWakeup(pointer /*data*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /*count*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync pointer /*LastSelectMask*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int OpenFont(ClientPtr /*client*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync XID /*fid*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync Mask /*flags*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned /*lenfname*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync char * /*pfontname*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int CloseFont(pointer /*pfont*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync XID /*fid*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef struct _xQueryFontReply *xQueryFontReplyPtr;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void QueryFont(FontPtr /*pFont*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync xQueryFontReplyPtr /*pReply*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /*nProtoCCIStructs*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int ListFonts(ClientPtr /*client*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned char * /*pattern*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned int /*length*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned int /*max_names*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncint
45e9809aff7304721fddb95654901b32195c9c7avboxsyncdoListFontsWithInfo(ClientPtr /*client*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync LFWIclosurePtr /*c*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int doPolyText(ClientPtr /*client*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync PTclosurePtr /*c*/
45e9809aff7304721fddb95654901b32195c9c7avboxsync);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int PolyText(ClientPtr /*client*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync DrawablePtr /*pDraw*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync GCPtr /*pGC*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned char * /*pElt*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned char * /*endReq*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /*xorg*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /*yorg*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /*reqType*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync XID /*did*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int doImageText(ClientPtr /*client*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync ITclosurePtr /*c*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int ImageText(ClientPtr /*client*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync DrawablePtr /*pDraw*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync GCPtr /*pGC*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /*nChars*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned char * /*data*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /*xorg*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /*yorg*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /*reqType*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync XID /*did*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int SetFontPath(ClientPtr /*client*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /*npaths*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned char * /*paths*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int * /*error*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int SetDefaultFontPath(char * /*path*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern unsigned char *GetFontPath(int * /*count*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int * /*length*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int LoadGlyphs(ClientPtr /*client*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync FontPtr /*pfont*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned /*nchars*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /*item_size*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned char * /*data*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void DeleteClientFontStuff(ClientPtr /*client*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* Quartz support on Mac OS X pulls in the QuickDraw
45e9809aff7304721fddb95654901b32195c9c7avboxsync framework whose InitFonts function conflicts here. */
45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifdef __DARWIN__
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define InitFonts Darwin_X_InitFonts
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void InitFonts(void);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void FreeFonts(void);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern FontPtr find_old_font(XID /*id*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void GetGlyphs(FontPtr /*font*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned long /*count*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned char * /*chars*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync FontEncoding /*fontEncoding*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned long * /*glyphcount*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync CharInfoPtr * /*glyphs*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void QueryGlyphExtents(FontPtr /*pFont*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync CharInfoPtr * /*charinfo*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned long /*count*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync ExtentInfoPtr /*info*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern Bool QueryTextExtents(FontPtr /*pFont*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned long /*count*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned char * /*chars*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync ExtentInfoPtr /*info*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern Bool ParseGlyphCachingMode(char * /*str*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void InitGlyphCaching(void);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void SetGlyphCachingMode(int /*newmode*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif /* DIXFONT_H */