Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Xext/bigreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ static void BigReqResetProc(ExtensionEntry * /* extEntry */
static DISPATCH_PROC(ProcBigReqDispatch);

void
BigReqExtensionInit(INITARGS)
BigReqExtensionInit(void)
{
#if 0
ExtensionEntry *extEntry;
Expand Down
2 changes: 1 addition & 1 deletion Xext/dpms.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ static DISPATCH_PROC(SProcDPMSCapable);
static void DPMSResetProc(ExtensionEntry * extEntry);

void
DPMSExtensionInit(INITARGS)
DPMSExtensionInit(void)
{
#if 0
ExtensionEntry *extEntry;
Expand Down
2 changes: 1 addition & 1 deletion Xext/saver.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ static int ScreenPrivateIndex;
****************/

void
ScreenSaverExtensionInit(INITARGS)
ScreenSaverExtensionInit(void)
{
ExtensionEntry *extEntry;

Expand Down
2 changes: 1 addition & 1 deletion Xext/shm.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ CheckForShmSyscall()
#endif

void
ShmExtensionInit(INITARGS)
ShmExtensionInit(void)
{
ExtensionEntry *extEntry;

Expand Down
2 changes: 1 addition & 1 deletion Xext/sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -2296,7 +2296,7 @@ ExtensionEntry *extEntry;
* ** Initialise the extension.
*/
void
SyncExtensionInit(INITARGS)
SyncExtensionInit(void)
{
ExtensionEntry *extEntry;

Expand Down
2 changes: 1 addition & 1 deletion Xext/xcmisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ static DISPATCH_PROC(SProcXCMiscGetXIDList);
static DISPATCH_PROC(SProcXCMiscGetXIDRange);

void
XCMiscExtensionInit(INITARGS)
XCMiscExtensionInit(void)
{
#if 0
ExtensionEntry *extEntry;
Expand Down
2 changes: 1 addition & 1 deletion Xext/xres.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ SProcResDispatch(ClientPtr client)
}

void
ResExtensionInit(INITARGS)
ResExtensionInit(void)
{
(void) AddExtension(XRES_NAME, 0, 0,
ProcResDispatch, SProcResDispatch,
Expand Down
2 changes: 1 addition & 1 deletion Xext/xtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ static DISPATCH_PROC(SProcXTestGetVersion);
static DISPATCH_PROC(SProcXTestGrabControl);

void
XTestExtensionInit(INITARGS)
XTestExtensionInit(void)
{
#if 0
ExtensionEntry *extEntry;
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ XEXTXORG_LIB='$(top_builddir)/Xext/libXextbuiltin.la'

dnl Core modules for most extensions, et al.
REQUIRED_MODULES="[randrproto >= 1.2] renderproto [fixesproto >= 4.0] [damageproto >= 1.1] xcmiscproto xextproto xproto xtrans xf86bigfontproto [scrnsaverproto >= 1.1] bigreqsproto resourceproto fontsproto inputproto [kbproto >= 1.0.3]"
REQUIRED_LIBS="xfont fontenc"
REQUIRED_LIBS="xfont2 fontenc"

AM_CONDITIONAL(SCREENSAVER, [test "x$SCREENSAVER" = xyes])
if test "x$SCREENSAVER" = xyes; then
Expand Down
4 changes: 2 additions & 2 deletions dbe/dbe.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
/* GLOBALS */

/* Per-screen initialization functions [init'ed by DbeRegisterFunction()] */
static Bool (*DbeInitFunct[MAXSCREENS]) (); /* pScreen, pDbeScreenPriv */
static Bool (*DbeInitFunct[MAXSCREENS]) (ScreenPtr, DbeScreenPrivPtr);

/* These are static globals copied to DBE's screen private for use by DDX */
static int dbeScreenPrivIndex;
Expand Down Expand Up @@ -116,7 +116,7 @@ DbeValidateBuffer(WindowPtr pWin, XID drawID, Bool dstbuf)
*****************************************************************************/

void
DbeRegisterFunction(ScreenPtr pScreen, Bool (*funct) ( /* ??? */ ))
DbeRegisterFunction(ScreenPtr pScreen, Bool (*funct) (ScreenPtr, DbeScreenPrivPtr))
{
int i;

Expand Down
147 changes: 140 additions & 7 deletions dix/dixfonts.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ static int size_slept_fpes = 0;

static FontPathElementPtr *slept_fpes = (FontPathElementPtr *) 0;

static FontPatternCachePtr patternCache;
static xfont2_pattern_cache_ptr patternCache;

_X_EXPORT int
FontToXError(err)
Expand Down Expand Up @@ -1853,17 +1853,150 @@ DeleteClientFontStuff(ClientPtr client)
}
}

static int
xfont2_client_auth_generation(ClientPtr client)
{
return 0;
}

static Bool
xfont2_client_signal(ClientPtr client)
{
return ClientSignal(client);
}

static void
xfont2_verrorf(const char *f, va_list ap)
{
VErrorF(f, ap);
}

static int
xfont2_init_fs_handlers(FontPathElementPtr fpe, FontBlockHandlerProcPtr block_handler)
{
return init_fs_handlers(fpe, (BlockHandlerProcPtr) block_handler);
}

static int
xfont2_register_fpe_funcs(const xfont2_fpe_funcs_rec *funcs)
{
return RegisterFPEFunctions(funcs->name_check,
funcs->init_fpe,
funcs->free_fpe,
funcs->reset_fpe,
funcs->open_font,
funcs->close_font,
funcs->list_fonts,
funcs->start_list_fonts_with_info,
funcs->list_next_font_with_info,
(WakeupFpeFunc) funcs->wakeup_fpe,
funcs->client_died,
funcs->load_glyphs,
funcs->start_list_fonts_and_aliases,
funcs->list_next_font_or_alias,
funcs->set_path_hook);
}

static void
xfont2_remove_fs_handlers(FontPathElementPtr fpe, FontBlockHandlerProcPtr block_handler, Bool all)
{
remove_fs_handlers(fpe, (BlockHandlerProcPtr) block_handler, all);
}

static void *
xfont2_get_server_client(void)
{
return serverClient;
}

static Atom
xfont2_make_atom(const char *string, unsigned len, int makeit)
{
return MakeAtom((char *) string, len, (Bool) makeit);
}

static const char *
xfont2_name_for_atom(Atom atom)
{
return NameForAtom(atom);
}

static unsigned long
xfont2_get_server_generation(void)
{
return serverGeneration;
}

static int
xfont2_add_fs_fd(int fd, FontFdHandlerProcPtr handler, void *data)
{
AddEnabledDevice(fd);
return 0;
}

static void
xfont2_remove_fs_fd(int fd)
{
RemoveEnabledDevice(fd);
}

static void
xfont2_adjust_fs_wait_for_delay(void *wt, unsigned long newdelay)
{
AdjustWaitForDelay(wt, newdelay);
}

static FontPtr
xfont2_find_old_font(FSID id)
{
return find_old_font((XID) id);
}

void
GetGlyphs(FontPtr font, unsigned long count, unsigned char *chars,
FontEncoding fontEncoding, unsigned long *glyphcount,
CharInfoPtr * glyphs)
{
(*font->get_glyphs) (font, count, chars, fontEncoding, glyphcount, glyphs);
}

void
ResetFontPrivateIndex(void)
{
}

static const xfont2_client_funcs_rec xfont2_client_funcs = {
.version = XFONT2_CLIENT_FUNCS_VERSION,
.client_auth_generation = xfont2_client_auth_generation,
.client_signal = xfont2_client_signal,
.delete_font_client_id = DeleteFontClientID,
.verrorf = xfont2_verrorf,
.find_old_font = xfont2_find_old_font,
.get_client_resolutions = GetClientResolutions,
.get_default_point_size = GetDefaultPointSize,
.get_new_font_client_id = GetNewFontClientID,
.get_time_in_millis = GetTimeInMillis,
.init_fs_handlers = xfont2_init_fs_handlers,
.register_fpe_funcs = xfont2_register_fpe_funcs,
.remove_fs_handlers = xfont2_remove_fs_handlers,
.get_server_client = xfont2_get_server_client,
.set_font_authorizations = set_font_authorizations,
.store_font_client_font = StoreFontClientFont,
.make_atom = xfont2_make_atom,
.valid_atom = ValidAtom,
.name_for_atom = xfont2_name_for_atom,
.get_server_generation = xfont2_get_server_generation,
.add_fs_fd = xfont2_add_fs_fd,
.remove_fs_fd = xfont2_remove_fs_fd,
.adjust_fs_wait_for_delay = xfont2_adjust_fs_wait_for_delay,
};

void
InitFonts()
{
patternCache = MakeFontPatternCache();

{
#ifdef KDRIVESERVER
BuiltinRegisterFpeFunctions();
#endif
FontFileRegisterFpeFunctions();
}
xfont2_init(&xfont2_client_funcs);
}

_X_EXPORT XFONT_LTO
Expand Down
33 changes: 17 additions & 16 deletions include/dixfont.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,23 @@ SOFTWARE.
#include <X11/fonts/font.h>
#include "closure.h"
#include <X11/fonts/fontstruct.h>
#include <X11/fonts/libxfont2.h>

#define QueryGlyphExtents xfont2_query_glyph_extents
#define QueryTextExtents xfont2_query_text_extents
#define ParseGlyphCachingMode xfont2_parse_glyph_caching_mode
#define InitGlyphCaching xfont2_init_glyph_caching
#define MakeFontPatternCache xfont2_make_font_pattern_cache
#define FreeFontPatternCache xfont2_free_font_pattern_cache
#define EmptyFontPatternCache xfont2_empty_font_pattern_cache
#define CacheFontPattern xfont2_cache_font_pattern
#define FindCachedFontPattern xfont2_find_cached_font_pattern
#define RemoveCachedFontPattern xfont2_remove_cached_font_pattern
#define MakeFontNamesRecord xfont2_make_font_names_record
#define FreeFontNames xfont2_free_font_names
#define AddFontNamesName xfont2_add_font_names_name
#define AllocateFontPrivateIndex xfont2_allocate_font_private_index
#define _FontSetNewPrivate xfont2_font_set_private

#define NullDIXFontProp ((DIXFontPropPtr)0)

Expand Down Expand Up @@ -131,20 +148,4 @@ void GetGlyphs(FontPtr /*font*/,
unsigned long * /*glyphcount*/,
CharInfoPtr * /*glyphs*/);

void QueryGlyphExtents(FontPtr /*pFont*/,
CharInfoPtr * /*charinfo*/,
unsigned long /*count*/,
ExtentInfoPtr /*info*/);

Bool QueryTextExtents(FontPtr /*pFont*/,
unsigned long /*count*/,
unsigned char * /*chars*/,
ExtentInfoPtr /*info*/);

Bool ParseGlyphCachingMode(char * /*str*/);

void InitGlyphCaching(void);

void SetGlyphCachingMode(int /*newmode*/);

#endif /* DIXFONT_H */
32 changes: 16 additions & 16 deletions mi/miinitext.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ extern Bool noXFree86BigfontExtension;
#endif
extern Bool noXFixesExtension;

#define INITARGS void
typedef void (*InitExtension)(INITARGS);
#define void void
typedef void (*InitExtension)(void);

#define _XSHM_SERVER_
#include <X11/extensions/shmstr.h>
Expand All @@ -100,30 +100,30 @@ typedef void (*InitExtension)(INITARGS);
#endif

/* FIXME: this whole block of externs should be from the appropriate headers */
extern void ShmExtensionInit(INITARGS);
extern void XTestExtensionInit(INITARGS);
extern void BigReqExtensionInit(INITARGS);
extern void ShmExtensionInit(void);
extern void XTestExtensionInit(void);
extern void BigReqExtensionInit(void);
#ifdef SCREENSAVER
extern void ScreenSaverExtensionInit (INITARGS);
extern void ScreenSaverExtensionInit (void);
#endif
extern void SyncExtensionInit(INITARGS);
extern void XCMiscExtensionInit(INITARGS);
extern void SyncExtensionInit(void);
extern void XCMiscExtensionInit(void);
#ifdef DBE
extern void DbeExtensionInit(INITARGS);
extern void DbeExtensionInit(void);
#endif
#ifdef XF86BIGFONT
extern void XFree86BigfontExtensionInit(INITARGS);
extern void XFree86BigfontExtensionInit(void);
#endif
#ifdef DPMSExtension
extern void DPMSExtensionInit(INITARGS);
extern void DPMSExtensionInit(void);
#endif
extern void RenderExtensionInit(INITARGS);
extern void RRExtensionInit(INITARGS);
extern void RenderExtensionInit(void);
extern void RRExtensionInit(void);
#ifdef RES
extern void ResExtensionInit(INITARGS);
extern void ResExtensionInit(void);
#endif
extern void XFixesExtensionInit(INITARGS);
extern void DamageExtensionInit(INITARGS);
extern void XFixesExtensionInit(void);
extern void DamageExtensionInit(void);

/* The following is only a small first step towards run-time
* configurable extensions.
Expand Down