Unverified Commit 975511c8 authored by Mihai Moldovan's avatar Mihai Moldovan

Merge branch…

Merge branch 'sunweaver-pr/hw-nxagent-drop-duplicate-Xserver-code_disable-Xserver-code-and-include-in-nxagent' into arctica-3.6.x Attributes GH PR #120: https://github.com/ArcticaProject/nx-libs/pull/120
parents 9df15366 a5befd4e
XCOMM $XFree86: xc/programs/Xserver/GL/glx/Imakefile,v 1.11 2004/01/28 18:11:50 alanh Exp $
NULL =
#if DoLoadableServer
# if !BuildModuleInSubdir
# define IHaveModules
......@@ -22,29 +24,95 @@ LinkSourceFile(glcontextmodes.h, $(MESASRCDIR)/src/mesa/drivers/dri/common)
LinkSourceFile(indirect_size.c, $(MESASRCDIR)/src/glx/x11)
LinkSourceFile(indirect_size.h, $(MESASRCDIR)/src/glx/x11)
SRCS = global.c glxbuf.c glxcmds.c glxcmdsswap.c glxext.c \
glxfb.c glximports.c glxmem.c glxpix.c glxscreens.c \
glxutil.c render2.c render2swap.c renderpix.c \
renderpixswap.c rensize.c rensizetab.c single2.c \
single2swap.c singlepix.c singlepixswap.c \
singlesize.c xfont.c g_disptab.c g_disptab_EXT.c \
g_render.c g_renderswap.c g_single.c g_singleswap.c \
glcontextmodes.c indirect_size.c $(MSRCS)
OBJS = global.o glxbuf.o glxcmds.o glxcmdsswap.o glxext.o \
glxfb.o glximports.o glxmem.o glxpix.o glxscreens.o \
glxutil.o render2.o render2swap.o renderpix.o \
renderpixswap.o rensize.o rensizetab.o single2.o \
single2swap.o singlepix.o singlepixswap.o \
singlesize.o xfont.o g_disptab.o g_disptab_EXT.o \
g_render.o g_renderswap.o g_single.o g_singleswap.o \
glcontextmodes.o indirect_size.o $(MOBJS)
INCLUDES = -I$(SERVERSRC)/GL/glx -I$(SERVERSRC)/GL/include -I$(SERVERSRC)/include -I$(INCLUDESRC) -I$(MESASRCDIR)/include \
-I$(XINCLUDESRC) -I$(SERVERSRC)/mi \
-I$(EXTINCSRC) -I$(LIBSRC)/GL/include \
#if (!(defined(NXAgentServer) && NXAgentServer))
NXAGENT_SKIP_SRCS = \
glxext.c \
$(NULL)
NXAGENT_SKIP_OBJS = \
glxext.o \
$(NULL)
#endif
SRCS = global.c \
glxbuf.c \
glxcmds.c \
glxcmdsswap.c \
glxfb.c \
glximports.c \
glxmem.c \
glxpix.c \
glxscreens.c \
glxutil.c \
render2.c \
render2swap.c \
renderpix.c \
renderpixswap.c \
rensize.c \
rensizetab.c \
single2.c \
single2swap.c \
singlepix.c \
singlepixswap.c \
singlesize.c \
xfont.c \
g_disptab.c \
g_disptab_EXT.c \
g_render.c \
g_renderswap.c \
g_single.c \
g_singleswap.c \
glcontextmodes. c \
indirect_size.c \
$(MSRCS) \
$(NXAGENT_SKIP_SRCS) \
$(NULL)
OBJS = global.o \
glxbuf.o \
glxcmds.o \
glxcmdsswap.o \
glxfb.o \
glximports.o \
glxmem.o \
glxpix.o \
glxscreens.o \
glxutil.o \
render2.o \
render2swap.o \
renderpix.o \
renderpixswap.o \
rensize.o \
rensizetab.o \
single2.o \
single2swap.o \
singlepix.o \
singlepixswap.o \
singlesize.o \
xfont.o \
g_disptab.o \
g_disptab_EXT.o \
g_render.o \
g_renderswap.o \
g_single.o \
g_singleswap.o \
glcontextmodes.o \
indirect_size.o \
$(MOBJS) \
$(NXAGENT_SKIP_OBJS) \
$(NULL)
INCLUDES = -I$(SERVERSRC)/GL/glx \
-I$(SERVERSRC)/GL/include \
-I$(SERVERSRC)/include \
-I$(INCLUDESRC) \
-I$(MESASRCDIR)/include \
-I$(XINCLUDESRC) \
-I$(SERVERSRC)/mi \
-I$(EXTINCSRC) \
-I$(LIBSRC)/GL/include \
-I$(XF86SRC) \
`pkg-config --cflags-only-I pixman-1`
`pkg-config --cflags-only-I pixman-1` \
$(NULL)
#if defined(DarwinArchitecture) && ((OSMajorVersion == 6 && OSMinorVersion < 3) || OSMajorVersion < 6)
NO_EXT_DEFS = -DMISSING_GL_EXTS
......
......@@ -390,6 +390,8 @@ __GLXcontext *__glXForceCurrent(__GLXclientState *cl, GLXContextTag tag,
/************************************************************************/
#ifndef NXAGENT_SERVER
/*
** Top level dispatcher; all commands are executed from here down.
*/
......@@ -493,6 +495,9 @@ static int __glXSwapDispatch(ClientPtr client)
return (*proc)(cl, (GLbyte *) stuff);
}
#endif /* NXAGENT_SERVER */
int __glXNoSuchSingleOpcode(__GLXclientState *cl, GLbyte *pc)
{
return BadRequest;
......
......@@ -187,7 +187,9 @@ INSTPGMFLAGS =
cfb24/ModuleLibraryTargetName(cfb24)
CFB32 = cfb/ModuleLibraryTargetName(cfb) \
cfb32/ModuleLibraryTargetName(cfb32)
#if (!(defined(NXAgentServer) && NXAgentServer))
DAMAGE = miext/damage/ModuleLibraryTargetName(damage)
#endif
SHADOW = miext/shadow/ModuleLibraryTargetName(shadow)
LAYER = miext/layer/ModuleLibraryTargetName(layer)
#else
......@@ -212,7 +214,9 @@ INSTPGMFLAGS =
cfb/LibraryTargetName(cfb)
CFB32 = cfb32/LibraryTargetName(cfb32) \
cfb/LibraryTargetName(cfb)
#if (!(defined(NXAgentServer) && NXAgentServer))
DAMAGE = miext/damage/LibraryTargetName(damage)
#endif
SHADOW = miext/shadow/LibraryTargetName(shadow)
LAYER = miext/layer/LibraryTargetName(layer)
#endif
......@@ -356,7 +360,6 @@ NXAGENTOBJS = hw/nxagent/miinitext.o \
hw/nxagent/NXmiglyph.o \
hw/nxagent/NXmiexpose.o \
hw/nxagent/NXresource.o \
hw/nxagent/NXmiwindow.o \
hw/nxagent/NXdamage.o
#elif !defined(LynxOSArchitecture) && \
!defined(Win32Architecture) && \
......@@ -377,7 +380,6 @@ NXAGENTOBJS = hw/nxagent/miinitext.o \
hw/nxagent/NXmiglyph.o \
hw/nxagent/NXmiexpose.o \
hw/nxagent/NXresource.o \
hw/nxagent/NXmiwindow.o \
hw/nxagent/NXdamage.o
#else
NXAGENTOBJS = hw/nxagent/miinitext.o \
......@@ -396,7 +398,6 @@ NXAGENTOBJS = hw/nxagent/miinitext.o \
hw/nxagent/NXmiglyph.o \
hw/nxagent/NXmiexpose.o \
hw/nxagent/NXresource.o \
hw/nxagent/NXmiwindow.o \
hw/nxagent/NXdamage.o \
dix/main.o
#endif
......
......@@ -30,7 +30,7 @@ XCOMM $XFree86: xc/programs/Xserver/Xext/Imakefile,v 3.43 2003/04/21 18:56:48 sv
SUBDIRS = extmod
#endif
#if HasShm
#if HasShm && (!(defined(NXAgentServer) && NXAgentServer))
SHMSRCS = shm.c
SHMOBJS = shm.o
#endif
......@@ -48,7 +48,10 @@ XF86BIGFOBJS = xf86bigfont.o
#endif
#endif
#if BuildXvExt
#if BuildXvExt && ( (defined(NXAgentServer) && NXAgentServer) && !defined(SunArchitecture) && !defined(cygwinArchitecture) )
XVSRCS = xvmain.c xvmc.c
XVOBJS = xvmain.o xvmc.o
#elif BuildXvExt
XVSRCS = xvmain.c xvdisp.c xvmc.c
XVOBJS = xvmain.o xvdisp.o xvmc.o
#endif
......
......@@ -202,6 +202,7 @@ static Bool CheckForShmSyscall()
#endif
#ifndef NXAGENT_SERVER
void
ShmExtensionInit(INITARGS)
{
......@@ -265,6 +266,7 @@ ShmExtensionInit(INITARGS)
EventSwapVector[ShmCompletionCode] = (EventSwapPtr) SShmCompletionEvent;
}
}
#endif /* NXAGENT_SERVER */
/*ARGSUSED*/
static void
......@@ -502,6 +504,7 @@ ProcShmDetach(client)
return(client->noClientException);
}
#ifndef NXAGENT_SERVER
static void
miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data)
DrawablePtr dst;
......@@ -563,6 +566,7 @@ fbShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data)
miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy,
data);
}
#endif /* NXAGENT_SERVER */
#ifdef PANORAMIX
......@@ -824,6 +828,7 @@ CreatePmap:
#endif
#ifndef NXAGENT_SERVER
static int
ProcShmPutImage(client)
register ClientPtr client;
......@@ -934,7 +939,7 @@ ProcShmPutImage(client)
return (client->noClientException);
}
#endif /* NXAGENT_SERVER */
static int
......@@ -1047,6 +1052,7 @@ ProcShmGetImage(client)
return(client->noClientException);
}
#ifndef NXAGENT_SERVER
static PixmapPtr
fbShmCreatePixmap (pScreen, width, height, depth, addr)
ScreenPtr pScreen;
......@@ -1068,6 +1074,7 @@ fbShmCreatePixmap (pScreen, width, height, depth, addr)
}
return pPixmap;
}
#endif /* NXAGENT_SERVER */
static int
ProcShmCreatePixmap(client)
......@@ -1142,6 +1149,7 @@ CreatePmap:
return (BadAlloc);
}
#ifndef NXAGENT_SERVER
static int
ProcShmDispatch (client)
register ClientPtr client;
......@@ -1177,6 +1185,7 @@ ProcShmDispatch (client)
return BadRequest;
}
}
#endif /* NXAGENT_SERVER */
static void
SShmCompletionEvent(from, to)
......@@ -1286,6 +1295,7 @@ SProcShmCreatePixmap(client)
return ProcShmCreatePixmap(client);
}
#ifndef NXAGENT_SERVER
static int
SProcShmDispatch (client)
register ClientPtr client;
......@@ -1309,3 +1319,4 @@ SProcShmDispatch (client)
return BadRequest;
}
}
#endif /* NXAGENT_SERVER */
\ No newline at end of file
......@@ -224,6 +224,8 @@ static int SWriteImageFormatInfo(ClientPtr, xvImageFormatInfo*);
**
*/
#if !defined(NXAGENT_SERVER) || defined(__sun) || defined(__CYGWIN__)
int
ProcXvDispatch(ClientPtr client)
{
......@@ -351,6 +353,8 @@ SProcXvDispatch(ClientPtr client)
}
}
}
#endif /* !defined(NXAGENT_SERVER) || defined(__sun) || defined(__CYGWIN__) */
static int
ProcXvQueryExtension(ClientPtr client)
......
XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:48:16 cpqbld Exp $
XCOMM $XFree86: xc/programs/Xserver/dix/Imakefile,v 3.17 2003/04/15 18:30:43 alanh Exp $
NULL =
#include <Server.tmpl>
XPSRC = xpstubs.c
......@@ -15,18 +13,80 @@ FFS_SRC = ffs.c
FFS_OBJ = ffs.o
#endif
SRCS = atom.c colormap.c cursor.c devices.c dispatch.c dixutils.c events.c \
extension.c gc.c globals.c glyphcurs.c grabs.c \
main.c property.c region.c resource.c swaprep.c swapreq.c \
tables.c window.c initatoms.c dixfonts.c privates.c pixmap.c $(FFS_SRC)
OBJS = atom.o colormap.o cursor.o devices.o dispatch.o dixutils.o events.o \
extension.o gc.o globals.o glyphcurs.o grabs.o \
main.o property.o region.o resource.o swaprep.o swapreq.o \
tables.o window.o initatoms.o dixfonts.o privates.o pixmap.o $(FFS_OBJ)
INCLUDES = -I../include -I$(XINCLUDESRC) -I$(EXTINCSRC) \
-I$(SERVERSRC)/Xext -I$(SERVERSRC)/lbx \
`pkg-config --cflags-only-I pixman-1`
#if (!(defined(NXAgentServer) && NXAgentServer))
NXAGENT_SKIP_SRCS = \
dispatch.c \
dixfonts.c \
events.c \
extension.c \
glyphcurs.c \
property.c \
resource.c \
window.c \
$(NULL)
NXAGENT_SKIP_OBJS = \
dispatch.o \
dixfonts.o \
events.o \
extension.o \
glyphcurs.o \
property.o \
resource.o \
window.o \
$(NULL)
#endif
SRCS = \
atom.c \
colormap.c \
cursor.c \
devices.c \
dixutils.c \
gc.c \
globals.c \
grabs.c \
main.c \
region.c \
swaprep.c \
swapreq.c \
tables.c \
initatoms.c \
privates.c \
pixmap.c \
$(NXAGENT_SKIP_SRCS) \
$(FFS_SRC) \
$(NULL)
OBJS = \
atom.o \
colormap.o \
cursor.o \
devices.o \
dixutils.o \
gc.o \
globals.o \
grabs.o \
main.o \
region.o \
swaprep.o \
swapreq.o \
tables.o \
initatoms.o \
privates.o \
pixmap.o \
$(NXAGENT_SKIP_OBJS) \
$(FFS_OBJ) \
$(NULL)
INCLUDES = -I../include \
-I$(XINCLUDESRC) \
-I$(EXTINCSRC) \
-I$(SERVERSRC)/Xext \
-I$(SERVERSRC)/lbx \
`pkg-config --cflags-only-I pixman-1` \
$(NULL)
LINTLIBS = ../os/llib-los.ln
/*
......
......@@ -209,6 +209,7 @@ UpdateCurrentTimeIf()
currentTime = systime;
}
#ifndef NXAGENT_SERVER
void
InitSelections()
{
......@@ -217,6 +218,7 @@ InitSelections()
CurrentSelections = (Selection *)NULL;
NumCurrentSelections = 0;
}
#endif /* NXAGENT_SERVER */
void
FlushClientCaches(XID id)
......@@ -349,6 +351,7 @@ SmartScheduleClient (int *clientReady, int nready)
}
#endif
#ifndef NXAGENT_SERVER
#define MAJOROP ((xReq *)client->requestBuffer)->reqType
void
......@@ -485,6 +488,7 @@ Dispatch(void)
}
#undef MAJOROP
#endif /* NXAGENT_SERVER */
int
ProcBadRequest(ClientPtr client)
......@@ -639,6 +643,7 @@ ProcChangeSaveSet(register ClientPtr client)
}
}
#ifndef NXAGENT_SERVER
int
ProcReparentWindow(register ClientPtr client)
{
......@@ -673,6 +678,7 @@ ProcReparentWindow(register ClientPtr client)
else
return (BadMatch);
}
#endif /* NXAGENT_SERVER */
int
ProcMapWindow(register ClientPtr client)
......@@ -790,6 +796,7 @@ GetGeometry(register ClientPtr client, xGetGeometryReply *rep)
REQUEST_SIZE_MATCH(xResourceReq);
SECURITY_VERIFY_GEOMETRABLE (pDraw, stuff->id, client, SecurityReadAccess);
memset(rep, 0, sizeof(xGetGeometryReply));
rep->type = X_Reply;
rep->length = 0;
rep->sequenceNumber = client->sequence;
......@@ -829,7 +836,6 @@ ProcGetGeometry(register ClientPtr client)
xGetGeometryReply rep;
int status;
memset(&rep, 0, sizeof(xGetGeometryReply));
if ((status = GetGeometry(client, &rep)) != Success)
return status;
......@@ -838,6 +844,7 @@ ProcGetGeometry(register ClientPtr client)
}
#ifndef NXAGENT_SERVER
int
ProcQueryTree(register ClientPtr client)
{
......@@ -887,6 +894,8 @@ ProcQueryTree(register ClientPtr client)
return(client->noClientException);
}
#endif /* NXAGENT_SERVER */
int
ProcInternAtom(register ClientPtr client)
......@@ -950,6 +959,7 @@ ProcGetAtomName(register ClientPtr client)
extern int k5_bad();
#endif
#ifndef NXAGENT_SERVER
int
ProcSetSelectionOwner(register ClientPtr client)
{
......@@ -1045,6 +1055,7 @@ ProcSetSelectionOwner(register ClientPtr client)
return (BadAtom);
}
}
#endif /* NXAGENT_SERVER */
int
ProcGetSelectionOwner(register ClientPtr client)
......@@ -1078,6 +1089,7 @@ ProcGetSelectionOwner(register ClientPtr client)
}
}
#ifndef NXAGENT_SERVER
int
ProcConvertSelection(register ClientPtr client)
{
......@@ -1143,6 +1155,7 @@ ProcConvertSelection(register ClientPtr client)
return (BadAtom);
}
}
#endif /* NXAGENT_SERVER */
int
ProcGrabServer(register ClientPtr client)
......@@ -1285,6 +1298,7 @@ ProcTranslateCoords(register ClientPtr client)
return(client->noClientException);
}
#ifndef NXAGENT_SERVER
int
ProcOpenFont(register ClientPtr client)
{
......@@ -1324,6 +1338,7 @@ ProcCloseFont(register ClientPtr client)
return (BadFont);
}
}
#endif /* NXAGENT_SERVER */
int
ProcQueryFont(register ClientPtr client)
......@@ -1335,6 +1350,7 @@ ProcQueryFont(register ClientPtr client)
REQUEST_SIZE_MATCH(xResourceReq);
client->errorValue = stuff->id; /* EITHER font or gc */
pFont = (FontPtr)SecurityLookupIDByType(client, stuff->id, RT_FONT,
SecurityReadAccess);
if (!pFont)
......@@ -1367,6 +1383,7 @@ ProcQueryFont(register ClientPtr client)
rlength = sizeof(xQueryFontReply) +
FONTINFONPROPS(FONTCHARSET(pFont)) * sizeof(xFontProp) +
nprotoxcistructs * sizeof(xCharInfo);
reply = (xQueryFontReply *)ALLOCATE_LOCAL(rlength);
if(!reply)
{
......@@ -1435,6 +1452,7 @@ ProcQueryTextExtents(register ClientPtr client)
return(client->noClientException);
}
#ifndef NXAGENT_SERVER
int
ProcListFonts(register ClientPtr client)
{
......@@ -1456,6 +1474,7 @@ ProcListFontsWithInfo(register ClientPtr client)
return StartListFontsWithInfo(client, stuff->nbytes,
(unsigned char *) &stuff[1], stuff->maxNames);
}
#endif /* NXAGENT_SERVER */
/**
*
......@@ -1527,6 +1546,7 @@ CreatePmap:
return (BadAlloc);
}
#ifndef NXAGENT_SERVER
int
ProcFreePixmap(register ClientPtr client)
{
......@@ -1548,6 +1568,7 @@ ProcFreePixmap(register ClientPtr client)
return (BadPixmap);
}
}
#endif /* NXAGENT_SERVER */
int
ProcCreateGC(register ClientPtr client)
......@@ -3186,6 +3207,7 @@ ProcQueryBestSize (register ClientPtr client)
}
#ifndef NXAGENT_SERVER
int
ProcSetScreenSaver (register ClientPtr client)
{
......@@ -3241,6 +3263,7 @@ ProcSetScreenSaver (register ClientPtr client)
SetScreenSaverTimer();
return (client->noClientException);
}
#endif /* NXAGENT_SERVER */
int
ProcGetScreenSaver(register ClientPtr client)
......@@ -3446,6 +3469,7 @@ ProcChangeCloseDownMode(register ClientPtr client)
}
}
#ifndef NXAGENT_SERVER
int ProcForceScreenSaver(register ClientPtr client)
{
REQUEST(xForceScreenSaverReq);
......@@ -3461,6 +3485,7 @@ int ProcForceScreenSaver(register ClientPtr client)
SaveScreens(SCREEN_SAVER_FORCER, (int)stuff->mode);
return client->noClientException;
}
#endif /* NXAGENT_SERVER */
int ProcNoOperation(register ClientPtr client)
{
......@@ -3495,6 +3520,7 @@ InitProcVectors(void)
}
/**********************
* CloseDownClient
*
......@@ -3502,6 +3528,7 @@ InitProcVectors(void)
* then killed again, the client is really destroyed.
*********************/
#ifndef NXAGENT_SERVER
char dispatchExceptionAtReset = DE_RESET;
void
......@@ -3589,6 +3616,7 @@ CloseDownClient(register ClientPtr client)
currentMaxClients--;
}
}
#endif /* NXAGENT_SERVER */
static void
KillAllClients()
......@@ -3682,6 +3710,7 @@ extern int clientPrivateLen;
extern unsigned *clientPrivateSizes;
extern unsigned totalClientSize;
#ifndef NXAGENT_SERVER
int
InitClientPrivates(ClientPtr client)
{
......@@ -3716,6 +3745,7 @@ InitClientPrivates(ClientPtr client)
}
return 1;
}
#endif /* NXAGENT_SERVER */
/************************
* int NextAvailableClient(ospriv)
......
......@@ -72,63 +72,6 @@ Equipment Corporation.
#include <stdio.h>
#endif
#ifdef NX_TRANS_SOCKET
char _NXFontPath[1024];
/*
* Override the default font path and make
* it configurable at run time, based on
* the NX_FONT environment.
*/
static const char *_NXGetFontPath(const char *path)
{
const char *fontEnv;
/*
* Check the environment only once.
*/
if (*_NXFontPath != '\0')
{
return _NXFontPath;
}
fontEnv = getenv("NX_FONT");
if (fontEnv != NULL && *fontEnv != '\0')
{
if (strlen(fontEnv) + 1 > 1024)
{
#ifdef NX_TRANS_TEST
fprintf(stderr, "_NXGetFontPath: WARNING! Maximum length of font path exceeded.\n");
#endif
goto _NXGetFontPathError;
}
strcpy(_NXFontPath, fontEnv);
#ifdef NX_TRANS_TEST
fprintf(stderr, "_NXGetFontPath: Using NX font path [%s].\n", _NXFontPath);
#endif
return _NXFontPath;
}
_NXGetFontPathError:
strcpy(_NXFontPath, path);
#ifdef NX_TRANS_TEST
fprintf(stderr, "_NXGetFontPath: Using default font path [%s].\n", _NXFontPath);
#endif
return _NXFontPath;
}
#endif
#ifdef PANORAMIX
#include "panoramiX.h"
#endif
......@@ -288,6 +231,7 @@ FreeFPE (FontPathElementPtr fpe)
}
}
#ifndef NXAGENT_SERVER
static Bool
doOpenFont(ClientPtr client, OFclosurePtr c)
{
......@@ -438,6 +382,7 @@ bail:
xfree(c);
return TRUE;
}
#endif /* NXAGENT_SERVER */
int
OpenFont(ClientPtr client, XID fid, Mask flags, unsigned lenfname, char *pfontname)
......@@ -634,6 +579,7 @@ QueryFont(FontPtr pFont, xQueryFontReply *pReply, int nProtoCCIStructs)
return;
}
#ifndef NXAGENT_SERVER
static Bool
doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
{
......@@ -1163,6 +1109,7 @@ bail:
xfree(c);
return TRUE;
}
#endif /* NXAGENT_SERVER */
int
StartListFontsWithInfo(ClientPtr client, int length, unsigned char *pattern,
......@@ -1401,6 +1348,13 @@ doPolyText(ClientPtr client, register PTclosurePtr c)
err = BadAlloc;
goto bail;
}
#ifdef NXAGENT_SERVER
pGC->tileIsPixel = TRUE;
pGC->tile.pixel = 0;
pGC->stipple = NullPixmap;
#endif
if ((err = CopyGC(c->pGC, pGC, GCFunction |
GCPlaneMask | GCForeground |
GCBackground | GCFillStyle |
......@@ -1593,6 +1547,13 @@ doImageText(ClientPtr client, register ITclosurePtr c)
err = BadAlloc;
goto bail;
}
#ifdef NXAGENT_SERVER
pGC->tileIsPixel = TRUE;
pGC->tile.pixel = 0;
pGC->stipple = NullPixmap;
#endif
if ((err = CopyGC(c->pGC, pGC, GCFunction | GCPlaneMask |
GCForeground | GCBackground | GCFillStyle |
GCTile | GCStipple | GCTileStipXOrigin |
......@@ -1733,7 +1694,6 @@ find_existing_fpe(FontPathElementPtr *list, int num, unsigned char *name, int le
return (FontPathElementPtr) 0;
}
static int
SetFontPathElements(int npaths, unsigned char *paths, int *bad, Bool persist)
{
......@@ -1810,11 +1770,13 @@ SetFontPathElements(int npaths, unsigned char *paths, int *bad, Bool persist)
err = (*fpe_functions[fpe->type].init_fpe) (fpe);
if (err != Successful)
{
#ifndef NXAGENT_SERVER
if (persist)
{
ErrorF("Could not init font path element %s, removing from list!\n",
fpe->name);
}
#endif /* NXAGENT_SERVER */
xfree (fpe->name);
xfree (fpe);
}
......@@ -1862,6 +1824,7 @@ SetFontPath(ClientPtr client, int npaths, unsigned char *paths, int *error)
return err;
}
#ifndef NXAGENT_SERVER
int
SetDefaultFontPath(char *path)
{
......@@ -1876,19 +1839,11 @@ SetDefaultFontPath(char *path)
bad;
/* get enough for string, plus values -- use up commas */
#ifdef NX_TRANS_SOCKET
len = strlen(_NXGetFontPath(path)) + 1;
#else
len = strlen(path) + 1;
#endif
nump = cp = newpath = (unsigned char *) ALLOCATE_LOCAL(len);
if (!newpath)
return BadAlloc;
#ifdef NX_TRANS_SOCKET
pp = (unsigned char *) _NXGetFontPath(path);
#else
pp = (unsigned char *) path;
#endif
cp++;
while (*pp) {
if (*pp == ',') {
......@@ -1910,6 +1865,7 @@ SetDefaultFontPath(char *path)
return err;
}
#endif /* NXAGENT_SERVER */
unsigned char *
GetFontPath(int *count, int *length)
......@@ -1928,7 +1884,7 @@ GetFontPath(int *count, int *length)
if (c == NULL) {
free(font_path_string);
font_path_string = NULL;
return BadAlloc;
return NULL;
}
font_path_string = c;
......
......@@ -1218,6 +1218,7 @@ CheckGrabForSyncs(register DeviceIntPtr thisDev, Bool thisMode, Bool otherMode)
ComputeFreezes();
}
#ifndef NXAGENT_SERVER
void
ActivatePointerGrab(register DeviceIntPtr mouse, register GrabPtr grab,
TimeStamp time, Bool autoGrab)
......@@ -1269,6 +1270,7 @@ DeactivatePointerGrab(register DeviceIntPtr mouse)
FreeCursor(grab->cursor, (Cursor)0);
ComputeFreezes();
}
#endif /* NXAGENT_SERVER */
void
ActivateKeyboardGrab(register DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, Bool passive)
......@@ -1914,6 +1916,7 @@ PointInBorderSize(WindowPtr pWin, int x, int y)
return FALSE;
}
#ifndef NXAGENT_SERVER
static WindowPtr
XYToWindow(int x, int y)
{
......@@ -1961,6 +1964,7 @@ XYToWindow(int x, int y)
}
return spriteTrace[spriteTraceGood-1];
}
#endif /* NXAGENT_SERVER */
static Bool
CheckMotion(xEvent *xE)
......@@ -2072,6 +2076,7 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff)
}
#endif
#ifndef NXAGENT_SERVER
void
DefineInitialRootWindow(register WindowPtr win)
{
......@@ -2113,6 +2118,7 @@ DefineInitialRootWindow(register WindowPtr win)
}
#endif
}
#endif /* NXAGENT_SERVER */
/*
* This does not take any shortcuts, and even ignores its argument, since
......@@ -3140,6 +3146,7 @@ EnterLeaveEvent(
}
if (mask & filters[type])
{
memset(&event, 0, sizeof(xEvent));
event.u.u.type = type;
event.u.u.detail = detail;
event.u.enterLeave.time = currentTime.milliseconds;
......@@ -3966,6 +3973,7 @@ CloseDownEvents(void)
spriteTraceSize = 0;
}
#ifndef NXAGENT_SERVER
int
ProcSendEvent(ClientPtr client)
{
......@@ -4053,6 +4061,7 @@ ProcSendEvent(ClientPtr client)
NullGrab, 0);
return Success;
}
#endif /* NXAGENT_SERVER */
int
ProcUngrabKey(ClientPtr client)
......
......@@ -287,7 +287,7 @@ CloseDownExtensions()
}
}
#ifndef NXAGENT_SERVER
int
ProcQueryExtension(ClientPtr client)
{
......@@ -392,7 +392,7 @@ ProcListExtensions(ClientPtr client)
}
return(client->noClientException);
}
#endif
ExtensionLookupProc
LookupProc(char *name, GCPtr pGC)
......
......@@ -74,6 +74,7 @@ the first one we find.
cursor metrics.
*/
#ifndef NXAGENT_SERVER
int
ServerBitsFromGlyph(FontPtr pfont, unsigned ch, register CursorMetricPtr cm, unsigned char **ppbits)
{
......@@ -138,7 +139,7 @@ ServerBitsFromGlyph(FontPtr pfont, unsigned ch, register CursorMetricPtr cm, uns
(*pScreen->DestroyPixmap)(ppix);
return Success;
}
#endif /* NXAGENT_SERVER */
Bool
CursorMetricsFromGlyph(register FontPtr pfont, unsigned ch, register CursorMetricPtr cm)
......
......@@ -188,6 +188,7 @@ found:
return Success;
}
#ifndef NXAGENT_SERVER
int
ProcChangeProperty(ClientPtr client)
{
......@@ -368,6 +369,7 @@ ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format,
}
return(Success);
}
#endif /* NXAGENT_SERVER */
int
DeleteProperty(WindowPtr pWin, Atom propName)
......@@ -446,6 +448,8 @@ NullPropertyReply(
return(client->noClientException);
}
#ifndef NXAGENT_SERVER
/*****************
* GetProperty
* If type Any is specified, returns the property from the specified
......@@ -600,6 +604,7 @@ ProcGetProperty(ClientPtr client)
}
return(client->noClientException);
}
#endif /* NXAGENT_SERVER */
int
ProcListProperties(ClientPtr client)
......
......@@ -422,6 +422,7 @@ FakeClientID(register int client)
return id;
}
#ifndef NXAGENT_SERVER
Bool
AddResource(XID id, RESTYPE type, void * value)
{
......@@ -457,6 +458,7 @@ AddResource(XID id, RESTYPE type, void * value)
rrec->expectID = id + 1;
return TRUE;
}
#endif /* NXAGENT_SERVER */
static void
RebuildTable(int client)
......@@ -507,6 +509,7 @@ RebuildTable(int client)
clientTable[client].resources = resources;
}
#ifndef NXAGENT_SERVER
void
FreeResource(XID id, RESTYPE skipDeleteFuncType)
{
......@@ -573,6 +576,7 @@ FreeResourceByType(XID id, RESTYPE type, Bool skipFree)
}
}
}
#endif /* NXAGENT_SERVER */
/*
* Change the value associated with a resource id. Caller
......@@ -606,6 +610,7 @@ ChangeResourceValue (XID id, RESTYPE rtype, void * value)
* add and delete an equal number of resources!
*/
#ifndef NXAGENT_SERVER
void
FindClientResourcesByType(
ClientPtr client,
......@@ -693,6 +698,7 @@ LookupClientResourceComplex(
}
return NULL;
}
#endif /* NXAGENT_SERVER */
void
......
......@@ -160,7 +160,7 @@ static Bool TileScreenSaver(int i, int kind);
int numSaveUndersViewable = 0;
int deltaSaveUndersViewable = 0;
#ifdef DEBUG
#if defined(DEBUG) || (defined(NXAGENT_SERVER) && defined(WINDOW_TREE_DEBUG))
/******
* PrintWindowTree
* For debugging only
......@@ -286,6 +286,7 @@ SetWindowToDefaults(register WindowPtr pWin)
#endif
}
#ifndef NXAGENT_SERVER
static void
MakeRootTile(WindowPtr pWin)
{
......@@ -331,6 +332,7 @@ MakeRootTile(WindowPtr pWin)
FreeScratchGC(pGC);
}
#endif /* NXAGENT_SERVER */
WindowPtr
AllocateWindow(ScreenPtr pScreen)
......@@ -477,6 +479,7 @@ CreateRootWindow(ScreenPtr pScreen)
return TRUE;
}
#ifndef NXAGENT_SERVER
void
InitRootWindow(WindowPtr pWin)
{
......@@ -498,6 +501,7 @@ InitRootWindow(WindowPtr pWin)
MapWindow(pWin, serverClient);
}
#endif /* NXAGENT_SERVER */
/* Set the region to the intersection of the rectangle and the
* window's winSize. The window is typically the parent of the
......@@ -509,7 +513,6 @@ ClippedRegionFromBox(register WindowPtr pWin, RegionPtr Rgn,
register int x, register int y,
register int w, register int h)
{
ScreenPtr pScreen = pWin->drawable.pScreen;
BoxRec box;
box = *(RegionExtents(&pWin->winSize));
......@@ -873,12 +876,14 @@ CrushTree(WindowPtr pWin)
}
}
/*****
* DeleteWindow
* Deletes child of window then window itself
* If wid is None, don't send any events
*****/
#ifndef NXAGENT_SERVER
int
DeleteWindow(void * value, XID wid)
{
......@@ -914,6 +919,7 @@ DeleteWindow(void * value, XID wid)
xfree(pWin);
return Success;
}
#endif /* NXAGENT_SERVER */
void
DestroySubwindows(register WindowPtr pWin, ClientPtr client)
......@@ -1231,6 +1237,25 @@ ChangeWindowAttributes(register WindowPtr pWin, Mask vmask, XID *vlist, ClientPt
#endif /* DO_SAVE_UNDERS */
break;
case CWEventMask:
/*
* TODO: Some applications like java bean shell
* don' t work if they cannot monitor the root
* window for Structure Redirect events. However
* this doesn't seem to be the best solution, since
* also an X server with a window manager running,
* doesn't allow to monitor for those events, but
* the java bean shell works flawlessy on this
* server.
*
* #ifdef NXAGENT_SERVER
* if (nxagentCheckIllegalRootMonitoring(pWin, (Mask)*pVlist))
* {
* return BadAccess;
* }
* #endif
*/
result = EventSelectForWindow(pWin, client, (Mask )*pVlist);
if (result)
{
......@@ -1599,8 +1624,6 @@ CreateUnclippedWinSize (register WindowPtr pWin)
pRgn = RegionCreate(&box, 1);
#ifdef SHAPE
if (wBoundingShape (pWin) || wClipShape (pWin)) {
ScreenPtr pScreen = pWin->drawable.pScreen;
RegionTranslate(pRgn, - pWin->drawable.x,
- pWin->drawable.y);
if (wBoundingShape (pWin))
......@@ -1635,8 +1658,6 @@ SetWinSize (register WindowPtr pWin)
(int)pWin->drawable.height);
#ifdef SHAPE
if (wBoundingShape (pWin) || wClipShape (pWin)) {
ScreenPtr pScreen = pWin->drawable.pScreen;
RegionTranslate(&pWin->winSize, - pWin->drawable.x,
- pWin->drawable.y);
if (wBoundingShape (pWin))
......@@ -1677,8 +1698,6 @@ SetBorderSize (register WindowPtr pWin)
(int)(pWin->drawable.height + (bw<<1)));
#ifdef SHAPE
if (wBoundingShape (pWin)) {
ScreenPtr pScreen = pWin->drawable.pScreen;
RegionTranslate(&pWin->borderSize, - pWin->drawable.x,
- pWin->drawable.y);
RegionIntersect(&pWin->borderSize, &pWin->borderSize,
......@@ -1752,6 +1771,7 @@ GravityTranslate (register int x, register int y, int oldx, int oldy,
}
/* XXX need to retile border on each window with ParentRelative origin */
#ifndef NXAGENT_SERVER
void
ResizeChildrenWinSize(register WindowPtr pWin, int dx, int dy, int dw, int dh)
{
......@@ -1816,6 +1836,7 @@ ResizeChildrenWinSize(register WindowPtr pWin, int dx, int dy, int dw, int dh)
}
}
}
#endif /* NXAGENT_SERVER */
#define GET_INT16(m, f) \
if (m & mask) \
......@@ -1888,7 +1909,6 @@ MakeBoundingRegion (
BoxPtr pBox)
{
RegionPtr pRgn;
ScreenPtr pScreen = pWin->drawable.pScreen;
pRgn = RegionCreate(pBox, 1);
if (wBoundingShape (pWin)) {
......@@ -1909,12 +1929,10 @@ ShapeOverlap (
BoxPtr pSibBox)
{
RegionPtr pWinRgn, pSibRgn;
register ScreenPtr pScreen;
Bool ret;
if (!IS_SHAPED(pWin) && !IS_SHAPED(pSib))
return TRUE;
pScreen = pWin->drawable.pScreen;
pWinRgn = MakeBoundingRegion (pWin, pWinBox);
pSibRgn = MakeBoundingRegion (pSib, pSibBox);
RegionIntersect(pWinRgn, pWinRgn, pSibRgn);
......@@ -2015,7 +2033,6 @@ WhereDoIGoInTheStack(
int smode)
{
BoxRec box;
register ScreenPtr pScreen;
WindowPtr pHead, pFirst;
if ((pWin == pWin->parent->firstChild) &&
......@@ -2023,7 +2040,6 @@ WhereDoIGoInTheStack(
return((WindowPtr ) NULL);
pHead = RealChildHead(pWin->parent);
pFirst = pHead ? pHead->nextSib : pWin->parent->firstChild;
pScreen = pWin->drawable.pScreen;
box.x1 = x;
box.y1 = y;
box.x2 = x + (int)w;
......@@ -2164,6 +2180,7 @@ ReflectStackChange(
* ConfigureWindow
*****/
#ifndef NXAGENT_SERVER
int
ConfigureWindow(register WindowPtr pWin, register Mask mask, XID *vlist, ClientPtr client)
{
......@@ -2417,6 +2434,7 @@ ActuallyDoSomething:
#undef RESIZE_WIN
#undef REBORDER_WIN
}
#endif /* NXAGENT_SERVER */
/******
......@@ -2436,6 +2454,17 @@ CirculateWindow(WindowPtr pParent, int direction, ClientPtr client)
xEvent event;
BoxRec box;
/*
* #ifdef NXAGENT_SERVER
* if (nxagentOption(Rootless) && nxagentWMIsRunning &&
* nxagentWindowTopLevel(pWin) && pWin -> overrideRedirect == 0)
* {
* nxagentCirculateRootlessWindows(direction);
* return Success;
* }
* #endif
*/
pHead = RealChildHead(pParent);
pFirst = pHead ? pHead->nextSib : pParent->firstChild;
if (direction == RaiseLowest)
......@@ -2501,6 +2530,7 @@ CompareWIDs(
* ReparentWindow
*****/
#ifndef NXAGENT_SERVER
int
ReparentWindow(register WindowPtr pWin, register WindowPtr pParent,
int x, int y, ClientPtr client)
......@@ -2593,6 +2623,7 @@ ReparentWindow(register WindowPtr pWin, register WindowPtr pParent,
RecalculateDeliverableEvents(pWin);
return(Success);
}
#endif /* NXAGENT_SERVER */
static void
RealizeTree(WindowPtr pWin)
......@@ -2635,6 +2666,7 @@ RealizeTree(WindowPtr pWin)
* MapNotify event is generated.
*****/
#ifndef NXAGENT_SERVER
int
MapWindow(register WindowPtr pWin, ClientPtr client)
{
......@@ -2737,7 +2769,7 @@ MapWindow(register WindowPtr pWin, ClientPtr client)
return(Success);
}
#endif /* NXAGENT_SERVER */
/*****
* MapSubwindows
......@@ -2926,6 +2958,7 @@ UnrealizeTree(
* generated. Cannot unmap a root window.
*****/
#ifndef NXAGENT_SERVER
int
UnmapWindow(register WindowPtr pWin, Bool fromConfigure)
{
......@@ -2979,6 +3012,7 @@ UnmapWindow(register WindowPtr pWin, Bool fromConfigure)
WindowsRestructured ();
return(Success);
}
#endif /* NXAGENT_SERVER */
/*****
* UnmapSubwindows
......@@ -3159,10 +3193,8 @@ PointInWindowIsVisible(register WindowPtr pWin, int x, int y)
RegionPtr
NotClippedByChildren(register WindowPtr pWin)
{
register ScreenPtr pScreen;
RegionPtr pReg;
pScreen = pWin->drawable.pScreen;
pReg = RegionCreate(NullBox, 1);
if (pWin->parent ||
screenIsSaved != SCREEN_SAVER_ON ||
......@@ -3251,6 +3283,7 @@ static void DrawLogo(
);
#endif
#ifndef NXAGENT_SERVER
void
SaveScreens(int on, int mode)
{
......@@ -3363,6 +3396,7 @@ SaveScreens(int on, int mode)
if (mode == ScreenSaverReset)
SetScreenSaverTimer();
}
#endif /* NXAGENT_SERVER */
static Bool
TileScreenSaver(int i, int kind)
......
......@@ -34,7 +34,7 @@ SUBDIRS = module
#include <Server.tmpl>
#ifdef FbNoPixelAddrCode
DEFINES=-DFBNOPIXADDR -DFBNO24BIT
FB_DEFINES=-DFBNOPIXADDR -DFBNO24BIT
#endif
#if defined(IHaveModules)
......@@ -47,6 +47,16 @@ RENDERSRC = fbcompose.c
RENDEROBJ = fbcompose.o
#endif
#if defined(NXAgentServer) && NXAgentServer
NX_DEFINES = -DNXAGENT_SERVER
#endif
#if defined(NXAgentServer) && NXAgentServer
DEFINES = $(FB_DEFINES) $(NX_DEFINES)
#else
DEFINES = $(FB_DEFINES)
#endif
SRCS = $(XFMODSRC) \
fballpriv.c \
fbbits.c \
......
......@@ -24,7 +24,7 @@
#include "Options.h"
#include "Windows.h"
#include "NXcomposite.h"
#include "X11/include/Xcomposite_nxagent.h"
/*
* Set here the required log level.
......
......@@ -23,7 +23,6 @@ SRCS = NXwindow.c \
NXmiglyph.c \
NXmiexpose.c \
NXresource.c \
NXmiwindow.c \
NXdamage.c \
NXmitrap.c \
Args.c \
......@@ -85,7 +84,6 @@ OBJS = NXwindow.o \
NXmiglyph.o \
NXmiexpose.o \
NXresource.o \
NXmiwindow.o \
NXdamage.o \
NXmitrap.o \
Args.o \
......
/*
* $Id: composite.h,v 1.4 2004/07/08 07:20:55 keithp Exp $
*
* Copyright © 2003 Keith Packard
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of Keith Packard not be used in
* advertising or publicity pertaining to distribution of the software without
* specific, written prior permission. Keith Packard makes no
* representations about the suitability of this software for any purpose. It
* is provided "as is" without express or implied warranty.
*
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef _COMPOSITE_H_
#define _COMPOSITE_H_
#ifndef NXAGENT_SERVER
#include <nx-X11/extensions/xfixeswire.h>
#endif
#define COMPOSITE_NAME "Composite"
#define COMPOSITE_MAJOR 0
#define COMPOSITE_MINOR 4
#define CompositeRedirectAutomatic 0
#define CompositeRedirectManual 1
#define X_CompositeQueryVersion 0
#define X_CompositeRedirectWindow 1
#define X_CompositeRedirectSubwindows 2
#define X_CompositeUnredirectWindow 3
#define X_CompositeUnredirectSubwindows 4
#define X_CompositeCreateRegionFromBorderClip 5
#define X_CompositeNameWindowPixmap 6
#define X_CompositeGetOverlayWindow 7
#define X_CompositeReleaseOverlayWindow 8
#define CompositeNumberRequests (X_CompositeReleaseOverlayWindow + 1)
#define CompositeNumberEvents 0
#endif /* _COMPOSITE_H_ */
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -64,265 +64,9 @@ SOFTWARE.
******************************************************************/
/* $Xorg: extension.c,v 1.4 2001/02/09 02:04:40 xorgcvs Exp $ */
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include <nx-X11/X.h>
#define NEED_EVENTS
#define NEED_REPLIES
#include <nx-X11/Xproto.h>
#include "misc.h"
#include "dixstruct.h"
#include "extnsionst.h"
#include "gcstruct.h"
#include "scrnintstr.h"
#include "../../dix/dispatch.h"
#ifdef XCSECURITY
#define _SECURITY_SERVER
#include <nx-X11/extensions/security.h>
#endif
#ifdef LBX
#include "lbxserve.h"
#endif
#include "Trap.h"
#define EXTENSION_BASE 128
#define EXTENSION_EVENT_BASE 64
#define LAST_EVENT 128
#define LAST_ERROR 255
ScreenProcEntry AuxillaryScreenProcs[MAXSCREENS];
static ExtensionEntry **extensions = (ExtensionEntry **)NULL;
int lastEvent = EXTENSION_EVENT_BASE;
static int lastError = FirstExtensionError;
static unsigned int NumExtensions = 0;
ExtensionEntry *
AddExtension(char *name, int NumEvents, int NumErrors,
int (*MainProc)(ClientPtr c1),
int (*SwappedMainProc)(ClientPtr c2),
void (*CloseDownProc)(ExtensionEntry *e),
unsigned short (*MinorOpcodeProc)(ClientPtr c3))
{
int i;
register ExtensionEntry *ext, **newexts;
if (!MainProc || !SwappedMainProc || !MinorOpcodeProc)
return((ExtensionEntry *) NULL);
if ((lastEvent + NumEvents > LAST_EVENT) ||
(unsigned)(lastError + NumErrors > LAST_ERROR))
return((ExtensionEntry *) NULL);
ext = (ExtensionEntry *) xalloc(sizeof(ExtensionEntry));
if (!ext)
return((ExtensionEntry *) NULL);
ext->name = (char *)xalloc(strlen(name) + 1);
ext->num_aliases = 0;
ext->aliases = (char **)NULL;
if (!ext->name)
{
xfree(ext);
return((ExtensionEntry *) NULL);
}
strcpy(ext->name, name);
i = NumExtensions;
newexts = (ExtensionEntry **) xrealloc(extensions,
(i + 1) * sizeof(ExtensionEntry *));
if (!newexts)
{
xfree(ext->name);
xfree(ext);
return((ExtensionEntry *) NULL);
}
NumExtensions++;
extensions = newexts;
extensions[i] = ext;
ext->index = i;
ext->base = i + EXTENSION_BASE;
ext->CloseDown = CloseDownProc;
ext->MinorOpcode = MinorOpcodeProc;
ProcVector[i + EXTENSION_BASE] = MainProc;
SwappedProcVector[i + EXTENSION_BASE] = SwappedMainProc;
if (NumEvents)
{
ext->eventBase = lastEvent;
ext->eventLast = lastEvent + NumEvents;
lastEvent += NumEvents;
}
else
{
ext->eventBase = 0;
ext->eventLast = 0;
}
if (NumErrors)
{
ext->errorBase = lastError;
ext->errorLast = lastError + NumErrors;
lastError += NumErrors;
}
else
{
ext->errorBase = 0;
ext->errorLast = 0;
}
#ifdef XCSECURITY
ext->secure = FALSE;
#endif
#ifdef LBX
(void) LbxAddExtension(name, ext->base, ext->eventBase, ext->errorBase);
#endif
return(ext);
}
Bool AddExtensionAlias(char *alias, ExtensionEntry *ext)
{
char *name;
char **aliases;
aliases = (char **)xrealloc(ext->aliases,
(ext->num_aliases + 1) * sizeof(char *));
if (!aliases)
return FALSE;
ext->aliases = aliases;
name = (char *)xalloc(strlen(alias) + 1);
if (!name)
return FALSE;
strcpy(name, alias);
ext->aliases[ext->num_aliases] = name;
ext->num_aliases++;
#ifdef LBX
return LbxAddExtensionAlias(ext->index, alias);
#else
return TRUE;
#endif
}
static int
FindExtension(char *extname, int len)
{
int i, j;
for (i=0; i<NumExtensions; i++)
{
if ((strlen(extensions[i]->name) == len) &&
!strncmp(extname, extensions[i]->name, len))
break;
for (j = extensions[i]->num_aliases; --j >= 0;)
{
if ((strlen(extensions[i]->aliases[j]) == len) &&
!strncmp(extname, extensions[i]->aliases[j], len))
break;
}
if (j >= 0) break;
}
return ((i == NumExtensions) ? -1 : i);
}
/*
* CheckExtension returns the extensions[] entry for the requested
* extension name. Maybe this could just return a Bool instead?
*/
ExtensionEntry *
CheckExtension(const char *extname)
{
int n;
n = FindExtension((char*)extname, strlen(extname));
if (n != -1)
return extensions[n];
else
return NULL;
}
void
DeclareExtensionSecurity(char *extname, Bool secure)
{
#ifdef XCSECURITY
int i = FindExtension(extname, strlen(extname));
if (i >= 0)
{
int majorop = extensions[i]->base;
extensions[i]->secure = secure;
if (secure)
{
UntrustedProcVector[majorop] = ProcVector[majorop];
SwappedUntrustedProcVector[majorop] = SwappedProcVector[majorop];
}
else
{
UntrustedProcVector[majorop] = ProcBadRequest;
SwappedUntrustedProcVector[majorop] = ProcBadRequest;
}
}
#endif
#ifdef LBX
LbxDeclareExtensionSecurity(extname, secure);
#endif
}
unsigned short
StandardMinorOpcode(ClientPtr client)
{
return ((xReq *)client->requestBuffer)->data;
}
unsigned short
MinorOpcodeOfRequest(ClientPtr client)
{
unsigned char major;
major = ((xReq *)client->requestBuffer)->reqType;
if (major < EXTENSION_BASE)
return 0;
major -= EXTENSION_BASE;
if (major >= NumExtensions)
return 0;
return (*extensions[major]->MinorOpcode)(client);
}
void
CloseDownExtensions()
{
register int i,j;
#ifdef LBX
LbxCloseDownExtensions();
#endif
for (i = NumExtensions - 1; i >= 0; i--)
{
if (extensions[i]->CloseDown)
(* extensions[i]->CloseDown)(extensions[i]);
NumExtensions = i;
xfree(extensions[i]->name);
for (j = extensions[i]->num_aliases; --j >= 0;)
xfree(extensions[i]->aliases[j]);
xfree(extensions[i]->aliases);
xfree(extensions[i]);
}
xfree(extensions);
extensions = (ExtensionEntry **)NULL;
lastEvent = EXTENSION_EVENT_BASE;
lastError = FirstExtensionError;
for (i=0; i<MAXSCREENS; i++)
{
register ScreenProcEntry *spentry = &AuxillaryScreenProcs[i];
while (spentry->num)
{
spentry->num--;
xfree(spentry->procList[spentry->num].name);
}
xfree(spentry->procList);
spentry->procList = (ProcEntryPtr)NULL;
}
}
#include "../../dix/extension.c"
int
ProcQueryExtension(ClientPtr client)
......@@ -443,69 +187,3 @@ ProcListExtensions(ClientPtr client)
}
return(client->noClientException);
}
ExtensionLookupProc
LookupProc(char *name, GCPtr pGC)
{
register int i;
register ScreenProcEntry *spentry;
spentry = &AuxillaryScreenProcs[pGC->pScreen->myNum];
if (spentry->num)
{
for (i = 0; i < spentry->num; i++)
if (strcmp(name, spentry->procList[i].name) == 0)
return(spentry->procList[i].proc);
}
return (ExtensionLookupProc)NULL;
}
Bool
RegisterProc(char *name, GC *pGC, ExtensionLookupProc proc)
{
return RegisterScreenProc(name, pGC->pScreen, proc);
}
Bool
RegisterScreenProc(char *name, ScreenPtr pScreen, ExtensionLookupProc proc)
{
register ScreenProcEntry *spentry;
register ProcEntryPtr procEntry = (ProcEntryPtr)NULL;
char *newname;
int i;
spentry = &AuxillaryScreenProcs[pScreen->myNum];
/* first replace duplicates */
if (spentry->num)
{
for (i = 0; i < spentry->num; i++)
if (strcmp(name, spentry->procList[i].name) == 0)
{
procEntry = &spentry->procList[i];
break;
}
}
if (procEntry)
procEntry->proc = proc;
else
{
newname = (char *)xalloc(strlen(name)+1);
if (!newname)
return FALSE;
procEntry = (ProcEntryPtr)
xrealloc(spentry->procList,
sizeof(ProcEntryRec) * (spentry->num+1));
if (!procEntry)
{
xfree(newname);
return FALSE;
}
spentry->procList = procEntry;
procEntry += spentry->num;
procEntry->name = newname;
strcpy(newname, name);
procEntry->proc = proc;
spentry->num++;
}
return TRUE;
}
......@@ -40,28 +40,10 @@
* Author: Keith Packard, SuSE, Inc.
*/
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "misc.h"
#include "scrnintstr.h"
#include "os.h"
#include "regionstr.h"
#include "validate.h"
#include "windowstr.h"
#include "input.h"
#include "resource.h"
#include "colormapst.h"
#include "cursorstr.h"
#include "dixstruct.h"
#include "gcstruct.h"
#include "servermd.h"
#include "../../render/glyph.c"
#ifdef NXAGENT_SERVER
#include "NXpicturestr.h"
#include "NXglyphstr.h"
#include "Render.h"
#define PANIC
......@@ -69,238 +51,8 @@
#undef DEBUG
#undef TEST
#else
#include "picturestr.h"
#include "glyphstr.h"
#endif
#include <stdint.h>
/*
* From Knuth -- a good choice for hash/rehash values is p, p-2 where
* p and p-2 are both prime. These tables are sized to have an extra 10%
* free to avoid exponential performance degradation as the hash table fills
*/
static GlyphHashSetRec glyphHashSets[] = {
{ 32, 43, 41 },
{ 64, 73, 71 },
{ 128, 151, 149 },
{ 256, 283, 281 },
{ 512, 571, 569 },
{ 1024, 1153, 1151 },
{ 2048, 2269, 2267 },
{ 4096, 4519, 4517 },
{ 8192, 9013, 9011 },
{ 16384, 18043, 18041 },
{ 32768, 36109, 36107 },
{ 65536, 72091, 72089 },
{ 131072, 144409, 144407 },
{ 262144, 288361, 288359 },
{ 524288, 576883, 576881 },
{ 1048576, 1153459, 1153457 },
{ 2097152, 2307163, 2307161 },
{ 4194304, 4613893, 4613891 },
{ 8388608, 9227641, 9227639 },
{ 16777216, 18455029, 18455027 },
{ 33554432, 36911011, 36911009 },
{ 67108864, 73819861, 73819859 },
{ 134217728, 147639589, 147639587 },
{ 268435456, 295279081, 295279079 },
{ 536870912, 590559793, 590559791 }
};
#define NGLYPHHASHSETS (sizeof(glyphHashSets)/sizeof(glyphHashSets[0]))
const CARD8 glyphDepths[GlyphFormatNum] = { 1, 4, 8, 16, 32 };
GlyphHashRec globalGlyphs[GlyphFormatNum];
GlyphHashSetPtr
FindGlyphHashSet (CARD32 filled)
{
int i;
for (i = 0; i < NGLYPHHASHSETS; i++)
if (glyphHashSets[i].entries >= filled)
return &glyphHashSets[i];
return 0;
}
static int _GlyphSetPrivateAllocateIndex = 0;
int
AllocateGlyphSetPrivateIndex (void)
{
return _GlyphSetPrivateAllocateIndex++;
}
void
ResetGlyphSetPrivateIndex (void)
{
_GlyphSetPrivateAllocateIndex = 0;
}
Bool
_GlyphSetSetNewPrivate (GlyphSetPtr glyphSet, int n, void * ptr)
{
void **new;
if (n > glyphSet->maxPrivate) {
if (glyphSet->devPrivates &&
glyphSet->devPrivates != (void *)(&glyphSet[1])) {
new = (void **) xrealloc (glyphSet->devPrivates,
(n + 1) * sizeof (void *));
if (!new)
return FALSE;
} else {
new = (void **) xalloc ((n + 1) * sizeof (void *));
if (!new)
return FALSE;
if (glyphSet->devPrivates)
memcpy (new,
glyphSet->devPrivates,
(glyphSet->maxPrivate + 1) * sizeof (void *));
}
glyphSet->devPrivates = new;
/* Zero out new, uninitialize privates */
while (++glyphSet->maxPrivate < n)
glyphSet->devPrivates[glyphSet->maxPrivate] = (void *)0;
}
glyphSet->devPrivates[n] = ptr;
return TRUE;
}
Bool
GlyphInit (ScreenPtr pScreen)
{
return TRUE;
}
GlyphRefPtr
FindGlyphRef (GlyphHashPtr hash, CARD32 signature, Bool match, GlyphPtr compare)
{
CARD32 elt, step, s;
GlyphPtr glyph;
GlyphRefPtr table, gr, del;
CARD32 tableSize = hash->hashSet->size;
table = hash->table;
elt = signature % tableSize;
step = 0;
del = 0;
for (;;)
{
gr = &table[elt];
s = gr->signature;
glyph = gr->glyph;
if (!glyph)
{
if (del)
gr = del;
break;
}
if (glyph == DeletedGlyph)
{
if (!del)
del = gr;
else if (gr == del)
break;
}
else if (s == signature &&
(!match ||
memcmp (&compare->info, &glyph->info, compare->size) == 0))
{
break;
}
if (!step)
{
step = signature % hash->hashSet->rehash;
if (!step)
step = 1;
}
elt += step;
if (elt >= tableSize)
elt -= tableSize;
}
return gr;
}
CARD32
HashGlyph (GlyphPtr glyph)
{
CARD32 *bits = (CARD32 *) &(glyph->info);
CARD32 hash;
int n = glyph->size / sizeof (CARD32);
hash = 0;
while (n--)
hash ^= *bits++;
return hash;
}
#ifdef CHECK_DUPLICATES
void
DuplicateRef (GlyphPtr glyph, char *where)
{
ErrorF ("Duplicate Glyph 0x%x from %s\n", glyph, where);
}
void
CheckDuplicates (GlyphHashPtr hash, char *where)
{
GlyphPtr g;
int i, j;
for (i = 0; i < hash->hashSet->size; i++)
{
g = hash->table[i].glyph;
if (!g || g == DeletedGlyph)
continue;
for (j = i + 1; j < hash->hashSet->size; j++)
if (hash->table[j].glyph == g)
DuplicateRef (g, where);
}
}
#else
#define CheckDuplicates(a,b)
#define DuplicateRef(a,b)
#endif
void
FreeGlyph (GlyphPtr glyph, int format)
{
CheckDuplicates (&globalGlyphs[format], "FreeGlyph");
if (--glyph->refcnt == 0)
{
GlyphRefPtr gr;
int i;
int first;
first = -1;
for (i = 0; i < globalGlyphs[format].hashSet->size; i++)
if (globalGlyphs[format].table[i].glyph == glyph)
{
if (first != -1)
DuplicateRef (glyph, "FreeGlyph check");
first = i;
}
gr = FindGlyphRef (&globalGlyphs[format],
HashGlyph (glyph), TRUE, glyph);
if (gr - globalGlyphs[format].table != first)
DuplicateRef (glyph, "Found wrong one");
if (gr->glyph && gr->glyph != DeletedGlyph)
{
gr->glyph = DeletedGlyph;
gr->signature = 0;
globalGlyphs[format].tableEntries--;
}
xfree (glyph);
}
}
void
AddGlyph (GlyphSetPtr glyphSet, GlyphPtr glyph, Glyph id)
{
......@@ -342,26 +94,6 @@ AddGlyph (GlyphSetPtr glyphSet, GlyphPtr glyph, Glyph id)
CheckDuplicates (&globalGlyphs[glyphSet->fdepth], "AddGlyph bottom");
}
Bool
DeleteGlyph (GlyphSetPtr glyphSet, Glyph id)
{
GlyphRefPtr gr;
GlyphPtr glyph;
gr = FindGlyphRef (&glyphSet->hash, id, FALSE, 0);
glyph = gr->glyph;
if (glyph && glyph != DeletedGlyph)
{
gr->glyph = DeletedGlyph;
glyphSet->hash.tableEntries--;
FreeGlyph (glyph, glyphSet->fdepth);
return TRUE;
}
return FALSE;
}
#ifdef NXAGENT_SERVER
GlyphPtr FindGlyph (GlyphSetPtr glyphSet, Glyph id)
{
GlyphRefPtr gr;
......@@ -388,53 +120,6 @@ GlyphPtr FindGlyph (GlyphSetPtr glyphSet, Glyph id)
return glyph;
}
#else
GlyphPtr
FindGlyph (GlyphSetPtr glyphSet, Glyph id)
{
GlyphPtr glyph;
glyph = FindGlyphRef (&glyphSet->hash, id, FALSE, 0)->glyph;
if (glyph == DeletedGlyph)
glyph = 0;
return glyph;
}
#endif
GlyphPtr
AllocateGlyph (xGlyphInfo *gi, int fdepth)
{
int size;
GlyphPtr glyph;
size_t padded_width;
padded_width = PixmapBytePad (gi->width, glyphDepths[fdepth]);
if (gi->height && padded_width > (UINT32_MAX - sizeof(GlyphRec))/gi->height)
return 0;
size = gi->height * padded_width;
glyph = (GlyphPtr) xalloc (size + sizeof (GlyphRec));
if (!glyph)
return 0;
glyph->refcnt = 0;
glyph->size = size + sizeof (xGlyphInfo);
glyph->info = *gi;
return glyph;
}
Bool
AllocateGlyphHash (GlyphHashPtr hash, GlyphHashSetPtr hashSet)
{
hash->table = (GlyphRefPtr) xalloc (hashSet->size * sizeof (GlyphRefRec));
if (!hash->table)
return FALSE;
memset (hash->table, 0, hashSet->size * sizeof (GlyphRefRec));
hash->hashSet = hashSet;
hash->tableEntries = 0;
return TRUE;
}
Bool
ResizeGlyphHash (GlyphHashPtr hash, CARD32 change, Bool global)
{
......@@ -497,81 +182,3 @@ ResizeGlyphHash (GlyphHashPtr hash, CARD32 change, Bool global)
CheckDuplicates (hash, "ResizeGlyphHash bottom");
return TRUE;
}
Bool
ResizeGlyphSet (GlyphSetPtr glyphSet, CARD32 change)
{
return (ResizeGlyphHash (&glyphSet->hash, change, FALSE) &&
ResizeGlyphHash (&globalGlyphs[glyphSet->fdepth], change, TRUE));
}
GlyphSetPtr
AllocateGlyphSet (int fdepth, PictFormatPtr format)
{
GlyphSetPtr glyphSet;
int size;
if (!globalGlyphs[fdepth].hashSet)
{
if (!AllocateGlyphHash (&globalGlyphs[fdepth], &glyphHashSets[0]))
return FALSE;
}
size = (sizeof (GlyphSetRec) +
(sizeof (void *) * _GlyphSetPrivateAllocateIndex));
glyphSet = xalloc (size);
if (!glyphSet)
return FALSE;
bzero((char *)glyphSet, size);
glyphSet->maxPrivate = _GlyphSetPrivateAllocateIndex - 1;
if (_GlyphSetPrivateAllocateIndex)
glyphSet->devPrivates = (void *)(&glyphSet[1]);
if (!AllocateGlyphHash (&glyphSet->hash, &glyphHashSets[0]))
{
xfree (glyphSet);
return FALSE;
}
glyphSet->refcnt = 1;
glyphSet->fdepth = fdepth;
glyphSet->format = format;
return glyphSet;
}
int
FreeGlyphSet (void * value,
XID gid)
{
GlyphSetPtr glyphSet = (GlyphSetPtr) value;
if (--glyphSet->refcnt == 0)
{
CARD32 i, tableSize = glyphSet->hash.hashSet->size;
GlyphRefPtr table = glyphSet->hash.table;
GlyphPtr glyph;
for (i = 0; i < tableSize; i++)
{
glyph = table[i].glyph;
if (glyph && glyph != DeletedGlyph)
FreeGlyph (glyph, glyphSet->fdepth);
}
if (!globalGlyphs[glyphSet->fdepth].tableEntries)
{
xfree (globalGlyphs[glyphSet->fdepth].table);
globalGlyphs[glyphSet->fdepth].table = 0;
globalGlyphs[glyphSet->fdepth].hashSet = 0;
}
else
ResizeGlyphHash (&globalGlyphs[glyphSet->fdepth], 0, TRUE);
xfree (table);
if (glyphSet->devPrivates &&
glyphSet->devPrivates != (void *)(&glyphSet[1]))
xfree(glyphSet->devPrivates);
xfree (glyphSet);
}
return Success;
}
......@@ -64,20 +64,7 @@ SOFTWARE.
/* $Xorg: glyphcurs.c,v 1.4 2001/02/09 02:04:40 xorgcvs Exp $ */
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "misc.h"
#include <X11/fonts/fontstruct.h>
#include "dixfontstr.h"
#include "scrnintstr.h"
#include "gcstruct.h"
#include "resource.h"
#include "dix.h"
#include "cursorstr.h"
#include "opaque.h"
#include "servermd.h"
#include "../../dix/glyphcurs.c"
#include "../../fb/fb.h"
#include "Pixmaps.h"
......@@ -183,57 +170,3 @@ ServerBitsFromGlyph(FontPtr pfont, unsigned ch, register CursorMetricPtr cm, uns
return Success;
}
Bool
CursorMetricsFromGlyph(register FontPtr pfont, unsigned ch, register CursorMetricPtr cm)
{
CharInfoPtr pci;
unsigned long nglyphs;
CARD8 chs[2];
FontEncoding encoding;
chs[0] = ch >> 8;
chs[1] = ch;
encoding = (FONTLASTROW(pfont) == 0) ? Linear16Bit : TwoD16Bit;
if (encoding == Linear16Bit)
{
if (ch < pfont->info.firstCol || pfont->info.lastCol < ch)
return FALSE;
}
else
{
if (chs[0] < pfont->info.firstRow || pfont->info.lastRow < chs[0])
return FALSE;
if (chs[1] < pfont->info.firstCol || pfont->info.lastCol < chs[1])
return FALSE;
}
(*pfont->get_glyphs) (pfont, 1, chs, encoding, &nglyphs, &pci);
if (nglyphs == 0)
return FALSE;
cm->width = pci->metrics.rightSideBearing - pci->metrics.leftSideBearing;
cm->height = pci->metrics.descent + pci->metrics.ascent;
if (pci->metrics.leftSideBearing > 0)
{
cm->width += pci->metrics.leftSideBearing;
cm->xhot = 0;
}
else
{
cm->xhot = -pci->metrics.leftSideBearing;
if (pci->metrics.rightSideBearing < 0)
cm->width -= pci->metrics.rightSideBearing;
}
if (pci->metrics.ascent < 0)
{
cm->height -= pci->metrics.ascent;
cm->yhot = 0;
}
else
{
cm->yhot = pci->metrics.ascent;
if (pci->metrics.descent < 0)
cm->height -= pci->metrics.descent;
}
return TRUE;
}
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
/* software is allowed according to terms specified in the file LICENSE */
/* which comes in the source distribution. */
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
/**************************************************************************/
/*
* $XFree86: xc/programs/Xserver/render/glyphstr.h,v 1.3 2000/11/20 07:13:13 keithp Exp $
*
* Copyright © 2000 SuSE, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of SuSE not be used in advertising or
* publicity pertaining to distribution of the software without specific,
* written prior permission. SuSE makes no representations about the
* suitability of this software for any purpose. It is provided "as is"
* without express or implied warranty.
*
* SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Keith Packard, SuSE, Inc.
*/
/* this header file gets included into Xserver/render/glyphstr.h */
#ifndef NX_GLYPHSTR_GLYPHREF_H
#define NX_GLYPHSTR_GLYPHREF_H 1
typedef struct _GlyphRef {
CARD32 signature;
GlyphPtr glyph;
CARD16 corruptedGlyph;
} GlyphRefRec, *GlyphRefPtr;
#endif /* NX_GLYPHSTR_GLYPHREF_H */
......@@ -40,53 +40,10 @@
* Author: Keith Packard, SuSE, Inc.
*/
/*
* This must keep the same symbol as the original glyphstr.h
* or symbols will be redefined. The code here adds a field
* to _GlyphSet. This should be done by defining a new type
* and casting when appropriate.
*/
#ifndef _GLYPHSTR_H_
#define _GLYPHSTR_H_
#include <nx-X11/extensions/renderproto.h>
#include "../../render/picture.h"
#include "screenint.h"
#define GlyphFormat1 0
#define GlyphFormat4 1
#define GlyphFormat8 2
#define GlyphFormat16 3
#define GlyphFormat32 4
#define GlyphFormatNum 5
typedef struct _Glyph {
CARD32 refcnt;
CARD32 size; /* info + bitmap */
xGlyphInfo info;
/* bits follow */
} GlyphRec, *GlyphPtr;
typedef struct _GlyphRef {
CARD32 signature;
GlyphPtr glyph;
CARD16 corruptedGlyph;
} GlyphRefRec, *GlyphRefPtr;
#define DeletedGlyph ((GlyphPtr) 1)
/* this header file gets included into Xserver/render/glyphstr.h */
typedef struct _GlyphHashSet {
CARD32 entries;
CARD32 size;
CARD32 rehash;
} GlyphHashSetRec, *GlyphHashSetPtr;
typedef struct _GlyphHash {
GlyphRefPtr table;
GlyphHashSetPtr hashSet;
CARD32 tableEntries;
} GlyphHashRec, *GlyphHashPtr;
#ifndef NX_GLYPHSTR_GLYPHSET_H
#define NX_GLYPHSTR_GLYPHSET_H 1
typedef struct _GlyphSet {
CARD32 refcnt;
......@@ -98,77 +55,4 @@ typedef struct _GlyphSet {
CARD32 remoteID;
} GlyphSetRec, *GlyphSetPtr;
#define GlyphSetGetPrivate(pGlyphSet,n) \
((n) > (pGlyphSet)->maxPrivate ? \
(void *) 0 : \
(pGlyphSet)->devPrivates[n])
#define GlyphSetSetPrivate(pGlyphSet,n,ptr) \
((n) > (pGlyphSet)->maxPrivate ? \
_GlyphSetSetNewPrivate(pGlyphSet, n, ptr) : \
((((pGlyphSet)->devPrivates[n] = (ptr)) != 0) || TRUE))
typedef struct _GlyphList {
INT16 xOff;
INT16 yOff;
CARD8 len;
PictFormatPtr format;
} GlyphListRec, *GlyphListPtr;
extern GlyphHashRec globalGlyphs[GlyphFormatNum];
GlyphHashSetPtr
FindGlyphHashSet (CARD32 filled);
int
AllocateGlyphSetPrivateIndex (void);
void
ResetGlyphSetPrivateIndex (void);
Bool
_GlyphSetSetNewPrivate (GlyphSetPtr glyphSet, int n, void * ptr);
Bool
GlyphInit (ScreenPtr pScreen);
GlyphRefPtr
FindGlyphRef (GlyphHashPtr hash, CARD32 signature, Bool match, GlyphPtr compare);
CARD32
HashGlyph (GlyphPtr glyph);
void
FreeGlyph (GlyphPtr glyph, int format);
void
AddGlyph (GlyphSetPtr glyphSet, GlyphPtr glyph, Glyph id);
Bool
DeleteGlyph (GlyphSetPtr glyphSet, Glyph id);
GlyphPtr
FindGlyph (GlyphSetPtr glyphSet, Glyph id);
GlyphPtr
AllocateGlyph (xGlyphInfo *gi, int format);
Bool
AllocateGlyphHash (GlyphHashPtr hash, GlyphHashSetPtr hashSet);
Bool
ResizeGlyphHash (GlyphHashPtr hash, CARD32 change, Bool global);
Bool
ResizeGlyphSet (GlyphSetPtr glyphSet, CARD32 change);
GlyphSetPtr
AllocateGlyphSet (int fdepth, PictFormatPtr format);
int
FreeGlyphSet (void *value,
XID gid);
#endif /* _GLYPHSTR_H_ */
#endif /* NX_GLYPHSTR_GLYPHSET_H */
......@@ -93,48 +93,9 @@ Equipment Corporation.
/* $Xorg: miexpose.c,v 1.4 2001/02/09 02:05:20 xorgcvs Exp $ */
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include <nx-X11/X.h>
#define NEED_EVENTS
#include <nx-X11/Xproto.h>
#include <nx-X11/Xprotostr.h>
#include "misc.h"
#include "regionstr.h"
#include "scrnintstr.h"
#include "gcstruct.h"
#include "windowstr.h"
#include "pixmap.h"
#include "input.h"
#include "dixstruct.h"
#include "mi.h"
#include <nx-X11/Xmd.h>
#include "globals.h"
#ifdef PANORAMIX
#include "panoramiX.h"
#include "panoramiXsrv.h"
#endif
/*
machine-independent graphics exposure code. any device that uses
the region package can call this.
*/
#ifdef NXAGENT_SERVER
#include "Windows.h"
#endif
#ifndef RECTLIMIT
#define RECTLIMIT 25 /* pick a number, any number > 8 */
#endif
#include "../../mi/miexpose.c"
/* miHandleExposures
generate a region for exposures for areas that were copied from obscured or
......@@ -181,8 +142,6 @@ miHandleExposures(pSrcDrawable, pDstDrawable,
BoxRec expBox;
Bool extents;
#ifdef NXAGENT_SERVER
/*
* Set the elements reported by the compiler
* as uninitialized.
......@@ -193,8 +152,6 @@ miHandleExposures(pSrcDrawable, pDstDrawable,
expBox.x2 = 0;
expBox.y2 = 0;
#endif
/* This prevents warning about pscr not being used. */
pGC->pScreen = pscr = pGC->pScreen;
......@@ -414,133 +371,14 @@ miHandleExposures(pSrcDrawable, pDstDrawable,
}
}
/* send GraphicsExpose events, or a NoExpose event, based on the region */
void
miSendGraphicsExpose (client, pRgn, drawable, major, minor)
ClientPtr client;
RegionPtr pRgn;
XID drawable;
int major;
int minor;
{
if (pRgn && !RegionNil(pRgn))
{
xEvent *pEvent;
register xEvent *pe;
register BoxPtr pBox;
register int i;
int numRects;
numRects = RegionNumRects(pRgn);
pBox = RegionRects(pRgn);
if(!(pEvent = (xEvent *)ALLOCATE_LOCAL(numRects * sizeof(xEvent))))
return;
pe = pEvent;
for (i=1; i<=numRects; i++, pe++, pBox++)
{
pe->u.u.type = GraphicsExpose;
pe->u.graphicsExposure.drawable = drawable;
pe->u.graphicsExposure.x = pBox->x1;
pe->u.graphicsExposure.y = pBox->y1;
pe->u.graphicsExposure.width = pBox->x2 - pBox->x1;
pe->u.graphicsExposure.height = pBox->y2 - pBox->y1;
pe->u.graphicsExposure.count = numRects - i;
pe->u.graphicsExposure.majorEvent = major;
pe->u.graphicsExposure.minorEvent = minor;
}
TryClientEvents(client, pEvent, numRects,
(Mask)0, NoEventMask, NullGrab);
DEALLOCATE_LOCAL(pEvent);
}
else
{
xEvent event;
memset(&event, 0, sizeof(xEvent));
event.u.u.type = NoExpose;
event.u.noExposure.drawable = drawable;
event.u.noExposure.majorEvent = major;
event.u.noExposure.minorEvent = minor;
TryClientEvents(client, &event, 1,
(Mask)0, NoEventMask, NullGrab);
}
}
void
miSendExposures(pWin, pRgn, dx, dy)
WindowPtr pWin;
RegionPtr pRgn;
register int dx, dy;
{
register BoxPtr pBox;
int numRects;
register xEvent *pEvent, *pe;
register int i;
pBox = RegionRects(pRgn);
numRects = RegionNumRects(pRgn);
if(!(pEvent = (xEvent *) ALLOCATE_LOCAL(numRects * sizeof(xEvent))))
return;
memset(pEvent, 0, numRects * sizeof(xEvent));
for (i=numRects, pe = pEvent; --i >= 0; pe++, pBox++)
{
pe->u.u.type = Expose;
pe->u.expose.window = pWin->drawable.id;
pe->u.expose.x = pBox->x1 - dx;
pe->u.expose.y = pBox->y1 - dy;
pe->u.expose.width = pBox->x2 - pBox->x1;
pe->u.expose.height = pBox->y2 - pBox->y1;
pe->u.expose.count = i;
}
#ifdef PANORAMIX
if(!noPanoramiXExtension) {
int scrnum = pWin->drawable.pScreen->myNum;
int x = 0, y = 0;
XID realWin = 0;
if(!pWin->parent) {
x = panoramiXdataPtr[scrnum].x;
y = panoramiXdataPtr[scrnum].y;
pWin = screenInfo.screens[0]->root;
realWin = pWin->drawable.id;
} else if (scrnum) {
PanoramiXRes *win;
win = PanoramiXFindIDByScrnum(XRT_WINDOW,
pWin->drawable.id, scrnum);
if(!win) {
DEALLOCATE_LOCAL(pEvent);
return;
}
realWin = win->info[0].id;
pWin = LookupIDByType(realWin, RT_WINDOW);
}
if(x || y || scrnum)
for (i = 0; i < numRects; i++) {
pEvent[i].u.expose.window = realWin;
pEvent[i].u.expose.x += x;
pEvent[i].u.expose.y += y;
}
}
#endif
DeliverEvents(pWin, pEvent, numRects, NullWindow);
DEALLOCATE_LOCAL(pEvent);
}
void
miWindowExposures(pWin, prgn, other_exposed)
WindowPtr pWin;
register RegionPtr prgn, other_exposed;
{
#ifdef NXAGENT_SERVER
int total;
#endif
RegionPtr exposures = prgn;
if (pWin->backStorage && prgn)
/*
......@@ -576,7 +414,6 @@ miWindowExposures(pWin, prgn, other_exposed)
}
exposures = other_exposed;
}
#ifdef NXAGENT_SERVER
/*
* If the number of rectangles is greater
......@@ -587,9 +424,6 @@ miWindowExposures(pWin, prgn, other_exposed)
if (clientInterested && exposures && (total > RECTLIMIT ||
(total > 4 && nxagentExtentsPredicate(total) == 1)))
#else
if (clientInterested && exposures && (RegionNumRects(exposures) > RECTLIMIT))
#endif
{
/*
* If we have LOTS of rectangles, we decide to take the extents
......@@ -638,54 +472,6 @@ miWindowExposures(pWin, prgn, other_exposed)
RegionDestroy(exposures);
}
/*
this code is highly unlikely. it is not haile selassie.
there is some hair here. we can't just use the window's
clip region as it is, because if we are painting the border,
the border is not in the client area and so we will be excluded
when we validate the GC, and if we are painting a parent-relative
background, the area we want to paint is in some other window.
since we trust the code calling us to tell us to paint only areas
that are really ours, we will temporarily give the window a
clipList the size of the whole screen and an origin at (0,0).
this more or less assumes that ddX code will do translation
based on the window's absolute position, and that ValidateGC will
look at clipList, and that no other fields from the
window will be used. it's not possible to just draw
in the root because it may be a different depth.
to get the tile to align correctly we set the GC's tile origin to
be the (x,y) of the window's upper left corner, after which we
get the right bits when drawing into the root.
because the clip_mask is being set to None, we may call DoChangeGC with
fPointer set true, thus we no longer need to install the background or
border tile in the resource table.
*/
static RESTYPE ResType = 0;
static int numGCs = 0;
static GCPtr screenContext[MAXSCREENS];
/*ARGSUSED*/
static int
tossGC (
void * value,
XID id)
{
GCPtr pGC = (GCPtr)value;
screenContext[pGC->pScreen->myNum] = (GCPtr)NULL;
FreeGC (pGC, id);
numGCs--;
if (!numGCs)
ResType = 0;
return 0;
}
void
miPaintWindow(pWin, prgn, what)
register WindowPtr pWin;
......@@ -722,8 +508,6 @@ int what;
register xRectangle *prect;
int numRects;
#ifdef NXAGENT_SERVER
/*
* Set the elements reported by the compiler
* as uninitialized.
......@@ -739,8 +523,6 @@ int what;
oldCorner.x = 0;
oldCorner.y = 0;
#endif
gcmask = 0;
if (what == PW_BACKGROUND)
......@@ -954,27 +736,3 @@ int what;
FreeScratchGC(pGC);
}
}
/* MICLEARDRAWABLE -- sets the entire drawable to the background color of
* the GC. Useful when we have a scratch drawable and need to initialize
* it. */
void
miClearDrawable(pDraw, pGC)
DrawablePtr pDraw;
GCPtr pGC;
{
XID fg = pGC->fgPixel;
XID bg = pGC->bgPixel;
xRectangle rect;
rect.x = 0;
rect.y = 0;
rect.width = pDraw->width;
rect.height = pDraw->height;
DoChangeGC(pGC, GCForeground, &bg, 0);
ValidateGC(pDraw, pGC);
(*pGC->ops->PolyFillRect)(pDraw, pGC, 1, &rect);
DoChangeGC(pGC, GCForeground, &fg, 0);
ValidateGC(pDraw, pGC);
}
......@@ -40,77 +40,9 @@
* Author: Keith Packard, SuSE, Inc.
*/
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "scrnintstr.h"
#include "gcstruct.h"
#include "pixmapstr.h"
#include "windowstr.h"
#include "mi.h"
#include "picturestr.h"
#include "mipict.h"
#ifdef NXAGENT_SERVER
#include "Render.h"
#endif
void
miGlyphExtents (int nlist,
GlyphListPtr list,
GlyphPtr *glyphs,
BoxPtr extents)
{
int x1, x2, y1, y2;
int n;
GlyphPtr glyph;
int x, y;
x = 0;
y = 0;
extents->x1 = MAXSHORT;
extents->x2 = MINSHORT;
extents->y1 = MAXSHORT;
extents->y2 = MINSHORT;
while (nlist--)
{
x += list->xOff;
y += list->yOff;
n = list->len;
list++;
while (n--)
{
glyph = *glyphs++;
x1 = x - glyph->info.x;
if (x1 < MINSHORT)
x1 = MINSHORT;
y1 = y - glyph->info.y;
if (y1 < MINSHORT)
y1 = MINSHORT;
x2 = x1 + glyph->info.width;
if (x2 > MAXSHORT)
x2 = MAXSHORT;
y2 = y1 + glyph->info.height;
if (y2 > MAXSHORT)
y2 = MAXSHORT;
if (x1 < extents->x1)
extents->x1 = x1;
if (x2 > extents->x2)
extents->x2 = x2;
if (y1 < extents->y1)
extents->y1 = y1;
if (y2 > extents->y2)
extents->y2 = y2;
x += glyph->info.xOff;
y += glyph->info.yOff;
}
}
}
#define NeedsComponent(f) (PICT_FORMAT_A(f) != 0 && PICT_FORMAT_RGB(f) != 0)
#include "../../render/miglyph.c"
void
miGlyphs (CARD8 op,
......@@ -137,8 +69,6 @@ miGlyphs (CARD8 op,
BoxRec extents;
CARD32 component_alpha;
#ifdef NXAGENT_SERVER
/*
* Get rid of the warning.
*/
......@@ -146,15 +76,11 @@ miGlyphs (CARD8 op,
extents.x1 = 0;
extents.y1 = 0;
#endif
if (maskFormat)
{
GCPtr pGC;
xRectangle rect;
#ifdef NXAGENT_SERVER
if (nxagentGlyphsExtents != NullBox)
{
memcpy(&extents, nxagentGlyphsExtents, sizeof(BoxRec));
......@@ -168,12 +94,6 @@ miGlyphs (CARD8 op,
memcpy(nxagentGlyphsExtents, &extents, sizeof(BoxRec));
}
#else
miGlyphExtents (nlist, list, glyphs, &extents);
#endif
if (extents.x2 <= extents.x1 || extents.y2 <= extents.y1)
return;
width = extents.x2 - extents.x1;
......@@ -242,8 +162,6 @@ miGlyphs (CARD8 op,
glyph->info.width, glyph->info.height,
0, 0, -1, (void *) (glyph + 1));
#ifdef NXAGENT_SERVER
/*
* The following line fixes a problem with glyphs that appeared
* as clipped. It was a side effect due the validate function
......@@ -254,8 +172,6 @@ miGlyphs (CARD8 op,
pPicture->pDrawable->serialNumber = NEXT_SERIAL_NUMBER;
#endif
pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
if (maskFormat)
{
......
......@@ -39,117 +39,9 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "scrnintstr.h"
#include "gcstruct.h"
#include "pixmapstr.h"
#include "windowstr.h"
#include "servermd.h"
#include "mi.h"
#include "picturestr.h"
#include "mipict.h"
#ifdef NXAGENT_SERVER
#include "Render.h"
#endif
PicturePtr
miCreateAlphaPicture (ScreenPtr pScreen,
PicturePtr pDst,
PictFormatPtr pPictFormat,
CARD16 width,
CARD16 height)
{
PixmapPtr pPixmap;
PicturePtr pPicture;
GCPtr pGC;
int error;
xRectangle rect;
if (width > 32767 || height > 32767)
return 0;
if (!pPictFormat)
{
if (pDst->polyEdge == PolyEdgeSharp)
pPictFormat = PictureMatchFormat (pScreen, 1, PICT_a1);
else
pPictFormat = PictureMatchFormat (pScreen, 8, PICT_a8);
if (!pPictFormat)
return 0;
}
pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height,
pPictFormat->depth);
if (!pPixmap)
return 0;
pGC = GetScratchGC (pPixmap->drawable.depth, pScreen);
if (!pGC)
{
(*pScreen->DestroyPixmap) (pPixmap);
return 0;
}
ValidateGC (&pPixmap->drawable, pGC);
rect.x = 0;
rect.y = 0;
rect.width = width;
rect.height = height;
(*pGC->ops->PolyFillRect)(&pPixmap->drawable, pGC, 1, &rect);
FreeScratchGC (pGC);
pPicture = CreatePicture (0, &pPixmap->drawable, pPictFormat,
0, 0, serverClient, &error);
(*pScreen->DestroyPixmap) (pPixmap);
return pPicture;
}
static xFixed
miLineFixedX (xLineFixed *l, xFixed y, Bool ceil)
{
xFixed dx = l->p2.x - l->p1.x;
xFixed_32_32 ex = (xFixed_32_32) (y - l->p1.y) * dx;
xFixed dy = l->p2.y - l->p1.y;
if (ceil)
ex += (dy - 1);
return l->p1.x + (xFixed) (ex / dy);
}
void
miTrapezoidBounds (int ntrap, xTrapezoid *traps, BoxPtr box)
{
box->y1 = MAXSHORT;
box->y2 = MINSHORT;
box->x1 = MAXSHORT;
box->x2 = MINSHORT;
for (; ntrap; ntrap--, traps++)
{
INT16 x1, y1, x2, y2;
if (!xTrapezoidValid(traps))
continue;
y1 = xFixedToInt (traps->top);
if (y1 < box->y1)
box->y1 = y1;
y2 = xFixedToInt (xFixedCeil (traps->bottom));
if (y2 > box->y2)
box->y2 = y2;
x1 = xFixedToInt (min (miLineFixedX (&traps->left, traps->top, FALSE),
miLineFixedX (&traps->left, traps->bottom, FALSE)));
if (x1 < box->x1)
box->x1 = x1;
x2 = xFixedToInt (xFixedCeil (max (miLineFixedX (&traps->right, traps->top, TRUE),
miLineFixedX (&traps->right, traps->bottom, TRUE))));
if (x2 > box->x2)
box->x2 = x2;
}
}
#include "../../render/mitrap.c"
void
miTrapezoids (CARD8 op,
......@@ -182,8 +74,6 @@ miTrapezoids (CARD8 op,
xDst = traps[0].left.p1.x >> 16;
yDst = traps[0].left.p1.y >> 16;
#ifdef NXAGENT_SERVER
if (nxagentTrapezoidExtents != NullBox)
{
memcpy(&bounds, nxagentTrapezoidExtents, sizeof(BoxRec));
......@@ -197,12 +87,6 @@ miTrapezoids (CARD8 op,
memcpy(nxagentTrapezoidExtents, &bounds, sizeof(BoxRec));
}
#else
miTrapezoidBounds (ntrap, traps, &bounds);
#endif
if (bounds.y1 >= bounds.y2 || bounds.x1 >= bounds.x2)
return;
pPicture = miCreateAlphaPicture (pScreen, pDst, maskFormat,
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
/* software is allowed according to terms specified in the file LICENSE */
/* which comes in the source distribution. */
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
/**************************************************************************/
/*
* $Id: picturestr.h,v 1.15 2005/12/09 18:35:21 ajax Exp $
*
* Copyright © 2000 SuSE, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of SuSE not be used in advertising or
* publicity pertaining to distribution of the software without specific,
* written prior permission. SuSE makes no representations about the
* suitability of this software for any purpose. It is provided "as is"
* without express or implied warranty.
*
* SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Keith Packard, SuSE, Inc.
*/
/* this header file gets included into Xserver/render/picturestr.h */
#ifndef NX_PICTURESTR_PICTSOLIDFILL_H
#define NX_PICTURESTR_PICTSOLIDFILL_H 1
typedef struct _PictSolidFill {
unsigned int type;
CARD32 color;
xRenderColor fullColor;
} PictSolidFill, *PictSolidFillPtr;
#endif /* NX_PICTURESTR_PICTSOLIDFILL_H */
......@@ -18,6 +18,7 @@
#ifndef __Pixmap_H__
#define __Pixmap_H__
#include "resource.h"
#include "Split.h"
extern RESTYPE RT_NX_PIXMAP;
......
......@@ -15,8 +15,8 @@
/* */
/**************************************************************************/
#include "NXpicturestr.h"
#include "NXglyphstr.h"
#include "picturestr.h"
#include "glyphstr.h"
#include "Render.h"
......@@ -39,7 +39,7 @@
#define Atom XlibAtom
#define Pixmap XlibPixmap
#include "NXrenderint.h"
#include "X11/include/Xrenderint_nxagent.h"
#undef Atom
#undef Pixmap
......
......@@ -19,10 +19,11 @@
#define __Render_H__
#include "screenint.h"
#include "cursor.h"
#include "picture.h"
#include "renderproto.h"
#include "NXglyphstr.h"
#include "glyphstr.h"
#include "Agent.h"
......
......@@ -32,6 +32,8 @@ is" without express or implied warranty.
#ifndef __Screen_H__
#define __Screen_H__
#include "scrnintstr.h"
#define MIN_NXAGENT_WIDTH 80
#define MIN_NXAGENT_HEIGHT 60
#define NXAGENT_FRAME_WIDTH 2000
......
/*
* $Id: Xcomposite.h,v 1.3 2005/07/03 07:00:56 daniels Exp $
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
/*
* Copyright © 2003 Keith Packard
*
* Permission to use, copy, modify, distribute, and sell this software and its
......@@ -22,22 +42,32 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/*
* This file is a reduced version of the header file of
* <X11/extensions/Xcomposite.h>
*
* This copy of code has been introduced to allow a clear namespace
* separation between <X11/...> and <nx-X11/...> header files.
*
* This version of the Xcomposite library header file only contains symbols
* required by nxagent and strictly avoids indirectly including
* from an X11 library that is also shipped in nx-X11/lib/.
*
* When using <X11/extensions/Xcomposite.h> instead for inclusion in
* nxagent, it will attempt pulling in the <X11/extensions/Xlib.h>.
* However, the headers of the same name from <nx-X11/...> should be
* used instead.
*
* FIXME: Once the nxagent Xserver starts using libX11 from X.Org, this
* hack can be removed.
*
* 2016/04/07, Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
*/
#ifndef _XCOMPOSITE_H_
#define _XCOMPOSITE_H_
#ifdef NXAGENT_SERVER
#define XserverRegion XID
#include "NXcompositeext.h"
#else
#include <nx-X11/extensions/composite.h>
#include "X11/include/Xfixes_nxagent.h"
#endif
#include <X11/extensions/composite.h>
#include <nx-X11/Xfuncproto.h>
/*
......@@ -46,18 +76,18 @@
*/
#define XCOMPOSITE_MAJOR COMPOSITE_MAJOR
#define XCOMPOSITE_MINOR COMPOSITE_MINOR
#define XCOMPOSITE_REVISION 0
#define XCOMPOSITE_REVISION 2
#define XCOMPOSITE_VERSION ((XCOMPOSITE_MAJOR * 10000) + (XCOMPOSITE_MINOR * 100) + (XCOMPOSITE_REVISION))
_XFUNCPROTOBEGIN
Bool XCompositeQueryExtension (Display *dpy, int *event_basep, int *error_basep);
Bool XCompositeQueryExtension (Display *dpy,
int *event_base_return,
int *error_base_return);
Status XCompositeQueryVersion (Display *dpy,
int *major_versionp,
int *minor_versionp);
int XCompositeVersion (void);
int *major_version_return,
int *minor_version_return);
void
XCompositeRedirectWindow (Display *dpy, Window window, int update);
......@@ -71,12 +101,6 @@ XCompositeUnredirectWindow (Display *dpy, Window window, int update);
void
XCompositeUnredirectSubwindows (Display *dpy, Window window, int update);
XserverRegion
XCompositeCreateRegionFromBorderClip (Display *dpy, Window window);
Pixmap
XCompositeNameWindowPixmap (Display *dpy, Window window);
_XFUNCPROTOEND
#endif /* _XCOMPOSITE_H_ */
......@@ -28,7 +28,7 @@
#include <nx-X11/Xlibint.h>
#include <nx-X11/Xutil.h>
#include <nx-X11/extensions/renderproto.h>
#include "X11/include/Xrender_nxagent.h"
#include "Xrender_nxagent.h"
typedef struct {
Visual *visual;
......
......@@ -16,12 +16,10 @@
/**************************************************************************/
XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:53:36 cpqbld Exp $
XCOMM $XFree86: xc/programs/Xserver/mi/Imakefile,v 3.34 2002/05/22 21:38:31 herrb Exp $
NULL =
#include <Server.tmpl>
#if ! HasCbrt
......@@ -40,27 +38,94 @@ MIINITEXTSRC = miinitext.c
MIINITEXTOBJ = miinitext.o
#endif
SRCS = $(CBRT_SRC) mivaltree.c mipolyseg.c mipolyrect.c \
mipoly.c mipolycon.c mipolygen.c mipolyutil.c \
mifillrct.c miwideline.c mispans.c \
miarc.c mizerarc.c mifillarc.c \
miwindow.c micursor.c \
mipolytext.c mibitblt.c mipolypnt.c mipushpxl.c \
miexpose.c miglblt.c mizerline.c mizerclip.c mifpolycon.c \
midash.c mibstore.c mibank.c $(MIINITEXTSRC) mieq.c \
mipointer.c misprite.c midispcur.c miscrinit.c miclipn.c migc.c \
micmap.c mioverlay.c
OBJS = $(CBRT_OBJ) mivaltree.o mipolyseg.o mipolyrect.o \
mipoly.o mipolycon.o mipolygen.o mipolyutil.o \
mifillrct.o miwideline.o mispans.o \
miarc.o mizerarc.o mifillarc.o \
miwindow.o micursor.o \
mipolytext.o mibitblt.o mipolypnt.o mipushpxl.o \
miexpose.o miglblt.o mizerline.o mizerclip.o mifpolycon.o \
midash.o mibstore.o mibank.o $(MIINITEXTOBJ) mieq.o \
mipointer.o misprite.o midispcur.o miscrinit.o miclipn.o migc.o \
micmap.o mioverlay.o
#if (!(defined(NXAgentServer) && NXAgentServer))
NXAGENT_SKIP_SRCS = \
miexpose.c \
$(NULL)
NXAGENT_SKIP_OBJS = \
miexpose.o \
$(NULL)
#endif
SRCS = $(CBRT_SRC) \
mivaltree.c \
mipolyseg.c \
mipolyrect.c \
mipoly.c \
mipolycon.c \
mipolygen.c \
mipolyutil.c \
mifillrct.c \
miwideline.c \
mispans.c \
miarc.c \
mizerarc.c \
mifillarc.c \
miwindow.c \
micursor.c \
mipolytext.c \
mibitblt.c \
mipolypnt.c \
mipushpxl.c \
miglblt.c \
mizerline.c \
mizerclip.c \
mifpolycon.c \
midash.c \
mibstore.c \
mibank.c \
$(MIINITEXTSRC) \
mieq.c \
mipointer.c \
misprite.c \
midispcur.c \
miscrinit.c \
miclipn.c \
migc.c \
micmap.c \
mioverlay.c \
$(NXAGENT_SKIP_SRCS) \
$(NULL)
OBJS = $(CBRT_OBJ) \
mivaltree.o \
mipolyseg.o \
mipolyrect.o \
mipoly.o \
mipolycon.o \
mipolygen.o \
mipolyutil.o \
mifillrct.o \
miwideline.o \
mispans.o \
miarc.o \
mizerarc.o \
mifillarc.o \
miwindow.o \
micursor.o \
mipolytext.o \
mibitblt.o \
mipolypnt.o \
mipushpxl.o \
miglblt.o \
mizerline.o \
mizerclip.o \
mifpolycon.o \
midash.o \
mibstore.o \
mibank.o \
$(MIINITEXTOBJ) \
mieq.o \
mipointer.o \
misprite.o \
midispcur.o \
miscrinit.o \
miclipn.o \
migc.o \
micmap.o \
mioverlay.o \
$(NXAGENT_SKIP_OBJS) \
$(NULL)
#if defined(XorgVersion)
/*
......@@ -83,16 +148,27 @@ EXT_DEFINES = ExtensionDefines \
EXT_DEFINES = ExtensionDefines -UXINPUT \
-UXFree86LOADER
#endif
#endif
INCLUDES = -I. -I../include -I../render \
-I../xfixes -I../damageext -I../miext/damage \
-I$(XINCLUDESRC) -I$(EXTINCSRC) -I$(SERVERSRC)/Xext \
`pkg-config --cflags-only-I pixman-1`
LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln
INCLUDES = -I. \
-I../include \
-I../render \
-I../xfixes \
-I../damageext \
-I../miext/damage \
-I$(XINCLUDESRC) \
-I$(EXTINCSRC) \
-I$(SERVERSRC)/Xext \
`pkg-config --cflags-only-I pixman-1` \
$(NULL)
LINTLIBS = \
../dix/llib-ldix.ln \
../os/llib-los.ln \
$(NULL)
DEFINES = $(FFS_DEFINES)
NormalLibraryObjectRule()
......
......@@ -130,6 +130,7 @@ exposing is done by the backing store's GraphicsExpose function, of course.
*/
#ifndef NXAGENT_SERVER
RegionPtr
miHandleExposures(pSrcDrawable, pDstDrawable,
pGC, srcx, srcy, width, height, dstx, dsty, plane)
......@@ -376,6 +377,7 @@ miHandleExposures(pSrcDrawable, pDstDrawable,
return NULL;
}
}
#endif
/* send GraphicsExpose events, or a NoExpose event, based on the region */
......@@ -495,6 +497,7 @@ miSendExposures(pWin, pRgn, dx, dy)
DEALLOCATE_LOCAL(pEvent);
}
#ifndef NXAGENT_SERVER
void
miWindowExposures(pWin, prgn, other_exposed)
WindowPtr pWin;
......@@ -583,7 +586,7 @@ miWindowExposures(pWin, prgn, other_exposed)
else if (exposures && exposures != prgn)
RegionDestroy(exposures);
}
#endif
/*
this code is highly unlikely. it is not haile selassie.
......@@ -631,7 +634,7 @@ tossGC (
return 0;
}
#ifndef NXAGENT_SERVER
void
miPaintWindow(pWin, prgn, what)
register WindowPtr pWin;
......@@ -654,7 +657,7 @@ int what;
#define COUNT_BITS 8
ChangeGCVal gcval[7];
ChangeGCVal newValues [COUNT_BITS];
ChangeGCVal newValues [COUNT_BITS] = {{ 0 }};
BITS32 gcmask, index, mask;
RegionRec prgnWin;
......@@ -881,7 +884,7 @@ int what;
FreeScratchGC(pGC);
}
}
#endif
/* MICLEARDRAWABLE -- sets the entire drawable to the background color of
* the GC. Useful when we have a scratch drawable and need to initialize
......
......@@ -1048,7 +1048,25 @@ miSetShape(pWin)
bsExposed = (*pScreen->TranslateBackingStore)
(pWin, 0, 0, pOldClip,
pWin->drawable.x, pWin->drawable.y);
if (WasViewable)
/*
* Applies to NXAGENT_SERVER builds:
*
* We got a few, rare, segfaults here after having
* started using the backing store. It may be a
* different bug but miChangeSaveUnder() calls mi-
* CheckSubSaveUnder() that, in turn, can change
* the backing store attribute of the window. This
* means that we may try to destroy the region
* even if it was not created at the beginning of
* this function as, at the time, the backing store
* was off. miCheckSubSaveUnder() appear to get a
* pointer to the parent, so maybe doesn't change
* the attribute of the window itself. This is to
* be better investigated.
*/
if (WasViewable && pOldClip)
RegionDestroy(pOldClip);
if (bsExposed)
{
......
......@@ -5,6 +5,7 @@
DEFINES = -DROOTLESS_WORKAROUND
#endif
#if (!(defined(NXAgentServer) && NXAgentServer))
SRCS = damage.c
OBJS = damage.o
......@@ -21,6 +22,7 @@ NormalLibraryTarget(damage,$(OBJS))
LintLibraryTarget(damage,$(SRCS))
NormalLintTarget($(SRCS))
#endif
DependTarget()
......
......@@ -1324,6 +1324,8 @@ damageDamageChars (DrawablePtr pDrawable,
#define TT_POLY16 2
#define TT_IMAGE16 3
#ifndef NXAGENT_SERVER
static int
damageText (DrawablePtr pDrawable,
GCPtr pGC,
......@@ -1445,6 +1447,7 @@ damageImageText16(DrawablePtr pDrawable,
DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable);
}
#endif /* NXAGENT_SERVER */
static void
damageImageGlyphBlt(DrawablePtr pDrawable,
......
XCOMM $XFree86: xc/programs/Xserver/render/Imakefile,v 1.10 2002/11/23 02:38:15 keithp Exp $
NULL =
#include <Server.tmpl>
#if (!(defined(NXAgentServer) && NXAgentServer))
NXAGENT_SKIP_SRCS = \
glyph.c \
miglyph.c \
mitrap.c \
picture.c \
render.c \
$(NULL)
NXAGENT_SKIP_OBJS = \
glyph.o \
miglyph.o \
mitrap.o \
picture.o \
render.o \
$(NULL)
#else
DEFINES = -DNXAGENT_SERVER
#endif
SRCS = animcur.c \
filter.c \
glyph.c \
matrix.c \
miglyph.c \
miindex.c \
mipict.c \
mirect.c \
mitrap.c \
mitri.c \
picture.c \
render.c \
renderedge.c
renderedge.c \
$(NXAGENT_SKIP_SRCS) \
$(NULL)
OBJS = animcur.o \
filter.o \
glyph.o \
matrix.o \
miglyph.o \
miindex.o \
mipict.o \
mirect.o \
mitrap.o \
mitri.o \
picture.o \
render.o \
renderedge.o
renderedge.o \
$(NXAGENT_SKIP_OBJS) \
$(NULL)
INCLUDES = -I. -I../include -I../mi \
-I../fb -I../hw/kdrive -I$(EXTINCSRC) -I$(XINCLUDESRC) \
......@@ -46,4 +64,3 @@ InstallDriverSDKNonExecFile(glyphstr.h,$(DRIVERSDKINCLUDEDIR))
InstallDriverSDKNonExecFile(mipict.h,$(DRIVERSDKINCLUDEDIR))
InstallDriverSDKNonExecFile(picture.h,$(DRIVERSDKINCLUDEDIR))
InstallDriverSDKNonExecFile(picturestr.h,$(DRIVERSDKINCLUDEDIR))
......@@ -268,6 +268,7 @@ FreeGlyph (GlyphPtr glyph, int format)
}
}
#ifndef NXAGENT_SERVER
void
AddGlyph (GlyphSetPtr glyphSet, GlyphPtr glyph, Glyph id)
{
......@@ -301,6 +302,7 @@ AddGlyph (GlyphSetPtr glyphSet, GlyphPtr glyph, Glyph id)
gr->signature = id;
CheckDuplicates (&globalGlyphs[glyphSet->fdepth], "AddGlyph bottom");
}
#endif /* NXAGENT_SERVER */
Bool
DeleteGlyph (GlyphSetPtr glyphSet, Glyph id)
......@@ -320,6 +322,7 @@ DeleteGlyph (GlyphSetPtr glyphSet, Glyph id)
return FALSE;
}
#ifndef NXAGENT_SERVER
GlyphPtr
FindGlyph (GlyphSetPtr glyphSet, Glyph id)
{
......@@ -330,6 +333,7 @@ FindGlyph (GlyphSetPtr glyphSet, Glyph id)
glyph = 0;
return glyph;
}
#endif /* NXAGENT_SERVER */
GlyphPtr
AllocateGlyph (xGlyphInfo *gi, int fdepth)
......@@ -363,6 +367,8 @@ AllocateGlyphHash (GlyphHashPtr hash, GlyphHashSetPtr hashSet)
return TRUE;
}
#ifndef NXAGENT_SERVER
Bool
ResizeGlyphHash (GlyphHashPtr hash, CARD32 change, Bool global)
{
......@@ -405,6 +411,7 @@ ResizeGlyphHash (GlyphHashPtr hash, CARD32 change, Bool global)
CheckDuplicates (hash, "ResizeGlyphHash bottom");
return TRUE;
}
#endif /* NXAGENT_SERVER */
Bool
ResizeGlyphSet (GlyphSetPtr glyphSet, CARD32 change)
......
......@@ -44,10 +44,14 @@ typedef struct _Glyph {
/* bits follow */
} GlyphRec, *GlyphPtr;
#ifdef NXAGENT_SERVER
#include "../hw/nxagent/NXglyphstr_GlyphRef.h"
#else
typedef struct _GlyphRef {
CARD32 signature;
GlyphPtr glyph;
} GlyphRefRec, *GlyphRefPtr;
#endif /* NXAGENT_SERVER */
#define DeletedGlyph ((GlyphPtr) 1)
......@@ -63,6 +67,9 @@ typedef struct _GlyphHash {
CARD32 tableEntries;
} GlyphHashRec, *GlyphHashPtr;
#ifdef NXAGENT_SERVER
#include "../hw/nxagent/NXglyphstr_GlyphSet.h"
#else
typedef struct _GlyphSet {
CARD32 refcnt;
PictFormatPtr format;
......@@ -71,6 +78,7 @@ typedef struct _GlyphSet {
int maxPrivate;
void **devPrivates;
} GlyphSetRec, *GlyphSetPtr;
#endif /* NXAGENT_SERVER */
#define GlyphSetGetPrivate(pGlyphSet,n) \
((n) > (pGlyphSet)->maxPrivate ? \
......
......@@ -89,6 +89,7 @@ miGlyphExtents (int nlist,
#define NeedsComponent(f) (PICT_FORMAT_A(f) != 0 && PICT_FORMAT_RGB(f) != 0)
#ifndef NXAGENT_SERVER
void
miGlyphs (CARD8 op,
PicturePtr pSrc,
......@@ -241,3 +242,4 @@ miGlyphs (CARD8 op,
(*pScreen->DestroyPixmap) (pMaskPixmap);
}
}
#endif
......@@ -128,6 +128,7 @@ miTrapezoidBounds (int ntrap, xTrapezoid *traps, BoxPtr box)
}
}
#ifndef NXAGENT_SERVER
void
miTrapezoids (CARD8 op,
PicturePtr pSrc,
......@@ -188,3 +189,4 @@ miTrapezoids (CARD8 op,
miTrapezoids (op, pSrc, pDst, maskFormat, xSrc, ySrc, 1, traps);
}
}
#endif
......@@ -40,7 +40,10 @@
#include "dixstruct.h"
#include "gcstruct.h"
#include "servermd.h"
#ifndef NXAGENT_SERVER
#include "picturestr.h"
#endif
int PictureScreenPrivateIndex = -1;
int PictureWindowPrivateIndex;
......@@ -212,6 +215,7 @@ addFormat (FormatInitRec formats[256],
#define Mask(n) ((n) == 32 ? 0xffffffff : ((1 << (n))-1))
#ifndef NXAGENT_SERVER
PictFormatPtr
PictureCreateDefaultFormats (ScreenPtr pScreen, int *nformatp)
{
......@@ -431,6 +435,7 @@ PictureCreateDefaultFormats (ScreenPtr pScreen, int *nformatp)
*nformatp = nformats;
return pFormats;
}
#endif
static VisualPtr
PictureFindVisual (ScreenPtr pScreen, VisualID visual)
......@@ -767,6 +772,7 @@ SetPictureToDefaults (PicturePtr pPicture)
pPicture->pSourcePict = 0;
}
#ifndef NXAGENT_SERVER
PicturePtr
AllocatePicture (ScreenPtr pScreen)
{
......@@ -847,6 +853,7 @@ CreatePicture (Picture pid,
}
return pPicture;
}
#endif
static CARD32 xRenderColorToCard32(xRenderColor c)
{
......@@ -969,6 +976,7 @@ static void initGradient(SourcePictPtr pGradient, int stopCount,
initGradientColorTable(pGradient, error);
}
#ifndef NXAGENT_SERVER
static PicturePtr createSourcePicture(void)
{
PicturePtr pPicture;
......@@ -1002,6 +1010,7 @@ CreateSolidPicture (Picture pid, xRenderColor *color, int *error)
pPicture->pSourcePict->solidFill.color = xRenderColorToCard32(*color);
return pPicture;
}
#endif
PicturePtr
CreateLinearGradientPicture (Picture pid, xPointFixed *p1, xPointFixed *p2,
......@@ -1592,6 +1601,7 @@ ValidatePicture(PicturePtr pPicture)
ValidateOnePicture (pPicture->alphaMap);
}
#ifndef NXAGENT_SERVER
int
FreePicture (void * value,
XID pid)
......@@ -1641,6 +1651,7 @@ FreePicture (void * value,
}
return Success;
}
#endif
int
FreePictFormat (void * pPictFormat,
......
......@@ -65,10 +65,14 @@ typedef struct pixman_transform PictTransform, *PictTransformPtr;
#define SourcePictTypeRadial 2
#define SourcePictTypeConical 3
#ifdef NXAGENT_SERVER
#include "../hw/nxagent/NXpicturestr_PictSolidFill.h"
#else
typedef struct _PictSolidFill {
unsigned int type;
CARD32 color;
} PictSolidFill, *PictSolidFillPtr;
#endif /* NXAGENT_SERVER */
typedef struct _PictGradientStop {
xFixed x;
......
......@@ -275,6 +275,7 @@ RenderResetProc (ExtensionEntry *extEntry)
ResetGlyphSetPrivateIndex();
}
#ifndef NXAGENT_SERVER
static int
ProcRenderQueryVersion (ClientPtr client)
{
......@@ -303,6 +304,7 @@ ProcRenderQueryVersion (ClientPtr client)
WriteToClient(client, sizeof(xRenderQueryVersionReply), (char *)&rep);
return (client->noClientException);
}
#endif /* NXAGENT_SERVER */
#if 0
static int
......@@ -341,6 +343,7 @@ findVisual (ScreenPtr pScreen, VisualID vid)
extern char *ConnectionInfo;
#ifndef NXAGENT_SERVER
static int
ProcRenderQueryPictFormats (ClientPtr client)
{
......@@ -550,6 +553,7 @@ ProcRenderQueryPictFormats (ClientPtr client)
xfree (reply);
return client->noClientException;
}
#endif /* NXAGENT_SERVER */
static int
ProcRenderQueryPictIndexValues (ClientPtr client)
......@@ -621,6 +625,7 @@ ProcRenderQueryDithers (ClientPtr client)
return BadImplementation;
}
#ifndef NXAGENT_SERVER
static int
ProcRenderCreatePicture (ClientPtr client)
{
......@@ -710,6 +715,7 @@ ProcRenderSetPictureClipRectangles (ClientPtr client)
else
return(result);
}
#endif /* NXAGENT_SERVER */
static int
ProcRenderFreePicture (ClientPtr client)
......@@ -737,6 +743,7 @@ PictOpValid (CARD8 op)
return FALSE;
}
#ifndef NXAGENT_SERVER
static int
ProcRenderComposite (ClientPtr client)
{
......@@ -774,6 +781,7 @@ ProcRenderComposite (ClientPtr client)
stuff->height);
return Success;
}
#endif /* NXAGENT_SERVER */
static int
ProcRenderScale (ClientPtr client)
......@@ -781,6 +789,7 @@ ProcRenderScale (ClientPtr client)
return BadImplementation;
}
#ifndef NXAGENT_SERVER
static int
ProcRenderTrapezoids (ClientPtr client)
{
......@@ -827,6 +836,7 @@ ProcRenderTrapezoids (ClientPtr client)
ntraps, (xTrapezoid *) &stuff[1]);
return client->noClientException;
}
#endif /* NXAGENT_SERVER */
static int
ProcRenderTriangles (ClientPtr client)
......@@ -987,6 +997,7 @@ ProcRenderTransform (ClientPtr client)
return BadImplementation;
}
#ifndef NXAGENT_SERVER
static int
ProcRenderCreateGlyphSet (ClientPtr client)
{
......@@ -1060,10 +1071,12 @@ ProcRenderReferenceGlyphSet (ClientPtr client)
return BadAlloc;
return client->noClientException;
}
#endif /* NXAGENT_SERVER */
#define NLOCALDELTA 64
#define NLOCALGLYPH 256
#ifndef NXAGENT_SERVER
static int
ProcRenderFreeGlyphSet (ClientPtr client)
{
......@@ -1083,6 +1096,7 @@ ProcRenderFreeGlyphSet (ClientPtr client)
FreeResource (stuff->glyphset, RT_NONE);
return client->noClientException;
}
#endif /* NXAGENT_SERVER */
typedef struct _GlyphNew {
Glyph id;
......@@ -1096,7 +1110,7 @@ ProcRenderAddGlyphs (ClientPtr client)
REQUEST(xRenderAddGlyphsReq);
GlyphNewRec glyphsLocal[NLOCALGLYPH];
GlyphNewPtr glyphsBase, glyphs;
GlyphPtr glyph;
GlyphPtr glyph = NULL;
int remain, nglyphs;
CARD32 *gids;
xGlyphInfo *gi;
......@@ -1199,6 +1213,7 @@ ProcRenderAddGlyphsFromPicture (ClientPtr client)
return BadImplementation;
}
#ifndef NXAGENT_SERVER
static int
ProcRenderFreeGlyphs (ClientPtr client)
{
......@@ -1454,6 +1469,7 @@ ProcRenderFillRectangles (ClientPtr client)
return client->noClientException;
}
#endif /* NXAGENT_SERVER */
static void
SetBit (unsigned char *line, int x, int bit)
......@@ -1481,6 +1497,7 @@ static CARD32 orderedDither[DITHER_DIM][DITHER_DIM] = {
#define DITHER_SIZE ((sizeof orderedDither / sizeof orderedDither[0][0]) + 1)
#ifndef NXAGENT_SERVER
static int
ProcRenderCreateCursor (ClientPtr client)
{
......@@ -1694,6 +1711,7 @@ ProcRenderSetPictureTransform (ClientPtr client)
else
return(result);
}
#endif /* NXAGENT_SERVER */
static int
ProcRenderQueryFilters (ClientPtr client)
......@@ -1804,6 +1822,7 @@ ProcRenderQueryFilters (ClientPtr client)
return(client->noClientException);
}
#ifndef NXAGENT_SERVER
static int
ProcRenderSetPictureFilter (ClientPtr client)
{
......@@ -1868,6 +1887,7 @@ ProcRenderCreateAnimCursor (ClientPtr client)
return client->noClientException;
return BadAlloc;
}
#endif /* NXAGENT_SERVER */
static int
ProcRenderAddTraps (ClientPtr client)
......@@ -1892,6 +1912,7 @@ ProcRenderAddTraps (ClientPtr client)
return client->noClientException;
}
#ifndef NXAGENT_SERVER
static int ProcRenderCreateSolidFill(ClientPtr client)
{
PicturePtr pPicture;
......@@ -2011,6 +2032,7 @@ ProcRenderDispatch (ClientPtr client)
else
return BadRequest;
}
#endif /* NXAGENT_SERVER */
static int
SProcRenderQueryVersion (ClientPtr client)
......@@ -2516,13 +2538,11 @@ static void swapStops(void *stuff, int num)
{
int i, n;
CARD32 *stops;
CARD16 *colors;
stops = (CARD32 *)(stuff);
for (i = 0; i < num; ++i) {
swapl(stops, n);
++stops;
}
colors = (CARD16 *)(stops);
for (i = 0; i < 4*num; ++i) {
swaps(stops, n);
++stops;
......@@ -2611,6 +2631,7 @@ SProcRenderCreateConicalGradient (ClientPtr client)
return (*ProcRenderVector[stuff->renderReqType]) (client);
}
#ifndef NXAGENT_SERVER
static int
SProcRenderDispatch (ClientPtr client)
{
......@@ -2621,6 +2642,7 @@ SProcRenderDispatch (ClientPtr client)
else
return BadRequest;
}
#endif /* NXAGENT_SERVER */
#ifdef PANORAMIX
#include "panoramiX.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment