From 68dd0b52e13c844d662192654fb10cb993257a59 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 22 Jun 2015 09:36:08 +0200 Subject: Replace 'pointer' type with 'void *' This lets us stop using the 'pointer' typedef in Xdefs.h as 'pointer' is used throughout the X server for other things, and having duplicate names generates compiler warnings. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt Rebased against NX: Mike Gabriel --- nx-X11/programs/Xserver/XTrap/xf86XTrapModule.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'nx-X11/programs/Xserver/XTrap/xf86XTrapModule.c') diff --git a/nx-X11/programs/Xserver/XTrap/xf86XTrapModule.c b/nx-X11/programs/Xserver/XTrap/xf86XTrapModule.c index 1783d577a..3b9955eba 100644 --- a/nx-X11/programs/Xserver/XTrap/xf86XTrapModule.c +++ b/nx-X11/programs/Xserver/XTrap/xf86XTrapModule.c @@ -41,11 +41,11 @@ static XF86ModuleVersionInfo xtrapVersRec = XF86ModuleData xtrapModuleData = { &xtrapVersRec, xtrapSetup, NULL }; -static pointer -xtrapSetup(pointer module, pointer opts, int *errmaj, int *errmin) { +static void * +xtrapSetup(void * module, void * opts, int *errmaj, int *errmin) { LoadExtension(&xtrapExt, FALSE); /* Need a non-NULL return value to indicate success */ - return (pointer)1; + return (void *)1; } #endif /* XFree86LOADER */ -- cgit v1.2.3 From 433d8186588698ce6a435fbff5e9d40a37b78be9 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Wed, 8 Jul 2015 16:16:40 +0200 Subject: Clear header file namespace separation ( vs. ). In the process of building nxagent against more and more system-wide installed X.org libraries, we come to the limit of including structs from this (bundled nx-X11) and that (system-wide X.Org) library. This commit introduces a clear namespace separation of headers provided by nx-X11 and headers provided by X.Org. This approach is only temporary as we want to drop all nx-X11 bundled libraries from nx-libs. However, for a while we need to make this separation clear and also ship some reduced fake X.Org headers that avoid pulling in libX* and libNX_X* symbols at the same time. This patch has been tested on Debian jessie and unstable and requires no overall testing on various distros and distro versions, as we finally will drop all libNX_X* libraries and build against X.org's client libs. For now, this hack eases our development / cleanup process. --- Makefile | 4 +- debian/libnx-x11-dev.install.in | 28 +-- debian/libnx-xau-dev.install.in | 2 +- debian/libnx-xcomposite-dev.install.in | 2 +- debian/libnx-xext-dev.install.in | 66 +++--- debian/libnx-xfixes-dev.install.in | 2 +- debian/libnx-xinerama-dev.install.in | 4 +- debian/libnx-xrender-dev.install.in | 2 +- debian/libnx-xtst-dev.install.in | 2 +- debian/nx-x11proto-composite-dev.install.in | 4 +- debian/nx-x11proto-core-dev.install.in | 46 ++-- debian/nx-x11proto-render-dev.install.in | 4 +- debian/nx-x11proto-xext-dev.install.in | 8 +- debian/nx-x11proto-xfixes-dev.install.in | 4 +- debian/nx-x11proto-xinerama-dev.install.in | 2 +- debian/rules | 44 ++-- nx-X11/config/cf/X11.tmpl | 2 +- nx-X11/include/GL/glx.h | 4 +- nx-X11/include/GL/glxint.h | 4 +- nx-X11/include/Imakefile | 4 +- nx-X11/include/XWDFile.h | 2 +- nx-X11/include/Xdefs.h | 2 +- nx-X11/include/Xfuncs.h | 2 +- nx-X11/include/Xos.h | 6 +- nx-X11/include/Xos_r.h | 14 +- nx-X11/include/Xpoll.h.in | 6 +- nx-X11/include/Xproto.h | 4 +- nx-X11/include/Xprotostr.h | 2 +- nx-X11/include/Xthreads.h | 2 +- nx-X11/include/extensions/Imakefile | 4 +- nx-X11/include/extensions/MITMisc.h | 2 +- nx-X11/include/extensions/XEVI.h | 2 +- nx-X11/include/extensions/XEVIstr.h | 2 +- nx-X11/include/extensions/XInput.h | 4 +- nx-X11/include/extensions/XIproto.h | 4 +- nx-X11/include/extensions/XKBgeom.h | 2 +- nx-X11/include/extensions/XKBproto.h | 4 +- nx-X11/include/extensions/XKBsrv.h | 10 +- nx-X11/include/extensions/XKBstr.h | 2 +- nx-X11/include/extensions/XLbx.h | 6 +- nx-X11/include/extensions/XShm.h | 2 +- nx-X11/include/extensions/XTest.h | 4 +- nx-X11/include/extensions/Xag.h | 2 +- nx-X11/include/extensions/Xagsrv.h | 2 +- nx-X11/include/extensions/Xagstr.h | 2 +- nx-X11/include/extensions/Xcup.h | 2 +- nx-X11/include/extensions/Xcupstr.h | 2 +- nx-X11/include/extensions/Xdbe.h | 4 +- nx-X11/include/extensions/Xevie.h | 2 +- nx-X11/include/extensions/Xext.h | 2 +- nx-X11/include/extensions/Xinerama.h | 2 +- nx-X11/include/extensions/Xv.h | 2 +- nx-X11/include/extensions/XvMC.h | 4 +- nx-X11/include/extensions/XvMClib.h | 6 +- nx-X11/include/extensions/Xvlib.h | 4 +- nx-X11/include/extensions/Xvproto.h | 2 +- nx-X11/include/extensions/composite.h | 2 +- nx-X11/include/extensions/compositeproto.h | 4 +- nx-X11/include/extensions/dpms.h | 4 +- nx-X11/include/extensions/extutil.h | 2 +- nx-X11/include/extensions/fontcache.h | 2 +- nx-X11/include/extensions/fontcacheP.h | 2 +- nx-X11/include/extensions/fontcachstr.h | 2 +- nx-X11/include/extensions/lbxbuf.h | 2 +- nx-X11/include/extensions/lbxbufstr.h | 2 +- nx-X11/include/extensions/lbximage.h | 2 +- nx-X11/include/extensions/lbxstr.h | 2 +- nx-X11/include/extensions/multibuf.h | 2 +- nx-X11/include/extensions/recordstr.h | 2 +- nx-X11/include/extensions/renderproto.h | 4 +- nx-X11/include/extensions/saverproto.h | 2 +- nx-X11/include/extensions/scrnsaver.h | 6 +- nx-X11/include/extensions/security.h | 2 +- nx-X11/include/extensions/securstr.h | 2 +- nx-X11/include/extensions/shape.h | 4 +- nx-X11/include/extensions/sync.h | 2 +- nx-X11/include/extensions/vldXvMC.h | 6 +- nx-X11/include/extensions/xf86bigfont.h | 2 +- nx-X11/include/extensions/xf86bigfstr.h | 2 +- nx-X11/include/extensions/xf86dga.h | 4 +- nx-X11/include/extensions/xf86dga1.h | 2 +- nx-X11/include/extensions/xf86dgastr.h | 2 +- nx-X11/include/extensions/xf86misc.h | 2 +- nx-X11/include/extensions/xf86mscstr.h | 2 +- nx-X11/include/extensions/xf86vmode.h | 4 +- nx-X11/include/extensions/xf86vmstr.h | 2 +- nx-X11/include/extensions/xfixesproto.h | 6 +- nx-X11/include/extensions/xtrapddmi.h | 4 +- nx-X11/include/extensions/xtrapdi.h | 8 +- nx-X11/include/extensions/xtrapemacros.h | 2 +- nx-X11/include/extensions/xtraplib.h | 8 +- nx-X11/include/keysym.h | 2 +- nx-X11/lib/X11/ClDisplay.c | 2 +- nx-X11/lib/X11/ConnDis.c | 8 +- nx-X11/lib/X11/ErrDes.c | 2 +- nx-X11/lib/X11/FSWrap.c | 2 +- nx-X11/lib/X11/FetchName.c | 6 +- nx-X11/lib/X11/Font.c | 2 +- nx-X11/lib/X11/GetDflt.c | 8 +- nx-X11/lib/X11/GetHints.c | 8 +- nx-X11/lib/X11/GetImage.c | 2 +- nx-X11/lib/X11/GetNrmHint.c | 6 +- nx-X11/lib/X11/GetRGBCMap.c | 6 +- nx-X11/lib/X11/GetStCmap.c | 6 +- nx-X11/lib/X11/GetTxtProp.c | 8 +- nx-X11/lib/X11/GetWMCMapW.c | 2 +- nx-X11/lib/X11/GetWMProto.c | 2 +- nx-X11/lib/X11/HVC.c | 2 +- nx-X11/lib/X11/Iconify.c | 8 +- nx-X11/lib/X11/ImUtil.c | 4 +- nx-X11/lib/X11/Imakefile | 2 +- nx-X11/lib/X11/InitExt.c | 4 +- nx-X11/lib/X11/KeyBind.c | 6 +- nx-X11/lib/X11/KeysymStr.c | 4 +- nx-X11/lib/X11/LRGB.c | 4 +- nx-X11/lib/X11/Lab.c | 2 +- nx-X11/lib/X11/Luv.c | 2 +- nx-X11/lib/X11/OpenDis.c | 8 +- nx-X11/lib/X11/ParseCmd.c | 2 +- nx-X11/lib/X11/PolyReg.c | 2 +- nx-X11/lib/X11/Quarks.c | 2 +- nx-X11/lib/X11/RdBitF.c | 2 +- nx-X11/lib/X11/Region.c | 2 +- nx-X11/lib/X11/ScrResStr.c | 2 +- nx-X11/lib/X11/SetHints.c | 8 +- nx-X11/lib/X11/SetLocale.c | 4 +- nx-X11/lib/X11/SetNrmHint.c | 8 +- nx-X11/lib/X11/SetRGBCMap.c | 6 +- nx-X11/lib/X11/SetStCmap.c | 6 +- nx-X11/lib/X11/SetTxtProp.c | 8 +- nx-X11/lib/X11/SetWMCMapW.c | 2 +- nx-X11/lib/X11/SetWMProto.c | 2 +- nx-X11/lib/X11/StBytes.c | 4 +- nx-X11/lib/X11/StName.c | 4 +- nx-X11/lib/X11/StrKeysym.c | 4 +- nx-X11/lib/X11/StrToText.c | 6 +- nx-X11/lib/X11/TextToStr.c | 6 +- nx-X11/lib/X11/WMProps.c | 10 +- nx-X11/lib/X11/Withdraw.c | 8 +- nx-X11/lib/X11/WrBitF.c | 2 +- nx-X11/lib/X11/XDefaultOMIF.c | 4 +- nx-X11/lib/X11/XKB.c | 2 +- nx-X11/lib/X11/XKBAlloc.c | 12 +- nx-X11/lib/X11/XKBBell.c | 2 +- nx-X11/lib/X11/XKBBind.c | 8 +- nx-X11/lib/X11/XKBCompat.c | 2 +- nx-X11/lib/X11/XKBCtrls.c | 2 +- nx-X11/lib/X11/XKBCvt.c | 16 +- nx-X11/lib/X11/XKBExtDev.c | 4 +- nx-X11/lib/X11/XKBGAlloc.c | 12 +- nx-X11/lib/X11/XKBGeom.c | 4 +- nx-X11/lib/X11/XKBGetByName.c | 2 +- nx-X11/lib/X11/XKBGetMap.c | 2 +- nx-X11/lib/X11/XKBList.c | 2 +- nx-X11/lib/X11/XKBMAlloc.c | 12 +- nx-X11/lib/X11/XKBMisc.c | 12 +- nx-X11/lib/X11/XKBNames.c | 2 +- nx-X11/lib/X11/XKBRdBuf.c | 2 +- nx-X11/lib/X11/XKBSetGeom.c | 4 +- nx-X11/lib/X11/XKBSetMap.c | 2 +- nx-X11/lib/X11/XKBUse.c | 2 +- nx-X11/lib/X11/XKBleds.c | 2 +- nx-X11/lib/X11/XKBlib.h | 4 +- nx-X11/lib/X11/XKBlibint.h | 4 +- nx-X11/lib/X11/XYZ.c | 2 +- nx-X11/lib/X11/Xcms.h | 2 +- nx-X11/lib/X11/Xcmsint.h | 2 +- nx-X11/lib/X11/XimThai.h | 2 +- nx-X11/lib/X11/Ximint.h | 2 +- nx-X11/lib/X11/Xintatom.h | 2 +- nx-X11/lib/X11/Xintconn.h | 2 +- nx-X11/lib/X11/Xlcint.h | 4 +- nx-X11/lib/X11/Xlib.h | 6 +- nx-X11/lib/X11/XlibAsync.c | 4 +- nx-X11/lib/X11/XlibInt.c | 6 +- nx-X11/lib/X11/Xlibint.h | 14 +- nx-X11/lib/X11/Xlocale.h | 4 +- nx-X11/lib/X11/Xresource.h | 2 +- nx-X11/lib/X11/Xrm.c | 4 +- nx-X11/lib/X11/Xutil.h | 2 +- nx-X11/lib/X11/cmsColNm.c | 4 +- nx-X11/lib/X11/cmsProp.c | 2 +- nx-X11/lib/X11/evtomask.c | 2 +- nx-X11/lib/X11/globals.c | 2 +- nx-X11/lib/X11/imDefFlt.c | 2 +- nx-X11/lib/X11/imDefIm.c | 2 +- nx-X11/lib/X11/imDefLkup.c | 2 +- nx-X11/lib/X11/imDispch.c | 2 +- nx-X11/lib/X11/imEvToWire.c | 4 +- nx-X11/lib/X11/imExten.c | 2 +- nx-X11/lib/X11/imInt.c | 6 +- nx-X11/lib/X11/imLcFlt.c | 2 +- nx-X11/lib/X11/imLcIc.c | 4 +- nx-X11/lib/X11/imLcIm.c | 8 +- nx-X11/lib/X11/imLcLkup.c | 10 +- nx-X11/lib/X11/imLcPrs.c | 6 +- nx-X11/lib/X11/imLcSIc.c | 6 +- nx-X11/lib/X11/imRm.c | 2 +- nx-X11/lib/X11/imThaiFlt.c | 8 +- nx-X11/lib/X11/imThaiIc.c | 4 +- nx-X11/lib/X11/imThaiIm.c | 8 +- nx-X11/lib/X11/imTrX.c | 2 +- nx-X11/lib/X11/imTrans.c | 8 +- nx-X11/lib/X11/lcCT.c | 2 +- nx-X11/lib/X11/lcDB.c | 4 +- nx-X11/lib/X11/lcFile.c | 2 +- nx-X11/lib/X11/lcPrTxt.c | 4 +- nx-X11/lib/X11/lcTxtPr.c | 4 +- nx-X11/lib/X11/lcUtil.c | 2 +- nx-X11/lib/X11/lcWrap.c | 6 +- nx-X11/lib/X11/locking.h | 2 +- nx-X11/lib/X11/mbWMProps.c | 8 +- nx-X11/lib/X11/omDefault.c | 4 +- nx-X11/lib/X11/omGeneric.c | 4 +- nx-X11/lib/X11/os2Stubs.c | 2 +- nx-X11/lib/X11/utf8WMProps.c | 8 +- nx-X11/lib/X11/util/makekeys.c | 6 +- nx-X11/lib/X11/uvY.c | 2 +- nx-X11/lib/X11/xyY.c | 2 +- nx-X11/lib/Xau/AuDispose.c | 2 +- nx-X11/lib/Xau/AuFileName.c | 4 +- nx-X11/lib/Xau/AuGetAddr.c | 4 +- nx-X11/lib/Xau/AuGetBest.c | 8 +- nx-X11/lib/Xau/AuLock.c | 6 +- nx-X11/lib/Xau/AuRead.c | 2 +- nx-X11/lib/Xau/AuUnlock.c | 4 +- nx-X11/lib/Xau/AuWrite.c | 2 +- nx-X11/lib/Xau/Autest.c | 2 +- nx-X11/lib/Xau/Imakefile | 2 +- nx-X11/lib/Xau/k5encode.c | 8 +- nx-X11/lib/Xcomposite/Imakefile | 2 +- nx-X11/lib/Xcomposite/Xcomposite.h | 6 +- nx-X11/lib/Xcomposite/xcompositeint.h | 10 +- nx-X11/lib/Xext/DPMS.c | 10 +- nx-X11/lib/Xext/MITMisc.c | 10 +- nx-X11/lib/Xext/XAppgroup.c | 10 +- nx-X11/lib/Xext/XEVI.c | 12 +- nx-X11/lib/Xext/XLbx.c | 10 +- nx-X11/lib/Xext/XMultibuf.c | 8 +- nx-X11/lib/Xext/XSecurity.c | 8 +- nx-X11/lib/Xext/XShape.c | 12 +- nx-X11/lib/Xext/XShm.c | 12 +- nx-X11/lib/Xext/XSync.c | 8 +- nx-X11/lib/Xext/XTestExt1.c | 6 +- nx-X11/lib/Xext/Xcup.c | 10 +- nx-X11/lib/Xext/Xdbe.c | 8 +- nx-X11/lib/Xext/extutil.c | 6 +- nx-X11/lib/Xext/globals.c | 4 +- nx-X11/lib/Xfixes/Imakefile | 2 +- nx-X11/lib/Xfixes/Xfixes.h | 4 +- nx-X11/lib/Xfixes/Xfixes.man | 2 +- nx-X11/lib/Xfixes/Xfixesint.h | 8 +- nx-X11/lib/Xinerama/Xinerama.c | 14 +- nx-X11/lib/Xrender/Imakefile | 2 +- nx-X11/lib/Xrender/Picture.c | 2 +- nx-X11/lib/Xrender/Xrender.h | 10 +- nx-X11/lib/Xrender/Xrenderint.h | 6 +- nx-X11/lib/Xtst/XRecord.c | 8 +- nx-X11/lib/Xtst/XTest.c | 14 +- nx-X11/lib/oldX/Imakefile | 2 +- nx-X11/lib/xkbfile/Imakefile | 2 +- nx-X11/lib/xkbfile/XKMformat.h | 6 +- nx-X11/lib/xkbfile/cout.c | 8 +- nx-X11/lib/xkbfile/maprules.c | 34 +-- nx-X11/lib/xkbfile/srvmisc.c | 6 +- nx-X11/lib/xkbfile/xkbatom.c | 6 +- nx-X11/lib/xkbfile/xkbbells.c | 4 +- nx-X11/lib/xkbfile/xkbconfig.c | 22 +- nx-X11/lib/xkbfile/xkbdraw.c | 12 +- nx-X11/lib/xkbfile/xkbmisc.c | 24 +- nx-X11/lib/xkbfile/xkbout.c | 22 +- nx-X11/lib/xkbfile/xkbtext.c | 18 +- nx-X11/lib/xkbfile/xkmout.c | 8 +- nx-X11/lib/xkbfile/xkmread.c | 24 +- nx-X11/lib/xtrans/Imakefile | 2 +- nx-X11/programs/Xserver/GL/glx/glxserver.h | 6 +- nx-X11/programs/Xserver/GL/mesa/X/xf86glx_util.c | 2 +- nx-X11/programs/Xserver/XTrap/xf86XTrapModule.c | 2 +- nx-X11/programs/Xserver/XTrap/xtrapddmi.c | 10 +- nx-X11/programs/Xserver/XTrap/xtrapdi.c | 12 +- nx-X11/programs/Xserver/XTrap/xtrapdiswp.c | 12 +- nx-X11/programs/Xserver/XTrap/xtrapditbl.c | 12 +- nx-X11/programs/Xserver/Xext/EVI.c | 6 +- nx-X11/programs/Xserver/Xext/appgroup.c | 14 +- nx-X11/programs/Xserver/Xext/bigreq.c | 6 +- nx-X11/programs/Xserver/Xext/cup.c | 8 +- nx-X11/programs/Xserver/Xext/dgaproc.h | 2 +- nx-X11/programs/Xserver/Xext/dpms.c | 8 +- nx-X11/programs/Xserver/Xext/extmod/modinit.c | 2 +- nx-X11/programs/Xserver/Xext/extmod/modinit.h | 40 ++-- nx-X11/programs/Xserver/Xext/fontcache.c | 6 +- nx-X11/programs/Xserver/Xext/mbuf.c | 6 +- nx-X11/programs/Xserver/Xext/mbufbf.c | 6 +- nx-X11/programs/Xserver/Xext/mbufpx.c | 6 +- nx-X11/programs/Xserver/Xext/mitmisc.c | 6 +- nx-X11/programs/Xserver/Xext/panoramiX.c | 8 +- nx-X11/programs/Xserver/Xext/panoramiX.h | 2 +- nx-X11/programs/Xserver/Xext/panoramiXSwap.c | 8 +- nx-X11/programs/Xserver/Xext/panoramiXprocs.c | 4 +- nx-X11/programs/Xserver/Xext/sampleEVI.c | 6 +- nx-X11/programs/Xserver/Xext/saver.c | 6 +- nx-X11/programs/Xserver/Xext/security.c | 10 +- nx-X11/programs/Xserver/Xext/shape.c | 6 +- nx-X11/programs/Xserver/Xext/shm.c | 8 +- nx-X11/programs/Xserver/Xext/sleepuntil.c | 4 +- nx-X11/programs/Xserver/Xext/sync.c | 10 +- nx-X11/programs/Xserver/Xext/xcmisc.c | 6 +- nx-X11/programs/Xserver/Xext/xevie.c | 10 +- nx-X11/programs/Xserver/Xext/xf86bigfont.c | 6 +- nx-X11/programs/Xserver/Xext/xf86dga.c | 8 +- nx-X11/programs/Xserver/Xext/xf86dga2.c | 8 +- nx-X11/programs/Xserver/Xext/xf86misc.c | 12 +- nx-X11/programs/Xserver/Xext/xf86vmode.c | 6 +- nx-X11/programs/Xserver/Xext/xres.c | 6 +- nx-X11/programs/Xserver/Xext/xtest.c | 12 +- nx-X11/programs/Xserver/Xext/xtest1dd.c | 10 +- nx-X11/programs/Xserver/Xext/xtest1di.c | 6 +- nx-X11/programs/Xserver/Xext/xvdisp.c | 10 +- nx-X11/programs/Xserver/Xext/xvdix.h | 2 +- nx-X11/programs/Xserver/Xext/xvmain.c | 8 +- nx-X11/programs/Xserver/Xext/xvmc.c | 12 +- nx-X11/programs/Xserver/Xext/xvmcext.h | 2 +- nx-X11/programs/Xserver/Xext/xvmod.c | 6 +- nx-X11/programs/Xserver/Xi/allowev.c | 8 +- nx-X11/programs/Xserver/Xi/chgdctl.c | 8 +- nx-X11/programs/Xserver/Xi/chgfctl.c | 8 +- nx-X11/programs/Xserver/Xi/chgkbd.c | 8 +- nx-X11/programs/Xserver/Xi/chgkmap.c | 8 +- nx-X11/programs/Xserver/Xi/chgprop.c | 8 +- nx-X11/programs/Xserver/Xi/chgptr.c | 8 +- nx-X11/programs/Xserver/Xi/closedev.c | 8 +- nx-X11/programs/Xserver/Xi/devbell.c | 8 +- nx-X11/programs/Xserver/Xi/exevents.c | 8 +- nx-X11/programs/Xserver/Xi/extinit.c | 8 +- nx-X11/programs/Xserver/Xi/getbmap.c | 8 +- nx-X11/programs/Xserver/Xi/getdctl.c | 8 +- nx-X11/programs/Xserver/Xi/getfctl.c | 8 +- nx-X11/programs/Xserver/Xi/getfocus.c | 8 +- nx-X11/programs/Xserver/Xi/getkmap.c | 8 +- nx-X11/programs/Xserver/Xi/getmmap.c | 8 +- nx-X11/programs/Xserver/Xi/getprop.c | 8 +- nx-X11/programs/Xserver/Xi/getselev.c | 8 +- nx-X11/programs/Xserver/Xi/getvers.c | 8 +- nx-X11/programs/Xserver/Xi/grabdev.c | 8 +- nx-X11/programs/Xserver/Xi/grabdevb.c | 8 +- nx-X11/programs/Xserver/Xi/grabdevk.c | 8 +- nx-X11/programs/Xserver/Xi/gtmotion.c | 8 +- nx-X11/programs/Xserver/Xi/listdev.c | 8 +- nx-X11/programs/Xserver/Xi/opendev.c | 8 +- nx-X11/programs/Xserver/Xi/queryst.c | 8 +- nx-X11/programs/Xserver/Xi/selectev.c | 8 +- nx-X11/programs/Xserver/Xi/sendexev.c | 8 +- nx-X11/programs/Xserver/Xi/setbmap.c | 8 +- nx-X11/programs/Xserver/Xi/setdval.c | 8 +- nx-X11/programs/Xserver/Xi/setfocus.c | 8 +- nx-X11/programs/Xserver/Xi/setmmap.c | 8 +- nx-X11/programs/Xserver/Xi/setmode.c | 8 +- nx-X11/programs/Xserver/Xi/stubs.c | 8 +- nx-X11/programs/Xserver/Xi/ungrdev.c | 6 +- nx-X11/programs/Xserver/Xi/ungrdevb.c | 8 +- nx-X11/programs/Xserver/Xi/ungrdevk.c | 8 +- nx-X11/programs/Xserver/composite/compint.h | 2 +- nx-X11/programs/Xserver/damageext/damageextint.h | 4 +- nx-X11/programs/Xserver/dbe/dbe.c | 4 +- nx-X11/programs/Xserver/dbe/dbestruct.h | 2 +- nx-X11/programs/Xserver/dbe/midbe.c | 4 +- nx-X11/programs/Xserver/dix/atom.c | 4 +- nx-X11/programs/Xserver/dix/colormap.c | 4 +- nx-X11/programs/Xserver/dix/cursor.c | 4 +- nx-X11/programs/Xserver/dix/devices.c | 8 +- nx-X11/programs/Xserver/dix/dispatch.c | 6 +- nx-X11/programs/Xserver/dix/dixfonts.c | 8 +- nx-X11/programs/Xserver/dix/dixutils.c | 8 +- nx-X11/programs/Xserver/dix/events.c | 10 +- nx-X11/programs/Xserver/dix/extension.c | 6 +- nx-X11/programs/Xserver/dix/gc.c | 6 +- nx-X11/programs/Xserver/dix/globals.c | 4 +- nx-X11/programs/Xserver/dix/grabs.c | 4 +- nx-X11/programs/Xserver/dix/initatoms.c | 4 +- nx-X11/programs/Xserver/dix/main.c | 8 +- nx-X11/programs/Xserver/dix/pixmap.c | 2 +- nx-X11/programs/Xserver/dix/privates.c | 2 +- nx-X11/programs/Xserver/dix/property.c | 6 +- nx-X11/programs/Xserver/dix/resource.c | 2 +- nx-X11/programs/Xserver/dix/swaprep.c | 4 +- nx-X11/programs/Xserver/dix/swapreq.c | 6 +- nx-X11/programs/Xserver/dix/tables.c | 4 +- nx-X11/programs/Xserver/dix/window.c | 4 +- nx-X11/programs/Xserver/fb/fb.h | 2 +- nx-X11/programs/Xserver/fb/fbcmap.c | 4 +- nx-X11/programs/Xserver/fb/fbpseudocolor.c | 4 +- nx-X11/programs/Xserver/hw/nxagent/Agent.h | 4 +- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Dialog.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Display.c | 4 +- nx-X11/programs/Xserver/hw/nxagent/Events.c | 6 +- nx-X11/programs/Xserver/hw/nxagent/Events.h | 2 +- nx-X11/programs/Xserver/hw/nxagent/Holder.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Icons.h | 2 +- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 8 +- nx-X11/programs/Xserver/hw/nxagent/NXcomposite.h | 6 +- .../programs/Xserver/hw/nxagent/NXcompositeext.h | 2 +- nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 11 +- nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c | 10 +- nx-X11/programs/Xserver/hw/nxagent/NXevents.c | 10 +- nx-X11/programs/Xserver/hw/nxagent/NXextension.c | 6 +- nx-X11/programs/Xserver/hw/nxagent/NXglyphstr.h | 2 +- nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c | 8 +- nx-X11/programs/Xserver/hw/nxagent/NXmiwindow.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/NXproperty.c | 6 +- nx-X11/programs/Xserver/hw/nxagent/NXrender.c | 10 +- nx-X11/programs/Xserver/hw/nxagent/NXresource.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/NXshm.c | 8 +- nx-X11/programs/Xserver/hw/nxagent/NXwindow.c | 4 +- nx-X11/programs/Xserver/hw/nxagent/NXxvdisp.c | 10 +- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 4 +- nx-X11/programs/Xserver/hw/nxagent/TestExt.c | 6 +- .../hw/nxagent/X11/include/Xrandr_nxagent.h | 105 +++++++++ .../Xserver/hw/nxagent/X11/include/xpm_nxagent.h | 259 +++++++++++++++++++++ .../Xserver/hw/xfree86/os-support/xf86_libc.h | 2 +- nx-X11/programs/Xserver/include/Imakefile | 4 +- nx-X11/programs/Xserver/include/closestr.h | 2 +- nx-X11/programs/Xserver/include/colormap.h | 2 +- nx-X11/programs/Xserver/include/dixfontstr.h | 2 +- nx-X11/programs/Xserver/include/dixstruct.h | 2 +- nx-X11/programs/Xserver/include/gc.h | 6 +- nx-X11/programs/Xserver/include/gcstruct.h | 2 +- nx-X11/programs/Xserver/include/input.h | 4 +- nx-X11/programs/Xserver/include/misc.h | 12 +- nx-X11/programs/Xserver/include/miscstruct.h | 2 +- nx-X11/programs/Xserver/include/opaque.h | 2 +- nx-X11/programs/Xserver/include/os.h | 2 +- nx-X11/programs/Xserver/include/scrnintstr.h | 2 +- nx-X11/programs/Xserver/include/window.h | 2 +- nx-X11/programs/Xserver/include/windowstr.h | 2 +- nx-X11/programs/Xserver/mfb/maskbits.h | 4 +- nx-X11/programs/Xserver/mi/mi.h | 2 +- nx-X11/programs/Xserver/mi/miarc.c | 6 +- nx-X11/programs/Xserver/mi/mibitblt.c | 6 +- nx-X11/programs/Xserver/mi/mibstore.c | 6 +- nx-X11/programs/Xserver/mi/miclipn.c | 2 +- nx-X11/programs/Xserver/mi/micmap.c | 4 +- nx-X11/programs/Xserver/mi/miexpose.c | 8 +- nx-X11/programs/Xserver/mi/mifillarc.c | 4 +- nx-X11/programs/Xserver/mi/mifillrct.c | 4 +- nx-X11/programs/Xserver/mi/mifpolycon.c | 2 +- nx-X11/programs/Xserver/mi/miinitext.c | 18 +- nx-X11/programs/Xserver/mi/mioverlay.c | 2 +- nx-X11/programs/Xserver/mi/mipoly.c | 2 +- nx-X11/programs/Xserver/mi/mipolygen.c | 2 +- nx-X11/programs/Xserver/mi/mipolypnt.c | 4 +- nx-X11/programs/Xserver/mi/mipolyrect.c | 4 +- nx-X11/programs/Xserver/mi/mipolyseg.c | 4 +- nx-X11/programs/Xserver/mi/mipushpxl.c | 2 +- nx-X11/programs/Xserver/mi/miregion.c | 2 +- nx-X11/programs/Xserver/mi/miscrinit.c | 4 +- nx-X11/programs/Xserver/mi/miwideline.c | 2 +- nx-X11/programs/Xserver/mi/miwindow.c | 2 +- nx-X11/programs/Xserver/mi/mizerarc.c | 4 +- nx-X11/programs/Xserver/mi/mizerclip.c | 2 +- nx-X11/programs/Xserver/mi/mizerline.c | 2 +- nx-X11/programs/Xserver/os/WaitFor.c | 10 +- nx-X11/programs/Xserver/os/access.c | 14 +- nx-X11/programs/Xserver/os/auth.c | 8 +- nx-X11/programs/Xserver/os/connection.c | 14 +- nx-X11/programs/Xserver/os/io.c | 14 +- nx-X11/programs/Xserver/os/k5auth.c | 6 +- nx-X11/programs/Xserver/os/log.c | 2 +- nx-X11/programs/Xserver/os/mitauth.c | 2 +- nx-X11/programs/Xserver/os/osdep.h | 2 +- nx-X11/programs/Xserver/os/osinit.c | 4 +- nx-X11/programs/Xserver/os/rpcauth.c | 2 +- nx-X11/programs/Xserver/os/secauth.c | 4 +- nx-X11/programs/Xserver/os/utils.c | 14 +- nx-X11/programs/Xserver/os/xalloc.c | 4 +- nx-X11/programs/Xserver/os/xdmauth.c | 6 +- nx-X11/programs/Xserver/os/xdmcp.c | 12 +- nx-X11/programs/Xserver/os/xprintf.c | 2 +- nx-X11/programs/Xserver/randr/randrproto.h | 2 +- nx-X11/programs/Xserver/randr/randrstr.h | 12 +- nx-X11/programs/Xserver/randr/rrxinerama.c | 2 +- nx-X11/programs/Xserver/record/record.c | 2 +- nx-X11/programs/Xserver/render/animcur.c | 4 +- nx-X11/programs/Xserver/render/glyphstr.h | 2 +- nx-X11/programs/Xserver/render/render.c | 10 +- nx-X11/programs/Xserver/xfixes/xfixesint.h | 6 +- nx-X11/programs/Xserver/xkb/ddxBeep.c | 10 +- nx-X11/programs/Xserver/xkb/ddxConfig.c | 10 +- nx-X11/programs/Xserver/xkb/ddxCtrls.c | 10 +- nx-X11/programs/Xserver/xkb/ddxDevBtn.c | 12 +- nx-X11/programs/Xserver/xkb/ddxFakeBtn.c | 10 +- nx-X11/programs/Xserver/xkb/ddxFakeMtn.c | 10 +- nx-X11/programs/Xserver/xkb/ddxInit.c | 10 +- nx-X11/programs/Xserver/xkb/ddxKeyClick.c | 10 +- nx-X11/programs/Xserver/xkb/ddxKillSrv.c | 10 +- nx-X11/programs/Xserver/xkb/ddxLEDs.c | 10 +- nx-X11/programs/Xserver/xkb/ddxList.c | 14 +- nx-X11/programs/Xserver/xkb/ddxLoad.c | 16 +- nx-X11/programs/Xserver/xkb/ddxPrivate.c | 4 +- nx-X11/programs/Xserver/xkb/ddxVT.c | 10 +- nx-X11/programs/Xserver/xkb/xkb.c | 10 +- nx-X11/programs/Xserver/xkb/xkbAccessX.c | 8 +- nx-X11/programs/Xserver/xkb/xkbActions.c | 8 +- nx-X11/programs/Xserver/xkb/xkbEvents.c | 10 +- nx-X11/programs/Xserver/xkb/xkbInit.c | 16 +- nx-X11/programs/Xserver/xkb/xkbLEDs.c | 8 +- nx-X11/programs/Xserver/xkb/xkbPrKeyEv.c | 8 +- nx-X11/programs/Xserver/xkb/xkbPrOtherEv.c | 12 +- nx-X11/programs/Xserver/xkb/xkbSwap.c | 8 +- nx-X11/programs/Xserver/xkb/xkbUtils.c | 10 +- nx-X11/programs/nxauth/gethost.c | 4 +- nx-X11/programs/nxauth/parsedpy.c | 6 +- nx-X11/programs/nxauth/process.c | 6 +- nx-X11/programs/nxauth/xauth.h | 6 +- nx-libs.spec | 240 +++++++++---------- nxcompext/Jpeg.c | 6 +- nxcompext/NXlib.h | 4 +- nxcompext/Pgn.h | 6 +- nxcompshad/Input.h | 2 +- nxcompshad/Manager.cpp | 6 +- nxcompshad/Manager.h | 2 +- nxcompshad/Regions.h | 4 +- nxcompshad/Shadow.h | 2 +- nxcompshad/Updater.cpp | 6 +- nxcompshad/Updater.h | 2 +- nxcompshad/Win.cpp | 2 +- nxcompshad/Win.h | 2 +- nxcompshad/X11.cpp | 8 +- nxcompshad/X11.h | 8 +- nxcompshad/X11/include/Xdamage_nxcompshad.h | 92 ++++++++ nxcompshad/X11/include/Xrandr_nxcompshad.h | 80 +++++++ 531 files changed, 2203 insertions(+), 1666 deletions(-) create mode 100644 nx-X11/programs/Xserver/hw/nxagent/X11/include/Xrandr_nxagent.h create mode 100644 nx-X11/programs/Xserver/hw/nxagent/X11/include/xpm_nxagent.h create mode 100644 nxcompshad/X11/include/Xdamage_nxcompshad.h create mode 100644 nxcompshad/X11/include/Xrandr_nxcompshad.h (limited to 'nx-X11/programs/Xserver/XTrap/xf86XTrapModule.c') diff --git a/Makefile b/Makefile index 9b89669df..2b5b4946a 100644 --- a/Makefile +++ b/Makefile @@ -149,9 +149,9 @@ install-full: . replace.sh; set -x; find nx-X11/.build-exports/include/ -type d | \ while read dirname; do \ - $(INSTALL_DIR) "$$(string_rep "$$dirname" nx-X11/.build-exports/include "$(DESTDIR)$(INCLUDEDIR)/nx")"; \ + $(INSTALL_DIR) "$$(string_rep "$$dirname" nx-X11/.build-exports/include "$(DESTDIR)$(INCLUDEDIR)/")"; \ $(INSTALL_FILE) $${dirname}/*.h \ - "$$(string_rep "$$dirname" nx-X11/.build-exports/include "$(DESTDIR)$(INCLUDEDIR)/nx")"/ || true; \ + "$$(string_rep "$$dirname" nx-X11/.build-exports/include "$(DESTDIR)$(INCLUDEDIR)/")"/ || true; \ done; \ # Provide means for Xinerama support in NX/X2Go sessions. This diff --git a/debian/libnx-x11-dev.install.in b/debian/libnx-x11-dev.install.in index 331ec104f..13af54672 100644 --- a/debian/libnx-x11-dev.install.in +++ b/debian/libnx-x11-dev.install.in @@ -1,15 +1,15 @@ usr/lib/*/libNX_X11.so -usr/include/*/nx/X11/ImUtil.h -usr/include/*/nx/X11/XKBlib.h -usr/include/*/nx/X11/Xcms.h -usr/include/*/nx/X11/Xlib.h -usr/include/*/nx/X11/XlibConf.h -usr/include/*/nx/X11/Xlibint.h -usr/include/*/nx/X11/Xlocale.h -usr/include/*/nx/X11/Xregion.h -usr/include/*/nx/X11/Xresource.h -usr/include/*/nx/X11/Xutil.h -usr/include/*/nx/X11/cursorfont.h -usr/include/*/nx/X11/misc.h -usr/include/*/nx/X11/os.h -usr/include/*/nx/X11/X10.h +usr/include/*/nx-X11/ImUtil.h +usr/include/*/nx-X11/XKBlib.h +usr/include/*/nx-X11/Xcms.h +usr/include/*/nx-X11/Xlib.h +usr/include/*/nx-X11/XlibConf.h +usr/include/*/nx-X11/Xlibint.h +usr/include/*/nx-X11/Xlocale.h +usr/include/*/nx-X11/Xregion.h +usr/include/*/nx-X11/Xresource.h +usr/include/*/nx-X11/Xutil.h +usr/include/*/nx-X11/cursorfont.h +usr/include/*/nx-X11/misc.h +usr/include/*/nx-X11/os.h +usr/include/*/nx-X11/X10.h diff --git a/debian/libnx-xau-dev.install.in b/debian/libnx-xau-dev.install.in index dd17a6054..1bf954c00 100644 --- a/debian/libnx-xau-dev.install.in +++ b/debian/libnx-xau-dev.install.in @@ -1,2 +1,2 @@ usr/lib/*/libNX_Xau.so -usr/include/*/nx/X11/Xauth.h +usr/include/*/nx-X11/Xauth.h diff --git a/debian/libnx-xcomposite-dev.install.in b/debian/libnx-xcomposite-dev.install.in index e7e3a33db..71451dbcc 100644 --- a/debian/libnx-xcomposite-dev.install.in +++ b/debian/libnx-xcomposite-dev.install.in @@ -1,2 +1,2 @@ usr/lib/*/libNX_Xcomposite.so -usr/include/*/nx/X11/extensions/Xcomposite.h +usr/include/*/nx-X11/extensions/Xcomposite.h diff --git a/debian/libnx-xext-dev.install.in b/debian/libnx-xext-dev.install.in index 9f4f60551..0d1df8c08 100644 --- a/debian/libnx-xext-dev.install.in +++ b/debian/libnx-xext-dev.install.in @@ -1,34 +1,34 @@ usr/lib/*/libNX_Xext.so -usr/include/*/nx/X11/extensions/MITMisc.h -usr/include/*/nx/X11/extensions/XEVI.h -usr/include/*/nx/X11/extensions/XEVIstr.h -usr/include/*/nx/X11/extensions/Xevie.h -usr/include/*/nx/X11/extensions/Xeviestr.h -usr/include/*/nx/X11/extensions/XLbx.h -usr/include/*/nx/X11/extensions/XShm.h -usr/include/*/nx/X11/extensions/Xag.h -usr/include/*/nx/X11/extensions/Xagsrv.h -usr/include/*/nx/X11/extensions/Xagstr.h -usr/include/*/nx/X11/extensions/Xcup.h -usr/include/*/nx/X11/extensions/Xcupstr.h -usr/include/*/nx/X11/extensions/Xdbe.h -usr/include/*/nx/X11/extensions/Xdbeproto.h -usr/include/*/nx/X11/extensions/Xext.h -usr/include/*/nx/X11/extensions/dpms.h -usr/include/*/nx/X11/extensions/dpmsstr.h -usr/include/*/nx/X11/extensions/extutil.h -usr/include/*/nx/X11/extensions/lbxstr.h -usr/include/*/nx/X11/extensions/lbxbuf.h -usr/include/*/nx/X11/extensions/lbxdeltastr.h -usr/include/*/nx/X11/extensions/lbximage.h -usr/include/*/nx/X11/extensions/lbxbufstr.h -usr/include/*/nx/X11/extensions/lbxopts.h -usr/include/*/nx/X11/extensions/lbxzlib.h -usr/include/*/nx/X11/extensions/mitmiscstr.h -usr/include/*/nx/X11/extensions/multibuf.h -usr/include/*/nx/X11/extensions/multibufst.h -usr/include/*/nx/X11/extensions/security.h -usr/include/*/nx/X11/extensions/securstr.h -usr/include/*/nx/X11/extensions/shape.h -usr/include/*/nx/X11/extensions/sync.h -usr/include/*/nx/X11/extensions/xtestext1.h +usr/include/*/nx-X11/extensions/MITMisc.h +usr/include/*/nx-X11/extensions/XEVI.h +usr/include/*/nx-X11/extensions/XEVIstr.h +usr/include/*/nx-X11/extensions/Xevie.h +usr/include/*/nx-X11/extensions/Xeviestr.h +usr/include/*/nx-X11/extensions/XLbx.h +usr/include/*/nx-X11/extensions/XShm.h +usr/include/*/nx-X11/extensions/Xag.h +usr/include/*/nx-X11/extensions/Xagsrv.h +usr/include/*/nx-X11/extensions/Xagstr.h +usr/include/*/nx-X11/extensions/Xcup.h +usr/include/*/nx-X11/extensions/Xcupstr.h +usr/include/*/nx-X11/extensions/Xdbe.h +usr/include/*/nx-X11/extensions/Xdbeproto.h +usr/include/*/nx-X11/extensions/Xext.h +usr/include/*/nx-X11/extensions/dpms.h +usr/include/*/nx-X11/extensions/dpmsstr.h +usr/include/*/nx-X11/extensions/extutil.h +usr/include/*/nx-X11/extensions/lbxstr.h +usr/include/*/nx-X11/extensions/lbxbuf.h +usr/include/*/nx-X11/extensions/lbxdeltastr.h +usr/include/*/nx-X11/extensions/lbximage.h +usr/include/*/nx-X11/extensions/lbxbufstr.h +usr/include/*/nx-X11/extensions/lbxopts.h +usr/include/*/nx-X11/extensions/lbxzlib.h +usr/include/*/nx-X11/extensions/mitmiscstr.h +usr/include/*/nx-X11/extensions/multibuf.h +usr/include/*/nx-X11/extensions/multibufst.h +usr/include/*/nx-X11/extensions/security.h +usr/include/*/nx-X11/extensions/securstr.h +usr/include/*/nx-X11/extensions/shape.h +usr/include/*/nx-X11/extensions/sync.h +usr/include/*/nx-X11/extensions/xtestext1.h diff --git a/debian/libnx-xfixes-dev.install.in b/debian/libnx-xfixes-dev.install.in index 96b6cf61c..475c78d0a 100644 --- a/debian/libnx-xfixes-dev.install.in +++ b/debian/libnx-xfixes-dev.install.in @@ -1,2 +1,2 @@ usr/lib/*/libNX_Xfixes.so -usr/include/*/nx/X11/extensions/Xfixes.h +usr/include/*/nx-X11/extensions/Xfixes.h diff --git a/debian/libnx-xinerama-dev.install.in b/debian/libnx-xinerama-dev.install.in index 983784460..59c0456aa 100644 --- a/debian/libnx-xinerama-dev.install.in +++ b/debian/libnx-xinerama-dev.install.in @@ -1,3 +1,3 @@ usr/lib/*/libNX_Xinerama.so -usr/include/*/nx/X11/extensions/Xinerama.h -usr/include/*/nx/X11/extensions/panoramiXext.h +usr/include/*/nx-X11/extensions/Xinerama.h +usr/include/*/nx-X11/extensions/panoramiXext.h diff --git a/debian/libnx-xrender-dev.install.in b/debian/libnx-xrender-dev.install.in index 392e20025..2aede35da 100644 --- a/debian/libnx-xrender-dev.install.in +++ b/debian/libnx-xrender-dev.install.in @@ -1,2 +1,2 @@ usr/lib/*/libNX_Xrender.so -usr/include/*/nx/X11/extensions/Xrender.h +usr/include/*/nx-X11/extensions/Xrender.h diff --git a/debian/libnx-xtst-dev.install.in b/debian/libnx-xtst-dev.install.in index 9dd16a1db..5acca96cf 100644 --- a/debian/libnx-xtst-dev.install.in +++ b/debian/libnx-xtst-dev.install.in @@ -1,2 +1,2 @@ usr/lib/*/libNX_Xtst.so -usr/include/*/nx/X11/extensions/XTest.h +usr/include/*/nx-X11/extensions/XTest.h diff --git a/debian/nx-x11proto-composite-dev.install.in b/debian/nx-x11proto-composite-dev.install.in index 609454a5e..cf2c77e36 100644 --- a/debian/nx-x11proto-composite-dev.install.in +++ b/debian/nx-x11proto-composite-dev.install.in @@ -1,2 +1,2 @@ -usr/include/*/nx/X11/extensions/composite.h -usr/include/*/nx/X11/extensions/compositeproto.h \ No newline at end of file +usr/include/*/nx-X11/extensions/composite.h +usr/include/*/nx-X11/extensions/compositeproto.h \ No newline at end of file diff --git a/debian/nx-x11proto-core-dev.install.in b/debian/nx-x11proto-core-dev.install.in index 92c529f41..2e99909a8 100644 --- a/debian/nx-x11proto-core-dev.install.in +++ b/debian/nx-x11proto-core-dev.install.in @@ -1,23 +1,23 @@ -usr/include/*/nx/X11/DECkeysym.h -usr/include/*/nx/X11/HPkeysym.h -usr/include/*/nx/X11/Sunkeysym.h -usr/include/*/nx/X11/X.h -usr/include/*/nx/X11/XF86keysym.h -usr/include/*/nx/X11/XWDFile.h -usr/include/*/nx/X11/Xalloca.h -usr/include/*/nx/X11/Xarch.h -usr/include/*/nx/X11/Xatom.h -usr/include/*/nx/X11/Xdefs.h -usr/include/*/nx/X11/Xfuncproto.h -usr/include/*/nx/X11/Xfuncs.h -usr/include/*/nx/X11/Xmd.h -usr/include/*/nx/X11/Xos.h -usr/include/*/nx/X11/Xos_r.h -usr/include/*/nx/X11/Xosdefs.h -usr/include/*/nx/X11/Xpoll.h -usr/include/*/nx/X11/Xproto.h -usr/include/*/nx/X11/Xprotostr.h -usr/include/*/nx/X11/Xthreads.h -usr/include/*/nx/X11/ap_keysym.h -usr/include/*/nx/X11/keysym.h -usr/include/*/nx/X11/keysymdef.h +usr/include/*/nx-X11/DECkeysym.h +usr/include/*/nx-X11/HPkeysym.h +usr/include/*/nx-X11/Sunkeysym.h +usr/include/*/nx-X11/X.h +usr/include/*/nx-X11/XF86keysym.h +usr/include/*/nx-X11/XWDFile.h +usr/include/*/nx-X11/Xalloca.h +usr/include/*/nx-X11/Xarch.h +usr/include/*/nx-X11/Xatom.h +usr/include/*/nx-X11/Xdefs.h +usr/include/*/nx-X11/Xfuncproto.h +usr/include/*/nx-X11/Xfuncs.h +usr/include/*/nx-X11/Xmd.h +usr/include/*/nx-X11/Xos.h +usr/include/*/nx-X11/Xos_r.h +usr/include/*/nx-X11/Xosdefs.h +usr/include/*/nx-X11/Xpoll.h +usr/include/*/nx-X11/Xproto.h +usr/include/*/nx-X11/Xprotostr.h +usr/include/*/nx-X11/Xthreads.h +usr/include/*/nx-X11/ap_keysym.h +usr/include/*/nx-X11/keysym.h +usr/include/*/nx-X11/keysymdef.h diff --git a/debian/nx-x11proto-render-dev.install.in b/debian/nx-x11proto-render-dev.install.in index bf778716f..f2222d234 100644 --- a/debian/nx-x11proto-render-dev.install.in +++ b/debian/nx-x11proto-render-dev.install.in @@ -1,3 +1,3 @@ -usr/include/*/nx/X11/extensions/render.h -usr/include/*/nx/X11/extensions/renderproto.h +usr/include/*/nx-X11/extensions/render.h +usr/include/*/nx-X11/extensions/renderproto.h diff --git a/debian/nx-x11proto-xext-dev.install.in b/debian/nx-x11proto-xext-dev.install.in index 7e0ca507f..0d1f8699b 100644 --- a/debian/nx-x11proto-xext-dev.install.in +++ b/debian/nx-x11proto-xext-dev.install.in @@ -1,4 +1,4 @@ -usr/include/*/nx/X11/extensions/xteststr.h -usr/include/*/nx/X11/extensions/shapestr.h -usr/include/*/nx/X11/extensions/shmstr.h -usr/include/*/nx/X11/extensions/syncstr.h +usr/include/*/nx-X11/extensions/xteststr.h +usr/include/*/nx-X11/extensions/shapestr.h +usr/include/*/nx-X11/extensions/shmstr.h +usr/include/*/nx-X11/extensions/syncstr.h diff --git a/debian/nx-x11proto-xfixes-dev.install.in b/debian/nx-x11proto-xfixes-dev.install.in index 4b614d6c1..91eae0306 100644 --- a/debian/nx-x11proto-xfixes-dev.install.in +++ b/debian/nx-x11proto-xfixes-dev.install.in @@ -1,3 +1,3 @@ -usr/include/*/nx/X11/extensions/xfixeswire.h -usr/include/*/nx/X11/extensions/xfixesproto.h +usr/include/*/nx-X11/extensions/xfixeswire.h +usr/include/*/nx-X11/extensions/xfixesproto.h diff --git a/debian/nx-x11proto-xinerama-dev.install.in b/debian/nx-x11proto-xinerama-dev.install.in index 36717e1f5..dca06ddee 100644 --- a/debian/nx-x11proto-xinerama-dev.install.in +++ b/debian/nx-x11proto-xinerama-dev.install.in @@ -1 +1 @@ -usr/include/*/nx/X11/extensions/panoramiXproto.h \ No newline at end of file +usr/include/*/nx-X11/extensions/panoramiXproto.h \ No newline at end of file diff --git a/debian/rules b/debian/rules index b3060b36f..b78855033 100755 --- a/debian/rules +++ b/debian/rules @@ -42,28 +42,28 @@ override_dh_install: rm debian/tmp/usr/lib/$(DEB_BUILD_MULTIARCH)/libXcompshad.a # remove extras, GL, and other unneeded headers - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/GL/ - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/XInput.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/XK*.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/*Xv*.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xtrap*.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/XRes*.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/record*.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xf86vmode.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xf86vmstr.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xf86misc.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xf86dga1.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xf86dgastr.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xf86dga.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xf86dga1str.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xf86mscstr.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/bigreqstr.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xcmiscstr.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/XIproto.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xf86bigfstr.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/xf86bigfont.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/extensions/XI.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx/X11/Xtrans/ + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/GL/ + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/XInput.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/XK*.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/*Xv*.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xtrap*.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/XRes*.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/record*.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86vmode.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86vmstr.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86misc.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86dga1.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86dgastr.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86dga.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86dga1str.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86mscstr.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/bigreqstr.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xcmiscstr.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/XIproto.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86bigfstr.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86bigfont.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/XI.h + rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/Xtrans/ dh_install --fail-missing diff --git a/nx-X11/config/cf/X11.tmpl b/nx-X11/config/cf/X11.tmpl index 241bc267f..f54ff84cc 100644 --- a/nx-X11/config/cf/X11.tmpl +++ b/nx-X11/config/cf/X11.tmpl @@ -1223,7 +1223,7 @@ XCOMM X Window System make variables; these need to be coordinated with rules PROGRAMSRC = $(TOP)/programs LIBSRC = $(XTOP)/lib INCLUDESRC = BuildIncDir - XINCLUDESRC = $(INCLUDESRC)/X11 + XINCLUDESRC = $(INCLUDESRC)/nx-X11 SERVERSRC = $(XTOP)/programs/Xserver CONTRIBSRC = ContribDir UNSUPPORTEDSRC = UnsupportedDir diff --git a/nx-X11/include/GL/glx.h b/nx-X11/include/GL/glx.h index 910504a1d..3a9e942c7 100644 --- a/nx-X11/include/GL/glx.h +++ b/nx-X11/include/GL/glx.h @@ -36,8 +36,8 @@ ** compliant with the OpenGL(R) version 1.2.1 Specification. */ -#include -#include +#include +#include #include #include diff --git a/nx-X11/include/GL/glxint.h b/nx-X11/include/GL/glxint.h index d9e2581bb..50f4a0eaa 100644 --- a/nx-X11/include/GL/glxint.h +++ b/nx-X11/include/GL/glxint.h @@ -23,8 +23,8 @@ ** $SGI$ */ -#include -#include +#include +#include #include "GL/gl.h" typedef struct __GLXvisualConfigRec __GLXvisualConfig; diff --git a/nx-X11/include/Imakefile b/nx-X11/include/Imakefile index 26520eab0..76a4daf6d 100644 --- a/nx-X11/include/Imakefile +++ b/nx-X11/include/Imakefile @@ -51,10 +51,10 @@ HEADERS = \ all:: -BuildIncludes($(HEADERS),X11,..) +BuildIncludes($(HEADERS),nx-X11,..) #if BuildLibraries -InstallMultipleFlags($(HEADERS),$(INCDIR)/X11,$(INSTINCFLAGS)) +InstallMultipleFlags($(HEADERS),$(INCDIR)/nx-X11,$(INSTINCFLAGS)) #endif MakeSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS)) diff --git a/nx-X11/include/XWDFile.h b/nx-X11/include/XWDFile.h index 0ce22e1a8..19a26ea33 100644 --- a/nx-X11/include/XWDFile.h +++ b/nx-X11/include/XWDFile.h @@ -39,7 +39,7 @@ in this Software without prior written authorization from The Open Group. #ifndef XWDFILE_H #define XWDFILE_H -#include +#include #define XWD_FILE_VERSION 7 #define sz_XWDheader 100 diff --git a/nx-X11/include/Xdefs.h b/nx-X11/include/Xdefs.h index f32149db5..c06202af3 100644 --- a/nx-X11/include/Xdefs.h +++ b/nx-X11/include/Xdefs.h @@ -31,7 +31,7 @@ authorization from The XFree86 Project Inc.. #define _XDEFS_H #ifdef _XSERVER64 -#include +#include #endif #ifndef _XTYPEDEF_ATOM diff --git a/nx-X11/include/Xfuncs.h b/nx-X11/include/Xfuncs.h index a059bc710..7582198bb 100644 --- a/nx-X11/include/Xfuncs.h +++ b/nx-X11/include/Xfuncs.h @@ -31,7 +31,7 @@ in this Software without prior written authorization from The Open Group. #ifndef _XFUNCS_H_ #define _XFUNCS_H_ -#include +#include /* the old Xfuncs.h, for pre-R6 */ #if !(defined(XFree86LOADER) && defined(IN_MODULE)) diff --git a/nx-X11/include/Xos.h b/nx-X11/include/Xos.h index 04b14b6fc..a2abf156f 100644 --- a/nx-X11/include/Xos.h +++ b/nx-X11/include/Xos.h @@ -37,7 +37,7 @@ in this Software without prior written authorization from The Open Group. #ifndef _XOS_H_ #define _XOS_H_ -#include +#include /* * Get major data types (esp. caddr_t) @@ -150,7 +150,7 @@ extern int sys_nerr; #include #endif #ifdef WIN32 -#include +#include #else #include #endif @@ -285,6 +285,6 @@ struct sockaddr_un { }; #endif -#include +#include #endif /* _XOS_H_ */ diff --git a/nx-X11/include/Xos_r.h b/nx-X11/include/Xos_r.h index e539aee2a..44b1eaacf 100644 --- a/nx-X11/include/Xos_r.h +++ b/nx-X11/include/Xos_r.h @@ -216,7 +216,7 @@ extern void XtProcessUnlock( * * #define X_INCLUDE_PWD_H * #define XOS_USE_..._LOCKING - * #include + * #include * * typedef ... _Xgetpwparams; * @@ -394,7 +394,7 @@ typedef int _Xgetpwret; * * #define X_INCLUDE_NETDB_H * #define XOS_USE_..._LOCKING - * #include + * #include * * typedef ... _Xgethostbynameparams; * typedef ... _Xgetservbynameparams; @@ -556,7 +556,7 @@ typedef int _Xgetservbynameparams; /* dummy */ * * #define X_INCLUDE_DIRENT_H * #define XOS_USE_..._LOCKING - * #include + * #include * * typedef ... _Xreaddirparams; * @@ -680,7 +680,7 @@ extern int _Preaddir_r(DIR *, struct dirent *, struct dirent **); * * #define X_INCLUDE_UNISTD_H * #define XOS_USE_..._LOCKING - * #include + * #include * * typedef ... _Xgetloginparams; * typedef ... _Xttynameparams; @@ -822,7 +822,7 @@ typedef struct { * * #define X_INCLUDE_STRING_H * #define XOS_USE_..._LOCKING - * #include + * #include * * typedef ... _Xstrtokparams; * @@ -868,7 +868,7 @@ typedef char * _Xstrtokparams; * * #define X_INCLUDE_TIME_H * #define XOS_USE_..._LOCKING - * #include + * #include * * typedef ... _Xatimeparams; * typedef ... _Xctimeparams; @@ -1036,7 +1036,7 @@ typedef struct tm _Xltimeparams; * * #define X_INCLUDE_GRP_H * #define XOS_USE_..._LOCKING - * #include + * #include * * typedef ... _Xgetgrparams; * diff --git a/nx-X11/include/Xpoll.h.in b/nx-X11/include/Xpoll.h.in index 3200c3711..77a0aea3d 100644 --- a/nx-X11/include/Xpoll.h.in +++ b/nx-X11/include/Xpoll.h.in @@ -75,7 +75,7 @@ from The Open Group. #ifndef USE_POLL -#include +#include /* Below is the monster branch from hell. Basically, most systems will drop to * 'the branch below is the fallthrough for halfway modern systems', and include @@ -104,7 +104,7 @@ from The Open Group. # include #endif -#include +#include #ifdef CSRG_BASED #include @@ -241,7 +241,7 @@ extern int _XSelect(int maxfds, fd_set *readfds, fd_set *writefds, #ifndef FD_SETSIZE #define FD_SETSIZE XFD_SETSIZE #endif -#include +#include #define Select(n,r,w,e,t) select(0,(fd_set*)r,(fd_set*)w,(fd_set*)e,(struct timeval*)t) diff --git a/nx-X11/include/Xproto.h b/nx-X11/include/Xproto.h index 877aab442..0f7d1f557 100644 --- a/nx-X11/include/Xproto.h +++ b/nx-X11/include/Xproto.h @@ -73,8 +73,8 @@ SOFTWARE. ******************************************************************/ -#include -#include +#include +#include /* * Define constants for the sizes of the network packets. The sz_ prefix is diff --git a/nx-X11/include/Xprotostr.h b/nx-X11/include/Xprotostr.h index f343d9849..a0f849874 100644 --- a/nx-X11/include/Xprotostr.h +++ b/nx-X11/include/Xprotostr.h @@ -48,7 +48,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -#include +#include /* Used by PolySegment */ diff --git a/nx-X11/include/Xthreads.h b/nx-X11/include/Xthreads.h index 54b5440ad..41440a2fb 100644 --- a/nx-X11/include/Xthreads.h +++ b/nx-X11/include/Xthreads.h @@ -98,7 +98,7 @@ extern xthread_t (*_x11_thr_self)(); #define xcondition_broadcast(cv) cond_broadcast(cv) #else /* !SVR4 */ #ifdef WIN32 -#include +#include typedef DWORD xthread_t; typedef DWORD xthread_key_t; struct _xthread_waiter { diff --git a/nx-X11/include/extensions/Imakefile b/nx-X11/include/extensions/Imakefile index ec6c10b98..b7ed23120 100644 --- a/nx-X11/include/extensions/Imakefile +++ b/nx-X11/include/extensions/Imakefile @@ -101,10 +101,10 @@ HEADERS = Xext.h \ all:: -BuildIncludes($(HEADERS),X11/extensions,../..) +BuildIncludes($(HEADERS),nx-X11/extensions,../..) #if BuildLibraries -InstallMultipleFlags($(HEADERS),$(INCDIR)/X11/extensions,$(INSTINCFLAGS)) +InstallMultipleFlags($(HEADERS),$(INCDIR)/nx-X11/extensions,$(INSTINCFLAGS)) #endif InstallDriverSDKNonExecFile(XI.h,$(DRIVERSDKINCLUDEDIR)/extensions) diff --git a/nx-X11/include/extensions/MITMisc.h b/nx-X11/include/extensions/MITMisc.h index 975700e01..d66b8242d 100644 --- a/nx-X11/include/extensions/MITMisc.h +++ b/nx-X11/include/extensions/MITMisc.h @@ -31,7 +31,7 @@ in this Software without prior written authorization from The Open Group. #ifndef _XMITMISC_H_ #define _XMITMISC_H_ -#include +#include #define X_MITSetBugMode 0 #define X_MITGetBugMode 1 diff --git a/nx-X11/include/extensions/XEVI.h b/nx-X11/include/extensions/XEVI.h index d8e37ff4f..30b2412d9 100644 --- a/nx-X11/include/extensions/XEVI.h +++ b/nx-X11/include/extensions/XEVI.h @@ -25,7 +25,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifndef _XEVI_H_ #define _XEVI_H_ -#include +#include #define X_EVIQueryVersion 0 #define X_EVIGetVisualInfo 1 #define XEVI_TRANSPARENCY_NONE 0 diff --git a/nx-X11/include/extensions/XEVIstr.h b/nx-X11/include/extensions/XEVIstr.h index 388ef4bcf..4deb6c113 100644 --- a/nx-X11/include/extensions/XEVIstr.h +++ b/nx-X11/include/extensions/XEVIstr.h @@ -26,7 +26,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifndef _EVISTR_H_ #define _EVISTR_H_ -#include +#include #define VisualID CARD32 #define EVINAME "Extended-Visual-Information" diff --git a/nx-X11/include/extensions/XInput.h b/nx-X11/include/extensions/XInput.h index ee4410531..cf4b72ca0 100644 --- a/nx-X11/include/extensions/XInput.h +++ b/nx-X11/include/extensions/XInput.h @@ -52,8 +52,8 @@ SOFTWARE. #ifndef _XINPUT_H_ #define _XINPUT_H_ -#include -#include +#include +#include #define _deviceKeyPress 0 #define _deviceKeyRelease 1 diff --git a/nx-X11/include/extensions/XIproto.h b/nx-X11/include/extensions/XIproto.h index 1da0248f8..cccb11a2c 100644 --- a/nx-X11/include/extensions/XIproto.h +++ b/nx-X11/include/extensions/XIproto.h @@ -50,8 +50,8 @@ SOFTWARE. #ifndef _XIPROTO_H #define _XIPROTO_H -#include -#include +#include +#include /* make sure types have right sizes for protocol structures. */ #define Window CARD32 diff --git a/nx-X11/include/extensions/XKBgeom.h b/nx-X11/include/extensions/XKBgeom.h index 89f902fba..6ef114bfe 100644 --- a/nx-X11/include/extensions/XKBgeom.h +++ b/nx-X11/include/extensions/XKBgeom.h @@ -29,7 +29,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifndef _XKBGEOM_H_ #define _XKBGEOM_H_ -#include +#include #ifdef XKB_IN_SERVER #define XkbAddGeomKeyAlias SrvXkbAddGeomKeyAlias diff --git a/nx-X11/include/extensions/XKBproto.h b/nx-X11/include/extensions/XKBproto.h index 97dd4d262..2dc3b141e 100644 --- a/nx-X11/include/extensions/XKBproto.h +++ b/nx-X11/include/extensions/XKBproto.h @@ -28,8 +28,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifndef _XKBPROTO_H_ #define _XKBPROTO_H_ -#include -#include +#include +#include #define Window CARD32 #define Atom CARD32 diff --git a/nx-X11/include/extensions/XKBsrv.h b/nx-X11/include/extensions/XKBsrv.h index 0d262e979..3d335bc88 100644 --- a/nx-X11/include/extensions/XKBsrv.h +++ b/nx-X11/include/extensions/XKBsrv.h @@ -69,8 +69,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define XkbUpdateKeyTypeVirtualMods SrvXkbUpdateKeyTypeVirtualMods #endif -#include -#include +#include +#include #include "inputstr.h" #ifdef NXAGENT_SERVER @@ -1100,9 +1100,9 @@ extern void XkbSendNewKeyboardNotify( #ifdef XKBSRV_NEED_FILE_FUNCS -#include -#include -#include +#include +#include +#include #define _XkbListKeymaps 0 #define _XkbListKeycodes 1 diff --git a/nx-X11/include/extensions/XKBstr.h b/nx-X11/include/extensions/XKBstr.h index 6131c931c..77666f6aa 100644 --- a/nx-X11/include/extensions/XKBstr.h +++ b/nx-X11/include/extensions/XKBstr.h @@ -28,7 +28,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifndef _XKBSTR_H_ #define _XKBSTR_H_ -#include +#include #define XkbCharToInt(v) ((v)&0x80?(int)((v)|(~0xff)):(int)((v)&0x7f)) #define XkbIntTo2Chars(i,h,l) (((h)=((i>>8)&0xff)),((l)=((i)&0xff))) diff --git a/nx-X11/include/extensions/XLbx.h b/nx-X11/include/extensions/XLbx.h index 01d44f090..6cd867944 100644 --- a/nx-X11/include/extensions/XLbx.h +++ b/nx-X11/include/extensions/XLbx.h @@ -25,7 +25,7 @@ #ifndef _XLBX_H_ #define _XLBX_H_ -#include +#include /* * NOTE: any changes or additions to the opcodes needs to be reflected @@ -128,8 +128,8 @@ #ifndef _XLBX_SERVER_ -#include -#include +#include +#include _XFUNCPROTOBEGIN diff --git a/nx-X11/include/extensions/XShm.h b/nx-X11/include/extensions/XShm.h index 4ae14ca8b..4b0d01bef 100644 --- a/nx-X11/include/extensions/XShm.h +++ b/nx-X11/include/extensions/XShm.h @@ -32,7 +32,7 @@ in this Software without prior written authorization from The Open Group. #ifndef _XSHM_H_ #define _XSHM_H_ -#include +#include #define X_ShmQueryVersion 0 #define X_ShmAttach 1 diff --git a/nx-X11/include/extensions/XTest.h b/nx-X11/include/extensions/XTest.h index afb1849c3..4817ef132 100644 --- a/nx-X11/include/extensions/XTest.h +++ b/nx-X11/include/extensions/XTest.h @@ -29,7 +29,7 @@ in this Software without prior written authorization from The Open Group. #ifndef _XTEST_H_ #define _XTEST_H_ -#include +#include #define X_XTestGetVersion 0 #define X_XTestCompareCursor 1 @@ -47,7 +47,7 @@ in this Software without prior written authorization from The Open Group. #ifndef _XTEST_SERVER_ -#include +#include _XFUNCPROTOBEGIN diff --git a/nx-X11/include/extensions/Xag.h b/nx-X11/include/extensions/Xag.h index 815f2b9f9..4c1193e3d 100644 --- a/nx-X11/include/extensions/Xag.h +++ b/nx-X11/include/extensions/Xag.h @@ -29,7 +29,7 @@ from The Open Group. #ifndef _XAG_H_ #define _XAG_H_ -#include +#include #define X_XagQueryVersion 0 #define X_XagCreate 1 diff --git a/nx-X11/include/extensions/Xagsrv.h b/nx-X11/include/extensions/Xagsrv.h index b9c50aaa9..daf1af04d 100644 --- a/nx-X11/include/extensions/Xagsrv.h +++ b/nx-X11/include/extensions/Xagsrv.h @@ -29,7 +29,7 @@ from The Open Group. #ifndef _XAGSRV_H_ #define _XAGSRV_H_ -#include +#include _XFUNCPROTOBEGIN diff --git a/nx-X11/include/extensions/Xagstr.h b/nx-X11/include/extensions/Xagstr.h index ffb5527a2..4f12027e0 100644 --- a/nx-X11/include/extensions/Xagstr.h +++ b/nx-X11/include/extensions/Xagstr.h @@ -29,7 +29,7 @@ from The Open Group. #ifndef _XAGSTR_H_ /* { */ #define _XAGSTR_H_ -#include +#include #define XAppGroup CARD32 diff --git a/nx-X11/include/extensions/Xcup.h b/nx-X11/include/extensions/Xcup.h index b1df039e6..fb5fd0887 100644 --- a/nx-X11/include/extensions/Xcup.h +++ b/nx-X11/include/extensions/Xcup.h @@ -29,7 +29,7 @@ in this Software without prior written authorization from The Open Group. #ifndef _XCUP_H_ #define _XCUP_H_ -#include +#include #define X_XcupQueryVersion 0 #define X_XcupGetReservedColormapEntries 1 diff --git a/nx-X11/include/extensions/Xcupstr.h b/nx-X11/include/extensions/Xcupstr.h index f521c333c..fa77b5aea 100644 --- a/nx-X11/include/extensions/Xcupstr.h +++ b/nx-X11/include/extensions/Xcupstr.h @@ -30,7 +30,7 @@ in this Software without prior written authorization from The Open Group. #ifndef _XCUPSTR_H_ /* { */ #define _XCUPSTR_H_ -#include +#include #define XCUPNAME "TOG-CUP" diff --git a/nx-X11/include/extensions/Xdbe.h b/nx-X11/include/extensions/Xdbe.h index f9205a228..bc43007c6 100644 --- a/nx-X11/include/extensions/Xdbe.h +++ b/nx-X11/include/extensions/Xdbe.h @@ -38,8 +38,8 @@ /* INCLUDES */ -#include -#include +#include +#include /* DEFINES */ diff --git a/nx-X11/include/extensions/Xevie.h b/nx-X11/include/extensions/Xevie.h index d6d4fab84..5dc48bbfd 100644 --- a/nx-X11/include/extensions/Xevie.h +++ b/nx-X11/include/extensions/Xevie.h @@ -35,7 +35,7 @@ of the copyright holder. #ifndef _XEVIE_H_ #define _XEVIE_H_ -#include +#include #define XEVIE_UNMODIFIED 0 #define XEVIE_MODIFIED 1 diff --git a/nx-X11/include/extensions/Xext.h b/nx-X11/include/extensions/Xext.h index 5b62c8b2d..b0ce292fc 100644 --- a/nx-X11/include/extensions/Xext.h +++ b/nx-X11/include/extensions/Xext.h @@ -28,7 +28,7 @@ in this Software without prior written authorization from The Open Group. #ifndef _XEXT_H_ #define _XEXT_H_ -#include +#include _XFUNCPROTOBEGIN diff --git a/nx-X11/include/extensions/Xinerama.h b/nx-X11/include/extensions/Xinerama.h index e1c9445c3..77e7e7444 100644 --- a/nx-X11/include/extensions/Xinerama.h +++ b/nx-X11/include/extensions/Xinerama.h @@ -29,7 +29,7 @@ in this Software without prior written authorization from The Open Group. #ifndef _Xinerama_h #define _Xinerama_h -#include +#include typedef struct { int screen_number; diff --git a/nx-X11/include/extensions/Xv.h b/nx-X11/include/extensions/Xv.h index 4e85fa719..f07f9d75f 100644 --- a/nx-X11/include/extensions/Xv.h +++ b/nx-X11/include/extensions/Xv.h @@ -44,7 +44,7 @@ SOFTWARE. ** */ -#include +#include #define XvName "XVideo" #define XvVersion 2 diff --git a/nx-X11/include/extensions/XvMC.h b/nx-X11/include/extensions/XvMC.h index 3e621f05a..1709692a1 100644 --- a/nx-X11/include/extensions/XvMC.h +++ b/nx-X11/include/extensions/XvMC.h @@ -3,8 +3,8 @@ #ifndef _XVMC_H_ #define _XVMC_H_ -#include -#include +#include +#include #define XvMCName "XVideo-MotionCompensation" #define XvMCNumEvents 0 diff --git a/nx-X11/include/extensions/XvMClib.h b/nx-X11/include/extensions/XvMClib.h index 1b30a669a..c1e94119e 100644 --- a/nx-X11/include/extensions/XvMClib.h +++ b/nx-X11/include/extensions/XvMClib.h @@ -4,9 +4,9 @@ #ifndef _XVMCLIB_H_ #define _XVMCLIB_H_ -#include -#include -#include +#include +#include +#include _XFUNCPROTOBEGIN diff --git a/nx-X11/include/extensions/Xvlib.h b/nx-X11/include/extensions/Xvlib.h index 2fd26e55b..98c407e31 100644 --- a/nx-X11/include/extensions/Xvlib.h +++ b/nx-X11/include/extensions/Xvlib.h @@ -53,8 +53,8 @@ SOFTWARE. ** */ -#include -#include +#include +#include typedef struct { int numerator; diff --git a/nx-X11/include/extensions/Xvproto.h b/nx-X11/include/extensions/Xvproto.h index 9112f510e..81e1656a8 100644 --- a/nx-X11/include/extensions/Xvproto.h +++ b/nx-X11/include/extensions/Xvproto.h @@ -49,7 +49,7 @@ SOFTWARE. ** */ -#include +#include /* Symbols: These are undefined at the end of this file to restore the values they have in Xv.h */ diff --git a/nx-X11/include/extensions/composite.h b/nx-X11/include/extensions/composite.h index bfdfbee97..d1901750a 100644 --- a/nx-X11/include/extensions/composite.h +++ b/nx-X11/include/extensions/composite.h @@ -25,7 +25,7 @@ #ifndef _COMPOSITE_H_ #define _COMPOSITE_H_ -#include +#include #define COMPOSITE_NAME "Composite" #define COMPOSITE_MAJOR 0 diff --git a/nx-X11/include/extensions/compositeproto.h b/nx-X11/include/extensions/compositeproto.h index 2304e961d..a851c727e 100644 --- a/nx-X11/include/extensions/compositeproto.h +++ b/nx-X11/include/extensions/compositeproto.h @@ -25,8 +25,8 @@ #ifndef _COMPOSITEPROTO_H_ #define _COMPOSITEPROTO_H_ -#include -#include +#include +#include #define Window CARD32 #define Region CARD32 diff --git a/nx-X11/include/extensions/dpms.h b/nx-X11/include/extensions/dpms.h index 7555f4ab6..87d7c9c81 100644 --- a/nx-X11/include/extensions/dpms.h +++ b/nx-X11/include/extensions/dpms.h @@ -46,8 +46,8 @@ Equipment Corporation. #ifndef DPMS_SERVER -#include -#include +#include +#include _XFUNCPROTOBEGIN diff --git a/nx-X11/include/extensions/extutil.h b/nx-X11/include/extensions/extutil.h index 825d81e93..de6becfd2 100644 --- a/nx-X11/include/extensions/extutil.h +++ b/nx-X11/include/extensions/extutil.h @@ -36,7 +36,7 @@ in this Software without prior written authorization from The Open Group. #ifndef _EXTUTIL_H_ #define _EXTUTIL_H_ -#include +#include /* * We need to keep a list of open displays since the Xlib display list isn't diff --git a/nx-X11/include/extensions/fontcache.h b/nx-X11/include/extensions/fontcache.h index b767db19b..2a3cf619b 100644 --- a/nx-X11/include/extensions/fontcache.h +++ b/nx-X11/include/extensions/fontcache.h @@ -68,7 +68,7 @@ typedef struct { #ifndef _FONTCACHE_SERVER_ -#include +#include _XFUNCPROTOBEGIN diff --git a/nx-X11/include/extensions/fontcacheP.h b/nx-X11/include/extensions/fontcacheP.h index 75677f300..5363ef149 100644 --- a/nx-X11/include/extensions/fontcacheP.h +++ b/nx-X11/include/extensions/fontcacheP.h @@ -31,7 +31,7 @@ #ifndef _FONTCACHEP_H_ #define _FONTCACHEP_H_ -#include +#include int FontCacheChangeSettings(FontCacheSettingsPtr /* cinfo */); void FontCacheGetSettings(FontCacheSettingsPtr /* cinfo */); diff --git a/nx-X11/include/extensions/fontcachstr.h b/nx-X11/include/extensions/fontcachstr.h index eab704e23..abead0f2b 100644 --- a/nx-X11/include/extensions/fontcachstr.h +++ b/nx-X11/include/extensions/fontcachstr.h @@ -34,7 +34,7 @@ #ifndef _FONTCACHESTR_H_ #define _FONTCACHESTR_H_ -#include +#include #define FONTCACHENAME "FontCache" diff --git a/nx-X11/include/extensions/lbxbuf.h b/nx-X11/include/extensions/lbxbuf.h index 63983df16..1a5a7475a 100644 --- a/nx-X11/include/extensions/lbxbuf.h +++ b/nx-X11/include/extensions/lbxbuf.h @@ -38,7 +38,7 @@ typedef struct _zlibbuffer *ZlibBufferPtr; -#include +#include _XFUNCPROTOBEGIN diff --git a/nx-X11/include/extensions/lbxbufstr.h b/nx-X11/include/extensions/lbxbufstr.h index e1a06f633..d99730e7e 100644 --- a/nx-X11/include/extensions/lbxbufstr.h +++ b/nx-X11/include/extensions/lbxbufstr.h @@ -27,7 +27,7 @@ #ifndef _BUFFERSTR_H_ #define _BUFFERSTR_H_ -#include +#include /* * ZLIB Input/Output buffer diff --git a/nx-X11/include/extensions/lbximage.h b/nx-X11/include/extensions/lbximage.h index 10627cf29..fff181a69 100644 --- a/nx-X11/include/extensions/lbximage.h +++ b/nx-X11/include/extensions/lbximage.h @@ -30,7 +30,7 @@ in this Software without prior written authorization from The Open Group. #ifndef _LBX_IMAGE_H_ #define _LBX_IMAGE_H_ -#include +#include _XFUNCPROTOBEGIN diff --git a/nx-X11/include/extensions/lbxstr.h b/nx-X11/include/extensions/lbxstr.h index a7521b1be..7bde5a766 100644 --- a/nx-X11/include/extensions/lbxstr.h +++ b/nx-X11/include/extensions/lbxstr.h @@ -25,7 +25,7 @@ #ifndef _LBXSTR_H_ #define _LBXSTR_H_ -#include +#include #define LBXNAME "LBX" diff --git a/nx-X11/include/extensions/multibuf.h b/nx-X11/include/extensions/multibuf.h index 96b4c3b14..c35399b01 100644 --- a/nx-X11/include/extensions/multibuf.h +++ b/nx-X11/include/extensions/multibuf.h @@ -29,7 +29,7 @@ in this Software without prior written authorization from The Open Group. #ifndef _MULTIBUF_H_ #define _MULTIBUF_H_ -#include +#include #define MULTIBUFFER_PROTOCOL_NAME "Multi-Buffering" diff --git a/nx-X11/include/extensions/recordstr.h b/nx-X11/include/extensions/recordstr.h index 246d34f1a..88ff8b66b 100644 --- a/nx-X11/include/extensions/recordstr.h +++ b/nx-X11/include/extensions/recordstr.h @@ -29,7 +29,7 @@ static char sccsid[ ] = "@(#) recordstr.h 1.5 6/5/95 12:37:44"; #ifndef _RECORDSTR_H_ #define _RECORDSTR_H_ -#include +#include #define RECORD_NAME "RECORD" #define RECORD_MAJOR_VERSION 1 diff --git a/nx-X11/include/extensions/renderproto.h b/nx-X11/include/extensions/renderproto.h index bdd4c746f..25c510cd1 100644 --- a/nx-X11/include/extensions/renderproto.h +++ b/nx-X11/include/extensions/renderproto.h @@ -26,8 +26,8 @@ #ifndef _XRENDERP_H_ #define _XRENDERP_H_ -#include -#include +#include +#include #define Window CARD32 #define Drawable CARD32 diff --git a/nx-X11/include/extensions/saverproto.h b/nx-X11/include/extensions/saverproto.h index 1a671af91..17f740f4d 100644 --- a/nx-X11/include/extensions/saverproto.h +++ b/nx-X11/include/extensions/saverproto.h @@ -31,7 +31,7 @@ in this Software without prior written authorization from the X Consortium. #ifndef _SAVERPROTO_H_ #define _SAVERPROTO_H_ -#include +#include #define Window CARD32 #define Drawable CARD32 diff --git a/nx-X11/include/extensions/scrnsaver.h b/nx-X11/include/extensions/scrnsaver.h index 2659edd73..38e5e24df 100644 --- a/nx-X11/include/extensions/scrnsaver.h +++ b/nx-X11/include/extensions/scrnsaver.h @@ -31,9 +31,9 @@ in this Software without prior written authorization from the X Consortium. #ifndef _SCRNSAVER_H_ #define _SCRNSAVER_H_ -#include -#include -#include +#include +#include +#include typedef struct { int type; /* of event */ diff --git a/nx-X11/include/extensions/security.h b/nx-X11/include/extensions/security.h index 188ad55bc..a0aabaf8e 100644 --- a/nx-X11/include/extensions/security.h +++ b/nx-X11/include/extensions/security.h @@ -30,7 +30,7 @@ from The Open Group. #define _SECURITY_H #define _XAUTH_STRUCT_ONLY -#include +#include /* constants that server, library, and application all need */ diff --git a/nx-X11/include/extensions/securstr.h b/nx-X11/include/extensions/securstr.h index 50c764441..3e93fe10e 100644 --- a/nx-X11/include/extensions/securstr.h +++ b/nx-X11/include/extensions/securstr.h @@ -29,7 +29,7 @@ from The Open Group. #ifndef _SECURSTR_H #define _SECURSTR_H -#include +#include #define SECURITY_EXTENSION_NAME "SECURITY" #define SECURITY_MAJOR_VERSION 1 diff --git a/nx-X11/include/extensions/shape.h b/nx-X11/include/extensions/shape.h index d173efef8..5e85ffc04 100644 --- a/nx-X11/include/extensions/shape.h +++ b/nx-X11/include/extensions/shape.h @@ -30,7 +30,7 @@ in this Software without prior written authorization from The Open Group. #ifndef _SHAPE_H_ #define _SHAPE_H_ -#include +#include #define X_ShapeQueryVersion 0 #define X_ShapeRectangles 1 @@ -59,7 +59,7 @@ in this Software without prior written authorization from The Open Group. #ifndef _SHAPE_SERVER_ -#include +#include typedef struct { int type; /* of event */ diff --git a/nx-X11/include/extensions/sync.h b/nx-X11/include/extensions/sync.h index 9fbe6d72f..8d2861663 100644 --- a/nx-X11/include/extensions/sync.h +++ b/nx-X11/include/extensions/sync.h @@ -53,7 +53,7 @@ PERFORMANCE OF THIS SOFTWARE. #ifndef _SYNC_H_ #define _SYNC_H_ -#include +#include _XFUNCPROTOBEGIN diff --git a/nx-X11/include/extensions/vldXvMC.h b/nx-X11/include/extensions/vldXvMC.h index 91fb3b76a..355c662e6 100644 --- a/nx-X11/include/extensions/vldXvMC.h +++ b/nx-X11/include/extensions/vldXvMC.h @@ -28,9 +28,9 @@ #ifndef _VLDXVMC_H #define _VLDXVMC_H -#include -#include -#include +#include +#include +#include /* * New "Motion compensation type". diff --git a/nx-X11/include/extensions/xf86bigfont.h b/nx-X11/include/extensions/xf86bigfont.h index 654cc401b..d6be21b6f 100644 --- a/nx-X11/include/extensions/xf86bigfont.h +++ b/nx-X11/include/extensions/xf86bigfont.h @@ -11,7 +11,7 @@ #ifndef _XF86BIGFONT_H_ #define _XF86BIGFONT_H_ -#include +#include #define X_XF86BigfontQueryVersion 0 #define X_XF86BigfontQueryFont 1 diff --git a/nx-X11/include/extensions/xf86bigfstr.h b/nx-X11/include/extensions/xf86bigfstr.h index 95f107a2a..6f66e58d9 100644 --- a/nx-X11/include/extensions/xf86bigfstr.h +++ b/nx-X11/include/extensions/xf86bigfstr.h @@ -11,7 +11,7 @@ #ifndef _XF86BIGFSTR_H_ #define _XF86BIGFSTR_H_ -#include +#include #define XF86BIGFONTNAME "XFree86-Bigfont" diff --git a/nx-X11/include/extensions/xf86dga.h b/nx-X11/include/extensions/xf86dga.h index 720118842..d6e494158 100644 --- a/nx-X11/include/extensions/xf86dga.h +++ b/nx-X11/include/extensions/xf86dga.h @@ -6,8 +6,8 @@ #ifndef _XF86DGA_H_ #define _XF86DGA_H_ -#include -#include +#include +#include #define X_XDGAQueryVersion 0 diff --git a/nx-X11/include/extensions/xf86dga1.h b/nx-X11/include/extensions/xf86dga1.h index 4f45e74b3..972b18e9e 100644 --- a/nx-X11/include/extensions/xf86dga1.h +++ b/nx-X11/include/extensions/xf86dga1.h @@ -15,7 +15,7 @@ Copyright (c) 1995 XFree86 Inc #ifndef _XF86DGA1_H_ #define _XF86DGA1_H_ -#include +#include #define X_XF86DGAQueryVersion 0 #define X_XF86DGAGetVideoLL 1 diff --git a/nx-X11/include/extensions/xf86dgastr.h b/nx-X11/include/extensions/xf86dgastr.h index 66dd354c8..30e4ff722 100644 --- a/nx-X11/include/extensions/xf86dgastr.h +++ b/nx-X11/include/extensions/xf86dgastr.h @@ -9,7 +9,7 @@ Copyright (c) 1995 XFree86 Inc. #ifndef _XF86DGASTR_H_ #define _XF86DGASTR_H_ -#include +#include #define XF86DGANAME "XFree86-DGA" diff --git a/nx-X11/include/extensions/xf86misc.h b/nx-X11/include/extensions/xf86misc.h index f5d7a5664..fb01a6357 100644 --- a/nx-X11/include/extensions/xf86misc.h +++ b/nx-X11/include/extensions/xf86misc.h @@ -9,7 +9,7 @@ #ifndef _XF86MISC_H_ #define _XF86MISC_H_ -#include +#include #define X_XF86MiscQueryVersion 0 #ifdef _XF86MISC_SAVER_COMPAT_ diff --git a/nx-X11/include/extensions/xf86mscstr.h b/nx-X11/include/extensions/xf86mscstr.h index 637d3a5a0..2b8c0d07e 100644 --- a/nx-X11/include/extensions/xf86mscstr.h +++ b/nx-X11/include/extensions/xf86mscstr.h @@ -9,7 +9,7 @@ #ifndef _XF86MISCSTR_H_ #define _XF86MISCSTR_H_ -#include +#include #define XF86MISCNAME "XFree86-Misc" diff --git a/nx-X11/include/extensions/xf86vmode.h b/nx-X11/include/extensions/xf86vmode.h index 3420ae4c8..624820dea 100644 --- a/nx-X11/include/extensions/xf86vmode.h +++ b/nx-X11/include/extensions/xf86vmode.h @@ -35,8 +35,8 @@ from Kaleb S. KEITHLEY #ifndef _XF86VIDMODE_H_ #define _XF86VIDMODE_H_ -#include -#include +#include +#include #define X_XF86VidModeQueryVersion 0 #define X_XF86VidModeGetModeLine 1 diff --git a/nx-X11/include/extensions/xf86vmstr.h b/nx-X11/include/extensions/xf86vmstr.h index a80eb8eb6..43c67980f 100644 --- a/nx-X11/include/extensions/xf86vmstr.h +++ b/nx-X11/include/extensions/xf86vmstr.h @@ -35,7 +35,7 @@ from Kaleb S. KEITHLEY #ifndef _XF86VIDMODESTR_H_ #define _XF86VIDMODESTR_H_ -#include +#include #define XF86VIDMODENAME "XFree86-VidModeExtension" diff --git a/nx-X11/include/extensions/xfixesproto.h b/nx-X11/include/extensions/xfixesproto.h index 773bc65d1..0ef6a2fd6 100644 --- a/nx-X11/include/extensions/xfixesproto.h +++ b/nx-X11/include/extensions/xfixesproto.h @@ -25,10 +25,10 @@ #ifndef _XFIXESPROTO_H_ #define _XFIXESPROTO_H_ -#include -#include +#include +#include #define _SHAPE_SERVER_ -#include +#include #undef _SHAPE_SERVER_ #define Window CARD32 diff --git a/nx-X11/include/extensions/xtrapddmi.h b/nx-X11/include/extensions/xtrapddmi.h index c187a3a0b..71df0712d 100644 --- a/nx-X11/include/extensions/xtrapddmi.h +++ b/nx-X11/include/extensions/xtrapddmi.h @@ -42,8 +42,8 @@ SOFTWARE. * contained herein should *not* be visible to clients (xtrapdi.h * is used for this). The name is historical. */ -#include -#include +#include +#include #include "dix.h" #ifndef MIN diff --git a/nx-X11/include/extensions/xtrapdi.h b/nx-X11/include/extensions/xtrapdi.h index 9db13bb20..34696113d 100644 --- a/nx-X11/include/extensions/xtrapdi.h +++ b/nx-X11/include/extensions/xtrapdi.h @@ -48,14 +48,14 @@ SOFTWARE. #ifndef IN_MODULE #include #endif -#include -#include +#include +#include #ifdef SMT #define NEED_EVENTS #define NEED_REPLIES #endif -#include -#include +#include +#include #define XTrapExtName "DEC-XTRAP" /* Current Release, Version, and Revision of the XTrap Extension */ #define XETrapRelease 3L diff --git a/nx-X11/include/extensions/xtrapemacros.h b/nx-X11/include/extensions/xtrapemacros.h index f59ea3391..f5dc2be31 100644 --- a/nx-X11/include/extensions/xtrapemacros.h +++ b/nx-X11/include/extensions/xtrapemacros.h @@ -43,7 +43,7 @@ SOFTWARE. * specified; however, use of Trap Context convenience * routines is strongly encouraged (XETrapContext.c) */ -#include +#include #include /* msleep macro to replace msleep() for portability reasons */ diff --git a/nx-X11/include/extensions/xtraplib.h b/nx-X11/include/extensions/xtraplib.h index f3f273aab..b733dac7f 100644 --- a/nx-X11/include/extensions/xtraplib.h +++ b/nx-X11/include/extensions/xtraplib.h @@ -47,10 +47,10 @@ SOFTWARE. #define NEED_EVENTS #define NEED_REPLIES #endif -#include -#include -#include -#include +#include +#include +#include +#include typedef struct /* Callback structure */ { diff --git a/nx-X11/include/keysym.h b/nx-X11/include/keysym.h index 785fed32e..cd518a792 100644 --- a/nx-X11/include/keysym.h +++ b/nx-X11/include/keysym.h @@ -71,5 +71,5 @@ SOFTWARE. #define XK_CURRENCY #define XK_MATHEMATICAL -#include +#include diff --git a/nx-X11/lib/X11/ClDisplay.c b/nx-X11/lib/X11/ClDisplay.c index b7a58751e..dfbc2f518 100644 --- a/nx-X11/lib/X11/ClDisplay.c +++ b/nx-X11/lib/X11/ClDisplay.c @@ -32,7 +32,7 @@ from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include +#include #include "Xlib.h" #include "Xlibint.h" #include "Xintconn.h" diff --git a/nx-X11/lib/X11/ConnDis.c b/nx-X11/lib/X11/ConnDis.c index 30146a9f1..177ff2c59 100644 --- a/nx-X11/lib/X11/ConnDis.c +++ b/nx-X11/lib/X11/ConnDis.c @@ -54,9 +54,9 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include +#include +#include +#include #include #include #include @@ -68,7 +68,7 @@ in this Software without prior written authorization from The Open Group. #include #endif #else -#include +#include #endif #ifndef X_CONNECTION_RETRIES /* number retries on ECONNREFUSED */ diff --git a/nx-X11/lib/X11/ErrDes.c b/nx-X11/lib/X11/ErrDes.c index 16183e85e..64373ffd0 100644 --- a/nx-X11/lib/X11/ErrDes.c +++ b/nx-X11/lib/X11/ErrDes.c @@ -55,7 +55,7 @@ SOFTWARE. #include #endif #include "Xlibint.h" -#include +#include #include "Xresource.h" #include diff --git a/nx-X11/lib/X11/FSWrap.c b/nx-X11/lib/X11/FSWrap.c index d40f3b035..77dd3b59c 100644 --- a/nx-X11/lib/X11/FSWrap.c +++ b/nx-X11/lib/X11/FSWrap.c @@ -64,7 +64,7 @@ from The Open Group. #include "Xlibint.h" #include "Xlcint.h" #include -#include +#include #define XMAXLIST 256 diff --git a/nx-X11/lib/X11/FetchName.c b/nx-X11/lib/X11/FetchName.c index 3d41472f3..216c7453d 100644 --- a/nx-X11/lib/X11/FetchName.c +++ b/nx-X11/lib/X11/FetchName.c @@ -28,9 +28,9 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include +#include +#include +#include #include diff --git a/nx-X11/lib/X11/Font.c b/nx-X11/lib/X11/Font.c index 92a6a8f4a..8c8d1e443 100644 --- a/nx-X11/lib/X11/Font.c +++ b/nx-X11/lib/X11/Font.c @@ -47,7 +47,7 @@ authorization from the X Consortium and the XFree86 Project. #include #include -#include +#include #endif #include "Xlcint.h" diff --git a/nx-X11/lib/X11/GetDflt.c b/nx-X11/lib/X11/GetDflt.c index 8a8563379..a881f1c28 100644 --- a/nx-X11/lib/X11/GetDflt.c +++ b/nx-X11/lib/X11/GetDflt.c @@ -52,8 +52,8 @@ SOFTWARE. #include #endif #include "Xlibint.h" -#include -#include +#include +#include #ifndef X_NOT_POSIX #ifdef _POSIX_SOURCE @@ -80,12 +80,12 @@ SOFTWARE. #endif #ifdef XTHREADS -#include +#include #endif #ifndef WIN32 #define X_INCLUDE_PWD_H #define XOS_USE_XLIB_LOCKING -#include +#include #endif #include #include diff --git a/nx-X11/lib/X11/GetHints.c b/nx-X11/lib/X11/GetHints.c index 4faccb624..2c4d49d61 100644 --- a/nx-X11/lib/X11/GetHints.c +++ b/nx-X11/lib/X11/GetHints.c @@ -51,11 +51,11 @@ SOFTWARE. #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include +#include +#include +#include #include "Xatomtype.h" -#include +#include #include Status XGetSizeHints (dpy, w, hints, property) diff --git a/nx-X11/lib/X11/GetImage.c b/nx-X11/lib/X11/GetImage.c index ffe9d226f..634910d79 100644 --- a/nx-X11/lib/X11/GetImage.c +++ b/nx-X11/lib/X11/GetImage.c @@ -31,7 +31,7 @@ in this Software without prior written authorization from The Open Group. #include #endif #include "Xlibint.h" -#include /* for XDestroyImage */ +#include /* for XDestroyImage */ #include "ImUtil.h" #define ROUNDUP(nbytes, pad) (((((nbytes) - 1) + (pad)) / (pad)) * (pad)) diff --git a/nx-X11/lib/X11/GetNrmHint.c b/nx-X11/lib/X11/GetNrmHint.c index 9dcb7c403..c770df43d 100644 --- a/nx-X11/lib/X11/GetNrmHint.c +++ b/nx-X11/lib/X11/GetNrmHint.c @@ -55,10 +55,10 @@ from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #include "Xatomtype.h" -#include +#include #include Status XGetWMSizeHints (dpy, w, hints, supplied, property) diff --git a/nx-X11/lib/X11/GetRGBCMap.c b/nx-X11/lib/X11/GetRGBCMap.c index 6657c539a..4df3ccced 100644 --- a/nx-X11/lib/X11/GetRGBCMap.c +++ b/nx-X11/lib/X11/GetRGBCMap.c @@ -31,10 +31,10 @@ from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #include "Xatomtype.h" -#include +#include Status XGetRGBColormaps (dpy, w, stdcmap, count, property) Display *dpy; diff --git a/nx-X11/lib/X11/GetStCmap.c b/nx-X11/lib/X11/GetStCmap.c index 5c8c37e78..ae085aa87 100644 --- a/nx-X11/lib/X11/GetStCmap.c +++ b/nx-X11/lib/X11/GetStCmap.c @@ -50,10 +50,10 @@ SOFTWARE. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #include "Xatomtype.h" -#include +#include /* * WARNING diff --git a/nx-X11/lib/X11/GetTxtProp.c b/nx-X11/lib/X11/GetTxtProp.c index 0d4474253..dbff8abc8 100644 --- a/nx-X11/lib/X11/GetTxtProp.c +++ b/nx-X11/lib/X11/GetTxtProp.c @@ -52,10 +52,10 @@ from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include -#include +#include +#include +#include +#include #include Status XGetTextProperty (display, window, tp, property) diff --git a/nx-X11/lib/X11/GetWMCMapW.c b/nx-X11/lib/X11/GetWMCMapW.c index 6d5c73c85..496efd208 100644 --- a/nx-X11/lib/X11/GetWMCMapW.c +++ b/nx-X11/lib/X11/GetWMCMapW.c @@ -51,7 +51,7 @@ SOFTWARE. #include #endif #include "Xlibint.h" -#include +#include #include Status XGetWMColormapWindows (dpy, w, colormapWindows, countReturn) diff --git a/nx-X11/lib/X11/GetWMProto.c b/nx-X11/lib/X11/GetWMProto.c index 9b244ce6a..8584a4214 100644 --- a/nx-X11/lib/X11/GetWMProto.c +++ b/nx-X11/lib/X11/GetWMProto.c @@ -51,7 +51,7 @@ SOFTWARE. #include #endif #include "Xlibint.h" -#include +#include #include Status XGetWMProtocols (dpy, w, protocols, countReturn) diff --git a/nx-X11/lib/X11/HVC.c b/nx-X11/lib/X11/HVC.c index 79241fb7a..84fac58b9 100644 --- a/nx-X11/lib/X11/HVC.c +++ b/nx-X11/lib/X11/HVC.c @@ -55,7 +55,7 @@ #endif #include "Xlibint.h" #include "Xcmsint.h" -#include +#include #include #include "Cv.h" diff --git a/nx-X11/lib/X11/Iconify.c b/nx-X11/lib/X11/Iconify.c index 62e57b84e..e68508666 100644 --- a/nx-X11/lib/X11/Iconify.c +++ b/nx-X11/lib/X11/Iconify.c @@ -54,10 +54,10 @@ from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include -#include +#include +#include +#include +#include #include /* diff --git a/nx-X11/lib/X11/ImUtil.c b/nx-X11/lib/X11/ImUtil.c index 85f4183f4..2be839928 100644 --- a/nx-X11/lib/X11/ImUtil.c +++ b/nx-X11/lib/X11/ImUtil.c @@ -29,8 +29,8 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #include #include "ImUtil.h" diff --git a/nx-X11/lib/X11/Imakefile b/nx-X11/lib/X11/Imakefile index 212216f46..81a1cfd3d 100644 --- a/nx-X11/lib/X11/Imakefile +++ b/nx-X11/lib/X11/Imakefile @@ -85,7 +85,7 @@ NX_XCOMPEXTCONFIGTARGET = $(NX_XCOMPEXTLIBDIR)/config.status #define LibName NX_X11 #define SoRev SOXLIBREV #define HugeLibrary YES -#define IncSubdir X11 +#define IncSubdir nx-X11 #if BuildLoadableXlibI18n SUBDIRS = xlibi18n diff --git a/nx-X11/lib/X11/InitExt.c b/nx-X11/lib/X11/InitExt.c index 67c865787..5aab682c7 100644 --- a/nx-X11/lib/X11/InitExt.c +++ b/nx-X11/lib/X11/InitExt.c @@ -31,8 +31,8 @@ from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #include /* diff --git a/nx-X11/lib/X11/KeyBind.c b/nx-X11/lib/X11/KeyBind.c index fab9eeacd..d99cfdf2f 100644 --- a/nx-X11/lib/X11/KeyBind.c +++ b/nx-X11/lib/X11/KeyBind.c @@ -32,8 +32,8 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #define XK_MISCELLANY #define XK_LATIN1 #define XK_LATIN2 @@ -47,7 +47,7 @@ in this Software without prior written authorization from The Open Group. #define XK_CAUCASUS #define XK_VIETNAMESE #define XK_XKB_KEYS -#include +#include #include #ifdef USE_OWN_COMPOSE diff --git a/nx-X11/lib/X11/KeysymStr.c b/nx-X11/lib/X11/KeysymStr.c index 59aa3f32c..b43e2735a 100644 --- a/nx-X11/lib/X11/KeysymStr.c +++ b/nx-X11/lib/X11/KeysymStr.c @@ -31,8 +31,8 @@ in this Software without prior written authorization from The Open Group. #include #endif #include "Xlibint.h" -#include -#include +#include +#include #include /* sprintf */ diff --git a/nx-X11/lib/X11/LRGB.c b/nx-X11/lib/X11/LRGB.c index e4bc0b500..392c59579 100644 --- a/nx-X11/lib/X11/LRGB.c +++ b/nx-X11/lib/X11/LRGB.c @@ -41,8 +41,8 @@ #include #endif #include -#include -#include +#include +#include #include "Xlibint.h" #include "Xcmsint.h" #include "Cv.h" diff --git a/nx-X11/lib/X11/Lab.c b/nx-X11/lib/X11/Lab.c index 596c137f8..19b3e3a1d 100644 --- a/nx-X11/lib/X11/Lab.c +++ b/nx-X11/lib/X11/Lab.c @@ -42,7 +42,7 @@ #ifdef HAVE_CONFIG_H #include #endif -#include +#include #include /* sscanf */ #include "Xlibint.h" #include "Xcmsint.h" diff --git a/nx-X11/lib/X11/Luv.c b/nx-X11/lib/X11/Luv.c index ec94c9e56..206ae1017 100644 --- a/nx-X11/lib/X11/Luv.c +++ b/nx-X11/lib/X11/Luv.c @@ -43,7 +43,7 @@ #ifdef HAVE_CONFIG_H #include #endif -#include +#include #include "Xlibint.h" #include "Xcmsint.h" #include "Cv.h" diff --git a/nx-X11/lib/X11/OpenDis.c b/nx-X11/lib/X11/OpenDis.c index e9d019723..67f7ccbd1 100644 --- a/nx-X11/lib/X11/OpenDis.c +++ b/nx-X11/lib/X11/OpenDis.c @@ -50,10 +50,10 @@ in this Software without prior written authorization from The Open Group. #include #endif #include "Xlibint.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include "Xintconn.h" diff --git a/nx-X11/lib/X11/ParseCmd.c b/nx-X11/lib/X11/ParseCmd.c index ddcbf7846..fe20f6eff 100644 --- a/nx-X11/lib/X11/ParseCmd.c +++ b/nx-X11/lib/X11/ParseCmd.c @@ -61,7 +61,7 @@ SOFTWARE. #include #endif #include "Xlibint.h" -#include +#include #include diff --git a/nx-X11/lib/X11/PolyReg.c b/nx-X11/lib/X11/PolyReg.c index 4b17ec5c5..6e1f7ead8 100644 --- a/nx-X11/lib/X11/PolyReg.c +++ b/nx-X11/lib/X11/PolyReg.c @@ -55,7 +55,7 @@ SOFTWARE. #endif #include "Xlibint.h" #include "Xutil.h" -#include +#include #include "poly.h" /* diff --git a/nx-X11/lib/X11/Quarks.c b/nx-X11/lib/X11/Quarks.c index d47bce314..a49562aac 100644 --- a/nx-X11/lib/X11/Quarks.c +++ b/nx-X11/lib/X11/Quarks.c @@ -55,7 +55,7 @@ from The Open Group. #include #endif #include "Xlibint.h" -#include +#include #include "Xresinternal.h" /* Not cost effective, at least for vanilla MIT clients */ diff --git a/nx-X11/lib/X11/RdBitF.c b/nx-X11/lib/X11/RdBitF.c index 198e0e4a5..97afcc493 100644 --- a/nx-X11/lib/X11/RdBitF.c +++ b/nx-X11/lib/X11/RdBitF.c @@ -47,7 +47,7 @@ from The Open Group. #include #endif #include "Xlibint.h" -#include +#include #include "Xutil.h" #include #include diff --git a/nx-X11/lib/X11/Region.c b/nx-X11/lib/X11/Region.c index cdd223b25..bef46def0 100644 --- a/nx-X11/lib/X11/Region.c +++ b/nx-X11/lib/X11/Region.c @@ -77,7 +77,7 @@ SOFTWARE. #endif #include "Xlibint.h" #include "Xutil.h" -#include +#include #include "poly.h" #ifdef DEBUG diff --git a/nx-X11/lib/X11/ScrResStr.c b/nx-X11/lib/X11/ScrResStr.c index 89f771784..7feb3b388 100644 --- a/nx-X11/lib/X11/ScrResStr.c +++ b/nx-X11/lib/X11/ScrResStr.c @@ -29,7 +29,7 @@ in this Software without prior written authorization from The Open Group. #include #endif #include "Xlibint.h" -#include +#include char *XScreenResourceString(screen) Screen *screen; diff --git a/nx-X11/lib/X11/SetHints.c b/nx-X11/lib/X11/SetHints.c index 5ee34435d..27b1bedbc 100644 --- a/nx-X11/lib/X11/SetHints.c +++ b/nx-X11/lib/X11/SetHints.c @@ -51,11 +51,11 @@ SOFTWARE. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #include "Xatomtype.h" -#include -#include +#include +#include #define safestrlen(s) ((s) ? strlen(s) : 0) diff --git a/nx-X11/lib/X11/SetLocale.c b/nx-X11/lib/X11/SetLocale.c index bb4f850e3..875718dca 100644 --- a/nx-X11/lib/X11/SetLocale.c +++ b/nx-X11/lib/X11/SetLocale.c @@ -63,8 +63,8 @@ from The Open Group. #endif #include "Xlibint.h" #include "Xlcint.h" -#include -#include +#include +#include #include "XlcPubI.h" #define MAXLOCALE 64 /* buffer size of locale name */ diff --git a/nx-X11/lib/X11/SetNrmHint.c b/nx-X11/lib/X11/SetNrmHint.c index 64b0ef7f3..e8e6daf31 100644 --- a/nx-X11/lib/X11/SetNrmHint.c +++ b/nx-X11/lib/X11/SetNrmHint.c @@ -54,11 +54,11 @@ from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #include "Xatomtype.h" -#include -#include +#include +#include void XSetWMSizeHints (dpy, w, hints, prop) Display *dpy; diff --git a/nx-X11/lib/X11/SetRGBCMap.c b/nx-X11/lib/X11/SetRGBCMap.c index 4be840b75..03aa9392c 100644 --- a/nx-X11/lib/X11/SetRGBCMap.c +++ b/nx-X11/lib/X11/SetRGBCMap.c @@ -31,10 +31,10 @@ from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #include "Xatomtype.h" -#include +#include void XSetRGBColormaps (dpy, w, cmaps, count, property) Display *dpy; diff --git a/nx-X11/lib/X11/SetStCmap.c b/nx-X11/lib/X11/SetStCmap.c index b5a93e36e..521b9480d 100644 --- a/nx-X11/lib/X11/SetStCmap.c +++ b/nx-X11/lib/X11/SetStCmap.c @@ -50,10 +50,10 @@ SOFTWARE. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #include "Xatomtype.h" -#include +#include /* * WARNING diff --git a/nx-X11/lib/X11/SetTxtProp.c b/nx-X11/lib/X11/SetTxtProp.c index a82d9b3e3..ae8b81e29 100644 --- a/nx-X11/lib/X11/SetTxtProp.c +++ b/nx-X11/lib/X11/SetTxtProp.c @@ -52,10 +52,10 @@ from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include -#include +#include +#include +#include +#include #include void XSetTextProperty (dpy, w, tp, property) diff --git a/nx-X11/lib/X11/SetWMCMapW.c b/nx-X11/lib/X11/SetWMCMapW.c index dd88061da..6774d7326 100644 --- a/nx-X11/lib/X11/SetWMCMapW.c +++ b/nx-X11/lib/X11/SetWMCMapW.c @@ -51,7 +51,7 @@ SOFTWARE. #include #endif #include "Xlibint.h" -#include +#include /* * XSetWMProtocols sets the property diff --git a/nx-X11/lib/X11/SetWMProto.c b/nx-X11/lib/X11/SetWMProto.c index 8640e5060..bc7dcf63c 100644 --- a/nx-X11/lib/X11/SetWMProto.c +++ b/nx-X11/lib/X11/SetWMProto.c @@ -51,7 +51,7 @@ SOFTWARE. #include #endif #include "Xlibint.h" -#include +#include /* * XSetWMProtocols sets the property diff --git a/nx-X11/lib/X11/StBytes.c b/nx-X11/lib/X11/StBytes.c index b23902581..676652678 100644 --- a/nx-X11/lib/X11/StBytes.c +++ b/nx-X11/lib/X11/StBytes.c @@ -29,8 +29,8 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include /* insulate predefined atom numbers from cut routines */ static Atom n_to_atom[8] = { diff --git a/nx-X11/lib/X11/StName.c b/nx-X11/lib/X11/StName.c index ba01ffb0c..d3053346c 100644 --- a/nx-X11/lib/X11/StName.c +++ b/nx-X11/lib/X11/StName.c @@ -29,8 +29,8 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include int XStoreName ( diff --git a/nx-X11/lib/X11/StrKeysym.c b/nx-X11/lib/X11/StrKeysym.c index 74ccecbcd..fc1e7a34d 100644 --- a/nx-X11/lib/X11/StrKeysym.c +++ b/nx-X11/lib/X11/StrKeysym.c @@ -30,8 +30,8 @@ in this Software without prior written authorization from The Open Group. #include #endif #include "Xlibint.h" -#include -#include +#include +#include #include "Xresinternal.h" #define NEEDKTABLE diff --git a/nx-X11/lib/X11/StrToText.c b/nx-X11/lib/X11/StrToText.c index ba894e16f..5fd9c6ec6 100644 --- a/nx-X11/lib/X11/StrToText.c +++ b/nx-X11/lib/X11/StrToText.c @@ -28,9 +28,9 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include +#include +#include +#include /* * XStringListToTextProperty - fill in TextProperty structure with diff --git a/nx-X11/lib/X11/TextToStr.c b/nx-X11/lib/X11/TextToStr.c index 0bea8096d..f4c00adcf 100644 --- a/nx-X11/lib/X11/TextToStr.c +++ b/nx-X11/lib/X11/TextToStr.c @@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include +#include +#include +#include /* diff --git a/nx-X11/lib/X11/WMProps.c b/nx-X11/lib/X11/WMProps.c index 62c6a8d12..7a390a9d7 100644 --- a/nx-X11/lib/X11/WMProps.c +++ b/nx-X11/lib/X11/WMProps.c @@ -55,11 +55,11 @@ SOFTWARE. #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include /* diff --git a/nx-X11/lib/X11/Withdraw.c b/nx-X11/lib/X11/Withdraw.c index 1b771c286..2037b8e46 100644 --- a/nx-X11/lib/X11/Withdraw.c +++ b/nx-X11/lib/X11/Withdraw.c @@ -54,10 +54,10 @@ from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include -#include +#include +#include +#include +#include #include /* diff --git a/nx-X11/lib/X11/WrBitF.c b/nx-X11/lib/X11/WrBitF.c index d8c9f18fa..d48295f0b 100644 --- a/nx-X11/lib/X11/WrBitF.c +++ b/nx-X11/lib/X11/WrBitF.c @@ -32,7 +32,7 @@ from The Open Group. #include #endif #include "Xlibint.h" -#include +#include #include "Xutil.h" #include diff --git a/nx-X11/lib/X11/XDefaultOMIF.c b/nx-X11/lib/X11/XDefaultOMIF.c index 13f0d9cff..b4e63091b 100644 --- a/nx-X11/lib/X11/XDefaultOMIF.c +++ b/nx-X11/lib/X11/XDefaultOMIF.c @@ -49,8 +49,8 @@ Sun Microsystems, Inc. or its licensors is granted. #include "Xlibint.h" #include "Xlcint.h" #include "XlcPublic.h" -#include -#include +#include +#include #include #define MAXFONTS 100 diff --git a/nx-X11/lib/X11/XKB.c b/nx-X11/lib/X11/XKB.c index ecc5ddf0a..413a51eb6 100644 --- a/nx-X11/lib/X11/XKB.c +++ b/nx-X11/lib/X11/XKB.c @@ -33,7 +33,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define NEED_REPLIES #define NEED_EVENTS #include "Xlibint.h" -#include +#include #include "XKBlibint.h" XkbInternAtomFunc _XkbInternAtomFunc= XInternAtom; diff --git a/nx-X11/lib/X11/XKBAlloc.c b/nx-X11/lib/X11/XKBAlloc.c index 9430ac0ed..131985444 100644 --- a/nx-X11/lib/X11/XKBAlloc.c +++ b/nx-X11/lib/X11/XKBAlloc.c @@ -39,21 +39,21 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define NEED_EVENTS #include "Xlibint.h" #include "XKBlibint.h" -#include -#include +#include +#include #include "XKBlibint.h" #else #include -#include +#include #define NEED_EVENTS #define NEED_REPLIES -#include +#include #include "misc.h" #include "inputstr.h" -#include -#include +#include +#include #endif /* XKB_IN_SERVER */ diff --git a/nx-X11/lib/X11/XKBBell.c b/nx-X11/lib/X11/XKBBell.c index 6ea30855e..51869097e 100644 --- a/nx-X11/lib/X11/XKBBell.c +++ b/nx-X11/lib/X11/XKBBell.c @@ -33,7 +33,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define NEED_REPLIES #define NEED_EVENTS #include "Xlibint.h" -#include +#include #include "XKBlibint.h" diff --git a/nx-X11/lib/X11/XKBBind.c b/nx-X11/lib/X11/XKBBind.c index e190d0052..6c1864d41 100644 --- a/nx-X11/lib/X11/XKBBind.c +++ b/nx-X11/lib/X11/XKBBind.c @@ -35,13 +35,13 @@ from The Open Group. #include #endif #include "XKBlib.h" -#include -#include -#include +#include +#include +#include #include #include -#include +#include #include "XKBlibint.h" #ifdef USE_OWN_COMPOSE diff --git a/nx-X11/lib/X11/XKBCompat.c b/nx-X11/lib/X11/XKBCompat.c index 5886e4d26..b16e6b083 100644 --- a/nx-X11/lib/X11/XKBCompat.c +++ b/nx-X11/lib/X11/XKBCompat.c @@ -34,7 +34,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define NEED_EVENTS #define NEED_MAP_READERS #include "Xlibint.h" -#include +#include #include "XKBlibint.h" Status diff --git a/nx-X11/lib/X11/XKBCtrls.c b/nx-X11/lib/X11/XKBCtrls.c index 0ea131aa0..f3a09a124 100644 --- a/nx-X11/lib/X11/XKBCtrls.c +++ b/nx-X11/lib/X11/XKBCtrls.c @@ -33,7 +33,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define NEED_REPLIES #define NEED_EVENTS #include "Xlibint.h" -#include +#include #include "XKBlibint.h" diff --git a/nx-X11/lib/X11/XKBCvt.c b/nx-X11/lib/X11/XKBCvt.c index 1bdf81cd4..2d58ca990 100644 --- a/nx-X11/lib/X11/XKBCvt.c +++ b/nx-X11/lib/X11/XKBCvt.c @@ -35,23 +35,23 @@ from The Open Group. #include #include -#include -#include +#include +#include #define NEED_EVENTS #include "Xlibint.h" #include "Xlcint.h" #include "XlcPubI.h" #include "Ximint.h" -#include -#include +#include +#include #define XK_LATIN1 #define XK_PUBLISHING -#include -#include +#include +#include #include "XKBlibint.h" -#include +#include #include -#include +#include #ifdef __sgi_not_xconsortium #define XKB_EXTEND_LOOKUP_STRING diff --git a/nx-X11/lib/X11/XKBExtDev.c b/nx-X11/lib/X11/XKBExtDev.c index 34558e476..0510b7f55 100644 --- a/nx-X11/lib/X11/XKBExtDev.c +++ b/nx-X11/lib/X11/XKBExtDev.c @@ -34,9 +34,9 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define NEED_EVENTS #define NEED_MAP_READERS #include "Xlibint.h" -#include +#include #include "XKBlibint.h" -#include +#include /***====================================================================***/ diff --git a/nx-X11/lib/X11/XKBGAlloc.c b/nx-X11/lib/X11/XKBGAlloc.c index fddb770b6..eb74cbfd0 100644 --- a/nx-X11/lib/X11/XKBGAlloc.c +++ b/nx-X11/lib/X11/XKBGAlloc.c @@ -40,18 +40,18 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include "Xlibint.h" #include "XKBlibint.h" -#include -#include +#include +#include #else #include -#include -#include +#include +#include #include "misc.h" #include "inputstr.h" -#include -#include +#include +#include #endif /* XKB_IN_SERVER */ diff --git a/nx-X11/lib/X11/XKBGeom.c b/nx-X11/lib/X11/XKBGeom.c index 061175489..d225342a7 100644 --- a/nx-X11/lib/X11/XKBGeom.c +++ b/nx-X11/lib/X11/XKBGeom.c @@ -37,8 +37,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define NEED_REPLIES #define NEED_MAP_READERS #include "Xlibint.h" -#include -#include +#include +#include #include "XKBlibint.h" #ifndef MINSHORT diff --git a/nx-X11/lib/X11/XKBGetByName.c b/nx-X11/lib/X11/XKBGetByName.c index 2c6ff0849..87f405e50 100644 --- a/nx-X11/lib/X11/XKBGetByName.c +++ b/nx-X11/lib/X11/XKBGetByName.c @@ -33,7 +33,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #endif #include "Xlibint.h" -#include +#include #include "XKBlibint.h" /***====================================================================***/ diff --git a/nx-X11/lib/X11/XKBGetMap.c b/nx-X11/lib/X11/XKBGetMap.c index 2b9fb97f4..5f37f9571 100644 --- a/nx-X11/lib/X11/XKBGetMap.c +++ b/nx-X11/lib/X11/XKBGetMap.c @@ -34,7 +34,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #endif #include "Xlibint.h" -#include +#include #include "XKBlibint.h" static Status diff --git a/nx-X11/lib/X11/XKBList.c b/nx-X11/lib/X11/XKBList.c index 2f4a53490..ef265fdde 100644 --- a/nx-X11/lib/X11/XKBList.c +++ b/nx-X11/lib/X11/XKBList.c @@ -33,7 +33,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #endif #include "Xlibint.h" -#include +#include #include "XKBlibint.h" /***====================================================================***/ diff --git a/nx-X11/lib/X11/XKBMAlloc.c b/nx-X11/lib/X11/XKBMAlloc.c index d57d9a58d..31255091f 100644 --- a/nx-X11/lib/X11/XKBMAlloc.c +++ b/nx-X11/lib/X11/XKBMAlloc.c @@ -38,22 +38,22 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define NEED_REPLIES #define NEED_EVENTS #include "Xlibint.h" -#include -#include +#include +#include #include "XKBlibint.h" #else #include -#include +#include #define NEED_EVENTS #define NEED_REPLIES -#include +#include #include "misc.h" #include "inputstr.h" -#include +#include #define XKBSRV_NEED_FILE_FUNCS -#include +#include #endif /* XKB_IN_SERVER */ diff --git a/nx-X11/lib/X11/XKBMisc.c b/nx-X11/lib/X11/XKBMisc.c index 09f361c19..04ac0c7ea 100644 --- a/nx-X11/lib/X11/XKBMisc.c +++ b/nx-X11/lib/X11/XKBMisc.c @@ -38,22 +38,22 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define NEED_REPLIES #define NEED_EVENTS #include "Xlibint.h" -#include -#include +#include +#include #include "XKBlibint.h" #else #include -#include +#include #define NEED_EVENTS #define NEED_REPLIES -#include +#include #include "misc.h" #include "inputstr.h" -#include +#include #define XKBSRV_NEED_FILE_FUNCS -#include +#include #endif /* XKB_IN_SERVER */ diff --git a/nx-X11/lib/X11/XKBNames.c b/nx-X11/lib/X11/XKBNames.c index 8483187c3..0bcd42b3d 100644 --- a/nx-X11/lib/X11/XKBNames.c +++ b/nx-X11/lib/X11/XKBNames.c @@ -33,7 +33,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #endif #include "Xlibint.h" -#include +#include #include "XKBlibint.h" diff --git a/nx-X11/lib/X11/XKBRdBuf.c b/nx-X11/lib/X11/XKBRdBuf.c index d0b7045d6..109618dd2 100644 --- a/nx-X11/lib/X11/XKBRdBuf.c +++ b/nx-X11/lib/X11/XKBRdBuf.c @@ -34,7 +34,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define NEED_EVENTS #include "Xlibint.h" #include "XKBlibint.h" -#include +#include /***====================================================================***/ diff --git a/nx-X11/lib/X11/XKBSetGeom.c b/nx-X11/lib/X11/XKBSetGeom.c index e27297c11..f13be8097 100644 --- a/nx-X11/lib/X11/XKBSetGeom.c +++ b/nx-X11/lib/X11/XKBSetGeom.c @@ -38,8 +38,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define NEED_REPLIES #include "Xlibint.h" #include "XKBlibint.h" -#include -#include +#include +#include #ifndef MINSHORT #define MINSHORT -32768 diff --git a/nx-X11/lib/X11/XKBSetMap.c b/nx-X11/lib/X11/XKBSetMap.c index 4a3b15c70..784a241c2 100644 --- a/nx-X11/lib/X11/XKBSetMap.c +++ b/nx-X11/lib/X11/XKBSetMap.c @@ -33,7 +33,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define NEED_REPLIES #define NEED_EVENTS #include "Xlibint.h" -#include +#include #include "XKBlibint.h" static int diff --git a/nx-X11/lib/X11/XKBUse.c b/nx-X11/lib/X11/XKBUse.c index ad18bb6fc..95fba49ac 100644 --- a/nx-X11/lib/X11/XKBUse.c +++ b/nx-X11/lib/X11/XKBUse.c @@ -34,7 +34,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define NEED_REPLIES #define NEED_EVENTS #include "Xlibint.h" -#include +#include #include "XKBlibint.h" static Bool _XkbIgnoreExtension = False; diff --git a/nx-X11/lib/X11/XKBleds.c b/nx-X11/lib/X11/XKBleds.c index 89ab2e9ec..d026d84be 100644 --- a/nx-X11/lib/X11/XKBleds.c +++ b/nx-X11/lib/X11/XKBleds.c @@ -33,7 +33,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #endif #include "Xlibint.h" -#include +#include #include "XKBlibint.h" Status diff --git a/nx-X11/lib/X11/XKBlib.h b/nx-X11/lib/X11/XKBlib.h index 6a5dc8a7c..a1ad7ccea 100644 --- a/nx-X11/lib/X11/XKBlib.h +++ b/nx-X11/lib/X11/XKBlib.h @@ -29,8 +29,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifndef _XKBLIB_H_ #define _XKBLIB_H_ -#include -#include +#include +#include typedef struct _XkbAnyEvent { int type; /* XkbAnyEvent */ diff --git a/nx-X11/lib/X11/XKBlibint.h b/nx-X11/lib/X11/XKBlibint.h index 0244e2ef3..9c6352769 100644 --- a/nx-X11/lib/X11/XKBlibint.h +++ b/nx-X11/lib/X11/XKBlibint.h @@ -29,8 +29,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifndef _XKBLIBINT_H_ #define _XKBLIBINT_H_ -#include -#include +#include +#include #define XkbMapPending (1<<0) #define XkbXlibNewKeyboard (1<<1) diff --git a/nx-X11/lib/X11/XYZ.c b/nx-X11/lib/X11/XYZ.c index f5f17f356..5408c4fbc 100644 --- a/nx-X11/lib/X11/XYZ.c +++ b/nx-X11/lib/X11/XYZ.c @@ -38,7 +38,7 @@ #ifdef HAVE_CONFIG_H #include #endif -#include +#include #include "Xlibint.h" #include "Xcmsint.h" #include "Cv.h" diff --git a/nx-X11/lib/X11/Xcms.h b/nx-X11/lib/X11/Xcms.h index 779bc52ff..8ce81556d 100644 --- a/nx-X11/lib/X11/Xcms.h +++ b/nx-X11/lib/X11/Xcms.h @@ -31,7 +31,7 @@ #ifndef _XCMS_H_ #define _XCMS_H_ -#include +#include /* * XCMS Status Values diff --git a/nx-X11/lib/X11/Xcmsint.h b/nx-X11/lib/X11/Xcmsint.h index 1bf02ba2f..6bb44bbcf 100644 --- a/nx-X11/lib/X11/Xcmsint.h +++ b/nx-X11/lib/X11/Xcmsint.h @@ -34,7 +34,7 @@ #ifndef _XCMSINT_H_ #define _XCMSINT_H_ -#include +#include /* * DEFINES diff --git a/nx-X11/lib/X11/XimThai.h b/nx-X11/lib/X11/XimThai.h index 5b2666ebf..8d08eca6b 100644 --- a/nx-X11/lib/X11/XimThai.h +++ b/nx-X11/lib/X11/XimThai.h @@ -64,7 +64,7 @@ SOFTWARE. #ifndef _XIMTHAI_H_ #define _XIMTHAI_H_ -#include +#include /* Classification of characters in TIS620 according to WTT */ diff --git a/nx-X11/lib/X11/Ximint.h b/nx-X11/lib/X11/Ximint.h index e9bdda247..afd821c68 100644 --- a/nx-X11/lib/X11/Ximint.h +++ b/nx-X11/lib/X11/Ximint.h @@ -36,7 +36,7 @@ PERFORMANCE OF THIS SOFTWARE. #define _XIMINT_H #include -#include +#include #define Public /**/ #define Private static diff --git a/nx-X11/lib/X11/Xintatom.h b/nx-X11/lib/X11/Xintatom.h index f1e13568b..756d3445b 100644 --- a/nx-X11/lib/X11/Xintatom.h +++ b/nx-X11/lib/X11/Xintatom.h @@ -3,7 +3,7 @@ #ifndef _XINTATOM_H_ #define _XINTATOM_H_ 1 -#include +#include /* IntAtom.c */ diff --git a/nx-X11/lib/X11/Xintconn.h b/nx-X11/lib/X11/Xintconn.h index edea98302..ea272833a 100644 --- a/nx-X11/lib/X11/Xintconn.h +++ b/nx-X11/lib/X11/Xintconn.h @@ -3,7 +3,7 @@ #ifndef _XINTCONN_H_ #define _XINTCONN_H_ 1 -#include +#include _XFUNCPROTOBEGIN diff --git a/nx-X11/lib/X11/Xlcint.h b/nx-X11/lib/X11/Xlcint.h index fcc3a65f2..5a52cd36c 100644 --- a/nx-X11/lib/X11/Xlcint.h +++ b/nx-X11/lib/X11/Xlcint.h @@ -74,8 +74,8 @@ from The Open Group. #ifndef _XP_PRINT_SERVER_ -#include -#include +#include +#include #include typedef Bool (*XFilterEventProc)( diff --git a/nx-X11/lib/X11/Xlib.h b/nx-X11/lib/X11/Xlib.h index 8ce7fb577..d4cecc7b5 100644 --- a/nx-X11/lib/X11/Xlib.h +++ b/nx-X11/lib/X11/Xlib.h @@ -57,11 +57,11 @@ in this Software without prior written authorization from The Open Group. #include #endif -#include +#include /* applications should not depend on these two headers being included! */ -#include -#include +#include +#include #ifndef X_WCHAR #ifdef X_NOT_STDC_ENV diff --git a/nx-X11/lib/X11/XlibAsync.c b/nx-X11/lib/X11/XlibAsync.c index 81403ebc9..832371782 100644 --- a/nx-X11/lib/X11/XlibAsync.c +++ b/nx-X11/lib/X11/XlibAsync.c @@ -48,8 +48,8 @@ from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include /*ARGSUSED*/ Bool diff --git a/nx-X11/lib/X11/XlibInt.c b/nx-X11/lib/X11/XlibInt.c index 0514470dd..0aa890bbb 100644 --- a/nx-X11/lib/X11/XlibInt.c +++ b/nx-X11/lib/X11/XlibInt.c @@ -60,9 +60,9 @@ from The Open Group. #include #endif #include "Xlibint.h" -#include -#include -#include +#include +#include +#include #include #ifdef WIN32 #include diff --git a/nx-X11/lib/X11/Xlibint.h b/nx-X11/lib/X11/Xlibint.h index bcd42b52b..854b64b22 100644 --- a/nx-X11/lib/X11/Xlibint.h +++ b/nx-X11/lib/X11/Xlibint.h @@ -58,9 +58,9 @@ from The Open Group. * Warning, there be dragons here.... */ -#include -#include /* to declare xEvent */ -#include /* for configured options like XTHREADS */ +#include +#include /* to declare xEvent */ +#include /* for configured options like XTHREADS */ #ifdef NX_TRANS_SOCKET @@ -233,14 +233,14 @@ typedef struct _XSQEvent #define NEED_EVENTS #define NEED_REPLIES -#include +#include #ifdef __sgi #define _SGI_MP_SOURCE /* turn this on to get MP safe errno */ #endif #include #define _XBCOPYFUNC _Xbcopy -#include -#include +#include +#include /* Utek leaves kernel macros around in include files (bleah) */ #ifdef dirty @@ -250,7 +250,7 @@ typedef struct _XSQEvent #include #include -#include +#include _XFUNCPROTOBEGIN diff --git a/nx-X11/lib/X11/Xlocale.h b/nx-X11/lib/X11/Xlocale.h index 61d2f7a84..4370d969e 100644 --- a/nx-X11/lib/X11/Xlocale.h +++ b/nx-X11/lib/X11/Xlocale.h @@ -31,8 +31,8 @@ from The Open Group. #ifndef _XLOCALE_H_ #define _XLOCALE_H_ -#include -#include +#include +#include #ifndef X_LOCALE #include diff --git a/nx-X11/lib/X11/Xresource.h b/nx-X11/lib/X11/Xresource.h index ce1213748..e46a5f467 100644 --- a/nx-X11/lib/X11/Xresource.h +++ b/nx-X11/lib/X11/Xresource.h @@ -52,7 +52,7 @@ SOFTWARE. #define _XRESOURCE_H_ #ifndef _XP_PRINT_SERVER_ -#include +#include #endif /**************************************************************** diff --git a/nx-X11/lib/X11/Xrm.c b/nx-X11/lib/X11/Xrm.c index a932a5ce2..f27f9d2e8 100644 --- a/nx-X11/lib/X11/Xrm.c +++ b/nx-X11/lib/X11/Xrm.c @@ -57,13 +57,13 @@ from The Open Group. #include #include #include "Xlibint.h" -#include +#include #include "Xlcint.h" #ifdef XTHREADS #include "locking.h" #endif #include "XrmI.h" -#include +#include #include "Xresinternal.h" #include "Xresource.h" diff --git a/nx-X11/lib/X11/Xutil.h b/nx-X11/lib/X11/Xutil.h index 82dab7d56..8c877e697 100644 --- a/nx-X11/lib/X11/Xutil.h +++ b/nx-X11/lib/X11/Xutil.h @@ -52,7 +52,7 @@ SOFTWARE. #define _XUTIL_H_ /* You must include before including this file */ -#include +#include /* * Bitmask returned by XParseGeometry(). Each bit tells if the corresponding diff --git a/nx-X11/lib/X11/cmsColNm.c b/nx-X11/lib/X11/cmsColNm.c index d8c24cdff..63f166efe 100644 --- a/nx-X11/lib/X11/cmsColNm.c +++ b/nx-X11/lib/X11/cmsColNm.c @@ -39,12 +39,12 @@ #endif #include "Xlibint.h" #include "Xcmsint.h" -#include +#include #include #include #include #define XK_LATIN1 -#include +#include #include "Cv.h" /* forwards/locals */ diff --git a/nx-X11/lib/X11/cmsProp.c b/nx-X11/lib/X11/cmsProp.c index 81ea58ce9..e9158479e 100644 --- a/nx-X11/lib/X11/cmsProp.c +++ b/nx-X11/lib/X11/cmsProp.c @@ -36,7 +36,7 @@ #ifdef HAVE_CONFIG_H #include #endif -#include +#include #include "Xlibint.h" #include "Xcmsint.h" #include "Cv.h" diff --git a/nx-X11/lib/X11/evtomask.c b/nx-X11/lib/X11/evtomask.c index fbbb998d3..c852c4608 100644 --- a/nx-X11/lib/X11/evtomask.c +++ b/nx-X11/lib/X11/evtomask.c @@ -29,7 +29,7 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include +#include /* * This array can be used given an event type to determine the mask bits diff --git a/nx-X11/lib/X11/globals.c b/nx-X11/lib/X11/globals.c index 11965cb5f..cf270dc22 100644 --- a/nx-X11/lib/X11/globals.c +++ b/nx-X11/lib/X11/globals.c @@ -38,7 +38,7 @@ from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include +#include /* diff --git a/nx-X11/lib/X11/imDefFlt.c b/nx-X11/lib/X11/imDefFlt.c index ccf3ba348..b5b107221 100644 --- a/nx-X11/lib/X11/imDefFlt.c +++ b/nx-X11/lib/X11/imDefFlt.c @@ -31,7 +31,7 @@ PERFORMANCE OF THIS SOFTWARE. #ifdef HAVE_CONFIG_H #include #endif -#include +#include #define NEED_EVENTS #include "Xlibint.h" #include "Xutil.h" diff --git a/nx-X11/lib/X11/imDefIm.c b/nx-X11/lib/X11/imDefIm.c index 7581548e7..e963f3560 100644 --- a/nx-X11/lib/X11/imDefIm.c +++ b/nx-X11/lib/X11/imDefIm.c @@ -36,7 +36,7 @@ OF THIS SOFTWARE. #ifdef HAVE_CONFIG_H #include #endif -#include +#include #define NEED_EVENTS #include "Xlibint.h" #include "Xlcint.h" diff --git a/nx-X11/lib/X11/imDefLkup.c b/nx-X11/lib/X11/imDefLkup.c index aa1aaaf06..5bdcb77c3 100644 --- a/nx-X11/lib/X11/imDefLkup.c +++ b/nx-X11/lib/X11/imDefLkup.c @@ -31,7 +31,7 @@ PERFORMANCE OF THIS SOFTWARE. #ifdef HAVE_CONFIG_H #include #endif -#include +#include #define NEED_EVENTS #include "Xlibint.h" #include "Xlcint.h" diff --git a/nx-X11/lib/X11/imDispch.c b/nx-X11/lib/X11/imDispch.c index c0c4bc726..1e3287529 100644 --- a/nx-X11/lib/X11/imDispch.c +++ b/nx-X11/lib/X11/imDispch.c @@ -31,7 +31,7 @@ PERFORMANCE OF THIS SOFTWARE. #ifdef HAVE_CONFIG_H #include #endif -#include +#include #include "Xlibint.h" #include "Xutil.h" #include "Xlcint.h" diff --git a/nx-X11/lib/X11/imEvToWire.c b/nx-X11/lib/X11/imEvToWire.c index f407296df..211252a50 100644 --- a/nx-X11/lib/X11/imEvToWire.c +++ b/nx-X11/lib/X11/imEvToWire.c @@ -27,8 +27,8 @@ SOFTWARE. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #undef NEED_EVENTS #include "Ximint.h" diff --git a/nx-X11/lib/X11/imExten.c b/nx-X11/lib/X11/imExten.c index 782d1c356..6cb663f66 100644 --- a/nx-X11/lib/X11/imExten.c +++ b/nx-X11/lib/X11/imExten.c @@ -31,7 +31,7 @@ PERFORMANCE OF THIS SOFTWARE. #ifdef HAVE_CONFIG_H #include #endif -#include +#include #define NEED_EVENTS #include "Xlibint.h" #include "Xlcint.h" diff --git a/nx-X11/lib/X11/imInt.c b/nx-X11/lib/X11/imInt.c index 5a047e4aa..9658eef58 100644 --- a/nx-X11/lib/X11/imInt.c +++ b/nx-X11/lib/X11/imInt.c @@ -31,9 +31,9 @@ PERFORMANCE OF THIS SOFTWARE. #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include +#include +#include +#include #include "Xlibint.h" #include "Xlcint.h" #include "Ximint.h" diff --git a/nx-X11/lib/X11/imLcFlt.c b/nx-X11/lib/X11/imLcFlt.c index c3c64bf46..7ff642fae 100644 --- a/nx-X11/lib/X11/imLcFlt.c +++ b/nx-X11/lib/X11/imLcFlt.c @@ -35,7 +35,7 @@ PERFORMANCE OF THIS SOFTWARE. #include #endif #include "Xlibint.h" -#include +#include #include "Xlcint.h" #include "Ximint.h" diff --git a/nx-X11/lib/X11/imLcIc.c b/nx-X11/lib/X11/imLcIc.c index 760e24c5f..475bbbef8 100644 --- a/nx-X11/lib/X11/imLcIc.c +++ b/nx-X11/lib/X11/imLcIc.c @@ -32,8 +32,8 @@ PERFORMANCE OF THIS SOFTWARE. #include #endif #include -#include -#include +#include +#include #include "Xlibint.h" #include "Xlcint.h" #include "Ximint.h" diff --git a/nx-X11/lib/X11/imLcIm.c b/nx-X11/lib/X11/imLcIm.c index 675b48224..0a9027e6f 100644 --- a/nx-X11/lib/X11/imLcIm.c +++ b/nx-X11/lib/X11/imLcIm.c @@ -39,11 +39,11 @@ THIS SOFTWARE. #endif #include /* -#include +#include */ -#include -#include -#include +#include +#include +#include #include "Xlibint.h" #include "Xlcint.h" #include "XlcPublic.h" diff --git a/nx-X11/lib/X11/imLcLkup.c b/nx-X11/lib/X11/imLcLkup.c index 59025a529..b1db9f8f7 100644 --- a/nx-X11/lib/X11/imLcLkup.c +++ b/nx-X11/lib/X11/imLcLkup.c @@ -35,11 +35,11 @@ PERFORMANCE OF THIS SOFTWARE. #include #endif #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "Xlibint.h" #include "Xlcint.h" #include "Ximint.h" diff --git a/nx-X11/lib/X11/imLcPrs.c b/nx-X11/lib/X11/imLcPrs.c index 9736e135c..616d45186 100644 --- a/nx-X11/lib/X11/imLcPrs.c +++ b/nx-X11/lib/X11/imLcPrs.c @@ -35,9 +35,9 @@ OR PERFORMANCE OF THIS SOFTWARE. #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include +#include +#include +#include #include "Xlibint.h" #include "Xlcint.h" #include "Ximint.h" diff --git a/nx-X11/lib/X11/imLcSIc.c b/nx-X11/lib/X11/imLcSIc.c index a32211ce2..e36c52269 100644 --- a/nx-X11/lib/X11/imLcSIc.c +++ b/nx-X11/lib/X11/imLcSIc.c @@ -31,9 +31,9 @@ PERFORMANCE OF THIS SOFTWARE. #include #endif #include -#include -#include -#include +#include +#include +#include #include "Xlibint.h" #include "Xlcint.h" #include "Ximint.h" diff --git a/nx-X11/lib/X11/imRm.c b/nx-X11/lib/X11/imRm.c index 7dbc385cb..1da1b2967 100644 --- a/nx-X11/lib/X11/imRm.c +++ b/nx-X11/lib/X11/imRm.c @@ -36,7 +36,7 @@ PERFORMANCE OF THIS SOFTWARE. #include #endif #include -#include +#include #include "Xlibint.h" #include "Xlcint.h" #include "Ximint.h" diff --git a/nx-X11/lib/X11/imThaiFlt.c b/nx-X11/lib/X11/imThaiFlt.c index 18df0e1ff..41ab992b0 100644 --- a/nx-X11/lib/X11/imThaiFlt.c +++ b/nx-X11/lib/X11/imThaiFlt.c @@ -68,10 +68,10 @@ SOFTWARE. #include #endif #include -#include -#include -#include -#include +#include +#include +#include +#include #include "Xlibint.h" #include "Xlcint.h" #include "Ximint.h" diff --git a/nx-X11/lib/X11/imThaiIc.c b/nx-X11/lib/X11/imThaiIc.c index 67d7cc268..97a72ac81 100644 --- a/nx-X11/lib/X11/imThaiIc.c +++ b/nx-X11/lib/X11/imThaiIc.c @@ -38,8 +38,8 @@ THIS SOFTWARE. #include #endif #include -#include -#include +#include +#include #include "Xlibint.h" #include "Xlcint.h" #include "Ximint.h" diff --git a/nx-X11/lib/X11/imThaiIm.c b/nx-X11/lib/X11/imThaiIm.c index e24715022..85e9df6d3 100644 --- a/nx-X11/lib/X11/imThaiIm.c +++ b/nx-X11/lib/X11/imThaiIm.c @@ -38,10 +38,10 @@ THIS SOFTWARE. #include #endif #include -#include -#include -#include -#include +#include +#include +#include +#include #include "Xlibint.h" #include "Xlcint.h" #include "XlcPublic.h" diff --git a/nx-X11/lib/X11/imTrX.c b/nx-X11/lib/X11/imTrX.c index e2de05f28..7d00bb3f7 100644 --- a/nx-X11/lib/X11/imTrX.c +++ b/nx-X11/lib/X11/imTrX.c @@ -34,7 +34,7 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #endif #include -#include +#include #define NEED_EVENTS #include "Xlibint.h" #include "Xlcint.h" diff --git a/nx-X11/lib/X11/imTrans.c b/nx-X11/lib/X11/imTrans.c index a239219b7..e9715927b 100644 --- a/nx-X11/lib/X11/imTrans.c +++ b/nx-X11/lib/X11/imTrans.c @@ -34,18 +34,18 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #endif #include -#include -#include +#include +#include #define NEED_EVENTS #include "Xlibint.h" -#include +#include #include "Xlcint.h" #include "Ximint.h" #include "XimTrans.h" #include "XimTrInt.h" #ifdef WIN32 -#include +#include #endif diff --git a/nx-X11/lib/X11/lcCT.c b/nx-X11/lib/X11/lcCT.c index 63608a3cd..41c7cf418 100644 --- a/nx-X11/lib/X11/lcCT.c +++ b/nx-X11/lib/X11/lcCT.c @@ -43,7 +43,7 @@ #endif #include "Xlibint.h" #include "XlcPubI.h" -#include +#include #include diff --git a/nx-X11/lib/X11/lcDB.c b/nx-X11/lib/X11/lcDB.c index ffa8f49ae..7a14d3d4f 100644 --- a/nx-X11/lib/X11/lcDB.c +++ b/nx-X11/lib/X11/lcDB.c @@ -37,8 +37,8 @@ #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #include "Xlibint.h" #include "XlcPubI.h" diff --git a/nx-X11/lib/X11/lcFile.c b/nx-X11/lib/X11/lcFile.c index 691daeb9e..2e0a49db4 100644 --- a/nx-X11/lib/X11/lcFile.c +++ b/nx-X11/lib/X11/lcFile.c @@ -33,7 +33,7 @@ #include #include "Xlibint.h" #include "XlcPubI.h" -#include +#include #if 0 #include /* in theory delivers getresuid/gid prototypes, * in practice only the Linux syscall wrapper is there. */ diff --git a/nx-X11/lib/X11/lcPrTxt.c b/nx-X11/lib/X11/lcPrTxt.c index 5a781280e..1a55d1cab 100644 --- a/nx-X11/lib/X11/lcPrTxt.c +++ b/nx-X11/lib/X11/lcPrTxt.c @@ -30,8 +30,8 @@ #endif #include "Xlibint.h" #include "XlcPubI.h" -#include -#include +#include +#include static XPointer * alloc_list( diff --git a/nx-X11/lib/X11/lcTxtPr.c b/nx-X11/lib/X11/lcTxtPr.c index 1f9765f6e..e214ac4e9 100644 --- a/nx-X11/lib/X11/lcTxtPr.c +++ b/nx-X11/lib/X11/lcTxtPr.c @@ -30,8 +30,8 @@ #endif #include "Xlibint.h" #include "XlcPubI.h" -#include -#include +#include +#include #include static int diff --git a/nx-X11/lib/X11/lcUtil.c b/nx-X11/lib/X11/lcUtil.c index ab1db0083..3e49fd08f 100644 --- a/nx-X11/lib/X11/lcUtil.c +++ b/nx-X11/lib/X11/lcUtil.c @@ -29,7 +29,7 @@ #ifdef HAVE_CONFIG_H #include #endif -#include +#include #include "XlcPublic.h" /* Don't use here because it is locale dependent. */ diff --git a/nx-X11/lib/X11/lcWrap.c b/nx-X11/lib/X11/lcWrap.c index ea2623191..b694425fe 100644 --- a/nx-X11/lib/X11/lcWrap.c +++ b/nx-X11/lib/X11/lcWrap.c @@ -61,12 +61,12 @@ from The Open Group. #include #include "Xlibint.h" #include "Xlcint.h" -#include -#include +#include +#include #ifdef WIN32 #undef close #endif -#include +#include #include "XlcPubI.h" #ifdef XTHREADS diff --git a/nx-X11/lib/X11/locking.h b/nx-X11/lib/X11/locking.h index 96c99b972..4b847ded6 100644 --- a/nx-X11/lib/X11/locking.h +++ b/nx-X11/lib/X11/locking.h @@ -38,7 +38,7 @@ in this Software without prior written authorization from The Open Group. #define xmalloc(s) Xmalloc(s) #define xfree(s) Xfree(s) -#include +#include struct _XCVList { xcondition_t cv; diff --git a/nx-X11/lib/X11/mbWMProps.c b/nx-X11/lib/X11/mbWMProps.c index a5f7732e4..8b16bc990 100644 --- a/nx-X11/lib/X11/mbWMProps.c +++ b/nx-X11/lib/X11/mbWMProps.c @@ -31,10 +31,10 @@ from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include -#include +#include +#include +#include +#include void XmbSetWMProperties ( diff --git a/nx-X11/lib/X11/omDefault.c b/nx-X11/lib/X11/omDefault.c index 57dd975ad..eaa75ff84 100644 --- a/nx-X11/lib/X11/omDefault.c +++ b/nx-X11/lib/X11/omDefault.c @@ -35,8 +35,8 @@ #endif #include "Xlibint.h" #include "XomGeneric.h" -#include -#include +#include +#include #include #define DefineLocalBuf char local_buf[BUFSIZ] diff --git a/nx-X11/lib/X11/omGeneric.c b/nx-X11/lib/X11/omGeneric.c index e6c23f4e2..8f4942873 100644 --- a/nx-X11/lib/X11/omGeneric.c +++ b/nx-X11/lib/X11/omGeneric.c @@ -55,8 +55,8 @@ #include "Xlibint.h" #include "XomGeneric.h" #include "XlcGeneric.h" -#include -#include +#include +#include #include #include #include diff --git a/nx-X11/lib/X11/os2Stubs.c b/nx-X11/lib/X11/os2Stubs.c index 9d109025c..804d2e14e 100644 --- a/nx-X11/lib/X11/os2Stubs.c +++ b/nx-X11/lib/X11/os2Stubs.c @@ -37,7 +37,7 @@ #ifdef HAVE_CONFIG_H #include #endif -#include +#include #include #include #define INCL_DOSSEMAPHORES diff --git a/nx-X11/lib/X11/utf8WMProps.c b/nx-X11/lib/X11/utf8WMProps.c index e3a329ac8..69366b6cb 100644 --- a/nx-X11/lib/X11/utf8WMProps.c +++ b/nx-X11/lib/X11/utf8WMProps.c @@ -53,10 +53,10 @@ from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include -#include +#include +#include +#include +#include void Xutf8SetWMProperties ( diff --git a/nx-X11/lib/X11/util/makekeys.c b/nx-X11/lib/X11/util/makekeys.c index 0b0ad9e2c..d2a7b4aef 100644 --- a/nx-X11/lib/X11/util/makekeys.c +++ b/nx-X11/lib/X11/util/makekeys.c @@ -31,9 +31,9 @@ from The Open Group. /* Constructs hash tables for XStringToKeysym and XKeysymToString. */ -#include -#include -#include +#include +#include +#include #include #include #if defined(macII) && !defined(__STDC__) /* stdlib.h fails to define these */ diff --git a/nx-X11/lib/X11/uvY.c b/nx-X11/lib/X11/uvY.c index d7c3e6ab2..c07fcfc39 100644 --- a/nx-X11/lib/X11/uvY.c +++ b/nx-X11/lib/X11/uvY.c @@ -40,7 +40,7 @@ #ifdef HAVE_CONFIG_H #include #endif -#include +#include #include "Xlibint.h" #include "Xcmsint.h" #include "Cv.h" diff --git a/nx-X11/lib/X11/xyY.c b/nx-X11/lib/X11/xyY.c index 63e80bc59..ba0b06137 100644 --- a/nx-X11/lib/X11/xyY.c +++ b/nx-X11/lib/X11/xyY.c @@ -40,7 +40,7 @@ #include #endif #include -#include +#include #include "Xlibint.h" #include "Xcmsint.h" #include "Cv.h" diff --git a/nx-X11/lib/Xau/AuDispose.c b/nx-X11/lib/Xau/AuDispose.c index 58ffd61e7..dc2080f40 100644 --- a/nx-X11/lib/Xau/AuDispose.c +++ b/nx-X11/lib/Xau/AuDispose.c @@ -30,7 +30,7 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include +#include #include void diff --git a/nx-X11/lib/Xau/AuFileName.c b/nx-X11/lib/Xau/AuFileName.c index a51fc3bff..6ab0138b8 100644 --- a/nx-X11/lib/Xau/AuFileName.c +++ b/nx-X11/lib/Xau/AuFileName.c @@ -30,8 +30,8 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #include char * diff --git a/nx-X11/lib/Xau/AuGetAddr.c b/nx-X11/lib/Xau/AuGetAddr.c index ab13cb630..d68ceadc2 100644 --- a/nx-X11/lib/Xau/AuGetAddr.c +++ b/nx-X11/lib/Xau/AuGetAddr.c @@ -30,8 +30,8 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include static int binaryEqual (_Xconst char *a, _Xconst char *b, int len) diff --git a/nx-X11/lib/Xau/AuGetBest.c b/nx-X11/lib/Xau/AuGetBest.c index 5ff1c7cd3..eb27f24c1 100644 --- a/nx-X11/lib/Xau/AuGetBest.c +++ b/nx-X11/lib/Xau/AuGetBest.c @@ -30,15 +30,15 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #ifdef XTHREADS -#include +#include #endif #ifdef hpux #define X_INCLUDE_NETDB_H #define XOS_USE_NO_LOCKING -#include +#include #endif static int diff --git a/nx-X11/lib/Xau/AuLock.c b/nx-X11/lib/Xau/AuLock.c index 001235607..1813dc368 100644 --- a/nx-X11/lib/Xau/AuLock.c +++ b/nx-X11/lib/Xau/AuLock.c @@ -30,8 +30,8 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #include #include #include @@ -42,7 +42,7 @@ in this Software without prior written authorization from The Open Group. #ifndef WIN32 extern unsigned sleep (); #else -#include +#include #define link rename #endif #endif diff --git a/nx-X11/lib/Xau/AuRead.c b/nx-X11/lib/Xau/AuRead.c index 60a0d747f..2e2509633 100644 --- a/nx-X11/lib/Xau/AuRead.c +++ b/nx-X11/lib/Xau/AuRead.c @@ -30,7 +30,7 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include +#include #include #include diff --git a/nx-X11/lib/Xau/AuUnlock.c b/nx-X11/lib/Xau/AuUnlock.c index 460effe86..e40042104 100644 --- a/nx-X11/lib/Xau/AuUnlock.c +++ b/nx-X11/lib/Xau/AuUnlock.c @@ -30,8 +30,8 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include int XauUnlockAuth ( diff --git a/nx-X11/lib/Xau/AuWrite.c b/nx-X11/lib/Xau/AuWrite.c index f25abc9e6..5a9b44eb2 100644 --- a/nx-X11/lib/Xau/AuWrite.c +++ b/nx-X11/lib/Xau/AuWrite.c @@ -30,7 +30,7 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include +#include static int write_short (unsigned short s, FILE *file) diff --git a/nx-X11/lib/Xau/Autest.c b/nx-X11/lib/Xau/Autest.c index 298464908..2352cf170 100644 --- a/nx-X11/lib/Xau/Autest.c +++ b/nx-X11/lib/Xau/Autest.c @@ -29,7 +29,7 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include +#include main (argc, argv) char **argv; diff --git a/nx-X11/lib/Xau/Imakefile b/nx-X11/lib/Xau/Imakefile index 331d29c09..df80d28d4 100644 --- a/nx-X11/lib/Xau/Imakefile +++ b/nx-X11/lib/Xau/Imakefile @@ -12,7 +12,7 @@ XCOMM $XFree86: xc/lib/Xau/Imakefile,v 3.5 1999/04/17 09:08:11 dawes Exp $ #define DoProfileLib ProfileLibXau #define LibName NX_Xau #define SoRev SOXAUTHREV -#define IncSubdir X11 +#define IncSubdir nx-X11 #include diff --git a/nx-X11/lib/Xau/k5encode.c b/nx-X11/lib/Xau/k5encode.c index a3c6c09b1..c71222e1c 100644 --- a/nx-X11/lib/Xau/k5encode.c +++ b/nx-X11/lib/Xau/k5encode.c @@ -45,10 +45,10 @@ in this Software without prior written authorization from The Open Group. #undef BITS32 #undef xfree -#include -#include -#include -#include +#include +#include +#include +#include /* * XauKrb5Encode diff --git a/nx-X11/lib/Xcomposite/Imakefile b/nx-X11/lib/Xcomposite/Imakefile index a8e4077fa..24820c146 100644 --- a/nx-X11/lib/Xcomposite/Imakefile +++ b/nx-X11/lib/Xcomposite/Imakefile @@ -16,7 +16,7 @@ SOXCOMPOSITEREV=1.0.0 #define LibName NX_Xcomposite #define SoRev SOXCOMPOSITEREV -#define IncSubdir X11 +#define IncSubdir nx-X11 #define IncSubSubdir extensions #include diff --git a/nx-X11/lib/Xcomposite/Xcomposite.h b/nx-X11/lib/Xcomposite/Xcomposite.h index 3604141bb..c28cc6857 100644 --- a/nx-X11/lib/Xcomposite/Xcomposite.h +++ b/nx-X11/lib/Xcomposite/Xcomposite.h @@ -25,9 +25,9 @@ #ifndef _XCOMPOSITE_H_ #define _XCOMPOSITE_H_ -#include -#include -#include +#include +#include +#include /* * This revision number also appears in configure.ac, they have diff --git a/nx-X11/lib/Xcomposite/xcompositeint.h b/nx-X11/lib/Xcomposite/xcompositeint.h index af5f57500..7b12e8d55 100644 --- a/nx-X11/lib/Xcomposite/xcompositeint.h +++ b/nx-X11/lib/Xcomposite/xcompositeint.h @@ -28,11 +28,11 @@ #define NEED_EVENTS #define NEED_REPLIES #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include typedef struct _XCompositeExtDisplayInfo { struct _XCompositeExtDisplayInfo *next; /* keep a linked list */ diff --git a/nx-X11/lib/Xext/DPMS.c b/nx-X11/lib/Xext/DPMS.c index 35b21b4ad..a2c0dc3c5 100644 --- a/nx-X11/lib/Xext/DPMS.c +++ b/nx-X11/lib/Xext/DPMS.c @@ -36,11 +36,11 @@ Equipment Corporation. #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include static XExtensionInfo _dpms_info_data; diff --git a/nx-X11/lib/Xext/MITMisc.c b/nx-X11/lib/Xext/MITMisc.c index c0fa87209..8ba35dce1 100644 --- a/nx-X11/lib/Xext/MITMisc.c +++ b/nx-X11/lib/Xext/MITMisc.c @@ -32,11 +32,11 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include static XExtensionInfo _mit_info_data; static XExtensionInfo *mit_info = &_mit_info_data; diff --git a/nx-X11/lib/Xext/XAppgroup.c b/nx-X11/lib/Xext/XAppgroup.c index 2ca3e4d21..abbf1c1b9 100644 --- a/nx-X11/lib/Xext/XAppgroup.c +++ b/nx-X11/lib/Xext/XAppgroup.c @@ -30,15 +30,15 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include +#include #endif #define NEED_EVENTS #define NEED_REPLIES -#include -#include -#include -#include +#include +#include +#include +#include #include diff --git a/nx-X11/lib/Xext/XEVI.c b/nx-X11/lib/Xext/XEVI.c index a64b9c1ba..e5a811bdf 100644 --- a/nx-X11/lib/Xext/XEVI.c +++ b/nx-X11/lib/Xext/XEVI.c @@ -27,12 +27,12 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include static XExtensionInfo *xevi_info;/* needs to move to globals.c */ static /* const */ char *xevi_extension_name = EVINAME; #define XeviCheckExtension(dpy,i,val) \ diff --git a/nx-X11/lib/Xext/XLbx.c b/nx-X11/lib/Xext/XLbx.c index 8c0cfad0b..450bd5bc5 100644 --- a/nx-X11/lib/Xext/XLbx.c +++ b/nx-X11/lib/Xext/XLbx.c @@ -30,11 +30,11 @@ #include #endif #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include static XExtensionInfo _lbx_info_data; static XExtensionInfo *lbx_info = &_lbx_info_data; diff --git a/nx-X11/lib/Xext/XMultibuf.c b/nx-X11/lib/Xext/XMultibuf.c index 3e0049e92..570676def 100644 --- a/nx-X11/lib/Xext/XMultibuf.c +++ b/nx-X11/lib/Xext/XMultibuf.c @@ -32,11 +32,11 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include +#include #include -#include -#include -#include +#include +#include +#include static XExtensionInfo _multibuf_info_data; static XExtensionInfo *multibuf_info = &_multibuf_info_data; diff --git a/nx-X11/lib/Xext/XSecurity.c b/nx-X11/lib/Xext/XSecurity.c index 161ade3b7..a9899916f 100644 --- a/nx-X11/lib/Xext/XSecurity.c +++ b/nx-X11/lib/Xext/XSecurity.c @@ -29,11 +29,11 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include +#include #include -#include -#include -#include +#include +#include +#include static XExtensionInfo _Security_info_data; static XExtensionInfo *Security_info = &_Security_info_data; diff --git a/nx-X11/lib/Xext/XShape.c b/nx-X11/lib/Xext/XShape.c index 29a7f83f9..79b4b78f6 100644 --- a/nx-X11/lib/Xext/XShape.c +++ b/nx-X11/lib/Xext/XShape.c @@ -31,12 +31,12 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include static XExtensionInfo _shape_info_data; static XExtensionInfo *shape_info = &_shape_info_data; diff --git a/nx-X11/lib/Xext/XShm.c b/nx-X11/lib/Xext/XShm.c index f4e29a42b..ec3720732 100644 --- a/nx-X11/lib/Xext/XShm.c +++ b/nx-X11/lib/Xext/XShm.c @@ -36,12 +36,12 @@ in this Software without prior written authorization from The Open Group. #include #endif #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include static XExtensionInfo _shm_info_data; static XExtensionInfo *shm_info = &_shm_info_data; diff --git a/nx-X11/lib/Xext/XSync.c b/nx-X11/lib/Xext/XSync.c index 61f8600ce..39eb97cdd 100644 --- a/nx-X11/lib/Xext/XSync.c +++ b/nx-X11/lib/Xext/XSync.c @@ -58,10 +58,10 @@ PERFORMANCE OF THIS SOFTWARE. #include #define NEED_EVENTS #define NEED_REPLIES -#include -#include -#include -#include +#include +#include +#include +#include static XExtensionInfo _sync_info_data; static XExtensionInfo *sync_info = &_sync_info_data; diff --git a/nx-X11/lib/Xext/XTestExt1.c b/nx-X11/lib/Xext/XTestExt1.c index ee4a0bde0..00da036bd 100644 --- a/nx-X11/lib/Xext/XTestExt1.c +++ b/nx-X11/lib/Xext/XTestExt1.c @@ -64,9 +64,9 @@ University of California. #include #endif #include -#include -#include -#include +#include +#include +#include /****************************************************************************** * variables diff --git a/nx-X11/lib/Xext/Xcup.c b/nx-X11/lib/Xext/Xcup.c index 6315d32a4..8bf2bb29e 100644 --- a/nx-X11/lib/Xext/Xcup.c +++ b/nx-X11/lib/Xext/Xcup.c @@ -30,15 +30,15 @@ in this Software without prior written authorization from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include +#include #endif #define NEED_EVENTS #define NEED_REPLIES -#include -#include -#include -#include +#include +#include +#include +#include static XExtensionInfo _xcup_info_data; static XExtensionInfo *xcup_info = &_xcup_info_data; diff --git a/nx-X11/lib/Xext/Xdbe.c b/nx-X11/lib/Xext/Xdbe.c index 954c8f01d..05df171f6 100644 --- a/nx-X11/lib/Xext/Xdbe.c +++ b/nx-X11/lib/Xext/Xdbe.c @@ -38,11 +38,11 @@ #include #endif #include -#include -#include -#include +#include +#include +#include #define NEED_DBE_PROTOCOL -#include +#include static XExtensionInfo _dbe_info_data; static XExtensionInfo *dbe_info = &_dbe_info_data; diff --git a/nx-X11/lib/Xext/extutil.c b/nx-X11/lib/Xext/extutil.c index d96b17f3f..bd79dbdb2 100644 --- a/nx-X11/lib/Xext/extutil.c +++ b/nx-X11/lib/Xext/extutil.c @@ -51,9 +51,9 @@ in this Software without prior written authorization from The Open Group. #include #endif #include -#include -#include -#include +#include +#include +#include /* diff --git a/nx-X11/lib/Xext/globals.c b/nx-X11/lib/Xext/globals.c index 0cd5d2690..53a18690d 100644 --- a/nx-X11/lib/Xext/globals.c +++ b/nx-X11/lib/Xext/globals.c @@ -34,8 +34,8 @@ from The Open Group. #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #include /* for definition of NULL */ /* diff --git a/nx-X11/lib/Xfixes/Imakefile b/nx-X11/lib/Xfixes/Imakefile index ca1fe046b..cc3e1631d 100644 --- a/nx-X11/lib/Xfixes/Imakefile +++ b/nx-X11/lib/Xfixes/Imakefile @@ -16,7 +16,7 @@ SOXFIXESREV=3.0.0 #define LibName NX_Xfixes #define SoRev SOXFIXESREV -#define IncSubdir X11 +#define IncSubdir nx-X11 #define IncSubSubdir extensions #include diff --git a/nx-X11/lib/Xfixes/Xfixes.h b/nx-X11/lib/Xfixes/Xfixes.h index 28ca28f1a..4cba47ca4 100644 --- a/nx-X11/lib/Xfixes/Xfixes.h +++ b/nx-X11/lib/Xfixes/Xfixes.h @@ -25,9 +25,9 @@ #ifndef _XFIXES_H_ #define _XFIXES_H_ -#include +#include -#include +#include /* * This revision number also appears in configure.ac, they have diff --git a/nx-X11/lib/Xfixes/Xfixes.man b/nx-X11/lib/Xfixes/Xfixes.man index f081cc54e..563db15b5 100644 --- a/nx-X11/lib/Xfixes/Xfixes.man +++ b/nx-X11/lib/Xfixes/Xfixes.man @@ -31,7 +31,7 @@ .SH NAME XFixes \- Augmented versions of core protocol requests .SH SYNTAX -\&#include +\&#include .nf .sp Bool XFixesQueryExtension \^(\^Display *\fIdpy\fP, diff --git a/nx-X11/lib/Xfixes/Xfixesint.h b/nx-X11/lib/Xfixes/Xfixesint.h index e227571be..353dcae77 100644 --- a/nx-X11/lib/Xfixes/Xfixesint.h +++ b/nx-X11/lib/Xfixes/Xfixesint.h @@ -28,11 +28,11 @@ #define NEED_EVENTS #define NEED_REPLIES #include -#include -#include -#include +#include +#include +#include #include "Xfixes.h" -#include +#include extern char XFixesExtensionName[]; diff --git a/nx-X11/lib/Xinerama/Xinerama.c b/nx-X11/lib/Xinerama/Xinerama.c index fd717dd22..0256336be 100644 --- a/nx-X11/lib/Xinerama/Xinerama.c +++ b/nx-X11/lib/Xinerama/Xinerama.c @@ -27,13 +27,13 @@ Equipment Corporation. #define NEED_EVENTS #define NEED_REPLIES -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include static XExtensionInfo _panoramiX_ext_info_data; diff --git a/nx-X11/lib/Xrender/Imakefile b/nx-X11/lib/Xrender/Imakefile index 35d826b22..c5a0f89fc 100644 --- a/nx-X11/lib/Xrender/Imakefile +++ b/nx-X11/lib/Xrender/Imakefile @@ -71,7 +71,7 @@ clean:: #define SoRev SOXRENDERREV #ifdef XBuildIncDir -#define IncSubdir X11 +#define IncSubdir nx-X11 #define IncSubSubdir extensions RENDERINCDIR = $(BUILDINCDIR) #else diff --git a/nx-X11/lib/Xrender/Picture.c b/nx-X11/lib/Xrender/Picture.c index 0b18f5c57..260eda05e 100644 --- a/nx-X11/lib/Xrender/Picture.c +++ b/nx-X11/lib/Xrender/Picture.c @@ -26,7 +26,7 @@ #include #endif #include "Xrenderint.h" -#include +#include static void _XRenderProcessPictureAttributes (Display *dpy, diff --git a/nx-X11/lib/Xrender/Xrender.h b/nx-X11/lib/Xrender/Xrender.h index 4d125cd81..a38f4cc3d 100644 --- a/nx-X11/lib/Xrender/Xrender.h +++ b/nx-X11/lib/Xrender/Xrender.h @@ -27,12 +27,12 @@ #define NX_CLEANUP -#include +#include -#include -#include -#include -#include +#include +#include +#include +#include #ifdef NX_CLEANUP #include "renderproto.h" diff --git a/nx-X11/lib/Xrender/Xrenderint.h b/nx-X11/lib/Xrender/Xrenderint.h index a90fe65d8..9744b0da4 100644 --- a/nx-X11/lib/Xrender/Xrenderint.h +++ b/nx-X11/lib/Xrender/Xrenderint.h @@ -28,9 +28,9 @@ #include "config.h" #define NEED_EVENTS #define NEED_REPLIES -#include -#include -#include +#include +#include +#include #include "Xrender.h" typedef struct { diff --git a/nx-X11/lib/Xtst/XRecord.c b/nx-X11/lib/Xtst/XRecord.c index 05cbda889..8e1823ef9 100644 --- a/nx-X11/lib/Xtst/XRecord.c +++ b/nx-X11/lib/Xtst/XRecord.c @@ -56,10 +56,10 @@ from The Open Group. #include #define NEED_EVENTS #define NEED_REPLIES -#include -#include -#include -#include +#include +#include +#include +#include static XExtensionInfo _xrecord_info_data; static XExtensionInfo *xrecord_info = &_xrecord_info_data; diff --git a/nx-X11/lib/Xtst/XTest.c b/nx-X11/lib/Xtst/XTest.c index 2c3ae2b41..6b814aab4 100644 --- a/nx-X11/lib/Xtst/XTest.c +++ b/nx-X11/lib/Xtst/XTest.c @@ -33,13 +33,13 @@ from The Open Group. /* $XFree86: xc/lib/Xtst/XTest.c,v 1.5 2001/12/14 19:56:40 dawes Exp $ */ #define NEED_REPLIES -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include static XExtensionInfo _xtest_info_data; static XExtensionInfo *xtest_info = &_xtest_info_data; diff --git a/nx-X11/lib/oldX/Imakefile b/nx-X11/lib/oldX/Imakefile index 663d11019..e2ee75eb0 100644 --- a/nx-X11/lib/oldX/Imakefile +++ b/nx-X11/lib/oldX/Imakefile @@ -12,7 +12,7 @@ XCOMM $XFree86: xc/lib/oldX/Imakefile,v 1.2 1998/12/20 11:57:19 dawes Exp $ #define DoProfileLib ProfileOldX #define LibName NX_oldX #define SoRev SOOLDXREV -#define IncSubdir X11 +#define IncSubdir nx-X11 #ifdef SharedOldXReqs REQUIREDLIBS = SharedOldXReqs diff --git a/nx-X11/lib/xkbfile/Imakefile b/nx-X11/lib/xkbfile/Imakefile index d7693819e..6a675dc9a 100644 --- a/nx-X11/lib/xkbfile/Imakefile +++ b/nx-X11/lib/xkbfile/Imakefile @@ -13,7 +13,7 @@ XCOMM $XFree86: xc/lib/xkbfile/Imakefile,v 3.5 2003/10/15 21:23:38 herrb Exp $ #define HasSharedData NO #define LibName NX_xkbfile #define SoRev SOXKBFILEREV -#define IncSubdir X11 +#define IncSubdir nx-X11 #define IncSubSubdir extensions #ifdef SharedxkbfileReqs diff --git a/nx-X11/lib/xkbfile/XKMformat.h b/nx-X11/lib/xkbfile/XKMformat.h index 154da5694..ced5ea21d 100644 --- a/nx-X11/lib/xkbfile/XKMformat.h +++ b/nx-X11/lib/xkbfile/XKMformat.h @@ -29,9 +29,9 @@ #ifndef _XKMFORMAT_H_ #define _XKMFORMAT_H_ 1 -#include -#include -#include +#include +#include +#include typedef struct _xkmFileInfo { CARD8 type; diff --git a/nx-X11/lib/xkbfile/cout.c b/nx-X11/lib/xkbfile/cout.c index 161bd0f89..96b3ba411 100644 --- a/nx-X11/lib/xkbfile/cout.c +++ b/nx-X11/lib/xkbfile/cout.c @@ -32,10 +32,10 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include "XKMformat.h" #include "XKBfileInt.h" diff --git a/nx-X11/lib/xkbfile/maprules.c b/nx-X11/lib/xkbfile/maprules.c index 53decdcad..75baf07ea 100644 --- a/nx-X11/lib/xkbfile/maprules.c +++ b/nx-X11/lib/xkbfile/maprules.c @@ -38,18 +38,18 @@ #define X_INCLUDE_STRING_H #define XOS_USE_NO_LOCKING -#include +#include #ifndef XKB_IN_SERVER -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include "XKMformat.h" #include "XKBfileInt.h" #include "XKBrules.h" @@ -57,18 +57,18 @@ #else #define NEED_EVENTS -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "misc.h" #include "inputstr.h" #include "dix.h" -#include +#include #define XKBSRV_NEED_FILE_FUNCS -#include +#include #endif diff --git a/nx-X11/lib/xkbfile/srvmisc.c b/nx-X11/lib/xkbfile/srvmisc.c index 3e4c73c98..d228389d9 100644 --- a/nx-X11/lib/xkbfile/srvmisc.c +++ b/nx-X11/lib/xkbfile/srvmisc.c @@ -32,9 +32,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include "XKMformat.h" #include "XKBfileInt.h" diff --git a/nx-X11/lib/xkbfile/xkbatom.c b/nx-X11/lib/xkbfile/xkbatom.c index 1a5dea0f8..d023d5410 100644 --- a/nx-X11/lib/xkbfile/xkbatom.c +++ b/nx-X11/lib/xkbfile/xkbatom.c @@ -79,9 +79,9 @@ SOFTWARE. #include #include #include -#include -#include -#include +#include +#include +#include #include "XKMformat.h" #include "XKBfileInt.h" diff --git a/nx-X11/lib/xkbfile/xkbbells.c b/nx-X11/lib/xkbfile/xkbbells.c index 30b918fb4..8bf0885fe 100644 --- a/nx-X11/lib/xkbfile/xkbbells.c +++ b/nx-X11/lib/xkbfile/xkbbells.c @@ -29,8 +29,8 @@ #ifdef HAVE_CONFIG_H #include #endif -#include -#include +#include +#include #include "XKBbells.h" static char *_xkbStdBellNames[XkbBI_NumBells] = { diff --git a/nx-X11/lib/xkbfile/xkbconfig.c b/nx-X11/lib/xkbfile/xkbconfig.c index 7930979eb..8c31213a5 100644 --- a/nx-X11/lib/xkbfile/xkbconfig.c +++ b/nx-X11/lib/xkbfile/xkbconfig.c @@ -36,32 +36,32 @@ #include #include -#include +#include -#include +#include #ifndef XKB_IN_SERVER -#include -#include -#include -#include +#include +#include +#include +#include #include "XKBfileInt.h" #else -#include +#include #define NEED_EVENTS -#include -#include +#include +#include #include "misc.h" #include "inputstr.h" #include "dix.h" #define XKBSRV_NEED_FILE_FUNCS -#include +#include #endif -#include +#include /***====================================================================***/ diff --git a/nx-X11/lib/xkbfile/xkbdraw.c b/nx-X11/lib/xkbfile/xkbdraw.c index c955f0321..865b2952e 100644 --- a/nx-X11/lib/xkbfile/xkbdraw.c +++ b/nx-X11/lib/xkbfile/xkbdraw.c @@ -33,12 +33,12 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "XKMformat.h" #include "XKBfileInt.h" diff --git a/nx-X11/lib/xkbfile/xkbmisc.c b/nx-X11/lib/xkbfile/xkbmisc.c index cca31f778..52fca3d10 100644 --- a/nx-X11/lib/xkbfile/xkbmisc.c +++ b/nx-X11/lib/xkbfile/xkbmisc.c @@ -36,31 +36,31 @@ #include #include -#include -#include +#include +#include #ifndef XKB_IN_SERVER -#include -#include -#include -#include +#include +#include +#include +#include #include "XKMformat.h" #include "XKBfileInt.h" #else -#include +#include #define NEED_EVENTS -#include -#include +#include +#include #include "misc.h" #include "inputstr.h" #include "dix.h" -#include +#include #define XKBSRV_NEED_FILE_FUNCS 1 -#include -#include +#include +#include #include "xkb.h" #endif diff --git a/nx-X11/lib/xkbfile/xkbout.c b/nx-X11/lib/xkbfile/xkbout.c index b69fdfbb4..8baf34b78 100644 --- a/nx-X11/lib/xkbfile/xkbout.c +++ b/nx-X11/lib/xkbfile/xkbout.c @@ -35,32 +35,32 @@ #include #include #include -#include +#include #ifndef XKB_IN_SERVER -#include -#include -#include +#include +#include +#include #include "XKMformat.h" #include "XKBfileInt.h" #else -#include +#include #define NEED_EVENTS -#include -#include +#include +#include #include "misc.h" #include "inputstr.h" #include "dix.h" -#include +#include #define XKBSRV_NEED_FILE_FUNCS 1 -#include +#include -#include -#include +#include +#include #endif diff --git a/nx-X11/lib/xkbfile/xkbtext.c b/nx-X11/lib/xkbfile/xkbtext.c index 28592d242..41f2a8ff3 100644 --- a/nx-X11/lib/xkbfile/xkbtext.c +++ b/nx-X11/lib/xkbfile/xkbtext.c @@ -36,29 +36,29 @@ #include #include -#include +#include #ifndef XKB_IN_SERVER -#include -#include -#include +#include +#include +#include #include "XKMformat.h" #include "XKBfileInt.h" #else -#include +#include #define NEED_EVENTS -#include +#include #include "misc.h" #include "inputstr.h" #include "dix.h" -#include +#include #define XKBSRV_NEED_FILE_FUNCS 1 -#include -#include +#include +#include #endif diff --git a/nx-X11/lib/xkbfile/xkmout.c b/nx-X11/lib/xkbfile/xkmout.c index 403e48810..7de4081af 100644 --- a/nx-X11/lib/xkbfile/xkmout.c +++ b/nx-X11/lib/xkbfile/xkmout.c @@ -32,10 +32,10 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include "XKMformat.h" #include "XKBfileInt.h" diff --git a/nx-X11/lib/xkbfile/xkmread.c b/nx-X11/lib/xkbfile/xkmread.c index f22941f67..92ef05b86 100644 --- a/nx-X11/lib/xkbfile/xkmread.c +++ b/nx-X11/lib/xkbfile/xkmread.c @@ -34,33 +34,33 @@ #include -#include -#include +#include +#include #ifndef XKB_IN_SERVER #include -#include -#include +#include +#include -#include +#include -#include +#include #include "XKMformat.h" #include "XKBfileInt.h" #else -#include +#include #define NEED_EVENTS -#include -#include +#include +#include #include "misc.h" #include "inputstr.h" -#include +#include #define XKBSRV_NEED_FILE_FUNCS -#include -#include +#include +#include Atom XkbInternAtom(Display *dpy,char *str,Bool only_if_exists) diff --git a/nx-X11/lib/xtrans/Imakefile b/nx-X11/lib/xtrans/Imakefile index e29a38591..2cc880c39 100644 --- a/nx-X11/lib/xtrans/Imakefile +++ b/nx-X11/lib/xtrans/Imakefile @@ -1,6 +1,6 @@ XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:46:44 cpqbld Exp $ -#define IncSubdir X11 +#define IncSubdir nx-X11 all:: diff --git a/nx-X11/programs/Xserver/GL/glx/glxserver.h b/nx-X11/programs/Xserver/GL/glx/glxserver.h index 193ebcb6f..4238de537 100644 --- a/nx-X11/programs/Xserver/GL/glx/glxserver.h +++ b/nx-X11/programs/Xserver/GL/glx/glxserver.h @@ -41,9 +41,9 @@ ** */ -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/nx-X11/programs/Xserver/GL/mesa/X/xf86glx_util.c b/nx-X11/programs/Xserver/GL/mesa/X/xf86glx_util.c index 6441a4b4f..1889bdabd 100644 --- a/nx-X11/programs/Xserver/GL/mesa/X/xf86glx_util.c +++ b/nx-X11/programs/Xserver/GL/mesa/X/xf86glx_util.c @@ -39,7 +39,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include "pixmapstr.h" #include "xf86glx_util.h" -#include +#include #include "GL/xf86glx.h" #ifdef ROUNDUP diff --git a/nx-X11/programs/Xserver/XTrap/xf86XTrapModule.c b/nx-X11/programs/Xserver/XTrap/xf86XTrapModule.c index 3b9955eba..a3e1d08c6 100644 --- a/nx-X11/programs/Xserver/XTrap/xf86XTrapModule.c +++ b/nx-X11/programs/Xserver/XTrap/xf86XTrapModule.c @@ -8,7 +8,7 @@ #include "xf86Module.h" -#include +#include extern void DEC_XTRAPInit(INITARGS); diff --git a/nx-X11/programs/Xserver/XTrap/xtrapddmi.c b/nx-X11/programs/Xserver/XTrap/xtrapddmi.c index 2dba356b7..1b4be39cd 100644 --- a/nx-X11/programs/Xserver/XTrap/xtrapddmi.c +++ b/nx-X11/programs/Xserver/XTrap/xtrapddmi.c @@ -44,7 +44,7 @@ SOFTWARE. #ifndef EXTMODULE #include -#include +#include #ifdef PC # include "fcntl.h" # include "io.h" @@ -56,7 +56,7 @@ SOFTWARE. #define NEED_REPLIES #define NEED_EVENTS -#include /* From library include environment */ +#include /* From library include environment */ #include "input.h" /* From server include env. (must be before Xlib.h!) */ #ifdef PC # include "scrintst.h" /* Screen struct */ @@ -66,9 +66,9 @@ SOFTWARE. # include "scrnintstr.h" /* Screen struct */ #endif -#include -#include -#include +#include +#include +#include extern int XETrapErrorBase; extern xXTrapGetAvailReply XETrap_avail; diff --git a/nx-X11/programs/Xserver/XTrap/xtrapdi.c b/nx-X11/programs/Xserver/XTrap/xtrapdi.c index bdddb6310..987d54e4f 100644 --- a/nx-X11/programs/Xserver/XTrap/xtrapdi.c +++ b/nx-X11/programs/Xserver/XTrap/xtrapdi.c @@ -58,12 +58,12 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifndef EXTMODULE #include #include -#include +#include #else #include "xf86_ansic.h" #endif -#include -#include +#include +#include #include "input.h" /* Server DevicePtr definitions */ #include "misc.h" /* Server swapping macros */ #include "dixstruct.h" /* Server ClientRec definitions */ @@ -77,9 +77,9 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #endif #include "pixmapstr.h" /* DrawableRec */ #include "windowstr.h" /* Drawable Lookup structures */ -#include -#include -#include +#include +#include +#include #include "colormapst.h" #ifdef PANORAMIX #include "panoramiX.h" diff --git a/nx-X11/programs/Xserver/XTrap/xtrapdiswp.c b/nx-X11/programs/Xserver/XTrap/xtrapdiswp.c index c43f6e332..ba8249c35 100644 --- a/nx-X11/programs/Xserver/XTrap/xtrapdiswp.c +++ b/nx-X11/programs/Xserver/XTrap/xtrapdiswp.c @@ -49,12 +49,12 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #endif -#include +#include #define NEED_REPLIES #define NEED_EVENTS -#include -#include -#include +#include +#include +#include #include "input.h" /* Server DevicePtr definitions */ #include "misc.h" #include "dixstruct.h" @@ -64,8 +64,8 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. # include "extnsionst.h" /* Server ExtensionEntry definitions */ #endif # include "swapreq.h" /* Server SwapColorItem definition */ -#include -#include +#include +#include /* In-coming XTrap requests needing to be swapped to native format */ diff --git a/nx-X11/programs/Xserver/XTrap/xtrapditbl.c b/nx-X11/programs/Xserver/XTrap/xtrapditbl.c index a9ceddb3d..10a070e9e 100644 --- a/nx-X11/programs/Xserver/XTrap/xtrapditbl.c +++ b/nx-X11/programs/Xserver/XTrap/xtrapditbl.c @@ -39,12 +39,12 @@ SOFTWARE. #include #endif -#include +#include #define NEED_REPLIES #define NEED_EVENTS -#include -#include -#include +#include +#include +#include #include "input.h" /* Server DevicePtr definitions */ #include "misc.h" #include "dixstruct.h" @@ -53,8 +53,8 @@ SOFTWARE. #else # include "extnsionst.h" /* Server ExtensionEntry definitions */ #endif -#include -#include +#include +#include globaldef void_function XETSwProcVector[256L] = { diff --git a/nx-X11/programs/Xserver/Xext/EVI.c b/nx-X11/programs/Xserver/Xext/EVI.c index 93ed19fa6..1eca62693 100644 --- a/nx-X11/programs/Xserver/Xext/EVI.c +++ b/nx-X11/programs/Xserver/Xext/EVI.c @@ -27,13 +27,13 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #endif -#include -#include +#include +#include #include "dixstruct.h" #include "extnsionst.h" #include "dix.h" #define _XEVI_SERVER_ -#include +#include #include "EVIstruct.h" #include "modinit.h" #include "scrnintstr.h" diff --git a/nx-X11/programs/Xserver/Xext/appgroup.c b/nx-X11/programs/Xserver/Xext/appgroup.c index e23ceca59..1dd4f1ae5 100644 --- a/nx-X11/programs/Xserver/Xext/appgroup.c +++ b/nx-X11/programs/Xserver/Xext/appgroup.c @@ -32,8 +32,8 @@ from The Open Group. #include #endif -#include -#include +#include +#include #include "misc.h" #include "dixstruct.h" #include "extnsionst.h" @@ -42,14 +42,14 @@ from The Open Group. #include "colormapst.h" #include "servermd.h" #define _XAG_SERVER_ -#include -#include +#include +#include #define _SECURITY_SERVER -#include -#include +#include +#include #define XSERV_t -#include +#include #include "../os/osdep.h" #include diff --git a/nx-X11/programs/Xserver/Xext/bigreq.c b/nx-X11/programs/Xserver/Xext/bigreq.c index 3d6d49ca7..eba552cfe 100644 --- a/nx-X11/programs/Xserver/Xext/bigreq.c +++ b/nx-X11/programs/Xserver/Xext/bigreq.c @@ -33,13 +33,13 @@ from The Open Group. #include #endif -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "dixstruct.h" #include "extnsionst.h" -#include +#include #include "opaque.h" #include "modinit.h" diff --git a/nx-X11/programs/Xserver/Xext/cup.c b/nx-X11/programs/Xserver/Xext/cup.c index 198aa801f..9b6d25c21 100644 --- a/nx-X11/programs/Xserver/Xext/cup.c +++ b/nx-X11/programs/Xserver/Xext/cup.c @@ -32,8 +32,8 @@ in this Software without prior written authorization from The Open Group. #include #endif -#include -#include +#include +#include #include "misc.h" #include "dixstruct.h" #include "extnsionst.h" @@ -42,8 +42,8 @@ in this Software without prior written authorization from The Open Group. #include "servermd.h" #include "swapreq.h" #define _XCUP_SERVER_ -#include -#include +#include +#include #ifndef EXTMODULE #include "../os/osdep.h" diff --git a/nx-X11/programs/Xserver/Xext/dgaproc.h b/nx-X11/programs/Xserver/Xext/dgaproc.h index eb9791098..4d3f224e6 100644 --- a/nx-X11/programs/Xserver/Xext/dgaproc.h +++ b/nx-X11/programs/Xserver/Xext/dgaproc.h @@ -3,7 +3,7 @@ #ifndef __DGAPROC_H #define __DGAPROC_H -#include +#include #include "pixmap.h" #define DGA_CONCURRENT_ACCESS 0x00000001 diff --git a/nx-X11/programs/Xserver/Xext/dpms.c b/nx-X11/programs/Xserver/Xext/dpms.c index 3e79602d1..fc40193e4 100644 --- a/nx-X11/programs/Xserver/Xext/dpms.c +++ b/nx-X11/programs/Xserver/Xext/dpms.c @@ -39,16 +39,16 @@ Equipment Corporation. #include #endif -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "dixstruct.h" #include "extnsionst.h" #include "opaque.h" #define DPMS_SERVER -#include -#include +#include +#include #include "dpmsproc.h" #include "modinit.h" diff --git a/nx-X11/programs/Xserver/Xext/extmod/modinit.c b/nx-X11/programs/Xserver/Xext/extmod/modinit.c index f79204281..162f76ad8 100644 --- a/nx-X11/programs/Xserver/Xext/extmod/modinit.c +++ b/nx-X11/programs/Xserver/Xext/extmod/modinit.c @@ -33,7 +33,7 @@ #include "xf86Module.h" #include "xf86Opt.h" -#include +#include #include "modinit.h" #include "globals.h" diff --git a/nx-X11/programs/Xserver/Xext/extmod/modinit.h b/nx-X11/programs/Xserver/Xext/extmod/modinit.h index 2bafdb2b0..40e1828bb 100644 --- a/nx-X11/programs/Xserver/Xext/extmod/modinit.h +++ b/nx-X11/programs/Xserver/Xext/extmod/modinit.h @@ -12,26 +12,26 @@ #ifdef SHAPE extern void ShapeExtensionInit(INITARGS); #define _SHAPE_SERVER_ /* don't want Xlib structures */ -#include +#include #endif #ifdef MULTIBUFFER extern void MultibufferExtensionInit(INITARGS); #define _MULTIBUF_SERVER_ /* don't want Xlib structures */ -#include +#include #endif #ifdef MITMISC extern void MITMiscExtensionInit(INITARGS); #define _MITMISC_SERVER_ -#include +#include #endif #ifdef XTEST extern void XTestExtensionInit(INITARGS); #define _XTEST_SERVER_ -#include -#include +#include +#include #endif #if 1 @@ -40,49 +40,49 @@ extern void XTestExtension1Init(INITARGS); #ifdef BIGREQS extern void BigReqExtensionInit(INITARGS); -#include +#include #endif #ifdef XSYNC extern void SyncExtensionInit(INITARGS); #define _SYNC_SERVER -#include -#include +#include +#include #endif #ifdef SCREENSAVER extern void ScreenSaverExtensionInit (INITARGS); -#include +#include #endif #ifdef XCMISC extern void XCMiscExtensionInit(INITARGS); -#include +#include #endif #ifdef XF86VIDMODE extern void XFree86VidModeExtensionInit(INITARGS); #define _XF86VIDMODE_SERVER_ -#include +#include #endif #ifdef XF86MISC extern void XFree86MiscExtensionInit(INITARGS); #define _XF86MISC_SERVER_ #define _XF86MISC_SAVER_COMPAT_ -#include +#include #endif #ifdef XFreeXDGA extern void XFree86DGAExtensionInit(INITARGS); extern void XFree86DGARegister(INITARGS); #define _XF86DGA_SERVER_ -#include +#include #endif #ifdef DPMSExtension extern void DPMSExtensionInit(INITARGS); -#include +#include #endif #ifdef FONTCACHE @@ -95,31 +95,31 @@ extern void FontCacheExtensionInit(INITARGS); #ifdef TOGCUP extern void XcupExtensionInit(INITARGS); #define _XCUP_SERVER_ -#include +#include #endif #ifdef EVI extern void EVIExtensionInit(INITARGS); #define _XEVI_SERVER_ -#include +#include #endif #ifdef XV extern void XvExtensionInit(INITARGS); extern void XvMCExtensionInit(INITARGS); extern void XvRegister(INITARGS); -#include -#include +#include +#include #endif #ifdef RES extern void ResExtensionInit(INITARGS); -#include +#include #endif #ifdef SHM extern void ShmExtensionInit(INITARGS); -#include +#include extern void ShmSetPixmapFormat( ScreenPtr pScreen, int format); diff --git a/nx-X11/programs/Xserver/Xext/fontcache.c b/nx-X11/programs/Xserver/Xext/fontcache.c index 9ab23a122..0956f9be9 100644 --- a/nx-X11/programs/Xserver/Xext/fontcache.c +++ b/nx-X11/programs/Xserver/Xext/fontcache.c @@ -37,8 +37,8 @@ #include #endif -#include -#include +#include +#include #include "misc.h" #include "dixstruct.h" #include "extnsionst.h" @@ -48,7 +48,7 @@ #define _FONTCACHE_SERVER_ #include "fontcacheP.h" #include "fontcachstr.h" -#include +#include #include "swaprep.h" #include "modinit.h" diff --git a/nx-X11/programs/Xserver/Xext/mbuf.c b/nx-X11/programs/Xserver/Xext/mbuf.c index 37024da19..e6dec8f6f 100644 --- a/nx-X11/programs/Xserver/Xext/mbuf.c +++ b/nx-X11/programs/Xserver/Xext/mbuf.c @@ -32,8 +32,8 @@ in this Software without prior written authorization from The Open Group. #include #endif -#include -#include +#include +#include #include "window.h" #include "os.h" #include "windowstr.h" @@ -46,7 +46,7 @@ in this Software without prior written authorization from The Open Group. #include "opaque.h" #include "sleepuntil.h" #define _MULTIBUF_SERVER_ /* don't want Xlib structures */ -#include +#include #ifdef EXTMODULE #include "xf86_ansic.h" diff --git a/nx-X11/programs/Xserver/Xext/mbufbf.c b/nx-X11/programs/Xserver/Xext/mbufbf.c index 84e7ee839..318fa6756 100644 --- a/nx-X11/programs/Xserver/Xext/mbufbf.c +++ b/nx-X11/programs/Xserver/Xext/mbufbf.c @@ -34,8 +34,8 @@ in this Software without prior written authorization from The Open Group. #endif #include -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "windowstr.h" @@ -53,7 +53,7 @@ in this Software without prior written authorization from The Open Group. #define _MULTIBUF_SERVER_ /* don't want Xlib structures */ #define _MULTIBUF_BUFFER_ -#include +#include /* Support for doublebuffer hardare diff --git a/nx-X11/programs/Xserver/Xext/mbufpx.c b/nx-X11/programs/Xserver/Xext/mbufpx.c index 0973fc324..0e9ae1628 100644 --- a/nx-X11/programs/Xserver/Xext/mbufpx.c +++ b/nx-X11/programs/Xserver/Xext/mbufpx.c @@ -33,8 +33,8 @@ in this Software without prior written authorization from The Open Group. #endif #include -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "windowstr.h" @@ -51,7 +51,7 @@ in this Software without prior written authorization from The Open Group. #define _MULTIBUF_SERVER_ /* don't want Xlib structures */ #define _MULTIBUF_PIXMAP_ -#include +#include static Bool NoopDDA_True() { return TRUE; } diff --git a/nx-X11/programs/Xserver/Xext/mitmisc.c b/nx-X11/programs/Xserver/Xext/mitmisc.c index f7b0ee55c..5c5183e69 100644 --- a/nx-X11/programs/Xserver/Xext/mitmisc.c +++ b/nx-X11/programs/Xserver/Xext/mitmisc.c @@ -34,14 +34,14 @@ in this Software without prior written authorization from The Open Group. #include #endif -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "dixstruct.h" #include "extnsionst.h" #define _MITMISC_SERVER_ -#include +#include #include "modinit.h" extern Bool permitOldBugs; diff --git a/nx-X11/programs/Xserver/Xext/panoramiX.c b/nx-X11/programs/Xserver/Xext/panoramiX.c index 2dc011e70..000c4bf04 100644 --- a/nx-X11/programs/Xserver/Xext/panoramiX.c +++ b/nx-X11/programs/Xserver/Xext/panoramiX.c @@ -35,9 +35,9 @@ Equipment Corporation. #define NEED_REPLIES #include -#include -#include -#include +#include +#include +#include #include "misc.h" #include "cursor.h" #include "cursorstr.h" @@ -50,7 +50,7 @@ Equipment Corporation. #include "windowstr.h" #include "pixmapstr.h" #include "panoramiX.h" -#include +#include #include "panoramiXsrv.h" #include "globals.h" #include "servermd.h" diff --git a/nx-X11/programs/Xserver/Xext/panoramiX.h b/nx-X11/programs/Xserver/Xext/panoramiX.h index 4178b985f..3f70b6473 100644 --- a/nx-X11/programs/Xserver/Xext/panoramiX.h +++ b/nx-X11/programs/Xserver/Xext/panoramiX.h @@ -43,7 +43,7 @@ Equipment Corporation. #ifndef _PANORAMIX_H_ #define _PANORAMIX_H_ -#include +#include /*#include "gcstruct.h"*/ diff --git a/nx-X11/programs/Xserver/Xext/panoramiXSwap.c b/nx-X11/programs/Xserver/Xext/panoramiXSwap.c index e0548df7b..955b81ed1 100644 --- a/nx-X11/programs/Xserver/Xext/panoramiXSwap.c +++ b/nx-X11/programs/Xserver/Xext/panoramiXSwap.c @@ -30,8 +30,8 @@ Equipment Corporation. #endif #include -#include -#include +#include +#include #include "misc.h" #include "cursor.h" #include "cursorstr.h" @@ -45,10 +45,10 @@ Equipment Corporation. #include "pixmapstr.h" #if 0 #include -#include +#include #endif #include "panoramiX.h" -#include +#include #include "panoramiXsrv.h" #include "globals.h" #include "panoramiXh.h" diff --git a/nx-X11/programs/Xserver/Xext/panoramiXprocs.c b/nx-X11/programs/Xserver/Xext/panoramiXprocs.c index 79a5a3290..2f2b2c63e 100644 --- a/nx-X11/programs/Xserver/Xext/panoramiXprocs.c +++ b/nx-X11/programs/Xserver/Xext/panoramiXprocs.c @@ -33,10 +33,10 @@ Equipment Corporation. #endif #include -#include +#include #define NEED_REPLIES #define NEED_EVENTS -#include +#include #include "windowstr.h" #include "dixfontstr.h" #include "gcstruct.h" diff --git a/nx-X11/programs/Xserver/Xext/sampleEVI.c b/nx-X11/programs/Xserver/Xext/sampleEVI.c index 500a585c9..598992742 100644 --- a/nx-X11/programs/Xserver/Xext/sampleEVI.c +++ b/nx-X11/programs/Xserver/Xext/sampleEVI.c @@ -27,13 +27,13 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #endif -#include -#include +#include +#include #include "dixstruct.h" #include "extnsionst.h" #include "dix.h" #define _XEVI_SERVER_ -#include +#include #include "EVIstruct.h" #include "scrnintstr.h" diff --git a/nx-X11/programs/Xserver/Xext/saver.c b/nx-X11/programs/Xserver/Xext/saver.c index 4a7fc054c..ec91d080a 100644 --- a/nx-X11/programs/Xserver/Xext/saver.c +++ b/nx-X11/programs/Xserver/Xext/saver.c @@ -36,8 +36,8 @@ in this Software without prior written authorization from the X Consortium. #include #endif -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "windowstr.h" @@ -47,7 +47,7 @@ in this Software without prior written authorization from the X Consortium. #include "dixstruct.h" #include "resource.h" #include "opaque.h" -#include +#include #include "gcstruct.h" #include "cursorstr.h" #include "colormapst.h" diff --git a/nx-X11/programs/Xserver/Xext/security.c b/nx-X11/programs/Xserver/Xext/security.c index 4bc49f408..bcc8574cb 100644 --- a/nx-X11/programs/Xserver/Xext/security.c +++ b/nx-X11/programs/Xserver/Xext/security.c @@ -57,19 +57,19 @@ in this Software without prior written authorization from The Open Group. #include "colormapst.h" #include "propertyst.h" #define _SECURITY_SERVER -#include +#include #include #include #ifdef LBX #define _XLBX_SERVER_ -#include +#include extern unsigned char LbxReqCode; #endif #ifdef XAPPGROUP -#include +#include #endif #include /* for file reading operations */ -#include /* for XA_STRING */ +#include /* for XA_STRING */ #ifdef NXAGENT_SERVER @@ -91,7 +91,7 @@ extern unsigned char LbxReqCode; #endif #if defined(WIN32) || defined(__CYGWIN__) -#include +#include #undef index #endif diff --git a/nx-X11/programs/Xserver/Xext/shape.c b/nx-X11/programs/Xserver/Xext/shape.c index 02182398a..78d3be319 100644 --- a/nx-X11/programs/Xserver/Xext/shape.c +++ b/nx-X11/programs/Xserver/Xext/shape.c @@ -33,8 +33,8 @@ in this Software without prior written authorization from The Open Group. #include #endif -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "windowstr.h" @@ -45,7 +45,7 @@ in this Software without prior written authorization from The Open Group. #include "resource.h" #include "opaque.h" #define _SHAPE_SERVER_ /* don't want Xlib structures */ -#include +#include #include "regionstr.h" #include "gcstruct.h" #ifdef EXTMODULE diff --git a/nx-X11/programs/Xserver/Xext/shm.c b/nx-X11/programs/Xserver/Xext/shm.c index d500e551c..6378a55a4 100644 --- a/nx-X11/programs/Xserver/Xext/shm.c +++ b/nx-X11/programs/Xserver/Xext/shm.c @@ -47,8 +47,8 @@ in this Software without prior written authorization from The Open Group. #include #define NEED_REPLIES #define NEED_EVENTS -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "dixstruct.h" @@ -60,8 +60,8 @@ in this Software without prior written authorization from The Open Group. #include "extnsionst.h" #include "servermd.h" #define _XSHM_SERVER_ -#include -#include +#include +#include #ifdef EXTMODULE #include "xf86_ansic.h" #endif diff --git a/nx-X11/programs/Xserver/Xext/sleepuntil.c b/nx-X11/programs/Xserver/Xext/sleepuntil.c index da93806f5..62f946cf8 100644 --- a/nx-X11/programs/Xserver/Xext/sleepuntil.c +++ b/nx-X11/programs/Xserver/Xext/sleepuntil.c @@ -34,8 +34,8 @@ in this Software without prior written authorization from The Open Group. #endif #include "sleepuntil.h" -#include -#include +#include +#include #include "misc.h" #include "windowstr.h" #include "dixstruct.h" diff --git a/nx-X11/programs/Xserver/Xext/sync.c b/nx-X11/programs/Xserver/Xext/sync.c index 006cefa86..c122e2860 100644 --- a/nx-X11/programs/Xserver/Xext/sync.c +++ b/nx-X11/programs/Xserver/Xext/sync.c @@ -58,9 +58,9 @@ PERFORMANCE OF THIS SOFTWARE. #include #endif -#include -#include -#include +#include +#include +#include #include "misc.h" #include "os.h" #include "extnsionst.h" @@ -68,8 +68,8 @@ PERFORMANCE OF THIS SOFTWARE. #include "resource.h" #include "opaque.h" #define _SYNC_SERVER -#include -#include +#include +#include #ifdef EXTMODULE #include "xf86_ansic.h" diff --git a/nx-X11/programs/Xserver/Xext/xcmisc.c b/nx-X11/programs/Xserver/Xext/xcmisc.c index 0a9a09069..1d7ad0e09 100644 --- a/nx-X11/programs/Xserver/Xext/xcmisc.c +++ b/nx-X11/programs/Xserver/Xext/xcmisc.c @@ -34,14 +34,14 @@ from The Open Group. #include #endif -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "dixstruct.h" #include "extnsionst.h" #include "swaprep.h" -#include +#include #include "modinit.h" #if HAVE_STDINT_H diff --git a/nx-X11/programs/Xserver/Xext/xevie.c b/nx-X11/programs/Xserver/Xext/xevie.c index 354be121f..eb38d9223 100644 --- a/nx-X11/programs/Xserver/Xext/xevie.c +++ b/nx-X11/programs/Xserver/Xext/xevie.c @@ -38,8 +38,8 @@ of the copyright holder. #include #endif -#include -#include +#include +#include #include "misc.h" #include "dixstruct.h" #include "extnsionst.h" @@ -47,13 +47,13 @@ of the copyright holder. #include "scrnintstr.h" #include "servermd.h" #define _XEVIE_SERVER_ -#include -#include +#include +#include #include "input.h" #include "inputstr.h" #include "windowstr.h" #include "cursorstr.h" -#include +#include #include "../os/osdep.h" diff --git a/nx-X11/programs/Xserver/Xext/xf86bigfont.c b/nx-X11/programs/Xserver/Xext/xf86bigfont.c index 36af17622..c0cc7f938 100644 --- a/nx-X11/programs/Xserver/Xext/xf86bigfont.c +++ b/nx-X11/programs/Xserver/Xext/xf86bigfont.c @@ -64,8 +64,8 @@ #include #endif -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "dixstruct.h" @@ -74,7 +74,7 @@ #include "extnsionst.h" #define _XF86BIGFONT_SERVER_ -#include +#include static void XF86BigfontResetProc( ExtensionEntry * /* extEntry */ diff --git a/nx-X11/programs/Xserver/Xext/xf86dga.c b/nx-X11/programs/Xserver/Xext/xf86dga.c index 9979bfb30..074118c18 100644 --- a/nx-X11/programs/Xserver/Xext/xf86dga.c +++ b/nx-X11/programs/Xserver/Xext/xf86dga.c @@ -13,8 +13,8 @@ Copyright (c) 1995, 1996, 1999 XFree86 Inc #define NEED_REPLIES #define NEED_EVENTS -#include -#include +#include +#include #include "misc.h" #include "dixstruct.h" #include "extnsionst.h" @@ -23,8 +23,8 @@ Copyright (c) 1995, 1996, 1999 XFree86 Inc #include "scrnintstr.h" #include "servermd.h" #define _XF86DGA_SERVER_ -#include -#include +#include +#include #include "swaprep.h" #include "dgaproc.h" diff --git a/nx-X11/programs/Xserver/Xext/xf86dga2.c b/nx-X11/programs/Xserver/Xext/xf86dga2.c index 490554d9a..c2b64b048 100644 --- a/nx-X11/programs/Xserver/Xext/xf86dga2.c +++ b/nx-X11/programs/Xserver/Xext/xf86dga2.c @@ -12,8 +12,8 @@ #define NEED_REPLIES #define NEED_EVENTS -#include -#include +#include +#include #include "misc.h" #include "dixstruct.h" #include "dixevents.h" @@ -24,8 +24,8 @@ #include "scrnintstr.h" #include "servermd.h" #define _XF86DGA_SERVER_ -#include -#include +#include +#include #include "swaprep.h" #include "dgaproc.h" #include "xf86dgaext.h" diff --git a/nx-X11/programs/Xserver/Xext/xf86misc.c b/nx-X11/programs/Xserver/Xext/xf86misc.c index 6de794e1f..ccf983fae 100644 --- a/nx-X11/programs/Xserver/Xext/xf86misc.c +++ b/nx-X11/programs/Xserver/Xext/xf86misc.c @@ -12,8 +12,8 @@ #define NEED_REPLIES #define NEED_EVENTS -#include -#include +#include +#include #include "misc.h" #include "dixstruct.h" #include "extnsionst.h" @@ -22,16 +22,16 @@ #include "servermd.h" #define _XF86MISC_SERVER_ #undef _XF86MISC_SAVER_COMPAT_ -#include +#include #include "swaprep.h" #include "xf86.h" -#include +#include #include "xf86miscproc.h" #if 0 -#include +#include #include "../os/osdep.h" -#include +#include #ifndef USL #ifndef Lynx #include diff --git a/nx-X11/programs/Xserver/Xext/xf86vmode.c b/nx-X11/programs/Xserver/Xext/xf86vmode.c index 979f55c00..0595343c9 100644 --- a/nx-X11/programs/Xserver/Xext/xf86vmode.c +++ b/nx-X11/programs/Xserver/Xext/xf86vmode.c @@ -39,15 +39,15 @@ from Kaleb S. KEITHLEY #define NEED_REPLIES #define NEED_EVENTS -#include -#include +#include +#include #include "misc.h" #include "dixstruct.h" #include "extnsionst.h" #include "scrnintstr.h" #include "servermd.h" #define _XF86VIDMODE_SERVER_ -#include +#include #include "swaprep.h" #include "xf86.h" #include "vidmodeproc.h" diff --git a/nx-X11/programs/Xserver/Xext/xres.c b/nx-X11/programs/Xserver/Xext/xres.c index dc4018dd7..7b3555452 100644 --- a/nx-X11/programs/Xserver/Xext/xres.c +++ b/nx-X11/programs/Xserver/Xext/xres.c @@ -10,14 +10,14 @@ #include #endif -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "dixstruct.h" #include "extnsionst.h" #include "swaprep.h" -#include +#include #include "pixmapstr.h" #include "modinit.h" diff --git a/nx-X11/programs/Xserver/Xext/xtest.c b/nx-X11/programs/Xserver/Xext/xtest.c index 994b0c502..d9adc03c0 100644 --- a/nx-X11/programs/Xserver/Xext/xtest.c +++ b/nx-X11/programs/Xserver/Xext/xtest.c @@ -33,9 +33,9 @@ from The Open Group. #include #endif -#include +#include #define NEED_EVENTS -#include +#include #include "misc.h" #include "os.h" #include "dixstruct.h" @@ -46,11 +46,11 @@ from The Open Group. #include "dixevents.h" #include "sleepuntil.h" #define _XTEST_SERVER_ -#include -#include +#include +#include #ifdef XINPUT -#include -#include +#include +#include #define EXTENSION_EVENT_BASE 64 #include "extinit.h" /* LookupDeviceIntRec */ #endif /* XINPUT */ diff --git a/nx-X11/programs/Xserver/Xext/xtest1dd.c b/nx-X11/programs/Xserver/Xext/xtest1dd.c index c78cceed0..c945fd6bd 100644 --- a/nx-X11/programs/Xserver/Xext/xtest1dd.c +++ b/nx-X11/programs/Xserver/Xext/xtest1dd.c @@ -66,14 +66,14 @@ University of California. #endif #include -#include -#include -#include -#include +#include +#include +#include +#include #include "misc.h" #include "dixstruct.h" #define XTestSERVER_SIDE -#include +#include #include "xtest1dd.h" diff --git a/nx-X11/programs/Xserver/Xext/xtest1di.c b/nx-X11/programs/Xserver/Xext/xtest1di.c index 985193a89..e7c3522ba 100644 --- a/nx-X11/programs/Xserver/Xext/xtest1di.c +++ b/nx-X11/programs/Xserver/Xext/xtest1di.c @@ -67,8 +67,8 @@ University of California. #endif #include -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "gcstruct.h" @@ -76,7 +76,7 @@ University of California. #include "dixstruct.h" #include "opaque.h" #define XTestSERVER_SIDE -#include +#include #include "modinit.h" #include "xtest1dd.h" diff --git a/nx-X11/programs/Xserver/Xext/xvdisp.c b/nx-X11/programs/Xserver/Xext/xvdisp.c index b361c0ff3..8037e6c45 100644 --- a/nx-X11/programs/Xserver/Xext/xvdisp.c +++ b/nx-X11/programs/Xserver/Xext/xvdisp.c @@ -52,8 +52,8 @@ SOFTWARE. #include #endif -#include -#include +#include +#include #include "misc.h" #include "scrnintstr.h" #include "windowstr.h" @@ -63,12 +63,12 @@ SOFTWARE. #include "resource.h" #include "opaque.h" -#include -#include +#include +#include #include "xvdix.h" #ifdef MITSHM #define _XSHM_SERVER_ -#include +#include #endif #ifdef EXTMODULE diff --git a/nx-X11/programs/Xserver/Xext/xvdix.h b/nx-X11/programs/Xserver/Xext/xvdix.h index 99d918406..6e6e07302 100644 --- a/nx-X11/programs/Xserver/Xext/xvdix.h +++ b/nx-X11/programs/Xserver/Xext/xvdix.h @@ -54,7 +54,7 @@ SOFTWARE. */ #include "scrnintstr.h" -#include +#include extern int XvScreenIndex; extern unsigned long XvExtensionGeneration; diff --git a/nx-X11/programs/Xserver/Xext/xvmain.c b/nx-X11/programs/Xserver/Xext/xvmain.c index bbbb34dcf..571bb9c46 100644 --- a/nx-X11/programs/Xserver/Xext/xvmain.c +++ b/nx-X11/programs/Xserver/Xext/xvmain.c @@ -79,8 +79,8 @@ SOFTWARE. #include #endif -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "scrnintstr.h" @@ -95,8 +95,8 @@ SOFTWARE. #define GLOBAL -#include -#include +#include +#include #include "xvdix.h" #ifdef EXTMODULE diff --git a/nx-X11/programs/Xserver/Xext/xvmc.c b/nx-X11/programs/Xserver/Xext/xvmc.c index 30de35a2b..b1441fa1d 100644 --- a/nx-X11/programs/Xserver/Xext/xvmc.c +++ b/nx-X11/programs/Xserver/Xext/xvmc.c @@ -6,8 +6,8 @@ #include #endif -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "dixstruct.h" @@ -15,11 +15,11 @@ #include "scrnintstr.h" #include "extnsionst.h" #include "servermd.h" -#include +#include #include "xvdix.h" -#include -#include -#include +#include +#include +#include #include "xvmcext.h" #ifdef HAS_XVMCSHM diff --git a/nx-X11/programs/Xserver/Xext/xvmcext.h b/nx-X11/programs/Xserver/Xext/xvmcext.h index 7cb8af24d..b92a53225 100644 --- a/nx-X11/programs/Xserver/Xext/xvmcext.h +++ b/nx-X11/programs/Xserver/Xext/xvmcext.h @@ -2,7 +2,7 @@ #ifndef _XVMC_H #define _XVMC_H -#include +#include #include "xvdix.h" typedef struct { diff --git a/nx-X11/programs/Xserver/Xext/xvmod.c b/nx-X11/programs/Xserver/Xext/xvmod.c index 7899f3a75..258023f65 100644 --- a/nx-X11/programs/Xserver/Xext/xvmod.c +++ b/nx-X11/programs/Xserver/Xext/xvmod.c @@ -4,12 +4,12 @@ #include #endif -#include +#include #include "misc.h" #include "scrnintstr.h" #include "gc.h" -#include -#include +#include +#include #include "xvdix.h" #include "xvmodproc.h" diff --git a/nx-X11/programs/Xserver/Xi/allowev.c b/nx-X11/programs/Xserver/Xi/allowev.c index c1df7eb73..8073649f1 100644 --- a/nx-X11/programs/Xserver/Xi/allowev.c +++ b/nx-X11/programs/Xserver/Xi/allowev.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ diff --git a/nx-X11/programs/Xserver/Xi/chgdctl.c b/nx-X11/programs/Xserver/Xi/chgdctl.c index 144a51ed4..c4fa46ba7 100644 --- a/nx-X11/programs/Xserver/Xi/chgdctl.c +++ b/nx-X11/programs/Xserver/Xi/chgdctl.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include /* control constants */ +#include +#include /* control constants */ #include "XIstubs.h" #include "extnsionst.h" diff --git a/nx-X11/programs/Xserver/Xi/chgfctl.c b/nx-X11/programs/Xserver/Xi/chgfctl.c index 3ffac39b3..d78b32a17 100644 --- a/nx-X11/programs/Xserver/Xi/chgfctl.c +++ b/nx-X11/programs/Xserver/Xi/chgfctl.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include /* control constants */ +#include +#include /* control constants */ #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ diff --git a/nx-X11/programs/Xserver/Xi/chgkbd.c b/nx-X11/programs/Xserver/Xi/chgkbd.c index a8a6024d8..136d257c6 100644 --- a/nx-X11/programs/Xserver/Xi/chgkbd.c +++ b/nx-X11/programs/Xserver/Xi/chgkbd.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "XIstubs.h" #include "globals.h" #include "extnsionst.h" diff --git a/nx-X11/programs/Xserver/Xi/chgkmap.c b/nx-X11/programs/Xserver/Xi/chgkmap.c index 3df376d9a..88afd9df7 100644 --- a/nx-X11/programs/Xserver/Xi/chgkmap.c +++ b/nx-X11/programs/Xserver/Xi/chgkmap.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exevents.h" diff --git a/nx-X11/programs/Xserver/Xi/chgprop.c b/nx-X11/programs/Xserver/Xi/chgprop.c index 6e345d554..47db87293 100644 --- a/nx-X11/programs/Xserver/Xi/chgprop.c +++ b/nx-X11/programs/Xserver/Xi/chgprop.c @@ -59,12 +59,12 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" -#include -#include +#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ diff --git a/nx-X11/programs/Xserver/Xi/chgptr.c b/nx-X11/programs/Xserver/Xi/chgptr.c index bf2abd6b6..925d43c07 100644 --- a/nx-X11/programs/Xserver/Xi/chgptr.c +++ b/nx-X11/programs/Xserver/Xi/chgptr.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "XIstubs.h" #include "windowstr.h" /* window structure */ #include "scrnintstr.h" /* screen structure */ diff --git a/nx-X11/programs/Xserver/Xi/closedev.c b/nx-X11/programs/Xserver/Xi/closedev.c index 8a57aeeee..ae46f50c6 100644 --- a/nx-X11/programs/Xserver/Xi/closedev.c +++ b/nx-X11/programs/Xserver/Xi/closedev.c @@ -59,13 +59,13 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ #include "scrnintstr.h" /* screen structure */ -#include -#include +#include +#include #include "XIstubs.h" #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ diff --git a/nx-X11/programs/Xserver/Xi/devbell.c b/nx-X11/programs/Xserver/Xi/devbell.c index 190e32086..12c444137 100644 --- a/nx-X11/programs/Xserver/Xi/devbell.c +++ b/nx-X11/programs/Xserver/Xi/devbell.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" diff --git a/nx-X11/programs/Xserver/Xi/exevents.c b/nx-X11/programs/Xserver/Xi/exevents.c index f0c9aea3d..ce5fe9ec9 100644 --- a/nx-X11/programs/Xserver/Xi/exevents.c +++ b/nx-X11/programs/Xserver/Xi/exevents.c @@ -59,10 +59,10 @@ SOFTWARE. #include #endif -#include -#include -#include -#include +#include +#include +#include +#include #include "inputstr.h" #include "windowstr.h" #include "miscstruct.h" diff --git a/nx-X11/programs/Xserver/Xi/extinit.c b/nx-X11/programs/Xserver/Xi/extinit.c index 0b27b5cf7..750fa46cb 100644 --- a/nx-X11/programs/Xserver/Xi/extinit.c +++ b/nx-X11/programs/Xserver/Xi/extinit.c @@ -61,13 +61,13 @@ SOFTWARE. #include #endif -#include -#include +#include +#include #include "inputstr.h" #include "gcstruct.h" /* pointer for extnsionst.h*/ #include "extnsionst.h" /* extension entry */ -#include -#include +#include +#include #include "dixevents.h" #include "exevents.h" diff --git a/nx-X11/programs/Xserver/Xi/getbmap.c b/nx-X11/programs/Xserver/Xi/getbmap.c index a944d4cc8..ac2b69749 100644 --- a/nx-X11/programs/Xserver/Xi/getbmap.c +++ b/nx-X11/programs/Xserver/Xi/getbmap.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" diff --git a/nx-X11/programs/Xserver/Xi/getdctl.c b/nx-X11/programs/Xserver/Xi/getdctl.c index 527273ac4..d8c310d92 100644 --- a/nx-X11/programs/Xserver/Xi/getdctl.c +++ b/nx-X11/programs/Xserver/Xi/getdctl.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" diff --git a/nx-X11/programs/Xserver/Xi/getfctl.c b/nx-X11/programs/Xserver/Xi/getfctl.c index 5652ad303..c6cb8457c 100644 --- a/nx-X11/programs/Xserver/Xi/getfctl.c +++ b/nx-X11/programs/Xserver/Xi/getfctl.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" diff --git a/nx-X11/programs/Xserver/Xi/getfocus.c b/nx-X11/programs/Xserver/Xi/getfocus.c index 3c1597cc9..61a98f1bf 100644 --- a/nx-X11/programs/Xserver/Xi/getfocus.c +++ b/nx-X11/programs/Xserver/Xi/getfocus.c @@ -59,12 +59,12 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "windowstr.h" /* focus struct */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" diff --git a/nx-X11/programs/Xserver/Xi/getkmap.c b/nx-X11/programs/Xserver/Xi/getkmap.c index 4e67d9c71..fe8fd9b22 100644 --- a/nx-X11/programs/Xserver/Xi/getkmap.c +++ b/nx-X11/programs/Xserver/Xi/getkmap.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" diff --git a/nx-X11/programs/Xserver/Xi/getmmap.c b/nx-X11/programs/Xserver/Xi/getmmap.c index 6b2e38d0b..203799103 100644 --- a/nx-X11/programs/Xserver/Xi/getmmap.c +++ b/nx-X11/programs/Xserver/Xi/getmmap.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include /* Request macro */ +#include +#include /* Request macro */ #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" diff --git a/nx-X11/programs/Xserver/Xi/getprop.c b/nx-X11/programs/Xserver/Xi/getprop.c index 2b4de1f3e..ac37617ec 100644 --- a/nx-X11/programs/Xserver/Xi/getprop.c +++ b/nx-X11/programs/Xserver/Xi/getprop.c @@ -59,12 +59,12 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structs */ -#include -#include +#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" diff --git a/nx-X11/programs/Xserver/Xi/getselev.c b/nx-X11/programs/Xserver/Xi/getselev.c index c2ec2b9d5..7cd97b5ef 100644 --- a/nx-X11/programs/Xserver/Xi/getselev.c +++ b/nx-X11/programs/Xserver/Xi/getselev.c @@ -59,10 +59,10 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ -#include -#include +#include /* for inputstr.h */ +#include /* Request macro */ +#include +#include #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window struct */ #include "extnsionst.h" diff --git a/nx-X11/programs/Xserver/Xi/getvers.c b/nx-X11/programs/Xserver/Xi/getvers.c index 3a335dd31..7743e797f 100644 --- a/nx-X11/programs/Xserver/Xi/getvers.c +++ b/nx-X11/programs/Xserver/Xi/getvers.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" diff --git a/nx-X11/programs/Xserver/Xi/grabdev.c b/nx-X11/programs/Xserver/Xi/grabdev.c index 21e920a35..865263688 100644 --- a/nx-X11/programs/Xserver/Xi/grabdev.c +++ b/nx-X11/programs/Xserver/Xi/grabdev.c @@ -60,12 +60,12 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ -#include -#include +#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" diff --git a/nx-X11/programs/Xserver/Xi/grabdevb.c b/nx-X11/programs/Xserver/Xi/grabdevb.c index ad43c29a0..9a20345be 100644 --- a/nx-X11/programs/Xserver/Xi/grabdevb.c +++ b/nx-X11/programs/Xserver/Xi/grabdevb.c @@ -59,12 +59,12 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ -#include -#include +#include +#include #include "exevents.h" #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ diff --git a/nx-X11/programs/Xserver/Xi/grabdevk.c b/nx-X11/programs/Xserver/Xi/grabdevk.c index 952c5d89a..73b8690b9 100644 --- a/nx-X11/programs/Xserver/Xi/grabdevk.c +++ b/nx-X11/programs/Xserver/Xi/grabdevk.c @@ -59,12 +59,12 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ -#include -#include +#include +#include #include "exevents.h" #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ diff --git a/nx-X11/programs/Xserver/Xi/gtmotion.c b/nx-X11/programs/Xserver/Xi/gtmotion.c index 02b1fee32..ec26ae407 100644 --- a/nx-X11/programs/Xserver/Xi/gtmotion.c +++ b/nx-X11/programs/Xserver/Xi/gtmotion.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exevents.h" diff --git a/nx-X11/programs/Xserver/Xi/listdev.c b/nx-X11/programs/Xserver/Xi/listdev.c index 6228352f5..e99584d0e 100644 --- a/nx-X11/programs/Xserver/Xi/listdev.c +++ b/nx-X11/programs/Xserver/Xi/listdev.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "XIstubs.h" #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ diff --git a/nx-X11/programs/Xserver/Xi/opendev.c b/nx-X11/programs/Xserver/Xi/opendev.c index 520c6832a..054dae159 100644 --- a/nx-X11/programs/Xserver/Xi/opendev.c +++ b/nx-X11/programs/Xserver/Xi/opendev.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "XIstubs.h" #include "windowstr.h" /* window structure */ #include "extnsionst.h" diff --git a/nx-X11/programs/Xserver/Xi/queryst.c b/nx-X11/programs/Xserver/Xi/queryst.c index 34b140c8e..af2b4301d 100644 --- a/nx-X11/programs/Xserver/Xi/queryst.c +++ b/nx-X11/programs/Xserver/Xi/queryst.c @@ -40,12 +40,12 @@ from The Open Group. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ -#include -#include +#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exevents.h" diff --git a/nx-X11/programs/Xserver/Xi/selectev.c b/nx-X11/programs/Xserver/Xi/selectev.c index a9b731864..de29fcf59 100644 --- a/nx-X11/programs/Xserver/Xi/selectev.c +++ b/nx-X11/programs/Xserver/Xi/selectev.c @@ -60,12 +60,12 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ -#include -#include +#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exevents.h" diff --git a/nx-X11/programs/Xserver/Xi/sendexev.c b/nx-X11/programs/Xserver/Xi/sendexev.c index 0b2a701bb..9decfadab 100644 --- a/nx-X11/programs/Xserver/Xi/sendexev.c +++ b/nx-X11/programs/Xserver/Xi/sendexev.c @@ -60,12 +60,12 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* Window */ -#include -#include +#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exevents.h" diff --git a/nx-X11/programs/Xserver/Xi/setbmap.c b/nx-X11/programs/Xserver/Xi/setbmap.c index 37db5110d..74b8e3c05 100644 --- a/nx-X11/programs/Xserver/Xi/setbmap.c +++ b/nx-X11/programs/Xserver/Xi/setbmap.c @@ -62,11 +62,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "exevents.h" #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ diff --git a/nx-X11/programs/Xserver/Xi/setdval.c b/nx-X11/programs/Xserver/Xi/setdval.c index 9b5b1e20d..04f55d4fc 100644 --- a/nx-X11/programs/Xserver/Xi/setdval.c +++ b/nx-X11/programs/Xserver/Xi/setdval.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "XIstubs.h" #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ diff --git a/nx-X11/programs/Xserver/Xi/setfocus.c b/nx-X11/programs/Xserver/Xi/setfocus.c index a1dd09d71..b9a495612 100644 --- a/nx-X11/programs/Xserver/Xi/setfocus.c +++ b/nx-X11/programs/Xserver/Xi/setfocus.c @@ -59,12 +59,12 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "windowstr.h" /* focus struct */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "dixevents.h" diff --git a/nx-X11/programs/Xserver/Xi/setmmap.c b/nx-X11/programs/Xserver/Xi/setmmap.c index 3fa2c7e7e..9fd8e7244 100644 --- a/nx-X11/programs/Xserver/Xi/setmmap.c +++ b/nx-X11/programs/Xserver/Xi/setmmap.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "exevents.h" #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ diff --git a/nx-X11/programs/Xserver/Xi/setmode.c b/nx-X11/programs/Xserver/Xi/setmode.c index f95ef5514..17c46515d 100644 --- a/nx-X11/programs/Xserver/Xi/setmode.c +++ b/nx-X11/programs/Xserver/Xi/setmode.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ -#include -#include +#include +#include #include "XIstubs.h" #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ diff --git a/nx-X11/programs/Xserver/Xi/stubs.c b/nx-X11/programs/Xserver/Xi/stubs.c index 2d9aad08b..33c55d3b7 100644 --- a/nx-X11/programs/Xserver/Xi/stubs.c +++ b/nx-X11/programs/Xserver/Xi/stubs.c @@ -62,11 +62,11 @@ SOFTWARE. #include #endif -#include -#include +#include +#include #include "inputstr.h" -#include -#include +#include +#include #include "XIstubs.h" /*********************************************************************** diff --git a/nx-X11/programs/Xserver/Xi/ungrdev.c b/nx-X11/programs/Xserver/Xi/ungrdev.c index 8de4cd225..b318fa044 100644 --- a/nx-X11/programs/Xserver/Xi/ungrdev.c +++ b/nx-X11/programs/Xserver/Xi/ungrdev.c @@ -59,11 +59,11 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ -#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" diff --git a/nx-X11/programs/Xserver/Xi/ungrdevb.c b/nx-X11/programs/Xserver/Xi/ungrdevb.c index 8927a5c6e..a76f9692c 100644 --- a/nx-X11/programs/Xserver/Xi/ungrdevb.c +++ b/nx-X11/programs/Xserver/Xi/ungrdevb.c @@ -59,12 +59,12 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ -#include -#include +#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" diff --git a/nx-X11/programs/Xserver/Xi/ungrdevk.c b/nx-X11/programs/Xserver/Xi/ungrdevk.c index 38cfa1b71..928b602f1 100644 --- a/nx-X11/programs/Xserver/Xi/ungrdevk.c +++ b/nx-X11/programs/Xserver/Xi/ungrdevk.c @@ -59,12 +59,12 @@ SOFTWARE. #include #endif -#include /* for inputstr.h */ -#include /* Request macro */ +#include /* for inputstr.h */ +#include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ -#include -#include +#include +#include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" diff --git a/nx-X11/programs/Xserver/composite/compint.h b/nx-X11/programs/Xserver/composite/compint.h index 9a6a22f48..262d95108 100644 --- a/nx-X11/programs/Xserver/composite/compint.h +++ b/nx-X11/programs/Xserver/composite/compint.h @@ -50,7 +50,7 @@ #include "damage.h" #include "damageextint.h" #include "xfixes.h" -#include +#include #include /* diff --git a/nx-X11/programs/Xserver/damageext/damageextint.h b/nx-X11/programs/Xserver/damageext/damageextint.h index ab00effe3..d2f9d71ac 100644 --- a/nx-X11/programs/Xserver/damageext/damageextint.h +++ b/nx-X11/programs/Xserver/damageext/damageextint.h @@ -30,8 +30,8 @@ #define _DAMAGEEXTINT_H_ #define NEED_EVENTS -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "dixstruct.h" diff --git a/nx-X11/programs/Xserver/dbe/dbe.c b/nx-X11/programs/Xserver/dbe/dbe.c index ad5294a4c..064987dec 100644 --- a/nx-X11/programs/Xserver/dbe/dbe.c +++ b/nx-X11/programs/Xserver/dbe/dbe.c @@ -41,8 +41,8 @@ #include #endif -#include -#include +#include +#include #include "scrnintstr.h" #include "extnsionst.h" #include "gcstruct.h" diff --git a/nx-X11/programs/Xserver/dbe/dbestruct.h b/nx-X11/programs/Xserver/dbe/dbestruct.h index 69135a837..43c4c525b 100644 --- a/nx-X11/programs/Xserver/dbe/dbestruct.h +++ b/nx-X11/programs/Xserver/dbe/dbestruct.h @@ -39,7 +39,7 @@ /* INCLUDES */ #define NEED_DBE_PROTOCOL -#include +#include #include "windowstr.h" diff --git a/nx-X11/programs/Xserver/dbe/midbe.c b/nx-X11/programs/Xserver/dbe/midbe.c index 042f95953..b8383e11a 100644 --- a/nx-X11/programs/Xserver/dbe/midbe.c +++ b/nx-X11/programs/Xserver/dbe/midbe.c @@ -41,8 +41,8 @@ #include #endif -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "windowstr.h" diff --git a/nx-X11/programs/Xserver/dix/atom.c b/nx-X11/programs/Xserver/dix/atom.c index 207174280..583f2dafc 100644 --- a/nx-X11/programs/Xserver/dix/atom.c +++ b/nx-X11/programs/Xserver/dix/atom.c @@ -52,8 +52,8 @@ SOFTWARE. #include #endif -#include -#include +#include +#include #include "misc.h" #include "resource.h" #include "dix.h" diff --git a/nx-X11/programs/Xserver/dix/colormap.c b/nx-X11/programs/Xserver/dix/colormap.c index 32d9bae89..11a353f84 100644 --- a/nx-X11/programs/Xserver/dix/colormap.c +++ b/nx-X11/programs/Xserver/dix/colormap.c @@ -53,9 +53,9 @@ SOFTWARE. #include #endif -#include +#include #define NEED_EVENTS -#include +#include #include "misc.h" #include "dix.h" #include "colormapst.h" diff --git a/nx-X11/programs/Xserver/dix/cursor.c b/nx-X11/programs/Xserver/dix/cursor.c index 187dd62c5..1e1dba36b 100644 --- a/nx-X11/programs/Xserver/dix/cursor.c +++ b/nx-X11/programs/Xserver/dix/cursor.c @@ -53,8 +53,8 @@ SOFTWARE. #include #endif -#include -#include +#include +#include #include "servermd.h" #include "scrnintstr.h" #include "dixstruct.h" diff --git a/nx-X11/programs/Xserver/dix/devices.c b/nx-X11/programs/Xserver/dix/devices.c index 917a3849a..91a92644c 100644 --- a/nx-X11/programs/Xserver/dix/devices.c +++ b/nx-X11/programs/Xserver/dix/devices.c @@ -54,12 +54,12 @@ SOFTWARE. #include #endif -#include +#include #include "misc.h" #include "resource.h" #define NEED_EVENTS #define NEED_REPLIES -#include +#include #include "windowstr.h" #include "inputstr.h" #include "scrnintstr.h" @@ -68,11 +68,11 @@ SOFTWARE. #include "site.h" #define XKB_IN_SERVER #ifdef XKB -#include +#include #endif #ifdef XCSECURITY #define _SECURITY_SERVER -#include +#include #endif #ifdef LBX #include "lbxserve.h" diff --git a/nx-X11/programs/Xserver/dix/dispatch.c b/nx-X11/programs/Xserver/dix/dispatch.c index 71c22ae0e..b6010e627 100644 --- a/nx-X11/programs/Xserver/dix/dispatch.c +++ b/nx-X11/programs/Xserver/dix/dispatch.c @@ -109,15 +109,15 @@ int ProcInitialConnection(); #endif #ifdef XCSECURITY #define _SECURITY_SERVER -#include +#include #endif #ifdef XAPPGROUP -#include +#include #endif #ifdef XKB #define XKB_IN_SERVER #include "inputstr.h" -#include +#include #endif #ifdef LBX #include "lbxserve.h" diff --git a/nx-X11/programs/Xserver/dix/dixfonts.c b/nx-X11/programs/Xserver/dix/dixfonts.c index fac918963..6e515300d 100644 --- a/nx-X11/programs/Xserver/dix/dixfonts.c +++ b/nx-X11/programs/Xserver/dix/dixfonts.c @@ -56,9 +56,9 @@ Equipment Corporation. #include #endif -#include -#include -#include +#include +#include +#include #include "scrnintstr.h" #include "resource.h" #include "dixstruct.h" @@ -139,7 +139,7 @@ _NXGetFontPathError: #ifdef XF86BIGFONT #define _XF86BIGFONT_SERVER_ -#include +#include #endif #define QUERYCHARINFO(pci, pr) *(pr) = (pci)->metrics diff --git a/nx-X11/programs/Xserver/dix/dixutils.c b/nx-X11/programs/Xserver/dix/dixutils.c index f3b3373d0..8bcfce619 100644 --- a/nx-X11/programs/Xserver/dix/dixutils.c +++ b/nx-X11/programs/Xserver/dix/dixutils.c @@ -88,18 +88,18 @@ Author: Adobe Systems Incorporated #include #endif -#include -#include +#include +#include #include "misc.h" #include "windowstr.h" #include "dixstruct.h" #include "pixmapstr.h" #include "scrnintstr.h" #define XK_LATIN1 -#include +#include #ifdef XCSECURITY #define _SECURITY_SERVER -#include +#include #endif /* diff --git a/nx-X11/programs/Xserver/dix/events.c b/nx-X11/programs/Xserver/dix/events.c index ab995a772..1166bf84b 100644 --- a/nx-X11/programs/Xserver/dix/events.c +++ b/nx-X11/programs/Xserver/dix/events.c @@ -115,12 +115,12 @@ of the copyright holder. #include #endif -#include +#include #include "misc.h" #include "resource.h" #define NEED_EVENTS #define NEED_REPLIES -#include +#include #include "windowstr.h" #include "inputstr.h" #include "scrnintstr.h" @@ -134,13 +134,13 @@ of the copyright holder. #include "globals.h" #ifdef XKB -#include +#include extern Bool XkbFilterEvents(ClientPtr, int, xEvent *); #endif #ifdef XCSECURITY #define _SECURITY_SERVER -#include +#include #endif #ifdef XEVIE @@ -157,7 +157,7 @@ int xeviegrabState = 0; xEvent *xeviexE; #endif -#include +#include #include "exevents.h" #include "extnsionst.h" diff --git a/nx-X11/programs/Xserver/dix/extension.c b/nx-X11/programs/Xserver/dix/extension.c index 19333c151..dd6de9c63 100644 --- a/nx-X11/programs/Xserver/dix/extension.c +++ b/nx-X11/programs/Xserver/dix/extension.c @@ -51,10 +51,10 @@ SOFTWARE. #include #endif -#include +#include #define NEED_EVENTS #define NEED_REPLIES -#include +#include #include "misc.h" #include "dixstruct.h" #include "extnsionst.h" @@ -63,7 +63,7 @@ SOFTWARE. #include "dispatch.h" #ifdef XCSECURITY #define _SECURITY_SERVER -#include +#include #endif #ifdef LBX #include "lbxserve.h" diff --git a/nx-X11/programs/Xserver/dix/gc.c b/nx-X11/programs/Xserver/dix/gc.c index 834919946..2c17de3d6 100644 --- a/nx-X11/programs/Xserver/dix/gc.c +++ b/nx-X11/programs/Xserver/dix/gc.c @@ -52,9 +52,9 @@ SOFTWARE. #include #endif -#include -#include -#include +#include +#include +#include #include "misc.h" #include "resource.h" #include "gcstruct.h" diff --git a/nx-X11/programs/Xserver/dix/globals.c b/nx-X11/programs/Xserver/dix/globals.c index 15eedf602..e4f43fd01 100644 --- a/nx-X11/programs/Xserver/dix/globals.c +++ b/nx-X11/programs/Xserver/dix/globals.c @@ -53,8 +53,8 @@ SOFTWARE. #include #endif -#include -#include +#include +#include #include "misc.h" #include "windowstr.h" #include "scrnintstr.h" diff --git a/nx-X11/programs/Xserver/dix/grabs.c b/nx-X11/programs/Xserver/dix/grabs.c index e133c0dfc..839e930b1 100644 --- a/nx-X11/programs/Xserver/dix/grabs.c +++ b/nx-X11/programs/Xserver/dix/grabs.c @@ -52,10 +52,10 @@ SOFTWARE. #include #endif -#include +#include #include "misc.h" #define NEED_EVENTS -#include +#include #include "windowstr.h" #include "inputstr.h" #include "cursorstr.h" diff --git a/nx-X11/programs/Xserver/dix/initatoms.c b/nx-X11/programs/Xserver/dix/initatoms.c index a5972afd6..5f6244a76 100644 --- a/nx-X11/programs/Xserver/dix/initatoms.c +++ b/nx-X11/programs/Xserver/dix/initatoms.c @@ -7,8 +7,8 @@ #include #endif -#include -#include +#include +#include #include "misc.h" #include "dix.h" void MakePredeclaredAtoms() diff --git a/nx-X11/programs/Xserver/dix/main.c b/nx-X11/programs/Xserver/dix/main.c index 954c260c2..6a5b0021d 100644 --- a/nx-X11/programs/Xserver/dix/main.c +++ b/nx-X11/programs/Xserver/dix/main.c @@ -84,9 +84,9 @@ Equipment Corporation. #include #endif -#include -#include /* for unistd.h */ -#include +#include +#include /* for unistd.h */ +#include #include "scrnintstr.h" #include "misc.h" #include "os.h" @@ -113,7 +113,7 @@ Equipment Corporation. #ifdef DPMSExtension #define DPMS_SERVER -#include +#include #include "dpmsproc.h" #endif diff --git a/nx-X11/programs/Xserver/dix/pixmap.c b/nx-X11/programs/Xserver/dix/pixmap.c index 7888cf90a..463e31598 100644 --- a/nx-X11/programs/Xserver/dix/pixmap.c +++ b/nx-X11/programs/Xserver/dix/pixmap.c @@ -32,7 +32,7 @@ from The Open Group. #include #endif -#include +#include #include "scrnintstr.h" #include "misc.h" #include "os.h" diff --git a/nx-X11/programs/Xserver/dix/privates.c b/nx-X11/programs/Xserver/dix/privates.c index 36bbc65d1..d08883d1d 100644 --- a/nx-X11/programs/Xserver/dix/privates.c +++ b/nx-X11/programs/Xserver/dix/privates.c @@ -33,7 +33,7 @@ from The Open Group. #include #endif -#include +#include #include "scrnintstr.h" #include "misc.h" #include "os.h" diff --git a/nx-X11/programs/Xserver/dix/property.c b/nx-X11/programs/Xserver/dix/property.c index f462a3ebd..51cbc1a0d 100644 --- a/nx-X11/programs/Xserver/dix/property.c +++ b/nx-X11/programs/Xserver/dix/property.c @@ -51,10 +51,10 @@ SOFTWARE. #include #endif -#include +#include #define NEED_REPLIES #define NEED_EVENTS -#include +#include #include "windowstr.h" #include "propertyst.h" #include "dixstruct.h" @@ -62,7 +62,7 @@ SOFTWARE. #include "swaprep.h" #ifdef XCSECURITY #define _SECURITY_SERVER -#include +#include #endif #ifdef LBX #include "lbxserve.h" diff --git a/nx-X11/programs/Xserver/dix/resource.c b/nx-X11/programs/Xserver/dix/resource.c index e0fc2b997..ed8a255f5 100644 --- a/nx-X11/programs/Xserver/dix/resource.c +++ b/nx-X11/programs/Xserver/dix/resource.c @@ -106,7 +106,7 @@ Equipment Corporation. #include #endif -#include +#include #include "misc.h" #include "os.h" #include "resource.h" diff --git a/nx-X11/programs/Xserver/dix/swaprep.c b/nx-X11/programs/Xserver/dix/swaprep.c index 9776cd437..b8f245408 100644 --- a/nx-X11/programs/Xserver/dix/swaprep.c +++ b/nx-X11/programs/Xserver/dix/swaprep.c @@ -52,10 +52,10 @@ SOFTWARE. #include #endif -#include +#include #define NEED_REPLIES #define NEED_EVENTS -#include +#include #include "misc.h" #include "dixstruct.h" #include diff --git a/nx-X11/programs/Xserver/dix/swapreq.c b/nx-X11/programs/Xserver/dix/swapreq.c index 7d57d551f..35a7e7527 100644 --- a/nx-X11/programs/Xserver/dix/swapreq.c +++ b/nx-X11/programs/Xserver/dix/swapreq.c @@ -52,10 +52,10 @@ SOFTWARE. #include #endif -#include +#include #define NEED_EVENTS -#include -#include +#include +#include #include "misc.h" #include "dixstruct.h" #include "extnsionst.h" /* for SendEvent */ diff --git a/nx-X11/programs/Xserver/dix/tables.c b/nx-X11/programs/Xserver/dix/tables.c index 5196f0e85..eb4f4c8d2 100644 --- a/nx-X11/programs/Xserver/dix/tables.c +++ b/nx-X11/programs/Xserver/dix/tables.c @@ -51,10 +51,10 @@ SOFTWARE. #include #endif -#include +#include #define NEED_EVENTS #define NEED_REPLIES -#include +#include #include "windowstr.h" #include "extnsionst.h" #include "dixstruct.h" diff --git a/nx-X11/programs/Xserver/dix/window.c b/nx-X11/programs/Xserver/dix/window.c index 340ca50cc..5854f2e95 100644 --- a/nx-X11/programs/Xserver/dix/window.c +++ b/nx-X11/programs/Xserver/dix/window.c @@ -105,11 +105,11 @@ Equipment Corporation. #include "globals.h" #ifdef XAPPGROUP -#include +#include #endif #ifdef XCSECURITY #define _SECURITY_SERVER -#include +#include #endif /****** diff --git a/nx-X11/programs/Xserver/fb/fb.h b/nx-X11/programs/Xserver/fb/fb.h index 202638d32..b64f3a227 100644 --- a/nx-X11/programs/Xserver/fb/fb.h +++ b/nx-X11/programs/Xserver/fb/fb.h @@ -27,7 +27,7 @@ #ifndef _FB_H_ #define _FB_H_ -#include +#include #include "scrnintstr.h" #include "pixmap.h" #include "pixmapstr.h" diff --git a/nx-X11/programs/Xserver/fb/fbcmap.c b/nx-X11/programs/Xserver/fb/fbcmap.c index 762c51c9d..a7c8ca638 100644 --- a/nx-X11/programs/Xserver/fb/fbcmap.c +++ b/nx-X11/programs/Xserver/fb/fbcmap.c @@ -34,8 +34,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #endif -#include -#include +#include +#include #include "scrnintstr.h" #include "colormapst.h" #include "resource.h" diff --git a/nx-X11/programs/Xserver/fb/fbpseudocolor.c b/nx-X11/programs/Xserver/fb/fbpseudocolor.c index 83d556a0e..469f3ea08 100644 --- a/nx-X11/programs/Xserver/fb/fbpseudocolor.c +++ b/nx-X11/programs/Xserver/fb/fbpseudocolor.c @@ -2,8 +2,8 @@ #include #endif -#include -#include +#include +#include #include "scrnintstr.h" #include "colormapst.h" #include "glyphstr.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/Agent.h b/nx-X11/programs/Xserver/hw/nxagent/Agent.h index dbed1e0d8..ec312bad2 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Agent.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Agent.h @@ -103,8 +103,8 @@ typedef XID KeySym64; #define NX_TRANS_SOCKET #define GC XlibGC -#include "Xlib.h" -#include "X11/extensions/shape.h" +#include +#include #undef GC #ifdef _XSERVER64_tmp diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index 557798e7f..21bcc60e5 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -33,7 +33,7 @@ #include "gcstruct.h" #include "xfixeswire.h" -#include +#include /* * Use asyncronous get property replies. diff --git a/nx-X11/programs/Xserver/hw/nxagent/Dialog.c b/nx-X11/programs/Xserver/hw/nxagent/Dialog.c index 0fb9491a4..63c3b73c1 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Dialog.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Dialog.c @@ -25,7 +25,7 @@ #include "scrnintstr.h" #include "Agent.h" -#include +#include #include "opaque.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/Display.c b/nx-X11/programs/Xserver/hw/nxagent/Display.c index 862ce57d0..abc6a9380 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Display.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Display.c @@ -38,8 +38,8 @@ is" without express or implied warranty. #include #include -#include -#include +#include +#include #include "screenint.h" #include "input.h" #include "misc.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index c33564092..d965d574c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -66,7 +66,7 @@ #define Window XlibWindow #define Atom XlibAtom #define Time XlibXID -#include +#include #undef Window #undef Atom #undef Time @@ -90,10 +90,10 @@ #undef KeySym #undef XID -#include +#include #include "Shadow.h" -#include +#include "X11/include/Xrandr_nxagent.h" #include "NXlib.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.h b/nx-X11/programs/Xserver/hw/nxagent/Events.h index c74fa151f..02b2b8cbe 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.h @@ -18,7 +18,7 @@ #ifndef __Events_H__ #define __Events_H__ -#include +#include #define ProcessedExpose (LASTEvent + 1) #define ProcessedNotify (LASTEvent + 2) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Holder.c b/nx-X11/programs/Xserver/hw/nxagent/Holder.c index 4aca1ecdb..64ffb24a4 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Holder.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Holder.c @@ -33,7 +33,7 @@ #include "../../include/gc.h" #include "../../include/window.h" -#include +#include "X11/include/xpm_nxagent.h" #include "Agent.h" #include "Pixmaps.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/Icons.h b/nx-X11/programs/Xserver/hw/nxagent/Icons.h index 98e879662..b307f42e6 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Icons.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Icons.h @@ -19,7 +19,7 @@ #define __Icons_H__ #define Pixel XpmPixel -#include +#include "X11/include/xpm_nxagent.h" #undef Pixel #define NXAGENT_ICON_NAME "nxagent.xpm" diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 835aebeb6..9ead48de1 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -64,13 +64,13 @@ is" without express or implied warranty. #include "property.h" #include "Init.h" -#include +#include #define XKBSRV_NEED_FILE_FUNCS -#include -#include +#include +#include -#include "X11/extensions/XKBrules.h" +#include #include "Xatom.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXcomposite.h b/nx-X11/programs/Xserver/hw/nxagent/NXcomposite.h index d11561e18..a274b8a39 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXcomposite.h +++ b/nx-X11/programs/Xserver/hw/nxagent/NXcomposite.h @@ -33,12 +33,12 @@ #else -#include -#include +#include +#include #endif -#include +#include /* * This revision number also appears in configure.ac, they have diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXcompositeext.h b/nx-X11/programs/Xserver/hw/nxagent/NXcompositeext.h index 8667ded16..b4433d6c1 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXcompositeext.h +++ b/nx-X11/programs/Xserver/hw/nxagent/NXcompositeext.h @@ -27,7 +27,7 @@ #ifndef NXAGENT_SERVER -#include +#include #endif diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c index af76ed4c2..704bfcc0d 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c @@ -109,12 +109,13 @@ int ProcInitialConnection(); #define True 1 #endif +#include + #define GC XlibGC -#include +#include #undef GC #include "windowstr.h" -#include #include "dixfontstr.h" #include "gcstruct.h" #include "selection.h" @@ -135,15 +136,15 @@ int ProcInitialConnection(); #endif #ifdef XCSECURITY #define _SECURITY_SERVER -#include +#include #endif #ifdef XAPPGROUP -#include +#include #endif #ifdef XKB #define XKB_IN_SERVER #include "inputstr.h" -#include +#include #endif #include "Atoms.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c b/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c index 4f41ee228..2f3a75147 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c @@ -73,16 +73,16 @@ Equipment Corporation. #include #endif -#include -#include -#include +#include +#include +#include +#include #include "scrnintstr.h" #include "resource.h" #include "dixstruct.h" #include "cursorstr.h" #include "misc.h" #include "opaque.h" -#include #include "dixfontstr.h" #include "closestr.h" @@ -172,7 +172,7 @@ _NXGetFontPathError: #ifdef XF86BIGFONT #define _XF86BIGFONT_SERVER_ -#include +#include #endif #define QUERYCHARINFO(pci, pr) *(pr) = (pci)->metrics diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c index 5940fe7d1..11ff62947 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c @@ -132,13 +132,13 @@ of the copyright holder. #include #endif -#include +#include #include "Xlib.h" #include "misc.h" #include "resource.h" #define NEED_EVENTS #define NEED_REPLIES -#include +#include #include "windowstr.h" #include "inputstr.h" #include "scrnintstr.h" @@ -152,13 +152,13 @@ of the copyright holder. #include "globals.h" #ifdef XKB -#include +#include extern Bool XkbFilterEvents(ClientPtr, int, xEvent *); #endif #ifdef XCSECURITY #define _SECURITY_SERVER -#include +#include #endif #ifdef XEVIE @@ -175,7 +175,7 @@ int xeviegrabState = 0; xEvent *xeviexE; #endif -#include +#include #include "exevents.h" #include "extnsionst.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXextension.c b/nx-X11/programs/Xserver/hw/nxagent/NXextension.c index f964e2fd8..962367bf2 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXextension.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXextension.c @@ -68,10 +68,10 @@ SOFTWARE. #include #endif -#include +#include #define NEED_EVENTS #define NEED_REPLIES -#include +#include #include "misc.h" #include "dixstruct.h" #include "extnsionst.h" @@ -80,7 +80,7 @@ SOFTWARE. #include "../../dix/dispatch.h" #ifdef XCSECURITY #define _SECURITY_SERVER -#include +#include #endif #ifdef LBX #include "lbxserve.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXglyphstr.h b/nx-X11/programs/Xserver/hw/nxagent/NXglyphstr.h index e7bb2d841..5d7fcf640 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXglyphstr.h +++ b/nx-X11/programs/Xserver/hw/nxagent/NXglyphstr.h @@ -50,7 +50,7 @@ #ifndef _GLYPHSTR_H_ #define _GLYPHSTR_H_ -#include +#include #include "../../render/picture.h" #include "screenint.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c b/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c index e1c6b6d8c..aa3c606f8 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c @@ -97,10 +97,10 @@ Equipment Corporation. #include #endif -#include +#include #define NEED_EVENTS -#include -#include +#include +#include #include "misc.h" #include "regionstr.h" @@ -112,7 +112,7 @@ Equipment Corporation. #include "dixstruct.h" #include "mi.h" -#include +#include #include "globals.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXmiwindow.c b/nx-X11/programs/Xserver/hw/nxagent/NXmiwindow.c index 8132e9dd0..a720cafbf 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXmiwindow.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXmiwindow.c @@ -67,7 +67,7 @@ SOFTWARE. #include #endif -#include +#include #include "regionstr.h" #include "region.h" #include "mi.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c b/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c index a2d4a8e52..d6c5aa4dd 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXproperty.c @@ -68,10 +68,10 @@ SOFTWARE. #include #endif -#include +#include #define NEED_REPLIES #define NEED_EVENTS -#include +#include #include "windowstr.h" #include "propertyst.h" #include "dixstruct.h" @@ -79,7 +79,7 @@ SOFTWARE. #include "swaprep.h" #ifdef XCSECURITY #define _SECURITY_SERVER -#include +#include #endif #ifdef LBX #include "lbxserve.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXrender.c b/nx-X11/programs/Xserver/hw/nxagent/NXrender.c index 260355c6e..dc1d2387e 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXrender.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXrender.c @@ -47,8 +47,8 @@ #include #endif -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "dixstruct.h" @@ -59,9 +59,9 @@ #include "colormapst.h" #include "extnsionst.h" #include "servermd.h" -#include -#include -#include +#include +#include +#include #include "cursorstr.h" #ifdef EXTMODULE #include "xf86_ansic.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXresource.c b/nx-X11/programs/Xserver/hw/nxagent/NXresource.c index 833a33fd3..39a1992de 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXresource.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXresource.c @@ -123,7 +123,7 @@ Equipment Corporation. #include #endif -#include +#include #include "misc.h" #include "os.h" #include "resource.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXshm.c b/nx-X11/programs/Xserver/hw/nxagent/NXshm.c index 3b40b82f7..95905fde7 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXshm.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXshm.c @@ -64,8 +64,8 @@ in this Software without prior written authorization from The Open Group. #include #define NEED_REPLIES #define NEED_EVENTS -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "dixstruct.h" @@ -77,8 +77,8 @@ in this Software without prior written authorization from The Open Group. #include "extnsionst.h" #include "servermd.h" #define _XSHM_SERVER_ -#include -#include +#include +#include #ifdef EXTMODULE #include "xf86_ansic.h" #endif diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c index 4017099e9..4552ad563 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c @@ -123,11 +123,11 @@ Equipment Corporation. #include "globals.h" #ifdef XAPPGROUP -#include +#include #endif #ifdef XCSECURITY #define _SECURITY_SERVER -#include +#include #endif #include "Screen.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXxvdisp.c b/nx-X11/programs/Xserver/hw/nxagent/NXxvdisp.c index cfce34463..1724374a0 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXxvdisp.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXxvdisp.c @@ -71,8 +71,8 @@ SOFTWARE. #include #endif -#include -#include +#include +#include #include "misc.h" #include "scrnintstr.h" #include "windowstr.h" @@ -82,12 +82,12 @@ SOFTWARE. #include "resource.h" #include "opaque.h" -#include -#include +#include +#include #include "xvdix.h" #ifdef MITSHM #define _XSHM_SERVER_ -#include +#include #endif #include "Trap.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 095aa7b08..491a92c2f 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -77,13 +77,13 @@ is" without express or implied warranty. #include "Shadow.h" #include "Utils.h" -#include +#include "X11/include/Xrandr_nxagent.h" #define GC XlibGC #define Font XlibFont #define KeySym XlibKeySym #define XID XlibXID -#include +#include #undef GC #undef Font #undef KeySym diff --git a/nx-X11/programs/Xserver/hw/nxagent/TestExt.c b/nx-X11/programs/Xserver/hw/nxagent/TestExt.c index 6bce2eaeb..30fe1968e 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/TestExt.c +++ b/nx-X11/programs/Xserver/hw/nxagent/TestExt.c @@ -29,9 +29,9 @@ is" without express or implied warranty. */ -#include -#include -#include +#include +#include +#include #undef Bool #include "screenint.h" #include "input.h" diff --git a/nx-X11/programs/Xserver/hw/nxagent/X11/include/Xrandr_nxagent.h b/nx-X11/programs/Xserver/hw/nxagent/X11/include/Xrandr_nxagent.h new file mode 100644 index 000000000..acfc5834e --- /dev/null +++ b/nx-X11/programs/Xserver/hw/nxagent/X11/include/Xrandr_nxagent.h @@ -0,0 +1,105 @@ +/* + * Copyright © 2000 Compaq Computer Corporation, Inc. + * Copyright © 2002 Hewlett-Packard Company, Inc. + * Copyright © 2006 Intel Corporation + * Copyright © 2008 Red Hat, 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 the copyright holders not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. The copyright holders make no representations + * about the suitability of this software for any purpose. It is provided "as + * is" without express or implied warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL THE COPYRIGHT HOLDERS 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: Jim Gettys, HP Labs, Hewlett-Packard, Inc. + * Keith Packard, Intel Corporation + */ + +/* + * This file is a reduced version of the header file of + * + * + * This copy of code has been introduced to allow a clear namespace + * separation between and header files. + * + * This version of the Xrandr 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 instead for inclusion in + * nxagent, it will attempt pulling in the + * header which in turn will include . However, the headers of + * the same name from should be used instead. + * + * FIXME: Once the nxagent Xserver starts using libXrender from X.Org, this + * hack can be removed. + * + * 2015/06/26, Mike Gabriel + */ + +#ifndef _XRANDR_H_ +#define _XRANDR_H_ + +#include +#include + +_XFUNCPROTOBEGIN + +typedef XID RRProvider; +typedef XID RRMode; + +/* + * Events. + */ + +typedef struct { + int type; /* event base */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; /* window which selected for this event */ + Window root; /* Root window for changed screen */ + Time timestamp; /* when the screen change occurred */ + Time config_timestamp; /* when the last configuration change */ + SizeID size_index; + SubpixelOrder subpixel_order; + Rotation rotation; + int width; + int height; + int mwidth; + int mheight; +} XRRScreenChangeNotifyEvent; + +typedef unsigned long XRRModeFlags; + +typedef struct _XRRModeInfo { + RRMode id; + unsigned int width; + unsigned int height; + unsigned long dotClock; + unsigned int hSyncStart; + unsigned int hSyncEnd; + unsigned int hTotal; + unsigned int hSkew; + unsigned int vSyncStart; + unsigned int vSyncEnd; + unsigned int vTotal; + char *name; + unsigned int nameLength; + XRRModeFlags modeFlags; +} XRRModeInfo; + +_XFUNCPROTOEND + +#endif /* _XRANDR_H_ */ diff --git a/nx-X11/programs/Xserver/hw/nxagent/X11/include/xpm_nxagent.h b/nx-X11/programs/Xserver/hw/nxagent/X11/include/xpm_nxagent.h new file mode 100644 index 000000000..b02e5a913 --- /dev/null +++ b/nx-X11/programs/Xserver/hw/nxagent/X11/include/xpm_nxagent.h @@ -0,0 +1,259 @@ +/* + * Copyright (C) 1989-95 GROUPE BULL + * + * 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 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 + * GROUPE BULL 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. + * + * Except as contained in this notice, the name of GROUPE BULL shall not be + * used in advertising or otherwise to promote the sale, use or other dealings + * in this Software without prior written authorization from GROUPE BULL. + */ + +/*****************************************************************************\ +* xpm.h: * +* * +* XPM library * +* Include file * +* * +* Developed by Arnaud Le Hors * +\*****************************************************************************/ + +/* + * This file is a reduced version of the header file of + * + * + * This copy of code has been introduced to allow a clear namespace + * separation between and header files. + * + * This version of the Xpm 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 instead for inclusion in nxagent, it will + * attempt pulling in the header file. + * However, the headers of the same name from should be + * used instead. + * + * FIXME: Once the nxagent Xserver starts using libX11 from X.Org, this + * hack can be removed. + * + * 2015/06/26, Mike Gabriel + */ + +#ifndef XPM_h +#define XPM_h + +/* + * first some identification numbers: + * the version and revision numbers are determined with the following rule: + * SO Major number = LIB minor version number. + * SO Minor number = LIB sub-minor version number. + * e.g: Xpm version 3.2f + * we forget the 3 which is the format number, 2 gives 2, and f gives 6. + * thus we have XpmVersion = 2 and XpmRevision = 6 + * which gives SOXPMLIBREV = 2.6 + * + * Then the XpmIncludeVersion number is built from these numbers. + */ +#define XpmFormat 3 +#define XpmVersion 4 +#define XpmRevision 11 +#define XpmIncludeVersion ((XpmFormat * 100 + XpmVersion) * 100 + XpmRevision) + +#ifndef XPM_NUMBERS + +/* let's define Pixel if it is not done yet */ +#if ! defined(_XtIntrinsic_h) && ! defined(PIXEL_ALREADY_TYPEDEFED) +typedef unsigned long Pixel; /* Index into colormap */ +# define PIXEL_ALREADY_TYPEDEFED +#endif + +/* include headers from instead of */ +#include +#include + +/* Return ErrorStatus codes: + * null if full success + * positive if partial success + * negative if failure + */ + +#define XpmColorError 1 +#define XpmSuccess 0 +#define XpmOpenFailed -1 +#define XpmFileInvalid -2 +#define XpmNoMemory -3 +#define XpmColorFailed -4 + +typedef struct { + char *name; /* Symbolic color name */ + char *value; /* Color value */ + Pixel pixel; /* Color pixel */ +} XpmColorSymbol; + +typedef struct { + char *name; /* name of the extension */ + unsigned int nlines; /* number of lines in this extension */ + char **lines; /* pointer to the extension array of strings */ +} XpmExtension; + +typedef struct { + char *string; /* characters string */ + char *symbolic; /* symbolic name */ + char *m_color; /* monochrom default */ + char *g4_color; /* 4 level grayscale default */ + char *g_color; /* other level grayscale default */ + char *c_color; /* color default */ +} XpmColor; + +typedef struct { + unsigned int width; /* image width */ + unsigned int height; /* image height */ + unsigned int cpp; /* number of characters per pixel */ + unsigned int ncolors; /* number of colors */ + XpmColor *colorTable; /* list of related colors */ + unsigned int *data; /* image data */ +} XpmImage; + +typedef struct { + unsigned long valuemask; /* Specifies which attributes are defined */ + char *hints_cmt; /* Comment of the hints section */ + char *colors_cmt; /* Comment of the colors section */ + char *pixels_cmt; /* Comment of the pixels section */ + unsigned int x_hotspot; /* Returns the x hotspot's coordinate */ + unsigned int y_hotspot; /* Returns the y hotspot's coordinate */ + unsigned int nextensions; /* number of extensions */ + XpmExtension *extensions; /* pointer to array of extensions */ +} XpmInfo; + +typedef int (*XpmAllocColorFunc)( + Display* /* display */, + Colormap /* colormap */, + char* /* colorname */, + XColor* /* xcolor */, + void* /* closure */ +); + +typedef int (*XpmFreeColorsFunc)( + Display* /* display */, + Colormap /* colormap */, + Pixel* /* pixels */, + int /* npixels */, + void* /* closure */ +); + + +/* required struct for hw/nxagent/Holder.c */ +typedef struct { + unsigned long valuemask; /* Specifies which attributes are + defined */ + + Visual *visual; /* Specifies the visual to use */ + Colormap colormap; /* Specifies the colormap to use */ + unsigned int depth; /* Specifies the depth */ + unsigned int width; /* Returns the width of the created + pixmap */ + unsigned int height; /* Returns the height of the created + pixmap */ + unsigned int x_hotspot; /* Returns the x hotspot's + coordinate */ + unsigned int y_hotspot; /* Returns the y hotspot's + coordinate */ + unsigned int cpp; /* Specifies the number of char per + pixel */ + Pixel *pixels; /* List of used color pixels */ + unsigned int npixels; /* Number of used pixels */ + XpmColorSymbol *colorsymbols; /* List of color symbols to override */ + unsigned int numsymbols; /* Number of symbols */ + char *rgb_fname; /* RGB text file name */ + unsigned int nextensions; /* Number of extensions */ + XpmExtension *extensions; /* List of extensions */ + + unsigned int ncolors; /* Number of colors */ + XpmColor *colorTable; /* List of colors */ +/* 3.2 backward compatibility code */ + char *hints_cmt; /* Comment of the hints section */ + char *colors_cmt; /* Comment of the colors section */ + char *pixels_cmt; /* Comment of the pixels section */ +/* end 3.2 bc */ + unsigned int mask_pixel; /* Color table index of transparent + color */ + + /* Color Allocation Directives */ + Bool exactColors; /* Only use exact colors for visual */ + unsigned int closeness; /* Allowable RGB deviation */ + unsigned int red_closeness; /* Allowable red deviation */ + unsigned int green_closeness; /* Allowable green deviation */ + unsigned int blue_closeness; /* Allowable blue deviation */ + int color_key; /* Use colors from this color set */ + + Pixel *alloc_pixels; /* Returns the list of alloc'ed color + pixels */ + int nalloc_pixels; /* Returns the number of alloc'ed + color pixels */ + + Bool alloc_close_colors; /* Specify whether close colors should + be allocated using XAllocColor + or not */ + int bitmap_format; /* Specify the format of 1bit depth + images: ZPixmap or XYBitmap */ + + /* Color functions */ + XpmAllocColorFunc alloc_color; /* Application color allocator */ + XpmFreeColorsFunc free_colors; /* Application color de-allocator */ + void *color_closure; /* Application private data to pass to + alloc_color and free_colors */ + +} XpmAttributes; + +/* XpmAttributes value masks bits */ + +/* required masks bits for hw/nxagent/Holder.c */ +#define XpmDepth (1L<<2) +#define XpmSize (1L<<3) /* width & height */ + +/* macros for forward declarations of functions with prototypes */ +#define FUNC(f, t, p) extern t f p +#define LFUNC(f, t, p) static t f p + + +/* + * functions declarations (for building nxagent against system wide libXpm4, + * but also against libNX_X11 (as opposed to system-wide libX11). + */ + +_XFUNCPROTOBEGIN + +/* Keep for hw/nxagent/Holder.c */ +FUNC(XpmCreatePixmapFromData, int, (Display *display, + Drawable d, + char **data, + Pixmap *pixmap_return, + Pixmap *shapemask_return, + XpmAttributes *attributes)); +/* Keep for hw/nxagent/Display.c */ +FUNC(XpmReadFileToPixmap, int, (Display *display, + Drawable d, + const char *filename, + Pixmap *pixmap_return, + Pixmap *shapemask_return, + XpmAttributes *attributes)); + +_XFUNCPROTOEND + +#endif /* XPM_NUMBERS */ +#endif diff --git a/nx-X11/programs/Xserver/hw/xfree86/os-support/xf86_libc.h b/nx-X11/programs/Xserver/hw/xfree86/os-support/xf86_libc.h index c51e0ee14..ca68c1b63 100644 --- a/nx-X11/programs/Xserver/hw/xfree86/os-support/xf86_libc.h +++ b/nx-X11/programs/Xserver/hw/xfree86/os-support/xf86_libc.h @@ -45,7 +45,7 @@ #ifndef XF86_LIBC_H #define XF86_LIBC_H 1 -#include +#include #include /* diff --git a/nx-X11/programs/Xserver/include/Imakefile b/nx-X11/programs/Xserver/include/Imakefile index d68ef940c..4c9b169a4 100644 --- a/nx-X11/programs/Xserver/include/Imakefile +++ b/nx-X11/programs/Xserver/include/Imakefile @@ -63,5 +63,5 @@ InstallDriverSDKNonExecFile(validate.h,$(DRIVERSDKINCLUDEDIR)) InstallDriverSDKNonExecFile(window.h,$(DRIVERSDKINCLUDEDIR)) InstallDriverSDKNonExecFile(windowstr.h,$(DRIVERSDKINCLUDEDIR)) -BuildIncludes($(HEADERS),X11,..) -InstallMultipleFlags($(HEADERS),$(INCDIR)/X11,$(INSTINCFLAGS)) +BuildIncludes($(HEADERS),nx-X11,..) +InstallMultipleFlags($(HEADERS),$(INCDIR)/nx-X11,$(INSTINCFLAGS)) diff --git a/nx-X11/programs/Xserver/include/closestr.h b/nx-X11/programs/Xserver/include/closestr.h index c06010113..31b5693f5 100644 --- a/nx-X11/programs/Xserver/include/closestr.h +++ b/nx-X11/programs/Xserver/include/closestr.h @@ -33,7 +33,7 @@ from The Open Group. #define CLOSESTR_H #define NEED_REPLIES -#include +#include #include "closure.h" #include "dix.h" #include "misc.h" diff --git a/nx-X11/programs/Xserver/include/colormap.h b/nx-X11/programs/Xserver/include/colormap.h index d519bb782..67f44193d 100644 --- a/nx-X11/programs/Xserver/include/colormap.h +++ b/nx-X11/programs/Xserver/include/colormap.h @@ -50,7 +50,7 @@ SOFTWARE. #ifndef CMAP_H #define CMAP_H 1 -#include +#include #include "screenint.h" #include "window.h" diff --git a/nx-X11/programs/Xserver/include/dixfontstr.h b/nx-X11/programs/Xserver/include/dixfontstr.h index 948bf1adb..09a162451 100644 --- a/nx-X11/programs/Xserver/include/dixfontstr.h +++ b/nx-X11/programs/Xserver/include/dixfontstr.h @@ -30,7 +30,7 @@ SOFTWARE. #include #include "closure.h" #define NEED_REPLIES -#include /* for xQueryFontReply */ +#include /* for xQueryFontReply */ #define FONTCHARSET(font) (font) #define FONTMAXBOUNDS(font,field) (font)->info.maxbounds.field diff --git a/nx-X11/programs/Xserver/include/dixstruct.h b/nx-X11/programs/Xserver/include/dixstruct.h index 53c78d2de..e4b5e9fe8 100644 --- a/nx-X11/programs/Xserver/include/dixstruct.h +++ b/nx-X11/programs/Xserver/include/dixstruct.h @@ -31,7 +31,7 @@ SOFTWARE. #include "cursor.h" #include "gc.h" #include "pixmap.h" -#include +#include /* * direct-mapped hash table, used by resource manager to store diff --git a/nx-X11/programs/Xserver/include/gc.h b/nx-X11/programs/Xserver/include/gc.h index 1c0c90d3e..1969e5cd7 100644 --- a/nx-X11/programs/Xserver/include/gc.h +++ b/nx-X11/programs/Xserver/include/gc.h @@ -50,15 +50,15 @@ SOFTWARE. #ifndef GC_H #define GC_H -#include /* for GContext, Mask */ +#include /* for GContext, Mask */ #ifndef _XTYPEDEF_POINTER /* Don't let Xdefs.h define 'pointer' */ #define _XTYPEDEF_POINTER 1 #endif /* _XTYPEDEF_POINTER */ -#include /* for Bool */ +#include /* for Bool */ -#include +#include #include "screenint.h" /* for ScreenPtr */ #include "pixmap.h" /* for DrawablePtr */ diff --git a/nx-X11/programs/Xserver/include/gcstruct.h b/nx-X11/programs/Xserver/include/gcstruct.h index 16779f692..71d3ace47 100644 --- a/nx-X11/programs/Xserver/include/gcstruct.h +++ b/nx-X11/programs/Xserver/include/gcstruct.h @@ -58,7 +58,7 @@ SOFTWARE. #include "region.h" #include "pixmap.h" #include "screenint.h" -#include +#include /* * functions which modify the state of the GC diff --git a/nx-X11/programs/Xserver/include/input.h b/nx-X11/programs/Xserver/include/input.h index 88cc98050..a7c8d0dfe 100644 --- a/nx-X11/programs/Xserver/include/input.h +++ b/nx-X11/programs/Xserver/include/input.h @@ -52,8 +52,8 @@ SOFTWARE. #include "misc.h" #include "screenint.h" -#include -#include +#include +#include #include "window.h" /* for WindowPtr */ #define DEVICE_INIT 0 diff --git a/nx-X11/programs/Xserver/include/misc.h b/nx-X11/programs/Xserver/include/misc.h index 1576f1433..cb3051c94 100644 --- a/nx-X11/programs/Xserver/include/misc.h +++ b/nx-X11/programs/Xserver/include/misc.h @@ -77,16 +77,16 @@ OF THIS SOFTWARE. extern unsigned long globalSerialNumber; extern unsigned long serverGeneration; -#include -#include -#include -#include +#include +#include +#include +#include #ifndef _XTYPEDEF_POINTER /* Don't let Xdefs.h define 'pointer' */ #define _XTYPEDEF_POINTER 1 #endif /* _XTYPEDEF_POINTER */ -#include +#include #ifndef IN_MODULE #ifndef NULL @@ -121,7 +121,7 @@ typedef struct _xReq *xReqPtr; #include "os.h" /* for ALLOCATE_LOCAL and DEALLOCATE_LOCAL */ #ifndef IN_MODULE -#include /* for bcopy, bzero, and bcmp */ +#include /* for bcopy, bzero, and bcmp */ #endif #define NullBox ((BoxPtr)0) diff --git a/nx-X11/programs/Xserver/include/miscstruct.h b/nx-X11/programs/Xserver/include/miscstruct.h index 87874aae4..7df9240c9 100644 --- a/nx-X11/programs/Xserver/include/miscstruct.h +++ b/nx-X11/programs/Xserver/include/miscstruct.h @@ -51,7 +51,7 @@ SOFTWARE. #define MISCSTRUCT_H 1 #include "misc.h" -#include +#include #include "gc.h" typedef xPoint DDXPointRec; diff --git a/nx-X11/programs/Xserver/include/opaque.h b/nx-X11/programs/Xserver/include/opaque.h index ca29afdc0..749b6f5b9 100644 --- a/nx-X11/programs/Xserver/include/opaque.h +++ b/nx-X11/programs/Xserver/include/opaque.h @@ -31,7 +31,7 @@ from The Open Group. #ifndef OPAQUE_H #define OPAQUE_H -#include +#include #include "globals.h" diff --git a/nx-X11/programs/Xserver/include/os.h b/nx-X11/programs/Xserver/include/os.h index 551b35097..e150e1e0b 100644 --- a/nx-X11/programs/Xserver/include/os.h +++ b/nx-X11/programs/Xserver/include/os.h @@ -54,7 +54,7 @@ SOFTWARE. #include "misc.h" #define ALLOCATE_LOCAL_FALLBACK(_size) Xalloc((unsigned long)(_size)) #define DEALLOCATE_LOCAL_FALLBACK(_ptr) Xfree((void *)(_ptr)) -#include +#include #ifndef IN_MODULE #include #else diff --git a/nx-X11/programs/Xserver/include/scrnintstr.h b/nx-X11/programs/Xserver/include/scrnintstr.h index 297227493..0539ca516 100644 --- a/nx-X11/programs/Xserver/include/scrnintstr.h +++ b/nx-X11/programs/Xserver/include/scrnintstr.h @@ -56,7 +56,7 @@ SOFTWARE. #include "colormap.h" #include "cursor.h" #include "validate.h" -#include +#include #include "dix.h" typedef struct _PixmapFormat { diff --git a/nx-X11/programs/Xserver/include/window.h b/nx-X11/programs/Xserver/include/window.h index cbfed645f..571115365 100644 --- a/nx-X11/programs/Xserver/include/window.h +++ b/nx-X11/programs/Xserver/include/window.h @@ -53,7 +53,7 @@ SOFTWARE. #include "misc.h" #include "region.h" #include "screenint.h" -#include +#include #define TOTALLY_OBSCURED 0 #define UNOBSCURED 1 diff --git a/nx-X11/programs/Xserver/include/windowstr.h b/nx-X11/programs/Xserver/include/windowstr.h index dab6fcf71..5c181bc51 100644 --- a/nx-X11/programs/Xserver/include/windowstr.h +++ b/nx-X11/programs/Xserver/include/windowstr.h @@ -58,7 +58,7 @@ SOFTWARE. #include "resource.h" /* for ROOT_WINDOW_ID_BASE */ #include "dix.h" #include "miscstruct.h" -#include +#include #include "opaque.h" #define GuaranteeNothing 0 diff --git a/nx-X11/programs/Xserver/mfb/maskbits.h b/nx-X11/programs/Xserver/mfb/maskbits.h index 7e2b74a18..94a7e8955 100644 --- a/nx-X11/programs/Xserver/mfb/maskbits.h +++ b/nx-X11/programs/Xserver/mfb/maskbits.h @@ -28,8 +28,8 @@ SOFTWARE. #include #endif -#include -#include +#include +#include #include "servermd.h" diff --git a/nx-X11/programs/Xserver/mi/mi.h b/nx-X11/programs/Xserver/mi/mi.h index 0f3f5778f..6eea34b6c 100644 --- a/nx-X11/programs/Xserver/mi/mi.h +++ b/nx-X11/programs/Xserver/mi/mi.h @@ -49,7 +49,7 @@ SOFTWARE. #ifndef MI_H #define MI_H -#include +#include #include "region.h" #include "validate.h" #include "window.h" diff --git a/nx-X11/programs/Xserver/mi/miarc.c b/nx-X11/programs/Xserver/mi/miarc.c index f06c4b51d..8db188a6e 100644 --- a/nx-X11/programs/Xserver/mi/miarc.c +++ b/nx-X11/programs/Xserver/mi/miarc.c @@ -62,8 +62,8 @@ SOFTWARE. #include #undef _XOPEN_SOURCE #endif -#include -#include +#include +#include #include "misc.h" #include "gcstruct.h" #include "scrnintstr.h" @@ -72,7 +72,7 @@ SOFTWARE. #include "mifpoly.h" #include "mi.h" #include "mifillarc.h" -#include +#include static double miDsin(double a); static double miDcos(double a); diff --git a/nx-X11/programs/Xserver/mi/mibitblt.c b/nx-X11/programs/Xserver/mi/mibitblt.c index 0caad083f..60318a046 100644 --- a/nx-X11/programs/Xserver/mi/mibitblt.c +++ b/nx-X11/programs/Xserver/mi/mibitblt.c @@ -52,8 +52,8 @@ SOFTWARE. #include #endif -#include -#include +#include +#include #include "misc.h" #include "gcstruct.h" @@ -62,7 +62,7 @@ SOFTWARE. #include "scrnintstr.h" #include "mi.h" #include "regionstr.h" -#include +#include #include "servermd.h" #ifndef HAS_FFS diff --git a/nx-X11/programs/Xserver/mi/mibstore.c b/nx-X11/programs/Xserver/mi/mibstore.c index f18648f66..875ec87f3 100644 --- a/nx-X11/programs/Xserver/mi/mibstore.c +++ b/nx-X11/programs/Xserver/mi/mibstore.c @@ -49,9 +49,9 @@ implied warranty. #include #endif -#include -#include -#include +#include +#include +#include #include "misc.h" #include "regionstr.h" #include "scrnintstr.h" diff --git a/nx-X11/programs/Xserver/mi/miclipn.c b/nx-X11/programs/Xserver/mi/miclipn.c index 14ff0d69a..913b0e47a 100644 --- a/nx-X11/programs/Xserver/mi/miclipn.c +++ b/nx-X11/programs/Xserver/mi/miclipn.c @@ -32,7 +32,7 @@ from The Open Group. #include #endif -#include +#include #include "windowstr.h" #include "scrnintstr.h" #include "mi.h" diff --git a/nx-X11/programs/Xserver/mi/micmap.c b/nx-X11/programs/Xserver/mi/micmap.c index 98f3e521d..15d3f7f46 100644 --- a/nx-X11/programs/Xserver/mi/micmap.c +++ b/nx-X11/programs/Xserver/mi/micmap.c @@ -40,8 +40,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #endif -#include -#include +#include +#include #include "scrnintstr.h" #include "colormapst.h" #include "resource.h" diff --git a/nx-X11/programs/Xserver/mi/miexpose.c b/nx-X11/programs/Xserver/mi/miexpose.c index f3dae5768..782ddad49 100644 --- a/nx-X11/programs/Xserver/mi/miexpose.c +++ b/nx-X11/programs/Xserver/mi/miexpose.c @@ -80,10 +80,10 @@ Equipment Corporation. #include #endif -#include +#include #define NEED_EVENTS -#include -#include +#include +#include #include "misc.h" #include "regionstr.h" @@ -95,7 +95,7 @@ Equipment Corporation. #include "dixstruct.h" #include "mi.h" -#include +#include #include "globals.h" diff --git a/nx-X11/programs/Xserver/mi/mifillarc.c b/nx-X11/programs/Xserver/mi/mifillarc.c index 0dcf25d05..533bfe996 100644 --- a/nx-X11/programs/Xserver/mi/mifillarc.c +++ b/nx-X11/programs/Xserver/mi/mifillarc.c @@ -34,8 +34,8 @@ Author: Bob Scheifler, MIT X Consortium #endif #include -#include -#include +#include +#include #include "regionstr.h" #include "gcstruct.h" #include "pixmapstr.h" diff --git a/nx-X11/programs/Xserver/mi/mifillrct.c b/nx-X11/programs/Xserver/mi/mifillrct.c index 9f68db720..8a8f2b4f3 100644 --- a/nx-X11/programs/Xserver/mi/mifillrct.c +++ b/nx-X11/programs/Xserver/mi/mifillrct.c @@ -51,8 +51,8 @@ SOFTWARE. #include #endif -#include -#include +#include +#include #include "gcstruct.h" #include "windowstr.h" #include "pixmap.h" diff --git a/nx-X11/programs/Xserver/mi/mifpolycon.c b/nx-X11/programs/Xserver/mi/mifpolycon.c index 40b83586f..95b81bbb6 100644 --- a/nx-X11/programs/Xserver/mi/mifpolycon.c +++ b/nx-X11/programs/Xserver/mi/mifpolycon.c @@ -51,7 +51,7 @@ SOFTWARE. #endif #include -#include +#include #include "gcstruct.h" #include "windowstr.h" #include "pixmapstr.h" diff --git a/nx-X11/programs/Xserver/mi/miinitext.c b/nx-X11/programs/Xserver/mi/miinitext.c index b70a6a67e..f4ff4c243 100644 --- a/nx-X11/programs/Xserver/mi/miinitext.c +++ b/nx-X11/programs/Xserver/mi/miinitext.c @@ -191,35 +191,35 @@ typedef void (*InitExtension)(INITARGS); #ifdef MITSHM #define _XSHM_SERVER_ -#include +#include #endif #ifdef XTEST #define _XTEST_SERVER_ -#include +#include #endif #ifdef XKB -#include +#include #endif #ifdef LBX #define _XLBX_SERVER_ -#include +#include #endif #ifdef XAPPGROUP #define _XAG_SERVER_ -#include +#include #endif #ifdef XCSECURITY #define _SECURITY_SERVER -#include +#include #endif #ifdef PANORAMIX -#include +#include #endif #ifdef XF86BIGFONT -#include +#include #endif #ifdef RES -#include +#include #endif /* FIXME: this whole block of externs should be from the appropriate headers */ diff --git a/nx-X11/programs/Xserver/mi/mioverlay.c b/nx-X11/programs/Xserver/mi/mioverlay.c index 732e47af0..f67704e11 100644 --- a/nx-X11/programs/Xserver/mi/mioverlay.c +++ b/nx-X11/programs/Xserver/mi/mioverlay.c @@ -4,7 +4,7 @@ #include #endif -#include +#include #include "scrnintstr.h" #include "validate.h" #include "windowstr.h" diff --git a/nx-X11/programs/Xserver/mi/mipoly.c b/nx-X11/programs/Xserver/mi/mipoly.c index 403d3da56..11214a732 100644 --- a/nx-X11/programs/Xserver/mi/mipoly.c +++ b/nx-X11/programs/Xserver/mi/mipoly.c @@ -60,7 +60,7 @@ SOFTWARE. #include #endif -#include +#include #include "windowstr.h" #include "gcstruct.h" #include "pixmapstr.h" diff --git a/nx-X11/programs/Xserver/mi/mipolygen.c b/nx-X11/programs/Xserver/mi/mipolygen.c index c3d9ef397..98fe21d50 100644 --- a/nx-X11/programs/Xserver/mi/mipolygen.c +++ b/nx-X11/programs/Xserver/mi/mipolygen.c @@ -50,7 +50,7 @@ SOFTWARE. #include #endif -#include +#include #include "gcstruct.h" #include "miscanfill.h" #include "mipoly.h" diff --git a/nx-X11/programs/Xserver/mi/mipolypnt.c b/nx-X11/programs/Xserver/mi/mipolypnt.c index 5d615c28d..dcbdf85d0 100644 --- a/nx-X11/programs/Xserver/mi/mipolypnt.c +++ b/nx-X11/programs/Xserver/mi/mipolypnt.c @@ -50,8 +50,8 @@ SOFTWARE. #include #endif -#include -#include +#include +#include #include "pixmapstr.h" #include "gcstruct.h" #include "windowstr.h" diff --git a/nx-X11/programs/Xserver/mi/mipolyrect.c b/nx-X11/programs/Xserver/mi/mipolyrect.c index 98e467f9f..9b21bb032 100644 --- a/nx-X11/programs/Xserver/mi/mipolyrect.c +++ b/nx-X11/programs/Xserver/mi/mipolyrect.c @@ -50,8 +50,8 @@ SOFTWARE. #include #endif -#include -#include +#include +#include #include "regionstr.h" #include "gcstruct.h" #include "pixmap.h" diff --git a/nx-X11/programs/Xserver/mi/mipolyseg.c b/nx-X11/programs/Xserver/mi/mipolyseg.c index dcf3d815a..bd3c93ed6 100644 --- a/nx-X11/programs/Xserver/mi/mipolyseg.c +++ b/nx-X11/programs/Xserver/mi/mipolyseg.c @@ -50,8 +50,8 @@ SOFTWARE. #include #endif -#include -#include +#include +#include #include "regionstr.h" #include "gcstruct.h" #include "pixmap.h" diff --git a/nx-X11/programs/Xserver/mi/mipushpxl.c b/nx-X11/programs/Xserver/mi/mipushpxl.c index 5fce1cae7..44834db50 100644 --- a/nx-X11/programs/Xserver/mi/mipushpxl.c +++ b/nx-X11/programs/Xserver/mi/mipushpxl.c @@ -50,7 +50,7 @@ SOFTWARE. #include #endif -#include +#include #include "gcstruct.h" #include "scrnintstr.h" #include "pixmapstr.h" diff --git a/nx-X11/programs/Xserver/mi/miregion.c b/nx-X11/programs/Xserver/mi/miregion.c index 5ec4ec55a..1df0dcc46 100644 --- a/nx-X11/programs/Xserver/mi/miregion.c +++ b/nx-X11/programs/Xserver/mi/miregion.c @@ -82,7 +82,7 @@ Equipment Corporation. #endif #include "regionstr.h" -#include +#include #include "gc.h" #include "mi.h" #include "mispans.h" diff --git a/nx-X11/programs/Xserver/mi/miscrinit.c b/nx-X11/programs/Xserver/mi/miscrinit.c index 78e2af5a4..4950eaa93 100644 --- a/nx-X11/programs/Xserver/mi/miscrinit.c +++ b/nx-X11/programs/Xserver/mi/miscrinit.c @@ -32,7 +32,7 @@ from The Open Group. #include #endif -#include +#include #include "servermd.h" #include "misc.h" #include "mi.h" @@ -42,7 +42,7 @@ from The Open Group. #include "miline.h" #ifdef MITSHM #define _XSHM_SERVER_ -#include +#include #endif /* We use this structure to propogate some information from miScreenInit to diff --git a/nx-X11/programs/Xserver/mi/miwideline.c b/nx-X11/programs/Xserver/mi/miwideline.c index 44cf18f2e..fa9ef4591 100644 --- a/nx-X11/programs/Xserver/mi/miwideline.c +++ b/nx-X11/programs/Xserver/mi/miwideline.c @@ -47,7 +47,7 @@ from The Open Group. #include #undef _XOPEN_SOURCE #endif -#include +#include #include "windowstr.h" #include "gcstruct.h" #include "regionstr.h" diff --git a/nx-X11/programs/Xserver/mi/miwindow.c b/nx-X11/programs/Xserver/mi/miwindow.c index 179c6e31e..44b7ada60 100644 --- a/nx-X11/programs/Xserver/mi/miwindow.c +++ b/nx-X11/programs/Xserver/mi/miwindow.c @@ -50,7 +50,7 @@ SOFTWARE. #include #endif -#include +#include #include "regionstr.h" #include "region.h" #include "mi.h" diff --git a/nx-X11/programs/Xserver/mi/mizerarc.c b/nx-X11/programs/Xserver/mi/mizerarc.c index 62402f41b..4b4d724a6 100644 --- a/nx-X11/programs/Xserver/mi/mizerarc.c +++ b/nx-X11/programs/Xserver/mi/mizerarc.c @@ -40,8 +40,8 @@ Author: Bob Scheifler, MIT X Consortium #endif #include -#include -#include +#include +#include #include "regionstr.h" #include "gcstruct.h" #include "pixmapstr.h" diff --git a/nx-X11/programs/Xserver/mi/mizerclip.c b/nx-X11/programs/Xserver/mi/mizerclip.c index e648b21d4..6acfc7fe0 100644 --- a/nx-X11/programs/Xserver/mi/mizerclip.c +++ b/nx-X11/programs/Xserver/mi/mizerclip.c @@ -49,7 +49,7 @@ SOFTWARE. #include #endif -#include +#include #include "misc.h" #include "scrnintstr.h" diff --git a/nx-X11/programs/Xserver/mi/mizerline.c b/nx-X11/programs/Xserver/mi/mizerline.c index 8e62a8c94..5a61ff5d6 100644 --- a/nx-X11/programs/Xserver/mi/mizerline.c +++ b/nx-X11/programs/Xserver/mi/mizerline.c @@ -50,7 +50,7 @@ SOFTWARE. #include #endif -#include +#include #include "misc.h" #include "scrnintstr.h" diff --git a/nx-X11/programs/Xserver/os/WaitFor.c b/nx-X11/programs/Xserver/os/WaitFor.c index d97d44ab6..0a18c28c8 100644 --- a/nx-X11/programs/Xserver/os/WaitFor.c +++ b/nx-X11/programs/Xserver/os/WaitFor.c @@ -78,19 +78,19 @@ SOFTWARE. #endif #ifdef WIN32 -#include +#include #endif -#include /* for strings, fcntl, time */ +#include /* for strings, fcntl, time */ #include #include -#include +#include #include "misc.h" #ifdef __UNIXOS2__ #define select(n,r,w,x,t) os2PseudoSelect(n,r,w,x,t) #endif #include "osdep.h" -#include +#include #include "dixstruct.h" #include "opaque.h" #ifdef DPMSExtension @@ -138,7 +138,7 @@ mffs(fd_mask mask) #ifdef DPMSExtension #define DPMS_SERVER -#include +#include #endif #ifdef XTESTEXT1 diff --git a/nx-X11/programs/Xserver/os/access.c b/nx-X11/programs/Xserver/os/access.c index 07b460f40..05dfaf38a 100644 --- a/nx-X11/programs/Xserver/os/access.c +++ b/nx-X11/programs/Xserver/os/access.c @@ -62,15 +62,15 @@ SOFTWARE. #endif #ifdef WIN32 -#include +#include #endif #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include "misc.h" #include "site.h" #include @@ -197,14 +197,14 @@ SOFTWARE. #endif #define X_INCLUDE_NETDB_H -#include +#include #include "dixstruct.h" #include "osdep.h" #ifdef XCSECURITY #define _SECURITY_SERVER -#include +#include #endif #ifndef PATH_MAX diff --git a/nx-X11/programs/Xserver/os/auth.c b/nx-X11/programs/Xserver/os/auth.c index dfb6f8899..c14c1e874 100644 --- a/nx-X11/programs/Xserver/os/auth.c +++ b/nx-X11/programs/Xserver/os/auth.c @@ -57,8 +57,8 @@ from The Open Group. #ifdef K5AUTH # include #endif -# include -# include +# include +# include # include "misc.h" # include "osdep.h" # include "dixstruct.h" @@ -66,10 +66,10 @@ from The Open Group. # include #ifdef XCSECURITY #define _SECURITY_SERVER -# include +# include #endif #ifdef WIN32 -#include +#include #endif struct protocol { diff --git a/nx-X11/programs/Xserver/os/connection.c b/nx-X11/programs/Xserver/os/connection.c index 0f846d084..ef71cd540 100644 --- a/nx-X11/programs/Xserver/os/connection.c +++ b/nx-X11/programs/Xserver/os/connection.c @@ -68,14 +68,14 @@ SOFTWARE. #endif #ifdef WIN32 -#include +#include #endif -#include -#include +#include +#include #define XSERV_t #define TRANS_SERVER #define TRANS_REOPEN -#include +#include #include #include #include @@ -144,15 +144,15 @@ extern __const__ int _nfiles; #endif /* WIN32 */ #include "misc.h" #include "osdep.h" -#include +#include #include "opaque.h" #include "dixstruct.h" #ifdef XAPPGROUP -#include +#include #endif #ifdef XCSECURITY #define _SECURITY_SERVER -#include +#include #endif #ifdef LBX #include "colormapst.h" diff --git a/nx-X11/programs/Xserver/os/io.c b/nx-X11/programs/Xserver/os/io.c index b92e7c4ae..ccfc01dfe 100644 --- a/nx-X11/programs/Xserver/os/io.c +++ b/nx-X11/programs/Xserver/os/io.c @@ -63,11 +63,11 @@ SOFTWARE. #define DEBUG_COMMUNICATION #endif #ifdef WIN32 -#include +#include #endif #include -#include -#include +#include +#include #include #if !defined(__UNIXOS2__) && !defined(WIN32) #ifndef Lynx @@ -76,12 +76,12 @@ SOFTWARE. #include #endif #endif -#include +#include #define NEED_REPLIES -#include +#include #include "os.h" #include "osdep.h" -#include +#include #include "opaque.h" #include "dixstruct.h" #include "misc.h" @@ -125,7 +125,7 @@ OsCommPtr AvailableInput = (OsCommPtr)NULL; lswaps((req)->length) : (req)->length) #ifdef BIGREQS -#include +#include #define get_big_req_len(req,cli) ((cli)->swapped ? \ lswapl(((xBigReq *)(req))->length) : \ diff --git a/nx-X11/programs/Xserver/os/k5auth.c b/nx-X11/programs/Xserver/os/k5auth.c index 3c50de032..f2ed5369d 100644 --- a/nx-X11/programs/Xserver/os/k5auth.c +++ b/nx-X11/programs/Xserver/os/k5auth.c @@ -54,11 +54,11 @@ from The Open Group. #undef BITS32 #undef xfree #include -#include +#include #include "os.h" #include "osdep.h" -#include -#include +#include +#include #include "dixstruct.h" #include #include "Xauth.h" diff --git a/nx-X11/programs/Xserver/os/log.c b/nx-X11/programs/Xserver/os/log.c index 9af39800f..2444cd333 100644 --- a/nx-X11/programs/Xserver/os/log.c +++ b/nx-X11/programs/Xserver/os/log.c @@ -99,7 +99,7 @@ OR PERFORMANCE OF THIS SOFTWARE. #include #endif -#include +#include #include #include #include diff --git a/nx-X11/programs/Xserver/os/mitauth.c b/nx-X11/programs/Xserver/os/mitauth.c index 2f42fd41f..abf7976af 100644 --- a/nx-X11/programs/Xserver/os/mitauth.c +++ b/nx-X11/programs/Xserver/os/mitauth.c @@ -37,7 +37,7 @@ from The Open Group. #include #endif -#include +#include #include "os.h" #include "osdep.h" #include "dixstruct.h" diff --git a/nx-X11/programs/Xserver/os/osdep.h b/nx-X11/programs/Xserver/os/osdep.h index e8c2d5959..e0c5de3a8 100644 --- a/nx-X11/programs/Xserver/os/osdep.h +++ b/nx-X11/programs/Xserver/os/osdep.h @@ -103,7 +103,7 @@ SOFTWARE. #endif #endif -#include +#include /* * MAXSOCKS is used only for initialising MaxClients when no other method diff --git a/nx-X11/programs/Xserver/os/osinit.c b/nx-X11/programs/Xserver/os/osinit.c index ea99ace21..ca707d4b2 100644 --- a/nx-X11/programs/Xserver/os/osinit.c +++ b/nx-X11/programs/Xserver/os/osinit.c @@ -52,10 +52,10 @@ SOFTWARE. #endif #include -#include +#include #include "os.h" #include "osdep.h" -#include +#include #ifdef SMART_SCHEDULE #include "dixstruct.h" diff --git a/nx-X11/programs/Xserver/os/rpcauth.c b/nx-X11/programs/Xserver/os/rpcauth.c index 896291e59..94c26651b 100644 --- a/nx-X11/programs/Xserver/os/rpcauth.c +++ b/nx-X11/programs/Xserver/os/rpcauth.c @@ -40,7 +40,7 @@ from The Open Group. #ifdef SECURE_RPC -#include +#include #include "Xauth.h" #include "misc.h" #include "os.h" diff --git a/nx-X11/programs/Xserver/os/secauth.c b/nx-X11/programs/Xserver/os/secauth.c index 1000b4e79..eadb17b40 100644 --- a/nx-X11/programs/Xserver/os/secauth.c +++ b/nx-X11/programs/Xserver/os/secauth.c @@ -30,7 +30,7 @@ from The Open Group. #include #endif -#include +#include #include "os.h" #include "osdep.h" #include "dixstruct.h" @@ -38,7 +38,7 @@ from The Open Group. #ifdef XCSECURITY #define _SECURITY_SERVER -#include +#include #endif static char InvalidPolicyReason[] = "invalid policy specification"; diff --git a/nx-X11/programs/Xserver/os/utils.c b/nx-X11/programs/Xserver/os/utils.c index b09190c4e..3ab08897a 100644 --- a/nx-X11/programs/Xserver/os/utils.c +++ b/nx-X11/programs/Xserver/os/utils.c @@ -79,13 +79,13 @@ OR PERFORMANCE OF THIS SOFTWARE. #endif #if defined(WIN32) && !defined(__CYGWIN__) -#include +#include #endif -#include +#include #include #include "misc.h" -#include -#include +#include +#include #include "input.h" #include "dixfont.h" #include "osdep.h" @@ -136,11 +136,11 @@ OR PERFORMANCE OF THIS SOFTWARE. #endif #ifdef XKB -#include +#include #endif #ifdef XCSECURITY #define _SECURITY_SERVER -#include +#include #endif #ifdef RENDER @@ -258,7 +258,7 @@ Bool noXvExtension = FALSE; #endif #define X_INCLUDE_NETDB_H -#include +#include #include diff --git a/nx-X11/programs/Xserver/os/xalloc.c b/nx-X11/programs/Xserver/os/xalloc.c index a2487d4bc..4d2d3f1ee 100644 --- a/nx-X11/programs/Xserver/os/xalloc.c +++ b/nx-X11/programs/Xserver/os/xalloc.c @@ -39,9 +39,9 @@ Pascal Haible. #include /* for malloc() etc. */ -#include +#include #include "misc.h" -#include +#include #ifdef XALLOC_LOG #include diff --git a/nx-X11/programs/Xserver/os/xdmauth.c b/nx-X11/programs/Xserver/os/xdmauth.c index e02ca349c..92fbde478 100644 --- a/nx-X11/programs/Xserver/os/xdmauth.c +++ b/nx-X11/programs/Xserver/os/xdmauth.c @@ -40,8 +40,8 @@ from The Open Group. #endif #include -#include -#include +#include +#include #include "os.h" #include "osdep.h" #include "dixstruct.h" @@ -51,7 +51,7 @@ from The Open Group. static Bool authFromXDMCP; #ifdef XDMCP -#include +#include #undef REQUEST #include diff --git a/nx-X11/programs/Xserver/os/xdmcp.c b/nx-X11/programs/Xserver/os/xdmcp.c index 675e9c456..4181e52ce 100644 --- a/nx-X11/programs/Xserver/os/xdmcp.c +++ b/nx-X11/programs/Xserver/os/xdmcp.c @@ -21,10 +21,10 @@ #endif #ifdef WIN32 -#include +#include #endif -#include +#include #if !defined(WIN32) #ifndef Lynx @@ -39,10 +39,10 @@ #include #include -#include -#include +#include +#include #include "misc.h" -#include +#include #include "osdep.h" #include "input.h" #include "dixstruct.h" @@ -76,7 +76,7 @@ #include #define X_INCLUDE_NETDB_H -#include +#include #ifdef NX_TRANS_SOCKET diff --git a/nx-X11/programs/Xserver/os/xprintf.c b/nx-X11/programs/Xserver/os/xprintf.c index 54bbeefe2..4423208ff 100644 --- a/nx-X11/programs/Xserver/os/xprintf.c +++ b/nx-X11/programs/Xserver/os/xprintf.c @@ -30,7 +30,7 @@ #include #endif -#include +#include #include "os.h" #include #include diff --git a/nx-X11/programs/Xserver/randr/randrproto.h b/nx-X11/programs/Xserver/randr/randrproto.h index 7d5c139e9..bded957fa 100644 --- a/nx-X11/programs/Xserver/randr/randrproto.h +++ b/nx-X11/programs/Xserver/randr/randrproto.h @@ -30,7 +30,7 @@ #ifndef _XRANDRP_H_ #define _XRANDRP_H_ -/*#include */ +/*#include */ #include "randr.h" #define Window CARD32 diff --git a/nx-X11/programs/Xserver/randr/randrstr.h b/nx-X11/programs/Xserver/randr/randrstr.h index 3c3db2c13..bab784b8f 100644 --- a/nx-X11/programs/Xserver/randr/randrstr.h +++ b/nx-X11/programs/Xserver/randr/randrstr.h @@ -32,8 +32,8 @@ #ifndef _RANDRSTR_H_ #define _RANDRSTR_H_ -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "dixstruct.h" @@ -44,17 +44,17 @@ #include "extnsionst.h" #include "servermd.h" #ifndef NXAGENT_SERVER -#include -#include +#include +#include #else #include "randr.h" #include "randrproto.h" #endif #ifdef RENDER -#include /* we share subpixel order information */ +#include /* we share subpixel order information */ #include "picturestr.h" #endif -#include +#include /* required for ABI compatibility for now */ #define RANDR_10_INTERFACE 1 diff --git a/nx-X11/programs/Xserver/randr/rrxinerama.c b/nx-X11/programs/Xserver/randr/rrxinerama.c index 5441f8abc..2bc17cf21 100644 --- a/nx-X11/programs/Xserver/randr/rrxinerama.c +++ b/nx-X11/programs/Xserver/randr/rrxinerama.c @@ -88,7 +88,7 @@ #include "randrstr.h" #include "swaprep.h" #ifndef NXAGENT_SERVER -#include +#include #else #include "panoramiXproto.h" #endif diff --git a/nx-X11/programs/Xserver/record/record.c b/nx-X11/programs/Xserver/record/record.c index aa1cd7543..2c5b867b4 100644 --- a/nx-X11/programs/Xserver/record/record.c +++ b/nx-X11/programs/Xserver/record/record.c @@ -43,7 +43,7 @@ and Jim Haggerty of Metheus. #include "dixstruct.h" #include "extnsionst.h" #define _XRECORD_SERVER_ -#include +#include #include "set.h" #ifndef XFree86LOADER diff --git a/nx-X11/programs/Xserver/render/animcur.c b/nx-X11/programs/Xserver/render/animcur.c index 15293af64..27e5ab949 100644 --- a/nx-X11/programs/Xserver/render/animcur.c +++ b/nx-X11/programs/Xserver/render/animcur.c @@ -36,8 +36,8 @@ #include #endif -#include -#include +#include +#include #include "servermd.h" #include "scrnintstr.h" #include "dixstruct.h" diff --git a/nx-X11/programs/Xserver/render/glyphstr.h b/nx-X11/programs/Xserver/render/glyphstr.h index e9bbd19b0..f27a73fbb 100644 --- a/nx-X11/programs/Xserver/render/glyphstr.h +++ b/nx-X11/programs/Xserver/render/glyphstr.h @@ -26,7 +26,7 @@ #ifndef _GLYPHSTR_H_ #define _GLYPHSTR_H_ -#include +#include #include "picture.h" #include "screenint.h" diff --git a/nx-X11/programs/Xserver/render/render.c b/nx-X11/programs/Xserver/render/render.c index 8d644b35e..2dedbc9c4 100644 --- a/nx-X11/programs/Xserver/render/render.c +++ b/nx-X11/programs/Xserver/render/render.c @@ -30,8 +30,8 @@ #include #endif -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "dixstruct.h" @@ -42,11 +42,11 @@ #include "colormapst.h" #include "extnsionst.h" #include "servermd.h" -#include -#include +#include +#include #include "picturestr.h" #include "glyphstr.h" -#include +#include #include "cursorstr.h" #ifdef EXTMODULE #include "xf86_ansic.h" diff --git a/nx-X11/programs/Xserver/xfixes/xfixesint.h b/nx-X11/programs/Xserver/xfixes/xfixesint.h index 4892654be..a883acaec 100755 --- a/nx-X11/programs/Xserver/xfixes/xfixesint.h +++ b/nx-X11/programs/Xserver/xfixes/xfixesint.h @@ -30,13 +30,13 @@ #define _XFIXESINT_H_ #define NEED_EVENTS -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "dixstruct.h" #include "extnsionst.h" -#include +#include #include "windowstr.h" #include "selection.h" #include "xfixes.h" diff --git a/nx-X11/programs/Xserver/xkb/ddxBeep.c b/nx-X11/programs/Xserver/xkb/ddxBeep.c index 22d62a502..e99e4c2dd 100644 --- a/nx-X11/programs/Xserver/xkb/ddxBeep.c +++ b/nx-X11/programs/Xserver/xkb/ddxBeep.c @@ -32,14 +32,14 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #define NEED_EVENTS 1 -#include -#include -#include +#include +#include +#include #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" -#include -#include +#include +#include #if (defined(__osf__) && defined(__alpha)) #include diff --git a/nx-X11/programs/Xserver/xkb/ddxConfig.c b/nx-X11/programs/Xserver/xkb/ddxConfig.c index b023531dc..8ffd344ca 100644 --- a/nx-X11/programs/Xserver/xkb/ddxConfig.c +++ b/nx-X11/programs/Xserver/xkb/ddxConfig.c @@ -32,16 +32,16 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #define NEED_EVENTS 1 -#include -#include -#include +#include +#include +#include #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" #include "os.h" #define XKBSRV_NEED_FILE_FUNCS -#include -#include +#include +#include Bool XkbDDXApplyConfig(XPointer cfg_in,XkbSrvInfoPtr info) diff --git a/nx-X11/programs/Xserver/xkb/ddxCtrls.c b/nx-X11/programs/Xserver/xkb/ddxCtrls.c index 2e4e106ce..9fee8aa30 100644 --- a/nx-X11/programs/Xserver/xkb/ddxCtrls.c +++ b/nx-X11/programs/Xserver/xkb/ddxCtrls.c @@ -32,14 +32,14 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #define NEED_EVENTS 1 -#include -#include -#include +#include +#include +#include #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" -#include -#include +#include +#include void XkbDDXKeybdCtrlProc(DeviceIntPtr dev,KeybdCtrl *ctrl) diff --git a/nx-X11/programs/Xserver/xkb/ddxDevBtn.c b/nx-X11/programs/Xserver/xkb/ddxDevBtn.c index d0e37f263..04094e787 100644 --- a/nx-X11/programs/Xserver/xkb/ddxDevBtn.c +++ b/nx-X11/programs/Xserver/xkb/ddxDevBtn.c @@ -32,15 +32,15 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #define NEED_EVENTS 1 -#include -#include -#include +#include +#include +#include #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" -#include -#include -#include +#include +#include +#include extern int DeviceValuator; diff --git a/nx-X11/programs/Xserver/xkb/ddxFakeBtn.c b/nx-X11/programs/Xserver/xkb/ddxFakeBtn.c index 73c8a2415..b77d040ff 100644 --- a/nx-X11/programs/Xserver/xkb/ddxFakeBtn.c +++ b/nx-X11/programs/Xserver/xkb/ddxFakeBtn.c @@ -32,14 +32,14 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #define NEED_EVENTS 1 -#include -#include -#include +#include +#include +#include #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" -#include -#include +#include +#include void XkbDDXFakePointerButton(int event,int button) diff --git a/nx-X11/programs/Xserver/xkb/ddxFakeMtn.c b/nx-X11/programs/Xserver/xkb/ddxFakeMtn.c index ffd6f5d79..33fa49ae7 100644 --- a/nx-X11/programs/Xserver/xkb/ddxFakeMtn.c +++ b/nx-X11/programs/Xserver/xkb/ddxFakeMtn.c @@ -33,14 +33,14 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #define NEED_EVENTS 1 -#include -#include -#include +#include +#include +#include #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" -#include -#include +#include +#include #ifdef PANORAMIX #include "panoramiX.h" diff --git a/nx-X11/programs/Xserver/xkb/ddxInit.c b/nx-X11/programs/Xserver/xkb/ddxInit.c index 8b76b7cb1..00ffea14e 100644 --- a/nx-X11/programs/Xserver/xkb/ddxInit.c +++ b/nx-X11/programs/Xserver/xkb/ddxInit.c @@ -32,14 +32,14 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #define NEED_EVENTS 1 -#include -#include -#include +#include +#include +#include #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" -#include -#include +#include +#include int XkbDDXInitDevice(DeviceIntPtr dev) diff --git a/nx-X11/programs/Xserver/xkb/ddxKeyClick.c b/nx-X11/programs/Xserver/xkb/ddxKeyClick.c index c940e5321..e56377ca5 100644 --- a/nx-X11/programs/Xserver/xkb/ddxKeyClick.c +++ b/nx-X11/programs/Xserver/xkb/ddxKeyClick.c @@ -32,14 +32,14 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #define NEED_EVENTS 1 -#include -#include -#include +#include +#include +#include #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" -#include -#include +#include +#include void XkbDDXKeyClick(DeviceIntPtr pXDev,int keycode,int synthetic) diff --git a/nx-X11/programs/Xserver/xkb/ddxKillSrv.c b/nx-X11/programs/Xserver/xkb/ddxKillSrv.c index b78dc420d..44fad85ca 100644 --- a/nx-X11/programs/Xserver/xkb/ddxKillSrv.c +++ b/nx-X11/programs/Xserver/xkb/ddxKillSrv.c @@ -36,14 +36,14 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #define NEED_EVENTS 1 -#include -#include -#include +#include +#include +#include #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" -#include -#include +#include +#include #ifdef XF86DDXACTIONS #include "xf86.h" diff --git a/nx-X11/programs/Xserver/xkb/ddxLEDs.c b/nx-X11/programs/Xserver/xkb/ddxLEDs.c index fb5f72bf8..92ab12ee8 100644 --- a/nx-X11/programs/Xserver/xkb/ddxLEDs.c +++ b/nx-X11/programs/Xserver/xkb/ddxLEDs.c @@ -32,14 +32,14 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #define NEED_EVENTS 1 -#include -#include -#include +#include +#include +#include #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" -#include -#include +#include +#include void XkbDDXUpdateIndicators(DeviceIntPtr dev,CARD32 new) diff --git a/nx-X11/programs/Xserver/xkb/ddxList.c b/nx-X11/programs/Xserver/xkb/ddxList.c index 9c961e934..3dfb85644 100644 --- a/nx-X11/programs/Xserver/xkb/ddxList.c +++ b/nx-X11/programs/Xserver/xkb/ddxList.c @@ -33,17 +33,17 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include #define NEED_EVENTS 1 -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" #define XKBSRV_NEED_FILE_FUNCS -#include -#include +#include +#include #ifndef PATH_MAX #ifdef MAXPATHLEN diff --git a/nx-X11/programs/Xserver/xkb/ddxLoad.c b/nx-X11/programs/Xserver/xkb/ddxLoad.c index 7caf9b1cb..16343fc9c 100644 --- a/nx-X11/programs/Xserver/xkb/ddxLoad.c +++ b/nx-X11/programs/Xserver/xkb/ddxLoad.c @@ -44,17 +44,17 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #define NEED_EVENTS 1 -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" #define XKBSRV_NEED_FILE_FUNCS -#include -#include +#include +#include #include "xkb.h" #if defined(CSRG_BASED) || defined(linux) || defined(__sgi) || defined(AIXV3) || defined(__osf__) || defined(__GNU__) @@ -94,7 +94,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifdef WIN32 -#include +#include const char* Win32TempDir() { diff --git a/nx-X11/programs/Xserver/xkb/ddxPrivate.c b/nx-X11/programs/Xserver/xkb/ddxPrivate.c index 5c0bca4cd..c71216d70 100644 --- a/nx-X11/programs/Xserver/xkb/ddxPrivate.c +++ b/nx-X11/programs/Xserver/xkb/ddxPrivate.c @@ -10,10 +10,10 @@ #include #define NEED_EVENTS 1 -#include +#include #include "windowstr.h" #define XKBSRV_NEED_FILE_FUNCS -#include +#include #ifdef XF86DDXACTIONS #include "xf86.h" diff --git a/nx-X11/programs/Xserver/xkb/ddxVT.c b/nx-X11/programs/Xserver/xkb/ddxVT.c index 1b7853fa0..1806ed257 100644 --- a/nx-X11/programs/Xserver/xkb/ddxVT.c +++ b/nx-X11/programs/Xserver/xkb/ddxVT.c @@ -36,14 +36,14 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #define NEED_EVENTS 1 -#include -#include -#include +#include +#include +#include #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" -#include -#include +#include +#include #ifdef XF86DDXACTIONS #include "xf86.h" diff --git a/nx-X11/programs/Xserver/xkb/xkb.c b/nx-X11/programs/Xserver/xkb/xkb.c index 441d88a5c..4a1561db3 100644 --- a/nx-X11/programs/Xserver/xkb/xkb.c +++ b/nx-X11/programs/Xserver/xkb/xkb.c @@ -31,18 +31,18 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #endif #include -#include +#include #define NEED_EVENTS #define NEED_REPLIES -#include +#include #include "misc.h" #include "inputstr.h" #define XKBSRV_NEED_FILE_FUNCS -#include +#include #include "extnsionst.h" #include "xkb.h" -#include +#include int XkbEventBase; int XkbErrorBase; @@ -3916,7 +3916,7 @@ ProcXkbSetNames(ClientPtr client) /***====================================================================***/ -#include +#include #define XkbSizeCountedString(s) ((s)?((((2+strlen(s))+3)/4)*4):4) diff --git a/nx-X11/programs/Xserver/xkb/xkbAccessX.c b/nx-X11/programs/Xserver/xkb/xkbAccessX.c index 75e46dc32..ac5713d05 100644 --- a/nx-X11/programs/Xserver/xkb/xkbAccessX.c +++ b/nx-X11/programs/Xserver/xkb/xkbAccessX.c @@ -36,11 +36,11 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #endif #define NEED_EVENTS 1 -#include -#include -#include +#include +#include +#include #include "inputstr.h" -#include +#include #if !defined(WIN32) && !defined(Lynx) #include #endif diff --git a/nx-X11/programs/Xserver/xkb/xkbActions.c b/nx-X11/programs/Xserver/xkb/xkbActions.c index b7f3e13a5..eb1c80448 100644 --- a/nx-X11/programs/Xserver/xkb/xkbActions.c +++ b/nx-X11/programs/Xserver/xkb/xkbActions.c @@ -34,12 +34,12 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include #define NEED_EVENTS 1 -#include -#include -#include +#include +#include +#include #include "misc.h" #include "inputstr.h" -#include +#include #include "xkb.h" #include diff --git a/nx-X11/programs/Xserver/xkb/xkbEvents.c b/nx-X11/programs/Xserver/xkb/xkbEvents.c index ca201c6f0..6c0aa0761 100644 --- a/nx-X11/programs/Xserver/xkb/xkbEvents.c +++ b/nx-X11/programs/Xserver/xkb/xkbEvents.c @@ -32,13 +32,13 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #define NEED_EVENTS 1 -#include -#include -#include -#include +#include +#include +#include +#include #include "inputstr.h" #include "windowstr.h" -#include +#include #include "xkb.h" /***====================================================================***/ diff --git a/nx-X11/programs/Xserver/xkb/xkbInit.c b/nx-X11/programs/Xserver/xkb/xkbInit.c index ef7e6a4f7..9afe0dacc 100644 --- a/nx-X11/programs/Xserver/xkb/xkbInit.c +++ b/nx-X11/programs/Xserver/xkb/xkbInit.c @@ -41,19 +41,19 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include #define NEED_EVENTS 1 -#include -#include -#include -#include +#include +#include +#include +#include #include "misc.h" #include "inputstr.h" #include "opaque.h" #include "property.h" #define XKBSRV_NEED_FILE_FUNCS -#include -#include -#include -#include +#include +#include +#include +#include #include "xkb.h" #define CREATE_ATOM(s) MakeAtom(s,sizeof(s)-1,1) diff --git a/nx-X11/programs/Xserver/xkb/xkbLEDs.c b/nx-X11/programs/Xserver/xkb/xkbLEDs.c index e04c05f14..20203ef2c 100644 --- a/nx-X11/programs/Xserver/xkb/xkbLEDs.c +++ b/nx-X11/programs/Xserver/xkb/xkbLEDs.c @@ -34,13 +34,13 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include #define NEED_EVENTS 1 -#include -#include +#include +#include #include "misc.h" #include "inputstr.h" -#include -#include +#include +#include #include "xkb.h" /***====================================================================***/ diff --git a/nx-X11/programs/Xserver/xkb/xkbPrKeyEv.c b/nx-X11/programs/Xserver/xkb/xkbPrKeyEv.c index 713995d16..330fd2800 100644 --- a/nx-X11/programs/Xserver/xkb/xkbPrKeyEv.c +++ b/nx-X11/programs/Xserver/xkb/xkbPrKeyEv.c @@ -33,12 +33,12 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include #define NEED_EVENTS 1 -#include -#include -#include +#include +#include +#include #include "misc.h" #include "inputstr.h" -#include +#include #include diff --git a/nx-X11/programs/Xserver/xkb/xkbPrOtherEv.c b/nx-X11/programs/Xserver/xkb/xkbPrOtherEv.c index 82f476790..ac601c525 100644 --- a/nx-X11/programs/Xserver/xkb/xkbPrOtherEv.c +++ b/nx-X11/programs/Xserver/xkb/xkbPrOtherEv.c @@ -33,15 +33,15 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include #define NEED_EVENTS 1 -#include -#include -#include +#include +#include +#include #include "misc.h" #include "inputstr.h" -#include +#include -#include -#include +#include +#include extern void ProcessOtherEvent( xEvent * /* xE */, diff --git a/nx-X11/programs/Xserver/xkb/xkbSwap.c b/nx-X11/programs/Xserver/xkb/xkbSwap.c index be1cd94fc..c16209153 100644 --- a/nx-X11/programs/Xserver/xkb/xkbSwap.c +++ b/nx-X11/programs/Xserver/xkb/xkbSwap.c @@ -31,14 +31,14 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #endif #include "stdio.h" -#include +#include #define NEED_EVENTS #define NEED_REPLIES -#include +#include #include "misc.h" #include "inputstr.h" -#include -#include +#include +#include #include "extnsionst.h" #include "xkb.h" diff --git a/nx-X11/programs/Xserver/xkb/xkbUtils.c b/nx-X11/programs/Xserver/xkb/xkbUtils.c index f3c3ff8ca..465644f16 100644 --- a/nx-X11/programs/Xserver/xkb/xkbUtils.c +++ b/nx-X11/programs/Xserver/xkb/xkbUtils.c @@ -34,16 +34,16 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include #define NEED_EVENTS 1 -#include -#include +#include +#include #define XK_CYRILLIC -#include +#include #include "misc.h" #include "inputstr.h" #define XKBSRV_NEED_FILE_FUNCS -#include -#include +#include +#include #include "xkb.h" #ifdef MODE_SWITCH diff --git a/nx-X11/programs/nxauth/gethost.c b/nx-X11/programs/nxauth/gethost.c index cab2aea9f..fa889f29b 100644 --- a/nx-X11/programs/nxauth/gethost.c +++ b/nx-X11/programs/nxauth/gethost.c @@ -36,10 +36,10 @@ in this Software without prior written authorization from The Open Group. #endif #ifdef WIN32 -#include +#include #define EPROTOTYPE WSAEPROTOTYPE #endif -#include +#include #include #include #include diff --git a/nx-X11/programs/nxauth/parsedpy.c b/nx-X11/programs/nxauth/parsedpy.c index 8ce46815c..d0f022574 100644 --- a/nx-X11/programs/nxauth/parsedpy.c +++ b/nx-X11/programs/nxauth/parsedpy.c @@ -49,12 +49,12 @@ in this Software without prior written authorization from The Open Group. #include /* for NULL */ #include /* for isascii() and isdigit() */ -#include /* for strchr() and string routines */ -#include /* for Family contants */ +#include /* for strchr() and string routines */ +#include /* for Family contants */ #ifdef hpux #include /* for struct utsname */ #endif -#include /* for FamilyLocal */ +#include /* for FamilyLocal */ #if defined(UNIXCONN) || defined(LOCALCONN) #define UNIX_CONNECTION "unix" diff --git a/nx-X11/programs/nxauth/process.c b/nx-X11/programs/nxauth/process.c index 76259d76a..86aba2b2a 100644 --- a/nx-X11/programs/nxauth/process.c +++ b/nx-X11/programs/nxauth/process.c @@ -55,10 +55,10 @@ from The Open Group. #include #include -/*#include */ /* for Family constants */ +/*#include */ /* for Family constants */ /* -#include -#include +#include +#include */ /*FIXME*/ diff --git a/nx-X11/programs/nxauth/xauth.h b/nx-X11/programs/nxauth/xauth.h index 33a6c4e3b..4f8490070 100644 --- a/nx-X11/programs/nxauth/xauth.h +++ b/nx-X11/programs/nxauth/xauth.h @@ -29,9 +29,9 @@ in this Software without prior written authorization from The Open Group. /* $XFree86: xc/programs/xauth/xauth.h,v 1.6 2001/12/14 20:01:15 dawes Exp $ */ #include -#include -#include -#include +#include +#include +#include #ifndef True typedef int Bool; diff --git a/nx-libs.spec b/nx-libs.spec index 6eed3691a..a9afb7ec8 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -616,11 +616,11 @@ ln -sf ../../nx/bin/nxagent %{buildroot}%{_libdir}/x2go/bin/x2goagent chmod 755 %{buildroot}%{_libdir}/lib*.so* #Remove extras, GL, and other unneeded headers -rm -r %{buildroot}%{_includedir}/nx/GL -rm -r %{buildroot}%{_includedir}/nx/X11/extensions/XInput.h -rm -r %{buildroot}%{_includedir}/nx/X11/extensions/XK*.h -rm -r %{buildroot}%{_includedir}/nx/X11/extensions/*Xv*.h -rm -r %{buildroot}%{_includedir}/nx/X11/Xtrans +rm -r %{buildroot}%{_includedir}/GL +rm -r %{buildroot}%{_includedir}/nx-X11/extensions/XInput.h +rm -r %{buildroot}%{_includedir}/nx-X11/extensions/XK*.h +rm -r %{buildroot}%{_includedir}/nx-X11/extensions/*Xv*.h +rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans # Needed for Xinerama support ln -s -f ../../../../%{_lib}/libX11.so.6 %{buildroot}%{_libdir}/nx/X11/Xinerama/libNX_X11.so.6 @@ -673,23 +673,23 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %defattr(-,root,root) %{_libdir}/libNX_X11.so %dir %{_includedir}/nx -%dir %{_includedir}/nx/X11 -%{_includedir}/nx/X11/ImUtil.h -%{_includedir}/nx/X11/XKBlib.h -%{_includedir}/nx/X11/Xcms.h -%{_includedir}/nx/X11/Xlib.h -%{_includedir}/nx/X11/XlibConf.h -%{_includedir}/nx/X11/Xlibint.h -%{_includedir}/nx/X11/Xlocale.h -%{_includedir}/nx/X11/Xregion.h -%{_includedir}/nx/X11/Xresource.h -%{_includedir}/nx/X11/Xutil.h -%{_includedir}/nx/X11/cursorfont.h +%dir %{_includedir}/nx-X11 +%{_includedir}/nx-X11/ImUtil.h +%{_includedir}/nx-X11/XKBlib.h +%{_includedir}/nx-X11/Xcms.h +%{_includedir}/nx-X11/Xlib.h +%{_includedir}/nx-X11/XlibConf.h +%{_includedir}/nx-X11/Xlibint.h +%{_includedir}/nx-X11/Xlocale.h +%{_includedir}/nx-X11/Xregion.h +%{_includedir}/nx-X11/Xresource.h +%{_includedir}/nx-X11/Xutil.h +%{_includedir}/nx-X11/cursorfont.h %files -n libNX_Xau-devel %defattr(-,root,root) %{_libdir}/libNX_Xau.so -%{_includedir}/nx/X11/Xauth.h +%{_includedir}/nx-X11/Xauth.h %files -n libNX_Xau6 %defattr(-,root,root) @@ -702,33 +702,33 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %files -n libNX_Xext-devel %defattr(-,root,root) %{_libdir}/libNX_Xext.so -%dir %{_includedir}/nx/X11/extensions -%{_includedir}/nx/X11/extensions/MITMisc.h -%{_includedir}/nx/X11/extensions/XEVI.h -%{_includedir}/nx/X11/extensions/XEVIstr.h -%{_includedir}/nx/X11/extensions/XLbx.h -%{_includedir}/nx/X11/extensions/XShm.h -%{_includedir}/nx/X11/extensions/Xag.h -%{_includedir}/nx/X11/extensions/Xagsrv.h -%{_includedir}/nx/X11/extensions/Xagstr.h -%{_includedir}/nx/X11/extensions/Xcup.h -%{_includedir}/nx/X11/extensions/Xcupstr.h -%{_includedir}/nx/X11/extensions/Xdbe.h -%{_includedir}/nx/X11/extensions/Xdbeproto.h -%{_includedir}/nx/X11/extensions/Xext.h -%{_includedir}/nx/X11/extensions/dpms.h -%{_includedir}/nx/X11/extensions/dpmsstr.h -%{_includedir}/nx/X11/extensions/extutil.h -%{_includedir}/nx/X11/extensions/lbxstr.h -%{_includedir}/nx/X11/extensions/mitmiscstr.h -%{_includedir}/nx/X11/extensions/multibuf.h -%{_includedir}/nx/X11/extensions/multibufst.h -%{_includedir}/nx/X11/extensions/security.h -%{_includedir}/nx/X11/extensions/securstr.h -%{_includedir}/nx/X11/extensions/shape.h -%{_includedir}/nx/X11/extensions/sync.h -%{_includedir}/nx/X11/extensions/xtestext1.h -%{_includedir}/nx/X11/extensions/xteststr.h +%dir %{_includedir}/nx-X11/extensions +%{_includedir}/nx-X11/extensions/MITMisc.h +%{_includedir}/nx-X11/extensions/XEVI.h +%{_includedir}/nx-X11/extensions/XEVIstr.h +%{_includedir}/nx-X11/extensions/XLbx.h +%{_includedir}/nx-X11/extensions/XShm.h +%{_includedir}/nx-X11/extensions/Xag.h +%{_includedir}/nx-X11/extensions/Xagsrv.h +%{_includedir}/nx-X11/extensions/Xagstr.h +%{_includedir}/nx-X11/extensions/Xcup.h +%{_includedir}/nx-X11/extensions/Xcupstr.h +%{_includedir}/nx-X11/extensions/Xdbe.h +%{_includedir}/nx-X11/extensions/Xdbeproto.h +%{_includedir}/nx-X11/extensions/Xext.h +%{_includedir}/nx-X11/extensions/dpms.h +%{_includedir}/nx-X11/extensions/dpmsstr.h +%{_includedir}/nx-X11/extensions/extutil.h +%{_includedir}/nx-X11/extensions/lbxstr.h +%{_includedir}/nx-X11/extensions/mitmiscstr.h +%{_includedir}/nx-X11/extensions/multibuf.h +%{_includedir}/nx-X11/extensions/multibufst.h +%{_includedir}/nx-X11/extensions/security.h +%{_includedir}/nx-X11/extensions/securstr.h +%{_includedir}/nx-X11/extensions/shape.h +%{_includedir}/nx-X11/extensions/sync.h +%{_includedir}/nx-X11/extensions/xtestext1.h +%{_includedir}/nx-X11/extensions/xteststr.h %files -n libNX_Xext6 %defattr(-,root,root) @@ -737,7 +737,7 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %files -n libNX_Xfixes-devel %defattr(-,root,root) %{_libdir}/libNX_Xfixes.so -%{_includedir}/nx/X11/extensions/Xfixes.h +%{_includedir}/nx-X11/extensions/Xfixes.h %files -n libNX_Xfixes3 %defattr(-,root,root) @@ -818,83 +818,83 @@ ln -s -f ../../../../%{_lib}/libNX_Xinerama.so.1 %{buildroot}%{_libdir}/nx/X11/X %{_libdir}/libNX_Xcomposite.so %{_libdir}/libNX_Xinerama.so %{_libdir}/libNX_Xtst.so -%{_includedir}/nx/X11/X10.h -%dir %{_includedir}/nx/X11/extensions -%{_includedir}/nx/X11/extensions/XTest.h -%{_includedir}/nx/X11/extensions/Xcomposite.h -%{_includedir}/nx/X11/extensions/Xevie.h -%{_includedir}/nx/X11/extensions/Xinerama.h -%{_includedir}/nx/X11/extensions/lbxbuf.h -%{_includedir}/nx/X11/extensions/lbxbufstr.h -%{_includedir}/nx/X11/extensions/lbxdeltastr.h -%{_includedir}/nx/X11/extensions/lbximage.h -%{_includedir}/nx/X11/extensions/lbxopts.h -%{_includedir}/nx/X11/extensions/lbxzlib.h -%{_includedir}/nx/X11/extensions/panoramiXext.h -%{_includedir}/nx/X11/extensions/record.h -%{_includedir}/nx/X11/extensions/xf86dga1.h -%{_includedir}/nx/X11/extensions/xf86vmode.h -%{_includedir}/nx/X11/misc.h -%{_includedir}/nx/X11/os.h +%{_includedir}/nx-X11/X10.h +%dir %{_includedir}/nx-X11/extensions +%{_includedir}/nx-X11/extensions/XTest.h +%{_includedir}/nx-X11/extensions/Xcomposite.h +%{_includedir}/nx-X11/extensions/Xevie.h +%{_includedir}/nx-X11/extensions/Xinerama.h +%{_includedir}/nx-X11/extensions/lbxbuf.h +%{_includedir}/nx-X11/extensions/lbxbufstr.h +%{_includedir}/nx-X11/extensions/lbxdeltastr.h +%{_includedir}/nx-X11/extensions/lbximage.h +%{_includedir}/nx-X11/extensions/lbxopts.h +%{_includedir}/nx-X11/extensions/lbxzlib.h +%{_includedir}/nx-X11/extensions/panoramiXext.h +%{_includedir}/nx-X11/extensions/record.h +%{_includedir}/nx-X11/extensions/xf86dga1.h +%{_includedir}/nx-X11/extensions/xf86vmode.h +%{_includedir}/nx-X11/misc.h +%{_includedir}/nx-X11/os.h %files -n nx-proto-devel %defattr(-,root,root) -%dir %{_includedir}/nx/X11 -%{_includedir}/nx/X11/DECkeysym.h -%{_includedir}/nx/X11/HPkeysym.h -%{_includedir}/nx/X11/Sunkeysym.h -%{_includedir}/nx/X11/X.h -%{_includedir}/nx/X11/XF86keysym.h -%{_includedir}/nx/X11/XWDFile.h -%{_includedir}/nx/X11/Xalloca.h -%{_includedir}/nx/X11/Xarch.h -%{_includedir}/nx/X11/Xatom.h -%{_includedir}/nx/X11/Xdefs.h -%{_includedir}/nx/X11/Xfuncproto.h -%{_includedir}/nx/X11/Xfuncs.h -%{_includedir}/nx/X11/Xmd.h -%{_includedir}/nx/X11/Xos.h -%{_includedir}/nx/X11/Xos_r.h -%{_includedir}/nx/X11/Xosdefs.h -%{_includedir}/nx/X11/Xpoll.h -%{_includedir}/nx/X11/Xproto.h -%{_includedir}/nx/X11/Xprotostr.h -%{_includedir}/nx/X11/Xthreads.h -%{_includedir}/nx/X11/ap_keysym.h -%{_includedir}/nx/X11/keysym.h -%{_includedir}/nx/X11/keysymdef.h -%{_includedir}/nx/X11/extensions/XI.h -%{_includedir}/nx/X11/extensions/XIproto.h -%{_includedir}/nx/X11/extensions/XResproto.h -%{_includedir}/nx/X11/extensions/Xeviestr.h -%{_includedir}/nx/X11/extensions/bigreqstr.h -%{_includedir}/nx/X11/extensions/composite.h -%{_includedir}/nx/X11/extensions/compositeproto.h -%{_includedir}/nx/X11/extensions/panoramiXproto.h -%{_includedir}/nx/X11/extensions/recordstr.h -%{_includedir}/nx/X11/extensions/render.h -%{_includedir}/nx/X11/extensions/renderproto.h -%{_includedir}/nx/X11/extensions/shapestr.h -%{_includedir}/nx/X11/extensions/shmstr.h -%{_includedir}/nx/X11/extensions/syncstr.h -%{_includedir}/nx/X11/extensions/xcmiscstr.h -%{_includedir}/nx/X11/extensions/xf86bigfont.h -%{_includedir}/nx/X11/extensions/xf86bigfstr.h -%{_includedir}/nx/X11/extensions/xf86dga.h -%{_includedir}/nx/X11/extensions/xf86dga1str.h -%{_includedir}/nx/X11/extensions/xf86dgastr.h -%{_includedir}/nx/X11/extensions/xf86misc.h -%{_includedir}/nx/X11/extensions/xf86mscstr.h -%{_includedir}/nx/X11/extensions/xf86vmstr.h -%{_includedir}/nx/X11/extensions/xfixesproto.h -%{_includedir}/nx/X11/extensions/xfixeswire.h -%{_includedir}/nx/X11/extensions/xtrapbits.h -%{_includedir}/nx/X11/extensions/xtrapddmi.h -%{_includedir}/nx/X11/extensions/xtrapdi.h -%{_includedir}/nx/X11/extensions/xtrapemacros.h -%{_includedir}/nx/X11/extensions/xtraplib.h -%{_includedir}/nx/X11/extensions/xtraplibp.h -%{_includedir}/nx/X11/extensions/xtrapproto.h +%dir %{_includedir}/nx-X11 +%{_includedir}/nx-X11/DECkeysym.h +%{_includedir}/nx-X11/HPkeysym.h +%{_includedir}/nx-X11/Sunkeysym.h +%{_includedir}/nx-X11/X.h +%{_includedir}/nx-X11/XF86keysym.h +%{_includedir}/nx-X11/XWDFile.h +%{_includedir}/nx-X11/Xalloca.h +%{_includedir}/nx-X11/Xarch.h +%{_includedir}/nx-X11/Xatom.h +%{_includedir}/nx-X11/Xdefs.h +%{_includedir}/nx-X11/Xfuncproto.h +%{_includedir}/nx-X11/Xfuncs.h +%{_includedir}/nx-X11/Xmd.h +%{_includedir}/nx-X11/Xos.h +%{_includedir}/nx-X11/Xos_r.h +%{_includedir}/nx-X11/Xosdefs.h +%{_includedir}/nx-X11/Xpoll.h +%{_includedir}/nx-X11/Xproto.h +%{_includedir}/nx-X11/Xprotostr.h +%{_includedir}/nx-X11/Xthreads.h +%{_includedir}/nx-X11/ap_keysym.h +%{_includedir}/nx-X11/keysym.h +%{_includedir}/nx-X11/keysymdef.h +%{_includedir}/nx-X11/extensions/XI.h +%{_includedir}/nx-X11/extensions/XIproto.h +%{_includedir}/nx-X11/extensions/XResproto.h +%{_includedir}/nx-X11/extensions/Xeviestr.h +%{_includedir}/nx-X11/extensions/bigreqstr.h +%{_includedir}/nx-X11/extensions/composite.h +%{_includedir}/nx-X11/extensions/compositeproto.h +%{_includedir}/nx-X11/extensions/panoramiXproto.h +%{_includedir}/nx-X11/extensions/recordstr.h +%{_includedir}/nx-X11/extensions/render.h +%{_includedir}/nx-X11/extensions/renderproto.h +%{_includedir}/nx-X11/extensions/shapestr.h +%{_includedir}/nx-X11/extensions/shmstr.h +%{_includedir}/nx-X11/extensions/syncstr.h +%{_includedir}/nx-X11/extensions/xcmiscstr.h +%{_includedir}/nx-X11/extensions/xf86bigfont.h +%{_includedir}/nx-X11/extensions/xf86bigfstr.h +%{_includedir}/nx-X11/extensions/xf86dga.h +%{_includedir}/nx-X11/extensions/xf86dga1str.h +%{_includedir}/nx-X11/extensions/xf86dgastr.h +%{_includedir}/nx-X11/extensions/xf86misc.h +%{_includedir}/nx-X11/extensions/xf86mscstr.h +%{_includedir}/nx-X11/extensions/xf86vmstr.h +%{_includedir}/nx-X11/extensions/xfixesproto.h +%{_includedir}/nx-X11/extensions/xfixeswire.h +%{_includedir}/nx-X11/extensions/xtrapbits.h +%{_includedir}/nx-X11/extensions/xtrapddmi.h +%{_includedir}/nx-X11/extensions/xtrapdi.h +%{_includedir}/nx-X11/extensions/xtrapemacros.h +%{_includedir}/nx-X11/extensions/xtraplib.h +%{_includedir}/nx-X11/extensions/xtraplibp.h +%{_includedir}/nx-X11/extensions/xtrapproto.h %files -n nxagent %defattr(-,root,root) diff --git a/nxcompext/Jpeg.c b/nxcompext/Jpeg.c index cb854bc6c..d6a94cc80 100644 --- a/nxcompext/Jpeg.c +++ b/nxcompext/Jpeg.c @@ -19,9 +19,9 @@ #include #include -#include "X11/X.h" -#include "X11/Xlib.h" -#include "X11/Xmd.h" +#include +#include +#include #include diff --git a/nxcompext/NXlib.h b/nxcompext/NXlib.h index d77ff6046..15661b439 100644 --- a/nxcompext/NXlib.h +++ b/nxcompext/NXlib.h @@ -22,8 +22,8 @@ extern "C" { #endif -#include -#include +#include +#include #include "NX.h" #include "NXpack.h" diff --git a/nxcompext/Pgn.h b/nxcompext/Pgn.h index 999e8ea01..075d2bc1e 100644 --- a/nxcompext/Pgn.h +++ b/nxcompext/Pgn.h @@ -22,9 +22,9 @@ extern "C" { #endif -#include "X11/X.h" -#include "X11/Xlib.h" -#include "X11/Xmd.h" +#include +#include +#include #include diff --git a/nxcompshad/Input.h b/nxcompshad/Input.h index 6250e790b..88217c9b1 100644 --- a/nxcompshad/Input.h +++ b/nxcompshad/Input.h @@ -18,7 +18,7 @@ #ifndef Input_H #define Input_H -#include +#include typedef struct Event { diff --git a/nxcompshad/Manager.cpp b/nxcompshad/Manager.cpp index ba9260a13..3b5504a1f 100644 --- a/nxcompshad/Manager.cpp +++ b/nxcompshad/Manager.cpp @@ -15,9 +15,9 @@ /* */ /**************************************************************************/ -#include -#include -#include +#include +#include +#include #include #define PANIC diff --git a/nxcompshad/Manager.h b/nxcompshad/Manager.h index 267754906..56b7e0aa5 100644 --- a/nxcompshad/Manager.h +++ b/nxcompshad/Manager.h @@ -18,7 +18,7 @@ #ifndef UpdateManager_H #define UpdateManager_H -#include +#include #include "Updater.h" #include "Regions.h" diff --git a/nxcompshad/Regions.h b/nxcompshad/Regions.h index b9303dcb7..d46d11a72 100644 --- a/nxcompshad/Regions.h +++ b/nxcompshad/Regions.h @@ -18,8 +18,8 @@ #ifndef Region_H #define Region_H -#include -#include +#include +#include typedef struct { short x1, x2, y1, y2; diff --git a/nxcompshad/Shadow.h b/nxcompshad/Shadow.h index e1eddb95c..99824b0aa 100644 --- a/nxcompshad/Shadow.h +++ b/nxcompshad/Shadow.h @@ -18,7 +18,7 @@ #ifndef Shadow_H #define Shadow_H -#include +#include #define NXShadowCorrectColor(length, buffer) \ \ diff --git a/nxcompshad/Updater.cpp b/nxcompshad/Updater.cpp index 245c6ce31..eee81bf16 100644 --- a/nxcompshad/Updater.cpp +++ b/nxcompshad/Updater.cpp @@ -15,9 +15,9 @@ /* */ /**************************************************************************/ -#include -#include -#include +#include +#include +#include #include #define PANIC diff --git a/nxcompshad/Updater.h b/nxcompshad/Updater.h index daa26c10b..cb8b15aa6 100644 --- a/nxcompshad/Updater.h +++ b/nxcompshad/Updater.h @@ -18,7 +18,7 @@ #ifndef Updater_H #define Updater_H -#include +#include #include "Regions.h" #include "Input.h" diff --git a/nxcompshad/Win.cpp b/nxcompshad/Win.cpp index 481cbcac0..77a9694bd 100644 --- a/nxcompshad/Win.cpp +++ b/nxcompshad/Win.cpp @@ -17,7 +17,7 @@ #if defined(__CYGWIN32__) || defined(WIN32) -#include +#include #define PANIC #define WARNING diff --git a/nxcompshad/Win.h b/nxcompshad/Win.h index fe591ff02..1069fa9ee 100644 --- a/nxcompshad/Win.h +++ b/nxcompshad/Win.h @@ -20,7 +20,7 @@ #ifndef Win32Poller_H #define Win32Poller_H -//#include +//#include #include #include diff --git a/nxcompshad/X11.cpp b/nxcompshad/X11.cpp index 2d1140f11..5a18e0a69 100644 --- a/nxcompshad/X11.cpp +++ b/nxcompshad/X11.cpp @@ -22,10 +22,10 @@ #undef TEST #undef DEBUG -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include diff --git a/nxcompshad/X11.h b/nxcompshad/X11.h index 21275420c..d7b858100 100644 --- a/nxcompshad/X11.h +++ b/nxcompshad/X11.h @@ -18,10 +18,10 @@ #ifndef X11Poller_H #define X11Poller_H -#include -#include -#include -#include +#include +#include +#include "X11/include/Xdamage_nxcompshad.h" +#include "X11/include/Xrandr_nxcompshad.h" #include "Core.h" diff --git a/nxcompshad/X11/include/Xdamage_nxcompshad.h b/nxcompshad/X11/include/Xdamage_nxcompshad.h new file mode 100644 index 000000000..8e5e0fbbd --- /dev/null +++ b/nxcompshad/X11/include/Xdamage_nxcompshad.h @@ -0,0 +1,92 @@ +/* + * 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. + */ + +/* + * This file is a reduced version of the header file of + * + * + * This copy of code has been introduced to allow a clear namespace + * separation between and header files. + * + * This version of the Xdamage library header file only contains symbols + * required by nxcompshad and strictly avoids indirectly including + * from an X11 library that is also shipped in nx-X11/lib/. + * + * When using instead for inclusion in + * nxcompshad, it will attempt pulling in the + * header which in turn will include . However, the headers of + * the same name from should be used instead. + * + * FIXME: Once the nxagent Xserver starts using libXfixes from X.Org, this + * hack can be removed. + * + * 2015/06/26, Mike Gabriel + */ + + +#ifndef _XDAMAGE_H_ +#define _XDAMAGE_H_ + +#include +#include + +/* from */ +typedef XID XserverRegion; + +#define XDAMAGE_1_1_INTERFACE + +typedef XID Damage; + +typedef struct { + int type; /* event base */ + unsigned long serial; + Bool send_event; + Display *display; + Drawable drawable; + Damage damage; + int level; + Bool more; /* more events will be delivered immediately */ + Time timestamp; + XRectangle area; + XRectangle geometry; +} XDamageNotifyEvent; + +_XFUNCPROTOBEGIN + +Bool XDamageQueryExtension (Display *dpy, + int *event_base_return, + int *error_base_return); + +Status XDamageQueryVersion (Display *dpy, + int *major_version_return, + int *minor_version_return); + +Damage +XDamageCreate (Display *dpy, Drawable drawable, int level); + +void +XDamageSubtract (Display *dpy, Damage damage, + XserverRegion repair, XserverRegion parts); + +_XFUNCPROTOEND + +#endif /* _XDAMAGE_H_ */ diff --git a/nxcompshad/X11/include/Xrandr_nxcompshad.h b/nxcompshad/X11/include/Xrandr_nxcompshad.h new file mode 100644 index 000000000..4feb01685 --- /dev/null +++ b/nxcompshad/X11/include/Xrandr_nxcompshad.h @@ -0,0 +1,80 @@ +/* + * Copyright © 2000 Compaq Computer Corporation, Inc. + * Copyright © 2002 Hewlett-Packard Company, Inc. + * Copyright © 2006 Intel Corporation + * Copyright © 2008 Red Hat, 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 the copyright holders not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. The copyright holders make no representations + * about the suitability of this software for any purpose. It is provided "as + * is" without express or implied warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL THE COPYRIGHT HOLDERS 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: Jim Gettys, HP Labs, Hewlett-Packard, Inc. + * Keith Packard, Intel Corporation + */ + +/* + * This file is a reduced version of the header file of + * + * + * This copy of code has been introduced to allow a clear namespace + * separation between and header files. + * + * This version of the Xrandr library header file only contains symbols + * required by nxcompshad and strictly avoids indirectly including + * from an X11 library that is also shipped in nx-X11/lib/. + * + * When using instead for inclusion in + * nxcompshad, it will attempt pulling in the + * header which in turn will include . However, the headers of + * the same name from should be used instead. + * + * FIXME: Once the nxagent Xserver starts using libXrender from X.Org, this + * hack can be removed. + * + * 2015/06/26, Mike Gabriel + */ + +#ifndef _XRANDR_H_ +#define _XRANDR_H_ + +/* from */ +#define RRScreenChangeNotify 0 +#define RRScreenChangeNotifyMask (1L << 0) + +#include + +_XFUNCPROTOBEGIN + +/* internal representation is private to the library */ +typedef struct _XRRScreenConfiguration XRRScreenConfiguration; + +Bool XRRQueryExtension (Display *dpy, + int *event_base_return, + int *error_base_return); + +void XRRSelectInput(Display *dpy, Window window, int mask); + + +/* + * intended to take RRScreenChangeNotify, or + * ConfigureNotify (on the root window) + * returns 1 if it is an event type it understands, 0 if not + */ +int XRRUpdateConfiguration(XEvent *event); +_XFUNCPROTOEND + +#endif /* _XRANDR_H_ */ -- cgit v1.2.3 From 9bc6ff269aa8bf4c41696ebf4a686c93729ba151 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 1 Mar 2016 20:55:27 +0000 Subject: Drop X11 extensions not shipped with recent X.Org server versions anymore: include/extensions: Xag.h, Xagsrv.h, Xagstr.h Xserver/Xext: appgroup.c, appgroup.h lib/Xext: XAppgroup.c include/extensions: Xcup.h, Xcupstr.h, Xserver/Xext: cup.c lib/Xext: cup.c include/extensions: Xdbe.h Xserver/Xext: Xdbe.c Xserver/Xext: dgaproc.h, xf86dga.c, xf86dga2.c, xf86dgaext.h include/extensions: Xevie.h, Xeviestr.h include/extensions: XEVI.h, XEVIstr.h Xserver/Xext: EVI.c, EVIstruct.h, sampleEVI.c lib/Xext: XEVI.c include/extensions: fontcache.h, fontcacheP.h, fontcachstr.h Xserver/Xext: fontcache.c include/extensions: lbxbuf.h, lbxbufstr.h, lbxdeltastr.h, lbximage.h, lbxopts.h, lbxstr.h, lbxzlib.h lib/Xext: XLbx.c include/extensions: multibuf.h, multibufst.h lib/Xext: XMultibuf.c Xserver/Xext: mbuf.c, mbufbf.c, mbufpx.c include/extensions: xf86vmode.h, xf86vmstr.h Xserver/Xext: vidmodeproc.h, xf86vmode.c lib/Xext: MITMisc.c Xserver/Xext: mitmisc.c Xserver/Xext: xf86misc.c, xf86miscproc.h Xserver/XTrap: xf86XTrapModule.c, xtrapddmi.c, xtrapdi.c, xtrapdiswp.c, xtrapditbl.c include/extensions: xtrapbits.h xtrapddmi.h xtrapdi.h xtrapemacros.h xtraplib.h xtraplibp.h xtrapproto.h Fixes: ArcticaProject/nx-libs#116 X.org: https://cgit.freedesktop.org/xorg/xserver/commit/?id=cbc20d92de92aad5ca240310a9156ccf97c24a01 Plus: Drop various Imake'ish defines where not needed anymore. --- debian/libnx-xext-dev.install.in | 23 - debian/libnx-xext6.symbols | 82 +- debian/nx-x11proto-xext-dev.install.in | 1 + .../016_nx-X11_install-location.debian.patch | 2 +- debian/rules | 9 - nx-X11/config/cf/README | 5 - nx-X11/config/cf/X11.tmpl | 152 +- nx-X11/config/cf/linux.cf | 4 - nx-X11/config/cf/xorg.cf | 31 +- nx-X11/include/extensions/Imakefile | 42 +- nx-X11/include/extensions/MITMisc.h | 66 - nx-X11/include/extensions/XEVI.h | 64 - nx-X11/include/extensions/XEVIstr.h | 98 - nx-X11/include/extensions/XLbx.h | 155 -- nx-X11/include/extensions/Xag.h | 114 - nx-X11/include/extensions/Xagsrv.h | 76 - nx-X11/include/extensions/Xagstr.h | 182 -- nx-X11/include/extensions/Xcup.h | 69 - nx-X11/include/extensions/Xcupstr.h | 109 - nx-X11/include/extensions/Xdbe.h | 136 -- nx-X11/include/extensions/Xevie.h | 78 - nx-X11/include/extensions/Xeviestr.h | 165 -- nx-X11/include/extensions/Xinerama.h | 76 - nx-X11/include/extensions/fontcache.h | 106 - nx-X11/include/extensions/fontcacheP.h | 40 - nx-X11/include/extensions/fontcachstr.h | 130 -- nx-X11/include/extensions/lbxbuf.h | 51 - nx-X11/include/extensions/lbxbufstr.h | 45 - nx-X11/include/extensions/lbxdeltastr.h | 105 - nx-X11/include/extensions/lbximage.h | 151 -- nx-X11/include/extensions/lbxopts.h | 133 -- nx-X11/include/extensions/lbxstr.h | 931 --------- nx-X11/include/extensions/lbxzlib.h | 64 - nx-X11/include/extensions/mitmiscstr.h | 70 - nx-X11/include/extensions/multibuf.h | 317 --- nx-X11/include/extensions/multibufst.h | 609 ------ nx-X11/include/extensions/xf86dga.h | 264 --- nx-X11/include/extensions/xf86dga1.h | 140 -- nx-X11/include/extensions/xf86dga1str.h | 194 -- nx-X11/include/extensions/xf86dgastr.h | 344 --- nx-X11/include/extensions/xf86misc.h | 172 -- nx-X11/include/extensions/xf86mscstr.h | 238 --- nx-X11/include/extensions/xf86vmode.h | 322 --- nx-X11/include/extensions/xf86vmstr.h | 562 ----- nx-X11/include/extensions/xtrapbits.h | 83 - nx-X11/include/extensions/xtrapddmi.h | 115 - nx-X11/include/extensions/xtrapdi.h | 507 ----- nx-X11/include/extensions/xtrapemacros.h | 387 ---- nx-X11/include/extensions/xtraplib.h | 128 -- nx-X11/include/extensions/xtraplibp.h | 142 -- nx-X11/include/extensions/xtrapproto.h | 168 -- nx-X11/lib/Xext/Imakefile | 12 +- nx-X11/lib/Xext/MITMisc.c | 133 -- nx-X11/lib/Xext/XAppgroup.c | 391 ---- nx-X11/lib/Xext/XEVI.c | 213 -- nx-X11/lib/Xext/XLbx.c | 129 -- nx-X11/lib/Xext/XMultibuf.c | 714 ------- nx-X11/lib/Xext/Xcup.c | 265 --- nx-X11/lib/Xext/Xdbe.c | 474 ----- nx-X11/lib/Xext/Xext-def.cpp | 41 - nx-X11/programs/Xserver/Imakefile | 10 +- nx-X11/programs/Xserver/XTrap/Imakefile | 27 - nx-X11/programs/Xserver/XTrap/module/Imakefile | 26 - nx-X11/programs/Xserver/XTrap/xf86XTrapModule.c | 51 - nx-X11/programs/Xserver/XTrap/xtrapddmi.c | 188 -- nx-X11/programs/Xserver/XTrap/xtrapdi.c | 2157 ------------------- nx-X11/programs/Xserver/XTrap/xtrapdiswp.c | 1010 --------- nx-X11/programs/Xserver/XTrap/xtrapditbl.c | 242 --- nx-X11/programs/Xserver/Xext/EVI.c | 215 -- nx-X11/programs/Xserver/Xext/EVIstruct.h | 60 - nx-X11/programs/Xserver/Xext/Imakefile | 97 +- nx-X11/programs/Xserver/Xext/appgroup.c | 829 -------- nx-X11/programs/Xserver/Xext/appgroup.h | 10 - nx-X11/programs/Xserver/Xext/cup.c | 367 ---- nx-X11/programs/Xserver/Xext/dgaproc.h | 144 -- nx-X11/programs/Xserver/Xext/extmod/Imakefile | 74 +- nx-X11/programs/Xserver/Xext/extmod/modinit.c | 81 - nx-X11/programs/Xserver/Xext/extmod/modinit.h | 12 - nx-X11/programs/Xserver/Xext/fontcache.c | 333 --- nx-X11/programs/Xserver/Xext/mbuf.c | 1787 ---------------- nx-X11/programs/Xserver/Xext/mbufbf.c | 1030 --------- nx-X11/programs/Xserver/Xext/mbufpx.c | 651 ------ nx-X11/programs/Xserver/Xext/mitmisc.c | 176 -- nx-X11/programs/Xserver/Xext/panoramiXSwap.c | 4 +- nx-X11/programs/Xserver/Xext/panoramiXprocs.c | 6 +- nx-X11/programs/Xserver/Xext/sampleEVI.c | 121 -- nx-X11/programs/Xserver/Xext/vidmodeproc.h | 78 - nx-X11/programs/Xserver/Xext/xcmisc.c | 8 +- nx-X11/programs/Xserver/Xext/xevie.c | 719 ------- nx-X11/programs/Xserver/Xext/xf86dga.c | 307 --- nx-X11/programs/Xserver/Xext/xf86dga2.c | 775 ------- nx-X11/programs/Xserver/Xext/xf86dgaext.h | 12 - nx-X11/programs/Xserver/Xext/xf86misc.c | 854 -------- nx-X11/programs/Xserver/Xext/xf86miscproc.h | 70 - nx-X11/programs/Xserver/Xext/xf86vmode.c | 2206 -------------------- nx-X11/programs/Xserver/dix/dispatch.c | 10 +- nx-libs.spec | 43 +- 97 files changed, 118 insertions(+), 25301 deletions(-) delete mode 100644 nx-X11/include/extensions/MITMisc.h delete mode 100644 nx-X11/include/extensions/XEVI.h delete mode 100644 nx-X11/include/extensions/XEVIstr.h delete mode 100644 nx-X11/include/extensions/XLbx.h delete mode 100644 nx-X11/include/extensions/Xag.h delete mode 100644 nx-X11/include/extensions/Xagsrv.h delete mode 100644 nx-X11/include/extensions/Xagstr.h delete mode 100644 nx-X11/include/extensions/Xcup.h delete mode 100644 nx-X11/include/extensions/Xcupstr.h delete mode 100644 nx-X11/include/extensions/Xdbe.h delete mode 100644 nx-X11/include/extensions/Xevie.h delete mode 100644 nx-X11/include/extensions/Xeviestr.h delete mode 100644 nx-X11/include/extensions/Xinerama.h delete mode 100644 nx-X11/include/extensions/fontcache.h delete mode 100644 nx-X11/include/extensions/fontcacheP.h delete mode 100644 nx-X11/include/extensions/fontcachstr.h delete mode 100644 nx-X11/include/extensions/lbxbuf.h delete mode 100644 nx-X11/include/extensions/lbxbufstr.h delete mode 100644 nx-X11/include/extensions/lbxdeltastr.h delete mode 100644 nx-X11/include/extensions/lbximage.h delete mode 100644 nx-X11/include/extensions/lbxopts.h delete mode 100644 nx-X11/include/extensions/lbxstr.h delete mode 100644 nx-X11/include/extensions/lbxzlib.h delete mode 100644 nx-X11/include/extensions/mitmiscstr.h delete mode 100644 nx-X11/include/extensions/multibuf.h delete mode 100644 nx-X11/include/extensions/multibufst.h delete mode 100644 nx-X11/include/extensions/xf86dga.h delete mode 100644 nx-X11/include/extensions/xf86dga1.h delete mode 100644 nx-X11/include/extensions/xf86dga1str.h delete mode 100644 nx-X11/include/extensions/xf86dgastr.h delete mode 100644 nx-X11/include/extensions/xf86misc.h delete mode 100644 nx-X11/include/extensions/xf86mscstr.h delete mode 100644 nx-X11/include/extensions/xf86vmode.h delete mode 100644 nx-X11/include/extensions/xf86vmstr.h delete mode 100644 nx-X11/include/extensions/xtrapbits.h delete mode 100644 nx-X11/include/extensions/xtrapddmi.h delete mode 100644 nx-X11/include/extensions/xtrapdi.h delete mode 100644 nx-X11/include/extensions/xtrapemacros.h delete mode 100644 nx-X11/include/extensions/xtraplib.h delete mode 100644 nx-X11/include/extensions/xtraplibp.h delete mode 100644 nx-X11/include/extensions/xtrapproto.h delete mode 100644 nx-X11/lib/Xext/MITMisc.c delete mode 100644 nx-X11/lib/Xext/XAppgroup.c delete mode 100644 nx-X11/lib/Xext/XEVI.c delete mode 100644 nx-X11/lib/Xext/XLbx.c delete mode 100644 nx-X11/lib/Xext/XMultibuf.c delete mode 100644 nx-X11/lib/Xext/Xcup.c delete mode 100644 nx-X11/lib/Xext/Xdbe.c delete mode 100644 nx-X11/programs/Xserver/XTrap/Imakefile delete mode 100644 nx-X11/programs/Xserver/XTrap/module/Imakefile delete mode 100644 nx-X11/programs/Xserver/XTrap/xf86XTrapModule.c delete mode 100644 nx-X11/programs/Xserver/XTrap/xtrapddmi.c delete mode 100644 nx-X11/programs/Xserver/XTrap/xtrapdi.c delete mode 100644 nx-X11/programs/Xserver/XTrap/xtrapdiswp.c delete mode 100644 nx-X11/programs/Xserver/XTrap/xtrapditbl.c delete mode 100644 nx-X11/programs/Xserver/Xext/EVI.c delete mode 100644 nx-X11/programs/Xserver/Xext/EVIstruct.h delete mode 100644 nx-X11/programs/Xserver/Xext/appgroup.c delete mode 100644 nx-X11/programs/Xserver/Xext/appgroup.h delete mode 100644 nx-X11/programs/Xserver/Xext/cup.c delete mode 100644 nx-X11/programs/Xserver/Xext/dgaproc.h delete mode 100644 nx-X11/programs/Xserver/Xext/fontcache.c delete mode 100644 nx-X11/programs/Xserver/Xext/mbuf.c delete mode 100644 nx-X11/programs/Xserver/Xext/mbufbf.c delete mode 100644 nx-X11/programs/Xserver/Xext/mbufpx.c delete mode 100644 nx-X11/programs/Xserver/Xext/mitmisc.c delete mode 100644 nx-X11/programs/Xserver/Xext/sampleEVI.c delete mode 100644 nx-X11/programs/Xserver/Xext/vidmodeproc.h delete mode 100644 nx-X11/programs/Xserver/Xext/xevie.c delete mode 100644 nx-X11/programs/Xserver/Xext/xf86dga.c delete mode 100644 nx-X11/programs/Xserver/Xext/xf86dga2.c delete mode 100644 nx-X11/programs/Xserver/Xext/xf86dgaext.h delete mode 100644 nx-X11/programs/Xserver/Xext/xf86misc.c delete mode 100644 nx-X11/programs/Xserver/Xext/xf86miscproc.h delete mode 100644 nx-X11/programs/Xserver/Xext/xf86vmode.c (limited to 'nx-X11/programs/Xserver/XTrap/xf86XTrapModule.c') diff --git a/debian/libnx-xext-dev.install.in b/debian/libnx-xext-dev.install.in index 0d1df8c08..4a571b9fd 100644 --- a/debian/libnx-xext-dev.install.in +++ b/debian/libnx-xext-dev.install.in @@ -1,32 +1,9 @@ usr/lib/*/libNX_Xext.so -usr/include/*/nx-X11/extensions/MITMisc.h -usr/include/*/nx-X11/extensions/XEVI.h -usr/include/*/nx-X11/extensions/XEVIstr.h -usr/include/*/nx-X11/extensions/Xevie.h -usr/include/*/nx-X11/extensions/Xeviestr.h -usr/include/*/nx-X11/extensions/XLbx.h usr/include/*/nx-X11/extensions/XShm.h -usr/include/*/nx-X11/extensions/Xag.h -usr/include/*/nx-X11/extensions/Xagsrv.h -usr/include/*/nx-X11/extensions/Xagstr.h -usr/include/*/nx-X11/extensions/Xcup.h -usr/include/*/nx-X11/extensions/Xcupstr.h -usr/include/*/nx-X11/extensions/Xdbe.h -usr/include/*/nx-X11/extensions/Xdbeproto.h usr/include/*/nx-X11/extensions/Xext.h usr/include/*/nx-X11/extensions/dpms.h usr/include/*/nx-X11/extensions/dpmsstr.h usr/include/*/nx-X11/extensions/extutil.h -usr/include/*/nx-X11/extensions/lbxstr.h -usr/include/*/nx-X11/extensions/lbxbuf.h -usr/include/*/nx-X11/extensions/lbxdeltastr.h -usr/include/*/nx-X11/extensions/lbximage.h -usr/include/*/nx-X11/extensions/lbxbufstr.h -usr/include/*/nx-X11/extensions/lbxopts.h -usr/include/*/nx-X11/extensions/lbxzlib.h -usr/include/*/nx-X11/extensions/mitmiscstr.h -usr/include/*/nx-X11/extensions/multibuf.h -usr/include/*/nx-X11/extensions/multibufst.h usr/include/*/nx-X11/extensions/security.h usr/include/*/nx-X11/extensions/securstr.h usr/include/*/nx-X11/extensions/shape.h diff --git a/debian/libnx-xext6.symbols b/debian/libnx-xext6.symbols index 28f4c4fed..e48ae4968 100644 --- a/debian/libnx-xext6.symbols +++ b/debian/libnx-xext6.symbols @@ -8,12 +8,12 @@ libNX_Xext.so.6 libnx-xext6 #MINVER# DPMSInfo@Base 3.5.0.29 DPMSQueryExtension@Base 3.5.0.29 DPMSSetTimeouts@Base 3.5.0.29 - XLbxGetEventBase@Base 3.5.0.29 - XLbxQueryExtension@Base 3.5.0.29 - XLbxQueryVersion@Base 3.5.0.29 - XMITMiscGetBugMode@Base 3.5.0.29 - XMITMiscQueryExtension@Base 3.5.0.29 - XMITMiscSetBugMode@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XLbxGetEventBase@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XLbxQueryExtension@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XLbxQueryVersion@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XMITMiscGetBugMode@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XMITMiscQueryExtension@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XMITMiscSetBugMode@Base 3.5.0.29 XMissingExtension@Base 3.5.0.29 XSecurityAllocXauth@Base 3.5.0.29 XSecurityFreeXauth@Base 3.5.0.29 @@ -85,44 +85,44 @@ libNX_Xext.so.6 libnx-xext6 #MINVER# XTestQueryInputSize@Base 3.5.0.29 XTestReset@Base 3.5.0.29 XTestStopInput@Base 3.5.0.29 - XagCreateAssociation@Base 3.5.0.29 - XagCreateEmbeddedApplicationGroup@Base 3.5.0.29 - XagCreateNonembeddedApplicationGroup@Base 3.5.0.29 - XagDestroyApplicationGroup@Base 3.5.0.29 - XagDestroyAssociation@Base 3.5.0.29 - XagGetApplicationGroupAttributes@Base 3.5.0.29 - XagQueryApplicationGroup@Base 3.5.0.29 - XagQueryVersion@Base 3.5.0.29 - XcupGetReservedColormapEntries@Base 3.5.0.29 - XcupQueryVersion@Base 3.5.0.29 - XcupStoreColors@Base 3.5.0.29 - XdbeAllocateBackBufferName@Base 3.5.0.29 - XdbeBeginIdiom@Base 3.5.0.29 - XdbeDeallocateBackBufferName@Base 3.5.0.29 - XdbeEndIdiom@Base 3.5.0.29 - XdbeFreeVisualInfo@Base 3.5.0.29 - XdbeGetBackBufferAttributes@Base 3.5.0.29 - XdbeGetVisualInfo@Base 3.5.0.29 - XdbeQueryExtension@Base 3.5.0.29 - XdbeSwapBuffers@Base 3.5.0.29 - XeviGetVisualInfo@Base 3.5.0.29 - XeviQueryExtension@Base 3.5.0.29 - XeviQueryVersion@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XagCreateAssociation@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XagCreateEmbeddedApplicationGroup@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XagCreateNonembeddedApplicationGroup@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XagDestroyApplicationGroup@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XagDestroyAssociation@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XagGetApplicationGroupAttributes@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XagQueryApplicationGroup@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XagQueryVersion@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XcupGetReservedColormapEntries@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XcupQueryVersion@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XcupStoreColors@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XdbeAllocateBackBufferName@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XdbeBeginIdiom@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XdbeDeallocateBackBufferName@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XdbeEndIdiom@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XdbeFreeVisualInfo@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XdbeGetBackBufferAttributes@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XdbeGetVisualInfo@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XdbeQueryExtension@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XdbeSwapBuffers@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XeviGetVisualInfo@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XeviQueryExtension@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XeviQueryVersion@Base 3.5.0.29 XextAddDisplay@Base 3.5.0.29 XextCreateExtension@Base 3.5.0.29 XextDestroyExtension@Base 3.5.0.29 XextFindDisplay@Base 3.5.0.29 XextRemoveDisplay@Base 3.5.0.29 - XmbufChangeBufferAttributes@Base 3.5.0.29 - XmbufChangeWindowAttributes@Base 3.5.0.29 - XmbufClearBufferArea@Base 3.5.0.29 - XmbufCreateBuffers@Base 3.5.0.29 - XmbufCreateStereoWindow@Base 3.5.0.29 - XmbufDestroyBuffers@Base 3.5.0.29 - XmbufDisplayBuffers@Base 3.5.0.29 - XmbufGetBufferAttributes@Base 3.5.0.29 - XmbufGetScreenInfo@Base 3.5.0.29 - XmbufGetVersion@Base 3.5.0.29 - XmbufGetWindowAttributes@Base 3.5.0.29 - XmbufQueryExtension@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XmbufChangeBufferAttributes@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XmbufChangeWindowAttributes@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XmbufClearBufferArea@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XmbufCreateBuffers@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XmbufCreateStereoWindow@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XmbufDestroyBuffers@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XmbufDisplayBuffers@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XmbufGetBufferAttributes@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XmbufGetScreenInfo@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XmbufGetVersion@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XmbufGetWindowAttributes@Base 3.5.0.29 +#MISSING: 2:3.5.99.0-0# XmbufQueryExtension@Base 3.5.0.29 _XExtensionErrorFunction@Base 3.5.0.29 diff --git a/debian/nx-x11proto-xext-dev.install.in b/debian/nx-x11proto-xext-dev.install.in index 61829cf29..f0dfd211e 100644 --- a/debian/nx-x11proto-xext-dev.install.in +++ b/debian/nx-x11proto-xext-dev.install.in @@ -3,3 +3,4 @@ usr/include/*/nx-X11/extensions/xtestconst.h usr/include/*/nx-X11/extensions/shapestr.h usr/include/*/nx-X11/extensions/shmstr.h usr/include/*/nx-X11/extensions/syncstr.h +usr/include/*/nx-X11/extensions/Xdbeproto.h diff --git a/debian/patches/016_nx-X11_install-location.debian.patch b/debian/patches/016_nx-X11_install-location.debian.patch index 94e2cb075..89c78f985 100644 --- a/debian/patches/016_nx-X11_install-location.debian.patch +++ b/debian/patches/016_nx-X11_install-location.debian.patch @@ -6,7 +6,7 @@ Author: Mike Gabriel Last-Update: 2012-12-31 --- a/nx-X11/config/cf/Imake.tmpl +++ b/nx-X11/config/cf/Imake.tmpl -@@ -829,7 +829,7 @@ +@@ -776,7 +776,7 @@ #define AlternateUsrLibDir YES #endif #else diff --git a/debian/rules b/debian/rules index 578fc84f8..9fc39464c 100755 --- a/debian/rules +++ b/debian/rules @@ -45,17 +45,8 @@ override_dh_install: rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/XInput.h rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/XK*.h rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/*Xv*.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xtrap*.h rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/XRes*.h rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/record*.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86vmode.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86vmstr.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86misc.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86dga1.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86dgastr.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86dga.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86dga1str.h - rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86mscstr.h rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/bigreqstr.h rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xcmiscstr.h rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/XIproto.h diff --git a/nx-X11/config/cf/README b/nx-X11/config/cf/README index 3e1fe95a3..0faa34ae7 100644 --- a/nx-X11/config/cf/README +++ b/nx-X11/config/cf/README @@ -172,15 +172,10 @@ X11.tmpl provides defaults for the following variables: BDFTOSNFFILT command to run bdftosnf BaseExtensionDefines universal extensions to use BinDir directory in which to install programs - BuildAppgroup build AppGroup extension in server - BuildCup build Colormap Utilization extension in server BuildDBE build DOUBLE-BUFFER extension - BuildDmx build Distributed Multihead X server and extension BuildDPMS build Display Power Management Signaling extension BuildIncRoot relative path to location of headers in build BuildIncTop path from build includes directory to top - BuildEVI build EVI server extension - BuildMultibuffer build Multibuffer extension (obsolete) BuildPlugin build xrx plug-in for web browsers BuildRECORD Build RECORD extension BuildServer build X server diff --git a/nx-X11/config/cf/X11.tmpl b/nx-X11/config/cf/X11.tmpl index f02f80786..89b069772 100644 --- a/nx-X11/config/cf/X11.tmpl +++ b/nx-X11/config/cf/X11.tmpl @@ -157,9 +157,6 @@ XORGRELSTRING = XorgManVersionString #define BuildXauLib (BuildLibraries || BuildLibrariesForXServers) #endif #define UseInstalledXauLib (defined(UseInstalled) || !BuildXauLib) -#ifndef BuildMITMiscExt -#define BuildMITMiscExt YES -#endif #ifndef BuildTestExt #define BuildTestExt YES #endif @@ -178,21 +175,12 @@ XORGRELSTRING = XorgManVersionString #ifndef BuildXInputExt #define BuildXInputExt NO #endif -#ifndef BuildEVI -#define BuildEVI YES -#endif #ifndef BuildDBE #define BuildDBE YES #endif -#ifndef BuildDIS -#define BuildDIS NO -#endif #ifndef BuildDPMS #define BuildDPMS YES #endif -#ifndef BuildFontCache -#define BuildFontCache NO -#endif #ifndef BuildXKB #define BuildXKB YES #endif @@ -201,9 +189,6 @@ XORGRELSTRING = XorgManVersionString #endif #ifndef BuildXKBfilelib #define BuildXKBfilelib (BuildXKB && !BuildServersOnly) -#endif -#ifndef BuildXTrap -#define BuildXTrap YES #endif /* @@ -214,9 +199,6 @@ XORGRELSTRING = XorgManVersionString #ifndef UseXKBInClients #define UseXKBInClients NO /* use XKB in "normal" clients? */ #endif -#ifndef BuildMultibuffer -#define BuildMultibuffer NO -#endif #ifndef BuildRECORD #define BuildRECORD YES #endif @@ -229,15 +211,6 @@ XORGRELSTRING = XorgManVersionString #ifndef BuildXCSecurity #define BuildXCSecurity YES #endif -#ifndef BuildAppgroup -#define BuildAppgroup YES -#endif -#if BuildAppgroup && !BuildXCSecurity -#define BuildXCSecurity YES -#endif -#ifndef BuildCup -#define BuildCup YES -#endif #ifndef HasPlugin /* Browser plugins are shared libraries - only build them if the OS * supports shared libs. @@ -251,18 +224,9 @@ XORGRELSTRING = XorgManVersionString #ifndef BuildScreenSaverExt #define BuildScreenSaverExt NO #endif -#ifndef BuildXF86VidModeExt -#define BuildXF86VidModeExt NO -#endif -#ifndef BuildXF86MiscExt -#define BuildXF86MiscExt NO -#endif #ifndef BuildXF86BigfontExt #define BuildXF86BigfontExt NO #endif -#ifndef BuildXF86DGA -#define BuildXF86DGA NO -#endif #ifndef BuildXResExt #define BuildXResExt NO #endif @@ -301,10 +265,6 @@ XORGRELSTRING = XorgManVersionString #define BuildCompositeLibrary !BuildServersOnly && BuildXfixesLibrary #endif -#ifndef BuildXevie -#define BuildXevie YES -#endif - #ifndef BuildRootless #define BuildRootless NO #endif @@ -459,13 +419,6 @@ FCHOWN_DEFINES = -DHAS_FCHOWN #endif #ifndef ExtensionDefines -#ifndef MITMiscDefines -#if BuildMITMiscExt -#define MITMiscDefines -DMITMISC -#else -#define MITMiscDefines /**/ -#endif -#endif #ifndef XTestDefines #if BuildTestExt #define XTestDefines -DXTEST @@ -473,13 +426,6 @@ FCHOWN_DEFINES = -DHAS_FCHOWN #define XTestDefines /**/ #endif #endif -#ifndef XTrapDefines -#if BuildXTrap -#define XTrapDefines -DXTRAP -#else -#define XTrapDefines /**/ -#endif -#endif #ifndef XSyncDefines #if BuildSyncExt #define XSyncDefines -DXSYNC @@ -573,14 +519,6 @@ FCHOWN_DEFINES = -DHAS_FCHOWN #endif #endif -#ifndef EVIDefines -#if BuildEVI -#define EVIDefines -DEVI -#else -#define EVIDefines /**/ -#endif -#endif - #ifndef DBEDefines #if BuildDBE #define DBEDefines -DDBE @@ -593,14 +531,6 @@ FCHOWN_DEFINES = -DHAS_FCHOWN #define PervasiveDBEDefines /* -DNEED_DBE_BUF_BITS -DNEED_DBE_BUF_VALIDATE */ #endif -#ifndef MultibufferDefines -#if BuildMultibuffer -#define MultibufferDefines -DMULTIBUFFER -#else -#define MultibufferDefines /**/ -#endif -#endif - #ifndef ScreenSaverExtensionDefines #if BuildScreenSaverExt #define ScreenSaverExtensionDefines -DSCREENSAVER @@ -608,20 +538,6 @@ FCHOWN_DEFINES = -DHAS_FCHOWN #define ScreenSaverExtensionDefines /**/ #endif #endif -#ifndef VidModeExtensionDefines -#if BuildXF86VidModeExt -#define VidModeExtensionDefines -DXF86VIDMODE -#else -#define VidModeExtensionDefines /**/ -#endif -#endif -#ifndef XF86MiscExtensionDefines -#if BuildXF86MiscExt -#define XF86MiscExtensionDefines -DXF86MISC -#else -#define XF86MiscExtensionDefines /**/ -#endif -#endif #ifndef XF86BigfontExtensionDefines #if BuildXF86BigfontExt @@ -663,14 +579,6 @@ FCHOWN_DEFINES = -DHAS_FCHOWN #endif #endif -#ifndef AppgroupDefines -#if BuildAppgroup -#define AppgroupDefines -DXAPPGROUP -#else -#define AppgroupDefines /**/ -#endif -#endif - #ifndef XCSecurityDefines #if BuildXCSecurity #define XCSecurityDefines -DXCSECURITY @@ -679,14 +587,6 @@ FCHOWN_DEFINES = -DHAS_FCHOWN #endif #endif -#ifndef CupDefines -#if BuildCup -#define CupDefines -DTOGCUP -#else -#define CupDefines /**/ -#endif -#endif - #ifndef DPMSDefines #if BuildDPMS #define DPMSDefines -DDPMSExtension @@ -711,14 +611,6 @@ FCHOWN_DEFINES = -DHAS_FCHOWN #endif #endif -#ifndef FontCacheExtentionDefines -#if BuildFontCache -#define FontCacheExtensionDefines -DFONTCACHE -#else -#define FontCacheExtensionDefines /**/ -#endif -#endif - #ifndef XfixesDefines #if BuildXfixes #define XfixesDefines -DXFIXES @@ -743,14 +635,6 @@ FCHOWN_DEFINES = -DHAS_FCHOWN #endif #endif -#ifndef XevieDefines -#if BuildXevie -#define XevieDefines -DXEVIE -#else -#define XevieDefines /**/ -#endif -#endif - #ifndef RootlessDefines #if BuildRootless #define RootlessDefines -DROOTLESS @@ -764,12 +648,20 @@ FCHOWN_DEFINES = -DHAS_FCHOWN #endif #ifndef PervasiveExtensionDefines #define PervasiveExtensionDefines \ - ShapeDefines XInputDefines XkbDefines AppgroupDefines \ - XCSecurityDefines CupDefines PervasiveDBEDefines \ - XF86BigfontExtensionDefines DPMSDefines \ + PervasiveDBEDefines \ + ShapeDefines \ + XInputDefines \ + XkbDefines \ + XCSecurityDefines \ + XF86BigfontExtensionDefines \ + DPMSDefines \ + SitePervasiveExtensionDefines \ + RenderDefines \ + RandRDefines \ XineramaDefines \ - SitePervasiveExtensionDefines RenderDefines RandRDefines \ - XfixesDefines XDamageDefines CompositeDefines XevieDefines \ + XfixesDefines \ + XDamageDefines \ + CompositeDefines \ RootlessDefines #endif #ifndef SiteExtensionDefines @@ -777,12 +669,18 @@ FCHOWN_DEFINES = -DHAS_FCHOWN #endif #ifndef BaseExtensionDefines #define BaseExtensionDefines \ - MultibufferDefines MITMiscDefines XTestDefines XTrapDefines \ - XSyncDefines XCMiscDefines RECORDDefines \ - ShmDefines BigReqDefines VidModeExtensionDefines \ - XF86MiscExtensionDefines DBEDefines DPMSDefines EVIDefines \ - ScreenSaverExtensionDefines XvExtensionDefines XvMCExtensionDefines \ - GlxDefines FontCacheExtensionDefines SiteExtensionDefines \ + DBEDefines \ + XTestDefines \ + XSyncDefines \ + RECORDDefines \ + ShmDefines \ + BigReqDefines \ + DPMSDefines \ + ScreenSaverExtensionDefines \ + XvExtensionDefines \ + XvMCExtensionDefines \ + GlxDefines \ + SiteExtensionDefines \ XResExtensionDefines #endif #define ExtensionDefines BaseExtensionDefines ExtensionOSDefines diff --git a/nx-X11/config/cf/linux.cf b/nx-X11/config/cf/linux.cf index d1f930123..3ff1f5b7d 100644 --- a/nx-X11/config/cf/linux.cf +++ b/nx-X11/config/cf/linux.cf @@ -944,10 +944,6 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion) # endif #endif -#ifndef BuildDmx -#define BuildDmx YES -#endif - #include # include diff --git a/nx-X11/config/cf/xorg.cf b/nx-X11/config/cf/xorg.cf index a6eaddc72..54ca00bc5 100644 --- a/nx-X11/config/cf/xorg.cf +++ b/nx-X11/config/cf/xorg.cf @@ -471,21 +471,6 @@ IPLAN2P8_DEFS = -DUSE_IPLAN2P8 #endif #endif -/* - * Build the XFree86-VidMode extension - */ -#ifndef BuildXF86VidModeExt -# define BuildXF86VidModeExt YES -#endif - -/* Don't build this now because the interface hasn't been done yet */ -/* - * Build the XFree86-Misc extension - */ -#ifndef BuildXF86MiscExt -# define BuildXF86MiscExt YES -#endif - /* * Build the XFree86-Bigfont extension */ @@ -493,13 +478,6 @@ IPLAN2P8_DEFS = -DUSE_IPLAN2P8 # define BuildXF86BigfontExt YES #endif -/* - * Build the XFree86 DGA support - */ -#ifndef BuildXF86DGA -# define BuildXF86DGA YES -#endif - /* * Build the DPMS extension support */ @@ -576,12 +554,6 @@ IPLAN2P8_DEFS = -DUSE_IPLAN2P8 #define InstallJapaneseDocs NO #endif -#if BuildXF86DGA -# define XFree86DGADefines -DXFreeXDGA -#else -# define XFree86DGADefines /**/ -#endif - #if BuildXvExt # define XFree86XvDefines -DXvExtension #else @@ -643,9 +615,8 @@ IPLAN2P8_DEFS = -DUSE_IPLAN2P8 /* Server defines required for all OSs */ #ifndef XFree86ServerDefines # define XFree86ServerDefines -DAVOID_GLYPHBLT -DPIXPRIV -DSINGLEDEPTH \ - XFree86DGADefines XFree86XvDefines \ + XFree86XvDefines \ XFree86LoaderDefines -DXFree86Server \ - VidModeExtensionDefines \ XFree86XvMCDefines \ SmartScheduleDefines \ DebugDefines XFree86XResDefines \ diff --git a/nx-X11/include/extensions/Imakefile b/nx-X11/include/extensions/Imakefile index eb7763535..9f03df68c 100644 --- a/nx-X11/include/extensions/Imakefile +++ b/nx-X11/include/extensions/Imakefile @@ -12,29 +12,13 @@ NULL = SCREENSAVERHEADERS = saver.h saverproto.h scrnsaver.h #endif -#if BuildXF86MiscExt -XF86MISCHEADERS = xf86misc.h xf86mscstr.h -#endif #if BuildXF86BigfontExt XF86BIGFONTHEADERS = xf86bigfont.h xf86bigfstr.h #endif -#if BuildXF86VidModeExt -XF86VIDMODEHEADERS = xf86vmode.h xf86vmstr.h -#endif -#if BuildXF86DGA -XF86DGAHEADERS = xf86dga.h xf86dgastr.h xf86dga1.h xf86dga1str.h -#endif -#if BuildXextLib -LBXHEADERS = XLbx.h lbxbuf.h lbxbufstr.h lbxdeltastr.h lbximage.h lbxopts.h \ - lbxstr.h lbxzlib.h -#endif #if BuildXvExt XVHEADERS = Xv.h Xvlib.h Xvproto.h XVMCHEADERS = XvMC.h XvMClib.h XvMCproto.h vldXvMC.h #endif -#if BuildFontCache -FONTCACHEHEADERS = fontcache.h fontcacheP.h fontcachstr.h -#endif #if BuildXinerama XINERAMAHEADERS = panoramiXext.h panoramiXproto.h #endif @@ -53,58 +37,39 @@ COMPOSITEHEADERS = composite.h compositeproto.h #if BuildDamage DAMAGEHEADERS = damagewire.h damageproto.h #endif -#if BuildXTrap -XTRAPHEADERS = xtrapbits.h xtrapddmi.h xtrapdi.h xtrapemacros.h xtraplib.h \ - xtraplibp.h xtrapproto.h -#endif #if BuildXResExt XRESHEADERS = XResproto.h #endif -#if BuildXevie -XEVIEHEADERS = Xevie.h Xeviestr.h -#endif EXTRAHEADERS = \ $(SCREENSAVERHEADERS) \ - $(XF86MISCHEADERS) \ - $(XF86BIGFONTHEADERS) \ - $(XF86VIDMODEHEADERS) \ - $(XF86DGAHEADERS) \ $(XINERAMAHEADERS) \ - $(LBXHEADERS) \ + $(XF86BIGFONTHEADERS) \ $(XVHEADERS) \ $(XVMCHEADERS) \ - $(FONTCACHEHEADERS) \ $(RANDRHEADERS) \ $(RENDERHEADERS) \ $(XFIXESHEADERS) \ $(COMPOSITEHEADERS) \ $(DAMAGEHEADERS) \ - $(XEVIEHEADERS) \ - $(XTRAPHEADERS) \ $(XRESHEADERS) \ $(NULL) HEADERS = Xext.h \ xcmiscstr.h \ - MITMisc.h mitmiscstr.h \ bigreqstr.h \ extutil.h \ XI.h XInput.h XIproto.h \ xtestconst.h xtestext1.h xteststr.h \ XKB.h XKBgeom.h XKBproto.h XKBstr.h XKBsrv.h \ - Xdbe.h Xdbeproto.h \ - Xag.h Xagstr.h Xagsrv.h \ + Xdbeproto.h \ XShm.h shmstr.h \ $(EXTRAHEADERS) \ - multibuf.h multibufst.h \ record.h recordstr.h \ security.h securstr.h \ shape.h shapestr.h \ sync.h syncstr.h \ - Xcup.h Xcupstr.h \ dpms.h dpmsstr.h \ - XEVI.h XEVIstr.h \ $(NULL) all:: @@ -120,9 +85,6 @@ InstallDriverSDKNonExecFile(XIproto.h,$(DRIVERSDKINCLUDEDIR)/extensions) InstallDriverSDKNonExecFile(Xv.h,$(DRIVERSDKINCLUDEDIR)) InstallDriverSDKNonExecFile(Xvproto.h,$(DRIVERSDKINCLUDEDIR)) InstallDriverSDKNonExecFile(dpms.h,$(DRIVERSDKINCLUDEDIR)/extensions) -InstallDriverSDKNonExecFile(xf86dga1str.h,$(DRIVERSDKINCLUDEDIR)) -InstallDriverSDKNonExecFile(xf86dgastr.h,$(DRIVERSDKINCLUDEDIR)/extensions) -InstallDriverSDKNonExecFile(xf86misc.h,$(DRIVERSDKINCLUDEDIR)/extensions) InstallDriverSDKNonExecFile(renderproto.h,$(DRIVERSDKINCLUDEDIR)) InstallDriverSDKNonExecFile(Xv.h,$(DRIVERSDKINCLUDEDIR)/extensions) InstallDriverSDKNonExecFile(XvMC.h,$(DRIVERSDKINCLUDEDIR)) diff --git a/nx-X11/include/extensions/MITMisc.h b/nx-X11/include/extensions/MITMisc.h deleted file mode 100644 index d66b8242d..000000000 --- a/nx-X11/include/extensions/MITMisc.h +++ /dev/null @@ -1,66 +0,0 @@ -/************************************************************ - -Copyright 1989, 1998 The Open Group - -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. - -The above copyright notice and this permission notice 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 -OPEN GROUP 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. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -********************************************************/ - -/* RANDOM CRUFT! THIS HAS NO OFFICIAL X CONSORTIUM OR X PROJECT TEAM BLESSING */ - -/* $Xorg: MITMisc.h,v 1.4 2001/02/09 02:03:23 xorgcvs Exp $ */ - -#ifndef _XMITMISC_H_ -#define _XMITMISC_H_ - -#include - -#define X_MITSetBugMode 0 -#define X_MITGetBugMode 1 - -#define MITMiscNumberEvents 0 - -#define MITMiscNumberErrors 0 - -#ifndef _MITMISC_SERVER_ - -_XFUNCPROTOBEGIN - -Bool XMITMiscQueryExtension( - Display* /* dpy */, - int* /* event_basep */, - int* /* error_basep */ -); - -Status XMITMiscSetBugMode( - Display* /* dpy */, - Bool /* onOff */ -); - -Bool XMITMiscGetBugMode( - Display* /* dpy */ -); - -_XFUNCPROTOEND - -#endif - -#endif diff --git a/nx-X11/include/extensions/XEVI.h b/nx-X11/include/extensions/XEVI.h deleted file mode 100644 index 30b2412d9..000000000 --- a/nx-X11/include/extensions/XEVI.h +++ /dev/null @@ -1,64 +0,0 @@ -/* $Xorg: XEVI.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ -/************************************************************ -Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc. -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, 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 Silicon Graphics not be -used in advertising or publicity pertaining to distribution -of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability -of this software for any purpose. It is provided "as is" -without any express or implied warranty. -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS 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. -********************************************************/ -/* $XFree86$ */ - -#ifndef _XEVI_H_ -#define _XEVI_H_ -#include -#define X_EVIQueryVersion 0 -#define X_EVIGetVisualInfo 1 -#define XEVI_TRANSPARENCY_NONE 0 -#define XEVI_TRANSPARENCY_PIXEL 1 -#define XEVI_TRANSPARENCY_MASK 2 -#ifndef _XEVI_SERVER_ -typedef struct { - VisualID core_visual_id; - int screen; - int level; - unsigned int transparency_type; - unsigned int transparency_value; - unsigned int min_hw_colormaps; - unsigned int max_hw_colormaps; - unsigned int num_colormap_conflicts; - VisualID* colormap_conflicts; -} ExtendedVisualInfo; -_XFUNCPROTOBEGIN -Bool XeviQueryExtension( - Display* /* dpy */ -); -Status XeviQueryVersion( - Display* /* dpy */, - int* /* majorVersion */, - int* /* minorVersion */ -); -Status XeviGetVisualInfo( - Display* /* dpy */, - VisualID* /* visual_query */, - int /* nVisual_query */, - ExtendedVisualInfo** /* extendedVisualInfo_return */, - int* /* nInfo_return */ -); -_XFUNCPROTOEND -#endif -#endif diff --git a/nx-X11/include/extensions/XEVIstr.h b/nx-X11/include/extensions/XEVIstr.h deleted file mode 100644 index 4deb6c113..000000000 --- a/nx-X11/include/extensions/XEVIstr.h +++ /dev/null @@ -1,98 +0,0 @@ -/* $Xorg: XEVIstr.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ -/************************************************************ -Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc. -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, 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 Silicon Graphics not be -used in advertising or publicity pertaining to distribution -of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability -of this software for any purpose. It is provided "as is" -without any express or implied warranty. -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS 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. -********************************************************/ -/* $XFree86$ */ - -#ifndef _EVISTR_H_ -#define _EVISTR_H_ - -#include - -#define VisualID CARD32 -#define EVINAME "Extended-Visual-Information" -#define XEVI_MAJOR_VERSION 1 /* current version numbers */ -#define XEVI_MINOR_VERSION 0 - -typedef CARD32 VisualID32; -#define sz_VisualID32 4 - -typedef struct _xExtendedVisualInfo { - VisualID core_visual_id B32; - INT8 screen; - INT8 level; - CARD8 transparency_type; - CARD8 pad0; - CARD32 transparency_value B32; - CARD8 min_hw_colormaps; - CARD8 max_hw_colormaps; - CARD16 num_colormap_conflicts B16; -} xExtendedVisualInfo; -#define sz_xExtendedVisualInfo 16 - -typedef struct _XEVIQueryVersion { - CARD8 reqType; /* always XEVIReqCode */ - CARD8 xeviReqType; /* always X_EVIQueryVersion */ - CARD16 length B16; -} xEVIQueryVersionReq; -#define sz_xEVIQueryVersionReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 majorVersion B16; /* major version of EVI protocol */ - CARD16 minorVersion B16; /* minor version of EVI protocol */ - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; -} xEVIQueryVersionReply; -#define sz_xEVIQueryVersionReply 32 - -typedef struct _XEVIGetVisualInfoReq { - CARD8 reqType; /* always XEVIReqCode */ - CARD8 xeviReqType; /* always X_EVIGetVisualInfo */ - CARD16 length B16; - CARD32 n_visual B32; -} xEVIGetVisualInfoReq; -#define sz_xEVIGetVisualInfoReq 8 - -typedef struct _XEVIGetVisualInfoReply { - BYTE type; /* X_Reply */ - CARD8 unused; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 n_info B32; - CARD32 n_conflicts B32; - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; -} xEVIGetVisualInfoReply; -#define sz_xEVIGetVisualInfoReply 32 - -#undef VisualID - -#endif /* _EVISTR_H_ */ diff --git a/nx-X11/include/extensions/XLbx.h b/nx-X11/include/extensions/XLbx.h deleted file mode 100644 index 6cd867944..000000000 --- a/nx-X11/include/extensions/XLbx.h +++ /dev/null @@ -1,155 +0,0 @@ -/* $Xorg: XLbx.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ -/* - * Copyright 1992 Network Computing Devices - * - * 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 NCD. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. NCD. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD. - * 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. - * - */ -/* $XFree86: xc/include/extensions/XLbx.h,v 1.3 2002/10/16 01:59:55 dawes Exp $ */ - -#ifndef _XLBX_H_ -#define _XLBX_H_ - -#include - -/* - * NOTE: any changes or additions to the opcodes needs to be reflected - * in the lbxCacheable array in Xserver/lbx/lbxmain.c - */ - -#define X_LbxQueryVersion 0 -#define X_LbxStartProxy 1 -#define X_LbxStopProxy 2 -#define X_LbxSwitch 3 -#define X_LbxNewClient 4 -#define X_LbxCloseClient 5 -#define X_LbxModifySequence 6 -#define X_LbxAllowMotion 7 -#define X_LbxIncrementPixel 8 -#define X_LbxDelta 9 -#define X_LbxGetModifierMapping 10 -#define X_LbxInvalidateTag 12 -#define X_LbxPolyPoint 13 -#define X_LbxPolyLine 14 -#define X_LbxPolySegment 15 -#define X_LbxPolyRectangle 16 -#define X_LbxPolyArc 17 -#define X_LbxFillPoly 18 -#define X_LbxPolyFillRectangle 19 -#define X_LbxPolyFillArc 20 -#define X_LbxGetKeyboardMapping 21 -#define X_LbxQueryFont 22 -#define X_LbxChangeProperty 23 -#define X_LbxGetProperty 24 -#define X_LbxTagData 25 - -#define X_LbxCopyArea 26 -#define X_LbxCopyPlane 27 -#define X_LbxPolyText8 28 -#define X_LbxPolyText16 29 -#define X_LbxImageText8 30 -#define X_LbxImageText16 31 - -#define X_LbxQueryExtension 32 -#define X_LbxPutImage 33 -#define X_LbxGetImage 34 - -#define X_LbxBeginLargeRequest 35 -#define X_LbxLargeRequestData 36 -#define X_LbxEndLargeRequest 37 - -#define X_LbxInternAtoms 38 -#define X_LbxGetWinAttrAndGeom 39 - -#define X_LbxGrabCmap 40 -#define X_LbxReleaseCmap 41 -#define X_LbxAllocColor 42 - -#define X_LbxSync 43 - -#define LbxNumberReqs 44 - - -#define LbxEvent 0 -#define LbxQuickMotionDeltaEvent 1 -#define LbxNumberEvents 2 - -/* This is always the master client */ -#define LbxMasterClientIndex 0 - -/* LbxEvent lbxType sub-fields */ -#define LbxSwitchEvent 0 -#define LbxCloseEvent 1 -#define LbxDeltaEvent 2 -#define LbxInvalidateTagEvent 3 -#define LbxSendTagDataEvent 4 -#define LbxListenToOne 5 -#define LbxListenToAll 6 -#define LbxMotionDeltaEvent 7 -#define LbxReleaseCmapEvent 8 -#define LbxFreeCellsEvent 9 - -/* - * Lbx image compression methods - * - * No compression is always assigned the value of 0. - * - * The rest of the compression method opcodes are assigned dynamically - * at option negotiation time. - */ - -#define LbxImageCompressNone 0 - - -#define BadLbxClient 0 -#define LbxNumberErrors (BadLbxClient + 1) - -/* tagged data types */ -#define LbxTagTypeModmap 1 -#define LbxTagTypeKeymap 2 -#define LbxTagTypeProperty 3 -#define LbxTagTypeFont 4 -#define LbxTagTypeConnInfo 5 - -#ifndef _XLBX_SERVER_ - -#include -#include - -_XFUNCPROTOBEGIN - -Bool XLbxQueryExtension( - Display* /* dpy */, - int* /* requestp */, - int* /* event_basep */, - int* /* error_basep */ -); - -Bool XLbxQueryVersion( - Display* /* dpy */, - int* /* majorVersion */, - int* /* minorVersion */ -); - -int XLbxGetEventBase(Display *dpy); - -_XFUNCPROTOEND - -#endif - -#endif diff --git a/nx-X11/include/extensions/Xag.h b/nx-X11/include/extensions/Xag.h deleted file mode 100644 index 4c1193e3d..000000000 --- a/nx-X11/include/extensions/Xag.h +++ /dev/null @@ -1,114 +0,0 @@ -/* $XFree86: xc/include/extensions/Xag.h,v 1.5 2001/12/17 20:52:24 dawes Exp $ */ -/* -Copyright 1996, 1998 The Open Group - -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. - -The above copyright notice and this permission notice 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 OPEN GROUP 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. - -Except as contained in this notice, the name of The Open Group shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from The Open Group. -*/ -/* $Xorg: Xag.h,v 1.5 2001/02/09 02:03:24 xorgcvs Exp $ */ - -#ifndef _XAG_H_ -#define _XAG_H_ - -#include - -#define X_XagQueryVersion 0 -#define X_XagCreate 1 -#define X_XagDestroy 2 -#define X_XagGetAttr 3 -#define X_XagQuery 4 -#define X_XagCreateAssoc 5 -#define X_XagDestroyAssoc 6 - -#define XagBadAppGroup 0 -#define XagNumberErrors (XagBadAppGroup + 1) - -#define XagNsingleScreen 7 -#define XagNdefaultRoot 1 -#define XagNrootVisual 2 -#define XagNdefaultColormap 3 -#define XagNblackPixel 4 -#define XagNwhitePixel 5 -#define XagNappGroupLeader 6 - -#ifndef _XAG_SERVER_ - -#include - -_XFUNCPROTOBEGIN - -typedef XID XAppGroup; - -Bool XagQueryVersion( - Display* /* dpy */, - int* /* major_version */, - int* /* minor_version */ -); - -Status XagCreateEmbeddedApplicationGroup( - Display* /* dpy */, - VisualID /* root_visual */, - Colormap /* default_colormap */, - unsigned long /* black_pixel */, - unsigned long /* white_pixel */, - XAppGroup* /* app_group_return */ -); - -Status XagCreateNonembeddedApplicationGroup( - Display* /* dpy */, - XAppGroup* /* app_group_return */ -); - -Status XagDestroyApplicationGroup( - Display* /* dpy */, - XAppGroup /* app_group */ -); - -Status XagGetApplicationGroupAttributes( - Display* /* dpy */, - XAppGroup /* app_group */, - ... -); - -Status XagQueryApplicationGroup( - Display* /* dpy */, - XID /* resource_base */, - XAppGroup* /* app_group_ret */ -); - -Status XagCreateAssociation( - Display* /* dpy */, - Window* /* window_ret */, - void* /* system_window */ -); - -Status XagDestroyAssociation( - Display* /* dpy */, - Window /* window */ -); - -_XFUNCPROTOEND - -#endif /* _XAG_SERVER_ */ - -#endif /* _XAG_H_ */ - diff --git a/nx-X11/include/extensions/Xagsrv.h b/nx-X11/include/extensions/Xagsrv.h deleted file mode 100644 index daf1af04d..000000000 --- a/nx-X11/include/extensions/Xagsrv.h +++ /dev/null @@ -1,76 +0,0 @@ -/* $XFree86: xc/include/extensions/Xagsrv.h,v 1.5 2003/07/16 01:38:24 dawes Exp $ */ -/* -Copyright 1996, 1998 The Open Group - -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. - -The above copyright notice and this permission notice 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 OPEN GROUP 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. - -Except as contained in this notice, the name of The Open Group shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from The Open Group. -*/ -/* $Xorg: Xagsrv.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ - -#ifndef _XAGSRV_H_ -#define _XAGSRV_H_ - -#include - -_XFUNCPROTOBEGIN - -extern void XagConnectionInfo( - ClientPtr /* client */, - xConnSetupPrefix** /* conn_prefix */, - char** /* conn_info */, - int* /* num_screens */ -); - -extern VisualID XagRootVisual( - ClientPtr /* client */ -); - -extern Colormap XagDefaultColormap( - ClientPtr /* client */ -); - -extern ClientPtr XagLeader( - ClientPtr /* client */ -); - -extern void XagCallClientStateChange( - ClientPtr /* client */ -); - -extern Bool XagIsControlledRoot ( - ClientPtr /* client */, - WindowPtr /* pParent */ -); - -extern XID XagId ( - ClientPtr /* client */ -); - -extern void XagGetDeltaInfo ( - ClientPtr /* client */, - CARD32* /* buf */ -); - -_XFUNCPROTOEND - -#endif /* _XAGSRV_H_ */ - diff --git a/nx-X11/include/extensions/Xagstr.h b/nx-X11/include/extensions/Xagstr.h deleted file mode 100644 index 4f12027e0..000000000 --- a/nx-X11/include/extensions/Xagstr.h +++ /dev/null @@ -1,182 +0,0 @@ -/* $XFree86: xc/include/extensions/Xagstr.h,v 1.4 2001/12/14 19:53:28 dawes Exp $ */ -/* -Copyright 1996, 1998, 2001 The Open Group - -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. - -The above copyright notice and this permission notice 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 OPEN GROUP 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. - -Except as contained in this notice, the name of The Open Group shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from The Open Group. -*/ -/* $Xorg: Xagstr.h,v 1.6 2001/02/09 02:03:24 xorgcvs Exp $ */ - -#ifndef _XAGSTR_H_ /* { */ -#define _XAGSTR_H_ - -#include - -#define XAppGroup CARD32 - -#define XAGNAME "XC-APPGROUP" - -#define XAG_MAJOR_VERSION 1 /* current version numbers */ -#define XAG_MINOR_VERSION 0 - -#define XagWindowTypeX11 0 -#define XagWindowTypeMacintosh 1 -#define XagWindowTypeWin32 2 -#define XagWindowTypeWin16 3 - -/* -* Redefine some basic types used by structures defined herein. This allows -* both the library and server to view communicated data as 32-bit entities, -* thus preventing problems on 64-bit architectures where libXext sees this -* data as 64 bits and the server sees it as 32 bits. -*/ - -#define Colormap CARD32 -#define VisualID CARD32 -#define Window CARD32 - -typedef struct _XagQueryVersion { - CARD8 reqType; /* always XagReqCode */ - CARD8 xagReqType; /* always X_XagQueryVersion */ - CARD16 length B16; - CARD16 client_major_version B16; - CARD16 client_minor_version B16; -} xXagQueryVersionReq; -#define sz_xXagQueryVersionReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequence_number B16; - CARD32 length B32; - CARD16 server_major_version B16; - CARD16 server_minor_version B16; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXagQueryVersionReply; -#define sz_xXagQueryVersionReply 32 - -/* Set AppGroup Attributes masks */ -#define XagSingleScreenMask 1 << 0 -#define XagDefaultRootMask 1 << XagNdefaultRoot -#define XagRootVisualMask 1 << XagNrootVisual -#define XagDefaultColormapMask 1 << XagNdefaultColormap -#define XagBlackPixelMask 1 << XagNblackPixel -#define XagWhitePixelMask 1 << XagNwhitePixel -#define XagAppGroupLeaderMask 1 << XagNappGroupLeader - -typedef struct _XagCreate { - CARD8 reqType; /* always XagReqCode */ - CARD8 xagReqType; /* always X_XagCreate */ - CARD16 length B16; - XAppGroup app_group B32; - CARD32 attrib_mask B32; /* LISTofVALUE follows */ -} xXagCreateReq; -#define sz_xXagCreateReq 12 - -typedef struct _XagDestroy { - CARD8 reqType; /* always XagReqCode */ - CARD8 xagReqType; /* always X_XagDestroy */ - CARD16 length B16; - XAppGroup app_group B32; -} xXagDestroyReq; -#define sz_xXagDestroyReq 8 - -typedef struct _XagGetAttr { - CARD8 reqType; /* always XagReqCode */ - CARD8 xagReqType; /* always X_XagGetAttr */ - CARD16 length B16; - XAppGroup app_group B32; -} xXagGetAttrReq; -#define sz_xXagGetAttrReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequence_number B16; - CARD32 length B32; - Window default_root B32; - VisualID root_visual B32; - Colormap default_colormap B32; - CARD32 black_pixel B32; - CARD32 white_pixel B32; - BOOL single_screen; - BOOL app_group_leader; - CARD16 pad2 B16; -} xXagGetAttrReply; -#define sz_xXagGetAttrReply 32 - -typedef struct _XagQuery { - CARD8 reqType; /* always XagReqCode */ - CARD8 xagReqType; /* always X_XagQuery */ - CARD16 length B16; - CARD32 resource B32; -} xXagQueryReq; -#define sz_xXagQueryReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequence_number B16; - CARD32 length B32; - XAppGroup app_group B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXagQueryReply; -#define sz_xXagQueryReply 32 - -typedef struct _XagCreateAssoc { - CARD8 reqType; /* always XagReqCode */ - CARD8 xagReqType; /* always X_XagCreateAssoc */ - CARD16 length B16; - Window window B32; - CARD16 window_type B16; - CARD16 system_window_len B16; /* LISTofCARD8 follows */ -} xXagCreateAssocReq; -#define sz_xXagCreateAssocReq 12 - -typedef struct _XagDestroyAssoc { - CARD8 reqType; /* always XagReqCode */ - CARD8 xagReqType; /* always X_XagDestroyAssoc */ - CARD16 length B16; - Window window B32; -} xXagDestroyAssocReq; -#define sz_xXagDestroyAssocReq 8 - -#undef XAppGroup -/* - * Cancel the previous redefinition of the basic types, thus restoring their - * X.h definitions. - */ - -#undef Window -#undef Colormap -#undef VisualID - -#endif /* } _XAGSTR_H_ */ - diff --git a/nx-X11/include/extensions/Xcup.h b/nx-X11/include/extensions/Xcup.h deleted file mode 100644 index fb5fd0887..000000000 --- a/nx-X11/include/extensions/Xcup.h +++ /dev/null @@ -1,69 +0,0 @@ -/* $Xorg: Xcup.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ -/* - -Copyright 1987, 1988, 1998 The Open Group - -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. - -The above copyright notice and this permission notice 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 -OPEN GROUP 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. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ -/* $XFree86$ */ - -#ifndef _XCUP_H_ -#define _XCUP_H_ - -#include - -#define X_XcupQueryVersion 0 -#define X_XcupGetReservedColormapEntries 1 -#define X_XcupStoreColors 2 - -#define XcupNumberErrors 0 - -#ifndef _XCUP_SERVER_ - -_XFUNCPROTOBEGIN - -Bool XcupQueryVersion( - Display* /* dpy */, - int* /* major_version */, - int* /* minor_version */ -); - -Status XcupGetReservedColormapEntries( - Display* /* dpy */, - int /* screen */, - XColor** /* colors_out */, - int* /* ncolors */ -); - -Status XcupStoreColors( - Display* /* dpy */, - Colormap /* colormap */, - XColor* /* colors */, - int /* ncolors */ -); - -_XFUNCPROTOEND - -#endif /* _XCUP_SERVER_ */ - -#endif /* _XCUP_H_ */ - diff --git a/nx-X11/include/extensions/Xcupstr.h b/nx-X11/include/extensions/Xcupstr.h deleted file mode 100644 index fa77b5aea..000000000 --- a/nx-X11/include/extensions/Xcupstr.h +++ /dev/null @@ -1,109 +0,0 @@ -/* $Xorg: Xcupstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ - -/* - -Copyright 1987, 1988, 1998 The Open Group - -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. - -The above copyright notice and this permission notice 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 -OPEN GROUP 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. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ -/* $XFree86: xc/include/extensions/Xcupstr.h,v 3.5 2001/08/01 00:44:35 tsi Exp $ */ - -#ifndef _XCUPSTR_H_ /* { */ -#define _XCUPSTR_H_ - -#include - -#define XCUPNAME "TOG-CUP" - -#define XCUP_MAJOR_VERSION 1 /* current version numbers */ -#define XCUP_MINOR_VERSION 0 - -typedef struct _XcupQueryVersion { - CARD8 reqType; /* always XcupReqCode */ - CARD8 xcupReqType; /* always X_XcupQueryVersion */ - CARD16 length B16; - CARD16 client_major_version B16; - CARD16 client_minor_version B16; -} xXcupQueryVersionReq; -#define sz_xXcupQueryVersionReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequence_number B16; - CARD32 length B32; - CARD16 server_major_version B16; - CARD16 server_minor_version B16; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXcupQueryVersionReply; -#define sz_xXcupQueryVersionReply 32 - -typedef struct _XcupGetReservedColormapEntries { - CARD8 reqType; /* always XcupReqCode */ - CARD8 xcupReqType; /* always X_XcupGetReservedColormapEntries */ - CARD16 length B16; - CARD32 screen B32; -} xXcupGetReservedColormapEntriesReq; -#define sz_xXcupGetReservedColormapEntriesReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequence_number B16; - CARD32 length B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; - CARD32 pad7 B32; -} xXcupGetReservedColormapEntriesReply; -#define sz_xXcupGetReservedColormapEntriesReply 32 - -typedef struct _XcupStoreColors { - CARD8 reqType; /* always XcupReqCode */ - CARD8 xcupReqType; /* always X_XcupStoreColors */ - CARD16 length B16; - CARD32 cmap B32; -} xXcupStoreColorsReq; -#define sz_xXcupStoreColorsReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequence_number B16; - CARD32 length B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; - CARD32 pad7 B32; -} xXcupStoreColorsReply; -#define sz_xXcupStoreColorsReply 32 - -#endif /* } _XCUPSTR_H_ */ - diff --git a/nx-X11/include/extensions/Xdbe.h b/nx-X11/include/extensions/Xdbe.h deleted file mode 100644 index bc43007c6..000000000 --- a/nx-X11/include/extensions/Xdbe.h +++ /dev/null @@ -1,136 +0,0 @@ -/* $Xorg: Xdbe.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ -/****************************************************************************** - * - * Copyright (c) 1994, 1995 Hewlett-Packard Company - * - * 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 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 HEWLETT-PACKARD COMPANY 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. - * - * Except as contained in this notice, the name of the Hewlett-Packard - * Company shall not be used in advertising or otherwise to promote the - * sale, use or other dealings in this Software without prior written - * authorization from the Hewlett-Packard Company. - * - * Header file for Xlib-related DBE - * - *****************************************************************************/ -/* $XFree86: xc/include/extensions/Xdbe.h,v 3.2 2001/08/01 00:44:35 tsi Exp $ */ - -#ifndef XDBE_H -#define XDBE_H - - -/* INCLUDES */ - -#include -#include - - -/* DEFINES */ - -/* Errors */ -#define XdbeBadBuffer 0 - - -/* TYPEDEFS */ - -typedef Drawable XdbeBackBuffer; - -typedef unsigned char XdbeSwapAction; - -typedef struct -{ - Window swap_window; /* window for which to swap buffers */ - XdbeSwapAction swap_action; /* swap action to use for swap_window */ -} -XdbeSwapInfo; - -typedef struct -{ - Window window; /* window that buffer belongs to */ -} -XdbeBackBufferAttributes; - -typedef struct -{ - int type; - Display *display; /* display the event was read from */ - XdbeBackBuffer buffer; /* resource id */ - unsigned long serial; /* serial number of failed request */ - unsigned char error_code; /* error base + XdbeBadBuffer */ - unsigned char request_code; /* major opcode of failed request */ - unsigned char minor_code; /* minor opcode of failed request */ -} -XdbeBufferError; - -/* _XFUNCPROTOBEGIN and _XFUNCPROTOEND are defined as noops - * (for non-C++ builds) in X11/Xfuncproto.h. - */ -_XFUNCPROTOBEGIN - -extern Status XdbeQueryExtension( - Display* /* dpy */, - int* /* major_version_return */, - int* /* minor_version_return */ -); - -extern XdbeBackBuffer XdbeAllocateBackBufferName( - Display* /* dpy */, - Window /* window */, - XdbeSwapAction /* swap_action */ -); - -extern Status XdbeDeallocateBackBufferName( - Display* /* dpy */, - XdbeBackBuffer /* buffer */ -); - -extern Status XdbeSwapBuffers( - Display* /* dpy */, - XdbeSwapInfo* /* swap_info */, - int /* num_windows */ -); - -extern Status XdbeBeginIdiom( - Display* /* dpy */ -); - -extern Status XdbeEndIdiom( - Display* /* dpy */ -); - -extern XdbeScreenVisualInfo *XdbeGetVisualInfo( - Display* /* dpy */, - Drawable* /* screen_specifiers */, - int* /* num_screens */ -); - -extern void XdbeFreeVisualInfo( - XdbeScreenVisualInfo* /* visual_info */ -); - -extern XdbeBackBufferAttributes *XdbeGetBackBufferAttributes( - Display* /* dpy */, - XdbeBackBuffer /* buffer */ -); - -_XFUNCPROTOEND - -#endif /* XDBE_H */ - diff --git a/nx-X11/include/extensions/Xevie.h b/nx-X11/include/extensions/Xevie.h deleted file mode 100644 index 5dc48bbfd..000000000 --- a/nx-X11/include/extensions/Xevie.h +++ /dev/null @@ -1,78 +0,0 @@ -/* $XdotOrg: xc/include/extensions/Xevie.h,v 1.3 2005/05/22 01:20:14 alanc Exp $ */ -/************************************************************ - -Copyright 2003 Sun Microsystems, Inc. - -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, and/or sell copies of the Software, and to permit persons -to whom the Software is furnished to do so, provided that the above -copyright notice(s) and this permission notice appear in all copies of -the Software and that both the above copyright notice(s) and this -permission notice appear in supporting documentation. - -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 -OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR 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. - -Except as contained in this notice, the name of a copyright holder -shall not be used in advertising or otherwise to promote the sale, use -or other dealings in this Software without prior written authorization -of the copyright holder. - -************************************************************/ - -#ifndef _XEVIE_H_ -#define _XEVIE_H_ - -#include - -#define XEVIE_UNMODIFIED 0 -#define XEVIE_MODIFIED 1 - -#ifndef _XEVIE_SERVER_ - -_XFUNCPROTOBEGIN - -Bool XevieQueryVersion( - Display* /* dpy */, - int* /* major_version */, - int* /* minor_version */ -); - -extern Status XevieStart( - Display* /* dpy */ -); - -Status XevieEnd( - Display* /* dpy */ -); - -Status XevieSendEvent( - Display* /* dpy */, - XEvent* /* event */, - int /* data type */ -); - -Status XevieSelectInput( - Display* /* dpy */, - long -); - - -_XFUNCPROTOEND - -#endif /* _XEVIE_SERVER_ */ - -#endif /* _XEVIE_H_ */ - diff --git a/nx-X11/include/extensions/Xeviestr.h b/nx-X11/include/extensions/Xeviestr.h deleted file mode 100644 index 5f2c9b49f..000000000 --- a/nx-X11/include/extensions/Xeviestr.h +++ /dev/null @@ -1,165 +0,0 @@ -/* $XdotOrg: xc/include/extensions/Xeviestr.h,v 1.3 2005/05/22 01:20:14 alanc Exp $ */ -/************************************************************ - -Copyright 2003 Sun Microsystems, Inc. - -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, and/or sell copies of the Software, and to permit persons -to whom the Software is furnished to do so, provided that the above -copyright notice(s) and this permission notice appear in all copies of -the Software and that both the above copyright notice(s) and this -permission notice appear in supporting documentation. - -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 -OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR 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. - -Except as contained in this notice, the name of a copyright holder -shall not be used in advertising or otherwise to promote the sale, use -or other dealings in this Software without prior written authorization -of the copyright holder. - -************************************************************/ - -#ifndef _XEVIESTR_H_ -#define _XEVIESTR_H_ - -#define XEVIENAME "XEVIE" - -#define XEVIE_MAJOR_VERSION 1 -#define XEVIE_MINOR_VERSION 0 - -#define X_XevieQueryVersion 0 -#define X_XevieStart 1 -#define X_XevieEnd 2 -#define X_XevieSend 3 -#define X_XevieSelectInput 4 - -#define XevieNumberErrors 0 - -typedef struct _XevieQueryVersion { - CARD8 reqType; - CARD8 xevieReqType; - CARD16 length B16; - CARD16 client_major_version B16; - CARD16 client_minor_version B16; -} xXevieQueryVersionReq; -#define sz_xXevieQueryVersionReq 8 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequence_number B16; - CARD32 length B32; - CARD16 server_major_version B16; - CARD16 server_minor_version B16; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXevieQueryVersionReply; -#define sz_xXevieQueryVersionReply 32 - -typedef struct _XevieStart { - CARD8 reqType; - CARD8 xevieReqType; - CARD16 length B16; - CARD32 screen B32; -} xXevieStartReq; -#define sz_xXevieStartReq 8 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequence_number B16; - CARD32 length B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; - CARD32 pad7 B32; -} xXevieStartReply; -#define sz_xXevieStartReply 32 - -typedef struct _XevieEnd { - CARD8 reqType; - CARD8 xevieReqType; - CARD16 length B16; - CARD32 cmap B32; -} xXevieEndReq; -#define sz_xXevieEndReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequence_number B16; - CARD32 length B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; - CARD32 pad7 B32; -} xXevieEndReply; -#define sz_xXevieEndReply 32 - -typedef struct _XevieSend { - CARD8 reqType; - CARD8 xevieReqType; - CARD16 length B16; - xEvent event; - CARD32 dataType B32; -} xXevieSendReq; -#define sz_xXevieSendReq 104 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequence_number B16; - CARD32 length B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; - CARD32 pad7 B32; -} xXevieSendReply; -#define sz_xXevieSendReply 32 - -typedef struct _XevieSelectInput { - CARD8 reqType; - CARD8 xevieReqType; - CARD16 length B16; - CARD32 event_mask B32; -} xXevieSelectInputReq; -#define sz_xXevieSelectInputReq 8 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequence_number B16; - CARD32 length B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; - CARD32 pad7 B32; -} xXevieSelectInputReply; -#define sz_xXevieSelectInputReply 32 - -#endif /* } _XEVIESTR_H_ */ - diff --git a/nx-X11/include/extensions/Xinerama.h b/nx-X11/include/extensions/Xinerama.h deleted file mode 100644 index 77e7e7444..000000000 --- a/nx-X11/include/extensions/Xinerama.h +++ /dev/null @@ -1,76 +0,0 @@ -/* $XdotOrg: xc/include/extensions/Xinerama.h,v 1.3 2004/12/01 19:03:46 daniels Exp $ */ -/* - -Copyright 2003 The Open Group - -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. - -The above copyright notice and this permission notice 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 -OPEN GROUP 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. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ -/* $XFree86: xc/include/extensions/Xinerama.h,v 3.3 2002/09/16 18:05:19 eich Exp $ */ - -#ifndef _Xinerama_h -#define _Xinerama_h - -#include - -typedef struct { - int screen_number; - short x_org; - short y_org; - short width; - short height; -} XineramaScreenInfo; - -_XFUNCPROTOBEGIN - -Bool XineramaQueryExtension ( - Display *dpy, - int *event_base, - int *error_base -); - -Status XineramaQueryVersion( - Display *dpy, - int *major_versionp, - int *minor_versionp -); - -Bool XineramaIsActive(Display *dpy); - - -/* - Returns the number of heads and a pointer to an array of - structures describing the position and size of the individual - heads. Returns NULL and number = 0 if Xinerama is not active. - - Returned array should be freed with XFree(). -*/ - -XineramaScreenInfo * -XineramaQueryScreens( - Display *dpy, - int *number -); - -_XFUNCPROTOEND - -#endif /* _Xinerama_h */ - diff --git a/nx-X11/include/extensions/fontcache.h b/nx-X11/include/extensions/fontcache.h deleted file mode 100644 index 2a3cf619b..000000000 --- a/nx-X11/include/extensions/fontcache.h +++ /dev/null @@ -1,106 +0,0 @@ -/*- - * Copyright (c) 1998-1999 Shunsuke Akiyama . - * All rights reserved. - * Copyright (c) 1998-1999 X-TrueType Server Project, All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * Id: fontcache.h,v 1.6 1999/01/31 12:41:32 akiyama Exp $ - */ -/* $XFree86: xc/include/extensions/fontcache.h,v 1.3 2001/08/01 00:44:35 tsi Exp $ */ - -/* THIS IS NOT AN X CONSORTIUM STANDARD */ - -#ifndef _EXT_FONTCACHE_H_ -#define _EXT_FONTCACHE_H_ - -#define X_FontCacheQueryVersion 0 -#define X_FontCacheGetCacheSettings 1 -#define X_FontCacheChangeCacheSettings 2 -#define X_FontCacheGetCacheStatistics 3 - -#define FontCacheNumberEvents 0 - -#define FontCacheBadProtocol 0 -#define FontCacheCannotAllocMemory 1 -#define FontCacheNumberErrors (FontCacheCannotAllocMemory + 1) - -typedef struct { - long himark; - long lowmark; - long balance; -} FontCacheSettings, *FontCacheSettingsPtr; - -struct cacheinfo { - long hits; - long misshits; - long purged; - long usage; -}; - -typedef struct { - long purge_runs; - long purge_stat; - long balance; - struct cacheinfo f; - struct cacheinfo v; -} FontCacheStatistics, *FontCacheStatisticsPtr; - -#ifndef _FONTCACHE_SERVER_ - -#include - -_XFUNCPROTOBEGIN - -Bool FontCacheQueryVersion( - Display* /* dpy */, - int* /* majorVersion */, - int* /* minorVersion */ -); - -Bool FontCacheQueryExtension( - Display* /* dpy */, - int* /* event_base */, - int* /* error_base */ -); - -Status FontCacheGetCacheSettings( - Display* /* dpy */, - FontCacheSettings* /* cache info */ -); - -Status FontCacheChangeCacheSettings( - Display* /* dpy */, - FontCacheSettings* /* cache info */ -); - -Status FontCacheGetCacheStatistics( - Display* /* dpy */, - FontCacheStatistics* /* cache statistics info */ -); - -_XFUNCPROTOEND - -#endif /* !_FONTCACHE_SERVER_ */ - -#endif /* _EXT_FONTCACHE_H_ */ diff --git a/nx-X11/include/extensions/fontcacheP.h b/nx-X11/include/extensions/fontcacheP.h deleted file mode 100644 index 5363ef149..000000000 --- a/nx-X11/include/extensions/fontcacheP.h +++ /dev/null @@ -1,40 +0,0 @@ -/*- - * Copyright (c) 1998-1999 Shunsuke Akiyama . - * All rights reserved. - * Copyright (c) 1998-1999 X-TrueType Server Project, All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * Id: fontcacheP.h,v 1.6 1999/01/31 12:43:53 akiyama Exp $ - */ -/* $XFree86: xc/include/extensions/fontcacheP.h,v 1.4 2000/03/01 01:04:21 dawes Exp $ */ - -#ifndef _FONTCACHEP_H_ -#define _FONTCACHEP_H_ - -#include - -int FontCacheChangeSettings(FontCacheSettingsPtr /* cinfo */); -void FontCacheGetSettings(FontCacheSettingsPtr /* cinfo */); -void FontCacheGetStatistics(FontCacheStatisticsPtr /* cstats */); - -#endif /* _FONTCACHEP_H_ */ diff --git a/nx-X11/include/extensions/fontcachstr.h b/nx-X11/include/extensions/fontcachstr.h deleted file mode 100644 index abead0f2b..000000000 --- a/nx-X11/include/extensions/fontcachstr.h +++ /dev/null @@ -1,130 +0,0 @@ -/*- - * Copyright (c) 1998-1999 Shunsuke Akiyama . - * All rights reserved. - * Copyright (c) 1998-1999 X-TrueType Server Project, All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * Id: fontcachstr.h,v 1.7 1999/01/31 14:58:40 akiyama Exp $ - */ -/* $XFree86$ */ - -/* THIS IS NOT AN X CONSORTIUM STANDARD */ - -#ifndef _FONTCACHESTR_H_ -#define _FONTCACHESTR_H_ - -#include - -#define FONTCACHENAME "FontCache" - -#define FONTCACHE_MAJOR_VERSION 0 /* current version numbers */ -#define FONTCACHE_MINOR_VERSION 1 - -typedef struct _FontCacheQueryVersion { - CARD8 reqType; /* always FontCacheReqCode */ - CARD8 fontcacheReqType; /* always X_FontCacheQueryVersion */ - CARD16 length B16; -} xFontCacheQueryVersionReq; -#define sz_xFontCacheQueryVersionReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 majorVersion B16; /* major version of Font-Cache */ - CARD16 minorVersion B16; /* minor version of Font-Cache */ - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xFontCacheQueryVersionReply; -#define sz_xFontCacheQueryVersionReply 32 - -typedef struct _FontCacheGetCacheSettings { - CARD8 reqType; /* always FontCacheReqCode */ - CARD8 fontcacheReqType; /* always X_FontCacheGetCacheSettings */ - CARD16 length B16; -} xFontCacheGetCacheSettingsReq; -#define sz_xFontCacheGetCacheSettingsReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 himark B32; - CARD32 lowmark B32; - CARD32 balance B32; - CARD32 reserve0 B32; - CARD32 reserve1 B32; - CARD32 reserve2 B32; -} xFontCacheGetCacheSettingsReply; -#define sz_xFontCacheGetCacheSettingsReply 32 - -typedef struct _FontCacheChangeCacheSettings { - CARD8 reqType; /* always FontCacheReqCode */ - CARD8 fontcacheReqType; /* always X_FontCacheChangeCacheSettings */ - CARD16 length B16; - CARD32 himark B32; - CARD32 lowmark B32; - CARD32 balance B32; - CARD32 reserve0 B32; - CARD32 reserve1 B32; - CARD32 reserve2 B32; - CARD32 reserve3 B32; -} xFontCacheChangeCacheSettingsReq; -#define sz_xFontCacheChangeCacheSettingsReq 32 - -typedef struct _FontCacheGetCacheStatistics { - CARD8 reqType; /* always FontCacheReqCode */ - CARD8 fontcacheReqType; /* always X_FontCacheGetCacheStatistics */ - CARD16 length B16; -} xFontCacheGetCacheStatisticsReq; -#define sz_xFontCacheGetCacheStatisticsReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 purge_runs B32; - CARD32 purge_stat B32; - CARD32 balance B32; - CARD32 reserve0 B32; - CARD32 f_hits B32; - CARD32 f_misshits B32; - CARD32 f_purged B32; - CARD32 f_usage B32; - CARD32 f_reserve0 B32; - CARD32 v_hits B32; - CARD32 v_misshits B32; - CARD32 v_purged B32; - CARD32 v_usage B32; - CARD32 v_reserve0 B32; -} xFontCacheGetCacheStatisticsReply; -#define sz_xFontCacheGetCacheStatisticsReply 64 - -#endif /* _FONTCACHESTR_H_ */ diff --git a/nx-X11/include/extensions/lbxbuf.h b/nx-X11/include/extensions/lbxbuf.h deleted file mode 100644 index 1a5a7475a..000000000 --- a/nx-X11/include/extensions/lbxbuf.h +++ /dev/null @@ -1,51 +0,0 @@ -/* $Xorg: lbxbuf.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ -/* - * Copyright 1988, 1989, 1990, 1994 Network Computing Devices, 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 Network Computing Devices, Inc. not be - * used in advertising or publicity pertaining to distribution of this - * software without specific, written prior permission. - * - * THIS SOFTWARE IS PROVIDED `AS-IS'. NETWORK COMPUTING DEVICES, INC., - * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT - * LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - * PARTICULAR PURPOSE, OR NONINFRINGEMENT. IN NO EVENT SHALL NETWORK - * COMPUTING DEVICES, INC., BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING - * SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOSS OF USE, - * DATA, OR PROFITS, EVEN IF ADVISED OF THE POSSIBILITY THEREOF, AND - * REGARDLESS OF WHETHER IN AN ACTION IN CONTRACT, TORT OR NEGLIGENCE, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * - */ - -#ifndef _BUFFER_H_ -#define _BUFFER_H_ - -#define INBUFFER_SIZE (1 << 13) /* 8K */ -#define OUTBUFFER_SIZE (1 << 12) /* 4K */ - -#ifndef TRUE -#define TRUE 1 -#endif -#ifndef FALSE -#define FALSE 0 -#endif - -typedef struct _zlibbuffer *ZlibBufferPtr; - -#include - -_XFUNCPROTOBEGIN - -extern int InitZlibBuffer(ZlibBufferPtr b, int size); -extern void FreeZlibBuffer(ZlibBufferPtr b); -extern char *ReserveOutBuf(ZlibBufferPtr outbuf, int outlen); - -_XFUNCPROTOEND - -#endif /* _BUFFER_H_ */ diff --git a/nx-X11/include/extensions/lbxbufstr.h b/nx-X11/include/extensions/lbxbufstr.h deleted file mode 100644 index d99730e7e..000000000 --- a/nx-X11/include/extensions/lbxbufstr.h +++ /dev/null @@ -1,45 +0,0 @@ -/* $Xorg: lbxbufstr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ -/* - * Copyright 1988, 1989, 1990, 1994 Network Computing Devices, 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 Network Computing Devices, Inc. not be - * used in advertising or publicity pertaining to distribution of this - * software without specific, written prior permission. - * - * THIS SOFTWARE IS PROVIDED `AS-IS'. NETWORK COMPUTING DEVICES, INC., - * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT - * LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - * PARTICULAR PURPOSE, OR NONINFRINGEMENT. IN NO EVENT SHALL NETWORK - * COMPUTING DEVICES, INC., BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING - * SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOSS OF USE, - * DATA, OR PROFITS, EVEN IF ADVISED OF THE POSSIBILITY THEREOF, AND - * REGARDLESS OF WHETHER IN AN ACTION IN CONTRACT, TORT OR NEGLIGENCE, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - * - */ -/* $XFree86$ */ - -#ifndef _BUFFERSTR_H_ -#define _BUFFERSTR_H_ - -#include - -/* - * ZLIB Input/Output buffer - */ -typedef struct _zlibbuffer { - char *bufbase; - char *bufend; - char *bufptr; - int bufcnt; -} ZlibBuffer; - -#define BYTES_AVAIL(inbuf, len) \ - (((inbuf)->bufcnt >= (len)) ? (inbuf)->bufptr : NULL) - -#endif /* _BUFFERSTR_H_ */ diff --git a/nx-X11/include/extensions/lbxdeltastr.h b/nx-X11/include/extensions/lbxdeltastr.h deleted file mode 100644 index a8e4cb3b0..000000000 --- a/nx-X11/include/extensions/lbxdeltastr.h +++ /dev/null @@ -1,105 +0,0 @@ -/* $Xorg: lbxdeltastr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ -/* - * Copyright 1993 Network Computing Devices - * - * 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 NCD. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. NCD. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD. - * 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 LBX_DELTA_STRUCT_H -#define LBX_DELTA_STRUCT_H - -#define MIN_CACHEABLE_LEN 8 - -#define DELTA_CACHEABLE(pcache, len) \ - ((len) > MIN_CACHEABLE_LEN && (len) <= (pcache)->maxDeltasize) - -/* - * An entry in the delta compactor cache - */ -typedef struct _LBXDeltaElem { - int length; - unsigned char *buf; -} LBXDeltaElemRec, *LBXDeltaElemPtr; - - -/* - * Delta compactor cache - */ -typedef struct _LBXDeltas { - unsigned short nDeltas; - unsigned short maxDeltasize; - LBXDeltaElemPtr deltas; - unsigned short nextDelta; - unsigned short activeDeltas; /* only needed for outgoing */ -} LBXDeltasRec, *LBXDeltasPtr; - - -/* - * Motion delta cache - */ - -typedef struct { - BYTE swapped; - BYTE detail; - CARD16 sequenceNumber B16; - Time time B32; - Window root B32, event B32, child B32; - INT16 rootX B16, rootY B16, eventX B16, eventY B16; - KeyButMask state B16; - BOOL sameScreen; -} lbxMotionCache; - - -/* - * Motion delta events - */ - -typedef struct { - BYTE type; /* always eventBase + LbxQuickMotionDeltaEvent */ - CARD8 deltaTime; - INT8 deltaX; - INT8 deltaY; -} lbxQuickMotionDeltaEvent; -#define sz_lbxQuickMotionDeltaEvent 4 - -typedef struct { - BYTE type; /* always eventBase + LbxEvent */ - BYTE lbxType; /* LbxMotionDeltaEvent */ - INT8 deltaX; - INT8 deltaY; - CARD16 deltaTime B16; - CARD16 deltaSequence B16; -} lbxMotionDeltaEvent; -#define sz_lbxMotionDeltaEvent 8 - -extern int LBXInitDeltaCache ( LBXDeltasPtr pcache, int nDeltas, - int maxDeltasize ); -extern void LBXFreeDeltaCache ( LBXDeltasPtr pcache ); -extern int LBXDeltaMinDiffs ( LBXDeltasPtr pcache, unsigned char *inmsg, - int inmsglen, int maxdiff, int *pindex ); -extern void LBXEncodeDelta ( LBXDeltasPtr pcache, unsigned char *inmsg, - int ndiff, int index, unsigned char *buf ); -extern int LBXDecodeDelta ( LBXDeltasPtr pcache, xLbxDiffItem *deltas, - int ndiff, int index, unsigned char **buf ); -extern void LBXAddDeltaOut ( LBXDeltasPtr pcache, unsigned char *inmsg, - int inmsglen ); -extern void LBXAddDeltaIn ( LBXDeltasPtr pcache, unsigned char *inmsg, - int inmsglen ); - -#endif /* LBX_DELTA_STRUCT_H */ diff --git a/nx-X11/include/extensions/lbximage.h b/nx-X11/include/extensions/lbximage.h deleted file mode 100644 index fff181a69..000000000 --- a/nx-X11/include/extensions/lbximage.h +++ /dev/null @@ -1,151 +0,0 @@ -/* $Xorg: lbximage.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ - -/****************************************************************************** - -Copyright 1994, 1998 The Open Group - -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. - -The above copyright notice and this permission notice 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 -OPEN GROUP 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. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -******************************************************************************/ -/* $XFree86: xc/include/extensions/lbximage.h,v 1.4 2001/12/20 19:28:54 tsi Exp $ */ - -#ifndef _LBX_IMAGE_H_ -#define _LBX_IMAGE_H_ - -#include - -_XFUNCPROTOBEGIN - -typedef struct _LbxBitmapCompMethod { - - char *methodName; - int inited; - int methodOpCode; /* to be filled on reply from server */ - - int (*compInit)( - void - ); - - int (*compFunc)( - unsigned char * /* inbuf */, - unsigned char * /* outbuf */, - int /* outbufSize */, - int /* image_bytes */, - int /* pixels_per_line */, - int /* padded_bytes_per_scanline */, - int /* reverse_bits */, - int * /* bytesCompressed */ - ); - - int (*decompFunc)( - unsigned char * /* inbuf */, - unsigned char * /* outbuf */, - int /* image_bytes */, - int /* pixels_per_line */, - int /* padded_bytes_per_scanline */, - int /* reverse_bits */ - ); - -} LbxBitmapCompMethod; - - -#define LBX_MAX_DEPTHS 5 - -typedef struct _LbxPixmapCompMethod { - - char *methodName; - unsigned formatMask; - int depthCount; - int depths[LBX_MAX_DEPTHS]; - int inited; - int methodOpCode; /* to be filled on reply from server */ - - int (*compInit)( - void - ); - - int (*compFunc)( - char * /* inbuf */, - char * /* outbuf */, - int /* outbufSize */, - int /* format */, - int /* depth */, - int /* num_scan_lines */, - int /* scan_line_size */, - int * /* bytesCompressed */ - ); - - int (*decompFunc)( - char * /* inbuf */, - char * /* outbuf */, - int /* num_scan_lines */, - int /* scan_line_size */ - ); - -} LbxPixmapCompMethod; - - -extern int LbxImageEncodePackBits ( -char * /* inbuf */, -char * /* outbuf */, -int /* outbufSize */, -int /* format */, -int /* depth */, -int /* num_scan_lines */, -int /* scan_line_size */, -int * /* bytesCompressed */ -); - -extern int LbxImageEncodeFaxG42D ( -unsigned char * /* inbuf */, -unsigned char * /* outbuf */, -int /* outbufSize */, -int /* image_bytes */, -int /* pixels_per_line */, -int /* padded_bytes_per_scanline */, -int /* reverse_bits */, -int * /* bytesCompressed */ -); - -extern int LbxImageDecodePackBits ( -char * /* inbuf */, -char * /* outbuf */, -int /* num_scan_lines */, -int /* scan_line_size */ -); - -extern int LbxImageDecodeFaxG42D ( -unsigned char * /* inbuf */, -unsigned char * /* outbuf */, -int /* image_bytes */, -int /* pixels_per_line */, -int /* padded_bytes_per_scanline */, -int /* reverse_bits */ -); - -_XFUNCPROTOEND - -#define LBX_IMAGE_COMPRESS_SUCCESS 0 -#define LBX_IMAGE_COMPRESS_NO_SUPPORT 1 -#define LBX_IMAGE_COMPRESS_BAD_MALLOC 2 -#define LBX_IMAGE_COMPRESS_NOT_WORTH_IT 3 - -#endif /* _LBX_IMAGE_H_ */ diff --git a/nx-X11/include/extensions/lbxopts.h b/nx-X11/include/extensions/lbxopts.h deleted file mode 100644 index 3ec81fcb2..000000000 --- a/nx-X11/include/extensions/lbxopts.h +++ /dev/null @@ -1,133 +0,0 @@ -/* $Xorg: lbxopts.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ -/* - * Copyright 1994 Network Computing Devices, 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 Network Computing Devices, Inc. not be - * used in advertising or publicity pertaining to distribution of this - * software without specific, written prior permission. - * - * THIS SOFTWARE IS PROVIDED `AS-IS'. NETWORK COMPUTING DEVICES, INC., - * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT - * LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - * PARTICULAR PURPOSE, OR NONINFRINGEMENT. IN NO EVENT SHALL NETWORK - * COMPUTING DEVICES, INC., BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING - * SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOSS OF USE, DATA, - * OR PROFITS, EVEN IF ADVISED OF THE POSSIBILITY THEREOF, AND REGARDLESS OF - * WHETHER IN AN ACTION IN CONTRACT, TORT OR NEGLIGENCE, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - */ -/* $XFree86: xc/include/extensions/lbxopts.h,v 1.5 2001/01/17 17:53:21 dawes Exp $ */ - -#ifndef _LBX_OPTS_H_ -#define _LBX_OPTS_H_ - -/* - * Negotiable configuration options - */ -#define LBX_OPT_DELTA_PROXY 0 -#define LBX_OPT_DELTA_SERVER 1 -#define LBX_OPT_STREAM_COMP 2 -#define LBX_OPT_BITMAP_COMP 3 -#define LBX_OPT_PIXMAP_COMP 4 -#define LBX_OPT_MSG_COMP 5 /* aka "squishing" */ -#define LBX_OPT_USE_TAGS 6 -#define LBX_OPT_CMAP_ALL 7 -#define LBX_OPT_EXTENSION 255 - -/* - * Length fields are encoded in 1 or 3 bytes - */ -#define LBX_OPT_SMALLLEN_SIZE 1 -#define LBX_OPT_BIGLEN_SIZE 3 -#define LBX_OPT_BIGLEN_MIN 256 - -#define LBX_OPT_DECODE_LEN(p, len, size) \ - if ((p)[0]) { \ - (len) = (p)[0]; \ - (size) = LBX_OPT_SMALLLEN_SIZE; \ - } \ - else { \ - (len) = ((LBX_OPT_BIGLEN_MIN + (p)[1]) << 8) | (p)[2]; \ - (size) = LBX_OPT_BIGLEN_SIZE; \ - } - -/* - * Option header lengths - */ -#define LBX_OPT_SMALLHDR_LEN (1 + LBX_OPT_SMALLLEN_SIZE) -#define LBX_OPT_BIGHDR_LEN (1 + LBX_OPT_BIGLEN_SIZE) - -/* - * Delta compression parameters - */ -#define LBX_OPT_DELTA_REQLEN 6 -#define LBX_OPT_DELTA_REPLYLEN 2 -#define LBX_OPT_DELTA_NCACHE_DFLT 16 -#define LBX_OPT_DELTA_MSGLEN_MIN 32 -#define LBX_OPT_DELTA_MSGLEN_DFLT 64 - - -/* - * Stream compression opts - */ - -#include - -#if defined(WIN32) || (defined(USG) && !defined(umips) && !defined(MOTOROLA) && !defined(uniosu) && !defined(__sxg__)) - -struct iovec { - caddr_t iov_base; - int iov_len; -}; - -#else -#ifndef Lynx -#include -#else -#include -#endif -#endif - -typedef void *LbxStreamCompHandle; - -typedef struct _LbxStreamOpts { - LbxStreamCompHandle (*streamCompInit)(int fd, void * arg); - void * streamCompArg; - int (*streamCompStuffInput)( - int fd, - unsigned char *buf, - int buflen - ); - int (*streamCompInputAvail)( - int fd - ); - int (*streamCompFlush)( - int fd - ); - int (*streamCompRead)( - int fd, - unsigned char *buf, - int buflen - ); - int (*streamCompWriteV)( - int fd, - struct iovec *iov, - int iovcnt - ); - void (*streamCompOn)( - int fd - ); - void (*streamCompOff)( - int fd - ); - void (*streamCompFreeHandle)( - LbxStreamCompHandle handle - ); -} LbxStreamOpts; - -#endif /* _LBX_OPTS_H_ */ diff --git a/nx-X11/include/extensions/lbxstr.h b/nx-X11/include/extensions/lbxstr.h deleted file mode 100644 index 7bde5a766..000000000 --- a/nx-X11/include/extensions/lbxstr.h +++ /dev/null @@ -1,931 +0,0 @@ -/* $Xorg: lbxstr.h,v 1.4 2001/02/13 20:14:04 pookie Exp $ */ -/* - * Copyright 1992 Network Computing Devices - * - * 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 NCD. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. NCD. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD. - * 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. - * - */ -/* $XFree86: xc/include/extensions/lbxstr.h,v 1.2 2001/08/01 00:44:35 tsi Exp $ */ - -#ifndef _LBXSTR_H_ -#define _LBXSTR_H_ - -#include - -#define LBXNAME "LBX" - -#define LBX_MAJOR_VERSION 1 -#define LBX_MINOR_VERSION 0 - -/* - * Redefine some basic types used by structures defined herein. This removes - * any possibility on 64-bit architectures of one entity viewing communicated - * data as 32-bit quantities and another entity viewing the same data as 64-bit - * quantities. - */ -#define XID CARD32 -#define Atom CARD32 -#define Colormap CARD32 -#define Drawable CARD32 -#define VisualID CARD32 -#define Window CARD32 - -typedef struct { - BOOL success; /* TRUE */ - BOOL changeType; - CARD16 majorVersion B16, - minorVersion B16; - CARD16 length B16; /* 1/4 additional bytes in setup info */ - CARD32 tag B32; -} xLbxConnSetupPrefix; - -typedef struct _LbxQueryVersion { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxQueryVersion */ - CARD16 length B16; -} xLbxQueryVersionReq; -#define sz_xLbxQueryVersionReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 majorVersion B16; /* major version of LBX protocol */ - CARD16 minorVersion B16; /* minor version of LBX protocol */ - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; -} xLbxQueryVersionReply; -#define sz_xLbxQueryVersionReply 32 - -typedef struct _LbxStartProxy { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxStartProxy */ - CARD16 length B16; -} xLbxStartProxyReq; -#define sz_xLbxStartProxyReq 4 - -typedef struct _LbxStopProxy { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxStopProxy */ - CARD16 length B16; -} xLbxStopProxyReq; -#define sz_xLbxStopProxyReq 4 - -typedef struct _LbxSwitch { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxSwitch */ - CARD16 length B16; - CARD32 client B32; /* new client */ -} xLbxSwitchReq; -#define sz_xLbxSwitchReq 8 - -typedef struct _LbxNewClient { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxNewClient */ - CARD16 length B16; - CARD32 client B32; /* new client */ -} xLbxNewClientReq; -#define sz_xLbxNewClientReq 8 - -typedef struct _LbxCloseClient { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxCloseClient */ - CARD16 length B16; - CARD32 client B32; /* new client */ -} xLbxCloseClientReq; -#define sz_xLbxCloseClientReq 8 - -typedef struct _LbxModifySequence { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxModifySequence */ - CARD16 length B16; - CARD32 adjust B32; -} xLbxModifySequenceReq; -#define sz_xLbxModifySequenceReq 8 - -typedef struct _LbxAllowMotion { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxAllowMotion */ - CARD16 length B16; - CARD32 num B32; -} xLbxAllowMotionReq; -#define sz_xLbxAllowMotionReq 8 - -typedef struct { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxGrabCmap */ - CARD16 length B16; - Colormap cmap B32; -} xLbxGrabCmapReq; -#define sz_xLbxGrabCmapReq 8 - -#define LBX_SMART_GRAB 0x80 -#define LBX_AUTO_RELEASE 0x40 -#define LBX_3CHANNELS 0x20 -#define LBX_2BYTE_PIXELS 0x10 -#define LBX_RGB_BITS_MASK 0x0f - -#define LBX_LIST_END 0 -#define LBX_PIXEL_PRIVATE 1 -#define LBX_PIXEL_SHARED 2 -#define LBX_PIXEL_RANGE_PRIVATE 3 -#define LBX_PIXEL_RANGE_SHARED 4 -#define LBX_NEXT_CHANNEL 5 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 flags; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 pad0 B16; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B16; -} xLbxGrabCmapReply; -#define sz_xLbxGrabCmapReply 32 -#define sz_xLbxGrabCmapReplyHdr 8 - - -typedef struct { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxReleaseCmap */ - CARD16 length B16; - Colormap cmap B32; -} xLbxReleaseCmapReq; -#define sz_xLbxReleaseCmapReq 8 - -typedef struct { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxAllocColor */ - CARD16 length B16; - Colormap cmap B32; - CARD32 pixel B32; - CARD16 red B16, green B16, blue B16; - CARD16 pad B16; -} xLbxAllocColorReq; -#define sz_xLbxAllocColorReq 20 - -typedef struct _LbxIncrementPixel { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxIncrementPixel */ - CARD16 length B16; - CARD32 cmap B32; - CARD32 pixel B32; -} xLbxIncrementPixelReq; -#define sz_xLbxIncrementPixelReq 12 - -typedef struct _LbxDelta { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxDelta */ - CARD16 length B16; - CARD8 diffs; /* number of diffs */ - CARD8 cindex; /* cache index */ - /* list of diffs follows */ -} xLbxDeltaReq; -#define sz_xLbxDeltaReq 6 - -typedef struct _LbxGetModifierMapping { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxGetModifierMapping */ - CARD16 length B16; -} xLbxGetModifierMappingReq; -#define sz_xLbxGetModifierMappingReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 keyspermod; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 tag B32; - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; -} xLbxGetModifierMappingReply; -#define sz_xLbxGetModifierMappingReply 32 - -typedef struct _LbxGetKeyboardMapping { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxGetKeyboardMapping */ - CARD16 length B16; - KeyCode firstKeyCode; - CARD8 count; - CARD16 pad1 B16; -} xLbxGetKeyboardMappingReq; -#define sz_xLbxGetKeyboardMappingReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 keysperkeycode; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 tag B32; - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; -} xLbxGetKeyboardMappingReply; -#define sz_xLbxGetKeyboardMappingReply 32 - -typedef struct _LbxQueryFont { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxQueryFont */ - CARD16 length B16; - CARD32 fid B32; -} xLbxQueryFontReq; -#define sz_xLbxQueryFontReq 8 - -typedef struct _LbxInternAtoms { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxInternAtoms */ - CARD16 length B16; - CARD16 num B16; -} xLbxInternAtomsReq; -#define sz_xLbxInternAtomsReq 6 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 atomsStart B32; - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; -} xLbxInternAtomsReply; -#define sz_xLbxInternAtomsReply 32 -#define sz_xLbxInternAtomsReplyHdr 8 - - -typedef struct _LbxGetWinAttrAndGeom { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxGetWinAttrAndGeom */ - CARD16 length B16; - CARD32 id B32; /* window id */ -} xLbxGetWinAttrAndGeomReq; -#define sz_xLbxGetWinAttrAndGeomReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 backingStore; - CARD16 sequenceNumber B16; - CARD32 length B32; /* NOT 0; this is an extra-large reply */ - VisualID visualID B32; -#if defined(__cplusplus) || defined(c_plusplus) - CARD16 c_class B16; -#else - CARD16 class B16; -#endif - CARD8 bitGravity; - CARD8 winGravity; - CARD32 backingBitPlanes B32; - CARD32 backingPixel B32; - BOOL saveUnder; - BOOL mapInstalled; - CARD8 mapState; - BOOL override; - Colormap colormap B32; - CARD32 allEventMasks B32; - CARD32 yourEventMask B32; - CARD16 doNotPropagateMask B16; - CARD16 pad1 B16; - Window root B32; - INT16 x B16, y B16; - CARD16 width B16, height B16; - CARD16 borderWidth B16; - CARD8 depth; - CARD8 pad2; -} xLbxGetWinAttrAndGeomReply; -#define sz_xLbxGetWinAttrAndGeomReply 60 - - -typedef struct { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxSync */ - CARD16 length B16; -} xLbxSyncReq; -#define sz_xLbxSyncReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 pad0; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xLbxSyncReply; -#define sz_xLbxSyncReply 32 - - -/* an LBX squished charinfo packs the data in a CARD32 as follows */ -#define LBX_WIDTH_SHIFT 26 -#define LBX_LEFT_SHIFT 20 -#define LBX_RIGHT_SHIFT 13 -#define LBX_ASCENT_SHIFT 7 -#define LBX_DESCENT_SHIFT 0 - -#define LBX_WIDTH_BITS 6 -#define LBX_LEFT_BITS 6 -#define LBX_RIGHT_BITS 7 -#define LBX_ASCENT_BITS 6 -#define LBX_DESCENT_BITS 7 - -#define LBX_WIDTH_MASK 0xfc000000 -#define LBX_LEFT_MASK 0x03f00000 -#define LBX_RIGHT_MASK 0x000fe000 -#define LBX_ASCENT_MASK 0x00001f80 -#define LBX_DESCENT_MASK 0x0000007f - -#define LBX_MASK_BITS(val, n) ((unsigned int) ((val) & ((1 << (n)) - 1))) - -typedef struct { - CARD32 metrics B32; -} xLbxCharInfo; - -/* note that this is identical to xQueryFontReply except for missing - * first 2 words - */ -typedef struct { - xCharInfo minBounds; -/* XXX do we need to leave this gunk? */ - CARD32 walign1 B32; - xCharInfo maxBounds; - CARD32 walign2 B32; - CARD16 minCharOrByte2 B16, maxCharOrByte2 B16; - CARD16 defaultChar B16; - CARD16 nFontProps B16; /* followed by this many xFontProp structures */ - CARD8 drawDirection; - CARD8 minByte1, maxByte1; - BOOL allCharsExist; - INT16 fontAscent B16, fontDescent B16; - CARD32 nCharInfos B32; /* followed by this many xLbxCharInfo structures */ -} xLbxFontInfo; - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 compression; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 tag B32; - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - /* X_QueryFont sticks much of the data in the base reply packet, - * but we hope that it won't be needed, (and it won't fit in 32 bytes - * with the tag anyways) - * - * if any additional data is needed, its sent in a xLbxFontInfo - */ -} xLbxQueryFontReply; -#define sz_xLbxQueryFontReply 32 - -typedef struct _LbxChangeProperty { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxChangeProperty */ - CARD16 length B16; - Window window B32; - Atom property B32; - Atom type B32; - CARD8 format; - CARD8 mode; - BYTE pad[2]; - CARD32 nUnits B32; -} xLbxChangePropertyReq; -#define sz_xLbxChangePropertyReq 24 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 pad; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 tag B32; - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; -} xLbxChangePropertyReply; -#define sz_xLbxChangePropertyReply 32 - -typedef struct _LbxGetProperty { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxGetProperty */ - CARD16 length B16; - Window window B32; - Atom property B32; - Atom type B32; - CARD8 delete; - BYTE pad[3]; - CARD32 longOffset B32; - CARD32 longLength B32; -} xLbxGetPropertyReq; -#define sz_xLbxGetPropertyReq 28 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 format; - CARD16 sequenceNumber B16; - CARD32 length B32; - Atom propertyType B32; - CARD32 bytesAfter B32; - CARD32 nItems B32; - CARD32 tag B32; - CARD32 pad1 B32; - CARD32 pad2 B32; -} xLbxGetPropertyReply; -#define sz_xLbxGetPropertyReply 32 - -typedef struct _LbxTagData { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxTagData */ - CARD16 length B16; - XID tag B32; - CARD32 real_length B32; - /* data */ -} xLbxTagDataReq; -#define sz_xLbxTagDataReq 12 - -typedef struct _LbxInvalidateTag { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxInvalidateTag */ - CARD16 length B16; - CARD32 tag B32; -} xLbxInvalidateTagReq; -#define sz_xLbxInvalidateTagReq 8 - -typedef struct _LbxPutImage { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxPutImage */ - CARD16 length B16; - CARD8 compressionMethod; - CARD8 cacheEnts; - CARD8 bitPacked; - /* rest is variable */ -} xLbxPutImageReq; -#define sz_xLbxPutImageReq 7 - -typedef struct { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxGetImage */ - CARD16 length B16; - Drawable drawable B32; - INT16 x B16, y B16; - CARD16 width B16, height B16; - CARD32 planeMask B32; - CARD8 format; - CARD8 pad1; - CARD16 pad2 B16; -} xLbxGetImageReq; - -#define sz_xLbxGetImageReq 24 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 depth; - CARD16 sequenceNumber B16; - CARD32 lbxLength B32; - CARD32 xLength B32; - VisualID visual B32; - CARD8 compressionMethod; - CARD8 pad1; - CARD16 pad2 B16; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xLbxGetImageReply; - -#define sz_xLbxGetImageReply 32 - -/* Following used for LbxPolyPoint, LbxPolyLine, LbxPolySegment, - LbxPolyRectangle, LbxPolyArc, LbxPolyFillRectangle and LbxPolyFillArc */ - -#define GFX_CACHE_SIZE 15 - -#define GFXdCacheEnt(e) ((e) & 0xf) -#define GFXgCacheEnt(e) (((e) >> 4) & 0xf) -#define GFXCacheEnts(d,g) (((d) & 0xf) | (((g) & 0xf) << 4)) - -#define GFXCacheNone 0xf - -typedef struct _LbxPolyPoint { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; - CARD16 length B16; - CARD8 cacheEnts; - CARD8 padBytes; -} xLbxPolyPointReq; - -#define sz_xLbxPolyPointReq 6 - -typedef xLbxPolyPointReq xLbxPolyLineReq; -typedef xLbxPolyPointReq xLbxPolySegmentReq; -typedef xLbxPolyPointReq xLbxPolyRectangleReq; -typedef xLbxPolyPointReq xLbxPolyArcReq; -typedef xLbxPolyPointReq xLbxPolyFillRectangleReq; -typedef xLbxPolyPointReq xLbxPolyFillArcReq; - -#define sz_xLbxPolyLineReq sz_xLbxPolyPointReq -#define sz_xLbxPolySegmentReq sz_xLbxPolyPointReq -#define sz_xLbxPolyRectangleReq sz_xLbxPolyPointReq -#define sz_xLbxPolyArcReq sz_xLbxPolyPointReq -#define sz_xLbxPolyFillRectangleReq sz_xLbxPolyPointReq -#define sz_xLbxPolyFillArc sz_xLbxPolyPointReq - -typedef struct _LbxFillPoly { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; - CARD16 length B16; - CARD8 cacheEnts; - BYTE shape; - CARD8 padBytes; -} xLbxFillPolyReq; -#define sz_xLbxFillPolyReq 7 - -typedef struct _LbxCopyArea { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; - CARD16 length B16; - CARD8 srcCache; /* source drawable */ - CARD8 cacheEnts; /* dest drawable and gc */ - /* followed by encoded src x, src y, dst x, dst y, width, height */ -} xLbxCopyAreaReq; - -#define sz_xLbxCopyAreaReq 6 - -typedef struct _LbxCopyPlane { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; - CARD16 length B16; - CARD32 bitPlane B32; - CARD8 srcCache; /* source drawable */ - CARD8 cacheEnts; /* dest drawable and gc */ - /* followed by encoded src x, src y, dst x, dst y, width, height */ -} xLbxCopyPlaneReq; - -#define sz_xLbxCopyPlaneReq 10 - -typedef struct _LbxPolyText { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; - CARD16 length B16; - CARD8 cacheEnts; - /* followed by encoded src x, src y coordinates and text elts */ -} xLbxPolyTextReq; - -#define sz_xLbxPolyTextReq 5 - -typedef xLbxPolyTextReq xLbxPolyText8Req; -typedef xLbxPolyTextReq xLbxPolyText16Req; - -#define sz_xLbxPolyTextReq 5 -#define sz_xLbxPolyText8Req 5 -#define sz_xLbxPolyText16Req 5 - -typedef struct _LbxImageText { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; - CARD16 length B16; - CARD8 cacheEnts; - CARD8 nChars; - /* followed by encoded src x, src y coordinates and string */ -} xLbxImageTextReq; - -typedef xLbxImageTextReq xLbxImageText8Req; -typedef xLbxImageTextReq xLbxImageText16Req; - -#define sz_xLbxImageTextReq 6 -#define sz_xLbxImageText8Req 6 -#define sz_xLbxImageText16Req 6 - -typedef struct { - CARD8 offset; - CARD8 diff; -} xLbxDiffItem; -#define sz_xLbxDiffItem 2 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 nOpts; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 optDataStart B32; - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; -} xLbxStartReply; -#define sz_xLbxStartReply 32 -#define sz_xLbxStartReplyHdr 8 - -typedef struct _LbxQueryExtension { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxQueryExtension */ - CARD16 length B16; - CARD32 nbytes B32; -} xLbxQueryExtensionReq; -#define sz_xLbxQueryExtensionReq 8 - -typedef struct _LbxQueryExtensionReply { - BYTE type; /* X_Reply */ - CARD8 numReqs; - CARD16 sequenceNumber B16; - CARD32 length B32; - BOOL present; - CARD8 major_opcode; - CARD8 first_event; - CARD8 first_error; - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - - /* reply & event generating requests */ -} xLbxQueryExtensionReply; -#define sz_xLbxQueryExtensionReply 32 - - -typedef struct _LbxBeginLargeRequest { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxBeginLargeRequest */ - CARD16 length B16; - CARD32 largeReqLength B32; -} xLbxBeginLargeRequestReq; -#define sz_BeginLargeRequestReq 8 - -typedef struct _LbxLargeRequestData { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxLargeRequestData */ - CARD16 length B16; - /* followed by LISTofCARD8 data */ -} xLbxLargeRequestDataReq; -#define sz_LargeRequestDataReq 4 - -typedef struct _LbxEndLargeRequest { - CARD8 reqType; /* always LbxReqCode */ - CARD8 lbxReqType; /* always X_LbxEndLargeRequest */ - CARD16 length B16; -} xLbxEndLargeRequestReq; -#define sz_EndLargeRequestReq 4 - - - -typedef struct _LbxSwitchEvent { - BYTE type; /* always eventBase + LbxEvent */ - BYTE lbxType; /* LbxSwitchEvent */ - CARD16 pad B16; - CARD32 client B32; -} xLbxSwitchEvent; -#define sz_xLbxSwitchEvent 8 - -typedef struct _LbxCloseEvent { - BYTE type; /* always eventBase + LbxEvent */ - BYTE lbxType; /* LbxCloseEvent */ - CARD16 sequenceNumber B16; - CARD32 client B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xLbxCloseEvent; -#define sz_xLbxCloseEvent 32 - -typedef struct _LbxInvalidateTagEvent { - BYTE type; /* always eventBase + LbxEvent */ - BYTE lbxType; /* LbxInvalidateTagEvent */ - CARD16 sequenceNumber B16; - CARD32 tag B32; - CARD32 tagType B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xLbxInvalidateTagEvent; -#define sz_xLbxInvalidateTagEvent 32 - -typedef struct _LbxSendTagDataEvent { - BYTE type; /* always eventBase + LbxEvent */ - BYTE lbxType; /* LbxSendTagDataEvent */ - CARD16 sequenceNumber B16; - CARD32 tag B32; - CARD32 tagType B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xLbxSendTagDataEvent; -#define sz_xLbxSendTagDataEvent 32 - -typedef struct _LbxListenToOneEvent { - BYTE type; /* always eventBase + LbxEvent */ - BYTE lbxType; /* LbxListenToOneEvent */ - CARD16 sequenceNumber B16; - CARD32 client B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xLbxListenToOneEvent; -#define sz_xLbxListenToOneEvent 32 - -typedef struct _LbxListenToAllEvent { - BYTE type; /* always eventBase + LbxEvent */ - BYTE lbxType; /* LbxListenToAllEvent */ - CARD16 sequenceNumber B16; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; - CARD32 pad7 B32; -} xLbxListenToAllEvent; -#define sz_xLbxListenToOneEvent 32 - -typedef struct _LbxReleaseCmapEvent { - BYTE type; /* always eventBase + LbxEvent */ - BYTE lbxType; /* LbxReleaseCmapEvent */ - CARD16 sequenceNumber B16; - Colormap colormap B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xLbxReleaseCmapEvent; -#define sz_xLbxReleaseCmapEvent 32 - - -typedef struct _LbxFreeCellsEvent { - BYTE type; /* always eventBase + LbxEvent */ - BYTE lbxType; /* LbxFreeCellsEvent */ - CARD16 sequenceNumber B16; - Colormap colormap B32; - CARD32 pixelStart B32; - CARD32 pixelEnd B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; -} xLbxFreeCellsEvent; -#define sz_xLbxFreeCellsEvent 32 - - -/* - * squished X event sizes. If these change, be sure to update lbxquish.c - * and unsquish.c appropriately - * - * lbxsz_* is the padded squished length - * lbxupsz_* is the unpadded squished length - */ - -#define lbxsz_KeyButtonEvent 32 -#define lbxupsz_KeyButtonEvent 31 - -#define lbxsz_EnterLeaveEvent 32 -#define lbxupsz_EnterLeaveEvent 32 - -#define lbxsz_FocusEvent 12 -#define lbxupsz_FocusEvent 9 - -#define lbxsz_KeymapEvent 32 -#define lbxupsz_KeymapEvent 32 - -#define lbxsz_ExposeEvent 20 -#define lbxupsz_ExposeEvent 18 - -#define lbxsz_GfxExposeEvent 24 -#define lbxupsz_GfxExposeEvent 21 - -#define lbxsz_NoExposeEvent 12 -#define lbxupsz_NoExposeEvent 11 - -#define lbxsz_VisibilityEvent 12 -#define lbxupsz_VisibilityEvent 9 - -#define lbxsz_CreateNotifyEvent 24 -#define lbxupsz_CreateNotifyEvent 23 - -#define lbxsz_DestroyNotifyEvent 12 -#define lbxupsz_DestroyNotifyEvent 12 - -#define lbxsz_UnmapNotifyEvent 16 -#define lbxupsz_UnmapNotifyEvent 13 - -#define lbxsz_MapNotifyEvent 16 -#define lbxupsz_MapNotifyEvent 13 - -#define lbxsz_MapRequestEvent 12 -#define lbxupsz_MapRequestEvent 12 - -#define lbxsz_ReparentEvent 24 -#define lbxupsz_ReparentEvent 21 - -#define lbxsz_ConfigureNotifyEvent 28 -#define lbxupsz_ConfigureNotifyEvent 27 - -#define lbxsz_ConfigureRequestEvent 28 -#define lbxupsz_ConfigureRequestEvent 28 - -#define lbxsz_GravityEvent 16 -#define lbxupsz_GravityEvent 16 - -#define lbxsz_ResizeRequestEvent 12 -#define lbxupsz_ResizeRequestEvent 12 - -#define lbxsz_CirculateEvent 20 -#define lbxupsz_CirculateEvent 17 - -#define lbxsz_PropertyEvent 20 -#define lbxupsz_PropertyEvent 17 - -#define lbxsz_SelectionClearEvent 16 -#define lbxupsz_SelectionClearEvent 16 - -#define lbxsz_SelectionRequestEvent 28 -#define lbxupsz_SelectionRequestEvent 28 - -#define lbxsz_SelectionNotifyEvent 24 -#define lbxupsz_SelectionNotifyEvent 24 - -#define lbxsz_ColormapEvent 16 -#define lbxupsz_ColormapEvent 14 - -#define lbxsz_MappingNotifyEvent 8 -#define lbxupsz_MappingNotifyEvent 7 - -#define lbxsz_ClientMessageEvent 32 -#define lbxupsz_ClientMessageEvent 32 - -#define lbxsz_UnknownEvent 32 - -#ifdef DEBUG - -#define DBG_SWITCH 0x00000001 -#define DBG_CLOSE 0x00000002 -#define DBG_IO 0x00000004 -#define DBG_READ_REQ 0x00000008 -#define DBG_LEN 0x00000010 -#define DBG_BLOCK 0x00000020 -#define DBG_CLIENT 0x00000040 -#define DBG_DELTA 0x00000080 - -extern int lbxDebug; - -#define DBG(n,m) if (lbxDebug & (n)) { fprintf m; } else -#else -#define DBG(n,m) -#endif - -/* - * Cancel the previous redefinition of the basic types, thus restoring their - * X.h definitions. - */ - -#undef XID -#undef Atom -#undef Colormap -#undef Drawable -#undef VisualID -#undef Window - -#endif /* _LBXSTR_H_ */ diff --git a/nx-X11/include/extensions/lbxzlib.h b/nx-X11/include/extensions/lbxzlib.h deleted file mode 100644 index dc21837a1..000000000 --- a/nx-X11/include/extensions/lbxzlib.h +++ /dev/null @@ -1,64 +0,0 @@ -/* $Xorg: lbxzlib.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ -/* - * Copyright 1993 Network Computing Devices - * - * 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 NCD. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. NCD. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD. - * 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: Dale Tonogai, Network Computing Devices - */ - -#ifndef _ZLIB_H_ -#define _ZLIB_H_ - -#define ZLIB_STRCOMP_OPT "XC-ZLIB" -#define ZLIB_STRCOMP_OPT_LEN 7 - -#define ZLIB_PACKET_HDRLEN 2 -#define ZLIB_MAX_DATALEN 0xfff -#define ZLIB_MAX_PLAIN 270 -#define ZLIB_MAX_OUTLEN (ZLIB_MAX_PLAIN << 1) - -#define ZLIB_COMPRESS_FLAG 0x80 -#define ZLIB_DATALEN_MASK 0x0f - -#define ZLIB_PUT_PKTHDR(p, len, compflag) \ - { \ - (p)[0] = ((unsigned)(len)) >> 8 | ((compflag) ? ZLIB_COMPRESS_FLAG : 0);\ - (p)[1] = (len) & 0xff; \ - } - -#define ZLIB_GET_DATALEN(p) \ - ((((unsigned)((p)[0] & ZLIB_DATALEN_MASK)) << 8) | (unsigned)(p)[1]) - -#define ZLIB_COMPRESSED(p) ((p)[0] & ZLIB_COMPRESS_FLAG) - -struct ZlibInfo; - -extern void * ZlibInit ( int fd, int level ); -extern void ZlibFree ( struct ZlibInfo *comp ); -extern int ZlibFlush ( int fd ); -extern int ZlibStuffInput ( int fd, unsigned char *buffer, int buflen ); -extern void ZlibCompressOn ( int fd ); -extern void ZlibCompressOff ( int fd ); -extern int ZlibWrite ( int fd, unsigned char *buffer, int buflen ); -extern int ZlibWriteV ( int fd, struct iovec *iov, int iovcnt ); -extern int ZlibRead ( int fd, unsigned char *buffer, int buflen ); -extern int ZlibInputAvail ( int fd ); - - -#endif /* _ZLIB_H_ */ diff --git a/nx-X11/include/extensions/mitmiscstr.h b/nx-X11/include/extensions/mitmiscstr.h deleted file mode 100644 index 32cae2635..000000000 --- a/nx-X11/include/extensions/mitmiscstr.h +++ /dev/null @@ -1,70 +0,0 @@ -/* $XFree86$ */ -/************************************************************ - -Copyright 1989, 1998 The Open Group - -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. - -The above copyright notice and this permission notice 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 -OPEN GROUP 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. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -********************************************************/ - -/* RANDOM CRUFT! THIS HAS NO OFFICIAL X CONSORTIUM OR X PROJECT TEAM BLESSING */ - -/* $Xorg: mitmiscstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ - -#ifndef _MITMISCSTR_H_ -#define _MITMISCSTR_H_ - -#include "MITMisc.h" - -#define MITMISCNAME "MIT-SUNDRY-NONSTANDARD" - -typedef struct _SetBugMode { - CARD8 reqType; /* always MITReqCode */ - CARD8 mitReqType; /* always X_MITSetBugMode */ - CARD16 length B16; - BOOL onOff; - BYTE pad0; - CARD16 pad1; -} xMITSetBugModeReq; -#define sz_xMITSetBugModeReq 8 - -typedef struct _GetBugMode { - CARD8 reqType; /* always MITReqCode */ - CARD8 mitReqType; /* always X_MITGetBugMode */ - CARD16 length B16; -} xMITGetBugModeReq; -#define sz_xMITGetBugModeReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL onOff; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xMITGetBugModeReply; -#define sz_xMITGetBugModeReply 32 - -#endif /* _MITMISCSTR_H_ */ diff --git a/nx-X11/include/extensions/multibuf.h b/nx-X11/include/extensions/multibuf.h deleted file mode 100644 index c35399b01..000000000 --- a/nx-X11/include/extensions/multibuf.h +++ /dev/null @@ -1,317 +0,0 @@ -/* - * $Xorg: multibuf.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ - * -Copyright 1989, 1998 The Open Group - -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. - -The above copyright notice and this permission notice 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 -OPEN GROUP 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. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - */ - -/* $XFree86: xc/include/extensions/multibuf.h,v 3.4 2001/12/14 19:53:28 dawes Exp $ */ - -#ifndef _MULTIBUF_H_ -#define _MULTIBUF_H_ - -#include - -#define MULTIBUFFER_PROTOCOL_NAME "Multi-Buffering" - -#define MULTIBUFFER_MAJOR_VERSION 1 /* current version numbers */ -#define MULTIBUFFER_MINOR_VERSION 1 /* has ClearImageBufferArea */ - -#define X_MbufGetBufferVersion 0 -#define X_MbufCreateImageBuffers 1 -#define X_MbufDestroyImageBuffers 2 -#define X_MbufDisplayImageBuffers 3 -#define X_MbufSetMBufferAttributes 4 -#define X_MbufGetMBufferAttributes 5 -#define X_MbufSetBufferAttributes 6 -#define X_MbufGetBufferAttributes 7 -#define X_MbufGetBufferInfo 8 -#define X_MbufCreateStereoWindow 9 -#define X_MbufClearImageBufferArea 10 - -/* - * update_action field - */ -#define MultibufferUpdateActionUndefined 0 -#define MultibufferUpdateActionBackground 1 -#define MultibufferUpdateActionUntouched 2 -#define MultibufferUpdateActionCopied 3 - -/* - * update_hint field - */ -#define MultibufferUpdateHintFrequent 0 -#define MultibufferUpdateHintIntermittent 1 -#define MultibufferUpdateHintStatic 2 - -/* - * valuemask fields - */ -#define MultibufferWindowUpdateHint (1L << 0) -#define MultibufferBufferEventMask (1L << 0) - -/* - * mono vs. stereo and left vs. right - */ -#define MultibufferModeMono 0 -#define MultibufferModeStereo 1 -#define MultibufferSideMono 0 -#define MultibufferSideLeft 1 -#define MultibufferSideRight 2 - -/* - * clobber state - */ -#define MultibufferUnclobbered 0 -#define MultibufferPartiallyClobbered 1 -#define MultibufferFullyClobbered 2 - -/* - * event stuff - */ -#define MultibufferClobberNotifyMask 0x02000000 -#define MultibufferUpdateNotifyMask 0x04000000 - -#define MultibufferClobberNotify 0 -#define MultibufferUpdateNotify 1 -#define MultibufferNumberEvents (MultibufferUpdateNotify + 1) - -#define MultibufferBadBuffer 0 -#define MultibufferNumberErrors (MultibufferBadBuffer + 1) - - -#ifndef _MULTIBUF_SERVER_ -/* - * Extra definitions that will only be needed in the client - */ -typedef XID Multibuffer; - -typedef struct { - int type; /* of event */ - unsigned long serial; /* # of last request processed by server */ - int send_event; /* true if this came frome a SendEvent request */ - Display *display; /* Display the event was read from */ - Multibuffer buffer; /* buffer of event */ - int state; /* see Clobbered constants above */ -} XmbufClobberNotifyEvent; - -typedef struct { - int type; /* of event */ - unsigned long serial; /* # of last request processed by server */ - int send_event; /* true if this came frome a SendEvent request */ - Display *display; /* Display the event was read from */ - Multibuffer buffer; /* buffer of event */ -} XmbufUpdateNotifyEvent; - - -/* - * per-window attributes that can be got - */ -typedef struct { - int displayed_index; /* which buffer is being displayed */ - int update_action; /* Undefined, Background, Untouched, Copied */ - int update_hint; /* Frequent, Intermittent, Static */ - int window_mode; /* Mono, Stereo */ - int nbuffers; /* Number of buffers */ - Multibuffer *buffers; /* Buffers */ -} XmbufWindowAttributes; - -/* - * per-window attributes that can be set - */ -typedef struct { - int update_hint; /* Frequent, Intermittent, Static */ -} XmbufSetWindowAttributes; - - -/* - * per-buffer attributes that can be got - */ -typedef struct { - Window window; /* which window this belongs to */ - unsigned long event_mask; /* events that have been selected */ - int buffer_index; /* which buffer is this */ - int side; /* Mono, Left, Right */ -} XmbufBufferAttributes; - -/* - * per-buffer attributes that can be set - */ -typedef struct { - unsigned long event_mask; /* events that have been selected */ -} XmbufSetBufferAttributes; - - -/* - * per-screen buffer info (there will be lists of them) - */ -typedef struct { - VisualID visualid; /* visual usuable at this depth */ - int max_buffers; /* most buffers for this visual */ - int depth; /* depth of buffers to be created */ -} XmbufBufferInfo; - -_XFUNCPROTOBEGIN - -extern Bool XmbufQueryExtension( - Display* /* dpy */, - int* /* event_base_return */, - int* /* error_base_return */ -); - -extern Status XmbufGetVersion( - Display* /* dpy */, - int* /* major_version_return */, - int* /* minor_version_return */ -); - -extern int XmbufCreateBuffers( - Display* /* dpy */, - Window /* w */, - int /* count */, - int /* update_action */, - int /* update_hint */, - Multibuffer* /* buffers */ -); - -extern void XmbufDestroyBuffers( - Display* /* dpy */, - Window /* window */ -); - -extern void XmbufDisplayBuffers( - Display* /* dpy */, - int /* count */, - Multibuffer* /* buffers */, - int /* min_delay */, - int /* max_delay */ -); - -extern Status XmbufGetWindowAttributes( - Display* /* dpy */, - Window /* w */, - XmbufWindowAttributes* /* attr */ -); - -extern void XmbufChangeWindowAttributes( - Display* /* dpy */, - Window /* w */, - unsigned long /* valuemask */, - XmbufSetWindowAttributes* /* attr */ -); - -extern Status XmbufGetBufferAttributes( - Display* /* dpy */, - Multibuffer /* b */, - XmbufBufferAttributes* /* attr */ -); - -extern void XmbufChangeBufferAttributes( - Display* /* dpy */, - Multibuffer /* b */, - unsigned long /* valuemask */, - XmbufSetBufferAttributes* /* attr */ -); - -extern Status XmbufGetScreenInfo( - Display* /* dpy */, - Drawable /* d */, - int* /* nmono_return */, - XmbufBufferInfo** /* mono_info_return */, - int* /* nstereo_return */, - XmbufBufferInfo** /* stereo_info_return */ -); - -extern Window XmbufCreateStereoWindow( - Display* /* dpy */, - Window /* parent */, - int /* x */, - int /* y */, - unsigned int /* width */, - unsigned int /* height */, - unsigned int /* border_width */, - int /* depth */, - unsigned int /* class */, - Visual* /* visual */, - unsigned long /* valuemask */, - XSetWindowAttributes* /* attr */, - Multibuffer* /* leftp */, - Multibuffer* /* rightp */ -); - -extern void XmbufClearBufferArea( - Display* /* dpy */, - Multibuffer /* buffer */, - int /* x */, - int /* y */, - unsigned int /* width */, - unsigned int /* height */, - Bool /* exposures */ -); - -_XFUNCPROTOEND - -#else - -#include "scrnintstr.h" - -typedef Bool (* mbInitFunc)(); - -struct _mbufScreen; /* declared in multibufst.h */ - -extern void RegisterMultibufferInit( - ScreenPtr /* pScreen */, - Bool (* /* bufMultibufferInit */)( - ScreenPtr /* pScreen */, - struct _mbufScreen * /* pMBScreen */ - ) -); - -struct xMbufBufferInfo; /* declared in multibufst.h */ - -extern void RegisterDoubleBufferHardware( - ScreenPtr /* pScreen */, - int /* nInfo */, - struct xMbufBufferInfo * /* pInfo */, - DevUnion * /* frameBuffer */, - DevUnion /* selectPlane */, - void (* /* CopyBufferBitsFunc */ )(), - void (* /* DrawSelectPlaneFunc */ )() -); - -extern int CreateImageBuffers ( - WindowPtr /* pWin */, - int /* nbuf */, - XID * /* ids */, - int /* action */, - int /* hint */ -); -extern void DestroyImageBuffers ( - WindowPtr /* pWin */ -); -extern int DisplayImageBuffers ( - XID * /* ids */, - int /* nbuf */ -); - -#endif /* _MULTIBUF_SERVER_ */ -#endif /* _MULTIBUF_H_ */ diff --git a/nx-X11/include/extensions/multibufst.h b/nx-X11/include/extensions/multibufst.h deleted file mode 100644 index 8469a16db..000000000 --- a/nx-X11/include/extensions/multibufst.h +++ /dev/null @@ -1,609 +0,0 @@ -/* - * $Xorg: multibufst.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ - * -Copyright 1989, 1998 The Open Group - -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. - -The above copyright notice and this permission notice 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 -OPEN GROUP 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. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - */ - -/* $XFree86: xc/include/extensions/multibufst.h,v 3.8 2001/12/19 21:37:29 dawes Exp $ */ - -#ifndef _MULTIBUFST_H_ -#define _MULTIBUFST_H_ - -/* - * Protocol requests constants and alignment values - */ - -#include "multibuf.h" -#ifdef _MULTIBUF_SERVER_ -#include "inputstr.h" -#endif - -#if !defined(UNIXCPP) || defined(ANSICPP) -#define MbufGetReq(name,req,info) GetReq (name, req); \ - req->reqType = info->codes->major_opcode; \ - req->mbufReqType = X_##name; -#else -#define MbufGetReq(name,req,info) GetReq (name, req); \ - req->reqType = info->codes->major_opcode; \ - req->mbufReqType = X_/**/name; -#endif - -#define Window CARD32 -#define Drawable CARD32 -#define VisualID CARD32 -#define Multibuffer CARD32 - -typedef struct xMbufBufferInfo { - CARD32 visualID B32; /* associated visual */ - CARD16 maxBuffers B16; /* maximum supported buffers */ - CARD8 depth; /* depth of visual (redundant) */ - CARD8 unused; -} xMbufBufferInfo; -#define sz_xMbufBufferInfo 8 - -typedef struct { - BYTE type; - BYTE unused; - CARD16 sequenceNumber B16; - CARD32 buffer B32; /* affected buffer */ - BYTE state; /* current status */ - CARD8 unused1; - CARD16 unused2 B16; - CARD32 unused3 B32; - CARD32 unused4 B32; - CARD32 unused5 B32; - CARD32 unused6 B32; - CARD32 unused7 B32; -} xMbufClobberNotifyEvent; - -typedef struct { - BYTE type; - BYTE unused; - CARD16 sequenceNumber B16; - CARD32 buffer B32; /* affected buffer */ - CARD32 timeStamp B32; /* update time */ - CARD32 unused1 B32; - CARD32 unused2 B32; - CARD32 unused3 B32; - CARD32 unused4 B32; - CARD32 unused5 B32; - CARD32 unused6 B32; -} xMbufUpdateNotifyEvent; - -typedef struct { - CARD8 reqType; /* always codes->major_opcode */ - CARD8 mbufReqType; /* always X_MbufGetBufferVersion */ - CARD16 length B16; -} xMbufGetBufferVersionReq; -#define sz_xMbufGetBufferVersionReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD8 majorVersion; /* major version of Multi-Buffering protocol */ - CARD8 minorVersion; /* minor version of Multi-Buffering protocol */ - CARD16 pad1 B16; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xMbufGetBufferVersionReply; -#define sz_xMbufGetBufferVersionReply 32 - -typedef struct { - CARD8 reqType; /* always codes->major_opcode */ - CARD8 mbufReqType; /* always X_MbufCreateImageBuffers */ - CARD16 length B16; - CARD32 window B32; /* associated window */ - CARD8 updateAction; /* action at update */ - CARD8 updateHint; /* hint as to frequency of updates */ - CARD16 unused; -} xMbufCreateImageBuffersReq; /* followed by buffer ids */ -#define sz_xMbufCreateImageBuffersReq 12 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 numberBuffer B16; /* number successfully allocated */ - CARD16 unused1 B16; - CARD32 unused2 B32; - CARD32 unused3 B32; - CARD32 unused4 B32; - CARD32 unused5 B32; - CARD32 unused6 B32; -} xMbufCreateImageBuffersReply; -#define sz_xMbufCreateImageBuffersReply 32 - -typedef struct { - CARD8 reqType; /* always codes->major_opcode */ - CARD8 mbufReqType; /* always X_MbufDestroyImageBuffers */ - CARD16 length B16; - CARD32 window B32; /* associated window */ -} xMbufDestroyImageBuffersReq; -#define sz_xMbufDestroyImageBuffersReq 8 - -typedef struct { - CARD8 reqType; /* always codes->major_opcode */ - CARD8 mbufReqType; /* always X_MbufDisplayImageBuffers */ - CARD16 length B16; - CARD16 minDelay B16; /* minimum time between last update and now */ - CARD16 maxDelay B16; /* maximum time between last update and now */ -} xMbufDisplayImageBuffersReq; /* followed by list of buffers */ -#define sz_xMbufDisplayImageBuffersReq 8 - -typedef struct { - CARD8 reqType; /* always codes->major_opcode */ - CARD8 mbufReqType; /* always X_MbufSetMBufferAttributes */ - CARD16 length B16; - CARD32 window B32; /* associated window */ - CARD32 valueMask B32; /* modified entries */ -} xMbufSetMBufferAttributesReq; /* followed by values */ -#define sz_xMbufSetMBufferAttributesReq 12 - -typedef struct { - CARD8 reqType; /* always codes->major_opcode */ - CARD8 mbufReqType; /* always X_MbufGetMBufferAttributes */ - CARD16 length B16; - CARD32 window B32; /* associated window */ -} xMbufGetMBufferAttributesReq; -#define sz_xMbufGetMBufferAttributesReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 displayedBuffer B16; /* currently visible buffer */ - CARD8 updateAction; - CARD8 updateHint; - CARD8 windowMode; - CARD8 unused0; - CARD16 unused1 B16; - CARD32 unused2 B32; - CARD32 unused3 B32; - CARD32 unused4 B32; - CARD32 unused5 B32; -} xMbufGetMBufferAttributesReply; -#define sz_xMbufGetMBufferAttributesReply 32 - -typedef struct { - CARD8 reqType; /* always codes->major_opcode */ - CARD8 mbufReqType; /* always X_MbufSetBufferAttributes */ - CARD16 length B16; - CARD32 buffer B32; - CARD32 valueMask B32; -} xMbufSetBufferAttributesReq; /* followed by values */ -#define sz_xMbufSetBufferAttributesReq 12 - -typedef struct { - CARD8 reqType; /* always codes->major_opcode */ - CARD8 mbufReqType; /* always X_MbufGetBufferAttributes */ - CARD16 length B16; - CARD32 buffer B32; -} xMbufGetBufferAttributesReq; -#define sz_xMbufGetBufferAttributesReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 window B32; - CARD32 eventMask B32; - CARD16 bufferIndex B16; - CARD8 side; - CARD8 unused0; - CARD32 unused1 B32; - CARD32 unused2 B32; - CARD32 unused3 B32; -} xMbufGetBufferAttributesReply; -#define sz_xMbufGetBufferAttributesReply 32 - -typedef struct { - CARD8 reqType; /* always codes->major_opcode */ - CARD8 mbufReqType; /* always X_MbufGetBufferInfo */ - CARD16 length B16; - Drawable drawable B32; -} xMbufGetBufferInfoReq; -#define sz_xMbufGetBufferInfoReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 normalInfo B16; - CARD16 stereoInfo B16; - CARD32 unused1 B32; - CARD32 unused2 B32; - CARD32 unused3 B32; - CARD32 unused4 B32; - CARD32 unused5 B32; -} xMbufGetBufferInfoReply; /* followed by buffer infos */ -#define sz_xMbufGetBufferInfoReply 32 - - -typedef struct { - CARD8 reqType; /* always codes->major_opcode */ - CARD8 mbufReqType; /* always X_MbufCreateStereoWindow */ - CARD16 length B16; - CARD8 unused0; - CARD8 unused1; - CARD8 unused2; - CARD8 depth; - Window wid B32; - Window parent B32; - Multibuffer left B32; /* associated buffers */ - Multibuffer right B32; - INT16 x B16; - INT16 y B16; - CARD16 width B16; - CARD16 height B16; - CARD16 borderWidth B16; -#if defined(__cplusplus) || defined(c_plusplus) - CARD16 c_class B16; -#else - CARD16 class B16; -#endif - VisualID visual B32; - CARD32 mask B32; -} xMbufCreateStereoWindowReq; /* followed by value list */ -#define sz_xMbufCreateStereoWindowReq 44 - -typedef struct { - CARD8 reqType; /* always codes->major_opcode */ - CARD8 mbufReqType; /* always X_MbufClearImageBufferArea */ - CARD16 length B16; - Multibuffer buffer B32; - INT16 x B16; - INT16 y B16; - CARD16 width B16; - CARD16 height B16; - CARD8 unused0; - CARD8 unused1; - CARD8 unused2; - BOOL exposures; -} xMbufClearImageBufferAreaReq; -#define sz_xMbufClearImageBufferAreaReq 20 - -#undef Window -#undef Drawable -#undef VisualID -#undef Multibuffer - - -#ifdef _MULTIBUF_SERVER_ -/* Macros for wrapping and unwrapping functions */ - -#define SWAP_FUNC_VECTOR(pSTRUCT1,pSTRUCT2,DATA_TYPE,FUNC_NAME) \ -{ \ - DATA_TYPE (* tmpFn)(); \ - \ - tmpFn = pSTRUCT1->FUNC_NAME; \ - pSTRUCT1->FUNC_NAME = pSTRUCT2->FUNC_NAME; \ - pSTRUCT2->FUNC_NAME = tmpFn; \ -} - -#if !defined(UNIXCPP) || defined(ANSICPP) -#define WRAP_SCREEN_FUNC(pSCREEN,pPRIV,FUNC_NAME, PRIV_FUNC_NAME) \ -{ \ - if ((pPRIV->funcsWrapped & FUNC_NAME##Mask) == 0) \ - { \ - pPRIV->FUNC_NAME = pSCREEN->FUNC_NAME; \ - pSCREEN->FUNC_NAME = PRIV_FUNC_NAME; \ - pPRIV->funcsWrapped |= FUNC_NAME##Mask; \ - } \ -} - -#define UNWRAP_SCREEN_FUNC(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME) \ -{ \ - SWAP_FUNC_VECTOR(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME); \ - pPRIV->funcsWrapped &= ~(FUNC_NAME##Mask); \ -} - -#define REWRAP_SCREEN_FUNC(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME) \ -{ \ - if (MB_SCREEN_PRIV(pSCREEN)->mbufWindowCount) \ - { \ - SWAP_FUNC_VECTOR(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME); \ - pPRIV->funcsWrapped |= FUNC_NAME##Mask; \ - } \ -} -#else -#define WRAP_SCREEN_FUNC(pSCREEN,pPRIV,FUNC_NAME, PRIV_FUNC_NAME) \ -{ \ - if ((pPRIV->funcsWrapped & FUNC_NAME/**/Mask) == 0) \ - { \ - pPRIV->FUNC_NAME = pSCREEN->FUNC_NAME; \ - pSCREEN->FUNC_NAME = PRIV_FUNC_NAME; \ - pPRIV->funcsWrapped |= FUNC_NAME/**/Mask; \ - } \ -} - -#define UNWRAP_SCREEN_FUNC(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME) \ -{ \ - SWAP_FUNC_VECTOR(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME); \ - pPRIV->funcsWrapped &= ~(FUNC_NAME/**/Mask); \ -} - -#define REWRAP_SCREEN_FUNC(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME) \ -{ \ - if (MB_SCREEN_PRIV(pSCREEN)->mbufWindowCount) \ - { \ - SWAP_FUNC_VECTOR(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME); \ - pPRIV->funcsWrapped |= FUNC_NAME/**/Mask; \ - } \ -} -#endif - -/* The _Multibuffer and _Multibuffers structures below refer to each other, - * so we need this forward declaration - */ -typedef struct _Multibuffers *MultibuffersPtr; - -/* - * per-Multibuffer data - */ - -typedef struct _Multibuffer { - MultibuffersPtr pMultibuffers; /* associated window data */ - Mask eventMask; /* MultibufferClobberNotifyMask|ExposureMask|MultibufferUpdateNotifyMask */ - Mask otherEventMask; /* mask of all other clients event masks */ - OtherClients *otherClients; /* other clients that want events */ - int number; /* index of this buffer into array */ - int side; /* always Mono */ - int clobber; /* Unclobbered, PartiallyClobbered, FullClobbered */ - PixmapPtr pPixmap; /* associated pixmap */ -} MultibufferRec, *MultibufferPtr; - -/* - * per-window data - */ - -typedef struct _Multibuffers { - WindowPtr pWindow; /* associated window */ - int numMultibuffer; /* count of buffers */ - int refcnt; /* ref count for delete */ - int displayedMultibuffer; /* currently active buffer */ - int updateAction; /* Undefined, Background, Untouched, Copied */ - int updateHint; /* Frequent, Intermittent, Static */ - int windowMode; /* always Mono */ - - TimeStamp lastUpdate; /* time of last update */ - - unsigned short width, height; /* last known window size */ - short x, y; /* for static gravity */ - - MultibufferPtr buffers; /* array of numMultibuffer buffers */ -} MultibuffersRec; - -/* - * per-screen data - */ -typedef struct _MultibufferScreen { - PositionWindowProcPtr PositionWindow; /* pWin, x,y */ -} MultibufferScreenRec, *MultibufferScreenPtr; - -/* - * per display-image-buffers request data. - */ - -typedef struct _DisplayRequest { - struct _DisplayRequest *next; - TimeStamp activateTime; - ClientPtr pClient; - XID id; -} DisplayRequestRec, *DisplayRequestPtr; - -#define DestroyWindowMask (1L<<0) -#define PositionWindowMask (1L<<1) -#define PostValidateTreeMask (1L<<2) -#define ClipNotifyMask (1L<<3) -#define WindowExposuresMask (1L<<4) -#define CopyWindowMask (1L<<5) -#define ClearToBackgroundMask (1L<<6) -#define ChangeWindowAttributesMask (1L<<7) - -extern int MultibufferScreenIndex; -extern int MultibufferWindowIndex; - -extern RESTYPE MultibufferDrawableResType; - -extern void MultibufferUpdate( /* pMbuffer, time */ - MultibufferPtr /* pMultibuffer */, - CARD32 /* time */ - ); -extern void MultibufferExpose( /* pMbuffer, pRegion */ - MultibufferPtr /* pMultibuffer */, - RegionPtr /* pRegion */ - ); -extern void MultibufferClobber( /* pMbuffer */ - MultibufferPtr /* pMultibuffer */ - ); - -typedef struct _mbufWindow *mbufWindowPtr; - -/* - * per-buffer data - */ - -#define MB_DISPLAYED_BUFFER(pMBWindow) \ - ((pMBWindow)->buffers + (pMBWindow)->displayedMultibuffer) - -typedef struct _mbufBuffer { - mbufWindowPtr pMBWindow; /* associated window data */ - Mask eventMask; /* client event mask */ - Mask otherEventMask; /* union of other clients' event masks */ - OtherClientsPtr otherClients; /* other clients that want events */ - int number; /* index of this buffer into array */ - int side; /* stero side: always Mono */ - int clobber; /* clober state */ - DrawablePtr pDrawable; /* associated drawable */ -} mbufBufferRec, *mbufBufferPtr; - - -/* - * per-window data - */ - -#define MB_WINDOW_PRIV(pWin) \ - ((mbufWindowPtr)((pWin)->devPrivates[MultibufferWindowIndex].ptr)) - -typedef struct _mbufWindow { - WindowPtr pWindow; /* associated window */ - int numMultibuffer; /* count of buffers */ - mbufBufferPtr buffers; /* array of (numMultibuffer) buffers */ - int displayedMultibuffer; /* currently active buffer */ - int updateAction; /* Undefined, Background, - Untouched, Copied */ - int updateHint; /* Frequent, Intermittent, Static */ - int windowMode; /* always Mono */ - TimeStamp lastUpdate; /* time of last update */ - short x, y; /* for static gravity */ - unsigned short width, height; /* last known window size */ - DevUnion devPrivate; -} mbufWindowRec; - - -/* - * per-screen data - */ - -#define MB_SCREEN_PRIV(pScreen) \ - ((mbufScreenPtr)((pScreen)->devPrivates[MultibufferScreenIndex].ptr)) - -typedef struct _mbufScreen { - long mbufWindowCount; /* count of multibuffered windows */ - - /* Wrap pScreen->DestroyWindow */ - DestroyWindowProcPtr DestroyWindow; - long funcsWrapped; /* flags which functions are wrapped */ - - /* Initialized by device-dependent section */ - int nInfo; /* number of buffer info rec's */ - xMbufBufferInfo *pInfo; /* buffer info (for Normal buffers) */ - - int (* CreateImageBuffers)( - WindowPtr /* pWin */, - int /* nbuf */, - XID * /* ids */, - int /* action */, - int /* hint */ - ); - void (* DestroyImageBuffers)( - WindowPtr /* pWin */ - ); - void (* DisplayImageBuffers)( - ScreenPtr /* pScreen */, - mbufBufferPtr * /* ppMBBuffer */, - mbufWindowPtr * /* ppMBWindow */, - int /* nbuf */ - ); - void (* ClearImageBufferArea)( - mbufBufferPtr /* pMBBuffer */, - short /* x */, - short /* y */, - unsigned short /* width */, - unsigned short /* height */, - Bool /* exposures */ - ); - Bool (* ChangeMBufferAttributes)( /* pMBWindow, vmask */ - /* FIXME */ - ); - Bool (* ChangeBufferAttributes)( /* pMBBuffer, vmask */ - /* FIXME */ - ); - void (* DeleteBufferDrawable)( - DrawablePtr /* pDrawable */ - ); - void (* WrapScreenFuncs)( - ScreenPtr /* pScreen */ - ); - void (* ResetProc)( - ScreenPtr /* pScreen */ - ); - DevUnion devPrivate; -} mbufScreenRec, *mbufScreenPtr; - - -/* Privates to mbufScreenRec */ - -#ifdef _MULTIBUF_PIXMAP_ -#define MB_SCREEN_PRIV_PIXMAP(pScreen) \ - ((mbufPixmapPrivPtr) MB_SCREEN_PRIV((pScreen))->devPrivate.ptr) - -typedef struct _mbufPixmapPriv -{ - /* Pointers to wrapped functions */ - PositionWindowProcPtr PositionWindow; /* pWin, x,y */ - long funcsWrapped; /* flags which functions are wrapped */ -} mbufPixmapPrivRec, *mbufPixmapPrivPtr; -#endif /* _MULTIBUF_PIXMAP_ */ - - -#ifdef _MULTIBUF_BUFFER_ - -extern int frameWindowPrivateIndex; - -#define MB_SCREEN_PRIV_BUFFER(pScreen) \ - ((mbufBufferPrivPtr) MB_SCREEN_PRIV((pScreen))->devPrivate.ptr) - -typedef struct _mbufBufferPriv -{ - DevUnion *frameBuffer; /* Array of screen framebuffers */ - DevUnion selectPlane; /* Plane(s) that select displayed buffer */ - - /* - * Note: subtractRgn and unionRgn may overlap. subtractRgn is a union - * of all the old clipLists of the windows that are displaying - * the backbuffer. unionRgn is the union of all the new clipLists - * of the same windows. - */ - - RegionRec backBuffer; /* Area of screen displaying back buffer */ - RegionRec subtractRgn; /* Regions lost to backBuffer */ - RegionRec unionRgn; /* Regions gained by backBuffer */ - Bool rgnChanged; /* TRUE if "backBuffer" needs to be updated */ - - void (* CopyBufferBits)(); /* pMBWindow, srcBufferNum, dstBufferNum */ - void (* DrawSelectPlane)(); /* pScreen, selectPlane, pRegion, bufferNum */ - - /* Pointers to wrapped functions */ - PostValidateTreeProcPtr PostValidateTree; /* pParent, pChild, kind */ - ClipNotifyProcPtr ClipNotify; /* pWin, dx, dy */ - WindowExposuresProcPtr WindowExposures; /* pWin, pRegion */ - CopyWindowProcPtr CopyWindow; /* pWin, oldPt, pOldRegion */ - ClearToBackgroundProcPtr ClearToBackground; /* pWin, x,y,w,h, sendExpose */ - ChangeWindowAttributesProcPtr ChangeWindowAttributes; /* pWin, vmask */ - long funcsWrapped; /* flags which functions are wrapped */ - unsigned inClearToBackground:1; /* used by WindowExposure */ -} mbufBufferPrivRec, *mbufBufferPrivPtr; -#endif /* _MULTIBUF_BUFFER_ */ - -#endif /* _MULTIBUF_SERVER_ */ -#endif /* _MULTIBUFST_H_ */ diff --git a/nx-X11/include/extensions/xf86dga.h b/nx-X11/include/extensions/xf86dga.h deleted file mode 100644 index d6e494158..000000000 --- a/nx-X11/include/extensions/xf86dga.h +++ /dev/null @@ -1,264 +0,0 @@ -/* - Copyright (c) 1999 XFree86 Inc -*/ -/* $XFree86: xc/include/extensions/xf86dga.h,v 3.20 1999/10/13 04:20:48 dawes Exp $ */ - -#ifndef _XF86DGA_H_ -#define _XF86DGA_H_ - -#include -#include - -#define X_XDGAQueryVersion 0 - -/* 1 through 9 are in xf86dga1.h */ - -/* 10 and 11 are reserved to avoid conflicts with rogue DGA extensions */ - -#define X_XDGAQueryModes 12 -#define X_XDGASetMode 13 -#define X_XDGASetViewport 14 -#define X_XDGAInstallColormap 15 -#define X_XDGASelectInput 16 -#define X_XDGAFillRectangle 17 -#define X_XDGACopyArea 18 -#define X_XDGACopyTransparentArea 19 -#define X_XDGAGetViewportStatus 20 -#define X_XDGASync 21 -#define X_XDGAOpenFramebuffer 22 -#define X_XDGACloseFramebuffer 23 -#define X_XDGASetClientVersion 24 -#define X_XDGAChangePixmapMode 25 -#define X_XDGACreateColormap 26 - - -#define XDGAConcurrentAccess 0x00000001 -#define XDGASolidFillRect 0x00000002 -#define XDGABlitRect 0x00000004 -#define XDGABlitTransRect 0x00000008 -#define XDGAPixmap 0x00000010 - -#define XDGAInterlaced 0x00010000 -#define XDGADoublescan 0x00020000 - -#define XDGAFlipImmediate 0x00000001 -#define XDGAFlipRetrace 0x00000002 - -#define XDGANeedRoot 0x00000001 - -#define XF86DGANumberEvents 7 - -#define XDGAPixmapModeLarge 0 -#define XDGAPixmapModeSmall 1 - -#define XF86DGAClientNotLocal 0 -#define XF86DGANoDirectVideoMode 1 -#define XF86DGAScreenNotActive 2 -#define XF86DGADirectNotActivated 3 -#define XF86DGAOperationNotSupported 4 -#define XF86DGANumberErrors (XF86DGAOperationNotSupported + 1) - - -typedef struct { - int num; /* A unique identifier for the mode (num > 0) */ - char *name; /* name of mode given in the XF86Config */ - float verticalRefresh; - int flags; /* DGA_CONCURRENT_ACCESS, etc... */ - int imageWidth; /* linear accessible portion (pixels) */ - int imageHeight; - int pixmapWidth; /* Xlib accessible portion (pixels) */ - int pixmapHeight; /* both fields ignored if no concurrent access */ - int bytesPerScanline; - int byteOrder; /* MSBFirst, LSBFirst */ - int depth; - int bitsPerPixel; - unsigned long redMask; - unsigned long greenMask; - unsigned long blueMask; - short visualClass; - int viewportWidth; - int viewportHeight; - int xViewportStep; /* viewport position granularity */ - int yViewportStep; - int maxViewportX; /* max viewport origin */ - int maxViewportY; - int viewportFlags; /* types of page flipping possible */ - int reserved1; - int reserved2; -} XDGAMode; - - -typedef struct { - XDGAMode mode; - unsigned char *data; - Pixmap pixmap; -} XDGADevice; - - -#ifndef _XF86DGA_SERVER_ -_XFUNCPROTOBEGIN - -typedef struct { - int type; - unsigned long serial; - Display *display; - int screen; - Time time; - unsigned int state; - unsigned int button; -} XDGAButtonEvent; - -typedef struct { - int type; - unsigned long serial; - Display *display; - int screen; - Time time; - unsigned int state; - unsigned int keycode; -} XDGAKeyEvent; - -typedef struct { - int type; - unsigned long serial; - Display *display; - int screen; - Time time; - unsigned int state; - int dx; - int dy; -} XDGAMotionEvent; - -typedef union { - int type; - XDGAButtonEvent xbutton; - XDGAKeyEvent xkey; - XDGAMotionEvent xmotion; - long pad[24]; -} XDGAEvent; - -Bool XDGAQueryExtension( - Display *dpy, - int *eventBase, - int *erroBase -); - -Bool XDGAQueryVersion( - Display *dpy, - int *majorVersion, - int *minorVersion -); - -XDGAMode* XDGAQueryModes( - Display *dpy, - int screen, - int *num -); - -XDGADevice* XDGASetMode( - Display *dpy, - int screen, - int mode -); - -Bool XDGAOpenFramebuffer( - Display *dpy, - int screen -); - -void XDGACloseFramebuffer( - Display *dpy, - int screen -); - -void XDGASetViewport( - Display *dpy, - int screen, - int x, - int y, - int flags -); - -void XDGAInstallColormap( - Display *dpy, - int screen, - Colormap cmap -); - -Colormap XDGACreateColormap( - Display *dpy, - int screen, - XDGADevice *device, - int alloc -); - -void XDGASelectInput( - Display *dpy, - int screen, - long event_mask -); - -void XDGAFillRectangle( - Display *dpy, - int screen, - int x, - int y, - unsigned int width, - unsigned int height, - unsigned long color -); - - -void XDGACopyArea( - Display *dpy, - int screen, - int srcx, - int srcy, - unsigned int width, - unsigned int height, - int dstx, - int dsty -); - - -void XDGACopyTransparentArea( - Display *dpy, - int screen, - int srcx, - int srcy, - unsigned int width, - unsigned int height, - int dstx, - int dsty, - unsigned long key -); - -int XDGAGetViewportStatus( - Display *dpy, - int screen -); - -void XDGASync( - Display *dpy, - int screen -); - -Bool XDGASetClientVersion( - Display *dpy -); - -void XDGAChangePixmapMode( - Display *dpy, - int screen, - int *x, - int *y, - int mode -); - - -void XDGAKeyEventToXKeyEvent(XDGAKeyEvent* dk, XKeyEvent* xk); - - -_XFUNCPROTOEND -#endif /* _XF86DGA_SERVER_ */ -#endif /* _XF86DGA_H_ */ diff --git a/nx-X11/include/extensions/xf86dga1.h b/nx-X11/include/extensions/xf86dga1.h deleted file mode 100644 index 972b18e9e..000000000 --- a/nx-X11/include/extensions/xf86dga1.h +++ /dev/null @@ -1,140 +0,0 @@ -/* $XFree86: xc/include/extensions/xf86dga1.h,v 1.2 1999/04/17 07:05:41 dawes Exp $ */ -/* - -Copyright (c) 1995 Jon Tombs -Copyright (c) 1995 XFree86 Inc - -*/ - -/************************************************************************ - - THIS IS THE OLD DGA API AND IS OBSOLETE. PLEASE DO NOT USE IT ANYMORE - -************************************************************************/ - -#ifndef _XF86DGA1_H_ -#define _XF86DGA1_H_ - -#include - -#define X_XF86DGAQueryVersion 0 -#define X_XF86DGAGetVideoLL 1 -#define X_XF86DGADirectVideo 2 -#define X_XF86DGAGetViewPortSize 3 -#define X_XF86DGASetViewPort 4 -#define X_XF86DGAGetVidPage 5 -#define X_XF86DGASetVidPage 6 -#define X_XF86DGAInstallColormap 7 -#define X_XF86DGAQueryDirectVideo 8 -#define X_XF86DGAViewPortChanged 9 - -#define XF86DGADirectPresent 0x0001 -#define XF86DGADirectGraphics 0x0002 -#define XF86DGADirectMouse 0x0004 -#define XF86DGADirectKeyb 0x0008 -#define XF86DGAHasColormap 0x0100 -#define XF86DGADirectColormap 0x0200 - - - - -#ifndef _XF86DGA_SERVER_ - -_XFUNCPROTOBEGIN - -Bool XF86DGAQueryVersion( - Display* /* dpy */, - int* /* majorVersion */, - int* /* minorVersion */ -); - -Bool XF86DGAQueryExtension( - Display* /* dpy */, - int* /* event_base */, - int* /* error_base */ -); - -Status XF86DGAGetVideoLL( - Display* /* dpy */, - int /* screen */, - int * /* base addr */, - int * /* width */, - int * /* bank_size */, - int * /* ram_size */ -); - -Status XF86DGAGetVideo( - Display* /* dpy */, - int /* screen */, - char ** /* base addr */, - int * /* width */, - int * /* bank_size */, - int * /* ram_size */ -); - -Status XF86DGADirectVideo( - Display* /* dpy */, - int /* screen */, - int /* enable */ -); - -Status XF86DGADirectVideoLL( - Display* /* dpy */, - int /* screen */, - int /* enable */ -); - -Status XF86DGAGetViewPortSize( - Display* /* dpy */, - int /* screen */, - int * /* width */, - int * /* height */ -); - -Status XF86DGASetViewPort( - Display* /* dpy */, - int /* screen */, - int x /* X */, - int y /* Y */ -); - -Status XF86DGAGetVidPage( - Display* /* dpy */, - int /* screen */, - int * /* vid page */ -); - -Status XF86DGASetVidPage( - Display* /* dpy */, - int /* screen */, - int /* vid page */ -); - -Status XF86DGAInstallColormap( - Display* /* dpy */, - int /* screen */, - Colormap /*Colormap */ -); - -int XF86DGAForkApp( - int screen -); - -Status XF86DGAQueryDirectVideo( - Display * /* dpy */, - int /* screen */, - int * /* flags */ -); - -Bool XF86DGAViewPortChanged( - Display * /* dpy */, - int /* screen */, - int /* n */ -); - - -_XFUNCPROTOEND - -#endif /* _XF86DGA_SERVER_ */ - -#endif /* _XF86DGA1_H_ */ diff --git a/nx-X11/include/extensions/xf86dga1str.h b/nx-X11/include/extensions/xf86dga1str.h deleted file mode 100644 index 0dfde9bc2..000000000 --- a/nx-X11/include/extensions/xf86dga1str.h +++ /dev/null @@ -1,194 +0,0 @@ -/* $XFree86: xc/include/extensions/xf86dga1str.h,v 1.1 1999/03/28 15:31:33 dawes Exp $ */ -/* - -Copyright (c) 1995 Jon Tombs -Copyright (c) 1995 XFree86 Inc. - -*/ - -#ifndef _XF86DGASTR1_H_ -#define _XF86DGASTR1_H_ - -typedef struct _XF86DGAQueryVersion { - CARD8 reqType; /* always DGAReqCode */ - CARD8 dgaReqType; /* always X_DGAQueryVersion */ - CARD16 length B16; -} xXF86DGAQueryVersionReq; -#define sz_xXF86DGAQueryVersionReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 majorVersion B16; /* major version of DGA protocol */ - CARD16 minorVersion B16; /* minor version of DGA protocol */ - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXF86DGAQueryVersionReply; -#define sz_xXF86DGAQueryVersionReply 32 - -typedef struct _XF86DGAGetVideoLL { - CARD8 reqType; /* always DGAReqCode */ - CARD8 dgaReqType; /* always X_XF86DGAGetVideoLL */ - CARD16 length B16; - CARD16 screen B16; - CARD16 pad B16; -} xXF86DGAGetVideoLLReq; -#define sz_xXF86DGAGetVideoLLReq 8 - -typedef struct _XF86DGAInstallColormap{ - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD16 screen B16; - CARD16 pad2; - CARD32 id B32; /* colormap. */ -} xXF86DGAInstallColormapReq; -#define sz_xXF86DGAInstallColormapReq 12 - - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 offset B32; - CARD32 width B32; - CARD32 bank_size B32; - CARD32 ram_size B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xXF86DGAGetVideoLLReply; -#define sz_xXF86DGAGetVideoLLReply 32 - -typedef struct _XF86DGADirectVideo { - CARD8 reqType; /* always DGAReqCode */ - CARD8 dgaReqType; /* always X_XF86DGADirectVideo */ - CARD16 length B16; - CARD16 screen B16; - CARD16 enable B16; -} xXF86DGADirectVideoReq; -#define sz_xXF86DGADirectVideoReq 8 - - -typedef struct _XF86DGAGetViewPortSize { - CARD8 reqType; /* always DGAReqCode */ - CARD8 dgaReqType; /* always X_XF86DGAGetViewPort */ - CARD16 length B16; - CARD16 screen B16; - CARD16 pad B16; -} xXF86DGAGetViewPortSizeReq; -#define sz_xXF86DGAGetViewPortSizeReq 8 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 width B32; - CARD32 height B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xXF86DGAGetViewPortSizeReply; -#define sz_xXF86DGAGetViewPortSizeReply 32 - -typedef struct _XF86DGASetViewPort { - CARD8 reqType; /* always DGAReqCode */ - CARD8 dgaReqType; /* always X_XF86DGASetViewPort */ - CARD16 length B16; - CARD16 screen B16; - CARD16 pad B16; - CARD32 x B32; - CARD32 y B32; -} xXF86DGASetViewPortReq; -#define sz_xXF86DGASetViewPortReq 16 - -typedef struct _XF86DGAGetVidPage { - CARD8 reqType; /* always DGAReqCode */ - CARD8 dgaReqType; /* always X_XF86DGAGetVidPage */ - CARD16 length B16; - CARD16 screen B16; - CARD16 pad B16; -} xXF86DGAGetVidPageReq; -#define sz_xXF86DGAGetVidPageReq 8 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 vpage B32; - CARD32 pad B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xXF86DGAGetVidPageReply; -#define sz_xXF86DGAGetVidPageReply 32 - - -typedef struct _XF86DGASetVidPage { - CARD8 reqType; /* always DGAReqCode */ - CARD8 dgaReqType; /* always X_XF86DGASetVidPage */ - CARD16 length B16; - CARD16 screen B16; - CARD16 vpage B16; -} xXF86DGASetVidPageReq; -#define sz_xXF86DGASetVidPageReq 8 - - -typedef struct _XF86DGAQueryDirectVideo { - CARD8 reqType; /* always DGAReqCode */ - CARD8 dgaReqType; /* always X_DGAQueryVersion */ - CARD16 length B16; - CARD16 screen B16; - CARD16 pad B16; -} xXF86DGAQueryDirectVideoReq; -#define sz_xXF86DGAQueryDirectVideoReq 8 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 flags B32; - CARD32 pad B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xXF86DGAQueryDirectVideoReply; -#define sz_xXF86DGAQueryDirectVideoReply 32 - - -typedef struct _XF86DGAViewPortChanged { - CARD8 reqType; /* always DGAReqCode */ - CARD8 dgaReqType; /* always X_DGAQueryVersion */ - CARD16 length B16; - CARD16 screen B16; - CARD16 n B16; -} xXF86DGAViewPortChangedReq; -#define sz_xXF86DGAViewPortChangedReq 8 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 result B32; - CARD32 pad B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xXF86DGAViewPortChangedReply; -#define sz_xXF86DGAViewPortChangedReply 32 - -#endif /* _XF86DGASTR1_H_ */ - diff --git a/nx-X11/include/extensions/xf86dgastr.h b/nx-X11/include/extensions/xf86dgastr.h deleted file mode 100644 index 30e4ff722..000000000 --- a/nx-X11/include/extensions/xf86dgastr.h +++ /dev/null @@ -1,344 +0,0 @@ -/* $XFree86: xc/include/extensions/xf86dgastr.h,v 3.13 2000/12/20 00:19:41 mvojkovi Exp $ */ -/* - -Copyright (c) 1995 Jon Tombs -Copyright (c) 1995 XFree86 Inc. - -*/ - -#ifndef _XF86DGASTR_H_ -#define _XF86DGASTR_H_ - -#include - -#define XF86DGANAME "XFree86-DGA" - -#define XDGA_MAJOR_VERSION 2 /* current version numbers */ -#define XDGA_MINOR_VERSION 0 - - -typedef struct _XDGAQueryVersion { - CARD8 reqType; /* always DGAReqCode */ - CARD8 dgaReqType; /* always X_DGAQueryVersion */ - CARD16 length B16; -} xXDGAQueryVersionReq; -#define sz_xXDGAQueryVersionReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 majorVersion B16; /* major version of DGA protocol */ - CARD16 minorVersion B16; /* minor version of DGA protocol */ - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXDGAQueryVersionReply; -#define sz_xXDGAQueryVersionReply 32 - -typedef struct _XDGAQueryModes { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; -} xXDGAQueryModesReq; -#define sz_xXDGAQueryModesReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 number B32; /* number of modes available */ - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXDGAQueryModesReply; -#define sz_xXDGAQueryModesReply 32 - - -typedef struct _XDGASetMode { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; - CARD32 mode B32; /* mode number to init */ - CARD32 pid B32; /* Pixmap descriptor */ -} xXDGASetModeReq; -#define sz_xXDGASetModeReq 16 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 offset B32; /* offset into framebuffer map */ - CARD32 flags B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xXDGASetModeReply; -#define sz_xXDGASetModeReply 32 - -typedef struct { - CARD8 byte_order; - CARD8 depth; - CARD16 num B16; - CARD16 bpp B16; - CARD16 name_size B16; - CARD32 vsync_num B32; - CARD32 vsync_den B32; - CARD32 flags B32; - CARD16 image_width B16; - CARD16 image_height B16; - CARD16 pixmap_width B16; - CARD16 pixmap_height B16; - CARD32 bytes_per_scanline B32; - CARD32 red_mask B32; - CARD32 green_mask B32; - CARD32 blue_mask B32; - CARD16 visual_class B16; - CARD16 pad1 B16; - CARD16 viewport_width B16; - CARD16 viewport_height B16; - CARD16 viewport_xstep B16; - CARD16 viewport_ystep B16; - CARD16 viewport_xmax B16; - CARD16 viewport_ymax B16; - CARD32 viewport_flags B32; - CARD32 reserved1 B32; - CARD32 reserved2 B32; -} xXDGAModeInfo; -#define sz_xXDGAModeInfo 72 - -typedef struct _XDGAOpenFramebuffer { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; -} xXDGAOpenFramebufferReq; -#define sz_xXDGAOpenFramebufferReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; /* device name size if there is one */ - CARD32 mem1 B32; /* physical memory */ - CARD32 mem2 B32; /* spillover for _alpha_ */ - CARD32 size B32; /* size of map in bytes */ - CARD32 offset B32; /* optional offset into device */ - CARD32 extra B32; /* extra info associated with the map */ - CARD32 pad2 B32; -} xXDGAOpenFramebufferReply; -#define sz_xXDGAOpenFramebufferReply 32 - - -typedef struct _XDGACloseFramebuffer { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; -} xXDGACloseFramebufferReq; -#define sz_xXDGACloseFramebufferReq 8 - - -typedef struct _XDGASetViewport { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; - CARD16 x B16; - CARD16 y B16; - CARD32 flags B32; -} xXDGASetViewportReq; -#define sz_xXDGASetViewportReq 16 - - -typedef struct _XDGAInstallColormap { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; - CARD32 cmap B32; -} xXDGAInstallColormapReq; -#define sz_xXDGAInstallColormapReq 12 - -typedef struct _XDGASelectInput { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; - CARD32 mask B32; -} xXDGASelectInputReq; -#define sz_xXDGASelectInputReq 12 - -typedef struct _XDGAFillRectangle { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; - CARD16 x B16; - CARD16 y B16; - CARD16 width B16; - CARD16 height B16; - CARD32 color B32; -} xXDGAFillRectangleReq; -#define sz_xXDGAFillRectangleReq 20 - - -typedef struct _XDGACopyArea { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; - CARD16 srcx B16; - CARD16 srcy B16; - CARD16 width B16; - CARD16 height B16; - CARD16 dstx B16; - CARD16 dsty B16; -} xXDGACopyAreaReq; -#define sz_xXDGACopyAreaReq 20 - -typedef struct _XDGACopyTransparentArea { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; - CARD16 srcx B16; - CARD16 srcy B16; - CARD16 width B16; - CARD16 height B16; - CARD16 dstx B16; - CARD16 dsty B16; - CARD32 key B32; -} xXDGACopyTransparentAreaReq; -#define sz_xXDGACopyTransparentAreaReq 24 - - -typedef struct _XDGAGetViewportStatus { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; -} xXDGAGetViewportStatusReq; -#define sz_xXDGAGetViewportStatusReq 8 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 status B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXDGAGetViewportStatusReply; -#define sz_xXDGAGetViewportStatusReply 32 - -typedef struct _XDGASync { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; -} xXDGASyncReq; -#define sz_xXDGASyncReq 8 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; - CARD32 pad7 B32; -} xXDGASyncReply; -#define sz_xXDGASyncReply 32 - -typedef struct _XDGASetClientVersion { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD16 major B16; - CARD16 minor B16; -} xXDGASetClientVersionReq; -#define sz_xXDGASetClientVersionReq 8 - - -typedef struct { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; - CARD16 x B16; - CARD16 y B16; - CARD32 flags B32; -} xXDGAChangePixmapModeReq; -#define sz_xXDGAChangePixmapModeReq 16 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 x B16; - CARD16 y B16; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; - CARD32 pad7 B32; -} xXDGAChangePixmapModeReply; -#define sz_xXDGAChangePixmapModeReply 32 - -typedef struct _XDGACreateColormap { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; - CARD32 id B32; - CARD32 mode B32; - CARD8 alloc; - CARD8 pad1; - CARD16 pad2; -} xXDGACreateColormapReq; -#define sz_xXDGACreateColormapReq 20 - - -typedef struct { - union { - struct { - BYTE type; - BYTE detail; - CARD16 sequenceNumber B16; - } u; - struct { - CARD32 pad0 B32; - CARD32 time B32; - INT16 dx B16; - INT16 dy B16; - INT16 screen B16; - CARD16 state B16; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - } event; - } u; -} dgaEvent; - - -#endif /* _XF86DGASTR_H_ */ - diff --git a/nx-X11/include/extensions/xf86misc.h b/nx-X11/include/extensions/xf86misc.h deleted file mode 100644 index fb01a6357..000000000 --- a/nx-X11/include/extensions/xf86misc.h +++ /dev/null @@ -1,172 +0,0 @@ -/* $XFree86: xc/include/extensions/xf86misc.h,v 3.16 2002/11/20 04:04:56 dawes Exp $ */ - -/* - * Copyright (c) 1995, 1996 The XFree86 Project, Inc - */ - -/* THIS IS NOT AN X CONSORTIUM STANDARD */ - -#ifndef _XF86MISC_H_ -#define _XF86MISC_H_ - -#include - -#define X_XF86MiscQueryVersion 0 -#ifdef _XF86MISC_SAVER_COMPAT_ -#define X_XF86MiscGetSaver 1 -#define X_XF86MiscSetSaver 2 -#endif -#define X_XF86MiscGetMouseSettings 3 -#define X_XF86MiscGetKbdSettings 4 -#define X_XF86MiscSetMouseSettings 5 -#define X_XF86MiscSetKbdSettings 6 -#define X_XF86MiscSetGrabKeysState 7 -#define X_XF86MiscSetClientVersion 8 -#define X_XF86MiscGetFilePaths 9 -#define X_XF86MiscPassMessage 10 - -#define XF86MiscNumberEvents 0 - -#define XF86MiscBadMouseProtocol 0 -#define XF86MiscBadMouseBaudRate 1 -#define XF86MiscBadMouseFlags 2 -#define XF86MiscBadMouseCombo 3 -#define XF86MiscBadKbdType 4 -#define XF86MiscModInDevDisabled 5 -#define XF86MiscModInDevClientNotLocal 6 -#define XF86MiscNoModule 7 -#define XF86MiscNumberErrors (XF86MiscNoModule + 1) - -/* Never renumber these */ -#define MTYPE_MICROSOFT 0 -#define MTYPE_MOUSESYS 1 -#define MTYPE_MMSERIES 2 -#define MTYPE_LOGITECH 3 -#define MTYPE_BUSMOUSE 4 -#define MTYPE_LOGIMAN 5 -#define MTYPE_PS_2 6 -#define MTYPE_MMHIT 7 -#define MTYPE_GLIDEPOINT 8 -#define MTYPE_IMSERIAL 9 -#define MTYPE_THINKING 10 -#define MTYPE_IMPS2 11 -#define MTYPE_THINKINGPS2 12 -#define MTYPE_MMANPLUSPS2 13 -#define MTYPE_GLIDEPOINTPS2 14 -#define MTYPE_NETPS2 15 -#define MTYPE_NETSCROLLPS2 16 -#define MTYPE_SYSMOUSE 17 -#define MTYPE_AUTOMOUSE 18 -#define MTYPE_ACECAD 19 -#define MTYPE_EXPPS2 20 - -#define MTYPE_XQUEUE 127 -#define MTYPE_OSMOUSE 126 -#define MTYPE_UNKNOWN 125 - -#define KTYPE_UNKNOWN 0 -#define KTYPE_84KEY 1 -#define KTYPE_101KEY 2 -#define KTYPE_OTHER 3 -#define KTYPE_XQUEUE 4 - -#define MF_CLEAR_DTR 1 -#define MF_CLEAR_RTS 2 -#define MF_REOPEN 128 - -#ifndef _XF86MISC_SERVER_ - -/* return values for XF86MiscSetGrabKeysState */ -#define MiscExtGrabStateSuccess 0 /* No errors */ -#define MiscExtGrabStateLocked 1 /* A client already requested that - * grabs cannot be removed/killed */ -#define MiscExtGrabStateAlready 2 /* Request for enabling/disabling - * grab removeal/kill already done */ - -_XFUNCPROTOBEGIN - -typedef struct { - char* device; - int type; - int baudrate; - int samplerate; - int resolution; - int buttons; - Bool emulate3buttons; - int emulate3timeout; - Bool chordmiddle; - int flags; -} XF86MiscMouseSettings; - -typedef struct { - int type; - int rate; - int delay; - Bool servnumlock; -} XF86MiscKbdSettings; - -typedef struct { - char* configfile; - char* modulepath; - char* logfile; -} XF86MiscFilePaths; - -Bool XF86MiscQueryVersion( - Display* /* dpy */, - int* /* majorVersion */, - int* /* minorVersion */ -); - -Bool XF86MiscQueryExtension( - Display* /* dpy */, - int* /* event_base */, - int* /* error_base */ -); - -Bool XF86MiscSetClientVersion( - Display *dpy /* dpy */ -); - -Status XF86MiscGetMouseSettings( - Display* /* dpy */, - XF86MiscMouseSettings* /* mouse info */ -); - -Status XF86MiscGetKbdSettings( - Display* /* dpy */, - XF86MiscKbdSettings* /* keyboard info */ -); - -Status XF86MiscSetMouseSettings( - Display* /* dpy */, - XF86MiscMouseSettings* /* mouse info */ -); - -Status XF86MiscSetKbdSettings( - Display* /* dpy */, - XF86MiscKbdSettings* /* keyboard info */ -); - -int XF86MiscSetGrabKeysState( - Display* /* dpy */, - Bool /* enabled */ -); - -Status XF86MiscGetFilePaths( - Display* /* dpy */, - XF86MiscFilePaths* /* file paths/locations */ -); - -Status XF86MiscPassMessage( - Display* /* dpy */, - int /* screen */, - const char* /* message name/type */, - const char* /* message contents/value */, - char ** /* returned message */ -); - -_XFUNCPROTOEND - -#endif - -#endif diff --git a/nx-X11/include/extensions/xf86mscstr.h b/nx-X11/include/extensions/xf86mscstr.h deleted file mode 100644 index 2b8c0d07e..000000000 --- a/nx-X11/include/extensions/xf86mscstr.h +++ /dev/null @@ -1,238 +0,0 @@ -/* $XFree86: xc/include/extensions/xf86mscstr.h,v 3.12 2002/11/20 04:04:56 dawes Exp $ */ - -/* - * Copyright (c) 1995, 1996 The XFree86 Project, Inc - */ - -/* THIS IS NOT AN X CONSORTIUM STANDARD */ - -#ifndef _XF86MISCSTR_H_ -#define _XF86MISCSTR_H_ - -#include - -#define XF86MISCNAME "XFree86-Misc" - -#define XF86MISC_MAJOR_VERSION 0 /* current version numbers */ -#define XF86MISC_MINOR_VERSION 9 - -typedef struct _XF86MiscQueryVersion { - CARD8 reqType; /* always XF86MiscReqCode */ - CARD8 xf86miscReqType; /* always X_XF86MiscQueryVersion */ - CARD16 length B16; -} xXF86MiscQueryVersionReq; -#define sz_xXF86MiscQueryVersionReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 majorVersion B16; /* major version of XFree86-Misc */ - CARD16 minorVersion B16; /* minor version of XFree86-Misc */ - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXF86MiscQueryVersionReply; -#define sz_xXF86MiscQueryVersionReply 32 - -#ifdef _XF86MISC_SAVER_COMPAT_ -typedef struct _XF86MiscGetSaver { - CARD8 reqType; /* always XF86MiscReqCode */ - CARD8 xf86miscReqType; /* always X_XF86MiscGetSaver */ - CARD16 length B16; - CARD16 screen B16; - CARD16 pad B16; -} xXF86MiscGetSaverReq; -#define sz_xXF86MiscGetSaverReq 8 - -typedef struct _XF86MiscSetSaver { - CARD8 reqType; /* always XF86MiscReqCode */ - CARD8 xf86miscReqType; /* always X_XF86MiscSetSaver */ - CARD16 length B16; - CARD16 screen B16; - CARD16 pad B16; - CARD32 suspendTime B32; - CARD32 offTime B32; -} xXF86MiscSetSaverReq; -#define sz_xXF86MiscSetSaverReq 16 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 suspendTime B32; - CARD32 offTime B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xXF86MiscGetSaverReply; -#define sz_xXF86MiscGetSaverReply 32 -#endif - -typedef struct _XF86MiscGetMouseSettings { - CARD8 reqType; /* always XF86MiscReqCode */ - CARD8 xf86miscReqType; /* always X_XF86MiscGetMouseSettings */ - CARD16 length B16; -} xXF86MiscGetMouseSettingsReq; -#define sz_xXF86MiscGetMouseSettingsReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 mousetype B32; - CARD32 baudrate B32; - CARD32 samplerate B32; - CARD32 resolution B32; - CARD32 buttons B32; - BOOL emulate3buttons; - BOOL chordmiddle; - CARD16 pad2 B16; - CARD32 emulate3timeout B32; - CARD32 flags B32; - CARD32 devnamelen B32; /* strlen(device)+1 */ -} xXF86MiscGetMouseSettingsReply; -#define sz_xXF86MiscGetMouseSettingsReply 44 - -typedef struct _XF86MiscGetKbdSettings { - CARD8 reqType; /* always XF86MiscReqCode */ - CARD8 xf86miscReqType; /* always X_XF86MiscGetKbdSettings */ - CARD16 length B16; -} xXF86MiscGetKbdSettingsReq; -#define sz_xXF86MiscGetKbdSettingsReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 kbdtype B32; - CARD32 rate B32; - CARD32 delay B32; - BOOL servnumlock; - BOOL pad2; - CARD16 pad3 B16; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xXF86MiscGetKbdSettingsReply; -#define sz_xXF86MiscGetKbdSettingsReply 32 - -typedef struct _XF86MiscSetMouseSettings { - CARD8 reqType; /* always XF86MiscReqCode */ - CARD8 xf86miscReqType; /* always X_XF86MiscSetMouseSettings */ - CARD16 length B16; - CARD32 mousetype B32; - CARD32 baudrate B32; - CARD32 samplerate B32; - CARD32 resolution B32; - CARD32 buttons B32; - BOOL emulate3buttons; - BOOL chordmiddle; - CARD16 devnamelen B16; - CARD32 emulate3timeout B32; - CARD32 flags B32; -} xXF86MiscSetMouseSettingsReq; -#define sz_xXF86MiscSetMouseSettingsReq 36 - -typedef struct _XF86MiscSetKbdSettings { - CARD8 reqType; /* always XF86MiscReqCode */ - CARD8 xf86miscReqType; /* always X_XF86MiscSetKbdSettings */ - CARD16 length B16; - CARD32 kbdtype B32; - CARD32 rate B32; - CARD32 delay B32; - BOOL servnumlock; - BOOL pad1; - CARD16 pad2 B16; -} xXF86MiscSetKbdSettingsReq; -#define sz_xXF86MiscSetKbdSettingsReq 20 - -typedef struct _XF86MiscSetGrabKeysState { - CARD8 reqType; /* always XF86MiscReqCode */ - CARD8 xf86miscReqType; /* always X_XF86MiscSetKbdSettings */ - CARD16 length B16; - BOOL enable; - BOOL pad1; - CARD16 pad2 B16; -} xXF86MiscSetGrabKeysStateReq; -#define sz_xXF86MiscSetGrabKeysStateReq 8 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 status B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXF86MiscSetGrabKeysStateReply; -#define sz_xXF86MiscSetGrabKeysStateReply 32 - -typedef struct _XF86MiscSetClientVersion { - CARD8 reqType; /* always XF86MiscReqCode */ - CARD8 xf86miscReqType; - CARD16 length B16; - CARD16 major B16; - CARD16 minor B16; -} xXF86MiscSetClientVersionReq; -#define sz_xXF86MiscSetClientVersionReq 8 - -typedef struct _XF86MiscGetFilePaths { - CARD8 reqType; /* always XF86MiscReqCode */ - CARD8 xf86miscReqType; /* always X_XF86MiscGetFilePaths */ - CARD16 length B16; -} xXF86MiscGetFilePathsReq; -#define sz_xXF86MiscGetFilePathsReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 configlen B16; - CARD16 modulelen B16; - CARD16 loglen B16; - CARD16 pad2 B16; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXF86MiscGetFilePathsReply; -#define sz_xXF86MiscGetFilePathsReply 32 - -typedef struct _XF86MiscPassMessage { - CARD8 reqType; /* always XF86MiscReqCode */ - CARD8 xf86miscReqType; /* always X_XF86MiscPassMessage */ - CARD16 length B16; - CARD16 typelen B16; - CARD16 vallen B16; - CARD16 screen B16; - CARD16 pad B16; -} xXF86MiscPassMessageReq; -#define sz_xXF86MiscPassMessageReq 12 - -typedef struct { - BYTE type; /* X_Reply */ - BYTE pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 mesglen B16; - CARD16 pad2 B16; - CARD32 status B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXF86MiscPassMessageReply; -#define sz_xXF86MiscPassMessageReply 32 - -#endif /* _XF86MISCSTR_H_ */ diff --git a/nx-X11/include/extensions/xf86vmode.h b/nx-X11/include/extensions/xf86vmode.h deleted file mode 100644 index 624820dea..000000000 --- a/nx-X11/include/extensions/xf86vmode.h +++ /dev/null @@ -1,322 +0,0 @@ -/* $XFree86: xc/include/extensions/xf86vmode.h,v 3.30 2001/05/07 20:09:50 mvojkovi Exp $ */ -/* - -Copyright 1995 Kaleb S. KEITHLEY - -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 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 Kaleb S. KEITHLEY 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. - -Except as contained in this notice, the name of Kaleb S. KEITHLEY -shall not be used in advertising or otherwise to promote the sale, use -or other dealings in this Software without prior written authorization -from Kaleb S. KEITHLEY - -*/ -/* $Xorg: xf86vmode.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ */ - -/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */ - -#ifndef _XF86VIDMODE_H_ -#define _XF86VIDMODE_H_ - -#include -#include - -#define X_XF86VidModeQueryVersion 0 -#define X_XF86VidModeGetModeLine 1 -#define X_XF86VidModeModModeLine 2 -#define X_XF86VidModeSwitchMode 3 -#define X_XF86VidModeGetMonitor 4 -#define X_XF86VidModeLockModeSwitch 5 -#define X_XF86VidModeGetAllModeLines 6 -#define X_XF86VidModeAddModeLine 7 -#define X_XF86VidModeDeleteModeLine 8 -#define X_XF86VidModeValidateModeLine 9 -#define X_XF86VidModeSwitchToMode 10 -#define X_XF86VidModeGetViewPort 11 -#define X_XF86VidModeSetViewPort 12 -/* new for version 2.x of this extension */ -#define X_XF86VidModeGetDotClocks 13 -#define X_XF86VidModeSetClientVersion 14 -#define X_XF86VidModeSetGamma 15 -#define X_XF86VidModeGetGamma 16 -#define X_XF86VidModeGetGammaRamp 17 -#define X_XF86VidModeSetGammaRamp 18 -#define X_XF86VidModeGetGammaRampSize 19 -#define X_XF86VidModeGetPermissions 20 - -#define CLKFLAG_PROGRAMABLE 1 - -#ifdef XF86VIDMODE_EVENTS -#define XF86VidModeNotify 0 -#define XF86VidModeNumberEvents (XF86VidModeNotify + 1) - -#define XF86VidModeNotifyMask 0x00000001 - -#define XF86VidModeNonEvent 0 -#define XF86VidModeModeChange 1 -#else -#define XF86VidModeNumberEvents 0 -#endif - -#define XF86VidModeBadClock 0 -#define XF86VidModeBadHTimings 1 -#define XF86VidModeBadVTimings 2 -#define XF86VidModeModeUnsuitable 3 -#define XF86VidModeExtensionDisabled 4 -#define XF86VidModeClientNotLocal 5 -#define XF86VidModeZoomLocked 6 -#define XF86VidModeNumberErrors (XF86VidModeZoomLocked + 1) - -#define XF86VM_READ_PERMISSION 1 -#define XF86VM_WRITE_PERMISSION 2 - -#ifndef _XF86VIDMODE_SERVER_ - -typedef struct { - unsigned short hdisplay; - unsigned short hsyncstart; - unsigned short hsyncend; - unsigned short htotal; - unsigned short hskew; - unsigned short vdisplay; - unsigned short vsyncstart; - unsigned short vsyncend; - unsigned short vtotal; - unsigned int flags; - int privsize; -#if defined(__cplusplus) || defined(c_plusplus) - /* private is a C++ reserved word */ - INT32 *c_private; -#else - INT32 *private; -#endif -} XF86VidModeModeLine; - -typedef struct { - unsigned int dotclock; - unsigned short hdisplay; - unsigned short hsyncstart; - unsigned short hsyncend; - unsigned short htotal; - unsigned short hskew; - unsigned short vdisplay; - unsigned short vsyncstart; - unsigned short vsyncend; - unsigned short vtotal; - unsigned int flags; - int privsize; -#if defined(__cplusplus) || defined(c_plusplus) - /* private is a C++ reserved word */ - INT32 *c_private; -#else - INT32 *private; -#endif -} XF86VidModeModeInfo; - -typedef struct { - float hi; - float lo; -} XF86VidModeSyncRange; - -typedef struct { - char* vendor; - char* model; - float EMPTY; - unsigned char nhsync; - XF86VidModeSyncRange* hsync; - unsigned char nvsync; - XF86VidModeSyncRange* vsync; -} XF86VidModeMonitor; - -typedef struct { - int type; /* of event */ - unsigned long serial; /* # of last request processed by server */ - Bool send_event; /* true if this came from a SendEvent req */ - Display *display; /* Display the event was read from */ - Window root; /* root window of event screen */ - int state; /* What happened */ - int kind; /* What happened */ - Bool forced; /* extents of new region */ - Time time; /* event timestamp */ -} XF86VidModeNotifyEvent; - -typedef struct { - float red; /* Red Gamma value */ - float green; /* Green Gamma value */ - float blue; /* Blue Gamma value */ -} XF86VidModeGamma; - - -#define XF86VidModeSelectNextMode(disp, scr) \ - XF86VidModeSwitchMode(disp, scr, 1) -#define XF86VidModeSelectPrevMode(disp, scr) \ - XF86VidModeSwitchMode(disp, scr, -1) - -_XFUNCPROTOBEGIN - -Bool XF86VidModeQueryVersion( - Display* /* dpy */, - int* /* majorVersion */, - int* /* minorVersion */ -); - -Bool XF86VidModeQueryExtension( - Display* /* dpy */, - int* /* event_base */, - int* /* error_base */ -); - -Bool XF86VidModeSetClientVersion( - Display* /* dpy */ -); - -Bool XF86VidModeGetModeLine( - Display* /* dpy */, - int /* screen */, - int* /* dotclock */, - XF86VidModeModeLine* /* modeline */ -); - -Bool XF86VidModeGetAllModeLines( - Display* /* dpy */, - int /* screen */, - int* /* modecount */, - XF86VidModeModeInfo*** /* modelinesPtr */ -); - -Bool XF86VidModeAddModeLine( - Display* /* dpy */, - int /* screen */, - XF86VidModeModeInfo* /* new modeline */, - XF86VidModeModeInfo* /* after modeline */ -); - -Bool XF86VidModeDeleteModeLine( - Display* /* dpy */, - int /* screen */, - XF86VidModeModeInfo* /* modeline */ -); - -Bool XF86VidModeModModeLine( - Display* /* dpy */, - int /* screen */, - XF86VidModeModeLine* /* modeline */ -); - -Status XF86VidModeValidateModeLine( - Display* /* dpy */, - int /* screen */, - XF86VidModeModeInfo* /* modeline */ -); - -Bool XF86VidModeSwitchMode( - Display* /* dpy */, - int /* screen */, - int /* zoom */ -); - -Bool XF86VidModeSwitchToMode( - Display* /* dpy */, - int /* screen */, - XF86VidModeModeInfo* /* modeline */ -); - -Bool XF86VidModeLockModeSwitch( - Display* /* dpy */, - int /* screen */, - int /* lock */ -); - -Bool XF86VidModeGetMonitor( - Display* /* dpy */, - int /* screen */, - XF86VidModeMonitor* /* monitor */ -); - -Bool XF86VidModeGetViewPort( - Display* /* dpy */, - int /* screen */, - int* /* x return */, - int* /* y return */ -); - -Bool XF86VidModeSetViewPort( - Display* /* dpy */, - int /* screen */, - int /* x */, - int /* y */ -); - -Bool XF86VidModeGetDotClocks( - Display* /* dpy */, - int /* screen */, - int* /* flags return */, - int* /* number of clocks return */, - int* /* max dot clock return */, - int** /* clocks return */ -); - -Bool XF86VidModeGetGamma( - Display* /* dpy */, - int /* screen */, - XF86VidModeGamma* /* Gamma */ -); - -Bool XF86VidModeSetGamma( - Display* /* dpy */, - int /* screen */, - XF86VidModeGamma* /* Gamma */ -); - -Bool XF86VidModeSetGammaRamp( - Display* /* dpy */, - int /* screen */, - int /* size */, - unsigned short* /* red array */, - unsigned short* /* green array */, - unsigned short* /* blue array */ -); - -Bool XF86VidModeGetGammaRamp( - Display* /* dpy */, - int /* screen */, - int /* size */, - unsigned short* /* red array */, - unsigned short* /* green array */, - unsigned short* /* blue array */ -); - -Bool XF86VidModeGetGammaRampSize( - Display* /* dpy */, - int /* screen */, - int* /* size */ -); - -Bool XF86VidModeGetPermissions( - Display* /* dpy */, - int /* screen */, - int* /* permissions */ -); - -_XFUNCPROTOEND - -#endif - -#endif diff --git a/nx-X11/include/extensions/xf86vmstr.h b/nx-X11/include/extensions/xf86vmstr.h deleted file mode 100644 index 43c67980f..000000000 --- a/nx-X11/include/extensions/xf86vmstr.h +++ /dev/null @@ -1,562 +0,0 @@ -/* $XFree86: xc/include/extensions/xf86vmstr.h,v 3.27 2001/08/01 00:44:36 tsi Exp $ */ -/* - -Copyright 1995 Kaleb S. KEITHLEY - -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 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 Kaleb S. KEITHLEY 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. - -Except as contained in this notice, the name of Kaleb S. KEITHLEY -shall not be used in advertising or otherwise to promote the sale, use -or other dealings in this Software without prior written authorization -from Kaleb S. KEITHLEY - -*/ -/* $Xorg: xf86vmstr.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ */ - -/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */ - -#ifndef _XF86VIDMODESTR_H_ -#define _XF86VIDMODESTR_H_ - -#include - -#define XF86VIDMODENAME "XFree86-VidModeExtension" - -#define XF86VIDMODE_MAJOR_VERSION 2 /* current version numbers */ -#define XF86VIDMODE_MINOR_VERSION 2 -/* - * major version 0 == uses parameter-to-wire functions in XFree86 libXxf86vm. - * major version 1 == uses parameter-to-wire functions hard-coded in xvidtune - * client. - * major version 2 == uses new protocol version in XFree86 4.0. - */ - -typedef struct _XF86VidModeQueryVersion { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; /* always X_XF86VidModeQueryVersion */ - CARD16 length B16; -} xXF86VidModeQueryVersionReq; -#define sz_xXF86VidModeQueryVersionReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 majorVersion B16; /* major version of XF86VidMode */ - CARD16 minorVersion B16; /* minor version of XF86VidMode */ - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXF86VidModeQueryVersionReply; -#define sz_xXF86VidModeQueryVersionReply 32 - -typedef struct _XF86VidModeGetModeLine { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; - CARD16 length B16; - CARD16 screen B16; - CARD16 pad B16; -} xXF86VidModeGetModeLineReq, - xXF86VidModeGetAllModeLinesReq, - xXF86VidModeGetMonitorReq, - xXF86VidModeGetViewPortReq, - xXF86VidModeGetDotClocksReq, - xXF86VidModeGetPermissionsReq; -#define sz_xXF86VidModeGetModeLineReq 8 -#define sz_xXF86VidModeGetAllModeLinesReq 8 -#define sz_xXF86VidModeGetMonitorReq 8 -#define sz_xXF86VidModeGetViewPortReq 8 -#define sz_xXF86VidModeGetDotClocksReq 8 -#define sz_xXF86VidModeGetPermissionsReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 dotclock B32; - CARD16 hdisplay B16; - CARD16 hsyncstart B16; - CARD16 hsyncend B16; - CARD16 htotal B16; - CARD16 hskew B16; - CARD16 vdisplay B16; - CARD16 vsyncstart B16; - CARD16 vsyncend B16; - CARD16 vtotal B16; - CARD16 pad2 B16; - CARD32 flags B32; - CARD32 reserved1 B32; - CARD32 reserved2 B32; - CARD32 reserved3 B32; - CARD32 privsize B32; -} xXF86VidModeGetModeLineReply; -#define sz_xXF86VidModeGetModeLineReply 52 - -/* 0.x version */ -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 dotclock B32; - CARD16 hdisplay B16; - CARD16 hsyncstart B16; - CARD16 hsyncend B16; - CARD16 htotal B16; - CARD16 vdisplay B16; - CARD16 vsyncstart B16; - CARD16 vsyncend B16; - CARD16 vtotal B16; - CARD32 flags B32; - CARD32 privsize B32; -} xXF86OldVidModeGetModeLineReply; -#define sz_xXF86OldVidModeGetModeLineReply 36 - -typedef struct { - CARD32 dotclock B32; - CARD16 hdisplay B16; - CARD16 hsyncstart B16; - CARD16 hsyncend B16; - CARD16 htotal B16; - CARD32 hskew B16; - CARD16 vdisplay B16; - CARD16 vsyncstart B16; - CARD16 vsyncend B16; - CARD16 vtotal B16; - CARD16 pad1 B16; - CARD32 flags B32; - CARD32 reserved1 B32; - CARD32 reserved2 B32; - CARD32 reserved3 B32; - CARD32 privsize B32; -} xXF86VidModeModeInfo; - -/* 0.x version */ -typedef struct { - CARD32 dotclock B32; - CARD16 hdisplay B16; - CARD16 hsyncstart B16; - CARD16 hsyncend B16; - CARD16 htotal B16; - CARD16 vdisplay B16; - CARD16 vsyncstart B16; - CARD16 vsyncend B16; - CARD16 vtotal B16; - CARD32 flags B32; - CARD32 privsize B32; -} xXF86OldVidModeModeInfo; - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 modecount B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXF86VidModeGetAllModeLinesReply; -#define sz_xXF86VidModeGetAllModeLinesReply 32 - -typedef struct _XF86VidModeAddModeLine { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; /* always X_XF86VidModeAddMode */ - CARD16 length B16; - CARD32 screen B32; /* could be CARD16 but need the pad */ - CARD32 dotclock B32; - CARD16 hdisplay B16; - CARD16 hsyncstart B16; - CARD16 hsyncend B16; - CARD16 htotal B16; - CARD16 hskew B16; - CARD16 vdisplay B16; - CARD16 vsyncstart B16; - CARD16 vsyncend B16; - CARD16 vtotal B16; - CARD16 pad1 B16; - CARD32 flags B32; - CARD32 reserved1 B32; - CARD32 reserved2 B32; - CARD32 reserved3 B32; - CARD32 privsize B32; - CARD32 after_dotclock B32; - CARD16 after_hdisplay B16; - CARD16 after_hsyncstart B16; - CARD16 after_hsyncend B16; - CARD16 after_htotal B16; - CARD16 after_hskew B16; - CARD16 after_vdisplay B16; - CARD16 after_vsyncstart B16; - CARD16 after_vsyncend B16; - CARD16 after_vtotal B16; - CARD16 pad2 B16; - CARD32 after_flags B32; - CARD32 reserved4 B32; - CARD32 reserved5 B32; - CARD32 reserved6 B32; -} xXF86VidModeAddModeLineReq; -#define sz_xXF86VidModeAddModeLineReq 92 - -/* 0.x version */ -typedef struct _XF86OldVidModeAddModeLine { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; /* always X_XF86VidModeAddMode */ - CARD16 length B16; - CARD32 screen B32; /* could be CARD16 but need the pad */ - CARD32 dotclock B32; - CARD16 hdisplay B16; - CARD16 hsyncstart B16; - CARD16 hsyncend B16; - CARD16 htotal B16; - CARD16 vdisplay B16; - CARD16 vsyncstart B16; - CARD16 vsyncend B16; - CARD16 vtotal B16; - CARD32 flags B32; - CARD32 privsize B32; - CARD32 after_dotclock B32; - CARD16 after_hdisplay B16; - CARD16 after_hsyncstart B16; - CARD16 after_hsyncend B16; - CARD16 after_htotal B16; - CARD16 after_vdisplay B16; - CARD16 after_vsyncstart B16; - CARD16 after_vsyncend B16; - CARD16 after_vtotal B16; - CARD32 after_flags B32; -} xXF86OldVidModeAddModeLineReq; -#define sz_xXF86OldVidModeAddModeLineReq 60 - -typedef struct _XF86VidModeModModeLine { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; /* always X_XF86VidModeModModeLine */ - CARD16 length B16; - CARD32 screen B32; /* could be CARD16 but need the pad */ - CARD16 hdisplay B16; - CARD16 hsyncstart B16; - CARD16 hsyncend B16; - CARD16 htotal B16; - CARD16 hskew B16; - CARD16 vdisplay B16; - CARD16 vsyncstart B16; - CARD16 vsyncend B16; - CARD16 vtotal B16; - CARD16 pad1 B16; - CARD32 flags B32; - CARD32 reserved1 B32; - CARD32 reserved2 B32; - CARD32 reserved3 B32; - CARD32 privsize B32; -} xXF86VidModeModModeLineReq; -#define sz_xXF86VidModeModModeLineReq 48 - -/* 0.x version */ -typedef struct _XF86OldVidModeModModeLine { - CARD8 reqType; /* always XF86OldVidModeReqCode */ - CARD8 xf86vidmodeReqType; /* always X_XF86OldVidModeModModeLine */ - CARD16 length B16; - CARD32 screen B32; /* could be CARD16 but need the pad */ - CARD16 hdisplay B16; - CARD16 hsyncstart B16; - CARD16 hsyncend B16; - CARD16 htotal B16; - CARD16 vdisplay B16; - CARD16 vsyncstart B16; - CARD16 vsyncend B16; - CARD16 vtotal B16; - CARD32 flags B32; - CARD32 privsize B32; -} xXF86OldVidModeModModeLineReq; -#define sz_xXF86OldVidModeModModeLineReq 32 - -typedef struct _XF86VidModeValidateModeLine { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; - CARD16 length B16; - CARD32 screen B32; /* could be CARD16 but need the pad */ - CARD32 dotclock B32; - CARD16 hdisplay B16; - CARD16 hsyncstart B16; - CARD16 hsyncend B16; - CARD16 htotal B16; - CARD16 hskew B16; - CARD16 vdisplay B16; - CARD16 vsyncstart B16; - CARD16 vsyncend B16; - CARD16 vtotal B16; - CARD16 pad1 B16; - CARD32 flags B32; - CARD32 reserved1 B32; - CARD32 reserved2 B32; - CARD32 reserved3 B32; - CARD32 privsize B32; -} xXF86VidModeDeleteModeLineReq, - xXF86VidModeValidateModeLineReq, - xXF86VidModeSwitchToModeReq; -#define sz_xXF86VidModeDeleteModeLineReq 52 -#define sz_xXF86VidModeValidateModeLineReq 52 -#define sz_xXF86VidModeSwitchToModeReq 52 - -/* 0.x version */ -typedef struct _XF86OldVidModeValidateModeLine { - CARD8 reqType; /* always XF86OldVidModeReqCode */ - CARD8 xf86vidmodeReqType; - CARD16 length B16; - CARD32 screen B32; /* could be CARD16 but need the pad */ - CARD32 dotclock B32; - CARD16 hdisplay B16; - CARD16 hsyncstart B16; - CARD16 hsyncend B16; - CARD16 htotal B16; - CARD16 vdisplay B16; - CARD16 vsyncstart B16; - CARD16 vsyncend B16; - CARD16 vtotal B16; - CARD32 flags B32; - CARD32 privsize B32; -} xXF86OldVidModeDeleteModeLineReq, - xXF86OldVidModeValidateModeLineReq, - xXF86OldVidModeSwitchToModeReq; -#define sz_xXF86OldVidModeDeleteModeLineReq 36 -#define sz_xXF86OldVidModeValidateModeLineReq 36 -#define sz_xXF86OldVidModeSwitchToModeReq 36 - -typedef struct _XF86VidModeSwitchMode { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; /* always X_XF86VidModeSwitchMode */ - CARD16 length B16; - CARD16 screen B16; - CARD16 zoom B16; -} xXF86VidModeSwitchModeReq; -#define sz_xXF86VidModeSwitchModeReq 8 - -typedef struct _XF86VidModeLockModeSwitch { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; /* always X_XF86VidModeLockModeSwitch */ - CARD16 length B16; - CARD16 screen B16; - CARD16 lock B16; -} xXF86VidModeLockModeSwitchReq; -#define sz_xXF86VidModeLockModeSwitchReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 status B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXF86VidModeValidateModeLineReply; -#define sz_xXF86VidModeValidateModeLineReply 32 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD8 vendorLength; - CARD8 modelLength; - CARD8 nhsync; - CARD8 nvsync; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXF86VidModeGetMonitorReply; -#define sz_xXF86VidModeGetMonitorReply 32 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 x B32; - CARD32 y B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xXF86VidModeGetViewPortReply; -#define sz_xXF86VidModeGetViewPortReply 32 - -typedef struct _XF86VidModeSetViewPort { - CARD8 reqType; /* always VidModeReqCode */ - CARD8 xf86vidmodeReqType; /* always X_XF86VidModeSetViewPort */ - CARD16 length B16; - CARD16 screen B16; - CARD16 pad B16; - CARD32 x B32; - CARD32 y B32; -} xXF86VidModeSetViewPortReq; -#define sz_xXF86VidModeSetViewPortReq 16 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 flags B32; - CARD32 clocks B32; - CARD32 maxclocks B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; -} xXF86VidModeGetDotClocksReply; -#define sz_xXF86VidModeGetDotClocksReply 32 - -typedef struct _XF86VidModeSetClientVersion { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; - CARD16 length B16; - CARD16 major B16; - CARD16 minor B16; -} xXF86VidModeSetClientVersionReq; -#define sz_xXF86VidModeSetClientVersionReq 8 - -typedef struct _XF86VidModeGetGamma { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; - CARD16 length B16; - CARD16 screen B16; - CARD16 pad B16; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXF86VidModeGetGammaReq; -#define sz_xXF86VidModeGetGammaReq 32 - -typedef struct { - BYTE type; - BOOL pad; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 red B32; - CARD32 green B32; - CARD32 blue B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; -} xXF86VidModeGetGammaReply; -#define sz_xXF86VidModeGetGammaReply 32 - -typedef struct _XF86VidModeSetGamma { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; - CARD16 length B16; - CARD16 screen B16; - CARD16 pad B16; - CARD32 red B32; - CARD32 green B32; - CARD32 blue B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; -} xXF86VidModeSetGammaReq; -#define sz_xXF86VidModeSetGammaReq 32 - - -typedef struct _XF86VidModeSetGammaRamp { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; - CARD16 length B16; - CARD16 screen B16; - CARD16 size B16; -} xXF86VidModeSetGammaRampReq; -#define sz_xXF86VidModeSetGammaRampReq 8 - -typedef struct _XF86VidModeGetGammaRamp { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; - CARD16 length B16; - CARD16 screen B16; - CARD16 size B16; -} xXF86VidModeGetGammaRampReq; -#define sz_xXF86VidModeGetGammaRampReq 8 - -typedef struct { - BYTE type; - BOOL pad; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 size B16; - CARD16 pad0 B16; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xXF86VidModeGetGammaRampReply; -#define sz_xXF86VidModeGetGammaRampReply 32 - -typedef struct _XF86VidModeGetGammaRampSize { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; - CARD16 length B16; - CARD16 screen B16; - CARD16 pad B16; -} xXF86VidModeGetGammaRampSizeReq; -#define sz_xXF86VidModeGetGammaRampSizeReq 8 - -typedef struct { - BYTE type; - BOOL pad; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 size B16; - CARD16 pad0 B16; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xXF86VidModeGetGammaRampSizeReply; -#define sz_xXF86VidModeGetGammaRampSizeReply 32 - -typedef struct { - BYTE type; - BOOL pad; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 permissions B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xXF86VidModeGetPermissionsReply; -#define sz_xXF86VidModeGetPermissionsReply 32 - - -#endif /* _XF86VIDMODESTR_H_ */ - diff --git a/nx-X11/include/extensions/xtrapbits.h b/nx-X11/include/extensions/xtrapbits.h deleted file mode 100644 index 1189dc7d3..000000000 --- a/nx-X11/include/extensions/xtrapbits.h +++ /dev/null @@ -1,83 +0,0 @@ -/* $XFree86$ */ -/* - * This include file is designed to be a portable way for systems to define - * bit field manipulation of arrays of bits. - */ -#ifndef __XTRAPBITS__ -#define __XTRAPBITS__ "@(#)xtrapbits.h 1.6 - 90/09/18 " - -/***************************************************************************** -Copyright 1987, 1988, 1989, 1990, 1994 by Digital Equipment Corporation, -Maynard, MA - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -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 Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL 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. - -*****************************************************************************/ -/* - * - * CONTRIBUTORS: - * - * Dick Annicchiarico - * Robert Chesler - * Dan Coutu - * Gene Durso - * Marc Evans - * Alan Jamison - * Mark Henry - * Ken Miller - * - */ -typedef unsigned char *UByteP; /* Pointer to an unsigned byte array */ -#define BitsInByte 8L /* The number of bits in a byte */ - -#define BitInByte(bit) /* Returns the bit mask of a byte */ \ - (1L << (((bit) % BitsInByte))) - -#define BitInWord(bit) /* Returns the bit mask of a word */ \ - (1L << (((bit) % (BitsInByte * 2L)))) - -#define BitInLong(bit) /* Returns the bit mask of a long */ \ - (1L << (((bit) % (BitsInByte * 4L)))) - -#define ByteInArray(array,bit) /* Returns the byte offset to get to a bit */ \ - (((UByteP)(array))[(bit) / BitsInByte]) - -#define BitIsTrue(array,bit) /* Test to see if a specific bit is True */ \ - (ByteInArray(array,bit) & BitInByte(bit)) - -#define BitIsFalse(array,bit) /* Test to see if a specific bit is False */ \ - (!(BitIsTrue(array,bit))) - -#define BitTrue(array,bit) /* Set a specific bit to be True */ \ - (ByteInArray(array,bit) |= BitInByte(bit)) - -#define BitFalse(array,bit) /* Set a specific bit to be False */ \ - (ByteInArray(array,bit) &= ~BitInByte(bit)) - -#define BitToggle(array,bit) /* Toggle a specific bit */ \ - (ByteInArray(array,bit) ^= BitInByte(bit)) - -#define BitCopy(dest,src,bit) /* Copy a specific bit */ \ - BitIsTrue((src),(bit)) ? BitTrue((dest),(bit)) : BitFalse((dest),(bit)) - -#define BitValue(array,bit) /* Return True or False depending on bit */ \ - (BitIsTrue((array),(bit)) ? True : False) - -#define BitSet(array,bit,value) /* Set bit to given value in array */ \ - (value) ? BitTrue((array),(bit)) : BitFalse((array),(bit)) - -#endif /* __XTRAPBITS__ */ diff --git a/nx-X11/include/extensions/xtrapddmi.h b/nx-X11/include/extensions/xtrapddmi.h deleted file mode 100644 index 71df0712d..000000000 --- a/nx-X11/include/extensions/xtrapddmi.h +++ /dev/null @@ -1,115 +0,0 @@ -/* $XFree86$ */ - -#ifndef __XTRAPDDMI__ -#define __XTRAPDDMI__ - -/***************************************************************************** -Copyright 1987, 1988, 1989, 1990, 1991 by Digital Equipment Corp., Maynard, MA - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -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 Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL 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. - -*****************************************************************************/ -/* - * - * CONTRIBUTORS: - * - * Dick Annicchiarico - * Robert Chesler - * Dan Coutu - * Gene Durso - * Marc Evans - * Alan Jamison - * Mark Henry - * Ken Miller - * - * DESCRIPTION: - * This header file is used by the XTrap server extension only - * (not used by clients or the XTrap Toolkit). Information - * contained herein should *not* be visible to clients (xtrapdi.h - * is used for this). The name is historical. - */ -#include -#include -#include "dix.h" - -#ifndef MIN -# define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif -#ifndef MAX -# define MAX(a,b) ((a) > (b) ? (a) : (b)) -#endif - -#define XETrapNumEvents 1L /* constants used for AddExtension */ - -/* Other constants used within the extension code */ -#define XETrapMinRepSize 32L /* Minimum number of longs */ - -/* This structure will be globally declared to provide storage to hold - * the various extension wide configuration information. Allocated on - * a per-client basis. - */ -typedef struct -{ - ClientPtr client; /* Multi-client support and error handling */ - xXTrapGetCurReply cur; /* Struct of Miscellaneous state info */ - xXTrapGetStatsReply *stats; /* Pointer to stat's, malloc'd if requested */ - CARD32 last_input_time B32; /* last timestamp from input event */ - CARD16 protocol B16; /* current communication protocol */ -} XETrapEnv; - -#define XETrapSetHeaderEvent(phdr) ((phdr)->type = 0x1L) -#define XETrapSetHeaderRequest(phdr) ((phdr)->type = 0x2L) -#define XETrapSetHeaderSpecial(phdr) ((phdr)->type = 0x3L) -#define XETrapSetHeaderCursor(phdr) ((phdr)->type = 0x4L) -#define XETrapSetHeaderReply(phdr) ((phdr)->type = 0x5L) - -#ifndef vaxc -#define globaldef -#define globalref extern -#endif - -/* Extension platform identifier (conditionally defined) */ -#if ( defined (__osf__) && defined(__alpha) ) -# define XETrapPlatform PF_DECOSF1 -#endif -#ifdef ultrix -# define XETrapPlatform PF_DECUltrix -#endif -#ifdef vms -#ifdef VAXELN -# define XETrapPlatform PF_DECELN -#else -# define XETrapPlatform PF_DECVMS -#endif -#endif -#ifdef VT1000 -# define XETrapPlatform PF_DECVT1000 -#endif -#ifdef VXT -# define XETrapPlatform PF_DECXTerm -#endif -#ifdef PC -# define XETrapPlatform PF_IBMAT -#endif -#ifdef sun -# define XETrapPlatform PF_SunSparc -#endif -#ifndef XETrapPlatform -# define XETrapPlatform PF_Other -#endif /* XETrapPlatform */ - -#endif /* __XTRAPDDMI__ */ diff --git a/nx-X11/include/extensions/xtrapdi.h b/nx-X11/include/extensions/xtrapdi.h deleted file mode 100644 index 34696113d..000000000 --- a/nx-X11/include/extensions/xtrapdi.h +++ /dev/null @@ -1,507 +0,0 @@ -/* $XFree86$ */ -#ifndef __XTRAPDI__ -#define __XTRAPDI__ - -/***************************************************************************** -Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1994 by Digital Equipment Corp., -Maynard, MA - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -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 Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL 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. - -*****************************************************************************/ -/* - * - * CONTRIBUTORS: - * - * Dick Annicchiarico - * Robert Chesler - * Dan Coutu - * Gene Durso - * Marc Evans - * Alan Jamison - * Mark Henry - * Ken Miller - * - * DESCRIPTION: - * This header file defines the common structures/constants - * between the XTrap extension and clients. All protocol - * definitions between XTrap extension/clients can be found - * here. - */ - -#define NEED_REPLIES -#define NEED_EVENTS -#ifndef IN_MODULE -#include -#endif -#include -#include -#ifdef SMT -#define NEED_EVENTS -#define NEED_REPLIES -#endif -#include -#include -#define XTrapExtName "DEC-XTRAP" -/* Current Release, Version, and Revision of the XTrap Extension */ -#define XETrapRelease 3L -#define XETrapVersion 4L -#ifndef XETrapRevision /* Changed from the Makefile by users */ -# define XETrapRevision 0L -#endif /* XETrapRevision */ -#define XETrapProtocol 32L - -#ifndef SIZEOF -# ifdef __STDC__ -# define SIZEOF(x) sz_##x -# else -# define SIZEOF(x) sz_/**/x -# endif /* if ANSI C compiler else not */ -#endif -#ifndef sz_CARD32 -#define sz_CARD32 4L -#endif -#ifndef sz_CARD8 -#define sz_CARD8 1L -#endif -#ifndef True -# define True 1L -# define False 0L -#endif - -typedef int (*int_function)(); -typedef void (*void_function)(); - -/* This is used as flags to indicate desired request traps - * Note: This has been padded to a CARD32 to keep structure aligned - */ -#define XETrapMaxRequest (((SIZEOF(CARD32)+((256L-1L) / \ - (BitsInByte*SIZEOF(CARD8))))/SIZEOF(CARD32))*SIZEOF(CARD32)) -typedef CARD8 ReqFlags[XETrapMaxRequest]; - -/* This is used as flags to indicate desired event traps - * Until events become *fully vectored*, we'll have to fake it - * by defining an array of 5 events (KeyPress, KeyRelease, - * ButtonPress, ButtonRelease, and MotionNotify. The extra 2 - * are required as the event types start with "2" (errors and - * replies are 0 & 1). The event type is the index into the - * bits. - * Note: This has been padded to a longword to keep structure aligned - */ -#ifndef VECTORED_EVENTS -#define XETrapCoreEvents (2L+5L) -#else -#define XETrapCoreEvents 128L -#endif -#define XETrapMaxEvent (((SIZEOF(CARD32)+((XETrapCoreEvents-1L) / \ - (BitsInByte*SIZEOF(CARD8))))/SIZEOF(CARD32))*SIZEOF(CARD32)) -typedef CARD8 EventFlags[XETrapMaxEvent]; - -/* This structure is used in a request to specify the types of - * configuration information that should be changed or updated. - */ -typedef struct -{ - CARD8 valid[4L]; /* Bits TRUE indicates data field is used */ - CARD8 data[4L]; /* Bits looked at if corresponding valid bit set */ - ReqFlags req; /* Bits coorespond to core requests */ - EventFlags event; /* Bits correspond to core events */ -} XETrapFlags; - -/* Bit definitions for the above XETrapFlags structure. */ -#define XETrapTimestamp 0L /* hdr timestamps desired */ -#define XETrapCmd 1L /* command key specified */ -#define XETrapCmdKeyMod 2L /* cmd key is a modifier */ -#define XETrapRequest 3L /* output requests array */ -#define XETrapEvent 4L /* future output events array */ -#define XETrapMaxPacket 5L /* Maximum packet length set */ -#define XETrapTransOut 6L /* obsolete */ -#define XETrapStatistics 7L /* collect counts on requests */ -#define XETrapWinXY 8L /* Fill in Window (X,Y) in hdr */ -#define XETrapTransIn 9L /* obsolete */ -#define XETrapCursor 10L /* Trap cursor state changes */ -#define XETrapXInput 11L /* Use XInput extension */ -#define XETrapVectorEvents 12L /* Use Vectored Events (128) */ -#define XETrapColorReplies 13L /* Return replies with Color Req's */ -#define XETrapGrabServer 14L /* Disables client GrabServers */ - -typedef struct /* used by XEConfigRequest */ -{ - XETrapFlags flags; /* Flags to specify what should be chg'd */ - CARD16 max_pkt_size B16; /* Maximum number of bytes in a packet */ - CARD8 cmd_key; /* Keyboard command_key (KeyCode) */ -/* - * cmd_key is intentionally *not* defined KeyCode since it's definition is - * ambiguous (int in Intrinsic.h and unsigned char in X.h. - */ - CARD8 pad[1L]; /* pad out to a quadword */ -} XETrapCfg; - -/* These structures are used within the Xtrap request structure for - * the various types of xtrap request - */ -#ifndef _XINPUT -/* (see the definition of XEvent as a reference) */ -typedef struct /* used by XESimulateXEventRequest for synthesizing core evts */ -{ - CARD8 type; /* (must be first) as in XEvent */ - CARD8 detail; /* Detail keycode/button as in XEvent */ - CARD8 screen; /* screen number (0 to n) */ - CARD8 pad; /* pad to longword */ - INT16 x B16; /* X & Y coord as in XEvent */ - INT16 y B16; -} XETrapInputReq; -#endif - -/* These are constants that refer to the extension request vector table. - * A request will use these values as minor opcodes. - */ -#define XETrap_Reset 0L /* set to steady state */ -#define XETrap_GetAvailable 1L /* get available funct from ext */ -#define XETrap_Config 2L /* configure extension */ -#define XETrap_StartTrap 3L /* use Trapping */ -#define XETrap_StopTrap 4L /* stop using Trapping */ -#define XETrap_GetCurrent 5L /* get current info from ext */ -#define XETrap_GetStatistics 6L /* get count statistics from ext */ -#ifndef _XINPUT -#define XETrap_SimulateXEvent 7L /* async input simulation */ -#endif -#define XETrap_GetVersion 8L /* Get (Just) Version */ -#define XETrap_GetLastInpTime 9L /* Get Timestamp of last client input */ - -/* The following are formats of a request to the XTRAP - * extension. The data-less XTrap requests all use xXTrapReq - */ -typedef struct -{ - CARD8 reqType; - CARD8 minor_opcode; - CARD16 length B16; - CARD32 pad B32; /* Maintain quadword alignment */ -} xXTrapReq; -/* the following works because all fields are defined as bit (Bnn) fields */ -#define sz_xXTrapReq (sizeof(xXTrapReq)) -/* For retrieving version/available info (passes lib-side protocol number) */ -typedef struct -{ - CARD8 reqType; - CARD8 minor_opcode; - CARD16 length B16; - CARD16 protocol B16; /* The xtrap extension protocol number */ - CARD16 pad B16; /* Maintain quadword alignment */ -} xXTrapGetReq; -/* the following works because all fields are defined as bit (Bnn) fields */ -#define sz_xXTrapGetReq (sizeof(xXTrapGetReq)) - -typedef struct -{ - CARD8 reqType; - CARD8 minor_opcode; - CARD16 length B16; - /* - * The follwing is done so that structure padding wont be - * a problem. The request structure contains a shadow for - * the XETrapCfg structure. Since the XETrapCfg also has a - * substructure (XETrapFlags) this structure is also shadowed. - * - * The following are a shadow of the XETrapFlags - * structure. - */ - CARD8 config_flags_valid[4L]; - CARD8 config_flags_data[4L]; - ReqFlags config_flags_req; - EventFlags config_flags_event; - /* End Shadow (XETrapFlags)*/ - CARD16 config_max_pkt_size B16; /* Max number of bytes in a packet */ - CARD8 config_cmd_key; /* Keyboard command_key (KeyCode) */ -/* - * cmd_key is intentionally *not* defined KeyCode since it's definition is - * ambiguous (int in Intrinsic.h and unsigned char in X.h. - */ - CARD8 config_pad[1L]; /* pad out to a quadword */ - /* End Shadow (XETrapCfg) */ - CARD32 pad B32; /* Maintain quadword alignment */ -} xXTrapConfigReq; -/* the following works because all fields are defined as bit (Bnn) fields */ -#define sz_xXTrapConfigReq (sizeof(xXTrapConfigReq)) - -#ifndef _XINPUT -typedef struct -{ - CARD8 reqType; - CARD8 minor_opcode; - CARD16 length B16; - CARD32 pad B32; /* Maintain quadword alignment */ - XETrapInputReq input; -} xXTrapInputReq; -/* the following works because all fields are defined as bit (Bnn) fields */ -#define sz_xXTrapInputReq (sizeof(xXTrapInputReq)) -#endif - - -/* The following structures are used by the server extension to send - * information and replies to the client. - */ - -/* header for all X replies */ -typedef struct -{ - CARD8 type; - CARD8 detail; - CARD16 sequenceNumber B16; - CARD32 length B32; -} XETrapRepHdr; - -/* Structure of Get Available Functionality reply */ -typedef struct -{ - CARD32 pf_ident B32; /* Contains constant identifying the platform */ - CARD16 xtrap_release B16; /* The xtrap extension release number */ - CARD16 xtrap_version B16; /* The xtrap extension version number */ - CARD16 xtrap_revision B16; /* The xtrap extension revision number */ - CARD16 max_pkt_size B16; /* Maximum number of bytes in a packet */ - CARD8 valid[4]; /* What specific configuration flags are valid */ - CARD32 major_opcode B32; /* The major opcode identifying xtrap */ - CARD32 event_base B32; /* The event value we start at */ - CARD32 pad0 B32; /* obsolete field */ - CARD16 pad1 B16, pad2 B16, pad3 B16; /* obsolete field */ - CARD16 xtrap_protocol B16; /* The xtrap extension protocol number */ - INT16 cur_x B16; /* Current X & Y coord for relative motion */ - INT16 cur_y B16; -} XETrapGetAvailRep; - -typedef struct -{ - CARD16 xtrap_release B16; /* The xtrap extension release number */ - CARD16 xtrap_version B16; /* The xtrap extension version number */ - CARD16 xtrap_revision B16; /* The xtrap extension revision number */ - CARD16 xtrap_protocol B16; /* The xtrap extension protocol number */ -} XETrapGetVersRep; - -typedef struct -{ - CARD32 last_time B32; /* Timestamp of last input time */ -} XETrapGetLastInpTimeRep; - -/* Structure of Get Current Configuration Information reply */ -typedef struct -{ - CARD8 state_flags[2]; /* Miscelaneous flags, see below #define's */ - CARD16 pad0 B16; /* Assure quadword alignment */ - XETrapCfg config; /* Current Config information */ - CARD32 pad1 B32; -} XETrapGetCurRep; - -/* Mask definitions for the above flags. */ -#define XETrapTrapActive 0L /* If sending/receiving between client/ext */ - -/* Structure of Get Statistics Information reply */ -typedef struct -{ - CARD32 requests[256L]; /* Array containing request counts if trapped */ - CARD32 events[XETrapCoreEvents]; /* Array containing event stats */ -#ifndef VECTORED_EVENTS - CARD32 pad B32; /* Pad out to a quadword */ -#endif -} XETrapGetStatsRep; - -#define PF_Other 0L /* server not one of the below */ -#define PF_Apollo 10L /* server on Apollo system */ -#define PF_ATT 20L /* server on AT&T system */ -#define PF_Cray1 30L /* server on Cray 1 system */ -#define PF_Cray2 31L /* server on Cray 2 system */ -#define PF_DECUltrix 40L /* server on DEC ULTRIX system */ -#define PF_DECVMS 41L /* server on DEC VMS system */ -#define PF_DECVT1000 42L /* server on DEC-VT1000-terminal */ -#define PF_DECXTerm 43L /* server on DEC-X-terminal */ -#define PF_DECELN 44L /* server on DEC VAXELN X terminal */ -#define PF_DECOSF1 45L /* server on DEC's OSF/1 system */ -#define PF_HP9000s800 50L /* server on HP 9000/800 system */ -#define PF_HP9000s300 51L /* server on HP 9000/300 system */ -#define PF_IBMAT 60L /* server on IBM/AT system */ -#define PF_IBMRT 61L /* server on IBM/RT system */ -#define PF_IBMPS2 62L /* server on IBM/PS2 system */ -#define PF_IBMRS 63L /* server on IBM/RS system */ -#define PF_MacII 70L /* server on Mac II system */ -#define PF_Pegasus 80L /* server on Tektronix Pegasus system */ -#define PF_SGI 90L /* server on Silicon Graphcis system */ -#define PF_Sony 100L /* server on Sony system */ -#define PF_Sun3 110L /* server on Sun 3 system */ -#define PF_Sun386i 111L /* server on Sun 386i system */ -#define PF_SunSparc 112L /* server on Sun Sparc system */ - -/* reply sent back by XETrapGetAvailable request */ -typedef struct -{ - XETrapRepHdr hdr; - XETrapGetAvailRep data; -} xXTrapGetAvailReply; -/* the following works because all fields are defined as bit (Bnn) fields */ -#define sz_xXTrapGetAvailReply sizeof(xXTrapGetAvailReply) - -/* reply sent back by XETrapGetVersion request */ -typedef struct -{ - XETrapRepHdr hdr; - XETrapGetVersRep data; - CARD32 pad0 B32; /* pad out to 32 bytes */ - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; -} xXTrapGetVersReply; -/* the following works because all fields are defined as bit (Bnn) fields */ -#define sz_xXTrapGetVersReply sizeof(xXTrapGetVersReply) - -/* reply sent back by XETrapGetLastInpTime request */ -typedef struct -{ - XETrapRepHdr hdr; - /* - * The following is a shadow of the XETrapGetLastInpTimeRep - * structure. This is done to avoid structure padding. - */ - CARD32 data_last_time B32; /* Timestamp of last input time */ - CARD32 pad0 B32; /* pad out to 32 bytes */ - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; -} xXTrapGetLITimReply; -/* the following works because all fields are defined as bit (Bnn) fields */ -#define sz_xXTrapGetLITimReply sizeof(xXTrapGetLITimReply) - -/* reply sent back by XETrapGetCurrent request */ -typedef struct -{ - XETrapRepHdr hdr; - /* - * The following is a shadow of the XETrapGetCurRep - * structure. This is done to avoid structure padding. - * Since the XETrapGetCurRep structure contains a sub-structure - * (XETrapCfg) there is a shadow for that as well.*/ - CARD8 data_state_flags[2]; /* Misc flags, see below #define's */ - CARD16 data_pad0 B16; /* Assure quadword alignment */ - /* XETrapCfg Shadow Starts */ - CARD8 data_config_flags_valid[4L]; - CARD8 data_config_flags_data[4L]; - ReqFlags data_config_flags_req; - EventFlags data_config_flags_event; - CARD16 data_config_max_pkt_size B16; /* Max num of bytes in a pkt */ - CARD8 data_config_cmd_key; /* Keyboard cmd_key (KeyCode) */ -/* - * cmd_key is intentionally *not* defined KeyCode since it's definition is - * ambiguous (int in Intrinsic.h and unsigned char in X.h. - */ - CARD8 data_config_pad[1L]; /* pad out to a quadword */ - /* End Shadow (XETrapCfg) */ - CARD32 pad1 B32; -} xXTrapGetCurReply; -/* the following works because all fields are defined as bit (Bnn) fields */ -#define sz_xXTrapGetCurReply sizeof(xXTrapGetCurReply) - -/* reply sent back by XETrapGetStatistics request */ -/* Note: - * The following does *not* use the standard XETrapRepHdr, but instead - * one which is padded out to 32-bytes. This is because Cray's have a problem - * reading arrays of CARD32s without using the _Read32 macro (see XERqsts.c). - * This requires that none of the data be in the _Reply area. - */ -typedef struct -{ - CARD8 type; - CARD8 detail; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 pad0 B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - XETrapGetStatsRep data; -} xXTrapGetStatsReply; -#define sz_xXTrapGetStatsReply 1088 - -typedef struct /* the XTrap Output header (for output from ext to client) */ -{ /* this must be quadword aligned for portability */ - CARD32 count B32; /* Length including this header */ - CARD32 timestamp B32; /* timestamp if desired */ - CARD8 type; /* event id, request id, special id */ - CARD8 screen; /* screen number (0 to n) */ - INT16 win_x B16; /* X coord of drawable, if any */ - INT16 win_y B16; /* X coord of drawable, if any */ - CARD16 client B16; /* to distinguish requests */ -} XETrapHeader; -/* the following works because all fields are defined as bit (Bnn) fields */ -#define sz_XETrapHeader sizeof(XETrapHeader) - -#define XETrapHeaderIsEvent(phdr) (XETrapGetHeaderType(phdr) == 0x1L) -#define XETrapHeaderIsRequest(phdr) (XETrapGetHeaderType(phdr) == 0x2L) -#define XETrapHeaderIsSpecial(phdr) (XETrapGetHeaderType(phdr) == 0x3L) -#define XETrapHeaderIsCursor(phdr) (XETrapGetHeaderType(phdr) == 0x4L) -#define XETrapHeaderIsReply(phdr) (XETrapGetHeaderType(phdr) == 0x5L) - -/* Define a structure used for reading/writing datum of type XTrap */ -typedef struct -{ - XETrapHeader hdr; - union - { - xEvent event; - xResourceReq req; - xGenericReply reply; - /* special? */ - } u; -} XETrapDatum; - -/* this doesn't get picked up for VMS server builds (different Xproto.h) */ -#ifndef sz_xEvent -#define sz_xEvent 32 -#endif -/* Minimum size of a packet from the server extension */ -#define XETrapMinPktSize (SIZEOF(XETrapHeader) + SIZEOF(xEvent)) - -/* Constants used with the XLIB transport */ -#define XETrapDataStart 0L /* Used in the detail field */ -#define XETrapDataContinued 1L /* Used in the detail field */ -#define XETrapDataLast 2L /* Used in the detail field */ -#define XETrapData 0L /* Used in the type field */ -#define XETrapNumberEvents 1L -/* This is the representation on the wire(see also XLib.h) */ -#define sz_EventData 24L /* 32 bytes - type, detail, seq, index */ -typedef struct { - CARD8 type; - CARD8 detail; - CARD16 sequenceNumber B16; - CARD32 idx B32; - CARD8 data[sz_EventData]; -} xETrapDataEvent; - -/* Error message indexes added to X for extension */ -#define BadIO 2L /* Can't read/write */ -#define BadStatistics 4L /* Stat's not avail. */ -#define BadDevices 5L /* Devices not vectored */ -#define BadScreen 7L /* Can't send event to given screen */ -#define BadSwapReq 8L /* Can't send swapped extension requests */ -#define XETrapNumErrors (BadSwapReq + 1) - - -#define XEKeyIsClear 0 -#define XEKeyIsEcho 1 -#define XEKeyIsOther 2 - -#endif /* __XTRAPDI__ */ diff --git a/nx-X11/include/extensions/xtrapemacros.h b/nx-X11/include/extensions/xtrapemacros.h deleted file mode 100644 index f5dc2be31..000000000 --- a/nx-X11/include/extensions/xtrapemacros.h +++ /dev/null @@ -1,387 +0,0 @@ -/* $XFree86: xc/include/extensions/xtrapemacros.h,v 1.1 2001/11/02 23:29:26 dawes Exp $ */ -#ifndef __XTRAPEMACROS__ -#define __XTRAPEMACROS__ "@(#)xtrapemacros.h 1.9 - 90/09/18 " - -/***************************************************************************** -Copyright 1987, 1988, 1989, 1990, 1991, 1994 by Digital Equipment Corp., -Maynard, MA - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -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 Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL 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. - -*****************************************************************************/ -/* - * - * CONTRIBUTORS: - * - * Dick Annicchiarico - * Robert Chesler - * Dan Coutu - * Gene Durso - * Marc Evans - * Alan Jamison - * Mark Henry - * Ken Miller - * - * DESCRIPTION: - * This include file is designed to provide the *visible* - * interface to XTrap data structures. Fields can be set - * using these macros by client programs unless otherwise - * specified; however, use of Trap Context convenience - * routines is strongly encouraged (XETrapContext.c) - */ -#include -#include - -/* msleep macro to replace msleep() for portability reasons */ -#define msleep(m) usleep((m)*1000) - -/* Copying TC's assumes that the new TC must be created */ -#define XECopyTC(src,mask,dest) \ - (dest = XECreateTC(((src)->dpy), (mask), (&((src)->values)))) - -/* Expands to SET each element of the TCValues structure - * Returns the TCValues Mask so that the Set can be entered - * as an argument to the XEChangeTC() routine call - */ -/* Note: req_cb & evt_cb would only be used if you wanted to - * *share* callbacks between Trap Contexts. Normally, - * XEAddRequestCB() and XEAddEventCB() would be used. - */ -#define XETrapSetCfgReqCB(tcv,x) ((tcv)->req_cb = (x)) -#define XETrapSetCfgEvtCB(tcv,x) ((tcv)->evt_cb = (x)) -#define XETrapSetCfgMaxPktSize(tcv,x) ((tcv)->v.max_pkt_size = (x)) -#define XETrapSetCfgCmdKey(tcv,x) ((tcv)->v.cmd_key = (x)) -/* Note: e is only pertinent for "valid" or "data" */ -#define XETrapSetCfgFlags(tcv,e,a) \ - memcpy((tcv)->v.flags.e, (a), sizeof((tcv)->v.flags.e)) -#define XETrapSetCfgFlagTimestamp(tcv,e,x) \ - BitSet((tcv)->v.flags.e, XETrapTimestamp, (x)) -#define XETrapSetCfgFlagCmd(tcv,e,x) \ - BitSet((tcv)->v.flags.e, XETrapCmd, (x)) -#define XETrapSetCfgFlagCmdKeyMod(tcv,e,x) \ - BitSet((tcv)->v.flags.e, XETrapCmdKeyMod, (x)) -#define XETrapSetCfgFlagRequest(tcv,e,x) \ - BitSet((tcv)->v.flags.e, XETrapRequest, (x)) -#define XETrapSetCfgFlagEvent(tcv,e,x) \ - BitSet((tcv)->v.flags.e, XETrapEvent, (x)) -#define XETrapSetCfgFlagMaxPacket(tcv,e,x) \ - BitSet((tcv)->v.flags.e, XETrapMaxPacket, (x)) -#define XETrapSetCfgFlagStatistics(tcv,e,x) \ - BitSet((tcv)->v.flags.e, XETrapStatistics, (x)) -#define XETrapSetCfgFlagWinXY(tcv,e,x) \ - BitSet((tcv)->v.flags.e, XETrapWinXY, (x)) -#define XETrapSetCfgFlagCursor(tcv,e,x) \ - BitSet((tcv)->v.flags.e, XETrapCursor, (x)) -#define XETrapSetCfgFlagReq(tcv,request,x) \ - BitSet((tcv)->v.flags.req, (request), (x)) -#define XETrapSetCfgFlagXInput(tcv,e,x) \ - BitSet((tcv)->v.flags.e, XETrapXInput, (x)) -#define XETrapSetCfgFlagColorReplies(tcv,e,x) \ - BitSet((tcv)->v.flags.e, XETrapColorReplies, (x)) -#define XETrapSetCfgFlagGrabServer(tcv,e,x) \ - BitSet((tcv)->v.flags.e, XETrapGrabServer, (x)) -#define XETrapSetCfgFlagEvt(tcv,evt,x) \ - BitSet((tcv)->v.flags.event, (evt), (x)) - -#define XETrapSetValFlagDeltaTimes(tcv,x) \ - BitSet((tcv)->tc_flags, XETCDeltaTimes, (x)) - -/* Fields returned in the "GetAvailable" request */ -#define XETrapGetAvailPFIdent(avail) ((avail)->pf_ident) -#define XETrapGetAvailRelease(avail) ((avail)->xtrap_release) -#define XETrapGetAvailVersion(avail) ((avail)->xtrap_version) -#define XETrapGetAvailRevision(avail) ((avail)->xtrap_revision) -#define XETrapGetAvailMaxPktSize(avail) ((avail)->max_pkt_size) -#define XETrapGetAvailFlags(avail,a) \ - memcpy((a), (avail)->valid, sizeof((avail)->valid)) -#define XETrapGetAvailFlagTimestamp(avail) \ - (BitValue((avail)->valid, XETrapTimestamp)) -#define XETrapGetAvailFlagCmd(avail) \ - (BitValue((avail)->valid, XETrapCmd)) -#define XETrapGetAvailFlagCmdKeyMod(avail) \ - (BitValue((avail)->valid, XETrapCmdKeyMod)) -#define XETrapGetAvailFlagRequest(avail) \ - (BitValue((avail)->valid, XETrapRequest)) -#define XETrapGetAvailFlagEvent(avail) \ - (BitValue((avail)->valid, XETrapEvent)) -#define XETrapGetAvailFlagMaxPacket(avail) \ - (BitValue((avail)->valid, XETrapMaxPacket)) -#define XETrapGetAvailFlagStatistics(avail) \ - (BitValue((avail)->valid, XETrapStatistics)) -#define XETrapGetAvailFlagWinXY(avail) \ - (BitValue((avail)->valid, XETrapWinXY)) -#define XETrapGetAvailFlagCursor(avail) \ - (BitValue((avail)->valid, XETrapCursor)) -#define XETrapGetAvailFlagXInput(avail) \ - (BitValue((avail)->valid, XETrapXInput)) -#define XETrapGetAvailFlagVecEvt(avail) \ - (BitValue((avail)->valid, XETrapVectorEvents)) -#define XETrapGetAvailFlagColorReplies(avail) \ - (BitValue((avail)->valid, XETrapColorReplies)) -#define XETrapGetAvailFlagGrabServer(avail) \ - (BitValue((avail)->valid, XETrapGrabServer)) -#define XETrapGetAvailOpCode(avail) ((avail)->major_opcode) -/* Macro's for creating current request and trap context macros */ -#define XETrapGetCfgMaxPktSize(cfg) ((cfg)->max_pkt_size) -#define XETrapGetCfgCmdKey(cfg) ((cfg)->cmd_key) -#define XETrapGetCfgFlags(cfg,e,a) \ - memcpy((a), (cfg)->flags.e, sizeof((cfg)->flags.e)) -#define XETrapGetCfgFlagTimestamp(cfg,e) \ - (BitValue((cfg)->flags.e, XETrapTimestamp)) -#define XETrapGetCfgFlagCmd(cfg,e) \ - (BitValue((cfg)->flags.e, XETrapCmd)) -#define XETrapGetCfgFlagCmdKeyMod(cfg,e) \ - (BitValue((cfg)->flags.e, XETrapCmdKeyMod)) -#define XETrapGetCfgFlagRequest(cfg,e) \ - (BitValue((cfg)->flags.e, XETrapRequest)) -#define XETrapGetCfgFlagEvent(cfg,e) \ - (BitValue((cfg)->flags.e, XETrapEvent)) -#define XETrapGetCfgFlagMaxPacket(cfg,e) \ - (BitValue((cfg)->flags.e, XETrapMaxPacket)) -#define XETrapGetCfgFlagStatistics(cfg,e) \ - (BitValue((cfg)->flags.e, XETrapStatistics)) -#define XETrapGetCfgFlagWinXY(cfg,e) \ - (BitValue((cfg)->flags.e, XETrapWinXY)) -#define XETrapGetCfgFlagCursor(cfg,e) \ - (BitValue((cfg)->flags.e, XETrapCursor)) -#define XETrapGetCfgFlagXInput(cfg,e) \ - (BitValue((cfg)->flags.e, XETrapXInput)) -#define XETrapGetCfgFlagColorReplies(cfg,e) \ - (BitValue((cfg)->flags.e, XETrapColorReplies)) -#define XETrapGetCfgFlagGrabServer(cfg,e) \ - (BitValue((cfg)->flags.e, XETrapGrabServer)) -/* Request values are in "Xproto.h" of the flavor X_RequestType */ -#define XETrapGetCfgFlagReq(cfg,request) \ - (BitValue((cfg)->flags.req, (request))) -/* Event types are in "X.h" of the flavor EventType (e.g. KeyPress) */ -#define XETrapGetCfgFlagEvt(cfg,evt) \ - (BitValue((cfg)->flags.event, (evt))) - -/* Fields returned int the "GetCurrent" Request */ -#define XETrapGetCurX(avail) ((avail)->cur_x) -#define XETrapGetCurY(avail) ((avail)->cur_y) -#define XETrapGetCurSFlags(cur,a) \ - memcpy((a), (cur)->state_flags, sizeof((cur)->state_flags)) -#define XETrapGetCurMaxPktSize(cur) (XETrapGetCfgMaxPktSize(&((cur)->config))) -#define XETrapGetCurCmdKey(cur) (XETrapGetCfgCmdKey(&((cur)->config))) -/* Note: e is only pertinent for "valid" or "data" */ -#define XETrapGetCurCFlags(cur,e,a) (XETrapGetCfgFlags(&((cur)->config),e,a)) -#define XETrapGetCurFlagTimestamp(cur,e) \ - (XETrapGetCfgFlagTimestamp(&((cur)->config),e)) -#define XETrapGetCurFlagCmd(cur,e) (XETrapGetCfgFlagCmd(&((cur)->config),e)) -#define XETrapGetCurFlagCmdKeyMod(cur,e) \ - (XETrapGetCfgFlagCmdKeyMod(&((cur)->config),e)) -#define XETrapGetCurFlagRequest(cur,r) \ - (XETrapGetCfgFlagRequest(&((cur)->config),r)) -#define XETrapGetCurFlagEvent(cur,e) \ - (XETrapGetCfgFlagEvent(&((cur)->config),e)) -#define XETrapGetCurFlagMaxPacket(cur,e) \ - (XETrapGetCfgFlagMaxPacket(&((cur)->config),e)) -#define XETrapGetCurFlagStatistics(cur,e) \ - (XETrapGetCfgFlagStatistics(&((cur)->config),e)) -#define XETrapGetCurFlagWinXY(cur,e) \ - (XETrapGetCfgFlagWinXY(&((cur)->config),e)) -#define XETrapGetCurFlagCursor(cur,e) \ - (XETrapGetCfgFlagCursor(&((cur)->config),e)) -#define XETrapGetCurFlagXInput(cur,e) \ - (XETrapGetCfgFlagXInput(&((cur)->config),e)) -#define XETrapGetCurFlagColorReplies(cur,e) \ - (XETrapGetCfgFlagColorReplies(&((cur)->config),e)) -#define XETrapGetCurFlagGrabServer(cur,e) \ - (XETrapGetCfgFlagGrabServer(&((cur)->config),e)) -/* Request values are in "Xproto.h" of the flavor X_RequestType */ -#define XETrapGetCurFlagReq(cur,r) (XETrapGetCfgFlagReq(&((cur)->config),r)) -/* Event types are in "X.h" of the flavor EventType (e.g. KeyPress) */ -#define XETrapGetCurFlagEvt(cur,e) (XETrapGetCfgFlagEvt(&((cur)->config),e)) - -/* Fields returned int the "GetStatistics" Request */ -#define XETrapGetStatsReq(stat,e) ((stat)->requests[(e)]) -#define XETrapGetStatsEvt(stat,e) ((stat)->events[(e)]) - -/* Fields returned in the "GetVersion" request */ -#define XETrapGetVersRelease(vers) ((vers)->xtrap_release) -#define XETrapGetVersVersion(vers) ((vers)->xtrap_version) -#define XETrapGetVersRevision(vers) ((vers)->xtrap_revision) - -/* Fields returned in the "GetLastInpTime" request */ -#define XETrapGetLastInpTime(time_rep) ((time_rep)->last_time) - -/* Expands to GET each element of the TCValues structure */ -#define XETrapGetTCReqCB(tc) ((tc)->values.req_cb) -#define XETrapGetTCEvtCB(tc) ((tc)->values.evt_cb) -#define XETrapGetTCTime(tc) ((tc)->values.last_time) -/* TC specific flags */ -#define XETrapGetTCLFlags(tc,a) \ - memcpy((a), (tc)->values.tc_flags, sizeof((tc)->values.tc_flags)) -#define XETrapGetTCFlagDeltaTimes(tc) \ - (BitValue((tc)->values.tc_flags, XETCDeltaTimes)) -#define XETrapGetTCFlagTrapActive(tc) \ - (BitValue((tc)->values.tc_flags, XETCTrapActive)) -#define XETrapGetTCMaxPktSize(tc) (XETrapGetCfgMaxPktSize(&((tc)->values.v))) -#define XETrapGetTCCmdKey(tc) (XETrapGetCfgCmdKey(&((tc)->values.v))) -/* Note: e is only pertinent for "valid" or "data" */ -#define XETrapGetTCFlags(tc,e,a) (XETrapGetCfgFlags(&((tc)->values.v),e,a)) -#define XETrapGetTCFlagTimestamp(tc,e) \ - (XETrapGetCfgFlagTimestamp(&((tc)->values.v),e)) -#define XETrapGetTCFlagCmd(tc,e) \ - (XETrapGetCfgFlagCmd(&((tc)->values.v),e)) -#define XETrapGetTCFlagCmdKeyMod(tc,e) \ - (XETrapGetCfgFlagCmdKeyMod(&((tc)->values.v),e)) -#define XETrapGetTCFlagRequest(tc,r) \ - (XETrapGetCfgFlagRequest(&((tc)->values.v),r)) -#define XETrapGetTCFlagEvent(tc,e) \ - (XETrapGetCfgFlagEvent(&((tc)->values.v),e)) -#define XETrapGetTCFlagMaxPacket(tc,e) \ - (XETrapGetCfgFlagMaxPacket(&((tc)->values.v),e)) -#define XETrapGetTCFlagStatistics(tc,e) \ - (XETrapGetCfgFlagStatistics(&((tc)->values.v),e)) -#define XETrapGetTCFlagWinXY(tc,e) \ - (XETrapGetCfgFlagWinXY(&((tc)->values.v),e)) -#define XETrapGetTCFlagCursor(tc,e) \ - (XETrapGetCfgFlagCursor(&((tc)->values.v),e)) -#define XETrapGetTCFlagXInput(tc,e) \ - (XETrapGetCfgFlagXInput(&((tc)->values.v),e)) -#define XETrapGetTCFlagColorReplies(tc,e) \ - (XETrapGetCfgFlagColorReplies(&((tc)->values.v),e)) -#define XETrapGetTCFlagGrabServer(tc,e) \ - (XETrapGetCfgFlagGrabServer(&((tc)->values.v),e)) -/* Request values are in "Xproto.h" of the flavor X_RequestType */ -#define XETrapGetTCFlagReq(tc,r) \ - (XETrapGetCfgFlagReq(&((tc)->values.v),r)) -/* Event types are in "X.h" of the flavor EventType (e.g. KeyPress) */ -#define XETrapGetTCFlagEvt(tc,e) \ - (XETrapGetCfgFlagEvt(&((tc)->values.v),e)) -/* The following can/should *not* be set directly! */ -#define XETrapGetNext(tc) ((tc)->next) -#define XETrapGetDpy(tc) ((tc)->dpy) -#define XETrapGetEventBase(tc) ((tc)->eventBase) -#define XETrapGetErrorBase(tc) ((tc)->errorBase) -#define XETrapGetExtOpcode(tc) ((tc)->extOpcode) -#define XETrapGetXBuff(tc) ((tc)->xbuff) -#define XETrapGetXMaxSize(tc) ((tc)->xmax_size) -#define XETrapGetExt(tc) ((tc)->ext_data) -#define XETrapGetDirty(tc) ((tc)->dirty) -#define XETrapGetValues(tc) memcpy((x),(tc)->values,sizeof((tc)->values)) -#define XETrapGetEventFunc(tc) ((tc)->eventFunc) - -#define XETrapGetHeaderCount(phdr) ((phdr)->count) -#define XETrapGetHeaderTimestamp(phdr) ((phdr)->timestamp) -#define XETrapGetHeaderType(phdr) ((phdr)->type) -#define XETrapGetHeaderScreen(phdr) ((phdr)->screen) -#define XETrapGetHeaderWindowX(phdr) ((phdr)->win_x) -#define XETrapGetHeaderWindowY(phdr) ((phdr)->win_y) -#define XETrapGetHeaderClient(phdr) ((phdr)->client) - -#define XEGetRelease(tc) ((tc)->release) -#define XEGetVersion(tc) ((tc)->version) -#define XEGetRevision(tc) ((tc)->revision) - -/* Condition handling macros */ -#if !defined(vms) && \ - (!defined(_InitExceptionHandling) || !defined(_ClearExceptionHandling)) -# ifndef _SetSIGBUSHandling -# ifdef SIGBUS -# define _SetSIGBUSHandling(rtn) (void)signal(SIGBUS, rtn) -# else -# define _SetSIGBUSHandling(rtn) /* */ -# endif -# endif -# ifndef _SetSIGSEGVHandling -# ifdef SIGSEGV -# define _SetSIGSEGVHandling(rtn) (void)signal(SIGSEGV, rtn) -# else -# define _SetSIGSEGVHandling(rtn) /* */ -# endif -# endif -# ifndef _SetSIGFPEHandling -# ifdef SIGFPE -# define _SetSIGFPEHandling(rtn) (void)signal(SIGFPE, rtn) -# else -# define _SetSIGFPEHandling(rtn) /* */ -# endif -# endif -# ifndef _SetSIGILLHandling -# ifdef SIGILL -# define _SetSIGILLHandling(rtn) (void)signal(SIGILL, rtn) -# else -# define _SetSIGILLHandling(rtn) /* */ -# endif -# endif -# ifndef _SetSIGSYSHandling -# ifdef SIGSYS -# define _SetSIGSYSHandling(rtn) (void)signal(SIGSYS, rtn) -# else -# define _SetSIGSYSHandling(rtn) /* */ -# endif -# endif -# ifndef _SetSIGHUPHandling -# ifdef SIGHUP -# define _SetSIGHUPHandling(rtn) (void)signal(SIGHUP, rtn) -# else -# define _SetSIGHUPHandling(rtn) /* */ -# endif -# endif -# ifndef _SetSIGPIPEHandling -# ifdef SIGPIPE -# define _SetSIGPIPEHandling(rtn) (void)signal(SIGPIPE, rtn) -# else -# define _SetSIGPIPEHandling(rtn) /* */ -# endif -# endif -# ifndef _SetSIGTERMHandling -# ifdef SIGTERM -# define _SetSIGTERMHandling(rtn) (void)signal(SIGTERM, rtn) -# else -# define _SetSIGTERMHandling(rtn) /* */ -# endif -# endif -#endif -#ifndef _InitExceptionHandling -#ifdef vms -#define _InitExceptionHandling(rtn) \ - VAXC$ESTABLISH(rtn) /* VMS exception handler */ -#else /* vms */ -#define _InitExceptionHandling(rtn) \ - _SetSIGBUSHandling(rtn); /* Bus error */ \ - _SetSIGSEGVHandling(rtn); /* Accvio/Segment error */ \ - _SetSIGFPEHandling(rtn); /* Floating point exception */ \ - _SetSIGILLHandling(rtn); /* Illegal instruction */ \ - _SetSIGSYSHandling(rtn); /* Param error in sys call */ \ - _SetSIGHUPHandling(rtn); \ - _SetSIGPIPEHandling(rtn); \ - _SetSIGTERMHandling(rtn) -#endif /* vms */ -#endif /* _InitExceptionHandling */ - -#ifndef _ClearExceptionHandling -#ifdef vms -#define _ClearExceptionHandling() \ - LIB$REVERT() -#else -#define _ClearExceptionHandling() \ - _SetSIGBUSHandling(SIG_DFL); /* Bus error */ \ - _SetSIGSEGVHandling(SIG_DFL); /* Accvio/Segment error */ \ - _SetSIGFPEHandling(SIG_DFL); /* Floating point exception */ \ - _SetSIGILLHandling(SIG_DFL); /* Illegal instruction */ \ - _SetSIGSYSHandling(SIG_DFL); /* Param error in sys call */ \ - _SetSIGHUPHandling(SIG_DFL); \ - _SetSIGPIPEHandling(SIG_DFL); \ - _SetSIGTERMHandling(SIG_DFL) -#endif /* vms */ -#endif /* _ClearExceptionHandling */ - -#endif /* __XTRAPEMACROS__ */ diff --git a/nx-X11/include/extensions/xtraplib.h b/nx-X11/include/extensions/xtraplib.h deleted file mode 100644 index b733dac7f..000000000 --- a/nx-X11/include/extensions/xtraplib.h +++ /dev/null @@ -1,128 +0,0 @@ -/* $XFree86$ */ -#ifndef __XTRAPLIB__ -#define __XTRAPLIB__ - - -/***************************************************************************** -Copyright 1987, 1988, 1989, 1990, 1991, 1994 by Digital Equipment Corp., -Maynard, MA - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -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 Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL 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. - -*****************************************************************************/ -/* - * - * CONTRIBUTORS: - * - * Dick Annicchiarico - * Robert Chesler - * Dan Coutu - * Gene Durso - * Marc Evans - * Alan Jamison - * Mark Henry - * Ken Miller - * - * DESCRIPTION: - * This header file describes all the structures/constants required - * for interfacing with the client toolkit *except* the common - * client/extension definitions in xtrapdi.h. Namely, *no* extension- - * only information or client/extension information can be found here. - */ -#ifdef SMT -#define NEED_EVENTS -#define NEED_REPLIES -#endif -#include -#include -#include -#include - -typedef struct /* Callback structure */ -{ - void_function func; - BYTE *data; -} XETrapCB; - -/* Data structure for setting trap context */ -typedef struct -{ - CARD8 tc_flags[2L]; /* Toolkit-side specific flags */ - XETrapCfg v; /* XTrap configuration values */ - XETrapCB *req_cb; /* Pointer to Request Callbacks */ - XETrapCB *evt_cb; /* Pointer to Event Callbacks (starting at 2) */ - CARD32 last_time B32; /* Last (delta) timestamp */ -} XETCValues; - - /* bits 0 thru 6 are formerly "families" (now obsolete) */ -#define XETCDeltaTimes 7 -#define XETCTrapActive 8 - /* bits 9 thru 15 are reserved for future expansion */ - -/* Values bit masks (used when determining what's dirty */ -#define TCStatistics (1L<<0L) -#define TCRequests (1L<<1L) -#define TCEvents (1L<<2L) -#define TCMaxPacket (1L<<3L) -#define TCCmdKey (1L<<4L) -#define TCTimeStamps (1L<<5L) -#define TCWinXY (1L<<6L) -#define TCXInput (1L<<7L) -#define TCReqCBs (1L<<8L) -#define TCEvtCBs (1L<<9L) -#define TCCursor (1L<<10L) -#define TCColorReplies (1L<<11L) -#define TCGrabServer (1L<<12L) - -/* This is the representation we use in the library code for XLib transport */ -typedef struct { - int type; - unsigned long serial; - Bool synthetic; - Display *display; - int detail; - unsigned long idx; - unsigned char data[sz_EventData]; -} XETrapDataEvent; - -/* Trap Context structure for maintaining XTrap State for client */ -typedef struct _XETC -{ - struct _XETC *next; /* Ptr to next linked-listed TC */ - Display *dpy; /* Display ptr of current TC */ - INT32 eventBase /*B32*/; /* First event value */ - INT32 errorBase /*B32*/; /* First error value */ - INT32 extOpcode /*B32*/; /* Major opcode of the extension */ - BYTE *xbuff; /* Pointer to buffer for XLib Communications */ - CARD16 xmax_size /*B16*/; /* Max Size of a request */ - XExtData *ext_data; /* hook for extension to hang data */ - /* - * The following are initialized with the client-side version number - * However, when either a GetAvailable or GetVersion reply is received, - * these values are updated with the *oldest* version numbers. - */ - CARD16 release /*B16*/; /* The extension release number */ - CARD16 version /*B16*/; /* The xtrap extension version number */ - CARD16 revision /*B16*/; /* The xtrap extension revision number */ - CARD16 protocol /*B16*/; /* The xtrap extension protocol number */ - unsigned dirty /*B32*/; /* cache dirty bits */ - XETCValues values; /* shadow structure of values */ - Boolean (*eventFunc[XETrapNumberEvents])(XETrapDataEvent *event, struct _XETC *tc); -} XETC; - - -#endif /* __XTRAPLIB__ */ diff --git a/nx-X11/include/extensions/xtraplibp.h b/nx-X11/include/extensions/xtraplibp.h deleted file mode 100644 index 087ba6e64..000000000 --- a/nx-X11/include/extensions/xtraplibp.h +++ /dev/null @@ -1,142 +0,0 @@ -/* $XFree86$ */ -#ifndef __XTRAPLIBP__ -#define __XTRAPLIBP__ - - -/***************************************************************************** -Copyright 1987, 1988, 1989, 1990, 1991, 1994 by Digital Equipment Corp., -Maynard, MA - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -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 Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL 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. - -*****************************************************************************/ -/* - * - * CONTRIBUTORS: - * - * Dick Annicchiarico - * Robert Chesler - * Dan Coutu - * Gene Durso - * Marc Evans - * Alan Jamison - * Mark Henry - * Ken Miller - * - * DESCRIPTION: - * This header file contains the function prototypes for client/toolkit - * routines sorted by module (globally defined routines *only*). - */ - -/* XEConTxt.c */ -XETC *XECreateTC (Display *dpy , CARD32 valuemask , XETCValues *value ); -int XEChangeTC (XETC *tc , CARD32 mask , XETCValues *values ); -void XEFreeTC (XETC *tc ); -int XETrapSetMaxPacket (XETC *tc , Bool set_flag , CARD16 size ); -int XETrapSetCommandKey (XETC *tc , Bool set_flag , KeySym cmd_key , - Bool mod_flag ); -int XETrapSetTimestamps (XETC *tc , Bool set_flag , Bool delta_flag ); -int XETrapSetWinXY (XETC *tc , Bool set_flag ); -int XETrapSetCursor (XETC *tc , Bool set_flag ); -int XETrapSetXInput (XETC *tc , Bool set_flag ); -int XETrapSetColorReplies (XETC *tc , Bool set_flag ); -int XETrapSetGrabServer (XETC *tc , Bool set_flag ); -int XETrapSetStatistics (XETC *tc , Bool set_flag ); -int XETrapSetRequests (XETC *tc , Bool set_flag , ReqFlags requests ); -int XETrapSetEvents (XETC *tc , Bool set_flag , EventFlags events ); -Bool XESetCmdGateState (XETC *tc , CARD8 type, Bool *gate_closed , - CARD8 *next_key , Bool *key_ignore ); - -/* XERqsts.c */ -int XEFlushConfig (XETC *tc ); -int XEResetRequest (XETC *tc ); -int XEGetVersionRequest (XETC *tc , XETrapGetVersRep *ret ); -int XEGetLastInpTimeRequest (XETC *tc , XETrapGetLastInpTimeRep *ret ); -int XEGetAvailableRequest (XETC *tc , XETrapGetAvailRep *ret ); -int XEStartTrapRequest (XETC *tc ); -int XEStopTrapRequest (XETC *tc ); -int XESimulateXEventRequest (XETC *tc , CARD8 type , CARD8 detail , - CARD16 x , CARD16 y , CARD8 screen ); -int XEGetCurrentRequest (XETC *tc , XETrapGetCurRep *ret ); -int XEGetStatisticsRequest (XETC *tc , XETrapGetStatsRep *ret ); - -/* XECallBcks.c */ -int XEAddRequestCB (XETC *tc , CARD8 req , void_function func , BYTE *data ); -int XEAddRequestCBs (XETC *tc , ReqFlags req_flags , void_function func , - BYTE *data ); -int XEAddEventCB (XETC *tc , CARD8 evt , void_function func , BYTE *data ); -int XEAddEventCBs (XETC *tc , EventFlags evt_flags , void_function func , - BYTE *data ); - -/* The following seem to never be used. Perhaps they should be removed */ -void XERemoveRequestCB (XETC *tc, CARD8 req); -void XERemoveRequestCBs (XETC *tc, ReqFlags req_flags); -void XERemoveAllRequestCBs (XETC *tc); -void XERemoveEventCB (XETC *tc, CARD8 evt); -void XERemoveEventCBs (XETC *tc, EventFlags evt_flags); -void XERemoveAllEventCBs (XETC *tc); - - -/* XEDsptch.c */ -Boolean XETrapDispatchXLib (XETrapDataEvent *event , XETC *tc); - -/* XEWrappers.c */ -Boolean XETrapDispatchEvent (XEvent *pevent , XETC *tc ); -XtInputMask XETrapAppPending (XtAppContext app); -void XETrapAppMainLoop (XtAppContext app , XETC *tc ); -int XETrapAppWhileLoop (XtAppContext app , XETC *tc , Bool *done ); -int XETrapWaitForSomething (XtAppContext app ); -Boolean (*XETrapSetEventHandler(XETC *tc, CARD32 id, Boolean (*pfunc)(XETrapDataEvent *event, XETC *tc))) (XETrapDataEvent *event, XETC *tc); - -/* XEPrInfo.c */ -void XEPrintRelease (FILE *ofp , XETrapGetAvailRep *pavail ); -void XEPrintTkRelease ( FILE *ofp, XETC *tc); -void XEPrintPlatform (FILE *ofp , XETrapGetAvailRep *pavail ); -void XEPrintAvailFlags (FILE *ofp , XETrapGetAvailRep *pavail ); -void XEPrintAvailPktSz (FILE *ofp , XETrapGetAvailRep *pavail ); -void XEPrintStateFlags (FILE *ofp , XETrapGetCurRep *pcur ); -void XEPrintMajOpcode (FILE *ofp , XETrapGetAvailRep *pavail ); -void XEPrintCurXY (FILE *ofp , XETrapGetAvailRep *pavail ); -void XEPrintTkFlags (FILE *ofp , XETC *tc ); -void XEPrintLastTime (FILE *ofp , XETC *tc ); -void XEPrintCfgFlags (FILE *ofp , XETrapGetCurRep *pcur ); -void XEPrintRequests (FILE *ofp , XETrapGetCurRep *pcur ); -void XEPrintEvents (FILE *ofp , XETrapGetCurRep *pcur ); -void XEPrintCurPktSz (FILE *ofp , XETrapGetCurRep *pcur ); -void XEPrintCmdKey (FILE *ofp , XETrapGetCurRep *pcur ); -void XEPrintEvtStats (FILE *ofp , XETrapGetStatsRep *pstats , XETC *tc); -void XEPrintReqStats (FILE *ofp , XETrapGetStatsRep *pstats , XETC *tc); -void XEPrintAvail (FILE *ofp , XETrapGetAvailRep *pavail ); -void XEPrintTkState (FILE *ofp , XETC *tc ); -void XEPrintCurrent (FILE *ofp , XETrapGetCurRep *pcur ); -void XEPrintStatistics (FILE *ofp , XETrapGetStatsRep *pstats, XETC *tc ); - -/* XEStrMap.c */ -INT16 XEEventStringToID (char *string ); -INT16 XERequestStringToID (char *string ); -CARD32 XEPlatformStringToID (char *string ); -char *XEEventIDToString (CARD8 id , XETC *tc); -char *XERequestIDToExtString (register CARD8 id , XETC *tc); -char *XERequestIDToString (CARD8 id , XETC *tc); -char *XEPlatformIDToString (CARD32 id ); - -/* XETrapInit.c */ -Bool XETrapQueryExtension (Display *dpy,INT32 *event_base_return, - INT32 *error_base_return, INT32 *opcode_return); - - -#endif /* __XTRAPLIBP__ */ diff --git a/nx-X11/include/extensions/xtrapproto.h b/nx-X11/include/extensions/xtrapproto.h deleted file mode 100644 index 7eb8f9d47..000000000 --- a/nx-X11/include/extensions/xtrapproto.h +++ /dev/null @@ -1,168 +0,0 @@ -/* $XFree86: xc/include/extensions/xtrapproto.h,v 1.1 2001/11/02 23:29:26 dawes Exp $ */ - -#ifndef __XTRAPPROTO__ -#define __XTRAPPROTO__ - -/***************************************************************************** -Copyright 1987, 1988, 1989, 1990, 1991 by Digital Equipment Corp., Maynard, MA - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -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 Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL 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. - -*****************************************************************************/ -/* - * - * CONTRIBUTORS: - * - * Dick Annicchiarico - * Robert Chesler - * Dan Coutu - * Gene Durso - * Marc Evans - * Alan Jamison - * Mark Henry - * Ken Miller - * - * DESCRIPTION: - * This header file contains the function prototypes for extension - * routines sorted by module (globally defined routines *only*). - */ -#ifndef Bool -# define Bool int -#endif -/* xtrapdi.c */ -int XETrapDestroyEnv (void * value , XID id ); -void XETrapCloseDown ( ExtensionEntry *extEntry ); -Bool XETrapRedirectDevices (void ); -void DEC_XTRAPInit (void ); -int XETrapCreateEnv (ClientPtr client ); -int XETrapDispatch (ClientPtr client ); -int sXETrapDispatch (ClientPtr client ); -int XETrapReset (xXTrapReq *request , ClientPtr client ); -int XETrapGetAvailable (xXTrapGetReq *request , ClientPtr client ); -int XETrapGetCurrent (xXTrapReq *request , ClientPtr client ); -int XETrapGetStatistics (xXTrapReq *request , ClientPtr client ); -int XETrapConfig (xXTrapConfigReq *request , ClientPtr client ); -int XETrapStartTrap (xXTrapReq *request , ClientPtr client ); -int XETrapStopTrap (xXTrapReq *request , ClientPtr client ); -int XETrapGetVersion (xXTrapGetReq *request , ClientPtr client ); -int XETrapGetLastInpTime (xXTrapReq *request , ClientPtr client ); -int XETrapRequestVector (ClientPtr client ); -int XETrapKeyboard (xEvent *x_event , DevicePtr keybd , int count ); -#ifndef VECTORED_EVENTS -int XETrapPointer (xEvent *x_event , DevicePtr ptrdev , int count ); -#else -int XETrapEventVector (ClientPtr client , xEvent *x_event ); -#endif -void XETrapStampAndMail (xEvent *x_event ); -void sReplyXTrapDispatch (ClientPtr client , int size , char *reply ); -int XETrapWriteXLib (XETrapEnv *penv , BYTE *data , CARD32 nbytes ); - -/* xtrapddmi.c */ -void XETrapPlatformSetup (void ); -int XETrapSimulateXEvent (xXTrapInputReq *request , ClientPtr client ); - -/* xtrapdiswap.c */ -int sXETrapReset (xXTrapReq *request , ClientPtr client ); -int sXETrapGetAvailable (xXTrapGetReq *request , ClientPtr client ); -int sXETrapConfig (xXTrapConfigReq *request , ClientPtr client ); -int sXETrapStartTrap (xXTrapReq *request , ClientPtr client ); -int sXETrapStopTrap (xXTrapReq *request , ClientPtr client ); -int sXETrapGetCurrent (xXTrapReq *request , ClientPtr client ); -int sXETrapGetStatistics (xXTrapReq *request , ClientPtr client ); -int sXETrapSimulateXEvent (xXTrapInputReq *request , ClientPtr client ); -int sXETrapGetVersion (xXTrapGetReq *request , ClientPtr client ); -int sXETrapGetLastInpTime (xXTrapReq *request , ClientPtr client ); -void sReplyXETrapGetAvail (ClientPtr client , int size , char *reply ); -void sReplyXETrapGetVers (ClientPtr client , int size , char *reply ); -void sReplyXETrapGetLITim (ClientPtr client , int size , char *reply ); -void sReplyXETrapGetCur (ClientPtr client , int size , char *reply ); -void sReplyXETrapGetStats (ClientPtr client , int size , char *reply ); -void sXETrapHeader (XETrapHeader *hdr ); -void XETSwSimpleReq (xReq *data ); -void XETSwResourceReq (xResourceReq *data ); -void XETSwCreateWindow (xCreateWindowReq *data , ClientPtr client ); -void XETSwChangeWindowAttributes (xChangeWindowAttributesReq *data , ClientPtr client ); -void XETSwReparentWindow (xReparentWindowReq *data ); -void XETSwConfigureWindow (xConfigureWindowReq *data , ClientPtr client ); -void XETSwInternAtom (xInternAtomReq *data ); -void XETSwChangeProperty (xChangePropertyReq *data ); -void XETSwDeleteProperty (xDeletePropertyReq *data ); -void XETSwGetProperty (xGetPropertyReq *data ); -void XETSwSetSelectionOwner (xSetSelectionOwnerReq *data ); -void XETSwConvertSelection (xConvertSelectionReq *data ); -void XETSwSendEvent (xSendEventReq *data ); -void XETSwGrabPointer (xGrabPointerReq *data ); -void XETSwGrabButton (xGrabButtonReq *data ); -void XETSwUngrabButton (xUngrabButtonReq *data ); -void XETSwChangeActivePointerGrab (xChangeActivePointerGrabReq *data ); -void XETSwGrabKeyboard (xGrabKeyboardReq *data ); -void XETSwGrabKey (xGrabKeyReq *data ); -void XETSwUngrabKey (xUngrabKeyReq *data ); -void XETSwGetMotionEvents (xGetMotionEventsReq *data ); -void XETSwTranslateCoords (xTranslateCoordsReq *data ); -void XETSwWarpPointer (xWarpPointerReq *data ); -void XETSwSetInputFocus (xSetInputFocusReq *data ); -void XETSwOpenFont (xOpenFontReq *data ); -void XETSwListFonts (xListFontsReq *data ); -void XETSwListFontsWithInfo (xListFontsWithInfoReq *data ); -void XETSwSetFontPath (xSetFontPathReq *data ); -void XETSwCreatePixmap (xCreatePixmapReq *data ); -void XETSwCreateGC (xCreateGCReq *data , ClientPtr client ); -void XETSwChangeGC (xChangeGCReq *data , ClientPtr client ); -void XETSwCopyGC (xCopyGCReq *data ); -void XETSwSetDashes (xSetDashesReq *data ); -void XETSwSetClipRectangles (xSetClipRectanglesReq *data , ClientPtr client ); -void XETSwClearToBackground (xClearAreaReq *data ); -void XETSwCopyArea (xCopyAreaReq *data ); -void XETSwCopyPlane (xCopyPlaneReq *data ); -void XETSwPoly (xPolyPointReq *data , ClientPtr client ); -void XETSwFillPoly (xFillPolyReq *data , ClientPtr client ); -void XETSwPutImage (xPutImageReq *data ); -void XETSwGetImage (xGetImageReq *data ); -void XETSwPolyText (xPolyTextReq *data ); -void XETSwImageText (xImageTextReq *data ); -void XETSwCreateColormap (xCreateColormapReq *data ); -void XETSwCopyColormapAndFree (xCopyColormapAndFreeReq *data ); -void XETSwAllocColor (xAllocColorReq *data ); -void XETSwAllocNamedColor (xAllocNamedColorReq *data ); -void XETSwAllocColorCells (xAllocColorCellsReq *data ); -void XETSwAllocColorPlanes (xAllocColorPlanesReq *data ); -void XETSwFreeColors (xFreeColorsReq *data , ClientPtr client ); -void XETSwStoreColors (xStoreColorsReq *data , ClientPtr client ); -void XETSwStoreNamedColor (xStoreNamedColorReq *data ); -void XETSwQueryColors (xQueryColorsReq *data , ClientPtr client ); -void XETSwLookupColor (xLookupColorReq *data ); -void XETSwCreateCursor (xCreateCursorReq *data ); -void XETSwCreateGlyphCursor (xCreateGlyphCursorReq *data ); -void XETSwRecolorCursor (xRecolorCursorReq *data ); -void XETSwQueryBestSize (xQueryBestSizeReq *data ); -void XETSwQueryExtension (xQueryExtensionReq *data ); -void XETSwChangeKeyboardMapping (xChangeKeyboardMappingReq *data ); -void XETSwChangeKeyboardControl (xChangeKeyboardControlReq *data , ClientPtr client ); -void XETSwChangePointerControl (xChangePointerControlReq *data ); -void XETSwSetScreenSaver (xSetScreenSaverReq *data ); -void XETSwChangeHosts (xChangeHostsReq *data ); -void XETSwRotateProperties (xRotatePropertiesReq *data , ClientPtr client ); -void XETSwNoOperation (xReq *data ); -#ifdef vms -void SwapLongs (long *list , unsigned long count ); -void SwapShorts (short *list , unsigned long count ); -int SwapColorItem (xColorItem *pItem ); -#endif /* vms */ - - -#endif /* __XTRAPPROTO__ */ diff --git a/nx-X11/lib/Xext/Imakefile b/nx-X11/lib/Xext/Imakefile index c43361f12..065667123 100644 --- a/nx-X11/lib/Xext/Imakefile +++ b/nx-X11/lib/Xext/Imakefile @@ -31,12 +31,12 @@ ALLOC_DEFINES = Malloc0ReturnsNullDefines DEFINES = $(ALLOC_DEFINES) INCLUDES = -I$(XLIBSRC) - SRCS = globals.c extutil.c XMultibuf.c XShape.c $(SHMSRCS) \ - MITMisc.c XTestExt1.c XSync.c Xdbe.c XLbx.c \ - XSecurity.c XAppgroup.c Xcup.c DPMS.c XEVI.c - OBJS = globals.o extutil.o XMultibuf.o XShape.o $(SHMOBJS) \ - MITMisc.o XTestExt1.o XSync.o Xdbe.o XLbx.o \ - XSecurity.o XAppgroup.o Xcup.o DPMS.o XEVI.o + SRCS = globals.c extutil.c XShape.c $(SHMSRCS) \ + XTestExt1.c XSync.c \ + XSecurity.c DPMS.c + OBJS = globals.o extutil.o XShape.o $(SHMOBJS) \ + XTestExt1.o XSync.o \ + XSecurity.o DPMS.o LINTLIBS = $(LINTXLIB) #include diff --git a/nx-X11/lib/Xext/MITMisc.c b/nx-X11/lib/Xext/MITMisc.c deleted file mode 100644 index 8ba35dce1..000000000 --- a/nx-X11/lib/Xext/MITMisc.c +++ /dev/null @@ -1,133 +0,0 @@ -/* - * $Xorg: MITMisc.c,v 1.4 2001/02/09 02:03:49 xorgcvs Exp $ - * -Copyright 1989, 1998 The Open Group - -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. - -The above copyright notice and this permission notice 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 -OPEN GROUP 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. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - * - */ -/* $XFree86: xc/lib/Xext/MITMisc.c,v 1.3 2002/10/16 00:37:27 dawes Exp $ */ - -/* RANDOM CRUFT! THIS HAS NO OFFICIAL X CONSORTIUM BLESSING */ - -#define NEED_REPLIES -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include -#include - -static XExtensionInfo _mit_info_data; -static XExtensionInfo *mit_info = &_mit_info_data; -static /* const */ char *mit_extension_name = MITMISCNAME; - -#define MITCheckExtension(dpy,i,val) \ - XextCheckExtension (dpy, i, mit_extension_name, val) - -/***************************************************************************** - * * - * private utility routines * - * * - *****************************************************************************/ - -static int close_display(Display *dpy, XExtCodes *codes); -static /* const */ XExtensionHooks mit_extension_hooks = { - NULL, /* create_gc */ - NULL, /* copy_gc */ - NULL, /* flush_gc */ - NULL, /* free_gc */ - NULL, /* create_font */ - NULL, /* free_font */ - close_display, /* close_display */ - NULL, /* wire_to_event */ - NULL, /* event_to_wire */ - NULL, /* error */ - NULL /* error_string */ -}; - -static XEXT_GENERATE_FIND_DISPLAY (find_display, mit_info, mit_extension_name, - &mit_extension_hooks, MITMiscNumberEvents, - NULL) - -static XEXT_GENERATE_CLOSE_DISPLAY (close_display, mit_info) - - -/***************************************************************************** - * * - * public routines * - * * - *****************************************************************************/ - -Bool XMITMiscQueryExtension (Display *dpy, int *event_basep, int *error_basep) -{ - XExtDisplayInfo *info = find_display (dpy); - - if (XextHasExtension(info)) { - *event_basep = info->codes->first_event; - *error_basep = info->codes->first_error; - return True; - } else { - return False; - } -} - - -Status XMITMiscSetBugMode(Display *dpy, Bool onOff) -{ - XExtDisplayInfo *info = find_display (dpy); - register xMITSetBugModeReq *req; - - MITCheckExtension (dpy, info, 0); - - LockDisplay(dpy); - GetReq(MITSetBugMode, req); - req->reqType = info->codes->major_opcode; - req->mitReqType = X_MITSetBugMode; - req->onOff = onOff; - UnlockDisplay(dpy); - SyncHandle(); - return 1; -} - -Bool XMITMiscGetBugMode(Display *dpy) -{ - XExtDisplayInfo *info = find_display (dpy); - register xMITGetBugModeReq *req; - xMITGetBugModeReply rep; - - MITCheckExtension (dpy, info, 0); - - LockDisplay(dpy); - GetReq(MITGetBugMode, req); - req->reqType = info->codes->major_opcode; - req->mitReqType = X_MITGetBugMode; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - UnlockDisplay(dpy); - SyncHandle(); - return rep.onOff; -} diff --git a/nx-X11/lib/Xext/XAppgroup.c b/nx-X11/lib/Xext/XAppgroup.c deleted file mode 100644 index abbf1c1b9..000000000 --- a/nx-X11/lib/Xext/XAppgroup.c +++ /dev/null @@ -1,391 +0,0 @@ -/* $XFree86: xc/lib/Xext/XAppgroup.c,v 1.11 2002/10/16 02:19:22 dawes Exp $ */ -/* - -Copyright 1996, 1998 The Open Group - -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. - -The above copyright notice and this permission notice 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 -OPEN GROUP 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. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ -/* $Xorg: XAppgroup.c,v 1.5 2001/02/09 02:03:49 xorgcvs Exp $ */ - -#ifdef WIN32 -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#endif - -#define NEED_EVENTS -#define NEED_REPLIES -#include -#include -#include -#include - -#include - -struct xagstuff { - int attrib_mask; - Bool app_group_leader; - Bool single_screen; - Window default_root; - VisualID root_visual; - Colormap default_colormap; - unsigned long black_pixel; - unsigned long white_pixel; -}; - -static XExtensionInfo _xag_info_data; -static XExtensionInfo *xag_info = &_xag_info_data; -static char *xag_extension_name = XAGNAME; - -#define XagCheckExtension(dpy,i,val) \ - XextCheckExtension (dpy, i, xag_extension_name, val) - -/***************************************************************************** - * * - * private utility routines * - * * - *****************************************************************************/ - -static int close_display(Display *dpy, XExtCodes *codes); -static /* const */ XExtensionHooks xag_extension_hooks = { - NULL, /* create_gc */ - NULL, /* copy_gc */ - NULL, /* flush_gc */ - NULL, /* free_gc */ - NULL, /* create_font */ - NULL, /* free_font */ - close_display, /* close_display */ - NULL, /* wire_to_event */ - NULL, /* event_to_wire */ - NULL, /* error */ - NULL, /* error_string */ -}; - -static XEXT_GENERATE_FIND_DISPLAY (find_display, xag_info, - xag_extension_name, - &xag_extension_hooks, - 0, NULL) - -static XEXT_GENERATE_CLOSE_DISPLAY (close_display, xag_info) - - -/***************************************************************************** - * * - * public Xag Extension routines * - * * - *****************************************************************************/ - -Bool -XagQueryVersion( - Display *dpy, - int *major_version_return, - int *minor_version_return) -{ - XExtDisplayInfo *info = find_display (dpy); - xXagQueryVersionReply rep; - xXagQueryVersionReq *req; - - XagCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XagQueryVersion, req); - req->reqType = info->codes->major_opcode; - req->xagReqType = X_XagQueryVersion; - req->client_major_version = XAG_MAJOR_VERSION; - req->client_minor_version = XAG_MINOR_VERSION; - if (!_XReply(dpy, (xReply *)&rep, 0, xTrue)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - *major_version_return = rep.server_major_version; - *minor_version_return = rep.server_minor_version; - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -static void -StuffToWire (Display *dpy, struct xagstuff *stuff, xXagCreateReq *req) -{ - unsigned long values[8]; - unsigned long* value = values; - unsigned int nvalues; - - /* the order these are in is important */ - if (stuff->attrib_mask & XagSingleScreenMask) - *value++ = stuff->single_screen; - - if (stuff->attrib_mask & XagDefaultRootMask) - *value++ = stuff->default_root; - - if (stuff->attrib_mask & XagRootVisualMask) - *value++ = stuff->root_visual; - - if (stuff->attrib_mask & XagDefaultColormapMask) - *value++ = stuff->default_colormap; - - if (stuff->attrib_mask & XagBlackPixelMask) - *value++ = stuff->black_pixel; - - if (stuff->attrib_mask & XagWhitePixelMask) - *value++ = stuff->white_pixel; - - if (stuff->attrib_mask & XagAppGroupLeaderMask) - *value++ = stuff->app_group_leader; - - req->length += (nvalues = value - values); - - nvalues <<= 2; - Data32 (dpy, (long*) values, (long) nvalues); -} - -Bool -XagCreateEmbeddedApplicationGroup( - Display* dpy, - VisualID root_visual, - Colormap default_colormap, - unsigned long black_pixel, - unsigned long white_pixel, - XAppGroup* app_group_return) -{ - XExtDisplayInfo *info = find_display (dpy); - xXagCreateReq *req; - struct xagstuff stuff; - - XagCheckExtension (dpy, info, False); - - LockDisplay(dpy); - stuff.app_group_leader = True; - stuff.single_screen = True; - stuff.default_root = RootWindow (dpy, DefaultScreen(dpy)); - stuff.root_visual = root_visual; - stuff.default_colormap = default_colormap; - stuff.attrib_mask = - XagAppGroupLeaderMask | XagSingleScreenMask | XagDefaultRootMask | - XagRootVisualMask | XagDefaultColormapMask; - if (default_colormap != None) { - stuff.black_pixel = black_pixel; - stuff.white_pixel = white_pixel; - stuff.attrib_mask |= XagBlackPixelMask | XagWhitePixelMask; - } - /* might do some validation here */ - GetReq(XagCreate, req); - req->reqType = info->codes->major_opcode; - req->xagReqType = X_XagCreate; - *app_group_return = req->app_group = XAllocID(dpy); - req->attrib_mask = stuff.attrib_mask; - StuffToWire (dpy, &stuff, req); - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -Bool -XagCreateNonembeddedApplicationGroup( - Display* dpy, - XAppGroup* app_group_return) -{ - XExtDisplayInfo *info = find_display (dpy); - xXagCreateReq *req; - struct xagstuff stuff; - - XagCheckExtension (dpy, info, False); - - LockDisplay(dpy); - stuff.app_group_leader = False; - stuff.single_screen = False; - stuff.attrib_mask = XagAppGroupLeaderMask | XagSingleScreenMask; - /* might do some validation here */ - GetReq(XagCreate, req); - req->reqType = info->codes->major_opcode; - req->xagReqType = X_XagCreate; - *app_group_return = req->app_group = XAllocID(dpy); - req->attrib_mask = stuff.attrib_mask; - StuffToWire (dpy, &stuff, req); - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -Bool XagDestroyApplicationGroup(Display* dpy, XAppGroup app_group) -{ - XExtDisplayInfo *info = find_display (dpy); - xXagDestroyReq *req; - - XagCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XagDestroy, req); - req->reqType = info->codes->major_opcode; - req->xagReqType = X_XagDestroy; - req->app_group = app_group; - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -Bool -XagGetApplicationGroupAttributes(Display* dpy, XAppGroup app_group, ...) -{ - va_list var; - XExtDisplayInfo *info = find_display (dpy); - xXagGetAttrReq *req; - xXagGetAttrReply rep; - int attr; - - XagCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XagGetAttr, req); - req->reqType = info->codes->major_opcode; - req->xagReqType = X_XagGetAttr; - req->app_group = app_group; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - va_start (var, app_group); - for (attr = va_arg(var, int); attr != 0; attr = va_arg(var, int)) { - void* ptr; - - switch (attr) { - case XagNappGroupLeader: - ptr = va_arg(var, void*); - *(Bool*)ptr = rep.app_group_leader; - break; - case XagNsingleScreen: - ptr = va_arg(var, void*); - *(Bool*)ptr = rep.single_screen; - break; - case XagNdefaultRoot: - ptr = va_arg(var, void*); - *(Window*)ptr = rep.default_root; - break; - case XagNrootVisual: - ptr = va_arg(var, void*); - *(VisualID*)ptr = rep.root_visual; - break; - case XagNdefaultColormap: - ptr = va_arg(var, void*); - *(Colormap*)ptr = rep.default_colormap; - break; - case XagNblackPixel: - ptr = va_arg(var, void*); - *(unsigned long*)ptr = rep.black_pixel; - break; - case XagNwhitePixel: - ptr = va_arg(var, void*); - *(unsigned long*)ptr = rep.white_pixel; - break; - } - } - va_end (var); - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -Bool -XagQueryApplicationGroup( - Display* dpy, - XID resource, - XAppGroup* app_group_return) -{ - XExtDisplayInfo *info = find_display (dpy); - xXagQueryReq *req; - xXagQueryReply rep; - - XagCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XagQuery, req); - req->reqType = info->codes->major_opcode; - req->xagReqType = X_XagQuery; - req->resource = resource; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - *app_group_return = rep.app_group; - UnlockDisplay(dpy); - SyncHandle(); - return True; - -} - -Bool -XagCreateAssociation(Display* dpy, Window* window_return, void* system_window) -{ -#ifdef WIN32 - long tmp = *(HWND*) system_window; - XExtDisplayInfo *info = find_display (dpy); - xXagCreateAssocReq *req; - - XagCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XagCreateAssoc, req); - req->reqType = info->codes->major_opcode; - req->xagReqType = X_XagCreateAssoc; - *window_return = req->window = XAllocID(dpy); - req->window_type = XagWindowTypeWin32; - req->system_window_len = sizeof(HWND); - Data32 (dpy, (long*) tmp, 1L); - req->length++; - UnlockDisplay(dpy); - SyncHandle(); -#else - /* other platforms go here */ - - /* this whole thing could be arranged better, but since X need - * only short-circuit the protocol and WIN32 is the only other - * platform the XC supports, it will suffice for now. - */ - *window_return = *(Window*)system_window; -#endif - return True; -} - -Bool -XagDestroyAssociation(Display* dpy, Window window) -{ -#ifdef WIN32 - XExtDisplayInfo *info = find_display (dpy); - xXagDestroyAssocReq *req; - - XagCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XagDestroyAssoc, req); - req->reqType = info->codes->major_opcode; - req->xagReqType = X_XagDestroyAssoc; - req->window = window; - UnlockDisplay(dpy); - SyncHandle(); -#endif - return True; -} - diff --git a/nx-X11/lib/Xext/XEVI.c b/nx-X11/lib/Xext/XEVI.c deleted file mode 100644 index e5a811bdf..000000000 --- a/nx-X11/lib/Xext/XEVI.c +++ /dev/null @@ -1,213 +0,0 @@ -/* $Xorg: XEVI.c,v 1.3 2000/08/17 19:45:51 cpqbld Exp $ */ -/************************************************************ -Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc. -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, 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 Silicon Graphics not be -used in advertising or publicity pertaining to distribution -of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability -of this software for any purpose. It is provided "as is" -without any express or implied warranty. -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS 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. -********************************************************/ -/* $XFree86$ */ -#define NEED_EVENTS -#define NEED_REPLIES -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include -#include -#include -static XExtensionInfo *xevi_info;/* needs to move to globals.c */ -static /* const */ char *xevi_extension_name = EVINAME; -#define XeviCheckExtension(dpy,i,val) \ - XextCheckExtension (dpy, i, xevi_extension_name, val) -/***************************************************************************** - * * - * private utility routines * - * * - *****************************************************************************/ -static /* const */ XExtensionHooks xevi_extension_hooks = { - NULL, /* create_gc */ - NULL, /* copy_gc */ - NULL, /* flush_gc */ - NULL, /* free_gc */ - NULL, /* create_font */ - NULL, /* free_font */ - NULL, /* close_display */ - NULL, /* wire_to_event */ - NULL, /* event_to_wire */ - NULL, /* error */ - NULL, /* error_string */ -}; -static XEXT_GENERATE_FIND_DISPLAY (find_display, xevi_info, - xevi_extension_name, - &xevi_extension_hooks, 0, NULL) -Bool XeviQueryExtension (Display *dpy) -{ - XExtDisplayInfo *info = find_display (dpy); - if (XextHasExtension(info)) { - return True; - } else { - return False; - } -} -Bool XeviQueryVersion(Display *dpy, int *majorVersion, int *minorVersion) -{ - XExtDisplayInfo *info = find_display (dpy); - xEVIQueryVersionReply rep; - register xEVIQueryVersionReq *req; - XeviCheckExtension (dpy, info, False); - LockDisplay(dpy); - GetReq(EVIQueryVersion, req); - req->reqType = info->codes->major_opcode; - req->xeviReqType = X_EVIQueryVersion; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - *majorVersion = rep.majorVersion; - *minorVersion = rep.minorVersion; - UnlockDisplay(dpy); - SyncHandle(); - return True; -} -static Bool notInList(VisualID32 *visual, int sz_visual, VisualID newVisualid) -{ - while (sz_visual-- > 0) { - if (*visual == newVisualid) - return False; - visual++; - } - return True; -} -Status XeviGetVisualInfo( - register Display *dpy, - VisualID *visual, - int n_visual, - ExtendedVisualInfo **evi_return, - int *n_info_return) -{ - XExtDisplayInfo *info = find_display (dpy); - register xEVIGetVisualInfoReq *req; - xEVIGetVisualInfoReply rep; - int sz_info, sz_xInfo, sz_conflict, sz_xConflict; - VisualID32 *temp_conflict, *temp_visual, *xConflictPtr; - VisualID *conflict; - xExtendedVisualInfo *temp_xInfo; - XVisualInfo *vinfo; - register ExtendedVisualInfo *infoPtr; - register xExtendedVisualInfo *xInfoPtr; - register int n_data, visualIndex, vinfoIndex; - Bool isValid; - XeviCheckExtension (dpy, info, 0); - *n_info_return = 0; - *evi_return = NULL; - vinfo = XGetVisualInfo(dpy, 0, NULL, &sz_info); - if (!vinfo) { - return BadValue; - } - if (!n_visual || !visual) { /* copy the all visual */ - temp_visual = (VisualID32 *)Xmalloc(sz_VisualID32 * sz_info); - n_visual = 0; - for (vinfoIndex = 0; vinfoIndex < sz_info; vinfoIndex++) - if (notInList(temp_visual, n_visual, vinfo[vinfoIndex].visualid)) - temp_visual[n_visual++] = vinfo[vinfoIndex].visualid; - } - else { /* check if the visual is valid */ - for (visualIndex = 0; visualIndex < n_visual; visualIndex++) { - isValid = False; - for (vinfoIndex = 0; vinfoIndex < sz_info; vinfoIndex++) { - if (visual[visualIndex] == vinfo[vinfoIndex].visualid) { - isValid = True; - break; - } - } - if (!isValid) { - XFree(vinfo); - return BadValue; - } - } - temp_visual = (VisualID32 *)Xmalloc(sz_VisualID32 * n_visual); - for (visualIndex = 0; visualIndex < n_visual; visualIndex++) - temp_visual[visualIndex] = visual[visualIndex]; - } - XFree(vinfo); - LockDisplay(dpy); - GetReq(EVIGetVisualInfo, req); - req->reqType = info->codes->major_opcode; - req->xeviReqType = X_EVIGetVisualInfo; - req->n_visual = n_visual; - SetReqLen(req, n_visual, 1); - Data(dpy, (char *)temp_visual, n_visual * sz_VisualID32); - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - Xfree(temp_visual); - return BadAccess; - } - Xfree(temp_visual); - sz_info = rep.n_info * sizeof(ExtendedVisualInfo); - sz_xInfo = rep.n_info * sz_xExtendedVisualInfo; - sz_conflict = rep.n_conflicts * sizeof(VisualID); - sz_xConflict = rep.n_conflicts * sz_VisualID32; - infoPtr = *evi_return = (ExtendedVisualInfo *)Xmalloc(sz_info + sz_conflict); - xInfoPtr = temp_xInfo = (xExtendedVisualInfo *)Xmalloc(sz_xInfo); - xConflictPtr = temp_conflict = (VisualID32 *)Xmalloc(sz_xConflict); - if (!*evi_return || !temp_xInfo || !temp_conflict) { - _XEatData(dpy, (sz_xInfo + sz_xConflict + 3) & ~3); - UnlockDisplay(dpy); - SyncHandle(); - if (evi_return) - Xfree(evi_return); - if (temp_xInfo) - Xfree(temp_xInfo); - if (temp_conflict) - Xfree(temp_conflict); - return BadAlloc; - } - _XRead(dpy, (char *)temp_xInfo, sz_xInfo); - _XRead(dpy, (char *)temp_conflict, sz_xConflict); - UnlockDisplay(dpy); - SyncHandle(); - n_data = rep.n_info; - conflict = (VisualID *)(infoPtr + n_data); - while (n_data-- > 0) { - infoPtr->core_visual_id = xInfoPtr->core_visual_id; - infoPtr->screen = xInfoPtr->screen; - infoPtr->level = xInfoPtr->level; - infoPtr->transparency_type = xInfoPtr->transparency_type; - infoPtr->transparency_value = xInfoPtr->transparency_value; - infoPtr->min_hw_colormaps = xInfoPtr->min_hw_colormaps; - infoPtr->max_hw_colormaps = xInfoPtr->max_hw_colormaps; - infoPtr->num_colormap_conflicts = xInfoPtr->num_colormap_conflicts; - infoPtr->colormap_conflicts = conflict; - conflict += infoPtr->num_colormap_conflicts; - infoPtr++; - xInfoPtr++; - } - n_data = rep.n_conflicts; - conflict = (VisualID *)(infoPtr); - while (n_data-- > 0) - *conflict++ = *xConflictPtr++; - Xfree(temp_xInfo); - Xfree(temp_conflict); - *n_info_return = rep.n_info; - return Success; -} diff --git a/nx-X11/lib/Xext/XLbx.c b/nx-X11/lib/Xext/XLbx.c deleted file mode 100644 index 450bd5bc5..000000000 --- a/nx-X11/lib/Xext/XLbx.c +++ /dev/null @@ -1,129 +0,0 @@ -/* - * $Xorg: XLbx.c,v 1.3 2000/08/17 19:45:51 cpqbld Exp $ - * - * Copyright 1992 Network Computing Devices - * - * 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 NCD. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. NCD. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD. - * 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, Network Computing Devices - */ -/* $XFree86: xc/lib/Xext/XLbx.c,v 1.4 2002/10/16 00:37:27 dawes Exp $ */ - -#define NEED_EVENTS -#define NEED_REPLIES -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include -#include -#include - -static XExtensionInfo _lbx_info_data; -static XExtensionInfo *lbx_info = &_lbx_info_data; -static /* const */ char *lbx_extension_name = LBXNAME; - -#define LbxCheckExtension(dpy,i,val) \ - XextCheckExtension (dpy, i, lbx_extension_name, val) - -static int close_display(Display *dpy, XExtCodes *codes); -static char *error_string(Display *dpy, int code, XExtCodes *codes, - char *buf, int n); -static /* const */ XExtensionHooks lbx_extension_hooks = { - NULL, /* create_gc */ - NULL, /* copy_gc */ - NULL, /* flush_gc */ - NULL, /* free_gc */ - NULL, /* create_font */ - NULL, /* free_font */ - close_display, /* close_display */ - NULL, /* wire_to_event */ - NULL, /* event_to_wire */ - NULL, /* error */ - error_string, /* error_string */ -}; - -static /* const */ char *lbx_error_list[] = { - "BadLbxClient", /* BadLbxClient */ -}; - -static XEXT_GENERATE_FIND_DISPLAY (find_display, lbx_info, lbx_extension_name, - &lbx_extension_hooks, LbxNumberEvents, NULL) - -static XEXT_GENERATE_CLOSE_DISPLAY (close_display, lbx_info) - -static XEXT_GENERATE_ERROR_STRING (error_string, lbx_extension_name, - LbxNumberErrors, lbx_error_list) - - -Bool XLbxQueryExtension ( - Display *dpy, - int *requestp, int *event_basep, int *error_basep) -{ - XExtDisplayInfo *info = find_display (dpy); - - if (XextHasExtension(info)) { - *requestp = info->codes->major_opcode; - *event_basep = info->codes->first_event; - *error_basep = info->codes->first_error; - return True; - } else { - return False; - } -} - - -int XLbxGetEventBase(Display *dpy) -{ - XExtDisplayInfo *info = find_display (dpy); - - if (XextHasExtension(info)) { - return info->codes->first_event; - } else { - return -1; - } -} - - -Bool XLbxQueryVersion(Display *dpy, int *majorVersion, int *minorVersion) -{ - XExtDisplayInfo *info = find_display (dpy); - xLbxQueryVersionReply rep; - register xLbxQueryVersionReq *req; - - LbxCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(LbxQueryVersion, req); - req->reqType = info->codes->major_opcode; - req->lbxReqType = X_LbxQueryVersion; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - *majorVersion = rep.majorVersion; - *minorVersion = rep.minorVersion; - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -/* all other requests will run after Xlib has lost the wire ... */ diff --git a/nx-X11/lib/Xext/XMultibuf.c b/nx-X11/lib/Xext/XMultibuf.c deleted file mode 100644 index 570676def..000000000 --- a/nx-X11/lib/Xext/XMultibuf.c +++ /dev/null @@ -1,714 +0,0 @@ -/* - * $Xorg: XMultibuf.c,v 1.6 2001/02/09 02:03:49 xorgcvs Exp $ - * -Copyright 1989, 1998 The Open Group - -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. - -The above copyright notice and this permission notice 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 -OPEN GROUP 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. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - * - * Authors: Jim Fulton, MIT X Consortium - */ -/* $XFree86: xc/lib/Xext/XMultibuf.c,v 1.5 2001/12/14 19:55:00 dawes Exp $ */ - -#define NEED_EVENTS -#define NEED_REPLIES -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include -#include - -static XExtensionInfo _multibuf_info_data; -static XExtensionInfo *multibuf_info = &_multibuf_info_data; -static /* const */ char *multibuf_extension_name = MULTIBUFFER_PROTOCOL_NAME; - -#define MbufCheckExtension(dpy,i,val) \ - XextCheckExtension (dpy, i, multibuf_extension_name, val) -#define MbufSimpleCheckExtension(dpy,i) \ - XextSimpleCheckExtension (dpy, i, multibuf_extension_name) - - -/***************************************************************************** - * * - * private utility routines * - * * - *****************************************************************************/ - -/* - * find_display - locate the display info block - */ -static int close_display(Display *dpy, XExtCodes *codes); -static char *error_string(Display *dpy, int code, XExtCodes *codes, char *buf, int n); -static Bool wire_to_event(Display *dpy, XEvent *libevent, xEvent *netevent); -static Status event_to_wire(Display *dpy, XEvent *libevent, xEvent *netevent); -static /* const */ XExtensionHooks multibuf_extension_hooks = { - NULL, /* create_gc */ - NULL, /* copy_gc */ - NULL, /* flush_gc */ - NULL, /* free_gc */ - NULL, /* create_font */ - NULL, /* free_font */ - close_display, /* close_display */ - wire_to_event, /* wire_to_event */ - event_to_wire, /* event_to_wire */ - NULL, /* error */ - error_string, /* error_string */ -}; - -static /* const */ char *multibuf_error_list[] = { - "BadBuffer", /* MultibufferBadBuffer */ -}; - -static XEXT_GENERATE_FIND_DISPLAY (find_display, multibuf_info, - multibuf_extension_name, - &multibuf_extension_hooks, - MultibufferNumberEvents, NULL) - -static XEXT_GENERATE_CLOSE_DISPLAY (close_display, multibuf_info) - -static XEXT_GENERATE_ERROR_STRING (error_string, multibuf_extension_name, - MultibufferNumberErrors, - multibuf_error_list) - -/* - * wire_to_event - convert a wire event in network format to a C - * event structure - */ -static Bool wire_to_event (Display *dpy, XEvent *libevent, xEvent *netevent) -{ - XExtDisplayInfo *info = find_display (dpy); - - MbufCheckExtension (dpy, info, False); - - switch ((netevent->u.u.type & 0x7f) - info->codes->first_event) { - case MultibufferClobberNotify: - { - XmbufClobberNotifyEvent *ev; - xMbufClobberNotifyEvent *event; - - ev = (XmbufClobberNotifyEvent *) libevent; - event = (xMbufClobberNotifyEvent *) netevent; - ev->type = event->type & 0x7f; - ev->serial = _XSetLastRequestRead(dpy,(xGenericReply *) netevent); - ev->send_event = ((event->type & 0x80) != 0); - ev->display = dpy; - ev->buffer = event->buffer; - ev->state = event->state; - return True; - } - case MultibufferUpdateNotify: - { - XmbufUpdateNotifyEvent *ev; - xMbufUpdateNotifyEvent *event; - - ev = (XmbufUpdateNotifyEvent *) libevent; - event = (xMbufUpdateNotifyEvent *) netevent; - ev->type = event->type & 0x7f; - ev->serial = _XSetLastRequestRead(dpy,(xGenericReply *) netevent); - ev->send_event = ((event->type & 0x80) != 0); - ev->display = dpy; - ev->buffer = event->buffer; - return True; - } - } - return False; -} - - -/* - * event_to_wire - convert a C event structure to a wire event in - * network format - */ -static Status event_to_wire (Display *dpy, XEvent *libevent, xEvent *netevent) -{ - XExtDisplayInfo *info = find_display (dpy); - - MbufCheckExtension (dpy, info, 0); - - switch ((libevent->type & 0x7f) - info->codes->first_event) { - case MultibufferClobberNotify: - { - XmbufClobberNotifyEvent *ev; - xMbufClobberNotifyEvent *event; - - ev = (XmbufClobberNotifyEvent *) libevent; - event = (xMbufClobberNotifyEvent *) netevent; - event->type = ev->type; - event->sequenceNumber = (ev->serial & 0xffff); - event->buffer = ev->buffer; - event->state = ev->state; - return 1; - } - case MultibufferUpdateNotify: - { - XmbufUpdateNotifyEvent *ev; - xMbufUpdateNotifyEvent *event; - - ev = (XmbufUpdateNotifyEvent *) libevent; - event = (xMbufUpdateNotifyEvent *) netevent; - event->type = ev->type; - event->sequenceNumber = (ev->serial & 0xffff); - event->buffer = ev->buffer; - return 1; - } - } - return 0; -} - - -/* - * read_buffer_info - read Buffer Info descriptors from the net; if unable - * to allocate memory, read junk to make sure that stream is clear. - */ -#define TALLOC(type,count) ((type *) Xmalloc ((unsigned) count * sizeof(type))) - -static XmbufBufferInfo *read_buffer_info (Display *dpy, int nbufs) -{ - xMbufBufferInfo *netbuf = TALLOC (xMbufBufferInfo, nbufs); - XmbufBufferInfo *bufinfo = NULL; - long netbytes = nbufs * SIZEOF(xMbufBufferInfo); - - if (netbuf) { - _XRead (dpy, (char *) netbuf, netbytes); - - bufinfo = TALLOC (XmbufBufferInfo, nbufs); - if (bufinfo) { - register XmbufBufferInfo *c; - register xMbufBufferInfo *net; - register int i; - - for (i = 0, c = bufinfo, net = netbuf; i < nbufs; - i++, c++, net++) { - c->visualid = net->visualID; - c->max_buffers = net->maxBuffers; - c->depth = net->depth; - } - } - Xfree ((char *) netbuf); - } else { /* eat the data */ - while (netbytes > 0) { - char dummy[256]; /* stack size vs loops tradeoff */ - long nbytes = sizeof dummy; - - if (nbytes > netbytes) nbytes = netbytes; - _XRead (dpy, dummy, nbytes); - netbytes -= nbytes; - } - } - - return bufinfo; -} - -#undef TALLOC - - -/***************************************************************************** - * * - * Multibuffering/stereo public interfaces * - * * - *****************************************************************************/ - - -/* - * XmbufQueryExtension - - * Returns True if the multibuffering/stereo extension is available - * on the given display. If the extension exists, the value of the - * first event code (which should be added to the event type constants - * MultibufferClobberNotify and MultibufferUpdateNotify to get the - * actual values) is stored into event_base and the value of the first - * error code (which should be added to the error type constant - * MultibufferBadBuffer to get the actual value) is stored into - * error_base. - */ -Bool XmbufQueryExtension ( - Display *dpy, - int *event_base_return, int *error_base_return) -{ - XExtDisplayInfo *info = find_display (dpy); - - if (XextHasExtension (info)) { - *event_base_return = info->codes->first_event; - *error_base_return = info->codes->first_error; - return True; - } else { - return False; - } -} - - -/* - * XmbufGetVersion - - * Gets the major and minor version numbers of the extension. The return - * value is zero if an error occurs or non-zero if no error happens. - */ -Status XmbufGetVersion ( - Display *dpy, - int *major_version_return, int *minor_version_return) -{ - XExtDisplayInfo *info = find_display (dpy); - xMbufGetBufferVersionReply rep; - register xMbufGetBufferVersionReq *req; - - MbufCheckExtension (dpy, info, 0); - - LockDisplay (dpy); - MbufGetReq (MbufGetBufferVersion, req, info); - if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - *major_version_return = rep.majorVersion; - *minor_version_return = rep.minorVersion; - UnlockDisplay (dpy); - - SyncHandle (); - return 1; -} - - -/* - * XmbufCreateBuffers - - * Requests that "count" buffers be created with the given update_action - * and update_hint and be associated with the indicated window. The - * number of buffers created is returned (zero if an error occurred) - * and buffers_return is filled in with that many Multibuffer identifiers. - */ -int XmbufCreateBuffers ( - Display *dpy, - Window w, - int count, - int update_action, int update_hint, - Multibuffer *buffers) -{ - XExtDisplayInfo *info = find_display (dpy); - xMbufCreateImageBuffersReply rep; - register xMbufCreateImageBuffersReq *req; - int result; - - MbufCheckExtension (dpy, info, 0); - - LockDisplay (dpy); - - XAllocIDs(dpy, buffers, count); - MbufGetReq (MbufCreateImageBuffers, req, info); - req->window = w; - req->updateAction = update_action; - req->updateHint = update_hint; - req->length += count; - count <<= 2; - PackData32 (dpy, buffers, count); - if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - result = rep.numberBuffer; - UnlockDisplay (dpy); - - SyncHandle (); - return result; -} - - -/* - * XmbufDestroyBuffers - - * Destroys the buffers associated with the given window. - */ -void XmbufDestroyBuffers (Display *dpy, Window window) -{ - XExtDisplayInfo *info = find_display (dpy); - register xMbufDestroyImageBuffersReq *req; - - MbufSimpleCheckExtension (dpy, info); - - LockDisplay (dpy); - MbufGetReq (MbufDestroyImageBuffers, req, info); - req->window = window; - UnlockDisplay (dpy); - SyncHandle (); -} - - -/* - * XmbufDisplayBuffers - - * Displays the indicated buffers their appropriate windows within - * max_delay milliseconds after min_delay milliseconds have passed. - * No two buffers may be associated with the same window or else a Matc - * error is generated. - */ -void XmbufDisplayBuffers ( - Display *dpy, - int count, - Multibuffer *buffers, - int min_delay, int max_delay) -{ - XExtDisplayInfo *info = find_display (dpy); - register xMbufDisplayImageBuffersReq *req; - - MbufSimpleCheckExtension (dpy, info); - - LockDisplay (dpy); - MbufGetReq (MbufDisplayImageBuffers, req, info); - req->minDelay = min_delay; - req->maxDelay = max_delay; - req->length += count; - count <<= 2; - PackData32 (dpy, buffers, count); - UnlockDisplay (dpy); - SyncHandle(); -} - - -/* - * XmbufGetWindowAttributes - - * Gets the multibuffering attributes that apply to all buffers associated - * with the given window. Returns non-zero on success and zero if an - * error occurs. - */ -Status XmbufGetWindowAttributes ( - Display *dpy, - Window w, - XmbufWindowAttributes *attr) -{ - XExtDisplayInfo *info = find_display (dpy); - register xMbufGetMBufferAttributesReq *req; - xMbufGetMBufferAttributesReply rep; - - MbufCheckExtension (dpy, info, 0); - - LockDisplay (dpy); - MbufGetReq (MbufGetMBufferAttributes, req, info); - req->window = w; - if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) { - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - attr->buffers = (Multibuffer *) NULL; - if ((attr->nbuffers = rep.length)) { - int nbytes = rep.length * sizeof(Multibuffer); - attr->buffers = (Multibuffer *) Xmalloc((unsigned) nbytes); - nbytes = rep.length << 2; - if (! attr->buffers) { - _XEatData(dpy, (unsigned long) nbytes); - UnlockDisplay(dpy); - SyncHandle(); - return (0); - } - _XRead32 (dpy, (long *) attr->buffers, nbytes); - } - attr->displayed_index = rep.displayedBuffer; - attr->update_action = rep.updateAction; - attr->update_hint = rep.updateHint; - attr->window_mode = rep.windowMode; - - UnlockDisplay (dpy); - SyncHandle(); - return 1; -} - - -/* - * XmbufChangeWindowAttributes - - * Sets the multibuffering attributes that apply to all buffers associated - * with the given window. This is currently limited to the update_hint. - */ -void XmbufChangeWindowAttributes ( - Display *dpy, - Window w, - unsigned long valuemask, - XmbufSetWindowAttributes *attr) -{ - XExtDisplayInfo *info = find_display (dpy); - register xMbufSetMBufferAttributesReq *req; - - MbufSimpleCheckExtension (dpy, info); - - LockDisplay (dpy); - MbufGetReq (MbufSetMBufferAttributes, req, info); - req->window = w; - if ((req->valueMask = valuemask)) { /* stolen from lib/X/XWindow.c */ - unsigned long values[1]; /* one per element in if stmts below */ - unsigned long *v = values; - unsigned int nvalues; - - if (valuemask & MultibufferWindowUpdateHint) - *v++ = attr->update_hint; - req->length += (nvalues = v - values); - nvalues <<= 2; /* watch out for macros... */ - Data32 (dpy, (long *) values, (long)nvalues); - } - UnlockDisplay (dpy); - SyncHandle(); -} - - -/* - * XmbufGetBufferAttributes - - * Gets the attributes for the indicated buffer. Returns non-zero on - * success and zero if an error occurs. - */ -Status XmbufGetBufferAttributes ( - Display *dpy, - Multibuffer b, - XmbufBufferAttributes *attr) -{ - XExtDisplayInfo *info = find_display (dpy); - register xMbufGetBufferAttributesReq *req; - xMbufGetBufferAttributesReply rep; - - MbufCheckExtension (dpy, info, 0); - - LockDisplay (dpy); - MbufGetReq (MbufGetBufferAttributes, req, info); - req->buffer = b; - if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - attr->window = rep.window; - attr->event_mask = rep.eventMask; - attr->buffer_index = rep.bufferIndex; - attr->side = rep.side; - - UnlockDisplay (dpy); - SyncHandle(); - return 1; -} - - -/* - * XmbufChangeBufferAttributes - - * Sets the attributes for the indicated buffer. This is currently - * limited to the event_mask. - */ -void XmbufChangeBufferAttributes ( - Display *dpy, - Multibuffer b, - unsigned long valuemask, - XmbufSetBufferAttributes *attr) -{ - XExtDisplayInfo *info = find_display (dpy); - register xMbufSetBufferAttributesReq *req; - - MbufSimpleCheckExtension (dpy, info); - - LockDisplay (dpy); - MbufGetReq (MbufSetBufferAttributes, req, info); - req->buffer = b; - if ((req->valueMask = valuemask)) { /* stolen from lib/X/XWindow.c */ - unsigned long values[1]; /* one per element in if stmts below */ - unsigned long *v = values; - unsigned int nvalues; - - if (valuemask & MultibufferBufferEventMask) - *v++ = attr->event_mask; - req->length += (nvalues = v - values); - nvalues <<= 2; /* watch out for macros... */ - Data32 (dpy, (long *) values, (long)nvalues); - } - UnlockDisplay (dpy); - SyncHandle(); -} - - - -/* - * XmbufGetScreenInfo - - * Gets the parameters controlling how mono and stereo windows may be - * created on the indicated screen. The numbers of sets of visual and - * depths are returned in nmono_return and nstereo_return. If - * nmono_return is greater than zero, then mono_info_return is set to - * the address of an array of XmbufBufferInfo structures describing the - * various visuals and depths that may be used. Otherwise, - * mono_info_return is set to NULL. Similarly, stereo_info_return is - * set according to nstereo_return. The storage returned in - * mono_info_return and stereo_info_return may be released by XFree. - * If no errors are encounted, non-zero will be returned. - */ -Status XmbufGetScreenInfo ( - Display *dpy, - Drawable d, - int *nmono_return, - XmbufBufferInfo **mono_info_return, - int *nstereo_return, - XmbufBufferInfo **stereo_info_return) -{ - XExtDisplayInfo *info = find_display (dpy); - register xMbufGetBufferInfoReq *req; - xMbufGetBufferInfoReply rep; - int nmono, nstereo; - XmbufBufferInfo *minfo, *sinfo; - - MbufCheckExtension (dpy, info, 0); - - LockDisplay (dpy); - MbufGetReq (MbufGetBufferInfo, req, info); - req->drawable = d; - if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) { - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - nmono = rep.normalInfo; - nstereo = rep.stereoInfo; - minfo = ((nmono > 0) ? read_buffer_info (dpy, nmono) : NULL); - sinfo = ((nstereo > 0) ? read_buffer_info (dpy, nstereo) : NULL); - - /* check for bad reads indicating we need to return an error */ - if ((nmono > 0 && !minfo) || (nstereo > 0 && !sinfo)) { - if (minfo) Xfree ((char *) minfo); - if (sinfo) Xfree ((char *) sinfo); - UnlockDisplay (dpy); - SyncHandle(); - return 0; - } - - *nmono_return = nmono; - *mono_info_return = minfo; - *nstereo_return = nstereo; - *stereo_info_return = sinfo; - - UnlockDisplay (dpy); - SyncHandle(); - return 1; -} - - -/* - * XmbufCreateStereoWindow - - * Creates a stereo window in the same way that XCreateWindow creates - * a mono window (in fact, use the same code, except for the request) - * and returns the left and right buffers that may be - */ -Window XmbufCreateStereoWindow ( - Display *dpy, - Window parent, - int x, int y, - unsigned int width, unsigned int height, unsigned int border_width, - int depth, - unsigned int class, - Visual *visual, - unsigned long valuemask, - XSetWindowAttributes *attr, - Multibuffer *leftp, Multibuffer *rightp) -{ - XExtDisplayInfo *info = find_display (dpy); - Window wid; - register xMbufCreateStereoWindowReq *req; - - MbufCheckExtension (dpy, info, None); - - LockDisplay(dpy); - MbufGetReq(MbufCreateStereoWindow, req, info); - wid = req->wid = XAllocID(dpy); - req->parent = parent; - req->left = *leftp = XAllocID (dpy); - req->right = *rightp = XAllocID (dpy); - req->x = x; - req->y = y; - req->width = width; - req->height = height; - req->borderWidth = border_width; - req->depth = depth; - req->class = class; - if (visual == CopyFromParent) - req->visual = CopyFromParent; - else - req->visual = visual->visualid; - valuemask &= (CWBackPixmap|CWBackPixel|CWBorderPixmap| - CWBorderPixel|CWBitGravity|CWWinGravity| - CWBackingStore|CWBackingPlanes|CWBackingPixel| - CWOverrideRedirect|CWSaveUnder|CWEventMask| - CWDontPropagate|CWColormap|CWCursor); - if ((req->mask = valuemask)) { - unsigned long values[32]; - register unsigned long *value = values; - unsigned int nvalues; - - if (valuemask & CWBackPixmap) - *value++ = attr->background_pixmap; - if (valuemask & CWBackPixel) - *value++ = attr->background_pixel; - if (valuemask & CWBorderPixmap) - *value++ = attr->border_pixmap; - if (valuemask & CWBorderPixel) - *value++ = attr->border_pixel; - if (valuemask & CWBitGravity) - *value++ = attr->bit_gravity; - if (valuemask & CWWinGravity) - *value++ = attr->win_gravity; - if (valuemask & CWBackingStore) - *value++ = attr->backing_store; - if (valuemask & CWBackingPlanes) - *value++ = attr->backing_planes; - if (valuemask & CWBackingPixel) - *value++ = attr->backing_pixel; - if (valuemask & CWOverrideRedirect) - *value++ = attr->override_redirect; - if (valuemask & CWSaveUnder) - *value++ = attr->save_under; - if (valuemask & CWEventMask) - *value++ = attr->event_mask; - if (valuemask & CWDontPropagate) - *value++ = attr->do_not_propagate_mask; - if (valuemask & CWColormap) - *value++ = attr->colormap; - if (valuemask & CWCursor) - *value++ = attr->cursor; - req->length += (nvalues = value - values); - - nvalues <<= 2; /* watch out for macros... */ - Data32 (dpy, (long *) values, (long)nvalues); - } - UnlockDisplay(dpy); - SyncHandle(); - return wid; -} - -void XmbufClearBufferArea ( - Display *dpy, - Multibuffer buffer, - int x, int y, - unsigned int width, unsigned int height, - Bool exposures) -{ - XExtDisplayInfo *info = find_display (dpy); - register xMbufClearImageBufferAreaReq *req; - - MbufSimpleCheckExtension (dpy, info); - - LockDisplay (dpy); - MbufGetReq (MbufClearImageBufferArea, req, info); - req->buffer = buffer; - req->x = x; - req->y = y; - req->width = width; - req->height = height; - req->exposures = exposures; - UnlockDisplay (dpy); - SyncHandle(); -} - diff --git a/nx-X11/lib/Xext/Xcup.c b/nx-X11/lib/Xext/Xcup.c deleted file mode 100644 index 8bf2bb29e..000000000 --- a/nx-X11/lib/Xext/Xcup.c +++ /dev/null @@ -1,265 +0,0 @@ -/* $XFree86: xc/lib/Xext/Xcup.c,v 1.8 2002/10/16 02:19:22 dawes Exp $ */ -/* - -Copyright 1987, 1988, 1998 The Open Group - -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. - -The above copyright notice and this permission notice 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 -OPEN GROUP 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. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ -/* $Xorg: Xcup.c,v 1.5 2001/02/09 02:03:49 xorgcvs Exp $ */ - -#ifdef WIN32 -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#endif - -#define NEED_EVENTS -#define NEED_REPLIES -#include -#include -#include -#include - -static XExtensionInfo _xcup_info_data; -static XExtensionInfo *xcup_info = &_xcup_info_data; -static char *xcup_extension_name = XCUPNAME; - -/***************************************************************************** - * * - * private utility routines * - * * - *****************************************************************************/ - -static int close_display(Display *dpy, XExtCodes *codes); -static /* const */ XExtensionHooks xcup_extension_hooks = { - NULL, /* create_gc */ - NULL, /* copy_gc */ - NULL, /* flush_gc */ - NULL, /* free_gc */ - NULL, /* create_font */ - NULL, /* free_font */ - close_display, /* close_display */ - NULL, /* wire_to_event */ - NULL, /* event_to_wire */ - NULL, /* error */ - NULL, /* error_string */ -}; - -static XEXT_GENERATE_FIND_DISPLAY (find_display, xcup_info, - xcup_extension_name, - &xcup_extension_hooks, - 0, NULL) - -static XEXT_GENERATE_CLOSE_DISPLAY (close_display, xcup_info) - - -/***************************************************************************** - * * - * public Xcup Extension routines * - * * - *****************************************************************************/ - -Status -XcupQueryVersion( - Display* dpy, - int* major_version_return, - int* minor_version_return) -{ - XExtDisplayInfo *info = find_display (dpy); - xXcupQueryVersionReply rep; - xXcupQueryVersionReq *req; - - XextCheckExtension (dpy, info, xcup_extension_name, False); - - LockDisplay(dpy); - GetReq(XcupQueryVersion, req); - req->reqType = info->codes->major_opcode; - req->xcupReqType = X_XcupQueryVersion; - req->client_major_version = XCUP_MAJOR_VERSION; - req->client_minor_version = XCUP_MINOR_VERSION; - if (!_XReply(dpy, (xReply *)&rep, 0, xTrue)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - *major_version_return = rep.server_major_version; - *minor_version_return = rep.server_minor_version; - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -/* Win32 reserves 20 colormap entries for its desktop */ -#ifndef TYP_RESERVED_ENTRIES -#define TYP_RESERVED_ENTRIES 20 -#endif - -Status -XcupGetReservedColormapEntries( - Display* dpy, - int screen, - XColor** colors_out, - int* ncolors) -{ - XExtDisplayInfo *info = find_display (dpy); - xXcupGetReservedColormapEntriesReply rep; - xXcupGetReservedColormapEntriesReq *req; - xColorItem rbuf[TYP_RESERVED_ENTRIES]; - - *ncolors = 0; - - XextCheckExtension (dpy, info, xcup_extension_name, False); - - LockDisplay(dpy); - GetReq(XcupGetReservedColormapEntries, req); - req->reqType = info->codes->major_opcode; - req->xcupReqType = X_XcupGetReservedColormapEntries; - req->screen = screen; - if (_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - long nbytes; - xColorItem* rbufp; - int nentries = rep.length / 3; - - nbytes = nentries * SIZEOF (xColorItem); - if (nentries > TYP_RESERVED_ENTRIES) - rbufp = (xColorItem*) Xmalloc (nbytes); - else - rbufp = rbuf; - - if (rbufp == NULL) { - _XEatData (dpy, (unsigned long) nbytes); - UnlockDisplay (dpy); - SyncHandle (); - return False; - } - _XRead (dpy, (char*) rbufp, nbytes); - - *colors_out = (XColor*) Xmalloc (nentries * sizeof (XColor)); - if (*colors_out) { - xColorItem* cs = (xColorItem *) rbufp; - XColor* cd = *colors_out; - int i; - - *ncolors = nentries; - for (i = 0; i < *ncolors; i++, cd++) { - cd->pixel = cs->pixel; - cd->red = cs->red; - cd->green = cs->green; - cd->blue = cs->blue; - cs = (xColorItem*) (((char*) cs) + SIZEOF(xColorItem)); - } - if (rbufp != rbuf) XFree ((char*) rbufp); - UnlockDisplay(dpy); - SyncHandle(); - return True; - } - if (rbufp != rbuf) XFree ((char*) rbufp); - } - UnlockDisplay(dpy); - SyncHandle(); - return False; -} - -Status -XcupStoreColors( - Display* dpy, - Colormap colormap, - XColor* colors_in_out, - int ncolors) -{ - XExtDisplayInfo *info = find_display (dpy); - xXcupStoreColorsReply rep; - xXcupStoreColorsReq *req; - xColorItem rbuf[256]; - xColorItem citem; - int i; - XColor* xcp; - - XextCheckExtension (dpy, info, xcup_extension_name, False); - - LockDisplay(dpy); - GetReq(XcupStoreColors, req); - req->reqType = info->codes->major_opcode; - req->xcupReqType = X_XcupStoreColors; - req->cmap = colormap; - req->length += (ncolors * SIZEOF(xColorItem)) >> 2; - - for (i = 0, xcp = colors_in_out; i < ncolors; i++, xcp++) { - citem.pixel = xcp->pixel; - citem.red = xcp->red; - citem.green = xcp->green; - citem.blue = xcp->blue; - - /* note that xColorItem doesn't contain all 16-bit quantities, so - we can't use Data16 */ - Data(dpy, (char *)&citem, (long) SIZEOF(xColorItem)); - } - - if (_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - long nbytes; - xColorItem* rbufp; - xColorItem* cs; - int nentries = rep.length / 3; - - nbytes = nentries * SIZEOF (xColorItem); - - if (nentries != ncolors) { - _XEatData (dpy, (unsigned long) nbytes); - UnlockDisplay (dpy); - SyncHandle (); - return False; - } - - if (ncolors > 256) - rbufp = (xColorItem*) Xmalloc (nbytes); - else - rbufp = rbuf; - - if (rbufp == NULL) { - _XEatData (dpy, (unsigned long) nbytes); - UnlockDisplay (dpy); - SyncHandle (); - return False; - - } - - _XRead (dpy, (char*) rbufp, nbytes); - - for (i = 0, xcp = colors_in_out, cs = rbufp; i < ncolors; i++, xcp++, cs++) { - xcp->pixel = cs->pixel; - xcp->red = cs->red; - xcp->green = cs->green; - xcp->blue = cs->blue; - xcp->flags = cs->flags; - } - if (rbufp != rbuf) XFree ((char*)rbufp); - - UnlockDisplay(dpy); - SyncHandle(); - return True; - } - UnlockDisplay(dpy); - SyncHandle(); - return False; -} - diff --git a/nx-X11/lib/Xext/Xdbe.c b/nx-X11/lib/Xext/Xdbe.c deleted file mode 100644 index 05df171f6..000000000 --- a/nx-X11/lib/Xext/Xdbe.c +++ /dev/null @@ -1,474 +0,0 @@ -/* $Xorg: Xdbe.c,v 1.4 2000/08/17 19:45:53 cpqbld Exp $ */ -/****************************************************************************** - * - * Copyright (c) 1994, 1995 Hewlett-Packard Company - * - * 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 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 HEWLETT-PACKARD COMPANY 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. - * - * Except as contained in this notice, the name of the Hewlett-Packard - * Company shall not be used in advertising or otherwise to promote the - * sale, use or other dealings in this Software without prior written - * authorization from the Hewlett-Packard Company. - * - * Xlib DBE code - * - *****************************************************************************/ -/* $XFree86: xc/lib/Xext/Xdbe.c,v 3.7 2002/10/16 02:19:22 dawes Exp $ */ - -#define NEED_EVENTS -#define NEED_REPLIES -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include -#define NEED_DBE_PROTOCOL -#include - -static XExtensionInfo _dbe_info_data; -static XExtensionInfo *dbe_info = &_dbe_info_data; -static char *dbe_extension_name = DBE_PROTOCOL_NAME; - -#define DbeCheckExtension(dpy,i,val) \ - XextCheckExtension (dpy, i, dbe_extension_name, val) -#define DbeSimpleCheckExtension(dpy,i) \ - XextSimpleCheckExtension (dpy, i, dbe_extension_name) - -#if !defined(UNIXCPP) -#define DbeGetReq(name,req,info) GetReq (name, req); \ - req->reqType = info->codes->major_opcode; \ - req->dbeReqType = X_##name; -#else -#define DbeGetReq(name,req,info) GetReq (name, req); \ - req->reqType = info->codes->major_opcode; \ - req->dbeReqType = X_/**/name; -#endif - - -/***************************************************************************** - * * - * private utility routines * - * * - *****************************************************************************/ - -/* - * find_display - locate the display info block - */ -static int close_display(Display *dpy, XExtCodes *codes); -static char *error_string(Display *dpy, int code, XExtCodes *codes, - char *buf, int n); -static XExtensionHooks dbe_extension_hooks = { - NULL, /* create_gc */ - NULL, /* copy_gc */ - NULL, /* flush_gc */ - NULL, /* free_gc */ - NULL, /* create_font */ - NULL, /* free_font */ - close_display, /* close_display */ - NULL, /* wire_to_event */ - NULL, /* event_to_wire */ - NULL, /* error */ - error_string, /* error_string */ -}; - -static char *dbe_error_list[] = { - "BadBuffer", /* DbeBadBuffer */ -}; - -static XEXT_GENERATE_FIND_DISPLAY (find_display, dbe_info, - dbe_extension_name, - &dbe_extension_hooks, - DbeNumberEvents, NULL) - -static XEXT_GENERATE_CLOSE_DISPLAY (close_display, dbe_info) - -static XEXT_GENERATE_ERROR_STRING (error_string, dbe_extension_name, - DbeNumberErrors, - dbe_error_list) - - -/***************************************************************************** - * * - * Double-Buffering public interfaces * - * * - *****************************************************************************/ - -/* - * XdbeQueryExtension - - * Sets major_version_return and minor_verion_return to the major and - * minor DBE protocol version supported by the server. If the DBE - * library is compatible with the version returned by the server, this - * function returns non-zero. If dpy does not support the DBE - * extension, or if there was an error during communication with the - * server, or if the server and library protocol versions are - * incompatible, this functions returns zero. No other Xdbe functions - * may be called before this function. If a client violates this rule, - * the effects of all subsequent Xdbe calls are undefined. - */ -Status XdbeQueryExtension ( - Display *dpy, - int *major_version_return, - int *minor_version_return) -{ - XExtDisplayInfo *info = find_display (dpy); - xDbeGetVersionReply rep; - register xDbeGetVersionReq *req; - - if (!XextHasExtension (info)) - return (Status)0; /* failure */ - - LockDisplay (dpy); - DbeGetReq (DbeGetVersion, req, info); - req->majorVersion = DBE_MAJOR_VERSION; - req->minorVersion = DBE_MINOR_VERSION; - - if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { - UnlockDisplay (dpy); - SyncHandle (); - return (Status)0; /* failure */ - } - *major_version_return = rep.majorVersion; - *minor_version_return = rep.minorVersion; - UnlockDisplay (dpy); - - SyncHandle (); - - if (*major_version_return != DBE_MAJOR_VERSION) - return (Status)0; /* failure */ - else - return (Status)1; /* success */ -} - - -/* - * XdbeAllocateBackBuffer - - * This function returns a drawable ID used to refer to the back buffer - * of the specified window. The swap_action is a hint to indicate the - * swap action that will likely be used in subsequent calls to - * XdbeSwapBuffers. The actual swap action used in calls to - * XdbeSwapBuffers does not have to be the same as the swap_action - * passed to this function, though clients are encouraged to provide - * accurate information whenever possible. - */ - -XdbeBackBuffer XdbeAllocateBackBufferName( - Display *dpy, - Window window, - XdbeSwapAction swap_action) -{ - XExtDisplayInfo *info = find_display (dpy); - register xDbeAllocateBackBufferNameReq *req; - XdbeBackBuffer buffer; - - /* make sure extension is available; if not, return the - * third parameter (0). - */ - DbeCheckExtension (dpy, info, (XdbeBackBuffer)0); - - /* allocate the id */ - buffer = XAllocID (dpy); - - LockDisplay(dpy); - DbeGetReq(DbeAllocateBackBufferName, req, info); - req->window = window; - req->swapAction = (unsigned char)swap_action; - req->buffer = buffer; - - UnlockDisplay (dpy); - SyncHandle (); - return buffer; - -} /* XdbeAllocateBackBufferName() */ - -/* - * XdbeDeallocateBackBufferName - - * This function frees a drawable ID, buffer, that was obtained via - * XdbeAllocateBackBufferName. The buffer must refer to the back buffer - * of the specified window, or a protocol error results. - */ -Status XdbeDeallocateBackBufferName ( - Display *dpy, - XdbeBackBuffer buffer) -{ - XExtDisplayInfo *info = find_display (dpy); - register xDbeDeallocateBackBufferNameReq *req; - - DbeCheckExtension (dpy, info, (Status)0 /* failure */); - - LockDisplay (dpy); - DbeGetReq (DbeDeallocateBackBufferName, req, info); - req->buffer = buffer; - UnlockDisplay (dpy); - SyncHandle (); - - return (Status)1; /* success */ -} - - -/* - * XdbeSwapBuffers - - * This function swaps the front and back buffers for a list of windows. - * The argument num_windows specifies how many windows are to have their - * buffers swapped; it is the number of elements in the swap_info array. - * The argument swap_info specifies the information needed per window - * to do the swap. - */ -Status XdbeSwapBuffers ( - Display *dpy, - XdbeSwapInfo *swap_info, - int num_windows) -{ - XExtDisplayInfo *info = find_display (dpy); - register xDbeSwapBuffersReq *req; - int i; - - DbeCheckExtension (dpy, info, (Status)0 /* failure */); - - LockDisplay (dpy); - DbeGetReq (DbeSwapBuffers, req, info); - req->length += 2*num_windows; - req->n = num_windows; - - /* We need to handle 64-bit machines, where we can not use PackData32 - * directly because info would be lost in translating from 32- to 64-bit. - * Instead we send data via a loop that accounts for the translation. - */ - for (i = 0; i < num_windows; i++) - { - char tmp[4]; - Data32 (dpy, (long *)&swap_info[i].swap_window, 4); - tmp[0] = swap_info[i].swap_action; - Data (dpy, (char *)tmp, 4); - } - - UnlockDisplay (dpy); - SyncHandle (); - - - return (Status)1; /* success */ - -} /* XdbeSwapBuffers() */ - - -/* - * XdbeBeginIdiom - - * This function marks the beginning of an idiom sequence. - */ -Status XdbeBeginIdiom (Display *dpy) -{ - XExtDisplayInfo *info = find_display(dpy); - register xDbeBeginIdiomReq *req; - - DbeCheckExtension (dpy, info, (Status)0 /* failure */); - - LockDisplay (dpy); - DbeGetReq (DbeBeginIdiom, req, info); - UnlockDisplay (dpy); - SyncHandle (); - - return (Status)1; /* success */ -} - - -/* - * XdbeEndIdiom - - * This function marks the end of an idiom sequence. - */ -Status XdbeEndIdiom (Display *dpy) -{ - XExtDisplayInfo *info = find_display(dpy); - register xDbeEndIdiomReq *req; - - DbeCheckExtension (dpy, info, (Status)0 /* failure */); - - LockDisplay (dpy); - DbeGetReq (DbeEndIdiom, req, info); - UnlockDisplay (dpy); - SyncHandle (); - - return (Status)1; /* success */ -} - - -/* - * XdbeGetVisualInfo - - * This function returns information about which visuals support - * double buffering. The argument num_screens specifies how many - * elements there are in the screen_specifiers list. Each drawable - * in screen_specifiers designates a screen for which the supported - * visuals are being requested. If num_screens is zero, information - * for all screens is requested. In this case, upon return from this - * function, num_screens will be set to the number of screens that were - * found. If an error occurs, this function returns NULL, else it returns - * a pointer to a list of XdbeScreenVisualInfo structures of length - * num_screens. The nth element in the returned list corresponds to the - * nth drawable in the screen_specifiers list, unless num_screens was - * passed in with the value zero, in which case the nth element in the - * returned list corresponds to the nth screen of the server, starting - * with screen zero. - */ -XdbeScreenVisualInfo *XdbeGetVisualInfo ( - Display *dpy, - Drawable *screen_specifiers, - int *num_screens) /* SEND and RETURN */ -{ - XExtDisplayInfo *info = find_display(dpy); - register xDbeGetVisualInfoReq *req; - xDbeGetVisualInfoReply rep; - XdbeScreenVisualInfo *scrVisInfo; - int i; - - DbeCheckExtension (dpy, info, (XdbeScreenVisualInfo *)NULL); - - LockDisplay (dpy); - - DbeGetReq(DbeGetVisualInfo, req, info); - req->length = 2 + *num_screens; - req->n = *num_screens; - Data32 (dpy, screen_specifiers, (*num_screens * sizeof (CARD32))); - - if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) { - UnlockDisplay (dpy); - SyncHandle (); - return NULL; - } - - /* return the number of screens actually found if we - * requested information about all screens (*num_screens == 0) - */ - if (*num_screens == 0) - *num_screens = rep.m; - - /* allocate list of visual information to be returned */ - if (!(scrVisInfo = - (XdbeScreenVisualInfo *)Xmalloc( - (unsigned)(*num_screens * sizeof(XdbeScreenVisualInfo))))) { - UnlockDisplay (dpy); - SyncHandle (); - return NULL; - } - - for (i = 0; i < *num_screens; i++) - { - int nbytes; - int j; - long c; - - _XRead32 (dpy, &c, sizeof(CARD32)); - scrVisInfo[i].count = c; - - nbytes = scrVisInfo[i].count * sizeof(XdbeVisualInfo); - - /* if we can not allocate the list of visual/depth info - * then free the lists that we already allocate as well - * as the visual info list itself - */ - if (!(scrVisInfo[i].visinfo = (XdbeVisualInfo *)Xmalloc( - (unsigned)nbytes))) { - for (j = 0; j < i; j++) { - Xfree ((char *)scrVisInfo[j].visinfo); - } - Xfree ((char *)scrVisInfo); - UnlockDisplay (dpy); - SyncHandle (); - return NULL; - } - - /* Read the visual info item into the wire structure. Then copy each - * element into the library structure. The element sizes and/or - * padding may be different in the two structures. - */ - for (j = 0; j < scrVisInfo[i].count; j++) { - xDbeVisInfo xvi; - - _XRead (dpy, (char *)&xvi, sizeof(xDbeVisInfo)); - scrVisInfo[i].visinfo[j].visual = xvi.visualID; - scrVisInfo[i].visinfo[j].depth = xvi.depth; - scrVisInfo[i].visinfo[j].perflevel = xvi.perfLevel; - } - - } - - UnlockDisplay (dpy); - SyncHandle (); - return scrVisInfo; - -} /* XdbeGetVisualInfo() */ - - -/* - * XdbeFreeVisualInfo - - * This function frees the list of XdbeScreenVisualInfo returned by the - * function XdbeGetVisualInfo. - */ -void XdbeFreeVisualInfo(XdbeScreenVisualInfo *visual_info) -{ - if (visual_info == NULL) { - return; - } - - if (visual_info->visinfo) { - XFree(visual_info->visinfo); - } - - XFree(visual_info); -} - - -/* - * XdbeGetBackBufferAttributes - - * This function returns the attributes associated with the specified - * buffer. - */ -XdbeBackBufferAttributes *XdbeGetBackBufferAttributes( - Display *dpy, - XdbeBackBuffer buffer) -{ - XExtDisplayInfo *info = find_display(dpy); - register xDbeGetBackBufferAttributesReq *req; - xDbeGetBackBufferAttributesReply rep; - XdbeBackBufferAttributes *attr; - - DbeCheckExtension(dpy, info, (XdbeBackBufferAttributes *)NULL); - - if (!(attr = - (XdbeBackBufferAttributes *)Xmalloc(sizeof(XdbeBackBufferAttributes)))) { - return NULL; - } - - LockDisplay(dpy); - DbeGetReq(DbeGetBackBufferAttributes, req, info); - req->buffer = buffer; - - if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { - UnlockDisplay (dpy); - SyncHandle (); - return NULL; - } - attr->window = rep.attributes; - - UnlockDisplay (dpy); - SyncHandle (); - - return attr; -} - diff --git a/nx-X11/lib/Xext/Xext-def.cpp b/nx-X11/lib/Xext/Xext-def.cpp index fcd9f49a2..6ee37c70f 100644 --- a/nx-X11/lib/Xext/Xext-def.cpp +++ b/nx-X11/lib/Xext/Xext-def.cpp @@ -1,9 +1,6 @@ LIBRARY XEXT VERSION LIBRARY_VERSION EXPORTS - XMITMiscGetBugMode - XMITMiscQueryExtension - XMITMiscSetBugMode XMissingExtension XSetExtensionErrorHandler XShapeCombineMask @@ -76,46 +73,11 @@ EXPORTS XextDestroyExtension XextFindDisplay XextRemoveDisplay - XmbufChangeBufferAttributes - XmbufChangeWindowAttributes - XmbufClearBufferArea - XmbufCreateBuffers - XmbufCreateStereoWindow - XmbufDestroyBuffers - XmbufDisplayBuffers - XmbufGetBufferAttributes - XmbufGetScreenInfo - XmbufGetVersion - XmbufGetWindowAttributes - XmbufQueryExtension - XdbeQueryExtension - XdbeAllocateBackBufferName - XdbeDeallocateBackBufferName - XdbeSwapBuffers - XdbeBeginIdiom - XdbeEndIdiom - XdbeGetVisualInfo - XdbeFreeVisualInfo - XdbeGetBackBufferAttributes XSecurityQueryExtension XSecurityAllocXauth XSecurityFreeXauth XSecurityGenerateAuthorization XSecurityRevokeAuthorization - XagQueryVersion - XagCreateAssociation - XagCreateEmbeddedApplicationGroup - XagCreateNonembeddedApplicationGroup - XagDestroyApplicationGroup - XagDestroyAssociation - XagGetApplicationGroupAttributes - XagQueryApplicationGroup - XLbxQueryExtension - XLbxGetEventBase - XLbxQueryVersion - XcupGetReservedColormapEntries - XcupQueryVersion - XcupStoreColors #if !defined(__CYGWIN__) && !defined(__UNIXOS2__) XPanoramiXQueryVersion XPanoramiXAllocInfo @@ -133,8 +95,5 @@ EXPORTS DPMSDisable DPMSForceLevel DPMSInfo - XeviQueryExtension - XeviQueryVersion - XeviGetVisualInfo /* $Xorg: Xext-def.cpp,v 1.3 2000/08/17 19:45:53 cpqbld Exp $ */ /* $XFree86: xc/lib/Xext/Xext-def.cpp,v 1.8 2001/05/06 10:35:51 alanh Exp $ */ diff --git a/nx-X11/programs/Xserver/Imakefile b/nx-X11/programs/Xserver/Imakefile index a2a3f7ced..ca9a6b88d 100644 --- a/nx-X11/programs/Xserver/Imakefile +++ b/nx-X11/programs/Xserver/Imakefile @@ -105,10 +105,6 @@ INSTPGMFLAGS = #if BuildRECORD || BuildRECORDlib RECORDDIR = record #endif -#if BuildXTrap - XTRAPEXT = XTrap/LibraryTargetName(xtrap) - XTRAPDIR = XTrap -#endif #ifdef SiteExtensionLibs SITEEXTS = SiteExtensionLibs #endif @@ -153,7 +149,7 @@ INSTPGMFLAGS = #if DoLoadableServer EXTENSIONS = $(COMPOSITELIB) $(DAMAGELIB) $(DAMAGE) $(FIXESLIB) $(CW) \ $(OTHEREXTS) $(RANDRLIB) $(RENDERLIB) - LOADABLEEXTS = $(MISCEXT) $(DBEEXT) $(RECORDEXT) $(GLXEXT) $(XTRAPEXT) + LOADABLEEXTS = $(MISCEXT) $(DBEEXT) $(RECORDEXT) $(GLXEXT) MISCEXT = Xext/LibraryTargetName(ext) OTHEREXTS = Xext/LibraryTargetName(exts) $(XKBEXT) $(XINPUTEXT) \ $(SITEEXTS) @@ -161,11 +157,11 @@ INSTPGMFLAGS = EXTENSIONS = $(COMPOSITELIB) $(DAMAGELIB) $(DAMAGE) $(FIXESLIB) $(CW) \ $(OTHEREXTS) $(GLXEXT) $(RANDRLIB) $(RENDERLIB) OTHEREXTS = Xext/LibraryTargetName(ext) $(XKBEXT) $(XINPUTEXT) \ - $(DBEEXT) $(RECORDEXT) $(SITEEXTS) $(XTRAPEXT) + $(DBEEXT) $(RECORDEXT) $(SITEEXTS) #endif EXTDIRS = Xext $(XKBDIR) $(XIDIR) $(GLXDIR) \ $(DBEDIR) $(RECORDDIR) $(SITEEXTDIRS) \ - $(RANDRDIR) $(RENDERDIR) $(XTRAPDIR) $(XPCONFIGDIR) \ + $(RANDRDIR) $(RENDERDIR) $(XPCONFIGDIR) \ $(FIXESDIR) $(DAMAGEDIR) $(CWDIR) $(COMPOSITEDIR) OS = os/LibraryTargetName(os) $(DEPXAUTHLIB) BSDEMUL = $(DEPXBSDLIB) diff --git a/nx-X11/programs/Xserver/XTrap/Imakefile b/nx-X11/programs/Xserver/XTrap/Imakefile deleted file mode 100644 index c61712f1d..000000000 --- a/nx-X11/programs/Xserver/XTrap/Imakefile +++ /dev/null @@ -1,27 +0,0 @@ -XCOMM $XFree86: xc/programs/Xserver/XTrap/Imakefile,v 1.1 2001/11/02 23:29:29 dawes Exp $ - -#if DoLoadableServer -#define IHaveSubdirs -#endif - -#include - -#if DoLoadableServer - SUBDIRS = module -#endif - SRCS = xtrapddmi.c xtrapdi.c xtrapdiswp.c xtrapditbl.c - OBJS = xtrapddmi.o xtrapdi.o xtrapdiswp.o xtrapditbl.o - INCLUDES = -I../include -I$(EXTINCSRC) -I$(XINCLUDESRC) -I$(SERVERSRC)/Xext `pkg-config --cflags-only-I pixman-1` - -NormalLibraryTarget(xtrap,$(OBJS)) -LintLibraryTarget(xtrap,$(SRCS)) -NormalLintTarget($(SRCS)) - -NormalLibraryObjectRule() - -#if DoLoadableServer -MakeSubdirs($(SUBDIRS)) -DependSubdirs($(SUBDIRS)) -#endif - -DependTarget() diff --git a/nx-X11/programs/Xserver/XTrap/module/Imakefile b/nx-X11/programs/Xserver/XTrap/module/Imakefile deleted file mode 100644 index 8f8a77ba2..000000000 --- a/nx-X11/programs/Xserver/XTrap/module/Imakefile +++ /dev/null @@ -1,26 +0,0 @@ -XCOMM $XFree86: xc/programs/Xserver/XTrap/module/Imakefile,v 1.2 2002/01/23 03:31:40 dawes Exp $ - -#define IHaveModules -#include - - SRCS = xtrapddmi.c xtrapdi.c xtrapdiswp.c xtrapditbl.c xf86XTrapModule.c - OBJS = xtrapddmi.o xtrapdi.o xtrapdiswp.o xtrapditbl.o xf86XTrapModule.o - INCLUDES = -I.. -I../../include -I$(EXTINCSRC) -I$(XINCLUDESRC) \ - -I$(SERVERSRC)/Xext - DEFINES = -DEXTMODULE - -LinkSourceFile(xf86XTrapModule.c,..) -LinkSourceFile(xtrapddmi.c,..) -LinkSourceFile(xtrapdi.c,..) -LinkSourceFile(xtrapdiswp.c,..) -LinkSourceFile(xtrapditbl.c,..) - -ModuleObjectRule() -LibraryModuleTarget(xtrap,$(OBJS)) - -InstallLibraryModule(xtrap,$(MODULEDIR),extensions) - -DependTarget() - -InstallDriverSDKLibraryModule(xtrap,$(DRIVERSDKMODULEDIR),extensions) - diff --git a/nx-X11/programs/Xserver/XTrap/xf86XTrapModule.c b/nx-X11/programs/Xserver/XTrap/xf86XTrapModule.c deleted file mode 100644 index a3e1d08c6..000000000 --- a/nx-X11/programs/Xserver/XTrap/xf86XTrapModule.c +++ /dev/null @@ -1,51 +0,0 @@ -/* $XFree86$ */ -/* This is the xf86 module code for the DEC_XTRAP extension. - */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "xf86Module.h" - -#include - -extern void DEC_XTRAPInit(INITARGS); - -#ifdef XFree86LOADER - -static MODULESETUPPROTO(xtrapSetup); - -ExtensionModule xtrapExt = -{ - DEC_XTRAPInit, - XTrapExtName, - NULL, - NULL, - NULL -}; - -static XF86ModuleVersionInfo xtrapVersRec = -{ - "xtrap", - MODULEVENDORSTRING, - MODINFOSTRING1, - MODINFOSTRING2, - XORG_VERSION_CURRENT, - 1, 0, 0, - ABI_CLASS_EXTENSION, /* needs the server extension ABI */ - ABI_EXTENSION_VERSION, - MOD_CLASS_EXTENSION, - {0,0,0,0} -}; - -XF86ModuleData xtrapModuleData = { &xtrapVersRec, xtrapSetup, NULL }; - -static void * -xtrapSetup(void * module, void * opts, int *errmaj, int *errmin) { - LoadExtension(&xtrapExt, FALSE); - /* Need a non-NULL return value to indicate success */ - return (void *)1; -} - -#endif /* XFree86LOADER */ diff --git a/nx-X11/programs/Xserver/XTrap/xtrapddmi.c b/nx-X11/programs/Xserver/XTrap/xtrapddmi.c deleted file mode 100644 index 1b4be39cd..000000000 --- a/nx-X11/programs/Xserver/XTrap/xtrapddmi.c +++ /dev/null @@ -1,188 +0,0 @@ -/* $XFree86: xc/programs/Xserver/XTrap/xtrapddmi.c,v 1.1 2001/11/02 23:29:29 dawes Exp $ */ -/***************************************************************************** -Copyright 1987, 1988, 1989, 1990, 1991 by Digital Equipment Corp., Maynard, MA - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -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 Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL 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. - -*****************************************************************************/ -/* - * ABSTRACT: - * - * This module is the platform-specific but conditionally independent - * code for the XTrap extension (usually I/O or platform setup). - * This is shared code and is subject to change only by team approval. - * - * CONTRIBUTORS: - * - * Dick Annicchiarico - * Robert Chesler - * Gene Durso - * Marc Evans - * Alan Jamison - * Mark Henry - * Ken Miller - * - */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef EXTMODULE -#include -#include -#ifdef PC -# include "fcntl.h" -# include "io.h" -# define O_NDELAY 0L -#endif -#else -#include "xf86_ansic.h" -#endif - -#define NEED_REPLIES -#define NEED_EVENTS -#include /* From library include environment */ -#include "input.h" /* From server include env. (must be before Xlib.h!) */ -#ifdef PC -# include "scrintst.h" /* Screen struct */ -# include "extnsist.h" -#else -# include "extnsionst.h" /* Server ExtensionEntry definitions */ -# include "scrnintstr.h" /* Screen struct */ -#endif - -#include -#include -#include - -extern int XETrapErrorBase; -extern xXTrapGetAvailReply XETrap_avail; -extern DevicePtr XETrapKbdDev; -extern DevicePtr XETrapPtrDev; - -/* - * DESCRIPTION: - * - * This function performs the platform specific setup for server - * extension implementations. - */ -void XETrapPlatformSetup() -{ -} - - -#if !defined _XINPUT -/* - * DESCRIPTION: - * - * This routine processes the simulation of some input event. - * - */ -int XETrapSimulateXEvent(register xXTrapInputReq *request, - register ClientPtr client) -{ - ScreenPtr pScr = NULL; - int status = Success; - xEvent xev; - register int x = request->input.x; - register int y = request->input.y; - DevicePtr keydev = LookupKeyboardDevice(); - DevicePtr ptrdev = LookupPointerDevice(); - - if (request->input.screen < screenInfo.numScreens) - { - pScr = screenInfo.screens[request->input.screen]; - } - else - { /* Trying to play bogus events to this WS! */ -#ifdef VERBOSE - ErrorF("%s: Trying to send events to screen %d!\n", XTrapExtName, - request->input.screen); -#endif - status = XETrapErrorBase + BadScreen; - } - /* Fill in the event structure with the information - * Note: root, event, child, eventX, eventY, state, and sameScreen - * are all updated by FixUpEventFromWindow() when the events - * are delivered via DeliverDeviceEvents() or whatever. XTrap - * needs to only concern itself with type, detail, time, rootX, - * and rootY. - */ - if (status == Success) - { - xev.u.u.type = request->input.type; - xev.u.u.detail = request->input.detail; - xev.u.keyButtonPointer.time = GetTimeInMillis(); - xev.u.keyButtonPointer.rootX = x; - xev.u.keyButtonPointer.rootY = y; - - if (request->input.type == MotionNotify) - { /* Set new cursor position on screen */ - XETrap_avail.data.cur_x = x; - XETrap_avail.data.cur_y = y; - NewCurrentScreen (pScr, x, y); /* fix from amnonc@mercury.co.il */ - if (!(*pScr->SetCursorPosition)(pScr, x, y, xFalse)) - { - status = BadImplementation; - } - } - } - if (status == Success) - { - switch(request->input.type) - { /* Now process the event appropriately */ - case KeyPress: - case KeyRelease: - (*XETrapKbdDev->realInputProc)(&xev,(DeviceIntPtr)keydev, 1L); - break; - case MotionNotify: - case ButtonPress: - case ButtonRelease: - (*XETrapPtrDev->realInputProc)(&xev,(DeviceIntPtr)ptrdev, 1L); - break; - default: - status = BadValue; - break; - } - } - return(status); -} -#endif /* _XINPUT */ - -#if defined vms && !defined LINKED_IN -/* Used by swapping code not visible from VMS (from main.c) */ -#ifndef BLADE -void -NotImplemented() -{ - FatalError("Not implemented"); -} -#endif - -int -#ifdef __STDC__ -ProcBadRequest( ClientPtr client) -#else -ProcBadRequest(client) - ClientPtr client; -#endif -{ - return (BadRequest); -} - -#endif /* vms && ! LINKED_IN */ diff --git a/nx-X11/programs/Xserver/XTrap/xtrapdi.c b/nx-X11/programs/Xserver/XTrap/xtrapdi.c deleted file mode 100644 index 987d54e4f..000000000 --- a/nx-X11/programs/Xserver/XTrap/xtrapdi.c +++ /dev/null @@ -1,2157 +0,0 @@ -/* $XdotOrg: xc/programs/Xserver/XTrap/xtrapdi.c,v 1.5 2005/07/03 08:53:36 daniels Exp $ */ -/* $XFree86: xc/programs/Xserver/XTrap/xtrapdi.c,v 1.6tsi Exp $ */ -/***************************************************************************** -Copyright 1987, 1988, 1989, 1990, 1991 by Digital Equipment Corp., Maynard, MA -X11R6 Changes Copyright (c) 1994 by Robert Chesler of Absol-Puter, Hudson, NH. - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -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 Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL AND ABSOL-PUTER DISCLAIM ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS, IN NO EVENT SHALL DIGITAL OR ABSOL-PUTER 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. - -*****************************************************************************/ -/* - * ABSTRACT: - * - * This module is the main module for extension initialization and setup. - * It is called by the server and by clients using the extension. - * This is shared code and is subject to change only by team approval. - * - * CONTRIBUTORS: - * - * Dick Annicchiarico - * Robert Chesler - * Gene Durso - * Marc Evans - * Alan Jamison - * Mark Henry - * Ken Miller - * - * CHANGES: - * - * Robert Chesler - grab-impreviousness patch to improve grab behavior - * Robert Chesler - add client arg to swapping routines for X11R6 port - * - */ - -/*-----------------* - * Include Files * - *-----------------*/ - -#define NEED_REPLIES -#define NEED_EVENTS -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef EXTMODULE -#include -#include -#include -#else -#include "xf86_ansic.h" -#endif -#include -#include -#include "input.h" /* Server DevicePtr definitions */ -#include "misc.h" /* Server swapping macros */ -#include "dixstruct.h" /* Server ClientRec definitions */ -#include "resource.h" /* Used with the MakeAtom call */ -#ifdef PC -# include "scrintst.h" /* Screen struct */ -# include "extnsist.h" -#else -# include "extnsionst.h" /* Server ExtensionEntry definitions */ -# include "scrnintstr.h" /* Screen struct */ -#endif -#include "pixmapstr.h" /* DrawableRec */ -#include "windowstr.h" /* Drawable Lookup structures */ -#include -#include -#include -#include "colormapst.h" -#ifdef PANORAMIX -#include "panoramiX.h" -#include "panoramiXsrv.h" -#include "cursor.h" -#endif - - -/*----------------------------* - * Global Data Declarations * - *----------------------------*/ - -DevicePtr XETrapKbdDev = NULL; -DevicePtr XETrapPtrDev = NULL; -int XETrapErrorBase = 0L; -xXTrapGetAvailReply XETrap_avail; /* What's available to clients */ - -globalref int_function XETrapDispatchVector[10L]; /* Vector of XTrap Rtns */ -globalref int_function XETSwDispatchVector[10L]; /* Swapped XTrap Rtns */ - -globalref int_function XETrapProcVector[256L]; /* The "shadowed" ProcVector */ - /* The "real" EventVector (XTrap creates it till events - * truly become vectored - */ -#ifndef VECTORED_EVENTS -globalref int_function EventProcVector[XETrapCoreEvents]; -#else -extern WindowPtr GetCurrentRootWindow(); -globalref int_function EventProcVector[128L]; -#endif -static int_function keybd_process_inp = NULL; /* Used for VECTORED_EVENTS */ - /* The "shadowed" Event Vector */ -globalref int_function XETrapEventProcVector[XETrapCoreEvents]; - -globalref void_function XETSwProcVector[256L];/* Vector of Req swapping rtns */ - -/* This macro returns a true/false indicator based on whether it changes the - * environment state bits local to the server extension. This is based on the - * idea that if a valid flag is set and the corresponding data bit is not in - * the same state as desired, then true is returned, otherwise false is - * returned. - */ -#define _CheckChangeBit(valid,data,local,bit) \ - (BitIsFalse(valid,bit) ? 0L : \ - (((BitIsTrue(data,bit) && BitIsTrue(local,bit)) || \ - (BitIsFalse(data,bit) && BitIsFalse(local,bit))) ? 0L : \ - (BitToggle(local,bit), 1L))) - -/* This macro is designed to return the number of elements in an - * automatically allocated array. - */ -#ifndef ASIZE -#define ASIZE(array) (sizeof(array)/sizeof(array[0L])) -#endif - -/* This macro is designed to return the number of long words beyond - * XETrapMinRepSize contained in a data structure. - */ -#ifndef XEXTRA -#define XEXTRA(s) \ - ((sizeof(s)+(sizeof(CARD32)-1L)-XETrapMinRepSize)/sizeof(CARD32)) -#endif - -/* Static Declarations known to XTrap Only - * All XTrap clients refer to these single copies! - */ -/* This carries all of the information XTrap uses for internal information */ -static XETrapEnv *XETenv[MAXCLIENTS] = {NULL}; -#ifndef RESTYPE -#define RESTYPE unsigned long -#endif -static RESTYPE XETrapClass = 0L; /* Resource class for this extension */ -static RESTYPE XETrapType = 0L; /* Resource type for this extension */ -static Bool gate_closed = False; /* The global "gatekeeper" */ -static Bool key_ignore = False; /* The global "keymaster" */ -static Bool ignore_grabs = False; -static CARD8 next_key = XEKeyIsClear; /* Echo, Clear, or Other */ -#ifdef VECTORED_EVENTS -static INT16 current_screen = -1L; /* Current screen for events */ -#endif -static INT16 vectored_requests[256L] = {0L}; /* cnt of vectoring clients */ -static INT16 vectored_events[KeyPress+MotionNotify] = {0L}; -typedef struct _client_list -{ - struct _client_list *next; - ClientPtr client; -} ClientList; -static ClientList io_clients; /* Linked-list of clients currently doing I/O */ -static ClientList stats_clients; /* Linked-list of clients collecting stats */ -static ClientList cmd_clients; /* Linked-list of clients using command key */ - -/*----------------------------* - * Forward Declarations - *----------------------------*/ -static void _SwapProc (int (**f1 )(), int (**f2 )()); -static void sXETrapEvent (xETrapDataEvent *from , xETrapDataEvent *to ); -static int add_accelerator_node (ClientPtr client , ClientList *accel ); -static void remove_accelerator_node (ClientPtr client , ClientList *accel ); -static void update_protocol (xXTrapGetReq *reqptr , ClientPtr client ); -#ifdef COLOR_REPLIES -static void GetSendColorRep (ClientPtr client , xResourceReq *req ); -static void GetSendNamedColorRep (ClientPtr client , xResourceReq *req ); -static void GetSendColorCellsRep (ClientPtr client , xResourceReq *req ); -static void GetSendColorPlanesRep (ClientPtr client , xResourceReq *req ); -#endif - -/* - * DESCRIPTION: - * - * This routine is called by the server when a given client - * goes away (as identified by the first argument). All - * memory allocations, misc. values specific to a given - * client would be reset here. - * - */ -int XETrapDestroyEnv(void * value, XID id) -{ - xXTrapReq request; - XETrapEnv *penv = XETenv[(long)value]; - - XETrapReset(&request,penv->client); - /* Free any memory malloc'd for a particular client here */ - /* In case stop I/O wasn't received for this client */ - if (penv->stats) - { /* Remove from client accelerator list */ - remove_accelerator_node(penv->client, &stats_clients); - Xfree(penv->stats); /* Free the stats buckets */ - } - if (cmd_clients.next == NULL) - { /* No more command key clients! Let's reset the gate */ - gate_closed = False; - key_ignore = False; - next_key = XEKeyIsClear; - } - -#ifdef VECTORED_EVENTS - current_screen = -1L; /* Invalidate current screen */ -#endif - -#ifdef VERBOSE - ErrorF("%s: Client '%d' Disconnected\n", XTrapExtName, - penv->client->index); -#endif - - Xfree(penv); - XETenv[(long)value] = NULL; - - return 0; -} - -/* - * DESCRIPTION: - * - * This routine is called by the server when the last client - * (the session manager in most cases) goes away. This is server - * reset. When the server comes back up, this extension will not - * be loaded unless this routine makes the proper arrangements. - * - * The real concern here is to unload the extension - * and possibly make arragements to be called upon - * server restart. - * - */ -void XETrapCloseDown(ExtensionEntry *extEntry) -{ - long i; - - for (i=0L; irealInputProc; - EventProcVector[KeyRelease] = - (int_function)XETrapKbdDev->realInputProc; - } -#ifdef VECTORED_EVENTS - keybd_process_inp = EventProcVector[KeyPress]; - EventProcVector[KeyPress] = EventProcVector[KeyRelease] = NULL; - XETrapEventProcVector[KeyPress] = XETrapEventVector; - XETrapEventProcVector[KeyRelease] = XETrapEventVector; -#else /* !VECTORED_EVENTS */ - XETrapEventProcVector[KeyPress] = XETrapKeyboard; - XETrapEventProcVector[KeyRelease] = XETrapKeyboard; -#endif /* !VECTORED_EVENTS */ - } - /* Do we need to redirect the pointer device? */ -#ifndef VECTORED_EVENTS - if (XETrapPtrDev == NULL) - { - if ((XETrapPtrDev = LookupPointerDevice()) == 0L) - { - retval = False; - } - else - { - EventProcVector[ButtonPress] = - (int_function)XETrapPtrDev->realInputProc; - EventProcVector[ButtonRelease] = - (int_function)XETrapPtrDev->realInputProc; - EventProcVector[MotionNotify] = - (int_function)XETrapPtrDev->realInputProc; - } - XETrapEventProcVector[ButtonPress] = XETrapPointer; - XETrapEventProcVector[ButtonRelease] = XETrapPointer; - XETrapEventProcVector[MotionNotify] = XETrapPointer; - } -#endif /* !VECTORED_EVENTS */ - return(retval); -} - -/* - * - * DESCRIPTION: - * - * This routine is the main entry point for the Xtrap extension. It is - * called by the server to inititalize the Xtrap extension. Once the - * extension is initialized, life is controlled by the XtrapDispatch - * routine by the requests it will handle. - * - * Initializes all the XTrap data structures with the proper - * addresses of defined routines that will help control the extension. - * It is vital that the extension state be kept accurate so that only - * one call to this routine be made. - * - */ - -void DEC_XTRAPInit() -{ - register ExtensionEntry *extEntry; - unsigned int i; - Atom a; - - /* Make the extension known to the server. Must be done every time - * DEC_XTRAPInit is called, else server will think it failed. - */ - if ((extEntry = AddExtension(XTrapExtName,XETrapNumEvents, - XETrapNumErrors,XETrapDispatch,sXETrapDispatch,XETrapCloseDown - ,StandardMinorOpcode)) == NULL) - { - ErrorF("%s: AddExtension Failed!\n", XTrapExtName); - return; - } -#ifdef VERBOSE - ErrorF("%s: AddExtension assigned Major Opcode '%d'\n", - XTrapExtName, extEntry->base); -#endif - XETrap_avail.data.major_opcode = extEntry->base; - XETrapErrorBase = extEntry->errorBase; - XETrap_avail.data.event_base = extEntry->eventBase; - - /* Set up our swapped reply vector */ - ReplySwapVector[XETrap_avail.data.major_opcode] = - (void_function) sReplyXTrapDispatch; - - /* Set up our swapped event vector */ - EventSwapVector[extEntry->eventBase + XETrapData] = - (EventSwapPtr) sXETrapEvent; - - /* make an atom saying that the extension is present. The - * adding of the resource occurs during XETrapCreateEnv(). - */ - if ((a = MakeAtom(XTrapExtName,strlen(XTrapExtName),1L)) == None || - (XETrapType = CreateNewResourceType(XETrapDestroyEnv)) == 0L) - { - ErrorF("%s: Setup can't create new resource type (%d,%d,%d)\n", - XTrapExtName, (int)a,(int)XETrapClass,(int)XETrapType); - return; - } - /* initialize the GetAvailable info reply here */ - XETrap_avail.hdr.type = X_Reply; - XETrap_avail.hdr.length = XEXTRA(xXTrapGetAvailReply); - XETrap_avail.data.xtrap_release = XETrapRelease; - XETrap_avail.data.xtrap_version = XETrapVersion; - XETrap_avail.data.xtrap_revision = XETrapRevision; - XETrap_avail.data.pf_ident = XETrapPlatform; - XETrap_avail.data.max_pkt_size = 0xFFFF; /* very large number */ - for (i=0L; iindex > MAXCLIENTS) - { - status = BadImplementation; - } - else if ((XETenv[client->index] = (XETrapEnv *)Xcalloc(sizeof(XETrapEnv))) - == NULL) - { - status = BadAlloc; - } - if (status == Success) - { - penv = XETenv[client->index]; - penv->client = client; - penv->protocol = 31; /* default to backwards compatibility */ - /* prep for client's departure (for memory dealloc, cleanup) */ - AddResource(FakeClientID(client->index),XETrapType, - (void *)(long)(client->index)); - if (XETrapRedirectDevices() == False) - { - status = XETrapErrorBase + BadDevices; - } - /* Initialize the current state */ - if (status == Success) - { - status = XETrapReset(NULL, penv->client); - } - } - -#ifdef VECTORED_EVENTS - current_screen = -1L; /* Invalidate current screen */ -#endif - -#ifdef VERBOSE - if (status == Success) - { - ErrorF("%s: Client '%d' Connection Accepted\n", XTrapExtName, - penv->client->index); - } -#endif - - return(status); -} - -/* - * DESCRIPTION: - * - * This procedure is defined for the call to AddExtension() - * in which it is expected to be a parameter of the call. - * - * This routine will be called by the server dispatcher - * when a client makes a request that is handled - * by the extension and the byte ordering of the client is the - * SAME as that of the extension. - * - * Note: the status of the requests is returned to the caller of - * the Dispatch routine which will in turn SendErrorToClient if - * necessary. - */ - -int XETrapDispatch(ClientPtr client) -{ - - REQUEST(xXTrapReq); - register int status = Success; - - REQUEST_AT_LEAST_SIZE(xXTrapReq); - - /* Have we seen this client before? */ - if (XETenv[client->index] == NULL) - { - status = XETrapCreateEnv(client); - } - /* Do we have a valid request? */ - if (status == Success) - { - if (stuff->minor_opcode < ASIZE(XETrapDispatchVector)) - { - /* Then vector to the pointed to function */ - status = - (*(XETrapDispatchVector[stuff->minor_opcode]))(stuff,client); - } - else - { - status = BadRequest; - } - } - return(status); -} - -/* - * DESCRIPTION: - * - * This procedure is defined for the call to AddExtension() - * in which it is expected to be a parameter of the call. - * - * This routine would ordinarily be called by the server - * dispatcher when a client makes a request that is handled - * by the extension and the byte ordering of the client is - * DIFFERENT than that of the extension. - */ - -int sXETrapDispatch(ClientPtr client) -{ - - REQUEST(xXTrapReq); - register int status = Success; - - REQUEST_AT_LEAST_SIZE(xXTrapReq); - - /* Have we seen this client before? */ - if (XETenv[client->index] == NULL) - { - status = XETrapCreateEnv(client); - } - /* Do we have a valid request? */ - if (status == Success) - { - if (stuff->minor_opcode < ASIZE(XETSwDispatchVector)) - { - /* Then vector to the pointed to function */ - status = - (*(XETSwDispatchVector[stuff->minor_opcode]))(stuff,client); - } - else - { - status = BadRequest; - } - } - return(status); -} - -/* - * DESCRIPTION: - * - * This routine will place the extension in a steady and known - * state. Any current state will be reset. This is called either - * by a client request (dispatched) or when a new client environment - * is created. - * - */ -int XETrapReset(xXTrapReq *request, ClientPtr client) -{ - static xXTrapConfigReq DummyReq; - register int i; - register int status = Success; - XETrapEnv *penv = XETenv[client->index]; - - /* in case any i/o's pending */ - (void)XETrapStopTrap((xXTrapReq *)NULL, client); - penv->cur.hdr.type = X_Reply; - penv->cur.hdr.length = XEXTRA(xXTrapGetCurReply); - /* Fill in a dummy config request to clear all elements */ - for (i=0L; icur.data_state_flags); i++) - { - penv->cur.data_state_flags[i] = 0L; /* Clear all env flags */ - } - penv->cur.data_config_max_pkt_size = XETrap_avail.data.max_pkt_size; - - return(status); -} - -/* - * DESCRIPTION: - * - * This function sends a reply back to the requesting client indicating - * the available states of the extension can be configured for. - */ -int XETrapGetAvailable(xXTrapGetReq *request, ClientPtr client) -{ - XETrapEnv *penv = XETenv[client->index]; - update_protocol(request, client); - /* Initialize the reply as needed */ - XETrap_avail.data.xtrap_protocol = penv->protocol; - XETrap_avail.hdr.detail = XETrap_GetAvailable; - XETrap_avail.hdr.sequenceNumber = client->sequence; - WriteReplyToClient(client, sizeof(xXTrapGetAvailReply), &XETrap_avail); - return(Success); -} - -/* - * DESCRIPTION: - * - * This function sends a reply back to the requesting client indicating - * the current state of the extension. - */ -int XETrapGetCurrent(xXTrapReq *request, ClientPtr client) -{ - XETrapEnv *penv = XETenv[client->index]; - int rep_size = (penv->protocol == 31 ? 284 : sz_xXTrapGetCurReply); - penv->cur.hdr.length = (rep_size - 32L) / SIZEOF(CARD32); - - /* Initialize the reply as needed */ - penv->cur.hdr.detail = XETrap_GetCurrent; - penv->cur.hdr.sequenceNumber = client->sequence; - WriteReplyToClient(client, rep_size, &(penv->cur)); - - return(Success); -} - -/* - * DESCRIPTION: - * - * This function sends a reply back to the requesting client dumping - * statistics (counts) of requests and events. If stat's isn't - * configured, return failure. - */ -int XETrapGetStatistics(xXTrapReq *request, ClientPtr client) -{ - int status = Success; - XETrapEnv *penv = XETenv[client->index]; - - if ((BitIsTrue(penv->cur.data_config_flags_data, XETrapStatistics)) && - (penv->stats)) - { - /* Initialize the reply as needed */ - int rep_size = sizeof(xXTrapGetStatsReply); - penv->stats->detail = XETrap_GetStatistics; - penv->stats->sequenceNumber = client->sequence; - if (penv->protocol == 31) - { - xXTrapGetStatsReply rep_stats; - rep_stats = *penv->stats; -#ifndef VECTORED_EVENTS - rep_size = 1060; -#else - rep_size = 1544; -#endif - rep_stats.length = (rep_size - 32L) / SIZEOF(CARD32); - /* - * Now we need to shift the data *into* the header area - * for bug compatibility. - */ - memcpy(&(rep_stats.pad0),&(penv->stats->data), - sizeof(XETrapGetStatsRep)); - WriteReplyToClient(client, rep_size, &rep_stats); - } - else - { - WriteReplyToClient(client, rep_size, penv->stats); - } - } - else - { - status = XETrapErrorBase + BadStatistics; - } - return(status); -} - -/* - * DESCRIPTION: - * - * This function is dispatched when a client requests the extension to - * be configured in some manner. - */ -int XETrapConfig(xXTrapConfigReq *request, ClientPtr client) -{ - UByteP vflags = request->config_flags_valid; - UByteP dflags = request->config_flags_data; - UByteP req_flags = request->config_flags_req; - UByteP event_flags = request->config_flags_event; - XETrapEnv *penv = XETenv[client->index]; - UByteP bit_flags = penv->cur.data_config_flags_data; - int status = Success; - CARD32 i = 0L; - - /* Check events and swap if desired */ - if (BitIsTrue(vflags,XETrapEvent)) - { /* Loop through all of the events */ - for (i=0L; icur.data_config_flags_event,i)))) - { /* At this point we *know* there's a change. The - * only question remaining is are there any more - * clients interested in this specific event. If - * so, *don't* swap this process! - */ - if (BitIsTrue(dflags,XETrapEvent)) - { /* Client wants the XTrap rtn */ - if (++(vectored_events[i]) <= 1L) - { /* first client, so do it */ - _SwapProc(&(XETrapEventProcVector[i]), - &(EventProcVector[i])); - } - } - else - { /* Client wants the *real* rtn */ - if (--(vectored_events[i]) <= 0L) - { /* No more clients using, so do it */ - _SwapProc(&(XETrapEventProcVector[i]), - &(EventProcVector[i])); - } - } - switch(i) - { - case KeyPress: /* needed for command key processing */ - case KeyRelease: - XETrapKbdDev->processInputProc = - (void_function)(EventProcVector[i] ? - (void_function)EventProcVector[i] : - (void_function)keybd_process_inp); - XETrapKbdDev->realInputProc = - (void_function)(EventProcVector[i] ? - (void_function)EventProcVector[i] : - (void_function)keybd_process_inp); - break; -#ifndef VECTORED_EVENTS - case ButtonPress: /* hack until events become vectored */ - case ButtonRelease: - case MotionNotify: - XETrapPtrDev->processInputProc = - (void_function)EventProcVector[i]; - XETrapPtrDev->realInputProc = - (void_function)EventProcVector[i]; - break; - default: - status = BadImplementation; - break; -#endif /* !VECTORED_EVENTS */ - } - BitToggle(penv->cur.data_config_flags_event,i); - } - } - } - if ((status == Success) && - (_CheckChangeBit(vflags,dflags,bit_flags,XETrapCmd))) - { - if (BitIsTrue(dflags, XETrapCmd)) - { /* Add accelerator entry to cmd_clients list iff necessary */ - penv->cur.data_config_cmd_key = request->config_cmd_key; - status = add_accelerator_node(penv->client, &cmd_clients); - } - else - { - penv->cur.data_config_cmd_key = 0L; /* default no KeyCode */ - remove_accelerator_node(penv->client, &cmd_clients); - } - } - if ((status == Success) && - (_CheckChangeBit(vflags,dflags,bit_flags,XETrapMaxPacket))) - { - if (BitIsTrue(dflags,XETrapMaxPacket)) - { /* Set size to what's passed in */ - if (request->config_max_pkt_size < XETrapMinPktSize) - { /* Tell them the value is too small */ - status = BadValue; - } - else - { - penv->cur.data_config_max_pkt_size = - request->config_max_pkt_size; - } - } - else - { /* Set it to the default (a *very* big number) */ - penv->cur.data_config_max_pkt_size = 0xFFFF; - } - } - /* If the valid flag is set for requests, then each of the - * requests is swapped if it's different from current state. - */ - if (BitIsTrue(vflags,XETrapRequest) && status == Success) - { /* Loop through all of the core requests */ - for (i=0L; icur.data_config_flags_req,i)))) - { /* At this point we *know* there's a change. The - * only question remaining is are there any more - * clients interested in this specific request. If - * so, *don't* swap this process! - */ - if (BitIsTrue(dflags,XETrapRequest)) - { /* Client wants the XTrap rtn */ - if (++(vectored_requests[i]) <= 1L) - { /* first client, so do it */ - _SwapProc(&(XETrapProcVector[i]), &(ProcVector[i])); - } - } - else - { /* Client wants the *real* rtn */ - if (--(vectored_requests[i]) <= 0L) - { /* No more clients using, so do it */ - _SwapProc(&(XETrapProcVector[i]), &(ProcVector[i])); - } - } - if (status == Success) - { - BitToggle(penv->cur.data_config_flags_req,i); - } - } - } - } - /* Check & Set the boolean flags */ - if (status == Success) - { - _CheckChangeBit(vflags,dflags,bit_flags,XETrapCmdKeyMod); - _CheckChangeBit(vflags,dflags,bit_flags,XETrapTimestamp); - _CheckChangeBit(vflags,dflags,bit_flags,XETrapWinXY); -/* _CheckChangeBit(vflags,dflags,bit_flags,XETrapCursor); */ -#ifdef COLOR_REPLIES - _CheckChangeBit(vflags,dflags,bit_flags,XETrapColorReplies); -#endif /* COLOR_REPLIES */ - if (_CheckChangeBit(vflags,dflags,bit_flags,XETrapGrabServer)) - { /* Let any client uncoditionally set/clear Grabs */ - ignore_grabs = BitValue(dflags, XETrapGrabServer); - } - } - /* The statistics vflag/dflag mechanism is a little different - * from most. The dflag is initially set to 0 to indicate no - * statistics. When a config request comes in to request - * statistics, memory's allocated and the dflag is set. - * Thereafter, whenever a client wants to clear the counters, he - * simply sets the vflag and clears the dflag. Multiple requests - * for statistics configuration are ignored, and the stats memory is - * free'd only when the client disconnects. - */ - if (status == Success) - { - if (_CheckChangeBit(vflags,dflags,bit_flags,XETrapStatistics)) - { - if (BitIsTrue(dflags,XETrapStatistics)) - { /* Do we need to allocate memory? */ - if (penv->stats == NULL && (penv->stats = - (xXTrapGetStatsReply *)Xcalloc(sizeof(xXTrapGetStatsReply))) - != NULL) - { /* Set up the reply header */ - penv->stats->type = X_Reply; - penv->stats->length = XEXTRA(xXTrapGetStatsReply); - /* add accelerator node for stats clients list */ - status = add_accelerator_node(penv->client, &stats_clients); - } - else if (penv->stats == NULL) - { /* No Memory! */ - status = BadAlloc; - } - } - else - { /* Zero out counters */ - (void)memset(penv->stats->data.requests, 0L, - sizeof(penv->stats->data.requests)); - (void)memset(penv->stats->data.events, 0L, - sizeof(penv->stats->data.events)); - /* Re-cock the Stat's flag so that it'll - * sense a change for next zero'ing out - * of the counters. - */ - BitTrue(penv->cur.data_config_flags_data, XETrapStatistics); - } - } - } - return(status); -} - -/* - * DESCRIPTION: - * - * This function sets the XETrapTrapActive bit to indicate that Trapping - * of requests and/or core events to the client may take place. - * - */ -int XETrapStartTrap(xXTrapReq *request, ClientPtr client) -{ - XETrapEnv *penv = XETenv[client->index]; - int status = add_accelerator_node(penv->client, &io_clients); - if (status == Success) - { - BitTrue(penv->cur.data_state_flags, XETrapTrapActive); - } - return(status); -} -/* - * DESCRIPTION: - * - * This function clears the XETrapTrapActive bit to indicate that Trapping - * of requests and/or core events to the client may *not* take place. - * - */ -int XETrapStopTrap(xXTrapReq *request, ClientPtr client) -{ - XETrapEnv *penv = XETenv[client->index]; - - remove_accelerator_node(penv->client, &io_clients); - BitFalse(penv->cur.data_state_flags, XETrapTrapActive); - return(Success); -} - -/* - * DESCRIPTION: - * - * This function sends a reply back to the requesting client indicating - * the specific XTrap version of this extension. - */ -int XETrapGetVersion(xXTrapGetReq *request, ClientPtr client) -{ - xXTrapGetVersReply ver_rep; - XETrapEnv *penv = XETenv[client->index]; - - update_protocol(request,client); /* to agree on protocol version */ - /* Initialize the reply as needed */ - ver_rep.hdr.type = X_Reply; - ver_rep.hdr.detail = XETrap_GetVersion; - ver_rep.hdr.sequenceNumber = client->sequence; - ver_rep.hdr.length = XEXTRA(xXTrapGetVersReply); - ver_rep.data.xtrap_release = XETrap_avail.data.xtrap_release; - ver_rep.data.xtrap_version = XETrap_avail.data.xtrap_version; - ver_rep.data.xtrap_revision = XETrap_avail.data.xtrap_revision; - ver_rep.data.xtrap_protocol = penv->protocol; /* return agreed protocol */ - WriteReplyToClient(client, sizeof(xXTrapGetVersReply), &ver_rep); - return(Success); -} - -/* - * DESCRIPTION: - * - * This function sends a reply back to the requesting client indicating - * the specific XTrap version of this extension. - */ -int XETrapGetLastInpTime(xXTrapReq *request, ClientPtr client) -{ - xXTrapGetLITimReply tim_rep; - XETrapEnv *penv = XETenv[client->index]; - - /* Initialize the reply as needed */ - tim_rep.hdr.type = X_Reply; - tim_rep.hdr.detail = XETrap_GetLastInpTime; - tim_rep.hdr.sequenceNumber = client->sequence; - tim_rep.hdr.length = XEXTRA(xXTrapGetLITimReply); - tim_rep.data_last_time = penv->last_input_time; - WriteReplyToClient(client, sizeof(xXTrapGetLITimReply), &tim_rep); - return(Success); -} - -/* - * DESCRIPTION: - * - * This routine is swapped in for the server's output request vectors. - * After writing the request to one (or more) XTrap client(s), this - * routine ALWAYS returns by calling the REAL output request vector rtn. - * - * Note: Swapped Requests are handled automatically since the unswapped - * vectored routine is called after the request has been swapped. - * IOW, all requests are directed through ProcVector eventually and are - * "unswapped" at that point. It is necessary to swap the data - * back if writing to a swapped client, however, and this is done - * by calling the appropriate XETSwProcVector[] routine. - */ -int XETrapRequestVector(ClientPtr client) -{ - int status = True; - XETrapDatum *pdata, *spdata = NULL; - REQUEST(xResourceReq); - WindowPtr window_ptr; - XETrapEnv *penv; - BYTE *tptr; - ClientList *ioc = &io_clients; - ClientList *stc = &stats_clients; - INT32 asize = sizeof(pdata->hdr) + stuff->length * sizeof(CARD32); - INT32 size = MAX(asize,XETrapMinPktSize); /* Must be at least */ - INT32 csize; /* size of request to send to the XTrap client */ - - /* Get memory for the data to be sent */ - if ((pdata = (XETrapDatum *)Xcalloc(size)) == NULL) - { /* Can't do anything accept set a flag since we don't - * know who to send the error to yet. - */ - status = False; - } - - while (ioc->next != NULL) - { - ioc = ioc->next; - penv = XETenv[ioc->client->index]; - if (status == False) - { /* We didn't get the memory! Complain */ - SendErrorToClient(penv->client,XETrap_avail.data.major_opcode, - stuff->reqType, 0L, BadAlloc); - break; - } - if (BitIsTrue(penv->cur.data_config_flags_req,stuff->reqType)) - { /* This particular client is interested in *this* request */ - pdata->hdr.client = client->index; /* stuff client index in hdr */ - if (BitIsTrue(penv->cur.data_config_flags_data,XETrapWinXY)) - { - window_ptr = (WindowPtr) LookupDrawable(stuff->id, client); - if (window_ptr == 0L) - { /* Failed...invalidate the X and Y coordinate data. */ - pdata->hdr.win_x = -1L; - pdata->hdr.win_y = -1L; - } - else - { - pdata->hdr.screen = window_ptr->drawable.pScreen->myNum; - pdata->hdr.win_x = window_ptr->drawable.x; - pdata->hdr.win_y = window_ptr->drawable.y; - } - } - if (BitIsTrue(penv->cur.data_config_flags_data,XETrapTimestamp)) - { - pdata->hdr.timestamp = GetTimeInMillis(); - } - /* Copy the information to a location we can write it from */ - (void) memcpy(&(pdata->u.req),stuff,stuff->length*sizeof(CARD32)); - pdata->hdr.count = MIN(penv->cur.data_config_max_pkt_size,asize); - XETrapSetHeaderRequest(&(pdata->hdr)); - - /* Perform any needed byte/word swapping. NOTE: This is not - * the "normal" technique that should be used to perform the - * swapping. The reason that we do it here is to be sure to - * do it only once in a controlled manner, which we can not - * guarentee in the case of the Xlib transport. Notice that - * we don't swap the XTRAP EVENT information. This is done - * in the XETrapWriteXLib() routine. - */ - - if (penv->client->swapped) - { /* need to deal with swapped clients */ - if (spdata == NULL) - { /* Get memory for the swapped data to be sent */ - if ((spdata = (XETrapDatum *)Xcalloc(size)) == NULL) - { - SendErrorToClient(penv->client, - XETrap_avail.data.major_opcode, - stuff->reqType, 0L, BadAlloc); - break; - } - - memcpy(spdata,pdata,size); /* fill in the info */ - /* Now call the request-specific rtn to swap the request */ - if (stuff->reqType < 128) - { /* a core request, good */ - (*XETSwProcVector[stuff->reqType])(&(spdata->u.req), - penv->client); /* RTC X11R6 */ - } - else if (penv->cur.data_config_max_pkt_size == - XETrapMinPktSize) - { /* Minimum size, so swap it as an ResourceReq */ - XETSwResourceReq(&(spdata->u.req)); - } - else - { /* trying to swap an extension request! */ - SendErrorToClient(penv->client, - XETrap_avail.data.major_opcode, - stuff->reqType, 0L, XETrapErrorBase + BadSwapReq); - } - } - /* need to stow in the latest header (count) */ - memcpy(spdata,pdata,SIZEOF(XETrapHeader)); - sXETrapHeader(&(spdata->hdr)); /* swap the XTrap Header */ - } - /* Write as many bytes of information as the client wants */ - tptr = (BYTE *)(penv->client->swapped ? spdata : pdata); - csize = MAX(pdata->hdr.count, XETrapMinPktSize); - if (XETrapWriteXLib(penv, tptr, csize) != csize) - { - SendErrorToClient(penv->client,XETrap_avail.data.major_opcode, - stuff->reqType, 0L, XETrapErrorBase + BadIO); - } -#ifdef COLOR_REPLIES - /* Process Color Replies, if desired, and applicable */ - if (BitIsTrue(penv->cur.data_config_flags_data,XETrapColorReplies)) - { /* wants color replies */ - switch(stuff->reqType) - { - case X_AllocColor: - GetSendColorRep(client, stuff); - break; - case X_AllocNamedColor: - GetSendNamedColorRep(client, stuff); - break; - case X_AllocColorCells: - GetSendColorCellsRep(client, stuff); - break; - case X_AllocColorPlanes: - GetSendColorPlanesRep(client, stuff); - break; - default: - break; - } - } -#endif /* COLOR_REPLIES */ - } - } - while (stc->next != NULL) - { /* increment appropriate stats bucket for each interested client */ - stc = stc->next; - penv = XETenv[stc->client->index]; - if (BitIsTrue(penv->cur.data_config_flags_req,stuff->reqType)) - { /* This particular client would like this particular stat */ - penv->stats->data.requests[stuff->reqType]++; - } - } - - if (pdata) - { - Xfree(pdata); - } - if (spdata) - { - Xfree(spdata); - } - if (ignore_grabs == True && - (stuff->reqType == X_GrabServer || stuff->reqType == X_UngrabServer)) - { /* doesn't want Grab's! Note: this is a "last configured" setting */ -#ifndef NO_NEW_XTRAP - int status; - - if (stuff->reqType == X_GrabServer) - { - ClientList *pclient; - - /* first call grab server procedure */ - status = (*XETrapProcVector[stuff->reqType])(client); - - /* then add XTrap controlling clients */ - for (pclient = &io_clients; pclient; pclient = pclient->next) - if (pclient->client) - MakeClientGrabImpervious(pclient->client); - } - else - { - ClientList *pclient; - - /* first drop XTrap controlling clients */ - for (pclient = &io_clients; pclient; pclient = pclient->next) - if (pclient->client) - MakeClientGrabPervious(pclient->client); - - /* then call ungrab server procedure */ - status = (*XETrapProcVector[stuff->reqType])(client); - } - return status; -#else /* NO_NEW_XTRAP */ - return(Success); -#endif /* NO_NEW_XTRAP */ - } - else - { - return((*XETrapProcVector[stuff->reqType])(client)); - } -} -/* - * - * DESCRIPTION: - * - * This routine intercepts input xEvents from the keyboard. - * if XETrapTrapActive, will write record to client(s) - * and then pass the event to the server iff not command - * key and gate is open. If it's a command key, then twiddle - * the gate state as required (optional, see below). - * - * This routine implements an optional user specified command key - * that can be used to close the input pipe into the server - * while a client command is generated. The keypress of the - * command key places this routine in command mode, the keyrelease - * exits command mode. - * - * A keypress of the command key followed by the - * optionally specified lock key will place this routine in continuous - * command mode until the command key and lock key are pressed again - * to exit command mode. In the locked state, the client interprets - * keystrokes as it wishes, as commands or as input to a prior command. - * - * Both mechanisms can be used alternately. - * - * IMPLICIT INPUTS : - * - * penv->cur.data_config_cmd_key : - * This is the keycode of the key that is used to stop - * and restart the transmission of intercepted input - * events to the server. If specified, the gate_state - * flag will be set or cleared depending on the state of - * the command_key. - * - * penv->cur.data_config_flags_data.XETrapCmdKeyMod: - * This is the value of the mode in which the command_key - * will operate. It currently has two values: MODIFIER and - * COMMAND_LOCK. MODIFIER mode clears gate_state on - * keypress, and sets gate_state on keyrelease. - * COMMAND_LOCK mode toggles gate_state on - * or off. - * - * gate_closed: - * A flag that is set/cleared in the xtrap_keyboard - * routine that indicates whether intercepted input - * should be passed to the server at any particular - * instance. - * - * - * next_key: - * This variable tracks the state of the next key to be - * pressed or released. It allows the checking of double - * presses of the command key to be sent to the server and - * keeps good state order when the command key is used. - * - * key_ignore: - * This variable indicates whether or not the specific - * key should be ignored for subsequent server processing. - * - */ -int XETrapKeyboard(xEvent *x_event, DevicePtr keybd, int count) -{ - register BYTE type = x_event->u.u.type; - register BYTE detail = x_event->u.u.detail; - XETrapEnv *penv; - ClientList *stc = &stats_clients; - ClientList *cmc = &cmd_clients; - int_function cur_func = XETrapKeyboard; - -#ifdef VERBOSE - if (count != 1L) - { /* We haven't coded for this situation yet! */ - ErrorF("Warning! Event count != 1 (%d)\n", count); - } -#endif - while (stc->next != NULL) - { /* increment appropriate stats bucket for each interested client */ - stc = stc->next; - penv = XETenv[stc->client->index]; - if (BitIsTrue(penv->cur.data_config_flags_event,type)) - { /* This particular client would like this particular stat */ - penv->stats->data.events[type]++; - } - } -#ifndef VECTORED_EVENTS - /* We *only* StampAndMail command keys with vectored events since - * we get much more data by waiting till we get called in XETrapEventVector - */ - XETrapStampAndMail(x_event); /* send to XTrap client if necessry */ -#endif - while (cmc->next != NULL) - { - cmc = cmc->next; - penv = XETenv[cmc->client->index]; - key_ignore = False; - if (detail == penv->cur.data_config_cmd_key) - { - if (BitIsTrue(penv->cur.data_config_flags_data, XETrapCmdKeyMod)) - { - switch (type) - { - case KeyPress: - if (next_key == XEKeyIsEcho) - { - break; - } - gate_closed = True; - next_key = XEKeyIsClear; - break; - - case KeyRelease: - if (next_key == XEKeyIsEcho) - { - next_key = XEKeyIsClear; - break; - } - if (next_key == XEKeyIsClear) - { - next_key = XEKeyIsEcho; - } - else - { /* it's Other, so Clear it */ - next_key = XEKeyIsClear; - } - gate_closed = False; - key_ignore = True; - break; - - default: break; - } - } - else - { - switch (type) - { - case KeyPress: - if (next_key == XEKeyIsEcho) - { - gate_closed = False; - break; - } - /* Open gate on cmd key release */ - if ((next_key == XEKeyIsOther) && - gate_closed == True) - { - break; - } - gate_closed = True; - next_key = XEKeyIsClear; - break; - - case KeyRelease: - if (next_key == XEKeyIsClear) - { - next_key = XEKeyIsEcho; - break; - } - - if (next_key == XEKeyIsEcho) - { - next_key = XEKeyIsClear; - break; - } - - gate_closed = False; - key_ignore = True; - next_key = XEKeyIsClear; - break; - - default: - break; - } - } - } - else - { - next_key = XEKeyIsOther; - } - } - - /* - * If the gate to the server is open, - * and we are not ignoring a keyrelease, - * pass the event to the server for normal processing. - */ -#ifndef VECTORED_EVENTS - if ((gate_closed == False) && (key_ignore == False)) - { - if (XETrapEventProcVector[type] != cur_func) - { /* to protect us from infinite loops */ - (void)(*XETrapEventProcVector[type])(x_event,keybd,count); - } - else - { - (void)(*EventProcVector[type])(x_event,keybd,count); - } - } -#else /* VECTORED_EVENTS */ - if ((gate_closed == False) && (key_ignore == False)) - { /* send event on to server to be trapped again in XETrapEventVector */ - (void)(*keybd_process_inp)(x_event,keybd,count); - } - else - { - XETrapStampAndMail(x_event); /* send to XTrap client if necessry */ - } -#endif - key_ignore = False; /* reset for next time around */ - return 0; -} - -/* - * DESCRIPTION: - * - * This routine intercepts input xEvents from the pointer device - * and passes the input event back to the server for normal processing. - * - * This routine is sensitive to whether input is being passed - * up to the server or not. This state is set by the keyboard - * input routine. - * - * - */ -#ifndef VECTORED_EVENTS -int XETrapPointer(xEvent *x_event, DevicePtr ptrdev, int count) -{ - XETrapEnv *penv; - ClientList *stc = &stats_clients; - int_function cur_func = XETrapPointer; - -#ifdef VERBOSE - if (count != 1L) - { /* We haven't coded for this situation yet! */ - ErrorF("Warning! Event count != 1 (%d)\n", count); - } -#endif - while (stc->next != NULL) - { /* increment appropriate stats bucket for each interested client */ - stc = stc->next; - penv = XETenv[stc->client->index]; - if (BitIsTrue(penv->cur.data_config_flags_event,x_event->u.u.type)) - { /* This particular client would like this particular stat */ - penv->stats->data.events[x_event->u.u.type]++; - } - } - XETrapStampAndMail(x_event); /* send to XTrap client if necessry */ - /* - * If the gate to the server is open, - * pass the event up like nothing has happened. - */ - if (gate_closed == False) - { - if (XETrapEventProcVector[x_event->u.u.type] != cur_func) - { /* to protect us from infinite loops */ - (void)(*XETrapEventProcVector[x_event->u.u.type])(x_event,ptrdev, - count); - } - else - { - (void)(*EventProcVector[x_event->u.u.type])(x_event,ptrdev,count); - } - } - return 0; -} -#endif /* !VECTORED_EVENTS */ - - -/* - * DESCRIPTION: - * - * This routine determines whether it needs to send event data - * to the XTrap Client(s). If so, it timestamps it appropriately - * and writes out both the header and detail information. - * - */ -void XETrapStampAndMail(xEvent *x_event) -{ - XETrapDatum data; - register CARD32 size; - XETrapEnv *penv; - ClientList *ioc = &io_clients; - - /* Currently, we're intercepting core events *before* most - * of the event information's filled in. Specifically, the - * only fields that are valid at this level are: type, detail, - * time, rootX, rootY, and state. - */ - /* Loop through all clients wishing I/O */ - while (ioc->next != NULL) - { - ioc = ioc->next; - penv = XETenv[ioc->client->index]; - /* Do we have a valid fd? Do we care about this event? */ - if (BitIsTrue(penv->cur.data_config_flags_event, x_event->u.u.type)) - { - XETrapSetHeaderEvent(&(data.hdr)); - data.hdr.win_x = data.hdr.win_y = -1L; /* Invalidate req draw */ - data.hdr.screen = 0L; /* not till Events are vectored! */ - data.hdr.client = 0L; /* not till Events are vectored! */ - if (BitIsTrue(penv->cur.data_config_flags_data, - XETrapTimestamp)) - { - data.hdr.timestamp = GetTimeInMillis(); - } - size = data.hdr.count = XETrapMinPktSize; /* Always for evts */ - penv->last_input_time = x_event->u.keyButtonPointer.time; - /* Copy the event information into our local memory */ - (void)memcpy(&(data.u.event),x_event,sizeof(xEvent)); - -#ifdef PANORAMIX - if (!noPanoramiXExtension && - (data.u.event.u.u.type == MotionNotify || - data.u.event.u.u.type == ButtonPress || - data.u.event.u.u.type == ButtonRelease || - data.u.event.u.u.type == KeyPress || - data.u.event.u.u.type == KeyRelease)) { - int scr = XineramaGetCursorScreen(); - data.u.event.u.keyButtonPointer.rootX += - panoramiXdataPtr[scr].x - panoramiXdataPtr[0].x; - data.u.event.u.keyButtonPointer.rootY += - panoramiXdataPtr[scr].y - panoramiXdataPtr[0].y; - } -#endif - - if (penv->client->swapped) - { /* - * Notice that we don't swap the XTRAP EVENT information. - * This is done in the XETrapWriteXLib() routine. - */ - xEvent ToEvent; - (*EventSwapVector[data.u.event.u.u.type & 0177]) - (&data.u.event,&ToEvent); - (void)memcpy(&(data.u.event),&ToEvent,sizeof(ToEvent)); - sXETrapHeader(&(data.hdr)); /* swap the XTrap Header */ - } - /* From this point on, the contents of data is swapped and - * therefore we should not refer to it for information. - */ - if (XETrapWriteXLib(penv, (BYTE *)&data, size) != size) - { - SendErrorToClient(penv->client, - XETrap_avail.data.major_opcode, - x_event->u.u.type, 0L, XETrapErrorBase + BadIO); - } - } - } - return; -} -#ifdef VECTORED_EVENTS -int XETrapEventVector(ClientPtr client, xEvent *x_event) -{ - XETrapDatum data; - register CARD32 size; - XETrapEnv *penv; - ClientList *ioc = &io_clients; - - /* Loop through all clients wishing I/O */ - while (ioc->next != NULL) - { - ioc = ioc->next; - penv = XETenv[ioc->client->index]; - /* Do we care about this event? */ - if (BitIsTrue(penv->cur.data_config_flags_event, x_event->u.u.type)) - { - XETrapSetHeaderEvent(&(data.hdr)); - data.hdr.client = client->index; - data.hdr.win_x = data.hdr.win_y = -1L; /* Invalidate req draw */ - if ((current_screen < 0L) || ((x_event->u.u.type >= KeyPress) && - (x_event->u.u.type <= MotionNotify) && - (!x_event->u.keyButtonPointer.sameScreen))) - { /* we've moved/warped to another screen */ - WindowPtr root_win = GetCurrentRootWindow(); - current_screen = root_win->drawable.pScreen->myNum; - } - data.hdr.screen = current_screen; - if (BitIsTrue(penv->cur.data_config_flags_data, - XETrapTimestamp)) - { - data.hdr.timestamp = GetTimeInMillis(); - } - size = data.hdr.count = XETrapMinPktSize; /* Always for evts */ - penv->last_input_time = x_event->u.keyButtonPointer.time; - /* Copy the event information into our local memory */ - (void)memcpy(&(data.u.event),x_event,sizeof(xEvent)); - - if (penv->client->swapped) - { - xEvent ToEvent; - (*EventSwapVector[data.u.event.u.u.type & 0177]) - (&data.u.event,&ToEvent); - (void)memcpy(&(data.u.event),&ToEvent,sizeof(ToEvent)); - sXETrapHeader(&(data.hdr)); /* swap the XTrap Header */ - } - /* From this point on, the contents of pdata is swapped and - * therefore we should not refer to it for information. - */ - if (XETrapWriteXLib(penv, (BYTE *)&data, size) != size) - { - SendErrorToClient(penv->client, - XETrap_avail.data.major_opcode, - x_event->u.u.type, 0L, XETrapErrorBase + BadIO); - } - } - } - return; -} -#endif /* VECTORED_EVENTS */ -void sReplyXTrapDispatch(ClientPtr client, int size, char *reply) -{ - register XETrapRepHdr *rep = (XETrapRepHdr *)reply; - - switch(rep->detail) - { - case XETrap_GetAvailable: - { - xXTrapGetAvailReply lrep; - (void)memcpy((char *)&lrep,reply,sizeof(lrep)); - sReplyXETrapGetAvail(client,size,(char *)&lrep); - } - break; - case XETrap_GetCurrent: - { - xXTrapGetCurReply lrep; - (void)memcpy((char *)&lrep,reply,sizeof(lrep)); - sReplyXETrapGetCur(client,size,(char *)&lrep); - } - break; - case XETrap_GetStatistics: - { - xXTrapGetStatsReply lrep; - (void)memcpy((char *)&lrep,reply,sizeof(lrep)); - sReplyXETrapGetStats(client,size,(char *)&lrep); - } - break; - case XETrap_GetVersion: - { - xXTrapGetVersReply lrep; - (void)memcpy((char *)&lrep,reply,sizeof(lrep)); - sReplyXETrapGetVers(client,size,(char *)&lrep); - } - break; - case XETrap_GetLastInpTime: - { - xXTrapGetLITimReply lrep; - (void)memcpy((char *)&lrep,reply,sizeof(lrep)); - sReplyXETrapGetLITim(client,size,(char *)&lrep); - } - break; - default: - SendErrorToClient(client,XETrap_avail.data.major_opcode, - rep->detail, 0L, BadImplementation); - break; - } - return; -} - -/* - * XLib communications routines - */ - -/* - * DESCRIPTION: - * - * This function performs the transport specific functions required - * for writing data back to an XTrap client over XLib. The trick is - * packaging the data into <=32 byte packets to conform to the sizeof - * an X Event. nbytes must be at least equal to XETrapMinPktSize - * - */ -int XETrapWriteXLib(XETrapEnv *penv, BYTE *data, CARD32 nbytes) -{ - CARD32 size, total = 0L; - xETrapDataEvent event; - - /* Initialize the detail field to show the beginning of a datum */ - event.detail = XETrapDataStart; - event.idx = 0L; - - /* This loop could be optimized by not calling Write until after all - * of the events are packaged. However, this would require memory - * games, and may not therefore be a win. - */ - while (nbytes > 0L) - { /* How many bytes can we send in this packet */ - size = (nbytes > sz_EventData) ? sz_EventData : nbytes; - - /* Initialize the event */ - event.type = XETrapData + XETrap_avail.data.event_base; - event.sequenceNumber = penv->client->sequence; - - /* Copy the data we are sending */ - (void)memcpy(event.data,data,size); - if (size < sz_EventData) - (void)memset(event.data+size,0L,sz_EventData-size); - data += size; - nbytes -= size; - total += size; - - /* Set the detail field to show the continuation of datum */ - if (total != size) - { /* this is not the first one */ - event.detail = (nbytes > 0) ? XETrapDataContinued : XETrapDataLast; - } - - /* Send this part to the client */ - WriteEventsToClient(penv->client, 1L, (xEvent *) &event); - event.idx++; /* Bump the index for the next event */ - } - return(total); -} - -/*----------------------------* - * Static Functions - *----------------------------*/ - -static void update_protocol(xXTrapGetReq *reqptr, ClientPtr client) -{ - XETrapEnv *penv = XETenv[client->index]; - /* update protocol number */ - switch (reqptr->protocol) - { - /* known acceptable protocols */ - case 31: - case XETrapProtocol: - penv->protocol = reqptr->protocol; - break; - /* all else */ - default: /* stay backwards compatible */ - penv->protocol = 31; - break; - } -} - -/* Swap 2 functions. This is a function instead of a macro to help to keep - * lint from complaining about mixed types. It seems to work, but I would - * probably classify this as a hack. - */ -static void _SwapProc( register int (**f1)(), register int (**f2)()) -{ - register int (*t1)() = *f1; - *f1 = *f2; - *f2 = t1; - - return; -} - -/* - * DESCRIPTION: - * - * This function swaps the byte order of fields within - * the XTrap Event Header. It assumes the data will be - * swapped by code in XETrapRequestVector(). - * - */ -static void sXETrapEvent(xETrapDataEvent *from, xETrapDataEvent *to) -{ - to->type = from->type; - to->detail = from->detail; - cpswaps(from->sequenceNumber,to->sequenceNumber); - cpswapl(from->idx,to->idx); - /* Assumes that the data's already been swapped by XETrapRequestVector */ - memcpy(to->data, from->data, SIZEOF(EventData)); -} - -/* - * DESCRIPTION: - * - * This function adds a node from an accelerator linked-list - * (either io_clients, stats_clients, or cmd_clients). - * - */ -static int add_accelerator_node(ClientPtr client, ClientList *accel) -{ - Bool found = False; - int status = Success; - - while (accel->next != NULL) - { - if (accel->client == client) - { - found = True; /* Client's already known */ - break; - } - else - { - accel = accel->next; - } - } - if (found == False) - { - if ((accel->next = (ClientList *)Xcalloc(sizeof(ClientList))) == NULL) - { - status = BadAlloc; - } - else - { /* fill in the node */ - accel = accel->next; - accel->next = NULL; - accel->client = client; - } - } - return(status); -} -/* - * DESCRIPTION: - * - * This function removes a node from an accelerator linked-list - * (either io_clients, stats_clients, or cmd_clients). - * - */ -static void remove_accelerator_node(ClientPtr client, ClientList *accel) -{ - while (accel->next != NULL) - { - if (accel->next->client == client) - { - ClientList *tmp = accel->next->next; - Xfree(accel->next); - accel->next = tmp; - break; - } - else - { - accel = accel->next; - } - } - - return; -} - -#ifdef COLOR_REPLIES -static void GetSendColorRep(ClientPtr client, xResourceReq *req) -{ /* adapted from ProcAllocColor() in dispatch.c */ - XETrapDatum data; - int retval; - XETrapEnv *penv = XETenv[client->index]; - xAllocColorReply *crep = (xAllocColorReply *)&(data.u.reply); - xAllocColorReq *creq = (xAllocColorReq *)req; - ColormapPtr pmap = (ColormapPtr )LookupIDByType(creq->cmap, RT_COLORMAP); - - /* Fill in the header fields */ - data.hdr.count = XETrapMinPktSize; /* The color replies are 32 bytes */ - XETrapSetHeaderReply(&(data.hdr)); - /* Hack alert: - * We need to pass the "reply" type in the header since replies don't - * contain the id's themselves. However, we're not changing the - * protocol to support this until we decide exactly how we want to - * do *all* replies (e.g. not just ColorReplies). So until then, stow - * the reply id in the screen field which wouldn't normally be used in - * this context. - */ - data.hdr.screen = req->reqType; - if (!pmap) - { - SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, - req->reqType, 0L, BadColor); - return; - } - crep->red = creq->red; - crep->green = creq->green; - crep->blue = creq->blue; - crep->pixel = 0; - if ((retval = AllocColor(pmap, &(crep->red), &(crep->green), - &(crep->blue), &(crep->pixel), client->index)) != Success) - { - SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, - req->reqType, 0L, retval); - return; - } - /* Swap data if necessary */ - if (client->swapped) - { - INT32 n; - swaps(&(crep->red), n); - swaps(&(crep->green), n); - swaps(&(crep->blue), n); - swapl(&(crep->pixel), n); - } - /* Send data to client */ - if (XETrapWriteXLib(penv, (BYTE *)&data, XETrapMinPktSize) - != XETrapMinPktSize) - { - SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, - req->reqType, 0L, XETrapErrorBase + BadIO); - } -} - -static void GetSendNamedColorRep(ClientPtr client, xResourceReq *req) -{ /* adapted from ProcAllocNamedColor() in dispatch.c */ - XETrapDatum data; - XETrapEnv *penv = XETenv[client->index]; - int retval; - xAllocNamedColorReply *nrep = (xAllocNamedColorReply *)&(data.u.reply); - xAllocNamedColorReq *nreq = (xAllocNamedColorReq *)req; - ColormapPtr pcmp = (ColormapPtr )LookupIDByType(nreq->cmap, RT_COLORMAP); - - data.hdr.count = XETrapMinPktSize; /* The color replies are 32 bytes */ - XETrapSetHeaderReply(&(data.hdr)); - /* Hack alert: - * We need to pass the "reply" type in the header since replies don't - * contain the id's themselves. However, we're not changing the - * protocol to support this until we decide exactly how we want to - * do *all* replies (e.g. not just ColorReplies). So until then, stow - * the reply id in the screen field which wouldn't normally be used in - * this context. - */ - data.hdr.screen = req->reqType; - if (!pcmp) - { - SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, - req->reqType, 0L, BadColor); - return; - } - if (!OsLookupColor(pcmp->pScreen->myNum, (char *)&nreq[1], - nreq->nbytes, &(nrep->exactRed), &(nrep->exactGreen), - &(nrep->exactBlue))) - { - SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, - req->reqType, 0L, BadName); - return; - } - nrep->screenRed = nrep->exactRed; - nrep->screenGreen = nrep->exactGreen; - nrep->screenBlue = nrep->exactBlue; - nrep->pixel = 0; - if ((retval = AllocColor(pcmp, &(nrep->screenRed), - &(nrep->screenGreen), &(nrep->screenBlue), &(nrep->pixel), - client->index)) != Success) - { - SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, - req->reqType, 0L, retval); - return; - } - /* Swap data if necessary */ - if (client->swapped) - { - INT32 n; - swapl(&(nrep->pixel), n); - swaps(&(nrep->exactRed), n); - swaps(&(nrep->exactGreen), n); - swaps(&(nrep->exactBlue), n); - swaps(&(nrep->screenRed), n); - swaps(&(nrep->screenGreen), n); - swaps(&(nrep->screenBlue), n); - } - - /* Send data to client */ - if (XETrapWriteXLib(penv, (BYTE *)&data, XETrapMinPktSize) - != XETrapMinPktSize) - { - SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, - req->reqType, 0L, XETrapErrorBase + BadIO); - } -} - -static void GetSendColorCellsRep(ClientPtr client, xResourceReq *req) -{ /* adapted from ProcAllocColorCells() in dispatch.c */ - int retval; - int npixels, nmasks; - unsigned long *ppixels, *pmasks; - long length; - XETrapDatum *data; - XETrapEnv *penv = XETenv[client->index]; - xAllocColorCellsReply *crep; - xAllocColorCellsReq *creq = (xAllocColorCellsReq *)req; - ColormapPtr pmap = (ColormapPtr )LookupIDByType(creq->cmap, RT_COLORMAP); - - if (!pmap) - { - SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, - req->reqType, 0L, BadColor); - return; - } - npixels = creq->colors; - if (!npixels) - { - SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, - req->reqType, 0L, BadValue); - return; - } - nmasks = creq->planes; - length = ((long)npixels + (long)nmasks) * sizeof(Pixel); - data = (XETrapDatum *)ALLOCATE_LOCAL(sizeof(XETrapDatum)+length); - if (!data) - { - SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, - req->reqType, 0L, BadAlloc); - return; - } - data->hdr.count = MIN(penv->cur.data_config_max_pkt_size, - sizeof(XETrapDatum)+length); - XETrapSetHeaderReply(&(data->hdr)); - data->hdr.screen = req->reqType; /* hack! but necessary */ - ppixels = (unsigned long *)((char *)data + sizeof(XETrapDatum)); - pmasks = ppixels + npixels; - if ((retval = AllocColorCells(client->index, pmap, npixels, - nmasks, (Bool)creq->contiguous, ppixels, pmasks)) != Success) - { - SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, - req->reqType, 0L, retval); - DEALLOCATE_LOCAL(data); - return; - } - crep = (xAllocColorCellsReply *)&(data->u.reply); - crep->nPixels = npixels; - crep->nMasks = nmasks; - /* Swap data if necessary */ - if (client->swapped) - { - INT32 n, i, *ptr; - ptr=(INT32 *)ppixels; - swaps(&(crep->nPixels), n); - swaps(&(crep->nMasks), n); - for (i=0; ihdr.count) - != data->hdr.count) - { - SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, - req->reqType, 0L, XETrapErrorBase + BadIO); - } - DEALLOCATE_LOCAL(data); -} -static void GetSendColorPlanesRep(ClientPtr client, xResourceReq *req) -{ /* adapted from ProcAllocColorPlanes() in dispatch.c */ - int retval; - int npixels, nmasks; - unsigned long *ppixels, *pmasks; - long length; - XETrapDatum *data; - XETrapEnv *penv = XETenv[client->index]; - xAllocColorPlanesReply *crep; - xAllocColorPlanesReq *creq = (xAllocColorPlanesReq *)req; - ColormapPtr pmap = (ColormapPtr )LookupIDByType(creq->cmap, RT_COLORMAP); - - if (!pmap) - { - SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, - req->reqType, 0L, BadColor); - return; - } - npixels = creq->colors; - if (!npixels) - { - SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, - req->reqType, 0L, BadValue); - return; - } - length = (long)npixels * sizeof(Pixel); - data = (XETrapDatum *)ALLOCATE_LOCAL(sizeof(XETrapDatum)+length); - if (!data) - { - SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, - req->reqType, 0L, BadAlloc); - return; - } - data->hdr.count = MIN(penv->cur.data_config_max_pkt_size, - sizeof(XETrapDatum)+length); - XETrapSetHeaderReply(&(data->hdr)); - data->hdr.screen = req->reqType; /* hack! but necessary */ - ppixels = (unsigned long *)((char *)data + sizeof(XETrapDatum)); - crep = (xAllocColorPlanesReply *)&(data->u.reply); - if ((retval = AllocColorPlanes(client->index, pmap, npixels, - (int)creq->red, (int)creq->green, (int)creq->blue, - (int)creq->contiguous, ppixels, &(crep->redMask), &(crep->greenMask), - &(crep->blueMask))) != Success) - { - SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, - req->reqType, 0L, retval); - DEALLOCATE_LOCAL(data); - return; - } - crep->nPixels = npixels; - /* Swap data if necessary */ - if (client->swapped) - { - INT32 n, i, *ptr; - ptr=(INT32 *)ppixels; - swaps(&(crep->nPixels), n); - swapl(&(crep->redMask), n); - swapl(&(crep->greenMask), n); - swapl(&(crep->blueMask), n); - for (i=0; ihdr.count) - != data->hdr.count) - { - SendErrorToClient(penv->client, XETrap_avail.data.major_opcode, - req->reqType, 0L, XETrapErrorBase + BadIO); - } - DEALLOCATE_LOCAL(data); -} -#endif /* COLOR_REPLIES */ diff --git a/nx-X11/programs/Xserver/XTrap/xtrapdiswp.c b/nx-X11/programs/Xserver/XTrap/xtrapdiswp.c deleted file mode 100644 index ba8249c35..000000000 --- a/nx-X11/programs/Xserver/XTrap/xtrapdiswp.c +++ /dev/null @@ -1,1010 +0,0 @@ -/* $XFree86$ */ -/**************************************************************************** -Copyright 1987, 1988, 1989, 1990, 1991, 1992 by - - Digital Equipment Corp., Maynard, MA - -X11R6 Changes Copyright (c) 1994 by Robert Chesler of Absol-Puter, Hudson, NH. - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -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 Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL AND ABSOL-PUTER DISCLAIM ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS, IN NO EVENT SHALL DIGITAL OR ABSOL-PUTER 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. - -*****************************************************************************/ -/* - * ABSTRACT: - * - * This module is the device independent module responsible for all - * routines required for proper communication in a heterogeneous - * networking environment (i.e. client & server on different endian - * machines). The bulk of this module is patterned after X11/R4's - * server/dix/swapreq.c ; however, they infact swap fields - * in the exact opposite order since XTrap requires "unswapped" data - * to become "swapped" before sending it to a "swapped" client. - * - * CONTRIBUTORS: - * - * Ken Miller - * Marc Evans - * - * CHANGES: - * - * Robert Chesler - added client arg for X11R6 port in many spots - * - */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#define NEED_REPLIES -#define NEED_EVENTS -#include -#include -#include -#include "input.h" /* Server DevicePtr definitions */ -#include "misc.h" -#include "dixstruct.h" -#ifdef PC -# include "extnsist.h" -#else -# include "extnsionst.h" /* Server ExtensionEntry definitions */ -#endif -# include "swapreq.h" /* Server SwapColorItem definition */ -#include -#include - -/* In-coming XTrap requests needing to be swapped to native format */ - -int sXETrapReset(xXTrapReq *request, ClientPtr client) -{ - register char n; - swaps(&(request->length),n); - return(XETrapReset(request,client)); -} - -int sXETrapGetAvailable(xXTrapGetReq *request, ClientPtr client) -{ - register char n; - swaps(&(request->length),n); - swaps(&(request->protocol),n); - return(XETrapGetAvailable(request,client)); -} - -int sXETrapConfig(xXTrapConfigReq *request, ClientPtr client) -{ - register char n; - swaps(&(request->length),n); - swaps(&(request->config_max_pkt_size),n); - return(XETrapConfig(request,client)); -} - -int sXETrapStartTrap(xXTrapReq *request, ClientPtr client) -{ - register char n; - swaps(&(request->length),n); - return(XETrapStartTrap(request,client)); -} - -int sXETrapStopTrap(xXTrapReq *request, ClientPtr client) -{ - register char n; - swaps(&(request->length),n); - return(XETrapStopTrap(request,client)); -} - -int sXETrapGetCurrent(xXTrapReq *request, ClientPtr client) -{ - register char n; - swaps(&(request->length),n); - return(XETrapGetCurrent(request,client)); -} - -int sXETrapGetStatistics(xXTrapReq *request, ClientPtr client) -{ - register char n; - swaps(&(request->length),n); - return(XETrapGetStatistics(request,client)); -} - -#ifndef _XINPUT -int sXETrapSimulateXEvent(xXTrapInputReq *request, ClientPtr client) -{ - register char n; - swaps(&(request->input.x),n); - swaps(&(request->input.y),n); - return(XETrapSimulateXEvent(request,client)); -} -#endif - -int sXETrapGetVersion(xXTrapGetReq *request, ClientPtr client) -{ - register char n; - swaps(&(request->length),n); - swaps(&(request->protocol),n); - return(XETrapGetVersion(request,client)); -} - -int sXETrapGetLastInpTime(xXTrapReq *request, ClientPtr client) -{ - register char n; - swaps(&(request->length),n); - return(XETrapGetLastInpTime(request,client)); -} - - -/* Out-going XTrap replies needing to be swapped *from* native format */ - -void sReplyXETrapGetAvail(ClientPtr client, int size, char *reply) -{ - xXTrapGetAvailReply *rep = (xXTrapGetAvailReply *)reply; - register char n; - swaps(&(rep->hdr.sequenceNumber),n); - swapl(&(rep->hdr.length),n); - swapl(&(rep->data.pf_ident),n); - swaps(&(rep->data.xtrap_release),n); - swaps(&(rep->data.xtrap_version),n); - swaps(&(rep->data.xtrap_revision),n); - swaps(&(rep->data.max_pkt_size),n); - swapl(&(rep->data.major_opcode),n); - swapl(&(rep->data.event_base),n); - swaps(&(rep->data.cur_x),n); - swaps(&(rep->data.cur_y),n); - (void)WriteToClient(client,size,reply); - return; -} -void sReplyXETrapGetVers(ClientPtr client, int size, char *reply) -{ - xXTrapGetVersReply *rep = (xXTrapGetVersReply *)reply; - register char n; - swaps(&(rep->hdr.sequenceNumber),n); - swapl(&(rep->hdr.length),n); - swaps(&(rep->data.xtrap_release),n); - swaps(&(rep->data.xtrap_version),n); - swaps(&(rep->data.xtrap_revision),n); - (void)WriteToClient(client,size,reply); - return; -} -void sReplyXETrapGetLITim(ClientPtr client, int size, char *reply) -{ - xXTrapGetLITimReply *rep = (xXTrapGetLITimReply *)reply; - register char n; - swaps(&(rep->hdr.sequenceNumber),n); - swapl(&(rep->hdr.length),n); - swapl(&(rep->data_last_time),n); - (void)WriteToClient(client,size,reply); - return; -} -void sReplyXETrapGetCur(ClientPtr client, int size, char *reply) -{ - xXTrapGetCurReply *rep = (xXTrapGetCurReply *)reply; - register char n; - swaps(&(rep->hdr.sequenceNumber),n); - swapl(&(rep->hdr.length),n); - swaps(&(rep->data_config_max_pkt_size),n); - (void)WriteToClient(client,size,reply); - return; -} -void sReplyXETrapGetStats(ClientPtr client, int size, char *reply) -{ - xXTrapGetStatsReply *rep = (xXTrapGetStatsReply *)reply; - register char n; - register int i; - long *p; - - swaps(&(rep->sequenceNumber),n); - swapl(&(rep->length),n); - for (i=0L, p = (long *)rep->data.requests; i<256L; i++, p++) - { - swapl(p,n); - } - for (i=0L, p = (long *)rep->data.events; icount), n); - swapl(&(hdr->timestamp), n); - swaps(&(hdr->win_x), n); - swaps(&(hdr->win_y), n); - swaps(&(hdr->client), n); -} - - /* Out-going requests needing to be swapped *from* native format - * aka swapreq.c "equivalents" - */ - -/* The following is used for all requests that have - no fields to be swapped (except "length") */ -void XETSwSimpleReq(register xReq *data) -{ - register char n; - swaps(&(data->length), n); -} - -/* The following is used for all requests that have - only a single 32-bit field to be swapped, coming - right after the "length" field */ - -void XETSwResourceReq(register xResourceReq *data) -{ - register char n; - - swaps(&(data->length), n); - swapl(&(data->id), n); -} - -void XETSwCreateWindow(register xCreateWindowReq *data,ClientPtr client) -{ - register char n; - - swapl(&(data->wid), n); - swapl(&(data->parent), n); - swaps(&(data->x), n); - swaps(&(data->y), n); - swaps(&(data->width), n); - swaps(&(data->height), n); - swaps(&(data->borderWidth), n); - swaps(&(data->class), n); - swapl(&(data->visual), n); - swapl(&(data->mask), n); - SwapRestL(data); - swaps(&(data->length), n); -} - -void XETSwChangeWindowAttributes(register xChangeWindowAttributesReq *data, -ClientPtr client) -{ - register char n; - - swapl(&(data->window), n); - swapl(&(data->valueMask), n); - SwapRestL(data); - swaps(&(data->length), n); -} - -void XETSwReparentWindow(register xReparentWindowReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->window), n); - swapl(&(data->parent), n); - swaps(&(data->x), n); - swaps(&(data->y), n); -} - -void XETSwConfigureWindow(xConfigureWindowReq *data, ClientPtr client) -{ - register char n; - swapl(&(data->window), n); - swaps(&(data->mask), n); - SwapRestL(data); - swaps(&(data->length), n); -} - - -void XETSwInternAtom(register xInternAtomReq *data) -{ - register char n; - swaps(&(data->length), n); - swaps(&(data->nbytes), n); -} - -void XETSwChangeProperty(register xChangePropertyReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->window), n); - swapl(&(data->property), n); - swapl(&(data->type), n); - switch ( data->format ) { - case 8L : break; - case 16L: - SwapShorts((short *)(data + 1), data->nUnits); - break; - case 32L: - SwapLongs((CARD32 *)(data + 1), data->nUnits); - break; - } - swapl(&(data->nUnits), n); -} - -void XETSwDeleteProperty(register xDeletePropertyReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->window), n); - swapl(&(data->property), n); - -} -void XETSwGetProperty(register xGetPropertyReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->window), n); - swapl(&(data->property), n); - swapl(&(data->type), n); - swapl(&(data->longOffset), n); - swapl(&(data->longLength), n); -} - -void XETSwSetSelectionOwner(register xSetSelectionOwnerReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->window), n); - swapl(&(data->selection), n); - swapl(&(data->time), n); -} - -void XETSwConvertSelection(register xConvertSelectionReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->requestor), n); - swapl(&(data->selection), n); - swapl(&(data->target), n); - swapl(&(data->property), n); - swapl(&(data->time), n); -} - -void XETSwSendEvent(register xSendEventReq *data) -{ - register char n; - xEvent eventT; - void (*proc)(); - swapl(&(data->destination), n); - swapl(&(data->eventMask), n); - - /* Swap event */ - proc = EventSwapVector[data->event.u.u.type & 0177]; - if (!proc || (int (*)()) proc == (int (*)()) NotImplemented) - (*proc)(&(data->event), &eventT); - data->event = eventT; - swaps(&(data->length), n); -} - -void XETSwGrabPointer(register xGrabPointerReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->grabWindow), n); - swaps(&(data->eventMask), n); - swapl(&(data->confineTo), n); - swapl(&(data->cursor), n); - swapl(&(data->time), n); -} - -void XETSwGrabButton(register xGrabButtonReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->grabWindow), n); - swaps(&(data->eventMask), n); - swapl(&(data->confineTo), n); - swapl(&(data->cursor), n); - swaps(&(data->modifiers), n); -} - -void XETSwUngrabButton(register xUngrabButtonReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->grabWindow), n); - swaps(&(data->modifiers), n); -} - -void XETSwChangeActivePointerGrab(register xChangeActivePointerGrabReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->cursor), n); - swapl(&(data->time), n); - swaps(&(data->eventMask), n); -} - -void XETSwGrabKeyboard(register xGrabKeyboardReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->grabWindow), n); - swapl(&(data->time), n); -} - -void XETSwGrabKey(register xGrabKeyReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->grabWindow), n); - swaps(&(data->modifiers), n); -} - -void XETSwUngrabKey(register xUngrabKeyReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->grabWindow), n); - swaps(&(data->modifiers), n); -} - -void XETSwGetMotionEvents(register xGetMotionEventsReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->window), n); - swapl(&(data->start), n); - swapl(&(data->stop), n); -} - -void XETSwTranslateCoords(register xTranslateCoordsReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->srcWid), n); - swapl(&(data->dstWid), n); - swaps(&(data->srcX), n); - swaps(&(data->srcY), n); -} - -void XETSwWarpPointer(register xWarpPointerReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->srcWid), n); - swapl(&(data->dstWid), n); - swaps(&(data->srcX), n); - swaps(&(data->srcY), n); - swaps(&(data->srcWidth), n); - swaps(&(data->srcHeight), n); - swaps(&(data->dstX), n); - swaps(&(data->dstY), n); -} - -void XETSwSetInputFocus(register xSetInputFocusReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->focus), n); - swapl(&(data->time), n); -} - -void XETSwOpenFont(register xOpenFontReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->fid), n); - swaps(&(data->nbytes), n); -} - -void XETSwListFonts(register xListFontsReq *data) -{ - register char n; - swaps(&(data->length), n); - swaps(&(data->maxNames), n); - swaps(&(data->nbytes), n); -} - -void XETSwListFontsWithInfo(register xListFontsWithInfoReq *data) -{ - register char n; - swaps(&(data->length), n); - swaps(&(data->maxNames), n); - swaps(&(data->nbytes), n); -} - -void XETSwSetFontPath(register xSetFontPathReq *data) -{ - register char n; - swaps(&(data->length), n); - swaps(&(data->nFonts), n); -} - -void XETSwCreatePixmap(register xCreatePixmapReq *data) -{ - register char n; - - swaps(&(data->length), n); - swapl(&(data->pid), n); - swapl(&(data->drawable), n); - swaps(&(data->width), n); - swaps(&(data->height), n); -} - -void XETSwCreateGC(register xCreateGCReq *data, ClientPtr client) -{ - register char n; - swapl(&(data->gc), n); - swapl(&(data->drawable), n); - swapl(&(data->mask), n); - SwapRestL(data); - swaps(&(data->length), n); -} - -void XETSwChangeGC(register xChangeGCReq *data, ClientPtr client) -{ - register char n; - swapl(&(data->gc), n); - swapl(&(data->mask), n); - SwapRestL(data); - swaps(&(data->length), n); -} - -void XETSwCopyGC(register xCopyGCReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->srcGC), n); - swapl(&(data->dstGC), n); - swapl(&(data->mask), n); -} - -void XETSwSetDashes(register xSetDashesReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->gc), n); - swaps(&(data->dashOffset), n); - swaps(&(data->nDashes), n); -} - -void XETSwSetClipRectangles(register xSetClipRectanglesReq *data, ClientPtr -client) -{ - register char n; - swapl(&(data->gc), n); - swaps(&(data->xOrigin), n); - swaps(&(data->yOrigin), n); - SwapRestS(data); - swaps(&(data->length), n); -} - -void XETSwClearToBackground(register xClearAreaReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->window), n); - swaps(&(data->x), n); - swaps(&(data->y), n); - swaps(&(data->width), n); - swaps(&(data->height), n); -} - -void XETSwCopyArea(register xCopyAreaReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->srcDrawable), n); - swapl(&(data->dstDrawable), n); - swapl(&(data->gc), n); - swaps(&(data->srcX), n); - swaps(&(data->srcY), n); - swaps(&(data->dstX), n); - swaps(&(data->dstY), n); - swaps(&(data->width), n); - swaps(&(data->height), n); -} - -void XETSwCopyPlane(register xCopyPlaneReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->srcDrawable), n); - swapl(&(data->dstDrawable), n); - swapl(&(data->gc), n); - swaps(&(data->srcX), n); - swaps(&(data->srcY), n); - swaps(&(data->dstX), n); - swaps(&(data->dstY), n); - swaps(&(data->width), n); - swaps(&(data->height), n); - swapl(&(data->bitPlane), n); -} - -/* The following routine is used for all Poly drawing requests - (except FillPoly, which uses a different request format) */ -void XETSwPoly(register xPolyPointReq *data, ClientPtr client) -{ - register char n; - - swapl(&(data->drawable), n); - swapl(&(data->gc), n); - SwapRestS(data); - swaps(&(data->length), n); -} - /* cannot use XETSwPoly for this one, because xFillPolyReq - * is longer than xPolyPointReq, and we don't want to swap - * the difference as shorts! - */ -void XETSwFillPoly(register xFillPolyReq *data, ClientPtr client) -{ - register char n; - - swapl(&(data->drawable), n); - swapl(&(data->gc), n); - SwapRestS(data); - swaps(&(data->length), n); -} - -void XETSwPutImage(register xPutImageReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->drawable), n); - swapl(&(data->gc), n); - swaps(&(data->width), n); - swaps(&(data->height), n); - swaps(&(data->dstX), n); - swaps(&(data->dstY), n); - /* Image should already be swapped */ -} - -void XETSwGetImage(register xGetImageReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->drawable), n); - swaps(&(data->x), n); - swaps(&(data->y), n); - swaps(&(data->width), n); - swaps(&(data->height), n); - swapl(&(data->planeMask), n); -} - -/* ProcPolyText used for both PolyText8 and PolyText16 */ - -void XETSwPolyText(register xPolyTextReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->drawable), n); - swapl(&(data->gc), n); - swaps(&(data->x), n); - swaps(&(data->y), n); -} - -/* ProcImageText used for both ImageText8 and ImageText16 */ - -void XETSwImageText(register xImageTextReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->drawable), n); - swapl(&(data->gc), n); - swaps(&(data->x), n); - swaps(&(data->y), n); -} - -void XETSwCreateColormap(register xCreateColormapReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->mid), n); - swapl(&(data->window), n); - swapl(&(data->visual), n); -} - - -void XETSwCopyColormapAndFree(register xCopyColormapAndFreeReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->mid), n); - swapl(&(data->srcCmap), n); - -} - -void XETSwAllocColor (register xAllocColorReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->cmap), n); - swaps(&(data->red), n); - swaps(&(data->green), n); - swaps(&(data->blue), n); -} - -void XETSwAllocNamedColor (register xAllocNamedColorReq *data) -{ - register char n; - - swaps(&(data->length), n); - swapl(&(data->cmap), n); - swaps(&(data->nbytes), n); -} - -void XETSwAllocColorCells (register xAllocColorCellsReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->cmap), n); - swaps(&(data->colors), n); - swaps(&(data->planes), n); -} - -void XETSwAllocColorPlanes(register xAllocColorPlanesReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->cmap), n); - swaps(&(data->colors), n); - swaps(&(data->red), n); - swaps(&(data->green), n); - swaps(&(data->blue), n); -} - -void XETSwFreeColors (register xFreeColorsReq *data, ClientPtr -client) -{ - register char n; - swapl(&(data->cmap), n); - swapl(&(data->planeMask), n); - SwapRestL(data); - swaps(&(data->length), n); - -} - -void XETSwStoreColors (register xStoreColorsReq *data,ClientPtr -client) -{ - register char n; - unsigned long count; - xColorItem *pItem; - - swapl(&(data->cmap), n); - pItem = (xColorItem *) &(data[1]); - for(count = LengthRestB(data)/sizeof(xColorItem); count != 0; count--) - SwapColorItem(pItem++); - swaps(&(data->length), n); -} - -void XETSwStoreNamedColor (register xStoreNamedColorReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->cmap), n); - swapl(&(data->pixel), n); - swaps(&(data->nbytes), n); -} - -void XETSwQueryColors(register xQueryColorsReq *data, ClientPtr client) -{ - register char n; - swapl(&(data->cmap), n); - SwapRestL(data); - swaps(&(data->length), n); -} - -void XETSwLookupColor(register xLookupColorReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->cmap), n); - swaps(&(data->nbytes), n); -} - -void XETSwCreateCursor(register xCreateCursorReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->cid), n); - swapl(&(data->source), n); - swapl(&(data->mask), n); - swaps(&(data->foreRed), n); - swaps(&(data->foreGreen), n); - swaps(&(data->foreBlue), n); - swaps(&(data->backRed), n); - swaps(&(data->backGreen), n); - swaps(&(data->backBlue), n); - swaps(&(data->x), n); - swaps(&(data->y), n); -} - -void XETSwCreateGlyphCursor(register xCreateGlyphCursorReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->cid), n); - swapl(&(data->source), n); - swapl(&(data->mask), n); - swaps(&(data->sourceChar), n); - swaps(&(data->maskChar), n); - swaps(&(data->foreRed), n); - swaps(&(data->foreGreen), n); - swaps(&(data->foreBlue), n); - swaps(&(data->backRed), n); - swaps(&(data->backGreen), n); - swaps(&(data->backBlue), n); -} - - -void XETSwRecolorCursor(register xRecolorCursorReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->cursor), n); - swaps(&(data->foreRed), n); - swaps(&(data->foreGreen), n); - swaps(&(data->foreBlue), n); - swaps(&(data->backRed), n); - swaps(&(data->backGreen), n); - swaps(&(data->backBlue), n); -} - -void XETSwQueryBestSize (register xQueryBestSizeReq *data) -{ - register char n; - swaps(&(data->length), n); - swapl(&(data->drawable), n); - swaps(&(data->width), n); - swaps(&(data->height), n); - -} - -void XETSwQueryExtension (register xQueryExtensionReq *data) -{ - register char n; - swaps(&(data->length), n); - swaps(&(data->nbytes), n); -} - -void XETSwChangeKeyboardMapping (register xChangeKeyboardMappingReq *data) -{ - register char n; - register long *p; - register int i, count; - - swaps(&(data->length), n); - p = (long *)&(data[1]); - count = data->keyCodes * data->keySymsPerKeyCode; - for(i = 0; i < count; i++) - { - swapl(p, n); - p++; - } -} - - -void XETSwChangeKeyboardControl (register xChangeKeyboardControlReq *data, - ClientPtr client) -{ - register char n; - swapl(&(data->mask), n); - SwapRestL(data); - swaps(&(data->length), n); -} - -void XETSwChangePointerControl (register xChangePointerControlReq *data) -{ - register char n; - swaps(&(data->length), n); - swaps(&(data->accelNum), n); - swaps(&(data->accelDenum), n); - swaps(&(data->threshold), n); -} - - -void XETSwSetScreenSaver (register xSetScreenSaverReq *data) -{ - register char n; - swaps(&(data->length), n); - swaps(&(data->timeout), n); - swaps(&(data->interval), n); -} - -void XETSwChangeHosts(register xChangeHostsReq *data) -{ - register char n; - - swaps(&(data->length), n); - swaps(&(data->hostLength), n); - -} -void XETSwRotateProperties(register xRotatePropertiesReq *data, ClientPtr client) -{ - register char n; - swapl(&(data->window), n); - swaps(&(data->nAtoms), n); - swaps(&(data->nPositions), n); - SwapRestL(data); - swaps(&(data->length), n); -} - -/*ARGSUSED*/ -void XETSwNoOperation(xReq *data) -{ - /* noop -- don't do anything */ -} - -/* Byte swap a list of longs */ -#if defined vms && !defined MITR5 -#ifndef LINKED_IN -void SwapLongs ( register long *list, register unsigned long count) -{ - register char n; - - while (count >= 8) { - swapl(list+0, n); - swapl(list+1, n); - swapl(list+2, n); - swapl(list+3, n); - swapl(list+4, n); - swapl(list+5, n); - swapl(list+6, n); - swapl(list+7, n); - list += 8; - count -= 8; - } - if (count != 0) { - do { - swapl(list, n); - list++; - } while (--count != 0); - } -} - -/* Byte swap a list of shorts */ - -void SwapShorts (register short *list, register unsigned long count) -{ - register char n; - - while (count >= 16) { - swaps(list+0, n); - swaps(list+1, n); - swaps(list+2, n); - swaps(list+3, n); - swaps(list+4, n); - swaps(list+5, n); - swaps(list+6, n); - swaps(list+7, n); - swaps(list+8, n); - swaps(list+9, n); - swaps(list+10, n); - swaps(list+11, n); - swaps(list+12, n); - swaps(list+13, n); - swaps(list+14, n); - swaps(list+15, n); - list += 16; - count -= 16; - } - if (count != 0) { - do { - swaps(list, n); - list++; - } while (--count != 0); - } -} - -SwapColorItem(xColorItem *pItem) -{ - register char n; - swapl(&pItem->pixel, n); - swaps(&pItem->red, n); - swaps(&pItem->green, n); - swaps(&pItem->blue, n); -} -#endif /* LINKED_IN */ -#endif /* vms */ diff --git a/nx-X11/programs/Xserver/XTrap/xtrapditbl.c b/nx-X11/programs/Xserver/XTrap/xtrapditbl.c deleted file mode 100644 index 10a070e9e..000000000 --- a/nx-X11/programs/Xserver/XTrap/xtrapditbl.c +++ /dev/null @@ -1,242 +0,0 @@ -/* $XFree86$ */ -/**************************************************************************** -Copyright 1987, 1988, 1989, 1990, 1991 by Digital Equipment Corp., Maynard, MA - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -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 Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL 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. - -*****************************************************************************/ -/* - * ABSTRACT: - * - * This module is contains Vector tables used for swapping and general - * dispatch by the XTrap server extension. - * - * CONTRIBUTORS: - * - * Ken Miller - * Marc Evans - * - */ - -/*-----------------* - * Include Files * - *-----------------*/ -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#define NEED_REPLIES -#define NEED_EVENTS -#include -#include -#include -#include "input.h" /* Server DevicePtr definitions */ -#include "misc.h" -#include "dixstruct.h" -#ifdef PC -# include "extnsist.h" -#else -# include "extnsionst.h" /* Server ExtensionEntry definitions */ -#endif -#include -#include - -globaldef void_function XETSwProcVector[256L] = -{ - (void_function)ProcBadRequest, - XETSwCreateWindow, - XETSwChangeWindowAttributes, - XETSwResourceReq, /* GetWindowAttributes */ - XETSwResourceReq, /* DestroyWindow */ - XETSwResourceReq, /* 5 DestroySubwindows */ - XETSwResourceReq, /* XETSwChangeSaveSet, */ - XETSwReparentWindow, - XETSwResourceReq, /* MapWindow */ - XETSwResourceReq, /* MapSubwindows */ - XETSwResourceReq, /* 10 UnmapWindow */ - XETSwResourceReq, /* UnmapSubwindows */ - XETSwConfigureWindow, - XETSwResourceReq, /* XETSwCirculateWindow, */ - XETSwResourceReq, /* GetGeometry */ - XETSwResourceReq, /* 15 QueryTree */ - XETSwInternAtom, - XETSwResourceReq, /* XETSwGetAtomName, */ - XETSwChangeProperty, - XETSwDeleteProperty, - XETSwGetProperty, /* 20 */ - XETSwResourceReq, /* XETSwListProperties, */ - XETSwSetSelectionOwner, - XETSwResourceReq, /* XETSwGetSelectionOwner, */ - XETSwConvertSelection, - XETSwSendEvent, /* 25 */ - XETSwGrabPointer, - XETSwResourceReq, /* XETSwUngrabPointer, */ - XETSwGrabButton, - XETSwUngrabButton, - XETSwChangeActivePointerGrab, /* 30 */ - XETSwGrabKeyboard, - XETSwResourceReq, /* XETSwUngrabKeyboard, */ - XETSwGrabKey, - XETSwUngrabKey, - XETSwResourceReq, /* 35 XETSwAllowEvents, */ - XETSwSimpleReq, /* XETSwGrabServer, */ - XETSwSimpleReq, /* XETSwUngrabServer, */ - XETSwResourceReq, /* XETSwQueryPointer, */ - XETSwGetMotionEvents, - XETSwTranslateCoords, /*40 */ - XETSwWarpPointer, - XETSwSetInputFocus, - XETSwSimpleReq, /* XETSwGetInputFocus, */ - XETSwSimpleReq, /* QueryKeymap, */ - XETSwOpenFont, /* 45 */ - XETSwResourceReq, /* XETSwCloseFont, */ - XETSwResourceReq, /* XETSwQueryFont, */ - XETSwResourceReq, /* XETSwQueryTextExtents, */ - XETSwListFonts, - XETSwListFontsWithInfo, /* 50 */ - XETSwSetFontPath, - XETSwSimpleReq, /* GetFontPath, */ - XETSwCreatePixmap, - XETSwResourceReq, /* XETSwFreePixmap, */ - XETSwCreateGC, /* 55 */ - XETSwChangeGC, - XETSwCopyGC, - XETSwSetDashes, - XETSwSetClipRectangles, - XETSwResourceReq, /* 60 XETSwFreeGC, */ - XETSwClearToBackground, - XETSwCopyArea, - XETSwCopyPlane, - XETSwPoly, /* PolyPoint, */ - XETSwPoly, /* 65 PolyLine */ - XETSwPoly, /* PolySegment, */ - XETSwPoly, /* PolyRectangle, */ - XETSwPoly, /* PolyArc, */ - XETSwFillPoly, - XETSwPoly, /* 70 PolyFillRectangle */ - XETSwPoly, /* PolyFillArc, */ - XETSwPutImage, - XETSwGetImage, - XETSwPolyText, - XETSwPolyText, /* 75 */ - XETSwImageText, - XETSwImageText, - XETSwCreateColormap, - XETSwResourceReq, /* XETSwFreeColormap, */ - XETSwCopyColormapAndFree, /* 80 */ - XETSwResourceReq, /* XETSwInstallColormap, */ - XETSwResourceReq, /* XETSwUninstallColormap, */ - XETSwResourceReq, /* XETSwListInstalledColormaps, */ - XETSwAllocColor, - XETSwAllocNamedColor, /* 85 */ - XETSwAllocColorCells, - XETSwAllocColorPlanes, - XETSwFreeColors, - XETSwStoreColors, - XETSwStoreNamedColor, /* 90 */ - XETSwQueryColors, - XETSwLookupColor, - XETSwCreateCursor, - XETSwCreateGlyphCursor, - XETSwResourceReq, /* 95 XETSwFreeCursor, */ - XETSwRecolorCursor, - XETSwQueryBestSize, - XETSwQueryExtension, - XETSwSimpleReq, /* ListExtensions, */ - XETSwChangeKeyboardMapping, /* 100 */ - XETSwSimpleReq, /* GetKeyboardMapping, */ - XETSwChangeKeyboardControl, - XETSwSimpleReq, /* GetKeyboardControl, */ - XETSwSimpleReq, /* Bell, */ - XETSwChangePointerControl, /* 105 */ - XETSwSimpleReq, /* GetPointerControl, */ - XETSwSetScreenSaver, - XETSwSimpleReq, /* GetScreenSaver, */ - XETSwChangeHosts, - XETSwSimpleReq, /* 110 ListHosts, */ - XETSwSimpleReq, /* XETSwChangeAccessControl, */ - XETSwSimpleReq, /* XETSwChangeCloseDownMode, */ - XETSwResourceReq, /* XETSwKillClient, */ - XETSwRotateProperties, - XETSwSimpleReq, /* 115 ForceScreenSaver */ - XETSwSimpleReq, /* SetPointerMapping, */ - XETSwSimpleReq, /* GetPointerMapping, */ - XETSwSimpleReq, /* SetModifierMapping, */ - XETSwSimpleReq, /* GetModifierMapping, */ - NotImplemented, /* 120 */ - NotImplemented, - NotImplemented, - NotImplemented, - NotImplemented, - NotImplemented, /* 125 */ - NotImplemented, - XETSwNoOperation -}; - -/* NOTE: This array must align with the values of the constants used - * as minor_opcode values in the request structure. Failure to do this - * could result in random code paths. - */ -globaldef int_function XETrapDispatchVector[10L] = -{ - XETrapReset, /* 0 XETrap_Reset */ - XETrapGetAvailable, /* 1 XETrap_GetAvailable */ - XETrapConfig, /* 2 XETrap_Config */ - XETrapStartTrap, /* 3 XETrap_StartTrap */ - XETrapStopTrap, /* 4 XETrap_StopTrap */ - XETrapGetCurrent, /* 5 XETrap_GetCurrent */ - XETrapGetStatistics, /* 6 XETrap_GetStatistics */ -#ifndef _XINPUT - XETrapSimulateXEvent, /* 7 XETrap_SimulateXEvent */ -#endif - XETrapGetVersion, /* 8 XETrap_GetVersion */ - XETrapGetLastInpTime, /* 9 XETrap_GetLastInpTime */ -}; - -/* NOTE: This array must align with the values of the constants used - * as minor_opcode values in the request structure. Failure to do this - * could result in random code paths. - */ -globaldef int_function XETSwDispatchVector[10L] = -{ - sXETrapReset, /* 0 XETrap_Reset */ - sXETrapGetAvailable, /* 1 XETrap_GetAvailable */ - sXETrapConfig, /* 2 XETrap_Config */ - sXETrapStartTrap, /* 3 XETrap_StartTrap */ - sXETrapStopTrap, /* 4 XETrap_StopTrap */ - sXETrapGetCurrent, /* 5 XETrap_GetCurrent */ - sXETrapGetStatistics, /* 6 XETrap_GetStatistics */ -#ifndef _XINPUT - sXETrapSimulateXEvent, /* 7 XETrap_SimulateXEvent */ -#endif - sXETrapGetVersion, /* 8 XETrap_GetVersion */ - sXETrapGetLastInpTime, /* 9 XETrap_GetLastInpTime */ -}; - -/* ProcVector shadow vector */ -globaldef int_function XETrapProcVector[256L] = {XETrapRequestVector}; -/* - * Events are faked as if they're vectored since that's - * the way it'll eventually be (X11 R5?). - */ -#ifndef VECTORED_EVENTS -globaldef int_function EventProcVector[XETrapCoreEvents] = {NULL}; -#endif -globaldef int_function XETrapEventProcVector[XETrapCoreEvents] = {NULL}; - - diff --git a/nx-X11/programs/Xserver/Xext/EVI.c b/nx-X11/programs/Xserver/Xext/EVI.c deleted file mode 100644 index 1eca62693..000000000 --- a/nx-X11/programs/Xserver/Xext/EVI.c +++ /dev/null @@ -1,215 +0,0 @@ -/* $Xorg: EVI.c,v 1.3 2000/08/17 19:47:55 cpqbld Exp $ */ -/************************************************************ -Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc. -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, 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 Silicon Graphics not be -used in advertising or publicity pertaining to distribution -of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability -of this software for any purpose. It is provided "as is" -without any express or implied warranty. -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS 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. -********************************************************/ -/* $XFree86: xc/programs/Xserver/Xext/EVI.c,v 3.10tsi Exp $ */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include "dixstruct.h" -#include "extnsionst.h" -#include "dix.h" -#define _XEVI_SERVER_ -#include -#include "EVIstruct.h" -#include "modinit.h" -#include "scrnintstr.h" - -#if 0 -static unsigned char XEVIReqCode = 0; -#endif -static EviPrivPtr eviPriv; - -static int -ProcEVIQueryVersion(ClientPtr client) -{ - /* REQUEST(xEVIQueryVersionReq); */ - xEVIQueryVersionReply rep; - register int n; - REQUEST_SIZE_MATCH (xEVIQueryVersionReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.majorVersion = XEVI_MAJOR_VERSION; - rep.minorVersion = XEVI_MAJOR_VERSION; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.majorVersion, n); - swaps(&rep.minorVersion, n); - } - WriteToClient(client, sizeof (xEVIQueryVersionReply), (char *)&rep); - return (client->noClientException); -} -#define swapEviInfo(eviInfo, l) \ -{ \ - int l1 = l; \ - xExtendedVisualInfo *eviInfo1 = eviInfo; \ - while (l1-- > 0) { \ - swapl(&eviInfo1->core_visual_id, n); \ - swapl(&eviInfo1->transparency_value, n); \ - swaps(&eviInfo1->num_colormap_conflicts, n); \ - eviInfo1++; \ - } \ -} -#define swapVisual(visual, l) \ -{ \ - int l1 = l; \ - VisualID32 *visual1 = visual; \ - while (l1-- > 0) { \ - swapl(visual1, n); \ - visual1++; \ - } \ -} - -static int -ProcEVIGetVisualInfo(ClientPtr client) -{ - REQUEST(xEVIGetVisualInfoReq); - xEVIGetVisualInfoReply rep; - int i, n, n_conflict, n_info, sz_info, sz_conflict; - VisualID32 *conflict; - unsigned int total_visuals = 0; - xExtendedVisualInfo *eviInfo; - int status; - - /* - * do this first, otherwise REQUEST_FIXED_SIZE can overflow. we assume - * here that you don't have more than 2^32 visuals over all your screens; - * this seems like a safe assumption. - */ - for (i = 0; i < screenInfo.numScreens; i++) - total_visuals += screenInfo.screens[i]->numVisuals; - if (stuff->n_visual > total_visuals) - return BadValue; - - REQUEST_FIXED_SIZE(xEVIGetVisualInfoReq, stuff->n_visual * sz_VisualID32); - status = eviPriv->getVisualInfo((VisualID32 *)&stuff[1], (int)stuff->n_visual, - &eviInfo, &n_info, &conflict, &n_conflict); - if (status != Success) - return status; - sz_info = n_info * sz_xExtendedVisualInfo; - sz_conflict = n_conflict * sz_VisualID32; - rep.type = X_Reply; - rep.n_info = n_info; - rep.n_conflicts = n_conflict; - rep.sequenceNumber = client->sequence; - rep.length = (sz_info + sz_conflict) >> 2; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.n_info, n); - swapl(&rep.n_conflicts, n); - swapEviInfo(eviInfo, n_info); - swapVisual(conflict, n_conflict); - } - WriteToClient(client, sz_xEVIGetVisualInfoReply, (char *)&rep); - WriteToClient(client, sz_info, (char *)eviInfo); - WriteToClient(client, sz_conflict, (char *)conflict); - eviPriv->freeVisualInfo(eviInfo, conflict); - return (client->noClientException); -} - -static int -ProcEVIDispatch(ClientPtr client) -{ - REQUEST(xReq); - switch (stuff->data) { - case X_EVIQueryVersion: - return ProcEVIQueryVersion (client); - case X_EVIGetVisualInfo: - return ProcEVIGetVisualInfo (client); - default: - return BadRequest; - } -} - -static int -SProcEVIQueryVersion(ClientPtr client) -{ - REQUEST(xEVIQueryVersionReq); - int n; - swaps(&stuff->length, n); - return ProcEVIQueryVersion(client); -} - -static int -SProcEVIGetVisualInfo(ClientPtr client) -{ - register int n; - REQUEST(xEVIGetVisualInfoReq); - swaps(&stuff->length, n); - return ProcEVIGetVisualInfo(client); -} - -static int -SProcEVIDispatch(ClientPtr client) -{ - REQUEST(xReq); - switch (stuff->data) - { - case X_EVIQueryVersion: - return SProcEVIQueryVersion (client); - case X_EVIGetVisualInfo: - return SProcEVIGetVisualInfo (client); - default: - return BadRequest; - } -} - -/*ARGSUSED*/ -static void -EVIResetProc(ExtensionEntry *extEntry) -{ - eviDDXReset(); -} - -/**************** - * XEVIExtensionInit - * - * Called from InitExtensions in main() or from QueryExtension() if the - * extension is dynamically loaded. - * - ****************/ -void -EVIExtensionInit(INITARGS) -{ -#if 0 - ExtensionEntry *extEntry; - - if ((extEntry = AddExtension(EVINAME, 0, 0, - ProcEVIDispatch, - SProcEVIDispatch, - EVIResetProc, StandardMinorOpcode))) { - XEVIReqCode = (unsigned char)extEntry->base; -#else - if (AddExtension(EVINAME, 0, 0, - ProcEVIDispatch, SProcEVIDispatch, - EVIResetProc, StandardMinorOpcode)) { -#endif - eviPriv = eviDDXInit(); - } -} diff --git a/nx-X11/programs/Xserver/Xext/EVIstruct.h b/nx-X11/programs/Xserver/Xext/EVIstruct.h deleted file mode 100644 index 857e7565a..000000000 --- a/nx-X11/programs/Xserver/Xext/EVIstruct.h +++ /dev/null @@ -1,60 +0,0 @@ -/* $Xorg: EVIstruct.h,v 1.3 2000/08/17 19:47:55 cpqbld Exp $ */ -/************************************************************ -Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc. -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, 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 Silicon Graphics not be -used in advertising or publicity pertaining to distribution -of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability -of this software for any purpose. It is provided "as is" -without any express or implied warranty. -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS 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. -********************************************************/ -/* $XFree86: xc/programs/Xserver/Xext/EVIstruct.h,v 3.5 2003/07/16 01:38:28 dawes Exp $ */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef EVI_STRUCT_H -#define EVI_STRUCT_H - -/* - ****************************************************************************** - ** Per-ddx data - ****************************************************************************** - */ - -typedef int (*GetVisualInfoProc)( - VisualID32*, - int, - xExtendedVisualInfo**, - int*, - VisualID32**, - int* -); - -typedef void (*FreeVisualInfoProc)( - xExtendedVisualInfo*, - VisualID32* -); -typedef struct _EviPrivRec { - GetVisualInfoProc getVisualInfo; - FreeVisualInfoProc freeVisualInfo; -} EviPrivRec, *EviPrivPtr; - -extern EviPrivPtr eviDDXInit(void); -extern void eviDDXReset(void); - -#endif /* EVI_STRUCT_H */ diff --git a/nx-X11/programs/Xserver/Xext/Imakefile b/nx-X11/programs/Xserver/Xext/Imakefile index 199e59f1d..2c9798639 100644 --- a/nx-X11/programs/Xserver/Xext/Imakefile +++ b/nx-X11/programs/Xserver/Xext/Imakefile @@ -30,42 +30,16 @@ XCOMM $XFree86: xc/programs/Xserver/Xext/Imakefile,v 3.43 2003/04/21 18:56:48 sv SUBDIRS = extmod #endif -#if BuildEVI -#ifdef SGIArchitectureNotTog - EVISRCS = EVI.c sgiEVI.c - EVIOBJS = EVI.o sgiEVI.o -#else - EVISRCS = EVI.c sampleEVI.c - EVIOBJS = EVI.o sampleEVI.o -#endif -#endif #if HasShm SHMSRCS = shm.c SHMOBJS = shm.o #endif -#if BuildMultibuffer - MULTIBUFSRC = mbuf.c - MULTIBUFOBJ = mbuf.o -#endif - #if BuildScreenSaverExt SCRNSAVSRC = saver.c SCRNSAVOBJ = saver.o #endif -#if BuildXF86VidModeExt && \ - (defined(XorgServer) && XorgServer) - VIDMODESRCS = xf86vmode.c - VIDMODEOBJS = xf86vmode.o -#endif - -#if BuildXF86MiscExt && \ - (defined(XorgServer) && XorgServer) -XF86MISCSRCS = xf86misc.c -XF86MISCOBJS = xf86misc.o -#endif - #if BuildXF86BigfontExt XF86BIGFSRCS = xf86bigfont.c XF86BIGFOBJS = xf86bigfont.o @@ -74,14 +48,6 @@ XF86BIGFOBJS = xf86bigfont.o #endif #endif -#if BuildXF86DGA - XF86DGASRCS = xf86dga.c xf86dga2.c - XF86DGAOBJS = xf86dga.o xf86dga2.o -#if HasShm - XVMCSHM_DEFINES = -DHAS_XVMCSHM -#endif -#endif - #if BuildXvExt XVSRCS = xvmain.c xvdisp.c xvmc.c XVOBJS = xvmain.o xvdisp.o xvmc.o @@ -92,20 +58,12 @@ XF86BIGFOBJS = xf86bigfont.o XRESOBJS = xres.o #endif -#if BuildAppgroup - APPGROUPSRCS = appgroup.c - APPGROUPOBJS = appgroup.o -#endif #if BuildXCSecurity SECURITYSRCS = security.c SECURITYOBJS = security.o SERVERCONFIGDIR = ServerConfigDir POLICYFILEDEF = -DDEFAULTPOLICYFILE=\"$(SERVERCONFIGDIR)/SecurityPolicy\" #endif -#if BuildCup - CUPSRCS = cup.c - CUPOBJS = cup.o -#endif #if BuildXinerama PNRXSRCS = panoramiX.c panoramiXSwap.c panoramiXprocs.c PNRXOBJS = panoramiX.o panoramiXSwap.o panoramiXprocs.o @@ -116,38 +74,22 @@ XF86BIGFOBJS = xf86bigfont.o DPMSOBJS = dpms.o #endif -#if BuildFontCache - FONTCACHESRCS = fontcache.c - FONTCACHEOBJS = fontcache.o -#if 0 - FONTCACHEINCLUDES = -I$(XF86SRC)/os-support -#endif -#endif + SRCS = shape.c $(SHMSRCS) xcmisc.c\ + xtest.c xtest1di.c xtest1dd.c sleepuntil.c \ + bigreq.c sync.c $(SCRNSAVSRC) \ + $(XF86BIGFSRCS) $(SECURITYSRCS) \ + $(PNRXSRCS) $(DPMSSRCS) \ + $(XVSRCS) $(XRESSRCS) $(DMXSRCS) -#if BuildXevie - XEVIESRCS = xevie.c - XEVIEOBJS = xevie.o -#endif - - SRCS = shape.c $(SHMSRCS) $(MULTIBUFSRC) \ - mitmisc.c xtest.c xtest1di.c xtest1dd.c sleepuntil.c \ - bigreq.c sync.c $(SCRNSAVSRC) xcmisc.c $(VIDMODESRCS) \ - $(XF86MISCSRCS) $(XF86BIGFSRCS) $(XF86DGASRCS) $(SECURITYSRCS) \ - $(APPGROUPSRCS) $(CUPSRCS) $(PNRXSRCS) $(DPMSSRCS) \ - $(XEVIESRCS) \ - $(EVISRCS) $(XVSRCS) $(FONTCACHESRCS) $(XRESSRCS) $(DMXSRCS) - - OBJS = shape.o $(SHMOBJS) $(MULTIBUFOBJ) \ - mitmisc.o xtest.o xtest1di.o xtest1dd.o sleepuntil.o \ - bigreq.o sync.o $(SCRNSAVOBJ) xcmisc.o $(VIDMODEOBJS) \ - $(XF86MISCOBJS) $(XF86BIGFOBJS) $(XF86DGAOBJS) $(SECURITYOBJS) \ - $(APPGROUPOBJS) $(CUPOBJS) $(PNRXOBJS) $(DPMSOBJS) \ - $(XEVIEOBJS) \ - $(EVIOBJS) $(XVOBJS) $(FONTCACHEOBJS) $(XRESOBJS) $(DMXOBJS) + OBJS = shape.o $(SHMOBJS) xcmisc.o \ + xtest.o xtest1di.o xtest1dd.o sleepuntil.o \ + bigreq.o sync.o $(SCRNSAVOBJ) \ + $(XF86BIGFOBJS) $(SECURITYOBJS) \ + $(PNRXOBJS) $(DPMSOBJS) \ + $(XVOBJS) $(XRESOBJS) $(DMXOBJS) - SOBJS = $(SHMOBJS) $(APPGROUPOBJS) $(SECURITYOBJS) \ + SOBJS = $(SHMOBJS) $(SECURITYOBJS) \ shape.o xtest.o xtest1di.o xtest1dd.o sleepuntil.o $(PNRXOBJS) \ - $(XEVIEOBJS) \ $(XF86BIGFOBJS) #if defined(NXAgentServer) && NXAgentServer @@ -160,8 +102,9 @@ NX_DEFINES = -DNXAGENT_SERVER XF86INCLUDES = -I$(XF86COMSRC) #endif INCLUDES = -I. -I../include -I$(XINCLUDESRC) -I$(EXTINCSRC) \ - $(PNRXINCLUDES) $(XF86INCLUDES) \ - $(FONTCACHEINCLUDES) $(DMXINCLUDES) \ + $(PNRXINCLUDES) \ + $(XF86INCLUDES) \ + $(DMXINCLUDES) \ `pkg-config --cflags-only-I pixman-1` LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln @@ -173,13 +116,6 @@ XF86INCLUDES = -I$(XF86COMSRC) NormalLibraryObjectRule() -/* - * A hack to work around an optimization problem with gcc 2.95.2 - */ -#if BuildXF86VidModeExt && defined(GccOptBug295) -SpecialCObjectRule(xf86vmode,NullParameter,-O0) -#endif - NormalLibraryTarget(ext,$(OBJS)) LintLibraryTarget(ext,$(SRCS)) NormalLintTarget($(SRCS)) @@ -210,6 +146,5 @@ MakeSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS)) #endif -InstallDriverSDKNonExecFile(dgaproc.h,$(DRIVERSDKINCLUDEDIR)) InstallDriverSDKNonExecFile(xvdix.h,$(DRIVERSDKINCLUDEDIR)) InstallDriverSDKNonExecFile(xvmcext.h,$(DRIVERSDKINCLUDEDIR)) diff --git a/nx-X11/programs/Xserver/Xext/appgroup.c b/nx-X11/programs/Xserver/Xext/appgroup.c deleted file mode 100644 index 1dd4f1ae5..000000000 --- a/nx-X11/programs/Xserver/Xext/appgroup.c +++ /dev/null @@ -1,829 +0,0 @@ -/* $XFree86: xc/programs/Xserver/Xext/appgroup.c,v 1.10tsi Exp $ */ -/* -Copyright 1996, 1998, 2001 The Open Group - -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. - -The above copyright notice and this permission notice 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 OPEN GROUP 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. - -Except as contained in this notice, the name of The Open Group shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from The Open Group. -*/ -/* $Xorg: appgroup.c,v 1.6 2001/02/09 02:04:32 xorgcvs Exp $ */ - -#define NEED_REPLIES -#define NEED_EVENTS -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include "misc.h" -#include "dixstruct.h" -#include "extnsionst.h" -#include "scrnintstr.h" -#include "windowstr.h" -#include "colormapst.h" -#include "servermd.h" -#define _XAG_SERVER_ -#include -#include -#define _SECURITY_SERVER -#include -#include - -#define XSERV_t -#include -#include "../os/osdep.h" - -#include - -#include "modinit.h" -#include "appgroup.h" - -typedef struct _AppGroupRec { - struct _AppGroupRec* next; - XID appgroupId; - ClientPtr* clients; - int nclients; - ClientPtr leader; - Bool single_screen; - Window default_root; - VisualID root_visual; - Colormap default_colormap; - Pixel black_pixel; - Pixel white_pixel; - xConnSetupPrefix connSetupPrefix; - char* ConnectionInfo; -} AppGroupRec, *AppGroupPtr; - -static int ProcXagDispatch(ClientPtr client); -static int SProcXagDispatch(ClientPtr client); -static void XagResetProc(ExtensionEntry* extEntry); - -#if 0 -static unsigned char XagReqCode = 0; -static int XagErrorBase; -#endif -static int XagCallbackRefCount = 0; - -static RESTYPE RT_APPGROUP; -static AppGroupPtr appGrpList = NULL; - -extern xConnSetupPrefix connSetupPrefix; -extern char* ConnectionInfo; -extern int connBlockScreenStart; - -static -int XagAppGroupFree( - void * what, - XID id) /* unused */ -{ - int i; - AppGroupPtr pAppGrp = (AppGroupPtr) what; - - if (pAppGrp->leader) - for (i = 0; i < pAppGrp->nclients; i++) { - pAppGrp->clients[i]->appgroup = NULL; - CloseDownClient (pAppGrp->clients[i]); - } - - if (pAppGrp == appGrpList) - appGrpList = appGrpList->next; - else { - AppGroupPtr tpAppGrp; - for (tpAppGrp = appGrpList; - tpAppGrp->next != NULL; - tpAppGrp = tpAppGrp->next) { - if (tpAppGrp->next == pAppGrp) { - tpAppGrp->next = tpAppGrp->next->next; - break; - } - } - } - (void) xfree (pAppGrp->clients); - (void) xfree (pAppGrp->ConnectionInfo); - (void) xfree (what); - return Success; -} - -/* static */ -void XagClientStateChange( - CallbackListPtr* pcbl, - void * nulldata, - void * calldata) -{ - SecurityAuthorizationPtr pAuth; - NewClientInfoRec* pci = (NewClientInfoRec*) calldata; - ClientPtr pClient = pci->client; - AppGroupPtr pAppGrp; - XID authId = 0; - - if (!pClient->appgroup) { - switch (pClient->clientState) { - - case ClientStateAuthenticating: - case ClientStateRunning: - case ClientStateCheckingSecurity: - return; - - case ClientStateInitial: - case ClientStateCheckedSecurity: - /* - * If the client is connecting via a firewall proxy (which - * uses XC-QUERY-SECURITY-1, then the authId is available - * during ClientStateCheckedSecurity, otherwise it's - * available during ClientStateInitial. - * - * Don't get it from pClient because can't guarantee the order - * of the callbacks and the security extension might not have - * plugged it in yet. - */ - authId = AuthorizationIDOfClient(pClient); - break; - - case ClientStateGone: - case ClientStateRetained: - /* - * Don't get if from AuthorizationIDOfClient because can't - * guarantee the order of the callbacks and the security - * extension may have torn down the client's private data - */ - authId = pClient->authId; - break; - } - - if (authId == None) - return; - - pAuth = (SecurityAuthorizationPtr)SecurityLookupIDByType(pClient, - authId, SecurityAuthorizationResType, SecurityReadAccess); - - if (pAuth == NULL) - return; - - for (pAppGrp = appGrpList; pAppGrp != NULL; pAppGrp = pAppGrp->next) - if (pAppGrp->appgroupId == pAuth->group) break; - } else { - pAppGrp = pClient->appgroup; - } - - if (!pAppGrp) - return; - - switch (pClient->clientState) { - case ClientStateAuthenticating: - case ClientStateRunning: - case ClientStateCheckingSecurity: - break; - - case ClientStateInitial: - case ClientStateCheckedSecurity: - /* see the comment above about Initial vs. CheckedSecurity */ - { - /* if this client already in AppGroup, don't add it again */ - int i; - for (i = 0; i < pAppGrp->nclients; i++) - if (pClient == pAppGrp->clients[i]) return; - } - pAppGrp->clients = (ClientPtr*) xrealloc (pAppGrp->clients, - ++pAppGrp->nclients * sizeof (ClientPtr)); - pAppGrp->clients[pAppGrp->nclients - 1] = pClient; - pClient->appgroup = pAppGrp; - break; - - case ClientStateGone: - case ClientStateRetained: /* client disconnected, dump it */ - { - int i; - for (i = 0; i < pAppGrp->nclients; i++) - if (pAppGrp->clients[i] == pClient) { - pAppGrp->clients[i] = NULL; - break; - } - for (i = 0; i < pAppGrp->nclients; i++) - if (pAppGrp->clients[i] == NULL && i + 1 < pAppGrp->nclients) - pAppGrp->clients[i] = pAppGrp->clients[i + 1]; - pAppGrp->nclients--; - } - pClient->appgroup = NULL; /* redundant, pClient will be freed */ - break; - } -} - -void -XagExtensionInit(INITARGS) -{ -#if 0 - ExtensionEntry* extEntry; - - if ((extEntry = AddExtension (XAGNAME, - 0, - XagNumberErrors, - ProcXagDispatch, - SProcXagDispatch, - XagResetProc, - StandardMinorOpcode))) { - XagReqCode = (unsigned char)extEntry->base; - XagErrorBase = extEntry->errorBase; -#else - if (AddExtension (XAGNAME, - 0, - XagNumberErrors, - ProcXagDispatch, - SProcXagDispatch, - XagResetProc, - StandardMinorOpcode)) { -#endif - RT_APPGROUP = CreateNewResourceType (XagAppGroupFree); - } -} - -/*ARGSUSED*/ -static -void XagResetProc( - ExtensionEntry* extEntry) -{ - DeleteCallback (&ClientStateCallback, XagClientStateChange, NULL); - XagCallbackRefCount = 0; - while (appGrpList) XagAppGroupFree ((void *) appGrpList, 0); -} - -static -int ProcXagQueryVersion( - register ClientPtr client) -{ - /* REQUEST (xXagQueryVersionReq); */ - xXagQueryVersionReply rep; - register int n; - - REQUEST_SIZE_MATCH (xXagQueryVersionReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequence_number = client->sequence; - rep.server_major_version = XAG_MAJOR_VERSION; - rep.server_minor_version = XAG_MINOR_VERSION; - if (client->swapped) { - swaps (&rep.sequence_number, n); - swapl (&rep.length, n); - swaps (&rep.server_major_version, n); - swaps (&rep.server_minor_version, n); - } - WriteToClient (client, sizeof (xXagQueryVersionReply), (char *)&rep); - return client->noClientException; -} - -static -void ProcessAttr( - AppGroupPtr pAppGrp, - ClientPtr client, - unsigned int attrib_mask, - CARD32* attribs) -{ - int i; - - for (i = 0; i <= XagNappGroupLeader; i++) { - switch (attrib_mask & (1 << i)) { - case XagSingleScreenMask: - pAppGrp->single_screen = *attribs; - break; - case XagDefaultRootMask: - pAppGrp->default_root = *attribs; - break; - case XagRootVisualMask: - pAppGrp->root_visual = *attribs; - break; - case XagDefaultColormapMask: - pAppGrp->default_colormap = *attribs; - break; - case XagBlackPixelMask: - pAppGrp->black_pixel = *attribs; - break; - case XagWhitePixelMask: - pAppGrp->white_pixel = *attribs; - break; - case XagAppGroupLeaderMask: - pAppGrp->leader = client; - break; - default: continue; - } - attribs++; - } -} - -static -void CreateConnectionInfo( - AppGroupPtr pAppGrp) -{ - xWindowRoot* rootp; - xWindowRoot* roots[MAXSCREENS]; - unsigned int rootlens[MAXSCREENS]; - xDepth* depth; - int olen; - int snum, i; - - rootp = (xWindowRoot*) (ConnectionInfo + connBlockScreenStart); - for (snum = 0; snum < screenInfo.numScreens; snum++) { - - rootlens[snum] = sizeof (xWindowRoot); - roots[snum] = rootp; - - depth = (xDepth*) (rootp + 1); - for (i = 0; i < rootp->nDepths; i++) { - rootlens[snum] += sizeof (xDepth) + - depth->nVisuals * sizeof (xVisualType); - depth = (xDepth *)(((char*)(depth + 1)) + - depth->nVisuals * sizeof (xVisualType)); - } - rootp = (xWindowRoot*) depth; - } - snum = 0; - if (pAppGrp->default_root) { - for (; snum < screenInfo.numVideoScreens; snum++) { - if (roots[snum]->windowId == pAppGrp->default_root) - break; - } - } - olen = connBlockScreenStart + rootlens[snum]; - for (i = screenInfo.numVideoScreens; i < screenInfo.numScreens; i++) - olen += rootlens[i]; - pAppGrp->ConnectionInfo = (char*) xalloc (olen); - if (!pAppGrp->ConnectionInfo) - return; - memmove (pAppGrp->ConnectionInfo, ConnectionInfo, connBlockScreenStart); - ((xConnSetup*) (pAppGrp->ConnectionInfo))->numRoots = - 1 + screenInfo.numScreens - screenInfo.numVideoScreens; - memmove (pAppGrp->ConnectionInfo + connBlockScreenStart, - (void*) roots[snum], rootlens[snum]); - rootp = (xWindowRoot*) (pAppGrp->ConnectionInfo + connBlockScreenStart); - if (pAppGrp->default_colormap) { - rootp->defaultColormap = pAppGrp->default_colormap; - rootp->whitePixel = pAppGrp->white_pixel; - rootp->blackPixel = pAppGrp->black_pixel; - } - if (pAppGrp->root_visual) - rootp->rootVisualID = pAppGrp->root_visual; - rootp = (xWindowRoot*) (((char*)rootp) + rootlens[snum]); - for (i = screenInfo.numVideoScreens; i < screenInfo.numScreens; i++) { - memmove ((void*) rootp, (void*) roots[i], rootlens[i]); - rootp = (xWindowRoot*) (((char*) rootp) + rootlens[i]); - } - pAppGrp->connSetupPrefix = connSetupPrefix; - pAppGrp->connSetupPrefix.length = olen >> 2; -} - -static -AppGroupPtr CreateAppGroup( - ClientPtr client, - XID appgroupId, - unsigned int attrib_mask, - CARD32* attribs) -{ - AppGroupPtr pAppGrp; - - pAppGrp = (AppGroupPtr) xalloc (sizeof(AppGroupRec)); - if (pAppGrp) { - pAppGrp->next = appGrpList; - appGrpList = pAppGrp; - pAppGrp->appgroupId = appgroupId; - pAppGrp->clients = (ClientPtr*) xalloc (0); - pAppGrp->nclients = 0; - pAppGrp->leader = NULL; - pAppGrp->default_root = 0; - pAppGrp->root_visual = 0; - pAppGrp->default_colormap = 0; - pAppGrp->black_pixel = -1; - pAppGrp->white_pixel = -1; - pAppGrp->ConnectionInfo = NULL; - ProcessAttr (pAppGrp, client, attrib_mask, attribs); - } - return pAppGrp; -} - -static -int AttrValidate( - ClientPtr client, - int attrib_mask, - AppGroupPtr pAppGrp) -{ - WindowPtr pWin; - int idepth, ivids, found; - ScreenPtr pScreen; - DepthPtr pDepth; - ColormapPtr pColormap; - - pWin = LookupWindow (pAppGrp->default_root, client); - /* XXX check that pWin is not NULL */ - pScreen = pWin->drawable.pScreen; - if (WindowTable[pScreen->myNum]->drawable.id != pAppGrp->default_root) - return BadWindow; - pDepth = pScreen->allowedDepths; - if (pAppGrp->root_visual) { - found = FALSE; - for (idepth = 0; idepth < pScreen->numDepths; idepth++, pDepth++) { - for (ivids = 0; ivids < pDepth->numVids; ivids++) { - if (pAppGrp->root_visual == pDepth->vids[ivids]) { - found = TRUE; - break; - } - } - } - if (!found) - return BadMatch; - } - if (pAppGrp->default_colormap) { - - pColormap = (ColormapPtr)LookupIDByType (pAppGrp->default_colormap, RT_COLORMAP); - /* XXX check that pColormap is not NULL */ - if (pColormap->pScreen != pScreen) - return BadColor; - if (pColormap->pVisual->vid != (pAppGrp->root_visual ? pAppGrp->root_visual : pScreen->rootVisual)) - return BadMatch; - } - return client->noClientException; -} - -/* static */ -int ProcXagCreate ( - register ClientPtr client) -{ - REQUEST (xXagCreateReq); - AppGroupPtr pAppGrp; - int ret; - - REQUEST_AT_LEAST_SIZE (xXagCreateReq); - - LEGAL_NEW_RESOURCE (stuff->app_group, client); - pAppGrp = CreateAppGroup (client, stuff->app_group, - stuff->attrib_mask, (CARD32*) &stuff[1]); - if (!pAppGrp) - return BadAlloc; - ret = AttrValidate (client, stuff->attrib_mask, pAppGrp); - if (ret != Success) { - XagAppGroupFree ((void *)pAppGrp, (XID)0); - return ret; - } - if (pAppGrp->single_screen) { - CreateConnectionInfo (pAppGrp); - if (!pAppGrp->ConnectionInfo) - return BadAlloc; - } - if (!AddResource (stuff->app_group, RT_APPGROUP, (void *)pAppGrp)) - return BadAlloc; - if (XagCallbackRefCount++ == 0) - (void) AddCallback (&ClientStateCallback, XagClientStateChange, NULL); - return client->noClientException; -} - -/* static */ -int ProcXagDestroy( - register ClientPtr client) -{ - AppGroupPtr pAppGrp; - REQUEST (xXagDestroyReq); - - REQUEST_SIZE_MATCH (xXagDestroyReq); - pAppGrp = (AppGroupPtr)SecurityLookupIDByType (client, - (XID)stuff->app_group, RT_APPGROUP, SecurityReadAccess); - if (!pAppGrp) return XagBadAppGroup; - FreeResource ((XID)stuff->app_group, RT_NONE); - if (--XagCallbackRefCount == 0) - (void) DeleteCallback (&ClientStateCallback, XagClientStateChange, NULL); - return client->noClientException; -} - -static -int ProcXagGetAttr( - register ClientPtr client) -{ - AppGroupPtr pAppGrp; - REQUEST (xXagGetAttrReq); - xXagGetAttrReply rep; - int n; - - REQUEST_SIZE_MATCH (xXagGetAttrReq); - pAppGrp = (AppGroupPtr)SecurityLookupIDByType (client, - (XID)stuff->app_group, RT_APPGROUP, SecurityReadAccess); - if (!pAppGrp) return XagBadAppGroup; - rep.type = X_Reply; - rep.length = 0; - rep.sequence_number = client->sequence; - rep.default_root = pAppGrp->default_root; - rep.root_visual = pAppGrp->root_visual; - rep.default_colormap = pAppGrp->default_colormap; - rep.black_pixel = pAppGrp->black_pixel; - rep.white_pixel = pAppGrp->white_pixel; - rep.single_screen = pAppGrp->single_screen; - rep.app_group_leader = (pAppGrp->leader) ? 1 : 0; - if (client->swapped) { - swaps (&rep.sequence_number, n); - swapl (&rep.length, n); - swapl (&rep.default_root, n); - swapl (&rep.root_visual, n); - swapl (&rep.default_colormap, n); - swapl (&rep.black_pixel, n); - swapl (&rep.white_pixel, n); - } - WriteToClient (client, sizeof (xXagGetAttrReply), (char *)&rep); - return client->noClientException; -} - -static -int ProcXagQuery( - register ClientPtr client) -{ - ClientPtr pClient; - AppGroupPtr pAppGrp; - REQUEST (xXagQueryReq); - int n; - - REQUEST_SIZE_MATCH (xXagQueryReq); - pClient = LookupClient (stuff->resource, client); - for (pAppGrp = appGrpList; pAppGrp != NULL; pAppGrp = pAppGrp->next) - for (n = 0; n < pAppGrp->nclients; n++) - if (pAppGrp->clients[n] == pClient) { - xXagQueryReply rep; - - rep.type = X_Reply; - rep.length = 0; - rep.sequence_number = client->sequence; - rep.app_group = pAppGrp->appgroupId; - if (client->swapped) { - swaps (&rep.sequence_number, n); - swapl (&rep.length, n); - swapl (&rep.app_group, n); - } - WriteToClient (client, sizeof (xXagQueryReply), (char *)&rep); - return client->noClientException; - } - - return BadMatch; -} - -static -int ProcXagCreateAssoc( - register ClientPtr client) -{ - REQUEST (xXagCreateAssocReq); - - REQUEST_SIZE_MATCH (xXagCreateAssocReq); -#ifdef WIN32 - if (stuff->window_type != XagWindowTypeWin32) -#else - if (stuff->window_type != XagWindowTypeX11) -#endif - return BadMatch; -#if defined(WIN32) || defined(__CYGWIN__) /* and Mac, etc */ - if (!LocalClient (client)) - return BadAccess; -#endif - -/* Macintosh, OS/2, and MS-Windows servers have some work to do here */ - - return client->noClientException; -} - -static -int ProcXagDestroyAssoc( - register ClientPtr client) -{ - /* REQUEST (xXagDestroyAssocReq); */ - - REQUEST_SIZE_MATCH (xXagDestroyAssocReq); -/* Macintosh, OS/2, and MS-Windows servers have some work to do here */ - return client->noClientException; -} - -static -int ProcXagDispatch ( - register ClientPtr client) -{ - REQUEST (xReq); - switch (stuff->data) - { - case X_XagQueryVersion: - return ProcXagQueryVersion (client); - case X_XagCreate: - return ProcXagCreate (client); - case X_XagDestroy: - return ProcXagDestroy (client); - case X_XagGetAttr: - return ProcXagGetAttr (client); - case X_XagQuery: - return ProcXagQuery (client); - case X_XagCreateAssoc: - return ProcXagCreateAssoc (client); - case X_XagDestroyAssoc: - return ProcXagDestroyAssoc (client); - default: - return BadRequest; - } -} - -static -int SProcXagQueryVersion( - register ClientPtr client) -{ - register int n; - REQUEST(xXagQueryVersionReq); - swaps(&stuff->length, n); - return ProcXagQueryVersion(client); -} - -static -int SProcXagCreate( - ClientPtr client) -{ - register int n; - REQUEST (xXagCreateReq); - swaps (&stuff->length, n); - REQUEST_AT_LEAST_SIZE (xXagCreateReq); - swapl (&stuff->app_group, n); - swapl (&stuff->attrib_mask, n); - SwapRestL (stuff); - return ProcXagCreate (client); -} - -static -int SProcXagDestroy( - ClientPtr client) -{ - register int n; - REQUEST (xXagDestroyReq); - swaps (&stuff->length, n); - REQUEST_SIZE_MATCH (xXagDestroyReq); - swapl (&stuff->app_group, n); - return ProcXagDestroy (client); -} - -static -int SProcXagGetAttr( - ClientPtr client) -{ - register int n; - REQUEST (xXagGetAttrReq); - swaps (&stuff->length, n); - REQUEST_SIZE_MATCH (xXagGetAttrReq); - swapl (&stuff->app_group, n); - return ProcXagGetAttr (client); -} - -static -int SProcXagQuery( - ClientPtr client) -{ - register int n; - REQUEST (xXagQueryReq); - swaps (&stuff->length, n); - REQUEST_SIZE_MATCH (xXagQueryReq); - swapl (&stuff->resource, n); - return ProcXagQuery (client); -} - -static -int SProcXagCreateAssoc( - ClientPtr client) -{ - register int n; - REQUEST (xXagCreateAssocReq); - swaps (&stuff->length, n); - REQUEST_SIZE_MATCH (xXagCreateAssocReq); - swapl (&stuff->window, n); - swapl (&stuff->window_type, n); - swaps (&stuff->system_window_len, n); - return ProcXagCreateAssoc (client); -} - -static -int SProcXagDestroyAssoc( - ClientPtr client) -{ - register int n; - REQUEST (xXagDestroyAssocReq); - swaps (&stuff->length, n); - REQUEST_SIZE_MATCH (xXagDestroyAssocReq); - swapl (&stuff->window, n); - return ProcXagDestroyAssoc (client); -} - -static -int SProcXagDispatch( - register ClientPtr client) -{ - REQUEST(xReq); - switch (stuff->data) - { - case X_XagQueryVersion: - return SProcXagQueryVersion (client); - case X_XagCreate: - return SProcXagCreate (client); - case X_XagDestroy: - return SProcXagDestroy (client); - case X_XagGetAttr: - return SProcXagGetAttr (client); - case X_XagQuery: - return SProcXagQuery (client); - case X_XagCreateAssoc: - return SProcXagCreateAssoc (client); - case X_XagDestroyAssoc: - return SProcXagDestroyAssoc (client); - default: - return BadRequest; - } -} - -Colormap XagDefaultColormap( - ClientPtr client) -{ - return (client->appgroup ? client->appgroup->default_colormap : None); -} - -VisualID XagRootVisual( - ClientPtr client) -{ - return (client->appgroup ? client->appgroup->root_visual : 0); -} - -ClientPtr XagLeader( - ClientPtr client) -{ - return (client->appgroup ? client->appgroup->leader : NULL); -} - -/* - * Return whether the Map request event should be sent to the appgroup leader. - * We don't want to send it to the leader when the window is on a different - * screen, e.g. a print screen. - */ -Bool XagIsControlledRoot( - ClientPtr client, - WindowPtr pParent) -{ - if (client->appgroup) { - if (client->appgroup->single_screen && - pParent->drawable.id == client->appgroup->default_root) - return TRUE; - else if (!pParent->parent) - return TRUE; - else - return FALSE; - } - return FALSE; -} - -void XagConnectionInfo( - ClientPtr client, - xConnSetupPrefix** conn_prefix, - char** conn_info, - int* num_screen) -{ - if (client->appgroup && client->appgroup->ConnectionInfo) { - *conn_prefix = &client->appgroup->connSetupPrefix; - *conn_info = client->appgroup->ConnectionInfo; - *num_screen = ((xConnSetup*)(client->appgroup->ConnectionInfo))->numRoots; - } -} - -XID XagId( - ClientPtr client) -{ - return (client->appgroup ? client->appgroup->appgroupId : 0); -} - -void XagGetDeltaInfo( - ClientPtr client, - CARD32* buf) -{ - *buf++ = (CARD32) client->appgroup->default_root; - *buf++ = (CARD32) client->appgroup->root_visual; - *buf++ = (CARD32) client->appgroup->default_colormap; - *buf++ = (CARD32) client->appgroup->black_pixel; - *buf = (CARD32) client->appgroup->white_pixel; -} - -void XagCallClientStateChange( - ClientPtr client) -{ - if (appGrpList) { - NewClientInfoRec clientinfo; - - clientinfo.client = client; - XagClientStateChange (NULL, NULL, (void *)&clientinfo); - } -} diff --git a/nx-X11/programs/Xserver/Xext/appgroup.h b/nx-X11/programs/Xserver/Xext/appgroup.h deleted file mode 100644 index 2a8feb585..000000000 --- a/nx-X11/programs/Xserver/Xext/appgroup.h +++ /dev/null @@ -1,10 +0,0 @@ -/* $XFree86$ */ - -void XagClientStateChange( - CallbackListPtr* pcbl, - void * nulldata, - void * calldata); -int ProcXagCreate ( - register ClientPtr client); -int ProcXagDestroy( - register ClientPtr client); diff --git a/nx-X11/programs/Xserver/Xext/cup.c b/nx-X11/programs/Xserver/Xext/cup.c deleted file mode 100644 index 9b6d25c21..000000000 --- a/nx-X11/programs/Xserver/Xext/cup.c +++ /dev/null @@ -1,367 +0,0 @@ -/* $Xorg: cup.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */ -/* - -Copyright 1997, 1998 The Open Group - -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. - -The above copyright notice and this permission notice 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 -OPEN GROUP 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. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ -/* $XFree86: xc/programs/Xserver/Xext/cup.c,v 1.11tsi Exp $ */ - -#define NEED_REPLIES -#define NEED_EVENTS -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include "misc.h" -#include "dixstruct.h" -#include "extnsionst.h" -#include "colormapst.h" -#include "scrnintstr.h" -#include "servermd.h" -#include "swapreq.h" -#define _XCUP_SERVER_ -#include -#include - -#ifndef EXTMODULE -#include "../os/osdep.h" -#else -#include "xf86_ansic.h" -#endif - -#include "modinit.h" - -static int ProcDispatch(ClientPtr client); -static int SProcDispatch(ClientPtr client); -static void ResetProc(ExtensionEntry* extEntry); - -#if 0 -static unsigned char ReqCode = 0; -static int ErrorBase; -#endif - -#if defined(WIN32) || defined(TESTWIN32) -#define HAVE_SPECIAL_DESKTOP_COLORS -#endif - -static xColorItem citems[] = { -#ifndef HAVE_SPECIAL_DESKTOP_COLORS -#define CUP_BLACK_PIXEL 0 -#define CUP_WHITE_PIXEL 1 - /* pix red green blue */ - { 0, 0, 0, 0, 0, 0 }, - { 1, 0xffff, 0xffff, 0xffff, 0, 0 } -#else -#ifndef WIN32 - /* - This approximates the MS-Windows desktop colormap for testing - purposes but has black and white pixels in the typical Unix - locations, which should be switched if necessary if your system - has blackPixel and whitePixel swapped. No entries are provided - for colormap entries 254 and 255 because AllocColor/FindColor - will reuse entries zero and one. - */ - { 0, 0, 0, 0, 0, 0 }, - { 1, 0xffff, 0xffff, 0xffff, 0, 0 }, - { 2, 0x8000, 0, 0, 0, 0 }, - { 3, 0, 0x8000, 0, 0, 0 }, - { 4, 0x8000, 0x8000, 0, 0, 0 }, - { 5, 0, 0, 0x8000, 0, 0 }, - { 6, 0x8000, 0, 0x8000, 0, 0 }, - { 7, 0, 0x8000, 0x8000, 0, 0 }, - { 8, 0xc000, 0xc000, 0xc000, 0, 0 }, - { 9, 0xc000, 0xdc00, 0xc000, 0, 0 }, - { 246, 0xa000, 0xa000, 0xa000, 0, 0 }, - { 247, 0x8000, 0x8000, 0x8000, 0, 0 }, - { 248, 0xffff, 0, 0, 0, 0 }, - { 249, 0, 0xffff, 0, 0, 0 }, - { 250, 0xffff, 0xffff, 0, 0, 0 }, - { 251, 0, 0, 0xffff, 0, 0 }, - { 252, 0xffff, 0, 0xffff, 0, 0 }, - { 253, 0, 0xffff, 0xffff, 0, 0 } -#else - /* - this is the MS-Windows desktop, adjusted for X's 16-bit color - specifications. - */ - { 0, 0, 0, 0, 0, 0 }, - { 1, 0x8000, 0, 0, 0, 0 }, - { 2, 0, 0x8000, 0, 0, 0 }, - { 3, 0x8000, 0x8000, 0, 0, 0 }, - { 4, 0, 0, 0x8000, 0, 0 }, - { 5, 0x8000, 0, 0x8000, 0, 0 }, - { 6, 0, 0x8000, 0x8000, 0, 0 }, - { 7, 0xc000, 0xc000, 0xc000, 0, 0 }, - { 8, 0xc000, 0xdc00, 0xc000, 0, 0 }, - { 9, 0xa600, 0xca00, 0xf000, 0, 0 }, - { 246, 0xff00, 0xfb00, 0xf000, 0, 0 }, - { 247, 0xa000, 0xa000, 0xa400, 0, 0 }, - { 248, 0x8000, 0x8000, 0x8000, 0, 0 }, - { 249, 0xff00, 0, 0, 0, 0 }, - { 250, 0, 0xff00, 0, 0, 0 }, - { 251, 0xff00, 0xff00, 0, 0, 0 }, - { 252, 0, 0, 0xff00, 0, 0 }, - { 253, 0xff00, 0, 0xff00, 0, 0 }, - { 254, 0, 0xff00, 0xff00, 0, 0 }, - { 255, 0xff00, 0xff00, 0xff00, 0, 0 } -#endif -#endif -}; -#define NUM_DESKTOP_COLORS (sizeof citems / sizeof citems[0]) - -void -XcupExtensionInit (INITARGS) -{ -#if 0 - ExtensionEntry* extEntry; - - if ((extEntry = AddExtension (XCUPNAME, - 0, - XcupNumberErrors, - ProcDispatch, - SProcDispatch, - ResetProc, - StandardMinorOpcode))) { - ReqCode = (unsigned char)extEntry->base; - ErrorBase = extEntry->errorBase; - } -#else - (void) AddExtension (XCUPNAME, - 0, - XcupNumberErrors, - ProcDispatch, - SProcDispatch, - ResetProc, - StandardMinorOpcode); -#endif - - /* PC servers initialize the desktop colors (citems) here! */ -} - -/*ARGSUSED*/ -static -void ResetProc( - ExtensionEntry* extEntry) -{ -} - -static -int ProcQueryVersion( - register ClientPtr client) -{ - /* REQUEST (xXcupQueryVersionReq); */ - xXcupQueryVersionReply rep; - register int n; - - REQUEST_SIZE_MATCH (xXcupQueryVersionReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequence_number = client->sequence; - rep.server_major_version = XCUP_MAJOR_VERSION; - rep.server_minor_version = XCUP_MINOR_VERSION; - if (client->swapped) { - swaps (&rep.sequence_number, n); - swapl (&rep.length, n); - swaps (&rep.server_major_version, n); - swaps (&rep.server_minor_version, n); - } - WriteToClient (client, sizeof (xXcupQueryVersionReply), (char *)&rep); - return client->noClientException; -} - -static -int ProcGetReservedColormapEntries( - register ClientPtr client) -{ - REQUEST (xXcupGetReservedColormapEntriesReq); - xXcupGetReservedColormapEntriesReply rep; - xColorItem* cptr; - register int n; - - REQUEST_SIZE_MATCH (xXcupGetReservedColormapEntriesReq); - - if (stuff->screen >= screenInfo.numScreens) - return BadValue; - -#ifndef HAVE_SPECIAL_DESKTOP_COLORS - citems[CUP_BLACK_PIXEL].pixel = - screenInfo.screens[stuff->screen]->blackPixel; - citems[CUP_WHITE_PIXEL].pixel = - screenInfo.screens[stuff->screen]->whitePixel; -#endif - - rep.type = X_Reply; - rep.sequence_number = client->sequence; - rep.length = NUM_DESKTOP_COLORS * 3; - if (client->swapped) { - swaps (&rep.sequence_number, n); - swapl (&rep.length, n); - } - WriteToClient (client, sizeof (xXcupGetReservedColormapEntriesReply), (char *)&rep); - for (n = 0, cptr = citems; n < NUM_DESKTOP_COLORS; n++, cptr++) { - if (client->swapped) SwapColorItem (cptr); - WriteToClient (client, SIZEOF(xColorItem), (char *)cptr); - } - return client->noClientException; -} - -static -int ProcStoreColors( - register ClientPtr client) -{ - REQUEST (xXcupStoreColorsReq); - ColormapPtr pcmp; - - REQUEST_AT_LEAST_SIZE (xXcupStoreColorsReq); - pcmp = (ColormapPtr) SecurityLookupIDByType (client, stuff->cmap, - RT_COLORMAP, SecurityWriteAccess); - - if (pcmp) { - int ncolors, n; - xXcupStoreColorsReply rep; - xColorItem* cptr; - - if (!(pcmp->class & DynamicClass)) - return BadMatch; - - ncolors = (client->req_len << 2) - SIZEOF (xXcupStoreColorsReq); - if (ncolors % SIZEOF(xColorItem)) - return BadLength; - - ncolors /= SIZEOF (xColorItem); - - - for (n = 0, cptr = (xColorItem*) &stuff[1]; n < ncolors; n++) { - Pixel pixel = cptr->pixel; - - if (AllocColor (pcmp, - &cptr->red, &cptr->green, &cptr->blue, - &pixel, client->index) == Success) { - cptr->pixel = pixel; - cptr->flags = 0x08; - } else - cptr->flags = 0; - cptr = (xColorItem*) (((char*)cptr) + SIZEOF(xColorItem)); - } - - rep.type = X_Reply; - rep.sequence_number = client->sequence; - rep.length = ncolors * 3; - if (client->swapped) { - swaps (&rep.sequence_number, n); - swapl (&rep.length, n); - } - WriteToClient (client, sizeof (xXcupGetReservedColormapEntriesReply), (char *)&rep); - for (n = 0, cptr = (xColorItem*) &stuff[1]; n < ncolors; n++) { - if (client->swapped) SwapColorItem (cptr); - WriteToClient (client, SIZEOF(xColorItem), (char *)cptr); - cptr = (xColorItem*) (((char*)cptr) + SIZEOF(xColorItem)); - } - return client->noClientException; - } else { - client->errorValue = stuff->cmap; - return BadColor; - } -} - -static -int ProcDispatch( - register ClientPtr client) -{ - REQUEST (xReq); - switch (stuff->data) - { - case X_XcupQueryVersion: - return ProcQueryVersion (client); - case X_XcupGetReservedColormapEntries: - return ProcGetReservedColormapEntries (client); - case X_XcupStoreColors: - return ProcStoreColors (client); - default: - return BadRequest; - } -} - -static -int SProcQueryVersion( - register ClientPtr client) -{ - register int n; - - REQUEST(xXcupQueryVersionReq); - swaps(&stuff->length, n); - return ProcQueryVersion(client); -} - -static -int SProcGetReservedColormapEntries( - ClientPtr client) -{ - register int n; - - REQUEST (xXcupGetReservedColormapEntriesReq); - swaps (&stuff->length, n); - swapl (&stuff->screen, n); - REQUEST_AT_LEAST_SIZE (xXcupGetReservedColormapEntriesReq); - return ProcGetReservedColormapEntries (client); -} - -static -int SProcXcupStoreColors( - ClientPtr client) -{ - register int n; - int count; - xColorItem* pItem; - - REQUEST (xXcupStoreColorsReq); - swaps (&stuff->length, n); - REQUEST_AT_LEAST_SIZE (xXcupStoreColorsReq); - swapl(&stuff->cmap, n); - pItem = (xColorItem*) &stuff[1]; - for(count = LengthRestB(stuff)/sizeof(xColorItem); --count >= 0; ) - SwapColorItem(pItem++); - return ProcStoreColors (client); -} - -static -int SProcDispatch( - register ClientPtr client) -{ - REQUEST(xReq); - switch (stuff->data) - { - case X_XcupQueryVersion: - return SProcQueryVersion (client); - case X_XcupGetReservedColormapEntries: - return SProcGetReservedColormapEntries (client); - case X_XcupStoreColors: - return SProcXcupStoreColors (client); - default: - return BadRequest; - } -} - - diff --git a/nx-X11/programs/Xserver/Xext/dgaproc.h b/nx-X11/programs/Xserver/Xext/dgaproc.h deleted file mode 100644 index 4d3f224e6..000000000 --- a/nx-X11/programs/Xserver/Xext/dgaproc.h +++ /dev/null @@ -1,144 +0,0 @@ -/* $XFree86: xc/programs/Xserver/Xext/dgaproc.h,v 1.21 2000/06/30 19:06:54 keithp Exp $ */ - -#ifndef __DGAPROC_H -#define __DGAPROC_H - -#include -#include "pixmap.h" - -#define DGA_CONCURRENT_ACCESS 0x00000001 -#define DGA_FILL_RECT 0x00000002 -#define DGA_BLIT_RECT 0x00000004 -#define DGA_BLIT_RECT_TRANS 0x00000008 -#define DGA_PIXMAP_AVAILABLE 0x00000010 - -#define DGA_INTERLACED 0x00010000 -#define DGA_DOUBLESCAN 0x00020000 - -#define DGA_FLIP_IMMEDIATE 0x00000001 -#define DGA_FLIP_RETRACE 0x00000002 - -#define DGA_COMPLETED 0x00000000 -#define DGA_PENDING 0x00000001 - -#define DGA_NEED_ROOT 0x00000001 - -typedef struct { - int num; /* A unique identifier for the mode (num > 0) */ - char *name; /* name of mode given in the XF86Config */ - int VSync_num; - int VSync_den; - int flags; /* DGA_CONCURRENT_ACCESS, etc... */ - int imageWidth; /* linear accessible portion (pixels) */ - int imageHeight; - int pixmapWidth; /* Xlib accessible portion (pixels) */ - int pixmapHeight; /* both fields ignored if no concurrent access */ - int bytesPerScanline; - int byteOrder; /* MSBFirst, LSBFirst */ - int depth; - int bitsPerPixel; - unsigned long red_mask; - unsigned long green_mask; - unsigned long blue_mask; - short visualClass; - int viewportWidth; - int viewportHeight; - int xViewportStep; /* viewport position granularity */ - int yViewportStep; - int maxViewportX; /* max viewport origin */ - int maxViewportY; - int viewportFlags; /* types of page flipping possible */ - int offset; - int reserved1; - int reserved2; -} XDGAModeRec, *XDGAModePtr; - -/* DDX interface */ - -int -DGASetMode( - int Index, - int num, - XDGAModePtr mode, - PixmapPtr *pPix -); - -void -DGASetInputMode( - int Index, - Bool keyboard, - Bool mouse -); - -void -DGASelectInput( - int Index, - ClientPtr client, - long mask -); - -Bool DGAAvailable(int Index); -Bool DGAActive(int Index); -void DGAShutdown(void); -void DGAInstallCmap(ColormapPtr cmap); -int DGAGetViewportStatus(int Index); -int DGASync(int Index); - -int -DGAFillRect( - int Index, - int x, int y, int w, int h, - unsigned long color -); - -int -DGABlitRect( - int Index, - int srcx, int srcy, - int w, int h, - int dstx, int dsty -); - -int -DGABlitTransRect( - int Index, - int srcx, int srcy, - int w, int h, - int dstx, int dsty, - unsigned long color -); - -int -DGASetViewport( - int Index, - int x, int y, - int mode -); - -int DGAGetModes(int Index); -int DGAGetOldDGAMode(int Index); - -int DGAGetModeInfo(int Index, XDGAModePtr mode, int num); - -Bool DGAVTSwitch(void); -Bool DGAStealMouseEvent(int Index, xEvent *e, int dx, int dy); -Bool DGAStealKeyEvent(int Index, xEvent *e); -Bool DGAIsDgaEvent (xEvent *e); - -Bool DGADeliverEvent (ScreenPtr pScreen, xEvent *e); - -Bool DGAOpenFramebuffer(int Index, char **name, unsigned char **mem, - int *size, int *offset, int *flags); -void DGACloseFramebuffer(int Index); -Bool DGAChangePixmapMode(int Index, int *x, int *y, int mode); -int DGACreateColormap(int Index, ClientPtr client, int id, int mode, - int alloc); - -extern unsigned char DGAReqCode; -extern int DGAErrorBase; -extern int DGAEventBase; -extern int *XDGAEventBase; - - - -#endif /* __DGAPROC_H */ diff --git a/nx-X11/programs/Xserver/Xext/extmod/Imakefile b/nx-X11/programs/Xserver/Xext/extmod/Imakefile index 45f3f39d7..f5aceb507 100644 --- a/nx-X11/programs/Xserver/Xext/extmod/Imakefile +++ b/nx-X11/programs/Xserver/Xext/extmod/Imakefile @@ -4,52 +4,18 @@ XCOMM This directory is only entered if DoLoadableServer is set #define IHaveModules #include -#if BuildMultibuffer - MULTIBUFSRC = mbuf.c - MULTIBUFOBJ = mbuf.o -LinkSourceFile(mbuf.c,..) -#endif - #if BuildScreenSaverExt SCRNSAVSRC = saver.c SCRNSAVOBJ = saver.o LinkSourceFile(saver.c,..) #endif -#if BuildXF86VidModeExt - VIDMODESRCS = xf86vmode.c - VIDMODEOBJS = xf86vmode.o -LinkSourceFile(xf86vmode.c,..) -#endif - -#if BuildXF86MiscExt - XF86MISCSRCS = xf86misc.c - XF86MISCOBJS = xf86misc.o -LinkSourceFile(xf86misc.c,..) -#endif - -#if BuildXF86DGA - XF86DGASRCS = xf86dga.c xf86dga2.c - XF86DGAOBJS = xf86dga.o xf86dga2.o -LinkSourceFile(xf86dga.c,..) -LinkSourceFile(xf86dga2.c,..) -#endif - #if BuildDPMS DPMSSRCS = dpms.c DPMSOBJS = dpms.o LinkSourceFile(dpms.c,..) #endif -#if BuildFontCache - FONTCACHESRCS = fontcache.c - FONTCACHEOBJS = fontcache.o -#if 0 - FONTCACHEINCLUDES = -I$(XF86SRC)/os-support -#endif -LinkSourceFile(fontcache.c,..) -#endif - #if BuildXvExt XVSRCS = xvmain.c xvdisp.c xvmod.c xvmc.c XVOBJS = xvmain.o xvdisp.o xvmod.o xvmc.o @@ -63,59 +29,35 @@ LinkSourceFile(xvmc.c,..) XRESSRCS = xres.c XRESOBJS = xres.o LinkSourceFile(xres.c,..) -#endif - -#if BuildEVI - EVISRCS = EVI.c sampleEVI.c - EVIOBJS = EVI.o sampleEVI.o -LinkSourceFile(EVI.c,..) -LinkSourceFile(sampleEVI.c,..) -#endif - -#if BuildCup - CUPSRCS = cup.c - CUPOBJS = cup.o -LinkSourceFile(cup.c,..) #endif MODINITSRCS = modinit.c MODINITOBJS = modinit.o - SRCS = shape.c $(MULTIBUFSRC) \ - mitmisc.c \ - bigreq.c sync.c $(SCRNSAVSRC) xcmisc.c $(VIDMODESRCS) \ - $(XF86MISCSRCS) $(XF86DGASRCS) \ - $(CUPSRCS) $(DPMSSRCS) $(FONTCACHESRCS) \ - $(EVISRCS) $(XVSRCS) $(MODINITSRCS) $(XRESSRCS) + SRCS = shape.c \ + bigreq.c sync.c $(SCRNSAVSRC) xcmisc.c \ + $(DPMSSRCS) \ + $(XVSRCS) $(MODINITSRCS) $(XRESSRCS) - MOBJS = $(MODINITOBJS) shape.o $(MULTIBUFOBJ) mitmisc.o \ + MOBJS = $(MODINITOBJS) shape.o \ bigreq.o sync.o $(SCRNSAVOBJ) xcmisc.o \ - $(VIDMODEOBJS) $(XF86MISCOBJS) $(XF86DGAOBJS) \ - $(CUPOBJS) $(DPMSOBJS) $(FONTCACHEOBJS) \ - $(EVIOBJS) $(XVOBJS) $(XRESOBJS) + $(DPMSOBJS) \ + $(XVOBJS) $(XRESOBJS) DEFINES = -DEXTMODULE $(EXT_DEFINES) XF86INCLUDES = -I$(XF86COMSRC) INCLUDES = -I.. -I../../include -I$(XINCLUDESRC) -I$(EXTINCSRC) \ - $(XF86INCLUDES) $(FONTCACHEINCLUDES) + $(XF86INCLUDES) LINTLIBS = ../../dix/llib-ldix.ln ../../os/llib-los.ln LinkSourceFile(shape.c,..) -LinkSourceFile(mitmisc.c,..) LinkSourceFile(bigreq.c,..) LinkSourceFile(sync.c,..) LinkSourceFile(xcmisc.c,..) ModuleObjectRule() -/* - * A hack to work around an optimization problem with gcc 2.95.2 - */ -#if BuildXF86VidModeExt && defined(GccOptBug295) -SpecialCObjectRule(xf86vmode,NullParameter,-O0) -#endif - SpecialCObjectRule(modinit,$(ICONFIGFILES),$(EXT_DEFINES)) LibraryModuleTarget(extmod,$(MOBJS)) NormalLintTarget($(SRCS)) diff --git a/nx-X11/programs/Xserver/Xext/extmod/modinit.c b/nx-X11/programs/Xserver/Xext/extmod/modinit.c index 162f76ad8..6969148a3 100644 --- a/nx-X11/programs/Xserver/Xext/extmod/modinit.c +++ b/nx-X11/programs/Xserver/Xext/extmod/modinit.c @@ -53,24 +53,6 @@ ExtensionModule extensionModules[] = { NULL }, #endif -#ifdef MULTIBUFFER - { - MultibufferExtensionInit, - MULTIBUFFER_PROTOCOL_NAME, - &noMultibufferExtension, - NULL, - NULL - }, -#endif -#ifdef MITMISC - { - MITMiscExtensionInit, - MITMISCNAME, - &noMITMiscExtension, - NULL, - NULL - }, -#endif #ifdef notyet { XTestExtensionInit, @@ -107,42 +89,6 @@ ExtensionModule extensionModules[] = { NULL }, #endif -#ifdef XCMISC - { - XCMiscExtensionInit, - XCMiscExtensionName, - &noXCMiscExtension, - NULL, - NULL - }, -#endif -#ifdef XF86VIDMODE - { - XFree86VidModeExtensionInit, - XF86VIDMODENAME, - &noXFree86VidModeExtension, - NULL, - NULL - }, -#endif -#ifdef XF86MISC - { - XFree86MiscExtensionInit, - XF86MISCNAME, - &noXFree86MiscExtension, - NULL, - NULL - }, -#endif -#ifdef XFreeXDGA - { - XFree86DGAExtensionInit, - XF86DGANAME, - &noXFree86DGAExtension, - XFree86DGARegister, - NULL - }, -#endif #ifdef DPMSExtension { DPMSExtensionInit, @@ -152,33 +98,6 @@ ExtensionModule extensionModules[] = { NULL }, #endif -#ifdef FONTCACHE - { - FontCacheExtensionInit, - FONTCACHENAME, - &noFontCacheExtension, - NULL, - NULL - }, -#endif -#ifdef TOGCUP - { - XcupExtensionInit, - XCUPNAME, - &noXcupExtension, - NULL, - NULL - }, -#endif -#ifdef EVI - { - EVIExtensionInit, - EVINAME, - &noEVIExtension, - NULL, - NULL - }, -#endif #ifdef XV { XvExtensionInit, diff --git a/nx-X11/programs/Xserver/Xext/extmod/modinit.h b/nx-X11/programs/Xserver/Xext/extmod/modinit.h index 672586fdd..f780c7a49 100644 --- a/nx-X11/programs/Xserver/Xext/extmod/modinit.h +++ b/nx-X11/programs/Xserver/Xext/extmod/modinit.h @@ -92,18 +92,6 @@ extern void FontCacheExtensionInit(INITARGS); #include "fontcachstr.h" #endif -#ifdef TOGCUP -extern void XcupExtensionInit(INITARGS); -#define _XCUP_SERVER_ -#include -#endif - -#ifdef EVI -extern void EVIExtensionInit(INITARGS); -#define _XEVI_SERVER_ -#include -#endif - #ifdef XV extern void XvExtensionInit(INITARGS); extern void XvMCExtensionInit(INITARGS); diff --git a/nx-X11/programs/Xserver/Xext/fontcache.c b/nx-X11/programs/Xserver/Xext/fontcache.c deleted file mode 100644 index 0956f9be9..000000000 --- a/nx-X11/programs/Xserver/Xext/fontcache.c +++ /dev/null @@ -1,333 +0,0 @@ -/*- - * Copyright (c) 1998-1999 Shunsuke Akiyama . - * All rights reserved. - * Copyright (c) 1998-1999 X-TrueType Server Project, All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * Id: fontcache.c,v 1.12 1999/01/31 13:47:45 akiyama Exp $ - */ -/* $XFree86: xc/programs/Xserver/Xext/fontcache.c,v 1.7 2003/10/28 23:08:43 tsi Exp $ */ - -/* THIS IS NOT AN X CONSORTIUM STANDARD */ - -#define NEED_REPLIES -#define NEED_EVENTS -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include "misc.h" -#include "dixstruct.h" -#include "extnsionst.h" -#include "scrnintstr.h" -#include "inputstr.h" -#include "servermd.h" -#define _FONTCACHE_SERVER_ -#include "fontcacheP.h" -#include "fontcachstr.h" -#include - -#include "swaprep.h" -#include "modinit.h" - -static int miscErrorBase; - -static void FontCacheResetProc( - ExtensionEntry* /* extEntry */ -); - -static DISPATCH_PROC(ProcFontCacheDispatch); -static DISPATCH_PROC(ProcFontCacheGetCacheSettings); -static DISPATCH_PROC(ProcFontCacheGetCacheStatistics); -static DISPATCH_PROC(ProcFontCacheQueryVersion); -static DISPATCH_PROC(ProcFontCacheChangeCacheSettings); -static DISPATCH_PROC(SProcFontCacheDispatch); -static DISPATCH_PROC(SProcFontCacheGetCacheSettings); -static DISPATCH_PROC(SProcFontCacheGetCacheStatistics); -static DISPATCH_PROC(SProcFontCacheQueryVersion); -static DISPATCH_PROC(SProcFontCacheChangeCacheSettings); - -#if 0 -static unsigned char FontCacheReqCode = 0; -#endif - -void -FontCacheExtensionInit(INITARGS) -{ - ExtensionEntry* extEntry; - - if ( - (extEntry = AddExtension(FONTCACHENAME, - FontCacheNumberEvents, - FontCacheNumberErrors, - ProcFontCacheDispatch, - SProcFontCacheDispatch, - FontCacheResetProc, - StandardMinorOpcode))) { -#if 0 - FontCacheReqCode = (unsigned char)extEntry->base; -#endif - miscErrorBase = extEntry->errorBase; - } -} - -/*ARGSUSED*/ -static void -FontCacheResetProc (extEntry) - ExtensionEntry* extEntry; -{ -} - -static int -ProcFontCacheQueryVersion(client) - register ClientPtr client; -{ - xFontCacheQueryVersionReply rep; - register int n; - - REQUEST_SIZE_MATCH(xFontCacheQueryVersionReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.majorVersion = FONTCACHE_MAJOR_VERSION; - rep.minorVersion = FONTCACHE_MINOR_VERSION; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.majorVersion, n); - swaps(&rep.minorVersion, n); - } - WriteToClient(client, SIZEOF(xFontCacheQueryVersionReply), (char *)&rep); - return (client->noClientException); -} - -static int -ProcFontCacheGetCacheSettings(client) - register ClientPtr client; -{ - xFontCacheGetCacheSettingsReply rep; - FontCacheSettings cinfo; - register int n; - - REQUEST_SIZE_MATCH(xFontCacheGetCacheSettingsReq); - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = 0; - - /* XXX */ - FontCacheGetSettings(&cinfo); - rep.himark = cinfo.himark; - rep.lowmark = cinfo.lowmark; - rep.balance = cinfo.balance; - rep.reserve0 = 0; - rep.reserve1 = 0; - rep.reserve2 = 0; - - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.himark, n); - swapl(&rep.lowmark, n); - swapl(&rep.balance, n); - swapl(&rep.reserve0, n); - swapl(&rep.reserve1, n); - swapl(&rep.reserve2, n); - } - /* XXX */ - - WriteToClient(client, SIZEOF(xFontCacheGetCacheSettingsReply), - (char *)&rep); - return (client->noClientException); -} - -static int -ProcFontCacheGetCacheStatistics(client) - register ClientPtr client; -{ - xFontCacheGetCacheStatisticsReply rep; - FontCacheStatistics cstats; - register int n; - - REQUEST_SIZE_MATCH(xFontCacheGetCacheStatisticsReq); - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = (sz_xFontCacheGetCacheStatisticsReply - 32) >> 2; - - /* XXX */ - FontCacheGetStatistics(&cstats); - rep.purge_runs = cstats.purge_runs; - rep.purge_stat = cstats.purge_stat; - rep.balance = cstats.balance; - rep.reserve0 = 0; - rep.f_hits = cstats.f.hits; - rep.f_misshits = cstats.f.misshits; - rep.f_purged = cstats.f.purged; - rep.f_usage = cstats.f.usage; - rep.f_reserve0 = 0; - rep.v_hits = cstats.v.hits; - rep.v_misshits = cstats.v.misshits; - rep.v_purged = cstats.v.purged; - rep.v_usage = cstats.v.usage; - rep.v_reserve0 = 0; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.purge_runs, n); - swapl(&rep.purge_stat, n); - swapl(&rep.balance, n); - swapl(&rep.reserve0, n); - swapl(&rep.f_hits, n); - swapl(&rep.f_misshits, n); - swapl(&rep.f_purged, n); - swapl(&rep.f_usage, n); - swapl(&rep.f_reserve0, n); - swapl(&rep.v_hits, n); - swapl(&rep.v_misshits, n); - swapl(&rep.v_purged, n); - swapl(&rep.v_usage, n); - swapl(&rep.v_reserve0, n); - } - /* XXX */ - WriteToClient(client, SIZEOF(xFontCacheGetCacheStatisticsReply), - (char *)&rep); - return (client->noClientException); -} - -static int -ProcFontCacheChangeCacheSettings(client) - register ClientPtr client; -{ - FontCacheSettings cs; - - REQUEST(xFontCacheChangeCacheSettingsReq); - - REQUEST_SIZE_MATCH(xFontCacheChangeCacheSettingsReq); - - /* XXX */ - cs.himark = stuff->himark; - cs.lowmark = stuff->lowmark; - cs.balance = stuff->balance; - - if (cs.himark < 0 || cs.lowmark < 0) - return BadValue; - if (cs.himark <= cs.lowmark) - return BadValue; - if (!(10 <= cs.balance && cs.balance <= 90)) - return BadValue; - - if (FontCacheChangeSettings(&cs) == 0) - return miscErrorBase + FontCacheCannotAllocMemory; - /* XXX */ - - return (client->noClientException); -} - -static int -ProcFontCacheDispatch (client) - register ClientPtr client; -{ - REQUEST(xReq); - switch (stuff->data) - { - case X_FontCacheQueryVersion: - return ProcFontCacheQueryVersion(client); - case X_FontCacheGetCacheSettings: - return ProcFontCacheGetCacheSettings(client); - case X_FontCacheGetCacheStatistics: - return ProcFontCacheGetCacheStatistics(client); - case X_FontCacheChangeCacheSettings: - return ProcFontCacheChangeCacheSettings(client); - default: - return miscErrorBase + FontCacheBadProtocol; - } -} - -static int -SProcFontCacheQueryVersion(client) - register ClientPtr client; -{ - register int n; - REQUEST(xFontCacheQueryVersionReq); - swaps(&stuff->length, n); - return ProcFontCacheQueryVersion(client); -} - -static int -SProcFontCacheGetCacheSettings(client) - ClientPtr client; -{ - register int n; - REQUEST(xFontCacheGetCacheSettingsReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xFontCacheGetCacheSettingsReq); - return ProcFontCacheGetCacheSettings(client); -} - -static int -SProcFontCacheGetCacheStatistics(client) - ClientPtr client; -{ - register int n; - REQUEST(xFontCacheGetCacheStatisticsReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xFontCacheGetCacheStatisticsReq); - return ProcFontCacheGetCacheStatistics(client); -} - -static int -SProcFontCacheChangeCacheSettings(client) - ClientPtr client; -{ - register int n; - REQUEST(xFontCacheChangeCacheSettingsReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xFontCacheChangeCacheSettingsReq); - /* XXX */ - swapl(&stuff->himark, n); - swapl(&stuff->lowmark, n); - swapl(&stuff->balance, n); - /* XXX */ - return ProcFontCacheChangeCacheSettings(client); -} - -static int -SProcFontCacheDispatch (client) - register ClientPtr client; -{ - REQUEST(xReq); - switch (stuff->data) - { - case X_FontCacheQueryVersion: - return SProcFontCacheQueryVersion(client); - case X_FontCacheGetCacheSettings: - return SProcFontCacheGetCacheSettings(client); - case X_FontCacheGetCacheStatistics: - return SProcFontCacheGetCacheStatistics(client); - case X_FontCacheChangeCacheSettings: - return SProcFontCacheChangeCacheSettings(client); - default: - return miscErrorBase + FontCacheBadProtocol; - } -} diff --git a/nx-X11/programs/Xserver/Xext/mbuf.c b/nx-X11/programs/Xserver/Xext/mbuf.c deleted file mode 100644 index 5379f2656..000000000 --- a/nx-X11/programs/Xserver/Xext/mbuf.c +++ /dev/null @@ -1,1787 +0,0 @@ -/* $XFree86: xc/programs/Xserver/Xext/mbuf.c,v 3.15 2003/10/28 23:08:43 tsi Exp $ */ -/************************************************************ - -Copyright 1989, 1998 The Open Group - -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. - -The above copyright notice and this permission notice 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 -OPEN GROUP 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. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -********************************************************/ - -/* $Xorg: mbuf.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */ -#define NEED_REPLIES -#define NEED_EVENTS -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include "window.h" -#include "os.h" -#include "windowstr.h" -#include "scrnintstr.h" -#include "pixmapstr.h" -#include "gcstruct.h" -#include "extnsionst.h" -#include "dixstruct.h" -#include "resource.h" -#include "opaque.h" -#include "sleepuntil.h" -#define _MULTIBUF_SERVER_ /* don't want Xlib structures */ -#include - -#ifdef EXTMODULE -#include "xf86_ansic.h" -#else -#include -#if !defined(WIN32) && !defined(Lynx) -#include -#endif -#endif - -/* given an OtherClientPtr obj, get the ClientPtr */ -#define rClient(obj) (clients[CLIENT_ID((obj)->resource)]) - -/* given a MultibufferPtr b, get the ClientPtr */ -#define bClient(b) (clients[CLIENT_ID(b->pPixmap->drawable.id)]) - -#define ValidEventMasks (ExposureMask|MultibufferClobberNotifyMask|MultibufferUpdateNotifyMask) - -#if 0 -static unsigned char MultibufferReqCode; -#endif -static int MultibufferEventBase; -static int MultibufferErrorBase; -int MultibufferScreenIndex = -1; -int MultibufferWindowIndex = -1; - -static void PerformDisplayRequest ( - MultibuffersPtr * /* ppMultibuffers */, - MultibufferPtr * /* pMultibuffer */, - int /* nbuf */ - ); -static Bool QueueDisplayRequest ( - ClientPtr /* client */, - TimeStamp /* activateTime */ - ); - -static void BumpTimeStamp ( - TimeStamp * /* ts */, - CARD32 /* inc */ - ); - -static void AliasMultibuffer ( - MultibuffersPtr /* pMultibuffers */, - int /* i */ - ); -static void RecalculateMultibufferOtherEvents ( - MultibufferPtr /* pMultibuffer */ - ); -static int EventSelectForMultibuffer( - MultibufferPtr /* pMultibuffer */, - ClientPtr /* client */, - Mask /* mask */ - ); - -/* - * The Pixmap associated with a buffer can be found as a resource - * with this type - */ -RESTYPE MultibufferDrawableResType; -static int MultibufferDrawableDelete ( - void * /* value */, - XID /* id */ - ); -/* - * The per-buffer data can be found as a resource with this type. - * the resource id of the per-buffer data is the same as the resource - * id of the pixmap - */ -static RESTYPE MultibufferResType; -static int MultibufferDelete ( - void * /* value */, - XID /* id */ - ); - -/* - * The per-window data can be found as a resource with this type, - * using the window resource id - */ -static RESTYPE MultibuffersResType; -static int MultibuffersDelete ( - void * /* value */, - XID /* id */ - ); - -/* - * Clients other than the buffer creator attach event masks in - * OtherClient structures; each has a resource of this type. - */ -static RESTYPE OtherClientResType; -static int OtherClientDelete ( - void * /* value */, - XID /* id */ - ); - -/**************** - * MultibufferExtensionInit - * - * Called from InitExtensions in main() - * - ****************/ - -extern DISPATCH_PROC(ProcGetBufferAttributes); - -static DISPATCH_PROC(ProcClearImageBufferArea); -static DISPATCH_PROC(ProcCreateImageBuffers); -static DISPATCH_PROC(ProcDestroyImageBuffers); -static DISPATCH_PROC(ProcDisplayImageBuffers); -static DISPATCH_PROC(ProcGetBufferInfo); -static DISPATCH_PROC(ProcGetBufferVersion); -static DISPATCH_PROC(ProcGetMBufferAttributes); -static DISPATCH_PROC(ProcMultibufferDispatch); -static DISPATCH_PROC(ProcSetBufferAttributes); -static DISPATCH_PROC(ProcSetMBufferAttributes); -static DISPATCH_PROC(SProcClearImageBufferArea); -static DISPATCH_PROC(SProcCreateImageBuffers); -static DISPATCH_PROC(SProcDestroyImageBuffers); -static DISPATCH_PROC(SProcDisplayImageBuffers); -static DISPATCH_PROC(SProcGetBufferAttributes); -static DISPATCH_PROC(SProcGetBufferInfo); -static DISPATCH_PROC(SProcGetBufferVersion); -static DISPATCH_PROC(SProcGetMBufferAttributes); -static DISPATCH_PROC(SProcMultibufferDispatch); -static DISPATCH_PROC(SProcSetBufferAttributes); -static DISPATCH_PROC(SProcSetMBufferAttributes); - -static void MultibufferResetProc( - ExtensionEntry * /* extEntry */ - ); -static void SClobberNotifyEvent( - xMbufClobberNotifyEvent * /* from */, - xMbufClobberNotifyEvent * /* to */ - ); -static void SUpdateNotifyEvent( - xMbufUpdateNotifyEvent * /* from */, - xMbufUpdateNotifyEvent * /* to */ - ); -static Bool MultibufferPositionWindow( - WindowPtr /* pWin */, - int /* x */, - int /* y */ - ); - -static void SetupBackgroundPainter ( - WindowPtr /* pWin */, - GCPtr /* pGC */ - ); - -static int DeliverEventsToMultibuffer ( - MultibufferPtr /* pMultibuffer */, - xEvent * /* pEvents */, - int /* count */, - Mask /* filter */ - ); - -void -MultibufferExtensionInit() -{ - ExtensionEntry *extEntry; - int i, j; - ScreenPtr pScreen; - MultibufferScreenPtr pMultibufferScreen; - - /* - * allocate private pointers in windows and screens. Allocating - * window privates may seem like an unnecessary expense, but every - * PositionWindow call must check to see if the window is - * multi-buffered; a resource lookup is too expensive. - */ - MultibufferScreenIndex = AllocateScreenPrivateIndex (); - if (MultibufferScreenIndex < 0) - return; - MultibufferWindowIndex = AllocateWindowPrivateIndex (); - for (i = 0; i < screenInfo.numScreens; i++) - { - pScreen = screenInfo.screens[i]; - if (!AllocateWindowPrivate (pScreen, MultibufferWindowIndex, 0) || - !(pMultibufferScreen = (MultibufferScreenPtr) xalloc (sizeof (MultibufferScreenRec)))) - { - for (j = 0; j < i; j++) - xfree (screenInfo.screens[j]->devPrivates[MultibufferScreenIndex].ptr); - return; - } - pScreen->devPrivates[MultibufferScreenIndex].ptr = (void *) pMultibufferScreen; - /* - * wrap PositionWindow to resize the pixmap when the window - * changes size - */ - pMultibufferScreen->PositionWindow = pScreen->PositionWindow; - pScreen->PositionWindow = MultibufferPositionWindow; - } - /* - * create the resource types - */ - MultibufferDrawableResType = - CreateNewResourceType(MultibufferDrawableDelete)|RC_CACHED|RC_DRAWABLE; - MultibufferResType = CreateNewResourceType(MultibufferDelete); - MultibuffersResType = CreateNewResourceType(MultibuffersDelete); - OtherClientResType = CreateNewResourceType(OtherClientDelete); - if (MultibufferDrawableResType && MultibufferResType && - MultibuffersResType && OtherClientResType && - (extEntry = AddExtension(MULTIBUFFER_PROTOCOL_NAME, - MultibufferNumberEvents, - MultibufferNumberErrors, - ProcMultibufferDispatch, SProcMultibufferDispatch, - MultibufferResetProc, StandardMinorOpcode))) - { -#if 0 - MultibufferReqCode = (unsigned char)extEntry->base; -#endif - MultibufferEventBase = extEntry->eventBase; - MultibufferErrorBase = extEntry->errorBase; - EventSwapVector[MultibufferEventBase + MultibufferClobberNotify] = (EventSwapPtr) SClobberNotifyEvent; - EventSwapVector[MultibufferEventBase + MultibufferUpdateNotify] = (EventSwapPtr) SUpdateNotifyEvent; - } -} - -/*ARGSUSED*/ -static void -MultibufferResetProc (extEntry) -ExtensionEntry *extEntry; -{ - int i; - ScreenPtr pScreen; - MultibufferScreenPtr pMultibufferScreen; - - if (MultibufferScreenIndex < 0) - return; - for (i = 0; i < screenInfo.numScreens; i++) - { - pScreen = screenInfo.screens[i]; - if (pScreen->devPrivates[MultibufferScreenIndex].ptr) - { - pMultibufferScreen = (MultibufferScreenPtr) pScreen->devPrivates[MultibufferScreenIndex].ptr; - pScreen->PositionWindow = pMultibufferScreen->PositionWindow; - xfree (pMultibufferScreen); - } - } -} - -static int -ProcGetBufferVersion (client) - register ClientPtr client; -{ - xMbufGetBufferVersionReply rep; - register int n; - - REQUEST_SIZE_MATCH (xMbufGetBufferVersionReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.majorVersion = MULTIBUFFER_MAJOR_VERSION; - rep.minorVersion = MULTIBUFFER_MINOR_VERSION; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - } - WriteToClient(client, sizeof (xMbufGetBufferVersionReply), (char *)&rep); - return (client->noClientException); -} - -static void -SetupBackgroundPainter (pWin, pGC) - WindowPtr pWin; - GCPtr pGC; -{ - void *gcvalues[4]; - int ts_x_origin, ts_y_origin; - PixUnion background; - int backgroundState; - Mask gcmask; - - /* - * First take care of any ParentRelative stuff by altering the - * tile/stipple origin to match the coordinates of the upper-left - * corner of the first ancestor without a ParentRelative background. - * This coordinate is, of course, negative. - */ - - ts_x_origin = ts_y_origin = 0; - while (pWin->backgroundState == ParentRelative) { - ts_x_origin -= pWin->origin.x; - ts_y_origin -= pWin->origin.y; - pWin = pWin->parent; - } - backgroundState = pWin->backgroundState; - background = pWin->background; - - switch (backgroundState) - { - case BackgroundPixel: - gcvalues[0] = (void *) background.pixel; - gcvalues[1] = (void *) FillSolid; - gcmask = GCForeground|GCFillStyle; - break; - - case BackgroundPixmap: - gcvalues[0] = (void *) FillTiled; - gcvalues[1] = (void *) background.pixmap; - gcvalues[2] = (void *)(long) ts_x_origin; - gcvalues[3] = (void *)(long) ts_y_origin; - gcmask = GCFillStyle|GCTile|GCTileStipXOrigin|GCTileStipYOrigin; - break; - - default: - gcvalues[0] = (void *) GXnoop; - gcmask = GCFunction; - } - DoChangeGC(pGC, gcmask, (XID *)gcvalues, TRUE); -} - -int -CreateImageBuffers (pWin, nbuf, ids, action, hint) - WindowPtr pWin; - int nbuf; - XID *ids; - int action; - int hint; -{ - MultibuffersPtr pMultibuffers; - MultibufferPtr pMultibuffer; - ScreenPtr pScreen; - int width, height, depth; - int i; - GCPtr pClearGC = NULL; - xRectangle clearRect; - - DestroyImageBuffers(pWin); - pMultibuffers = (MultibuffersPtr) xalloc (sizeof (MultibuffersRec) + - nbuf * sizeof (MultibufferRec)); - if (!pMultibuffers) - return BadAlloc; - pMultibuffers->pWindow = pWin; - pMultibuffers->buffers = (MultibufferPtr) (pMultibuffers + 1); - pMultibuffers->refcnt = pMultibuffers->numMultibuffer = 0; - if (!AddResource (pWin->drawable.id, MultibuffersResType, (void *) pMultibuffers)) - return BadAlloc; - width = pWin->drawable.width; - height = pWin->drawable.height; - depth = pWin->drawable.depth; - pScreen = pWin->drawable.pScreen; - - if (pWin->backgroundState != None) - { - pClearGC = GetScratchGC (pWin->drawable.depth, pScreen); - SetupBackgroundPainter (pWin, pClearGC); - clearRect.x = clearRect.y = 0; - clearRect.width = width; - clearRect.height = height; - } - - for (i = 0; i < nbuf; i++) - { - pMultibuffer = &pMultibuffers->buffers[i]; - pMultibuffer->eventMask = 0L; - pMultibuffer->otherEventMask = 0L; - pMultibuffer->otherClients = (OtherClientsPtr) NULL; - pMultibuffer->number = i; - pMultibuffer->side = MultibufferSideMono; - pMultibuffer->clobber = MultibufferUnclobbered; - pMultibuffer->pMultibuffers = pMultibuffers; - if (!AddResource (ids[i], MultibufferResType, (void *) pMultibuffer)) - break; - pMultibuffer->pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, depth); - if (!pMultibuffer->pPixmap) - break; - if (!AddResource (ids[i], MultibufferDrawableResType, (void *) pMultibuffer->pPixmap)) - { - FreeResource (ids[i], MultibufferResType); - (*pScreen->DestroyPixmap) (pMultibuffer->pPixmap); - break; - } - pMultibuffer->pPixmap->drawable.id = ids[i]; - - if (i > 0 && pClearGC) - { - ValidateGC((DrawablePtr)pMultibuffer->pPixmap, pClearGC); - (*pClearGC->ops->PolyFillRect)((DrawablePtr)pMultibuffer->pPixmap, - pClearGC, 1, &clearRect); - } - } - pMultibuffers->numMultibuffer = i; - pMultibuffers->refcnt = i; - pMultibuffers->displayedMultibuffer = -1; - if (i > 0) - AliasMultibuffer (pMultibuffers, 0); - pMultibuffers->updateAction = action; - pMultibuffers->updateHint = hint; - pMultibuffers->windowMode = MultibufferModeMono; - pMultibuffers->lastUpdate.months = 0; - pMultibuffers->lastUpdate.milliseconds = 0; - pMultibuffers->width = width; - pMultibuffers->height = height; - pWin->devPrivates[MultibufferWindowIndex].ptr = (void *) pMultibuffers; - if (pClearGC) FreeScratchGC(pClearGC); - return Success; -} - - -static int -ProcCreateImageBuffers (client) - register ClientPtr client; -{ - REQUEST(xMbufCreateImageBuffersReq); - xMbufCreateImageBuffersReply rep; - register int n; - WindowPtr pWin; - XID *ids; - int len, nbuf; - int i; - int err; - - REQUEST_AT_LEAST_SIZE (xMbufCreateImageBuffersReq); - len = stuff->length - (sizeof(xMbufCreateImageBuffersReq) >> 2); - if (len == 0) - return BadLength; - if (!(pWin = LookupWindow (stuff->window, client))) - return BadWindow; - if (pWin->drawable.class == InputOnly) - return BadMatch; - switch (stuff->updateAction) - { - case MultibufferUpdateActionUndefined: - case MultibufferUpdateActionBackground: - case MultibufferUpdateActionUntouched: - case MultibufferUpdateActionCopied: - break; - default: - client->errorValue = stuff->updateAction; - return BadValue; - } - switch (stuff->updateHint) - { - case MultibufferUpdateHintFrequent: - case MultibufferUpdateHintIntermittent: - case MultibufferUpdateHintStatic: - break; - default: - client->errorValue = stuff->updateHint; - return BadValue; - } - nbuf = len; - ids = (XID *) &stuff[1]; - for (i = 0; i < nbuf; i++) - { - LEGAL_NEW_RESOURCE(ids[i], client); - } - err = CreateImageBuffers (pWin, nbuf, ids, - stuff->updateAction, stuff->updateHint); - if (err != Success) - return err; - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.numberBuffer = ((MultibuffersPtr) (pWin->devPrivates[MultibufferWindowIndex].ptr))->numMultibuffer; - if (client->swapped) - { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.numberBuffer, n); - } - WriteToClient(client, sizeof (xMbufCreateImageBuffersReply), (char*)&rep); - return (client->noClientException); -} - -static int -ProcDisplayImageBuffers (client) - register ClientPtr client; -{ - REQUEST(xMbufDisplayImageBuffersReq); - MultibufferPtr *pMultibuffer; - MultibuffersPtr *ppMultibuffers; - int nbuf; - XID *ids; - int i, j; - CARD32 minDelay; - TimeStamp activateTime, bufferTime; - - - REQUEST_AT_LEAST_SIZE (xMbufDisplayImageBuffersReq); - nbuf = stuff->length - (sizeof (xMbufDisplayImageBuffersReq) >> 2); - if (!nbuf) - return Success; - minDelay = stuff->minDelay; - ids = (XID *) &stuff[1]; - ppMultibuffers = (MultibuffersPtr *) ALLOCATE_LOCAL(nbuf * sizeof (MultibuffersPtr)); - pMultibuffer = (MultibufferPtr *) ALLOCATE_LOCAL(nbuf * sizeof (MultibufferPtr)); - if (!ppMultibuffers || !pMultibuffer) - { - if (ppMultibuffers) DEALLOCATE_LOCAL(ppMultibuffers); - if (pMultibuffer) DEALLOCATE_LOCAL(pMultibuffer); - client->errorValue = 0; - return BadAlloc; - } - activateTime.months = 0; - activateTime.milliseconds = 0; - for (i = 0; i < nbuf; i++) - { - pMultibuffer[i] = (MultibufferPtr) LookupIDByType (ids[i], -MultibufferResType); - if (!pMultibuffer[i]) - { - DEALLOCATE_LOCAL(ppMultibuffers); - DEALLOCATE_LOCAL(pMultibuffer); - client->errorValue = ids[i]; - return MultibufferErrorBase + MultibufferBadBuffer; - } - ppMultibuffers[i] = pMultibuffer[i]->pMultibuffers; - for (j = 0; j < i; j++) - { - if (ppMultibuffers[i] == ppMultibuffers[j]) - { - DEALLOCATE_LOCAL(ppMultibuffers); - DEALLOCATE_LOCAL(pMultibuffer); - client->errorValue = ids[i]; - return BadMatch; - } - } - bufferTime = ppMultibuffers[i]->lastUpdate; - BumpTimeStamp (&bufferTime, minDelay); - if (CompareTimeStamps (bufferTime, activateTime) == LATER) - activateTime = bufferTime; - } - UpdateCurrentTime (); - if (CompareTimeStamps (activateTime, currentTime) == LATER && - QueueDisplayRequest (client, activateTime)) - { - ; - } - else - PerformDisplayRequest (ppMultibuffers, pMultibuffer, nbuf); - - DEALLOCATE_LOCAL(ppMultibuffers); - DEALLOCATE_LOCAL(pMultibuffer); - return Success; -} - - -static int -ProcDestroyImageBuffers (client) - register ClientPtr client; -{ - REQUEST (xMbufDestroyImageBuffersReq); - WindowPtr pWin; - - REQUEST_SIZE_MATCH (xMbufDestroyImageBuffersReq); - if (!(pWin = LookupWindow (stuff->window, client))) - return BadWindow; - DestroyImageBuffers (pWin); - return Success; -} - -static int -ProcSetMBufferAttributes (client) - register ClientPtr client; -{ - REQUEST (xMbufSetMBufferAttributesReq); - WindowPtr pWin; - MultibuffersPtr pMultibuffers; - int len; - Mask vmask; - Mask index2; - CARD32 updateHint; - XID *vlist; - - REQUEST_AT_LEAST_SIZE (xMbufSetMBufferAttributesReq); - pWin = LookupWindow (stuff->window, client); - if (!pWin) - return BadWindow; - pMultibuffers = (MultibuffersPtr)LookupIDByType (pWin->drawable.id, MultibuffersResType); - if (!pMultibuffers) - return BadMatch; - len = stuff->length - (sizeof (xMbufSetMBufferAttributesReq) >> 2); - vmask = stuff->valueMask; - if (len != Ones (vmask)) - return BadLength; - vlist = (XID *) &stuff[1]; - while (vmask) - { - index2 = (Mask) lowbit (vmask); - vmask &= ~index2; - switch (index2) - { - case MultibufferWindowUpdateHint: - updateHint = (CARD32) *vlist; - switch (updateHint) - { - case MultibufferUpdateHintFrequent: - case MultibufferUpdateHintIntermittent: - case MultibufferUpdateHintStatic: - pMultibuffers->updateHint = updateHint; - break; - default: - client->errorValue = updateHint; - return BadValue; - } - vlist++; - break; - default: - client->errorValue = stuff->valueMask; - return BadValue; - } - } - return Success; -} - -static int -ProcGetMBufferAttributes (client) - ClientPtr client; -{ - REQUEST (xMbufGetMBufferAttributesReq); - WindowPtr pWin; - MultibuffersPtr pMultibuffers; - XID *ids; - xMbufGetMBufferAttributesReply rep; - int i, n; - - REQUEST_SIZE_MATCH (xMbufGetMBufferAttributesReq); - pWin = LookupWindow (stuff->window, client); - if (!pWin) - return BadWindow; - pMultibuffers = (MultibuffersPtr)LookupIDByType (pWin->drawable.id, MultibuffersResType); - if (!pMultibuffers) - return BadAccess; - ids = (XID *) ALLOCATE_LOCAL (pMultibuffers->numMultibuffer * sizeof (XID)); - if (!ids) - return BadAlloc; - for (i = 0; i < pMultibuffers->numMultibuffer; i++) - ids[i] = pMultibuffers->buffers[i].pPixmap->drawable.id; - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = pMultibuffers->numMultibuffer; - rep.displayedBuffer = pMultibuffers->displayedMultibuffer; - rep.updateAction = pMultibuffers->updateAction; - rep.updateHint = pMultibuffers->updateHint; - rep.windowMode = pMultibuffers->windowMode; - if (client->swapped) - { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.displayedBuffer, n); - SwapLongs (ids, pMultibuffers->numMultibuffer); - } - WriteToClient (client, sizeof(xMbufGetMBufferAttributesReply), - (char *)&rep); - WriteToClient (client, (int)(pMultibuffers->numMultibuffer * sizeof (XID)), - (char *)ids); - DEALLOCATE_LOCAL((void *) ids); - return client->noClientException; -} - -static int -ProcSetBufferAttributes (client) - register ClientPtr client; -{ - REQUEST(xMbufSetBufferAttributesReq); - MultibufferPtr pMultibuffer; - int len; - Mask vmask, index2; - XID *vlist; - Mask eventMask; - int result; - - REQUEST_AT_LEAST_SIZE (xMbufSetBufferAttributesReq); - pMultibuffer = (MultibufferPtr) LookupIDByType (stuff->buffer, MultibufferResType); - if (!pMultibuffer) - return MultibufferErrorBase + MultibufferBadBuffer; - len = stuff->length - (sizeof (xMbufSetBufferAttributesReq) >> 2); - vmask = stuff->valueMask; - if (len != Ones (vmask)) - return BadLength; - vlist = (XID *) &stuff[1]; - while (vmask) - { - index2 = (Mask) lowbit (vmask); - vmask &= ~index2; - switch (index2) - { - case MultibufferBufferEventMask: - eventMask = (Mask) *vlist; - vlist++; - result = EventSelectForMultibuffer (pMultibuffer, client, eventMask); - if (result != Success) - return result; - break; - default: - client->errorValue = stuff->valueMask; - return BadValue; - } - } - return Success; -} - -int -ProcGetBufferAttributes (client) - register ClientPtr client; -{ - REQUEST(xMbufGetBufferAttributesReq); - MultibufferPtr pMultibuffer; - xMbufGetBufferAttributesReply rep; - OtherClientsPtr other; - int n; - - REQUEST_SIZE_MATCH (xMbufGetBufferAttributesReq); - pMultibuffer = (MultibufferPtr) LookupIDByType (stuff->buffer, MultibufferResType); - if (!pMultibuffer) - return MultibufferErrorBase + MultibufferBadBuffer; - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = 0; - rep.window = pMultibuffer->pMultibuffers->pWindow->drawable.id; - if (bClient (pMultibuffer) == client) - rep.eventMask = pMultibuffer->eventMask; - else - { - rep.eventMask = (Mask) 0L; - for (other = pMultibuffer->otherClients; other; other = other->next) - if (SameClient (other, client)) - { - rep.eventMask = other->mask; - break; - } - } - rep.bufferIndex = pMultibuffer->number; - rep.side = pMultibuffer->side; - if (client->swapped) - { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.window, n); - swapl(&rep.eventMask, n); - swaps(&rep.bufferIndex, n); - } - WriteToClient(client, sizeof (xMbufGetBufferAttributesReply), (char *)&rep); - return (client->noClientException); -} - -static int -ProcGetBufferInfo (client) - register ClientPtr client; -{ - REQUEST (xMbufGetBufferInfoReq); - DrawablePtr pDrawable; - xMbufGetBufferInfoReply rep; - ScreenPtr pScreen; - int i, j, k; - int n; - xMbufBufferInfo *pInfo; - int nInfo; - DepthPtr pDepth; - - pDrawable = (DrawablePtr) LookupDrawable (stuff->drawable, client); - if (!pDrawable) - return BadDrawable; - pScreen = pDrawable->pScreen; - nInfo = 0; - for (i = 0; i < pScreen->numDepths; i++) - { - pDepth = &pScreen->allowedDepths[i]; - nInfo += pDepth->numVids; - } - pInfo = (xMbufBufferInfo *) - ALLOCATE_LOCAL (nInfo * sizeof (xMbufBufferInfo)); - if (!pInfo) - return BadAlloc; - - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = nInfo * (sizeof (xMbufBufferInfo) >> 2); - rep.normalInfo = nInfo; - rep.stereoInfo = 0; - if (client->swapped) - { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.normalInfo, n); - swaps(&rep.stereoInfo, n); - } - - k = 0; - for (i = 0; i < pScreen->numDepths; i++) - { - pDepth = &pScreen->allowedDepths[i]; - for (j = 0; j < pDepth->numVids; j++) - { - pInfo[k].visualID = pDepth->vids[j]; - pInfo[k].maxBuffers = 0; - pInfo[k].depth = pDepth->depth; - if (client->swapped) - { - swapl (&pInfo[k].visualID, n); - swaps (&pInfo[k].maxBuffers, n); - } - k++; - } - } - WriteToClient (client, sizeof (xMbufGetBufferInfoReply), (void *) &rep); - WriteToClient (client, (int) nInfo * sizeof (xMbufBufferInfo), (void *) pInfo); - DEALLOCATE_LOCAL ((void *) pInfo); - return client->noClientException; -} - -static int -ProcClearImageBufferArea (client) - register ClientPtr client; -{ - REQUEST (xMbufClearImageBufferAreaReq); - MultibufferPtr pMultibuffer; - WindowPtr pWin; - xRectangle clearRect; - int width, height; - DrawablePtr pDrawable; - ScreenPtr pScreen; - - REQUEST_SIZE_MATCH (xMbufClearImageBufferAreaReq); - pMultibuffer = (MultibufferPtr) LookupIDByType (stuff->buffer, MultibufferResType); - if (!pMultibuffer) - return MultibufferErrorBase + MultibufferBadBuffer; - if ((stuff->exposures != xTrue) && (stuff->exposures != xFalse)) - { - client->errorValue = stuff->exposures; - return(BadValue); - } - pWin = pMultibuffer->pMultibuffers->pWindow; - width = pWin->drawable.width; - height = pWin->drawable.height; - pScreen = pWin->drawable.pScreen; - - clearRect.x = stuff->x; - clearRect.y = stuff->y; - clearRect.width = stuff->width ? stuff->width : width; - clearRect.height = stuff->height ? stuff->height : height; - - if (pWin->backgroundState != None) - { - GCPtr pClearGC; - pClearGC = GetScratchGC (pWin->drawable.depth, pScreen); - SetupBackgroundPainter (pWin, pClearGC); - - if (pMultibuffer->number == pMultibuffer->pMultibuffers->displayedMultibuffer) - pDrawable = (DrawablePtr)pWin; - else - pDrawable = (DrawablePtr)pMultibuffer->pPixmap; - - ValidateGC(pDrawable, pClearGC); - (*pClearGC->ops->PolyFillRect) (pDrawable, pClearGC, 1, &clearRect); - FreeScratchGC(pClearGC); - } - - if (stuff->exposures) - { - RegionRec region; - BoxRec box; - box.x1 = clearRect.x; - box.y1 = clearRect.y; - box.x2 = clearRect.x + clearRect.width; - box.y2 = clearRect.y + clearRect.height; - RegionInit(®ion, &box, 1); - MultibufferExpose(pMultibuffer, ®ion); - RegionUninit(®ion); - } - return Success; -} - -static int -ProcMultibufferDispatch (client) - register ClientPtr client; -{ - REQUEST(xReq); - switch (stuff->data) { - case X_MbufGetBufferVersion: - return ProcGetBufferVersion (client); - case X_MbufCreateImageBuffers: - return ProcCreateImageBuffers (client); - case X_MbufDisplayImageBuffers: - return ProcDisplayImageBuffers (client); - case X_MbufDestroyImageBuffers: - return ProcDestroyImageBuffers (client); - case X_MbufSetMBufferAttributes: - return ProcSetMBufferAttributes (client); - case X_MbufGetMBufferAttributes: - return ProcGetMBufferAttributes (client); - case X_MbufSetBufferAttributes: - return ProcSetBufferAttributes (client); - case X_MbufGetBufferAttributes: - return ProcGetBufferAttributes (client); - case X_MbufGetBufferInfo: - return ProcGetBufferInfo (client); - case X_MbufClearImageBufferArea: - return ProcClearImageBufferArea (client); - default: - return BadRequest; - } -} - -static int -SProcGetBufferVersion (client) - register ClientPtr client; -{ - register int n; - REQUEST (xMbufGetBufferVersionReq); - - swaps (&stuff->length, n); - return ProcGetBufferVersion (client); -} - -static int -SProcCreateImageBuffers (client) - register ClientPtr client; -{ - register int n; - REQUEST (xMbufCreateImageBuffersReq); - - swaps (&stuff->length, n); - REQUEST_AT_LEAST_SIZE (xMbufCreateImageBuffersReq); - swapl (&stuff->window, n); - SwapRestL(stuff); - return ProcCreateImageBuffers (client); -} - -static int -SProcDisplayImageBuffers (client) - register ClientPtr client; -{ - register int n; - REQUEST (xMbufDisplayImageBuffersReq); - - swaps (&stuff->length, n); - REQUEST_AT_LEAST_SIZE (xMbufDisplayImageBuffersReq); - swaps (&stuff->minDelay, n); - swaps (&stuff->maxDelay, n); - SwapRestL(stuff); - return ProcDisplayImageBuffers (client); -} - -static int -SProcDestroyImageBuffers (client) - register ClientPtr client; -{ - register int n; - REQUEST (xMbufDestroyImageBuffersReq); - - swaps (&stuff->length, n); - REQUEST_SIZE_MATCH (xMbufDestroyImageBuffersReq); - swapl (&stuff->window, n); - return ProcDestroyImageBuffers (client); -} - -static int -SProcSetMBufferAttributes (client) - register ClientPtr client; -{ - register int n; - REQUEST (xMbufSetMBufferAttributesReq); - - swaps (&stuff->length, n); - REQUEST_AT_LEAST_SIZE(xMbufSetMBufferAttributesReq); - swapl (&stuff->window, n); - swapl (&stuff->valueMask, n); - SwapRestL(stuff); - return ProcSetMBufferAttributes (client); -} - -static int -SProcGetMBufferAttributes (client) - register ClientPtr client; -{ - register int n; - REQUEST (xMbufGetMBufferAttributesReq); - - swaps (&stuff->length, n); - REQUEST_AT_LEAST_SIZE(xMbufGetMBufferAttributesReq); - swapl (&stuff->window, n); - return ProcGetMBufferAttributes (client); -} - -static int -SProcSetBufferAttributes (client) - register ClientPtr client; -{ - register int n; - REQUEST (xMbufSetBufferAttributesReq); - - swaps (&stuff->length, n); - REQUEST_AT_LEAST_SIZE(xMbufSetBufferAttributesReq); - swapl (&stuff->buffer, n); - swapl (&stuff->valueMask, n); - SwapRestL(stuff); - return ProcSetBufferAttributes (client); -} - -static int -SProcGetBufferAttributes (client) - register ClientPtr client; -{ - register int n; - REQUEST (xMbufGetBufferAttributesReq); - - swaps (&stuff->length, n); - REQUEST_AT_LEAST_SIZE(xMbufGetBufferAttributesReq); - swapl (&stuff->buffer, n); - return ProcGetBufferAttributes (client); -} - -static int -SProcGetBufferInfo (client) - register ClientPtr client; -{ - register int n; - REQUEST (xMbufGetBufferInfoReq); - - swaps (&stuff->length, n); - REQUEST_SIZE_MATCH (xMbufGetBufferInfoReq); - swapl (&stuff->drawable, n); - return ProcGetBufferInfo (client); -} - -static int -SProcClearImageBufferArea(client) - register ClientPtr client; -{ - register char n; - REQUEST(xMbufClearImageBufferAreaReq); - - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH (xMbufClearImageBufferAreaReq); - swapl(&stuff->buffer, n); - swaps(&stuff->x, n); - swaps(&stuff->y, n); - swaps(&stuff->width, n); - swaps(&stuff->height, n); - return ProcClearImageBufferArea(client); -} - -static int -SProcMultibufferDispatch (client) - register ClientPtr client; -{ - REQUEST(xReq); - switch (stuff->data) { - case X_MbufGetBufferVersion: - return SProcGetBufferVersion (client); - case X_MbufCreateImageBuffers: - return SProcCreateImageBuffers (client); - case X_MbufDisplayImageBuffers: - return SProcDisplayImageBuffers (client); - case X_MbufDestroyImageBuffers: - return SProcDestroyImageBuffers (client); - case X_MbufSetMBufferAttributes: - return SProcSetMBufferAttributes (client); - case X_MbufGetMBufferAttributes: - return SProcGetMBufferAttributes (client); - case X_MbufSetBufferAttributes: - return SProcSetBufferAttributes (client); - case X_MbufGetBufferAttributes: - return SProcGetBufferAttributes (client); - case X_MbufGetBufferInfo: - return SProcGetBufferInfo (client); - case X_MbufClearImageBufferArea: - return SProcClearImageBufferArea (client); - default: - return BadRequest; - } -} - -static void -SUpdateNotifyEvent (from, to) - xMbufUpdateNotifyEvent *from, *to; -{ - to->type = from->type; - cpswaps (from->sequenceNumber, to->sequenceNumber); - cpswapl (from->buffer, to->buffer); - cpswapl (from->timeStamp, to->timeStamp); -} - -static void -SClobberNotifyEvent (from, to) - xMbufClobberNotifyEvent *from, *to; -{ - to->type = from->type; - cpswaps (from->sequenceNumber, to->sequenceNumber); - cpswapl (from->buffer, to->buffer); - to->state = from->state; -} - -static void -PerformDisplayRequest (ppMultibuffers, pMultibuffer, nbuf) - MultibufferPtr *pMultibuffer; - MultibuffersPtr *ppMultibuffers; - int nbuf; -{ - GCPtr pGC; - PixmapPtr pPrevPixmap, pNewPixmap; - xRectangle clearRect; - WindowPtr pWin; - RegionPtr pExposed; - int i; - MultibufferPtr pPrevMultibuffer; - XID graphicsExpose; - - UpdateCurrentTime (); - for (i = 0; i < nbuf; i++) - { - pWin = ppMultibuffers[i]->pWindow; - pGC = GetScratchGC (pWin->drawable.depth, pWin->drawable.pScreen); - pPrevMultibuffer = - &ppMultibuffers[i]->buffers[ppMultibuffers[i]->displayedMultibuffer]; - pPrevPixmap = pPrevMultibuffer->pPixmap; - pNewPixmap = pMultibuffer[i]->pPixmap; - switch (ppMultibuffers[i]->updateAction) - { - case MultibufferUpdateActionUndefined: - break; - case MultibufferUpdateActionBackground: - SetupBackgroundPainter (pWin, pGC); - ValidateGC ((DrawablePtr)pPrevPixmap, pGC); - clearRect.x = 0; - clearRect.y = 0; - clearRect.width = pPrevPixmap->drawable.width; - clearRect.height = pPrevPixmap->drawable.height; - (*pGC->ops->PolyFillRect) ((DrawablePtr)pPrevPixmap, pGC, - 1, &clearRect); - break; - case MultibufferUpdateActionUntouched: - /* copy the window to the pixmap that represents the - * currently displayed buffer - */ - if (pPrevMultibuffer->eventMask & ExposureMask) - { - graphicsExpose = TRUE; - DoChangeGC (pGC, GCGraphicsExposures, &graphicsExpose, FALSE); - } - ValidateGC ((DrawablePtr)pPrevPixmap, pGC); - pExposed = (*pGC->ops->CopyArea) - ((DrawablePtr) pWin, - (DrawablePtr) pPrevPixmap, - pGC, - 0, 0, - pWin->drawable.width, pWin->drawable.height, - 0, 0); - - /* if we couldn't copy the whole window to the buffer, - * send expose events (if any client wants them) - */ - if (pPrevMultibuffer->eventMask & ExposureMask) - { /* some client wants expose events */ - if (pExposed) - { - RegionPtr pWinSize; - - pWinSize = CreateUnclippedWinSize (pWin); - /* pExposed is window-relative, but at this point - * pWinSize is screen-relative. Make pWinSize be - * window-relative so that region ops involving - * pExposed and pWinSize behave sensibly. - */ - RegionTranslate(pWinSize, - -pWin->drawable.x, -pWin->drawable.y); - RegionIntersect(pExposed, - pExposed, pWinSize); - RegionDestroy(pWinSize); - MultibufferExpose (pPrevMultibuffer, pExposed); - RegionDestroy(pExposed); - } - graphicsExpose = FALSE; - DoChangeGC (pGC, GCGraphicsExposures, &graphicsExpose, FALSE); - } - break; /* end case MultibufferUpdateActionUntouched */ - - case MultibufferUpdateActionCopied: - ValidateGC ((DrawablePtr)pPrevPixmap, pGC); - (*pGC->ops->CopyArea) ((DrawablePtr)pNewPixmap, - (DrawablePtr)pPrevPixmap, pGC, - 0, 0, - pWin->drawable.width, pWin->drawable.height, - 0, 0); - break; - } /* end switch on update action */ - - /* display the new buffer */ - ValidateGC ((DrawablePtr)pWin, pGC); - (*pGC->ops->CopyArea) ((DrawablePtr)pNewPixmap, (DrawablePtr)pWin, pGC, - 0, 0, - pWin->drawable.width, pWin->drawable.height, - 0, 0); - ppMultibuffers[i]->lastUpdate = currentTime; - MultibufferUpdate (pMultibuffer[i], - ppMultibuffers[i]->lastUpdate.milliseconds); - AliasMultibuffer (ppMultibuffers[i], - pMultibuffer[i] - ppMultibuffers[i]->buffers); - FreeScratchGC (pGC); - } -} - -DrawablePtr -GetBufferPointer (pWin, i) - WindowPtr pWin; - int i; -{ - MultibuffersPtr pMultibuffers; - - if (!(pMultibuffers = (MultibuffersPtr) pWin->devPrivates[MultibufferWindowIndex].ptr)) - return NULL; - return (DrawablePtr) pMultibuffers->buffers[i].pPixmap; -} - -int -DisplayImageBuffers (ids, nbuf) - XID *ids; - int nbuf; -{ - MultibufferPtr *pMultibuffer; - MultibuffersPtr *pMultibuffers; - int i, j; - - pMultibuffer = (MultibufferPtr *) ALLOCATE_LOCAL (nbuf * sizeof *pMultibuffer + - nbuf * sizeof *pMultibuffers); - if (!pMultibuffer) - return BadAlloc; - pMultibuffers = (MultibuffersPtr *) (pMultibuffer + nbuf); - for (i = 0; i < nbuf; i++) - { - pMultibuffer[i] = (MultibufferPtr) LookupIDByType (ids[i], MultibufferResType); - if (!pMultibuffer[i]) - { - DEALLOCATE_LOCAL (pMultibuffer); - return MultibufferErrorBase + MultibufferBadBuffer; - } - pMultibuffers[i] = pMultibuffer[i]->pMultibuffers; - for (j = 0; j < i; j++) - if (pMultibuffers[i] == pMultibuffers[j]) - { - DEALLOCATE_LOCAL (pMultibuffer); - return BadMatch; - } - } - PerformDisplayRequest (pMultibuffers, pMultibuffer, nbuf); - DEALLOCATE_LOCAL (pMultibuffer); - return Success; -} - - -static Bool -QueueDisplayRequest (client, activateTime) - ClientPtr client; - TimeStamp activateTime; -{ - /* see xtest.c:ProcXTestFakeInput for code similar to this */ - - if (!ClientSleepUntil(client, &activateTime, NULL, NULL)) - { - return FALSE; - } - /* swap the request back so we can simply re-execute it */ - if (client->swapped) - { - register int n; - REQUEST (xMbufDisplayImageBuffersReq); - - SwapRestL(stuff); - swaps (&stuff->length, n); - swaps (&stuff->minDelay, n); - swaps (&stuff->maxDelay, n); - } - ResetCurrentRequest (client); - client->sequence--; - return TRUE; -} - - -/* - * Deliver events to a buffer - */ - -static int -DeliverEventsToMultibuffer (pMultibuffer, pEvents, count, filter) - MultibufferPtr pMultibuffer; - xEvent *pEvents; - int count; - Mask filter; -{ - int deliveries = 0, nondeliveries = 0; - int attempt; - OtherClients *other; - - /* if nobody wants the event, we're done */ - if (!((pMultibuffer->otherEventMask|pMultibuffer->eventMask) & filter)) - return 0; - - /* maybe send event to owner */ - if ((attempt = TryClientEvents( - bClient(pMultibuffer), pEvents, count, pMultibuffer->eventMask, filter, (GrabPtr) 0)) != 0) - { - if (attempt > 0) - deliveries++; - else - nondeliveries--; - } - - /* maybe send event to other clients */ - for (other = pMultibuffer->otherClients; other; other=other->next) - { - if ((attempt = TryClientEvents( - rClient(other), pEvents, count, other->mask, filter, (GrabPtr) 0)) != 0) - { - if (attempt > 0) - deliveries++; - else - nondeliveries--; - } - } - if (deliveries) - return deliveries; - return nondeliveries; -} - -/* - * Send Expose events to interested clients - */ - -void -MultibufferExpose (pMultibuffer, pRegion) - MultibufferPtr pMultibuffer; - RegionPtr pRegion; -{ - if (pRegion && !RegionNil(pRegion)) - { - xEvent *pEvent; - PixmapPtr pPixmap; - register xEvent *pe; - register BoxPtr pBox; - register int i; - int numRects; - - pPixmap = pMultibuffer->pPixmap; - RegionTranslate(pRegion, - -pPixmap->drawable.x, -pPixmap->drawable.y); - /* XXX MultibufferExpose "knows" the region representation */ - numRects = RegionNumRects(pRegion); - pBox = RegionRects(pRegion); - - pEvent = (xEvent *) ALLOCATE_LOCAL(numRects * sizeof(xEvent)); - if (pEvent) { - pe = pEvent; - - for (i=1; i<=numRects; i++, pe++, pBox++) - { - pe->u.u.type = Expose; - pe->u.expose.window = pPixmap->drawable.id; - pe->u.expose.x = pBox->x1; - pe->u.expose.y = pBox->y1; - pe->u.expose.width = pBox->x2 - pBox->x1; - pe->u.expose.height = pBox->y2 - pBox->y1; - pe->u.expose.count = (numRects - i); - } - (void) DeliverEventsToMultibuffer (pMultibuffer, pEvent, numRects, - ExposureMask); - DEALLOCATE_LOCAL(pEvent); - } - } -} - -/* send UpdateNotify event */ -void -MultibufferUpdate (pMultibuffer, time2) - MultibufferPtr pMultibuffer; - CARD32 time2; -{ - xMbufUpdateNotifyEvent event; - - event.type = MultibufferEventBase + MultibufferUpdateNotify; - event.buffer = pMultibuffer->pPixmap->drawable.id; - event.timeStamp = time2; - (void) DeliverEventsToMultibuffer (pMultibuffer, (xEvent *)&event, - 1, (Mask)MultibufferUpdateNotifyMask); -} - -/* - * The sample implementation will never generate MultibufferClobberNotify - * events - */ - -void -MultibufferClobber (pMultibuffer) - MultibufferPtr pMultibuffer; -{ - xMbufClobberNotifyEvent event; - - event.type = MultibufferEventBase + MultibufferClobberNotify; - event.buffer = pMultibuffer->pPixmap->drawable.id; - event.state = pMultibuffer->clobber; - (void) DeliverEventsToMultibuffer (pMultibuffer, (xEvent *)&event, - 1, (Mask)MultibufferClobberNotifyMask); -} - -/* - * make the resource id for buffer i refer to the window - * drawable instead of the pixmap; - */ - -static void -AliasMultibuffer (pMultibuffers, i) - MultibuffersPtr pMultibuffers; - int i; -{ - MultibufferPtr pMultibuffer; - - if (i == pMultibuffers->displayedMultibuffer) - return; - /* - * remove the old association - */ - if (pMultibuffers->displayedMultibuffer >= 0) - { - pMultibuffer = &pMultibuffers->buffers[pMultibuffers->displayedMultibuffer]; - ChangeResourceValue (pMultibuffer->pPixmap->drawable.id, - MultibufferDrawableResType, - (void *) pMultibuffer->pPixmap); - } - /* - * make the new association - */ - pMultibuffer = &pMultibuffers->buffers[i]; - ChangeResourceValue (pMultibuffer->pPixmap->drawable.id, - MultibufferDrawableResType, - (void *) pMultibuffers->pWindow); - pMultibuffers->displayedMultibuffer = i; -} - -/* - * free everything associated with multibuffering for this - * window - */ - -void -DestroyImageBuffers (pWin) - WindowPtr pWin; -{ - FreeResourceByType (pWin->drawable.id, MultibuffersResType, FALSE); - /* Zero out the window's pointer to the buffers so they won't be reused */ - pWin->devPrivates[MultibufferWindowIndex].ptr = NULL; -} - -/* - * resize the buffers when the window is resized - */ - -static Bool -MultibufferPositionWindow (pWin, x, y) - WindowPtr pWin; - int x, y; -{ - ScreenPtr pScreen; - MultibufferScreenPtr pMultibufferScreen; - MultibuffersPtr pMultibuffers; - MultibufferPtr pMultibuffer; - int width, height; - int i; - int dx, dy, dw, dh; - int sourcex, sourcey; - int destx, desty; - PixmapPtr pPixmap; - GCPtr pGC; - int savewidth, saveheight; - xRectangle clearRect; - Bool clear; - - pScreen = pWin->drawable.pScreen; - pMultibufferScreen = (MultibufferScreenPtr) pScreen->devPrivates[MultibufferScreenIndex].ptr; - (*pMultibufferScreen->PositionWindow) (pWin, x, y); - - /* if this window is not multibuffered, we're done */ - if (!(pMultibuffers = (MultibuffersPtr) pWin->devPrivates[MultibufferWindowIndex].ptr)) - return TRUE; - - /* if new size is same as old, we're done */ - if (pMultibuffers->width == pWin->drawable.width && - pMultibuffers->height == pWin->drawable.height) - return TRUE; - - width = pWin->drawable.width; - height = pWin->drawable.height; - dx = pWin->drawable.x - pMultibuffers->x; - dy = pWin->drawable.x - pMultibuffers->y; - dw = width - pMultibuffers->width; - dh = height - pMultibuffers->height; - GravityTranslate (0, 0, -dx, -dy, dw, dh, - pWin->bitGravity, &destx, &desty); - - /* if the window grew, remember to paint the window background, - * and maybe send expose events, for the new areas of the buffers - */ - clear = pMultibuffers->width < width || pMultibuffers->height < height || - pWin->bitGravity == ForgetGravity; - - sourcex = 0; - sourcey = 0; - savewidth = pMultibuffers->width; - saveheight = pMultibuffers->height; - /* clip rectangle to source and destination */ - if (destx < 0) - { - savewidth += destx; - sourcex -= destx; - destx = 0; - } - if (destx + savewidth > width) - savewidth = width - destx; - if (desty < 0) - { - saveheight += desty; - sourcey -= desty; - desty = 0; - } - if (desty + saveheight > height) - saveheight = height - desty; - - pMultibuffers->width = width; - pMultibuffers->height = height; - pMultibuffers->x = pWin->drawable.x; - pMultibuffers->y = pWin->drawable.y; - - pGC = GetScratchGC (pWin->drawable.depth, pScreen); - if (clear) - { - SetupBackgroundPainter (pWin, pGC); - clearRect.x = 0; - clearRect.y = 0; - clearRect.width = width; - clearRect.height = height; - } - for (i = 0; i < pMultibuffers->numMultibuffer; i++) - { - pMultibuffer = &pMultibuffers->buffers[i]; - pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, - pWin->drawable.depth); - if (!pPixmap) - { - DestroyImageBuffers (pWin); - break; - } - ValidateGC ((DrawablePtr)pPixmap, pGC); - /* - * I suppose this could avoid quite a bit of work if - * it computed the minimal area required. - */ - if (clear) - (*pGC->ops->PolyFillRect) ((DrawablePtr)pPixmap, pGC, 1, &clearRect); - if (pWin->bitGravity != ForgetGravity) - { - (*pGC->ops->CopyArea) ((DrawablePtr)pMultibuffer->pPixmap, - (DrawablePtr)pPixmap, pGC, - sourcex, sourcey, savewidth, saveheight, - destx, desty); - } - pPixmap->drawable.id = pMultibuffer->pPixmap->drawable.id; - (*pScreen->DestroyPixmap) (pMultibuffer->pPixmap); - pMultibuffer->pPixmap = pPixmap; - if (i != pMultibuffers->displayedMultibuffer) - { - ChangeResourceValue (pPixmap->drawable.id, - MultibufferDrawableResType, - (void *) pPixmap); - } - } - FreeScratchGC (pGC); - return TRUE; -} - -/* Resource delete func for MultibufferDrawableResType */ -/*ARGSUSED*/ -static int -MultibufferDrawableDelete (value, id) - void *value; - XID id; -{ - DrawablePtr pDrawable = (DrawablePtr)value; - WindowPtr pWin; - MultibuffersPtr pMultibuffers; - PixmapPtr pPixmap; - - if (pDrawable->type == DRAWABLE_WINDOW) - { - pWin = (WindowPtr) pDrawable; - pMultibuffers = (MultibuffersPtr) pWin->devPrivates[MultibufferWindowIndex].ptr; - pPixmap = pMultibuffers->buffers[pMultibuffers->displayedMultibuffer].pPixmap; - } - else - { - pPixmap = (PixmapPtr) pDrawable; - } - (*pPixmap->drawable.pScreen->DestroyPixmap) (pPixmap); - return Success; -} - -/* Resource delete func for MultibufferResType */ -/*ARGSUSED*/ -static int -MultibufferDelete (value, id) - void *value; - XID id; -{ - MultibufferPtr pMultibuffer = (MultibufferPtr)value; - MultibuffersPtr pMultibuffers; - - pMultibuffers = pMultibuffer->pMultibuffers; - if (--pMultibuffers->refcnt == 0) - { - FreeResourceByType (pMultibuffers->pWindow->drawable.id, - MultibuffersResType, TRUE); - xfree (pMultibuffers); - } - return Success; -} - -/* Resource delete func for MultibuffersResType */ -/*ARGSUSED*/ -static int -MultibuffersDelete (value, id) - void *value; - XID id; -{ - MultibuffersPtr pMultibuffers = (MultibuffersPtr)value; - int i; - - if (pMultibuffers->refcnt == pMultibuffers->numMultibuffer) - { - for (i = pMultibuffers->numMultibuffer; --i >= 0; ) - FreeResource (pMultibuffers->buffers[i].pPixmap->drawable.id, 0); - } - return Success; -} - -/* Resource delete func for OtherClientResType */ -static int -OtherClientDelete (value, id) - void *value; - XID id; -{ - MultibufferPtr pMultibuffer = (MultibufferPtr)value; - register OtherClientsPtr other, prev; - - prev = 0; - for (other = pMultibuffer->otherClients; other; other = other->next) - { - if (other->resource == id) - { - if (prev) - prev->next = other->next; - else - pMultibuffer->otherClients = other->next; - xfree (other); - RecalculateMultibufferOtherEvents (pMultibuffer); - break; - } - prev = other; - } - return Success; -} - -static int -EventSelectForMultibuffer (pMultibuffer, client, mask) - MultibufferPtr pMultibuffer; - ClientPtr client; - Mask mask; -{ - OtherClientsPtr other; - - if (mask & ~ValidEventMasks) - { - client->errorValue = mask; - return BadValue; - } - if (bClient (pMultibuffer) == client) - { - pMultibuffer->eventMask = mask; - } - else /* some other client besides the creator wants events */ - { - for (other = pMultibuffer->otherClients; other; other = other->next) - { - if (SameClient (other, client)) - { - if (mask == 0) - { - FreeResource (other->resource, RT_NONE); - break; - } - other->mask = mask; - break; - } - } - if (!other) - { /* new client that never selected events on this buffer before */ - other = (OtherClients *) xalloc (sizeof (OtherClients)); - if (!other) - return BadAlloc; - other->mask = mask; - other->resource = FakeClientID (client->index); - if (!AddResource (other->resource, OtherClientResType, (void *) pMultibuffer)) - { - xfree (other); - return BadAlloc; - } - other->next = pMultibuffer->otherClients; - pMultibuffer->otherClients = other; - } - RecalculateMultibufferOtherEvents (pMultibuffer); - } - return (client->noClientException); -} - -/* or together all the otherClients event masks */ -static void -RecalculateMultibufferOtherEvents (pMultibuffer) - MultibufferPtr pMultibuffer; -{ - Mask otherEventMask; - OtherClients *other; - - otherEventMask = 0L; - for (other = pMultibuffer->otherClients; other; other = other->next) - otherEventMask |= other->mask; - pMultibuffer->otherEventMask = otherEventMask; -} - -/* add milliseconds to a timestamp, handling overflow */ -static void -BumpTimeStamp (ts, inc) -TimeStamp *ts; -CARD32 inc; -{ - CARD32 newms; - - newms = ts->milliseconds + inc; - if (newms < ts->milliseconds) - ts->months++; - ts->milliseconds = newms; -} diff --git a/nx-X11/programs/Xserver/Xext/mbufbf.c b/nx-X11/programs/Xserver/Xext/mbufbf.c deleted file mode 100644 index 359fb63aa..000000000 --- a/nx-X11/programs/Xserver/Xext/mbufbf.c +++ /dev/null @@ -1,1030 +0,0 @@ -/* $XFree86: xc/programs/Xserver/Xext/mbufbf.c,v 3.5tsi Exp $ */ -/* - -Copyright 1989, 1998 The Open Group - -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. - -The above copyright notice and this permission notice 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 -OPEN GROUP 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. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ - -/* $Xorg: mbufbf.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */ - -#define NEED_REPLIES -#define NEED_EVENTS -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include -#include "misc.h" -#include "os.h" -#include "windowstr.h" -#include "scrnintstr.h" -#include "pixmapstr.h" -#include "extnsionst.h" -#include "dixstruct.h" -#include "resource.h" -#include "opaque.h" -#include "regionstr.h" -#include "gcstruct.h" -#include "inputstr.h" -#include "validate.h" -#include - -#define _MULTIBUF_SERVER_ /* don't want Xlib structures */ -#define _MULTIBUF_BUFFER_ -#include - -/* -Support for doublebuffer hardare - -This code is designed to support doublebuffer hardware where the -displayed buffer is selected on a per-pixel basis by an additional bit -plane, called the select plane. It could probably be easily modified -to work with systems that use window-id planes. - -This is done by creating a new drawable type, DRAWABLE_BUFFER. The -type has the same exact layout as a window drawable. Your code should -treat a DRAWABLE_BUFFER the same as it would tread a DRAWABLE_WINDOW -when handling the gc drawing functions. In addition, PaintWindowBackground, -CopyWindow, and all of the gc drawing functions to be able to draw into both -framebuffers. Which framebuffer to draw into is selected by the contents of - pWin->devPrivates[frameWindowPrivateIndex]. -The content of the devPrivate is either from frameBuffer[0] or -frameBuffer[1], depending on which buffer is being drawn into. When - pWin->devPrivates[frameWindowPrivateIndex] == frameBuffer[0], -the functions should draw into the front framebuffer. When - pWin->devPrivates[frameWindowPrivateIndex] == frameBuffer[1], -the functions should draw into the back framebuffer. - -In addition, you need to provide a function that allows you to copy -bits between the buffers (optional since CopyArea can be used) and a -function that draws into the select plane. Then, you need to register -your functions and other information, by calling: - -void -RegisterDoubleBufferHardware(pScreen, nInfo, pInfo, frameBuffer, selectPlane, - CopyBufferBitsFunc, DrawSelectPlaneFunc) - int nInfo; - xMbufBufferInfo *pInfo; - DevUnion *frameBuffer; - DevUnion selectPlane; - -"pInfo" is an array indicating which visuals and depths that double -buffering is supported on. "nInfo" is the length of the array. - -"frameBuffer" is array of length 2. The contents of the array element -is ddx-specific. The content of frameBuffer[0] should, when placed in -the window private, indicate that framebuffer 0 should be drawn into. -The contents of frameBuffer[1], when placed into the window private, -should indicate that framebuffer 1 should be drawn into. - -"selectPlane" is ddx-specific. It should contain information -neccessary for your displayProc to access the select plane. -It is passed to DrawSelectPlaneFunc. - -"CopyBufferBitsFunc" is a ddx-specific function that copies from one -buffer of a multibuffered window to another buffer. If the CopyBufferBitsFunc -is NULL, a default function will be used that calls pScreen->CopyArea. - - void CopyBufferBitsFunc(pMBWindow, srcBufferNum, dstBufferNum) - mbufWindowPtr pMBWindow; - int srcBufferNum, dstBufferNum; - -"DrawSelectPlaneFunc" is a ddx-specific function that fills the -regions "prgn" of select plane with the value "bufferNum". If -selectPlane is a DrawablePtr (such as a PixmapPtr), you can pass -NULL for DrawSelectPlaneFunc, a default function will be used that -calls FillRectangle on the selectPlane. - - void DrawSelectPlaneFunc(pScreen, selectPlane, prgn, bufferNum) - ScreenPtr pScreen; - DevUnion selectPlane; - RegionPtr prgn; - long bufferNum; - -... -... -... - -*/ - -#define MAX_BUFFERS 2 /* Only supports 2 buffers */ -#define FRONT_BUFFER 0 -#define BACK_BUFFER 1 - - -/* Buffer drawables have the same structure as window drawables */ -typedef WindowRec BufferRec; -typedef WindowPtr BufferPtr; - - -/* - * Call RegisterHdwrBuffer for every screen that has doublebuffer hardware. - */ - -static int bufNumInfo[MAXSCREENS]; -static xMbufBufferInfo *bufInfo[MAXSCREENS]; -static DevUnion *bufFrameBuffer[MAXSCREENS]; -static DevUnion bufselectPlane[MAXSCREENS]; -static void (* bufCopyBufferBitsFunc[MAXSCREENS])(); -static void (* bufDrawSelectPlaneFunc[MAXSCREENS])(); - -static Bool bufMultibufferInit(); - - -void -RegisterDoubleBufferHardware(pScreen, nInfo, pInfo, frameBuffer, selectPlane, - CopyBufferBitsFunc, DrawSelectPlaneFunc) - ScreenPtr pScreen; - int nInfo; - xMbufBufferInfo *pInfo; - DevUnion *frameBuffer; - DevUnion selectPlane; - void (* CopyBufferBitsFunc)(); - void (* DrawSelectPlaneFunc)(); -{ - bufNumInfo[pScreen->myNum] = nInfo; - bufInfo[pScreen->myNum] = pInfo; - bufFrameBuffer[pScreen->myNum] = frameBuffer; - bufselectPlane[pScreen->myNum] = selectPlane; - - bufCopyBufferBitsFunc[pScreen->myNum] = CopyBufferBitsFunc; - bufDrawSelectPlaneFunc[pScreen->myNum] = DrawSelectPlaneFunc; - - /* Register ourselves with device-independent multibuffers code */ - RegisterMultibufferInit(pScreen, bufMultibufferInit); -} - - -/* - * Called by Multibuffer extension initialization. - * Initializes mbufScreenRec and its devPrivate. - */ - -static Bool NoopDDA_True() { return TRUE; } -static Bool bufPositionWindow(); -static int bufCreateImageBuffers(); -static void bufDestroyImageBuffers(); -static void bufDisplayImageBuffers(); -static void bufClearImageBufferArea(); -static void bufDestroyBuffer(); -static void bufCopyBufferBits(); -static void bufDrawSelectPlane(); -static void bufWrapScreenFuncs(); -static void bufResetProc(); - -static void bufPostValidateTree(); -static void bufClipNotify(); -static void bufWindowExposures(); -static Bool bufChangeWindowAttributes(); -static void bufClearToBackground(); -static void bufCopyWindow(); - -extern WindowPtr *WindowTable; - -static Bool -bufMultibufferInit(pScreen, pMBScreen) - ScreenPtr pScreen; - mbufScreenPtr pMBScreen; -{ - mbufBufferPrivPtr pMBPriv; - BoxRec box; - - /* Multibuffer info */ - pMBScreen->nInfo = bufNumInfo[pScreen->myNum]; - pMBScreen->pInfo = bufInfo[pScreen->myNum]; - - /* Hooks */ - pMBScreen->CreateImageBuffers = bufCreateImageBuffers; - pMBScreen->DestroyImageBuffers = bufDestroyImageBuffers; - pMBScreen->DisplayImageBuffers = bufDisplayImageBuffers; - pMBScreen->ClearImageBufferArea = bufClearImageBufferArea; - pMBScreen->ChangeMBufferAttributes = NoopDDA_True; - pMBScreen->ChangeBufferAttributes = NoopDDA_True; - pMBScreen->DeleteBufferDrawable = bufDestroyBuffer; - pMBScreen->WrapScreenFuncs = bufWrapScreenFuncs; - pMBScreen->ResetProc = bufResetProc; - /* Create devPrivate part */ - pMBPriv = (mbufBufferPrivPtr) xalloc(sizeof *pMBPriv); - if (!pMBPriv) - return (FALSE); - - pMBScreen->devPrivate.ptr = (void *) pMBPriv; - pMBPriv->frameBuffer = bufFrameBuffer[pScreen->myNum]; - pMBPriv->selectPlane = bufselectPlane[pScreen->myNum]; - - /* - * Initializing the subtractRgn to the screen area will ensure that - * the selectPlane will get cleared on the first PostValidateTree. - */ - - box.x1 = 0; - box.y1 = 0; - box.x2 = pScreen->width; - box.y2 = pScreen->height; - - pMBPriv->rgnChanged = TRUE; - RegionInit(&pMBPriv->backBuffer, &box, 1); - RegionInit(&pMBPriv->subtractRgn, &box, 1); - RegionNull(&pMBPriv->unionRgn); - - /* Misc functions */ - pMBPriv->CopyBufferBits = bufCopyBufferBitsFunc[pScreen->myNum]; - pMBPriv->DrawSelectPlane = bufDrawSelectPlaneFunc[pScreen->myNum]; - - if (!pMBPriv->CopyBufferBits) - pMBPriv->CopyBufferBits = bufCopyBufferBits; - - if (!pMBPriv->DrawSelectPlane) - pMBPriv->DrawSelectPlane = bufDrawSelectPlane; - - /* screen functions */ - pMBPriv->funcsWrapped = 0; - pMBPriv->inClearToBackground = FALSE; - pMBPriv->WindowExposures = NULL; - pMBPriv->CopyWindow = NULL; - pMBPriv->ClearToBackground = NULL; - pMBPriv->ClipNotify = NULL; - pMBPriv->ChangeWindowAttributes = NULL; - - /* Start out wrapped to clear select plane */ - WRAP_SCREEN_FUNC(pScreen,pMBPriv,PostValidateTree, bufPostValidateTree); - return TRUE; -} - -static void -UpdateBufferFromWindow(pBuffer, pWin) - BufferPtr pBuffer; - WindowPtr pWin; -{ - pBuffer->drawable.x = pWin->drawable.x; - pBuffer->drawable.y = pWin->drawable.y; - pBuffer->drawable.width = pWin->drawable.width; - pBuffer->drawable.height = pWin->drawable.height; - - pBuffer->drawable.serialNumber = NEXT_SERIAL_NUMBER; - - /* Update for PaintWindowBackground */ - pBuffer->parent = pWin->parent; - - /* - * Make the borderClip the same as the clipList so - * NotClippedByChildren comes out with just clipList. - */ - - pBuffer->clipList = pWin->clipList; - pBuffer->borderClip = pWin->clipList; - pBuffer->winSize = pWin->winSize; - pBuffer->borderSize = pWin->borderSize; - - pBuffer->origin = pWin->origin; -} - -static BufferPtr -bufCreateBuffer(pScreen, pWin, bufferNum) - ScreenPtr pScreen; - WindowPtr pWin; - int bufferNum; -{ - mbufBufferPrivPtr pMBPriv; - DevUnion *devPrivates; - BufferPtr pBuffer; - int i; - - pMBPriv = MB_SCREEN_PRIV_BUFFER(pScreen); - - pBuffer = AllocateWindow(pWin->drawable.pScreen); - if (!pBuffer) - return (NULL); - - /* XXX- Until we know what is needed, copy everything. */ - devPrivates = pBuffer->devPrivates; - *pBuffer = *pWin; - pBuffer->devPrivates = devPrivates; - - pBuffer->drawable.type = DRAWABLE_BUFFER; - pBuffer->drawable.serialNumber = NEXT_SERIAL_NUMBER; - - pBuffer->nextSib = NULL; - pBuffer->prevSib = NULL; - pBuffer->firstChild = NULL; - pBuffer->lastChild = NULL; - - /* XXX - Worry about backingstore later */ - pBuffer->backStorage = NULL; - pBuffer->backingStore = NotUseful; - - /* XXX - Need to call pScreen->CreateWindow for tile/stipples - * or should I just copy the devPrivates? - */ - - for (i=0; i < pScreen->WindowPrivateLen; i++) - pBuffer->devPrivates[i] = pWin->devPrivates[i]; - - pBuffer->devPrivates[frameWindowPrivateIndex] = - pMBPriv->frameBuffer[bufferNum]; - - return pBuffer; -} - -static void -bufDestroyBuffer(pDrawable) - DrawablePtr pDrawable; -{ - xfree(pDrawable); -} - -/*ARGSUSED*/ -static int -bufCreateImageBuffers (pWin, nbuf, ids, action, hint) - WindowPtr pWin; - int nbuf; - XID *ids; - int action; - int hint; -{ - ScreenPtr pScreen; - mbufScreenPtr pMBScreen; - mbufWindowPtr pMBWindow; - mbufBufferPtr pMBBuffer; - int i; - - pScreen = pWin->drawable.pScreen; - pMBScreen = MB_SCREEN_PRIV(pScreen); - pMBWindow = MB_WINDOW_PRIV(pWin); - - pMBWindow->devPrivate.ptr = (void *) RegionCreate(0,0); - if (!pMBWindow->devPrivate.ptr) - return(0); - RegionCopy((RegionPtr) pMBWindow->devPrivate.ptr, - &pWin->clipList); - - for (i = 0; i < nbuf; i++) - { - pMBBuffer = pMBWindow->buffers + i; - pMBBuffer->pDrawable = (DrawablePtr) bufCreateBuffer(pScreen,pWin,i); - - if (!pMBBuffer->pDrawable) - break; - - if (!AddResource (ids[i], MultibufferDrawableResType, - (void *) pMBBuffer->pDrawable)) - { - bufDestroyBuffer((BufferPtr) pMBBuffer->pDrawable); - break; - } - pMBBuffer->pDrawable->id = ids[i]; - - /* - * If window is already mapped, generate exposures and - * clear the area of the newly buffers. - */ - - if ((pWin->realized) && (i != pMBWindow->displayedMultibuffer)) - (* pMBScreen->ClearImageBufferArea)(pMBBuffer, 0,0, 0,0, TRUE); - } - - return i; -} - -static void -bufDestroyImageBuffers(pWin) - WindowPtr pWin; -{ - ScreenPtr pScreen; - mbufWindowPtr pMBWindow; - - pScreen = pWin->drawable.pScreen; - - if (pMBWindow = MB_WINDOW_PRIV(pWin)) - { - mbufBufferPrivPtr pMBPriv = MB_SCREEN_PRIV_BUFFER(pScreen); - - /* - * if the backbuffer is currently being displayed, move the bits - * to the frontbuffer and display it instead. - */ - - if (pWin->realized && (pMBWindow->displayedMultibuffer == BACK_BUFFER)) - { - (* pMBPriv->CopyBufferBits)(pMBWindow, BACK_BUFFER, FRONT_BUFFER); - RegionSubtract(&pMBPriv->backBuffer, - &pMBPriv->backBuffer, &pWin->clipList); - (* pMBPriv->DrawSelectPlane)(pScreen, pMBPriv->selectPlane, - &pWin->clipList, FRONT_BUFFER); - } - - /* Switch window rendering to front buffer */ - pWin->devPrivates[frameWindowPrivateIndex] = - pMBPriv->frameBuffer[FRONT_BUFFER]; - - RegionDestroy((RegionPtr) pMBWindow->devPrivate.ptr); - pMBWindow->devPrivate.ptr = NULL; - } -} - -/* - * Can be replaced by pScreen->ClearToBackground if pBuffer->eventMask - * and wOtherEventsMasks(pBuffer) were setup. - */ - -static void -bufClearImageBufferArea(pMBBuffer, x,y, w,h, generateExposures) - mbufBufferPtr pMBBuffer; - short x,y; - unsigned short w,h; - Bool generateExposures; -{ - BoxRec box; - RegionRec reg; - RegionPtr pBSReg = NullRegion; - ScreenPtr pScreen; - BoxPtr extents; - int x1, y1, x2, y2; - BufferPtr pBuffer; - - pBuffer = (BufferPtr) pMBBuffer->pDrawable; - /* compute everything using ints to avoid overflow */ - - x1 = pBuffer->drawable.x + x; - y1 = pBuffer->drawable.y + y; - if (w) - x2 = x1 + (int) w; - else - x2 = x1 + (int) pBuffer->drawable.width - (int) x; - if (h) - y2 = y1 + h; - else - y2 = y1 + (int) pBuffer->drawable.height - (int) y; - - extents = &pBuffer->clipList.extents; - - /* clip the resulting rectangle to the window clipList extents. This - * makes sure that the result will fit in a box, given that the - * screen is < 32768 on a side. - */ - - if (x1 < extents->x1) - x1 = extents->x1; - if (x2 > extents->x2) - x2 = extents->x2; - if (y1 < extents->y1) - y1 = extents->y1; - if (y2 > extents->y2) - y2 = extents->y2; - - if (x2 <= x1 || y2 <= y1) - { - x2 = x1 = 0; - y2 = y1 = 0; - } - - box.x1 = x1; - box.x2 = x2; - box.y1 = y1; - box.y2 = y2; - - pScreen = pBuffer->drawable.pScreen; - RegionInit(®, &box, 1); - if (pBuffer->backStorage) - { - /* - * If the window has backing-store on, call through the - * ClearToBackground vector to handle the special semantics - * (i.e. things backing store is to be cleared out and - * an Expose event is to be generated for those areas in backing - * store if generateExposures is TRUE). - */ - pBSReg = (* pScreen->ClearBackingStore)(pBuffer, x, y, w, h, - generateExposures); - } - - RegionIntersect(®, ®, &pBuffer->clipList); - if (pBuffer->backgroundState != None) - (*pScreen->PaintWindowBackground)(pBuffer, ®, PW_BACKGROUND); - if (generateExposures) - MultibufferExpose(pMBBuffer, ®); -#ifdef _notdef - /* XXBS - This is the original miClearToBackground code. - * WindowExposures needs to be called (or the functionality emulated) - * in order for backingStore to work, but first, pBuffer->eventMask - * and wOtherEventsMasks(pBuffer) need to be setup correctly. - */ - - if (generateExposures) - (*pScreen->WindowExposures)(pBuffer, ®, pBSReg); - else if (pBuffer->backgroundState != None) - (*pScreen->PaintWindowBackground)(pBuffer, ®, PW_BACKGROUND); -#endif - RegionUninit(®); - if (pBSReg) - RegionDestroy(pBSReg); -} - -static void -bufWrapScreenFuncs(pScreen) - ScreenPtr pScreen; -{ - mbufBufferPrivPtr pMBPriv = MB_SCREEN_PRIV_BUFFER(pScreen); - - WRAP_SCREEN_FUNC(pScreen,pMBPriv,PostValidateTree, bufPostValidateTree); - WRAP_SCREEN_FUNC(pScreen,pMBPriv,ClipNotify, bufClipNotify); - WRAP_SCREEN_FUNC(pScreen,pMBPriv,WindowExposures,bufWindowExposures); - WRAP_SCREEN_FUNC(pScreen,pMBPriv,ChangeWindowAttributes, bufChangeWindowAttributes); - WRAP_SCREEN_FUNC(pScreen,pMBPriv,ClearToBackground,bufClearToBackground); - WRAP_SCREEN_FUNC(pScreen,pMBPriv,CopyWindow,bufCopyWindow); -} - -static void -bufResetProc(pScreen) - ScreenPtr pScreen; -{ - mbufBufferPrivPtr pMBPriv = MB_SCREEN_PRIV_BUFFER(pScreen); - - /* - * frameBuffer, selectPlane, and pInfo should be freed by - * whoever called RegisterDoubleBufferHardware - */ - - RegionUninit(&pMBPriv->backBuffer); - RegionUninit(&pMBPriv->subtractRgn); - RegionUninit(&pMBPriv->unionRgn); - xfree(pMBPriv); -} - -/*---------------------------------------------------------------------------*/ - -/* - * Used if CopyBufferBitsFunc is not provided when registering. - * This should work for everybody since CopyArea needs to support - * copying between buffers anyway. - */ - -static void -bufCopyBufferBits(pMBWindow, srcBufferNum, dstBufferNum) - mbufWindowPtr pMBWindow; - int srcBufferNum, dstBufferNum; -{ - DrawablePtr pSrcBuffer, pDstBuffer; - GCPtr pGC; - - pSrcBuffer = pMBWindow->buffers[srcBufferNum].pDrawable; - pDstBuffer = pMBWindow->buffers[dstBufferNum].pDrawable; - - pGC = GetScratchGC (pDstBuffer->depth, pDstBuffer->pScreen); - if (!pGC) - return; - - ValidateGC (pDstBuffer, pGC); - (* pGC->ops->CopyArea) (pSrcBuffer, pDstBuffer, pGC, - 0,0, pDstBuffer->width, pDstBuffer->height, 0,0); - FreeScratchGC (pGC); -} - -/* - * Used if DrawSelectPlanFunc is not provided for when registering. - * However, it only works if selectPlane.ptr is a drawable. Also - * assumes that painting with color 0 selects the front buffer, - * while color 1 selects the back buffer. - */ - -static void -bufDrawSelectPlane(pScreen, selectPlane, prgn, bufferNum) - ScreenPtr pScreen; - DevUnion selectPlane; - RegionPtr prgn; - long bufferNum; -{ - DrawablePtr pDrawable; - GCPtr pGC; - register int i; - register BoxPtr pbox; - register xRectangle *prect; - int numRects; - XID value; - - if (RegionNumRects(prgn) == 0) - return; - - pDrawable = (DrawablePtr) selectPlane.ptr; - pGC = GetScratchGC (pDrawable->depth, pScreen); - if (!pGC) - return; - - prect = (xRectangle *)ALLOCATE_LOCAL(RegionNumRects(prgn) * - sizeof(xRectangle)); - if (!prect) - { - FreeScratchGC(pGC); - return; - } - - value = (XID) bufferNum; - DoChangeGC(pGC, GCForeground, &value, 0); - ValidateGC(pDrawable, pGC); - - numRects = RegionNumRects(prgn); - pbox = RegionRects(prgn); - for (i= numRects; --i >= 0; pbox++, prect++) - { - prect->x = pbox->x1; - prect->y = pbox->y1; - prect->width = pbox->x2 - pbox->x1; - prect->height = pbox->y2 - pbox->y1; - } - prect -= numRects; - (* pGC->ops->PolyFillRect)(pDrawable, pGC, numRects, prect); - - DEALLOCATE_LOCAL(prect); - FreeScratchGC (pGC); -} - - -static void -bufDisplayImageBuffers(pScreen, ppMBWindow, ppMBBuffer, nbuf) - ScreenPtr pScreen; - mbufBufferPtr *ppMBBuffer; - mbufWindowPtr *ppMBWindow; - int nbuf; -{ - WindowPtr pWin; - BufferPtr pPrevBuffer, pNewBuffer; - int i, number; - mbufBufferPrivPtr pMBPriv; - mbufBufferPtr pPrevMBBuffer; - - pMBPriv = MB_SCREEN_PRIV_BUFFER(pScreen); - - for (i = 0; i < nbuf; i++) - { - number = ppMBBuffer[i]->number; /* 0=frontbuffer, 1=backbuffer */ - pWin = ppMBWindow[i]->pWindow; - pPrevMBBuffer = MB_DISPLAYED_BUFFER(ppMBWindow[i]); - - pPrevBuffer = (BufferPtr) pPrevMBBuffer->pDrawable; - pNewBuffer = (BufferPtr) ppMBBuffer[i]->pDrawable; - - if (pPrevBuffer != pNewBuffer) - { - RegionPtr backBuffer = &pMBPriv->backBuffer; - - /* - * Update the select plane and the backBuffer region. - */ - - (* pMBPriv->DrawSelectPlane)(pScreen, pMBPriv->selectPlane, - &pWin->clipList, number); - - if (number == BACK_BUFFER) - RegionUnion(backBuffer, backBuffer, - &pWin->clipList); - else - RegionSubtract(backBuffer, backBuffer, - &pWin->clipList); - - /* Switch which framebuffer the window draws into */ - pWin->devPrivates[frameWindowPrivateIndex] = - pMBPriv->frameBuffer[number]; - } - - switch (ppMBWindow[i]->updateAction) - { - case MultibufferUpdateActionUndefined: - break; - case MultibufferUpdateActionBackground: - (* MB_SCREEN_PRIV(pScreen)->ClearImageBufferArea) - (pPrevMBBuffer, 0,0, 0,0, FALSE); - break; - case MultibufferUpdateActionUntouched: - break; - case MultibufferUpdateActionCopied: - if (pPrevBuffer != pNewBuffer) - { - (* pMBPriv->CopyBufferBits) (ppMBWindow[i], - ppMBBuffer[i]->number, pPrevMBBuffer->number); - } - break; - } - } -} - -/* Updates the backBuffer region and paints the selectPlane. */ - -static void -bufPostValidateTree(pParent, pChild, kind) - WindowPtr pParent, pChild; - VTKind kind; -{ - ScreenPtr pScreen; - mbufBufferPrivPtr pMBPriv; - - if (pParent) - pScreen = pParent->drawable.pScreen; - else if (pChild) - pScreen = pChild->drawable.pScreen; - else - return; /* Hopeless */ - - pMBPriv = MB_SCREEN_PRIV_BUFFER(pScreen); - - UNWRAP_SCREEN_FUNC(pScreen, pMBPriv, void, PostValidateTree); - if (pScreen->PostValidateTree) - (* pScreen->PostValidateTree)(pParent, pChild, kind); - REWRAP_SCREEN_FUNC(pScreen, pMBPriv, void, PostValidateTree); - - /* Does backBuffer need to change? */ - if (pMBPriv->rgnChanged) - { - RegionRec exposed; - RegionPtr pSubtractRgn, pUnionRgn; - Bool overlap; - - pMBPriv->rgnChanged = FALSE; - - pSubtractRgn = &pMBPriv->subtractRgn; - pUnionRgn = &pMBPriv->unionRgn; - RegionValidate(pSubtractRgn, &overlap); -#ifdef DEBUG - if (overlap) - FatalError("bufPostValidateTree: subtractRgn overlaps"); -#endif - RegionValidate(pUnionRgn, &overlap); -#ifdef DEBUG - if (overlap) - FatalError("bufPostValidateTree: unionRgn overlaps"); -#endif - - /* Update backBuffer: subtract must come before union */ - RegionSubtract(&pMBPriv->backBuffer, &pMBPriv->backBuffer, - pSubtractRgn); - RegionUnion(&pMBPriv->backBuffer, &pMBPriv->backBuffer, - pUnionRgn); - - /* Paint gained and lost backbuffer areas in select plane */ - RegionNull(&exposed); - RegionSubtract(&exposed, pSubtractRgn, pUnionRgn); - (* pMBPriv->DrawSelectPlane)(pScreen, pMBPriv->selectPlane, - &exposed, FRONT_BUFFER); - - RegionSubtract(&exposed, pUnionRgn, pSubtractRgn); - (* pMBPriv->DrawSelectPlane)(pScreen, pMBPriv->selectPlane, - &exposed, BACK_BUFFER); - - RegionUninit(&exposed); - RegionEmpty(pSubtractRgn); - RegionEmpty(pUnionRgn); - } -} - -/* - * If the window is multibuffered and displaying the backbuffer, - * add the old clipList to the subtractRgn and add the new clipList - * to the unionRgn. PostValidateTree will use subtractRgn and unionRgn - * to update the backBuffer region and the selectPlane. - * - * Copy changes to the window structure into the buffers. - * Send ClobberNotify events. - */ - -static void -bufClipNotify(pWin, dx,dy) - WindowPtr pWin; - int dx,dy; -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - mbufBufferPrivPtr pMBPriv = MB_SCREEN_PRIV_BUFFER(pScreen); - mbufWindowPtr pMBWindow; - int i; - - UNWRAP_SCREEN_FUNC(pScreen, pMBPriv, void, ClipNotify); - if (pScreen->ClipNotify) - (* pScreen->ClipNotify)(pWin, dx,dy); - REWRAP_SCREEN_FUNC(pScreen, pMBPriv, void, ClipNotify); - - if (pMBWindow = MB_WINDOW_PRIV(pWin)) - { - RegionPtr pOldClipList = (RegionPtr) pMBWindow->devPrivate.ptr; - - if (! RegionEqual(pOldClipList, &pWin->clipList)) - { - if (pMBWindow->displayedMultibuffer == BACK_BUFFER) - { - pMBPriv->rgnChanged = TRUE; - RegionAppend(&pMBPriv->subtractRgn, pOldClipList); - RegionAppend(&pMBPriv->unionRgn, &pWin->clipList); - } - - RegionCopy(pOldClipList,&pWin->clipList); - } - - /* Update buffer x,y,w,h, and clipList */ - for (i=0; inumMultibuffer; i++) - { - mbufBufferPtr pMBBuffer = pMBWindow->buffers + i; - if (pMBBuffer->clobber != pWin->visibility) - { - pMBBuffer->clobber = pWin->visibility; - MultibufferClobber(pMBBuffer); - } - UpdateBufferFromWindow(pMBBuffer->pDrawable, pWin); - } - } -} - -/* - * Updates buffer's background fields when the window's changes. - * This is necessary because pScreen->PaintWindowBackground - * is used to paint the buffer. - * - * XXBS - Backingstore state will have be tracked too if it is supported. - */ - -static Bool -bufChangeWindowAttributes(pWin, mask) - WindowPtr pWin; - unsigned long mask; -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - mbufBufferPrivPtr pMBPriv = MB_SCREEN_PRIV_BUFFER(pScreen); - mbufWindowPtr pMBWindow; - Bool ret; - - UNWRAP_SCREEN_FUNC(pScreen, pMBPriv, Bool, ChangeWindowAttributes); - ret = (* pScreen->ChangeWindowAttributes)(pWin, mask); - REWRAP_SCREEN_FUNC(pScreen, pMBPriv, Bool, ChangeWindowAttributes); - - if (pMBWindow = MB_WINDOW_PRIV(pWin)) - { - if (mask & (CWBackPixmap | CWBackPixel)) - { - BufferPtr pBuffer; - int i; - - for (i=0; idisplayedMultibuffer; i++) - { - pBuffer = (BufferPtr) pMBWindow->buffers[i].pDrawable; - pBuffer->backgroundState = pWin->backgroundState; - pBuffer->background = pWin->background; - } - } - } - return ret; -} - -/* - * Send exposures and clear the background for a buffer whenever - * its corresponding window is exposed, except when called by - * ClearToBackground. - */ - -static void -bufWindowExposures(pWin, prgn, other_exposed) - WindowPtr pWin; - register RegionPtr prgn, other_exposed; -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - mbufWindowPtr pMBWindow = MB_WINDOW_PRIV(pWin); - mbufBufferPrivPtr pMBPriv = MB_SCREEN_PRIV_BUFFER(pScreen); - RegionRec tmp_rgn; - int i; - Bool handleBuffers; - - handleBuffers = (!pMBPriv->inClearToBackground) && - (pWin->drawable.type == DRAWABLE_WINDOW) && - pMBWindow && (prgn && !RegionNil(prgn)); - - /* miWindowExposures munges prgn and other_exposed. */ - if (handleBuffers) - { - RegionNull(&tmp_rgn); - RegionCopy(&tmp_rgn, prgn); - } - - UNWRAP_SCREEN_FUNC(pScreen, pMBPriv, void, WindowExposures); - (* pScreen->WindowExposures) (pWin, prgn, other_exposed); - REWRAP_SCREEN_FUNC(pScreen, pMBPriv, void, WindowExposures); - - if (!handleBuffers) - return; - - /* - * Send expose events to all clients. Paint the exposed region for all - * buffers except the displayed buffer since it is handled when the - * window is painted. - * - * XXBS - Will have to be re-written to handle BackingStore on buffers. - */ - - for (i=0; inumMultibuffer; i++) - { - mbufBufferPtr pMBBuffer; - BufferPtr pBuffer; - - pMBBuffer = pMBWindow->buffers + i; - pBuffer = (BufferPtr) pMBBuffer->pDrawable; - - if (i != pMBWindow->displayedMultibuffer) - (* pScreen->PaintWindowBackground)(pBuffer,&tmp_rgn,PW_BACKGROUND); - if ((pMBBuffer->otherEventMask | pMBBuffer->eventMask) & ExposureMask) - MultibufferExpose(pMBBuffer, &tmp_rgn); - } - - RegionUninit(&tmp_rgn); -} - -/* - * Set ``inClearToBackground'' so that WindowExposures does not attempt - * to send expose events or clear the background on the buffers. - */ - -static void -bufClearToBackground(pWin, x,y,w,h, sendExpose) - WindowPtr pWin; - int x,y, w,h; - Bool sendExpose; -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - mbufBufferPrivPtr pMBPriv = MB_SCREEN_PRIV_BUFFER(pScreen); - - pMBPriv->inClearToBackground = TRUE; - - UNWRAP_SCREEN_FUNC(pScreen, pMBPriv, void, ClearToBackground); - (* pScreen->ClearToBackground)(pWin, x,y,w,h, sendExpose); - REWRAP_SCREEN_FUNC(pScreen, pMBPriv, void, ClearToBackground); - - pMBPriv->inClearToBackground = FALSE; -} - -/* - * Move bits in both buffers. It does this by calling pScreen->CopyWindow - * twice, once with the root window's devPrivate[frameWindowPrivateIndex] - * pointing to the frontbuffer pixmap and once with it pointed to the - * backbuffer pixmap. It does this if there are *any* existing multibuffered - * window... a possible optimization is to copy the backbuffer only if this - * window or its inferiors are multibuffered. May be faster, maybe not. - * - * XXX - Only works if your CopyWindow checks the root window's devPrivate - * to see which buffer to draw into. Works for cfbPaintWindow. - */ - -/*ARGSUSED*/ -static void -bufCopyWindow(pWin, ptOldOrg, prgnSrc) - WindowPtr pWin; - DDXPointRec ptOldOrg; - RegionPtr prgnSrc; -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - mbufBufferPrivPtr pMBPriv = MB_SCREEN_PRIV_BUFFER(pScreen); - WindowPtr pwinroot; - DevUnion save; - - UNWRAP_SCREEN_FUNC(pScreen, pMBPriv, void, CopyWindow); - - pwinroot = WindowTable[pScreen->myNum]; - save = pwinroot->devPrivates[frameWindowPrivateIndex]; - - /* - * Copy front buffer - */ - - pwinroot->devPrivates[frameWindowPrivateIndex] = - pMBPriv->frameBuffer[FRONT_BUFFER]; - (* pScreen->CopyWindow)(pWin, ptOldOrg, prgnSrc); - - /* - * Copy back buffer - */ - - /* CopyWindow translates prgnSrc... translate it back for 2nd call. */ - RegionTranslate(prgnSrc, - ptOldOrg.x - pWin->drawable.x, - ptOldOrg.y - pWin->drawable.y); - pwinroot->devPrivates[frameWindowPrivateIndex] = - pMBPriv->frameBuffer[BACK_BUFFER]; - (* pScreen->CopyWindow)(pWin, ptOldOrg, prgnSrc); - - pwinroot->devPrivates[frameWindowPrivateIndex] = save; - REWRAP_SCREEN_FUNC(pScreen, pMBPriv, void, CopyWindow); -} diff --git a/nx-X11/programs/Xserver/Xext/mbufpx.c b/nx-X11/programs/Xserver/Xext/mbufpx.c deleted file mode 100644 index 3d28d3ff3..000000000 --- a/nx-X11/programs/Xserver/Xext/mbufpx.c +++ /dev/null @@ -1,651 +0,0 @@ -/* $XFree86: xc/programs/Xserver/Xext/mbufpx.c,v 3.3 2001/07/23 13:15:44 dawes Exp $ */ -/************************************************************ - -Copyright 1989, 1998 The Open Group - -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. - -The above copyright notice and this permission notice 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 -OPEN GROUP 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. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -********************************************************/ - -/* $Xorg: mbufpx.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */ -#define NEED_REPLIES -#define NEED_EVENTS -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include -#include "misc.h" -#include "os.h" -#include "windowstr.h" -#include "scrnintstr.h" -#include "pixmapstr.h" -#include "extnsionst.h" -#include "dixstruct.h" -#include "resource.h" -#include "opaque.h" -#include "regionstr.h" -#include "gcstruct.h" -#include "inputstr.h" -#include - -#define _MULTIBUF_SERVER_ /* don't want Xlib structures */ -#define _MULTIBUF_PIXMAP_ -#include - - -static Bool NoopDDA_True() { return TRUE; } - -static Bool pixPositionWindow(); -static int pixCreateImageBuffers(); -static void pixDisplayImageBuffers(); -static void pixClearImageBufferArea(); -static void pixDeleteBufferDrawable(); -static void pixWrapScreenFuncs(); -static void pixResetProc(); - -Bool -pixMultibufferInit(pScreen, pMBScreen) - ScreenPtr pScreen; - mbufScreenPtr pMBScreen; -{ - int i, j, k; - xMbufBufferInfo *pInfo; - int nInfo; - DepthPtr pDepth; - mbufPixmapPrivPtr pMBPriv; - - pMBScreen->CreateImageBuffers = pixCreateImageBuffers; - pMBScreen->DestroyImageBuffers = (void (*)())NoopDDA; - pMBScreen->DisplayImageBuffers = pixDisplayImageBuffers; - pMBScreen->ClearImageBufferArea = pixClearImageBufferArea; - pMBScreen->ChangeMBufferAttributes = NoopDDA_True; - pMBScreen->ChangeBufferAttributes = NoopDDA_True; - pMBScreen->DeleteBufferDrawable = pixDeleteBufferDrawable; - pMBScreen->WrapScreenFuncs = pixWrapScreenFuncs; - pMBScreen->ResetProc = pixResetProc; - - /* Support every depth and visual combination that the screen does */ - - nInfo = 0; - for (i = 0; i < pScreen->numDepths; i++) - { - pDepth = &pScreen->allowedDepths[i]; - nInfo += pDepth->numVids; - } - - pInfo = (xMbufBufferInfo *) xalloc (nInfo * sizeof (xMbufBufferInfo)); - if (!pInfo) - return FALSE; - - k = 0; - for (i = 0; i < pScreen->numDepths; i++) - { - pDepth = &pScreen->allowedDepths[i]; - for (j = 0; j < pDepth->numVids; j++) - { - pInfo[k].visualID = pDepth->vids[j]; - pInfo[k].maxBuffers = 0; - pInfo[k].depth = pDepth->depth; - k++; - } - } - - pMBScreen->nInfo = nInfo; - pMBScreen->pInfo = pInfo; - - /* - * Setup the devPrivate to mbufScreenRec - */ - - pMBPriv = (mbufPixmapPrivPtr) xalloc(sizeof(* pMBPriv)); - if (!pMBPriv) - { - xfree(pInfo); - return (FALSE); - } - pMBScreen->devPrivate.ptr = (void *) pMBPriv; - pMBPriv->PositionWindow = NULL; - pMBPriv->funcsWrapped = 0; - - return TRUE; -} - -/*ARGSUSED*/ -static int -pixCreateImageBuffers (pWin, nbuf, ids, action, hint) - WindowPtr pWin; - int nbuf; - XID *ids; - int action; - int hint; -{ - mbufWindowPtr pMBWindow; - mbufBufferPtr pMBBuffer; - ScreenPtr pScreen; - int width, height, depth; - int i; - - pMBWindow = MB_WINDOW_PRIV(pWin); - - width = pWin->drawable.width; - height = pWin->drawable.height; - depth = pWin->drawable.depth; - pScreen = pWin->drawable.pScreen; - - for (i = 0; i < nbuf; i++) - { - pMBBuffer = &pMBWindow->buffers[i]; - pMBBuffer->pDrawable = (DrawablePtr) - (*pScreen->CreatePixmap) (pScreen, width, height, depth); - if (!pMBBuffer->pDrawable) - break; - - if (!AddResource (ids[i], MultibufferDrawableResType, - (void *) pMBBuffer->pDrawable)) - { - (*pScreen->DestroyPixmap) ((PixmapPtr) pMBBuffer->pDrawable); - break; - } - pMBBuffer->pDrawable->id = ids[i]; - - /* - * In the description of the CreateImageBuffers request: - * "If the window is mapped, or if these image buffers have - * backing store, their contents will be tiled with the window - * background, and zero or more expose events will be generated - * for each of these buffers." - */ - - (* MB_SCREEN_PRIV(pScreen)->ClearImageBufferArea) - (pMBBuffer, 0,0, 0,0, TRUE); - } - - return i; -} - -/* - * set up the gc to clear the pixmaps; - */ -static Bool -SetupBackgroundPainter (pWin, pGC) - WindowPtr pWin; - GCPtr pGC; -{ - XID gcvalues[4]; - int ts_x_origin, ts_y_origin; - PixUnion background; - int backgroundState; - Mask gcmask; - - /* - * First take care of any ParentRelative stuff by altering the - * tile/stipple origin to match the coordinates of the upper-left - * corner of the first ancestor without a ParentRelative background. - * This coordinate is, of course, negative. - */ - - ts_x_origin = ts_y_origin = 0; - while (pWin->backgroundState == ParentRelative) { - ts_x_origin -= pWin->origin.x; - ts_y_origin -= pWin->origin.y; - pWin = pWin->parent; - } - backgroundState = pWin->backgroundState; - background = pWin->background; - - switch (backgroundState) - { - case BackgroundPixel: - gcvalues[0] = (XID) background.pixel; - gcvalues[1] = FillSolid; - gcmask = GCForeground|GCFillStyle; - break; - - case BackgroundPixmap: - gcvalues[0] = FillTiled; - gcvalues[1] = (XID) background.pixmap; - gcvalues[2] = ts_x_origin; - gcvalues[3] = ts_y_origin; - gcmask = GCFillStyle|GCTile|GCTileStipXOrigin|GCTileStipYOrigin; - break; - - default: - return FALSE; - } - DoChangeGC(pGC, gcmask, gcvalues, TRUE); - return TRUE; -} - -static void -MultibufferPaintBackgroundRectangles(pWin, pDrawable, nrects, pRects) - WindowPtr pWin; - DrawablePtr pDrawable; - int nrects; - xRectangle *pRects; -{ - GCPtr pGC; - - pGC = GetScratchGC (pWin->drawable.depth, pWin->drawable.pScreen); - if (SetupBackgroundPainter(pWin, pGC)) - { - ValidateGC(pDrawable, pGC); - (*pGC->ops->PolyFillRect) (pDrawable, pGC, nrects, pRects); - } - FreeScratchGC(pGC); -} - -static void -MultibufferPaintBackgroundRegion(pWin, pDrawable, pRegion) - WindowPtr pWin; - DrawablePtr pDrawable; - RegionPtr pRegion; -{ - xRectangle *pRects; - int nrects = RegionNumRects(pRegion); - BoxPtr pbox = RegionRects(pRegion); - - pRects = (xRectangle *)ALLOCATE_LOCAL(nrects * sizeof(xRectangle)); - if (pRects) - { - int i; - for (i = 0; i < nrects; i++) - { - pRects[i].x = pbox->x1; - pRects[i].y = pbox->y1; - pRects[i].width = pbox->x2 - pbox->x1; - pRects[i].height = pbox->y2 - pbox->y1; - } - MultibufferPaintBackgroundRectangles(pWin, pDrawable, nrects, pRects); - DEALLOCATE_LOCAL(pRects); - } -} - -static void -pixDisplayImageBuffers(pScreen, ppMBWindow, ppMBBuffer, nbuf) - mbufBufferPtr *ppMBBuffer; - mbufWindowPtr *ppMBWindow; - int nbuf; -{ - GCPtr pGC = NULL; - PixmapPtr pPrevPixmap, pNewPixmap; - WindowPtr pWin; - RegionPtr pExposed; - int i; - mbufBufferPtr pPrevMBBuffer; - XID bool; - xRectangle r; - - UpdateCurrentTime (); - for (i = 0; i < nbuf; i++) - { - pWin = ppMBWindow[i]->pWindow; - - /* Time to get a different scratch GC? */ - - if (!pGC - || pGC->depth != pWin->drawable.depth - || pGC->pScreen != pWin->drawable.pScreen) - { - if (pGC) FreeScratchGC(pGC); - pGC = GetScratchGC (pWin->drawable.depth, pWin->drawable.pScreen); - } - pPrevMBBuffer = MB_DISPLAYED_BUFFER(ppMBWindow[i]); - pPrevPixmap = (PixmapPtr) pPrevMBBuffer->pDrawable; - pNewPixmap = (PixmapPtr) ppMBBuffer[i]->pDrawable; - - if (pPrevPixmap == pNewPixmap) - { - /* "If a specified buffer is already displayed, any delays and - * update action will still be performed for that buffer." - * - * We special-case this because applications do occasionally - * request a redundant DisplayImageBuffers, and we can save - * strokes by recognizing that the only update action that will - * change the buffer contents in this case is Background. - */ - if (ppMBWindow[i]->updateAction == MultibufferUpdateActionBackground) - { - r.x = r.y = 0; - r.width = pWin->drawable.width; - r.height = pWin->drawable.height; - MultibufferPaintBackgroundRectangles(pWin, (DrawablePtr)pWin, - 1, &r); - } - } - else /* different buffer is being displayed */ - { - /* perform update action */ - - switch (ppMBWindow[i]->updateAction) - { - case MultibufferUpdateActionUndefined: - break; - - case MultibufferUpdateActionBackground: - - r.x = r.y = 0; - r.width = pPrevPixmap->drawable.width; - r.height = pPrevPixmap->drawable.height; - MultibufferPaintBackgroundRectangles(pWin, - (DrawablePtr)pPrevPixmap, - 1, &r); - break; - - case MultibufferUpdateActionUntouched: - - /* copy the window to the pixmap that represents the - * currently displayed buffer - */ - - if (pPrevMBBuffer->eventMask & ExposureMask) - { - bool = TRUE; - DoChangeGC (pGC, GCGraphicsExposures, &bool, FALSE); - } - ValidateGC ((DrawablePtr)pPrevPixmap, pGC); - pExposed = (*pGC->ops->CopyArea)((DrawablePtr) pWin, - (DrawablePtr) pPrevPixmap, - pGC, - 0, 0, - pWin->drawable.width, - pWin->drawable.height, - 0, 0); - - /* if we couldn't copy the whole window to the buffer, - * send expose events (if any client wants them) - */ - - if (pPrevMBBuffer->eventMask & ExposureMask) - { /* some client wants expose events */ - if (pExposed) - { - RegionPtr pWinSize; - extern RegionPtr CreateUnclippedWinSize(); - ScreenPtr pScreen = pWin->drawable.pScreen; - pWinSize = CreateUnclippedWinSize (pWin); - /* - * pExposed is window-relative, but at this point - * pWinSize is screen-relative. Make pWinSize be - * window-relative so that region ops involving - * pExposed and pWinSize behave sensibly. - */ - RegionTranslate(pWinSize, - -pWin->drawable.x, - -pWin->drawable.y); - RegionIntersect(pExposed, pExposed, pWinSize); - RegionDestroy(pWinSize); - MultibufferExpose (pPrevMBBuffer, pExposed); - RegionDestroy(pExposed); - } - bool = FALSE; - DoChangeGC (pGC, GCGraphicsExposures, &bool, FALSE); - } /* end some client wants expose events */ - - break; /* end case MultibufferUpdateActionUntouched */ - - case MultibufferUpdateActionCopied: - - ValidateGC ((DrawablePtr)pPrevPixmap, pGC); - (*pGC->ops->CopyArea) ((DrawablePtr)pNewPixmap, - (DrawablePtr)pPrevPixmap, pGC, - 0, 0, pWin->drawable.width, - pWin->drawable.height, 0, 0); - break; - - } /* end switch on update action */ - - /* display the new buffer */ - - ValidateGC ((DrawablePtr)pWin, pGC); - (*pGC->ops->CopyArea) ((DrawablePtr)pNewPixmap, (DrawablePtr)pWin, - pGC, 0, 0, - pWin->drawable.width, pWin->drawable.height, - 0, 0); - } - - ppMBWindow[i]->lastUpdate = currentTime; - } - - if (pGC) FreeScratchGC (pGC); - return; -} - -/* - * resize the buffers when the window is resized - */ - -static Bool -pixPositionWindow (pWin, x, y) - WindowPtr pWin; - int x, y; -{ - ScreenPtr pScreen; - mbufPixmapPrivPtr pMBPriv; - mbufWindowPtr pMBWindow; - mbufBufferPtr pMBBuffer; - int width, height; - int i; - int dx, dy, dw, dh; - int sourcex, sourcey; - int destx, desty; - PixmapPtr pPixmap; - GCPtr pGC; - int savewidth, saveheight; - Bool clear; - RegionRec exposedRegion; - Bool ret; - - pScreen = pWin->drawable.pScreen; - pMBPriv = MB_SCREEN_PRIV_PIXMAP(pScreen); - - UNWRAP_SCREEN_FUNC(pScreen, pMBPriv, Bool, PositionWindow); - ret = (* pScreen->PositionWindow) (pWin, x, y); - REWRAP_SCREEN_FUNC(pScreen, pMBPriv, Bool, PositionWindow); - - if (!(pMBWindow = MB_WINDOW_PRIV(pWin))) - return ret; - - /* if new size is same as old, we're done */ - - if (pMBWindow->width == pWin->drawable.width && - pMBWindow->height == pWin->drawable.height) - return ret; - - width = pWin->drawable.width; - height = pWin->drawable.height; - dx = pWin->drawable.x - pMBWindow->x; - dy = pWin->drawable.x - pMBWindow->y; - dw = width - pMBWindow->width; - dh = height - pMBWindow->height; - GravityTranslate (0, 0, -dx, -dy, dw, dh, - pWin->bitGravity, &destx, &desty); - - /* if the window grew, remember to paint the window background, - * and maybe send expose events, for the new areas of the buffers - */ - - clear = pMBWindow->width < width || pMBWindow->height < height || - pWin->bitGravity == ForgetGravity; - - sourcex = 0; - sourcey = 0; - savewidth = pMBWindow->width; - saveheight = pMBWindow->height; - /* clip rectangle to source and destination */ - if (destx < 0) - { - savewidth += destx; - sourcex -= destx; - destx = 0; - } - if (destx + savewidth > width) - savewidth = width - destx; - if (desty < 0) - { - saveheight += desty; - sourcey -= desty; - desty = 0; - } - if (desty + saveheight > height) - saveheight = height - desty; - - pMBWindow->width = width; - pMBWindow->height = height; - pMBWindow->x = pWin->drawable.x; - pMBWindow->y = pWin->drawable.y; - - if (clear) - { - BoxRec box; - - box.x1 = box.y1 = 0; - box.x2 = width; - box.y2 = height; - RegionInit(&exposedRegion, &box, 1); - if (pWin->bitGravity != ForgetGravity) - { - RegionRec preservedRegion; - box.x1 = destx; - box.y1 = desty; - box.x2 = destx + savewidth; - box.y2 = desty + saveheight; - RegionInit(&preservedRegion, &box, 1); - RegionSubtract(&exposedRegion, &exposedRegion, &preservedRegion); - RegionUninit(&preservedRegion); - } - - } /* end if (clear) */ - - pGC = GetScratchGC (pWin->drawable.depth, pScreen); - - /* create buffers with new window size */ - - for (i = 0; i < pMBWindow->numMultibuffer; i++) - { - pMBBuffer = &pMBWindow->buffers[i]; - pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, pWin->drawable.depth); - if (!pPixmap) - { - (* MB_SCREEN_PRIV(pScreen)->DestroyImageBuffers)(pWin); - break; - } - if (clear) - { - MultibufferPaintBackgroundRegion(pWin, (DrawablePtr)pPixmap, &exposedRegion); - MultibufferExpose(pMBBuffer, &exposedRegion); - } - if (pWin->bitGravity != ForgetGravity) - { - ValidateGC ((DrawablePtr)pPixmap, pGC); - (*pGC->ops->CopyArea) (pMBBuffer->pDrawable, (DrawablePtr)pPixmap, - pGC, - sourcex, sourcey, savewidth, saveheight, - destx, desty); - } - pPixmap->drawable.id = pMBBuffer->pDrawable->id; - (*pScreen->DestroyPixmap) ((PixmapPtr) pMBBuffer->pDrawable); - pMBBuffer->pDrawable = (DrawablePtr) pPixmap; - if (i != pMBWindow->displayedMultibuffer) - { - ChangeResourceValue (pPixmap->drawable.id, - MultibufferDrawableResType, - (void *) pPixmap); - } - } - FreeScratchGC (pGC); - if (clear) - RegionUninit(&exposedRegion); - return TRUE; -} - -static void -pixWrapScreenFuncs(pScreen) - ScreenPtr pScreen; -{ - mbufPixmapPrivPtr pMBPriv = MB_SCREEN_PRIV_PIXMAP(pScreen); - WRAP_SCREEN_FUNC(pScreen, pMBPriv, PositionWindow, pixPositionWindow); -} - -static void -pixResetProc(pScreen) - ScreenPtr pScreen; -{ - mbufScreenPtr pMBScreen = MB_SCREEN_PRIV(pScreen); - mbufPixmapPrivPtr pMBPriv = MB_SCREEN_PRIV_PIXMAP(pScreen); - - xfree(pMBScreen->pInfo); - xfree(pMBPriv); -} - -static void -pixClearImageBufferArea(pMBBuffer, x,y, width,height, exposures) - mbufBufferPtr pMBBuffer; - short x, y; - unsigned short width, height; - Bool exposures; -{ - WindowPtr pWin; - ScreenPtr pScreen; - BoxRec box; - RegionRec region; - int w_width, w_height; - DrawablePtr pDrawable; - - pWin = pMBBuffer->pMBWindow->pWindow; - pScreen = pWin->drawable.pScreen; - - w_width = pWin->drawable.width; - w_height = pWin->drawable.height; - - box.x1 = x; - box.y1 = y; - box.x2 = width ? (box.x1 + width) : w_width; - box.y2 = height ? (box.y1 + height) : w_height; - - if (box.x1 < 0) box.x1 = 0; - if (box.y1 < 0) box.y1 = 0; - if (box.x2 > w_width) box.x2 = w_width; - if (box.y2 > w_height) box.y2 = w_height; - - RegionInit(®ion, &box, 1); - - if (pMBBuffer->number == pMBBuffer->pMBWindow->displayedMultibuffer) - pDrawable = (DrawablePtr) pWin; - else - pDrawable = pMBBuffer->pDrawable; - - MultibufferPaintBackgroundRegion(pWin, pDrawable, ®ion); - - if (exposures) - MultibufferExpose(pMBBuffer, ®ion); - - RegionUninit(®ion); -} - -static void -pixDeleteBufferDrawable(pDrawable) - DrawablePtr pDrawable; -{ - (* pDrawable->pScreen->DestroyPixmap)((PixmapPtr) pDrawable); -} diff --git a/nx-X11/programs/Xserver/Xext/mitmisc.c b/nx-X11/programs/Xserver/Xext/mitmisc.c deleted file mode 100644 index 5c5183e69..000000000 --- a/nx-X11/programs/Xserver/Xext/mitmisc.c +++ /dev/null @@ -1,176 +0,0 @@ -/* $XFree86: xc/programs/Xserver/Xext/mitmisc.c,v 3.6 2003/10/28 23:08:43 tsi Exp $ */ -/************************************************************ - -Copyright 1989, 1998 The Open Group - -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. - -The above copyright notice and this permission notice 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 -OPEN GROUP 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. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -********************************************************/ - -/* RANDOM CRUFT! THIS HAS NO OFFICIAL X CONSORTIUM OR X PROJECT TEAM BLESSING */ - -/* $Xorg: mitmisc.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */ - -#define NEED_EVENTS -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include "misc.h" -#include "os.h" -#include "dixstruct.h" -#include "extnsionst.h" -#define _MITMISC_SERVER_ -#include -#include "modinit.h" - -extern Bool permitOldBugs; - -#if 0 -static unsigned char MITReqCode; -#endif - -static void MITResetProc( - ExtensionEntry * /* extEntry */ -); - -static DISPATCH_PROC(ProcMITDispatch); -static DISPATCH_PROC(ProcMITGetBugMode); -static DISPATCH_PROC(ProcMITSetBugMode); -static DISPATCH_PROC(SProcMITDispatch); -static DISPATCH_PROC(SProcMITGetBugMode); -static DISPATCH_PROC(SProcMITSetBugMode); - -void -MITMiscExtensionInit(INITARGS) -{ -#if 0 - ExtensionEntry *extEntry; - - if ((extEntry = AddExtension(MITMISCNAME, 0, 0, - ProcMITDispatch, SProcMITDispatch, - MITResetProc, StandardMinorOpcode)) != 0) - MITReqCode = (unsigned char)extEntry->base; -#else - (void) AddExtension(MITMISCNAME, 0, 0, - ProcMITDispatch, SProcMITDispatch, - MITResetProc, StandardMinorOpcode); -#endif -} - -/*ARGSUSED*/ -static void -MITResetProc (extEntry) -ExtensionEntry *extEntry; -{ -} - -static int -ProcMITSetBugMode(client) - register ClientPtr client; -{ - REQUEST(xMITSetBugModeReq); - - REQUEST_SIZE_MATCH(xMITSetBugModeReq); - if ((stuff->onOff != xTrue) && (stuff->onOff != xFalse)) - { - client->errorValue = stuff->onOff; - return BadValue; - } - permitOldBugs = stuff->onOff; - return(client->noClientException); -} - -static int -ProcMITGetBugMode(client) - register ClientPtr client; -{ - xMITGetBugModeReply rep; - register int n; - - REQUEST_SIZE_MATCH(xMITGetBugModeReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.onOff = permitOldBugs; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - } - WriteToClient(client, sizeof(xMITGetBugModeReply), (char *)&rep); - return(client->noClientException); -} - -static int -ProcMITDispatch (client) - register ClientPtr client; -{ - REQUEST(xReq); - switch (stuff->data) - { - case X_MITSetBugMode: - return ProcMITSetBugMode(client); - case X_MITGetBugMode: - return ProcMITGetBugMode(client); - default: - return BadRequest; - } -} - -static int -SProcMITSetBugMode(client) - register ClientPtr client; -{ - register int n; - REQUEST(xMITSetBugModeReq); - - swaps(&stuff->length, n); - return ProcMITSetBugMode(client); -} - -static int -SProcMITGetBugMode(client) - register ClientPtr client; -{ - register int n; - REQUEST(xMITGetBugModeReq); - - swaps(&stuff->length, n); - return ProcMITGetBugMode(client); -} - -static int -SProcMITDispatch (client) - register ClientPtr client; -{ - REQUEST(xReq); - switch (stuff->data) - { - case X_MITSetBugMode: - return SProcMITSetBugMode(client); - case X_MITGetBugMode: - return SProcMITGetBugMode(client); - default: - return BadRequest; - } -} diff --git a/nx-X11/programs/Xserver/Xext/panoramiXSwap.c b/nx-X11/programs/Xserver/Xext/panoramiXSwap.c index 955b81ed1..76346fa34 100644 --- a/nx-X11/programs/Xserver/Xext/panoramiXSwap.c +++ b/nx-X11/programs/Xserver/Xext/panoramiXSwap.c @@ -30,8 +30,8 @@ Equipment Corporation. #endif #include -#include -#include +#include +#include #include "misc.h" #include "cursor.h" #include "cursorstr.h" diff --git a/nx-X11/programs/Xserver/Xext/panoramiXprocs.c b/nx-X11/programs/Xserver/Xext/panoramiXprocs.c index 8078e2bd0..17fe6d6c6 100644 --- a/nx-X11/programs/Xserver/Xext/panoramiXprocs.c +++ b/nx-X11/programs/Xserver/Xext/panoramiXprocs.c @@ -33,10 +33,10 @@ Equipment Corporation. #endif #include -#include +#include #define NEED_REPLIES #define NEED_EVENTS -#include +#include #include "windowstr.h" #include "dixfontstr.h" #include "gcstruct.h" @@ -1113,7 +1113,7 @@ int PanoramiXCopyArea(ClientPtr client) FOR_NSCREENS_BACKWARD(j) { if(pRgn[j]) { if(srcIsRoot) { - RegionTranslate(pRgn[j], + RegionTranslate(pRgn[j], panoramiXdataPtr[j].x, panoramiXdataPtr[j].y); } RegionAppend(&totalReg, pRgn[j]); diff --git a/nx-X11/programs/Xserver/Xext/sampleEVI.c b/nx-X11/programs/Xserver/Xext/sampleEVI.c deleted file mode 100644 index 961c108f9..000000000 --- a/nx-X11/programs/Xserver/Xext/sampleEVI.c +++ /dev/null @@ -1,121 +0,0 @@ -/* $Xorg: sampleEVI.c,v 1.3 2000/08/17 19:47:58 cpqbld Exp $ */ -/************************************************************ -Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc. -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, 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 Silicon Graphics not be -used in advertising or publicity pertaining to distribution -of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability -of this software for any purpose. It is provided "as is" -without any express or implied warranty. -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS 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. -********************************************************/ -/* $XFree86$ */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include "dixstruct.h" -#include "extnsionst.h" -#include "dix.h" -#define _XEVI_SERVER_ -#include -#include "EVIstruct.h" -#include "scrnintstr.h" - -#include - -static int sampleGetVisualInfo( - VisualID32 *visual, - int n_visual, - xExtendedVisualInfo **evi_rn, - int *n_info_rn, - VisualID32 **conflict_rn, - int *n_conflict_rn) -{ - unsigned int max_sz_evi; - VisualID32 *temp_conflict; - xExtendedVisualInfo *evi; - unsigned int max_visuals = 0, max_sz_conflict, sz_conflict = 0; - register int visualI, scrI, sz_evi = 0, conflictI, n_conflict; - - if (n_visual > UINT32_MAX/(sz_xExtendedVisualInfo * screenInfo.numScreens)) - return BadAlloc; - max_sz_evi = n_visual * sz_xExtendedVisualInfo * screenInfo.numScreens; - - for (scrI = 0; scrI < screenInfo.numScreens; scrI++) { - if (screenInfo.screens[scrI]->numVisuals > max_visuals) - max_visuals = screenInfo.screens[scrI]->numVisuals; - } - - if (n_visual > UINT32_MAX/(sz_VisualID32 * screenInfo.numScreens - * max_visuals)) - return BadAlloc; - max_sz_conflict = n_visual * sz_VisualID32 * screenInfo.numScreens * max_visuals; - - *evi_rn = evi = (xExtendedVisualInfo *)xalloc(max_sz_evi); - if (!*evi_rn) - return BadAlloc; - - temp_conflict = (VisualID32 *)xalloc(max_sz_conflict); - if (!temp_conflict) { - xfree(*evi_rn); - return BadAlloc; - } - - for (scrI = 0; scrI < screenInfo.numScreens; scrI++) { - for (visualI = 0; visualI < n_visual; visualI++) { - evi[sz_evi].core_visual_id = visual[visualI]; - evi[sz_evi].screen = scrI; - evi[sz_evi].level = 0; - evi[sz_evi].transparency_type = XEVI_TRANSPARENCY_NONE; - evi[sz_evi].transparency_value = 0; - evi[sz_evi].min_hw_colormaps = 1; - evi[sz_evi].max_hw_colormaps = 1; - evi[sz_evi].num_colormap_conflicts = n_conflict = 0; - for (conflictI = 0; conflictI < n_conflict; conflictI++) - temp_conflict[sz_conflict++] = visual[visualI]; - sz_evi++; - } - } - *conflict_rn = temp_conflict; - *n_conflict_rn = sz_conflict; - *n_info_rn = sz_evi; - return Success; -} - -static void sampleFreeVisualInfo( - xExtendedVisualInfo *evi, - VisualID32 *conflict) -{ - if (evi) - xfree(evi); - if (conflict) - xfree(conflict); -} - -EviPrivPtr eviDDXInit(void) -{ - static EviPrivRec eviPriv; - eviPriv.getVisualInfo = sampleGetVisualInfo; - eviPriv.freeVisualInfo = sampleFreeVisualInfo; - return &eviPriv; -} - -void eviDDXReset(void) -{ -} diff --git a/nx-X11/programs/Xserver/Xext/vidmodeproc.h b/nx-X11/programs/Xserver/Xext/vidmodeproc.h deleted file mode 100644 index 1f7c6cd04..000000000 --- a/nx-X11/programs/Xserver/Xext/vidmodeproc.h +++ /dev/null @@ -1,78 +0,0 @@ -/* $XFree86: xc/programs/Xserver/Xext/vidmodeproc.h,v 1.4 1999/12/13 01:39:40 robin Exp $ */ - -/* Prototypes for DGA functions that the DDX must provide */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef _VIDMODEPROC_H_ -#define _VIDMODEPROC_H_ - - -typedef enum { - VIDMODE_H_DISPLAY, - VIDMODE_H_SYNCSTART, - VIDMODE_H_SYNCEND, - VIDMODE_H_TOTAL, - VIDMODE_H_SKEW, - VIDMODE_V_DISPLAY, - VIDMODE_V_SYNCSTART, - VIDMODE_V_SYNCEND, - VIDMODE_V_TOTAL, - VIDMODE_FLAGS, - VIDMODE_CLOCK -} VidModeSelectMode; - -typedef enum { - VIDMODE_MON_VENDOR, - VIDMODE_MON_MODEL, - VIDMODE_MON_NHSYNC, - VIDMODE_MON_NVREFRESH, - VIDMODE_MON_HSYNC_LO, - VIDMODE_MON_HSYNC_HI, - VIDMODE_MON_VREFRESH_LO, - VIDMODE_MON_VREFRESH_HI -} VidModeSelectMonitor; - -typedef union { - void * ptr; - int i; - float f; -} vidMonitorValue; - -void XFree86VidModeExtensionInit(void); - -Bool VidModeAvailable(int scrnIndex); -Bool VidModeGetCurrentModeline(int scrnIndex, void **mode, int *dotClock); -Bool VidModeGetFirstModeline(int scrnIndex, void **mode, int *dotClock); -Bool VidModeGetNextModeline(int scrnIndex, void **mode, int *dotClock); -Bool VidModeDeleteModeline(int scrnIndex, void * mode); -Bool VidModeZoomViewport(int scrnIndex, int zoom); -Bool VidModeGetViewPort(int scrnIndex, int *x, int *y); -Bool VidModeSetViewPort(int scrnIndex, int x, int y); -Bool VidModeSwitchMode(int scrnIndex, void * mode); -Bool VidModeLockZoom(int scrnIndex, Bool lock); -Bool VidModeGetMonitor(int scrnIndex, void **monitor); -int VidModeGetNumOfClocks(int scrnIndex, Bool *progClock); -Bool VidModeGetClocks(int scrnIndex, int *Clocks); -ModeStatus VidModeCheckModeForMonitor(int scrnIndex, void * mode); -ModeStatus VidModeCheckModeForDriver(int scrnIndex, void * mode); -void VidModeSetCrtcForMode(int scrnIndex, void * mode); -Bool VidModeAddModeline(int scrnIndex, void * mode); -int VidModeGetDotClock(int scrnIndex, int Clock); -int VidModeGetNumOfModes(int scrnIndex); -Bool VidModeSetGamma(int scrnIndex, float red, float green, float blue); -Bool VidModeGetGamma(int scrnIndex, float *red, float *green, float *blue); -void * VidModeCreateMode(void); -void VidModeCopyMode(void * modefrom, void * modeto); -int VidModeGetModeValue(void * mode, int valtyp); -void VidModeSetModeValue(void * mode, int valtyp, int val); -vidMonitorValue VidModeGetMonitorValue(void * monitor, int valtyp, int indx); -Bool VidModeSetGammaRamp(int, int, CARD16 *, CARD16 *, CARD16 *); -Bool VidModeGetGammaRamp(int, int, CARD16 *, CARD16 *, CARD16 *); -int VidModeGetGammaRampSize(int scrnIndex); - -#endif - - diff --git a/nx-X11/programs/Xserver/Xext/xcmisc.c b/nx-X11/programs/Xserver/Xext/xcmisc.c index e353d65ac..ee7d69fc3 100644 --- a/nx-X11/programs/Xserver/Xext/xcmisc.c +++ b/nx-X11/programs/Xserver/Xext/xcmisc.c @@ -34,8 +34,8 @@ from The Open Group. #include #endif -#include -#include +#include +#include #include "misc.h" #include "os.h" #include "dixstruct.h" @@ -44,7 +44,11 @@ from The Open Group. #include #include "modinit.h" +#if HAVE_STDINT_H #include +#elif !defined(UINT32_MAX) +#define UINT32_MAX 0xffffffffU +#endif #if 0 static unsigned char XCMiscCode; diff --git a/nx-X11/programs/Xserver/Xext/xevie.c b/nx-X11/programs/Xserver/Xext/xevie.c deleted file mode 100644 index eb38d9223..000000000 --- a/nx-X11/programs/Xserver/Xext/xevie.c +++ /dev/null @@ -1,719 +0,0 @@ -/************************************************************ - -Copyright 2003-2005 Sun Microsystems, Inc. - -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, and/or sell copies of the Software, and to permit persons -to whom the Software is furnished to do so, provided that the above -copyright notice(s) and this permission notice appear in all copies of -the Software and that both the above copyright notice(s) and this -permission notice appear in supporting documentation. - -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 -OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR 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. - -Except as contained in this notice, the name of a copyright holder -shall not be used in advertising or otherwise to promote the sale, use -or other dealings in this Software without prior written authorization -of the copyright holder. - -************************************************************/ -/* $XdotOrg: xc/programs/Xserver/Xext/xevie.c,v 1.11 2005/10/06 17:55:54 alanc Exp $ */ - -#define NEED_REPLIES -#define NEED_EVENTS -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include "misc.h" -#include "dixstruct.h" -#include "extnsionst.h" -#include "colormapst.h" -#include "scrnintstr.h" -#include "servermd.h" -#define _XEVIE_SERVER_ -#include -#include -#include "input.h" -#include "inputstr.h" -#include "windowstr.h" -#include "cursorstr.h" -#include - -#include "../os/osdep.h" - -#define NoSuchEvent 0x80000000 - -extern Bool noXkbExtension; -extern int xeviegrabState; - -static int ProcDispatch (), SProcDispatch (); -static void ResetProc (); - -static unsigned char ReqCode = 0; -static int ErrorBase; - -int xevieFlag = 0; -int xevieClientIndex = 0; -DeviceIntPtr xeviekb = NULL; -DeviceIntPtr xeviemouse = NULL; -Mask xevieMask = 0; -int xevieEventSent = 0; -int xevieKBEventSent = 0; -static unsigned int xevieServerGeneration; -static int xevieDevicePrivateIndex; -static Bool xevieModifiersOn = FALSE; - -#define XEVIEINFO(dev) ((xevieDeviceInfoPtr)dev->devPrivates[xevieDevicePrivateIndex].ptr) - -Mask xevieFilters[128] = -{ - NoSuchEvent, /* 0 */ - NoSuchEvent, /* 1 */ - KeyPressMask, /* KeyPress */ - KeyReleaseMask, /* KeyRelease */ - ButtonPressMask, /* ButtonPress */ - ButtonReleaseMask, /* ButtonRelease */ - PointerMotionMask /* MotionNotify (initial state) */ -}; - -typedef struct { - ProcessInputProc processInputProc; - ProcessInputProc realInputProc; - DeviceUnwrapProc unwrapProc; -} xevieDeviceInfoRec, *xevieDeviceInfoPtr; - -typedef struct { - CARD32 time; - KeyClassPtr keyc; -} xevieKeycQueueRec, *xevieKeycQueuePtr; - -#define KEYC_QUEUE_SIZE 100 -xevieKeycQueueRec keycq[KEYC_QUEUE_SIZE] = {0, NULL}; -static int keycqHead = 0, keycqTail = 0; - -static int ProcDispatch (ClientPtr), SProcDispatch (ClientPtr); -static void ResetProc (ExtensionEntry*); - -static int ErrorBase; - -static Bool XevieStart(void); -static void XevieEnd(int clientIndex); -static void XevieClientStateCallback(CallbackListPtr *pcbl, void * nulldata, - void * calldata); -static void XevieServerGrabStateCallback(CallbackListPtr *pcbl, - void * nulldata, - void * calldata); - -static Bool XevieAdd(DeviceIntPtr device, void * data); -static void XevieWrap(DeviceIntPtr device, ProcessInputProc proc); -static Bool XevieRemove(DeviceIntPtr device, void * data); -static void doSendEvent(xEvent *xE, DeviceIntPtr device); -static void XeviePointerProcessInputProc(xEvent *xE, DeviceIntPtr dev, - int count); -static void XevieKbdProcessInputProc(xEvent *xE, DeviceIntPtr dev, int count); - -void -XevieExtensionInit () -{ - ExtensionEntry* extEntry; - - if (serverGeneration != xevieServerGeneration) { - if ((xevieDevicePrivateIndex = AllocateDevicePrivateIndex()) == -1) - return; - xevieServerGeneration = serverGeneration; - } - - if (!AddCallback(&ServerGrabCallback,XevieServerGrabStateCallback,NULL)) - return; - - if ((extEntry = AddExtension (XEVIENAME, - 0, - XevieNumberErrors, - ProcDispatch, - SProcDispatch, - ResetProc, - StandardMinorOpcode))) { - ReqCode = (unsigned char)extEntry->base; - ErrorBase = extEntry->errorBase; - } - - /* PC servers initialize the desktop colors (citems) here! */ -} - -/*ARGSUSED*/ -static -void ResetProc (extEntry) - ExtensionEntry* extEntry; -{ -} - -static -int ProcQueryVersion (client) - register ClientPtr client; -{ - REQUEST (xXevieQueryVersionReq); - xXevieQueryVersionReply rep; - register int n; - - REQUEST_SIZE_MATCH (xXevieQueryVersionReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequence_number = client->sequence; - rep.server_major_version = XEVIE_MAJOR_VERSION; - rep.server_minor_version = XEVIE_MINOR_VERSION; - WriteToClient (client, sizeof (xXevieQueryVersionReply), (char *)&rep); - return client->noClientException; -} - -static -int ProcStart (client) - register ClientPtr client; -{ - REQUEST (xXevieStartReq); - xXevieStartReply rep; - register int n; - - REQUEST_SIZE_MATCH (xXevieStartReq); - rep.pad1 = 0; - - if(!xevieFlag){ - if (AddCallback(&ClientStateCallback,XevieClientStateCallback,NULL)) { - xevieFlag = 1; - rep.pad1 = 1; - xevieClientIndex = client->index; - if(!keycq[0].time ) { - int i; - for(i=0; ixkbInfo = xalloc(sizeof(XkbSrvInfoRec)); - } - } - } else - return BadAlloc; - } else - return BadAccess; - if (!noXkbExtension) { - if (!XevieStart()) { - DeleteCallback(&ClientStateCallback,XevieClientStateCallback,NULL); - return BadAlloc; - } - } - - xevieModifiersOn = FALSE; - - rep.type = X_Reply; - rep.sequence_number = client->sequence; - WriteToClient (client, sizeof (xXevieStartReply), (char *)&rep); - return client->noClientException; -} - -static -int ProcEnd (client) - register ClientPtr client; -{ - xXevieEndReply rep; - - if (xevieFlag) { - if (client->index != xevieClientIndex) - return BadAccess; - - DeleteCallback(&ClientStateCallback,XevieClientStateCallback,NULL); - XevieEnd(xevieClientIndex); - } - - rep.type = X_Reply; - rep.sequence_number = client->sequence; - WriteToClient (client, sizeof (xXevieEndReply), (char *)&rep); - return client->noClientException; -} - -static -int ProcSend (client) - register ClientPtr client; -{ - REQUEST (xXevieSendReq); - xXevieSendReply rep; - xEvent *xE; - OsCommPtr oc; - static unsigned char lastDetail = 0, lastType = 0; - - if (client->index != xevieClientIndex) - return BadAccess; - - xE = (xEvent *)&stuff->event; - rep.type = X_Reply; - rep.sequence_number = client->sequence; - WriteToClient (client, sizeof (xXevieSendReply), (char *)&rep); - - switch(xE->u.u.type) { - case KeyPress: - case KeyRelease: - xevieKBEventSent = 1; - if(noXkbExtension) - CoreProcessKeyboardEvent (xE, xeviekb, 1); - else - doSendEvent(xE, inputInfo.keyboard); - break; - case ButtonPress: - case ButtonRelease: - case MotionNotify: - xevieEventSent = 1; - if(noXkbExtension) - CoreProcessPointerEvent(xE, xeviemouse, 1); - else - doSendEvent(xE, inputInfo.pointer); - break; - default: - break; - } - lastType = xE->u.u.type; - lastDetail = xE->u.u.detail; - return client->noClientException; -} - -static -int ProcSelectInput (client) - register ClientPtr client; -{ - REQUEST (xXevieSelectInputReq); - xXevieSelectInputReply rep; - - if (client->index != xevieClientIndex) - return BadAccess; - - xevieMask = (long)stuff->event_mask; - rep.type = X_Reply; - rep.sequence_number = client->sequence; - WriteToClient (client, sizeof (xXevieSelectInputReply), (char *)&rep); - return client->noClientException; -} - -static -int ProcDispatch (client) - register ClientPtr client; -{ - REQUEST (xReq); - switch (stuff->data) - { - case X_XevieQueryVersion: - return ProcQueryVersion (client); - case X_XevieStart: - return ProcStart (client); - case X_XevieEnd: - return ProcEnd (client); - case X_XevieSend: - return ProcSend (client); - case X_XevieSelectInput: - return ProcSelectInput(client); - default: - return BadRequest; - } -} - -static -int SProcQueryVersion (client) - register ClientPtr client; -{ - register int n; - - REQUEST(xXevieQueryVersionReq); - swaps(&stuff->length, n); - return ProcQueryVersion(client); -} - -static -int SProcStart (client) - ClientPtr client; -{ - register int n; - - REQUEST (xXevieStartReq); - swaps (&stuff->length, n); - swapl (&stuff->screen, n); - REQUEST_AT_LEAST_SIZE (xXevieStartReq); - return ProcStart (client); -} - -static -int SProcEnd (client) - ClientPtr client; -{ - register int n; - int count; - xColorItem* pItem; - - REQUEST (xXevieEndReq); - swaps (&stuff->length, n); - REQUEST_AT_LEAST_SIZE (xXevieEndReq); - swapl(&stuff->cmap, n); - return ProcEnd (client); -} - -static -int SProcSend (client) - ClientPtr client; -{ - register int n; - int count; - - REQUEST (xXevieSendReq); - swaps (&stuff->length, n); - REQUEST_AT_LEAST_SIZE (xXevieSendReq); - swapl(&stuff->event, n); - return ProcSend (client); -} - -static -int SProcSelectInput (client) - ClientPtr client; -{ - register int n; - int count; - - REQUEST (xXevieSelectInputReq); - swaps (&stuff->length, n); - REQUEST_AT_LEAST_SIZE (xXevieSendReq); - swapl(&stuff->event_mask, n); - return ProcSelectInput (client); -} - - -static -int SProcDispatch (client) - register ClientPtr client; -{ - REQUEST(xReq); - switch (stuff->data) - { - case X_XevieQueryVersion: - return SProcQueryVersion (client); - case X_XevieStart: - return SProcStart (client); - case X_XevieEnd: - return SProcEnd (client); - case X_XevieSend: - return SProcSend (client); - case X_XevieSelectInput: - return SProcSelectInput(client); - default: - return BadRequest; - } -} -/*======================================================*/ - -#define WRAP_INPUTPROC(dev,store,inputProc) \ - store->processInputProc = dev->public.processInputProc; \ - dev->public.processInputProc = inputProc; \ - store->realInputProc = dev->public.realInputProc; \ - dev->public.realInputProc = inputProc; - -#define COND_WRAP_INPUTPROC(dev,store,inputProc) \ - if (dev->public.processInputProc == dev->public.realInputProc) \ - dev->public.processInputProc = inputProc; \ - store->processInputProc = \ - store->realInputProc = dev->public.realInputProc; \ - dev->public.realInputProc = inputProc; - -#define UNWRAP_INPUTPROC(dev,restore) \ - dev->public.processInputProc = restore->processInputProc; \ - dev->public.realInputProc = restore->realInputProc; - -#define UNWRAP_INPUTPROC(dev,restore) \ - dev->public.processInputProc = restore->processInputProc; \ - dev->public.realInputProc = restore->realInputProc; - -#define XEVIE_EVENT(xE) \ - (xevieFlag \ - && !xeviegrabState \ - && clients[xevieClientIndex] \ - && (xevieMask & xevieFilters[xE->u.u.type])) - - -static void -sendEvent(ClientPtr pClient, xEvent *xE) -{ - if(pClient->swapped) { - xEvent eventTo; - - /* Remember to strip off the leading bit of type in case - this event was sent with "SendEvent." */ - (*EventSwapVector[xE->u.u.type & 0177]) (xE, &eventTo); - (void)WriteToClient(pClient, sizeof(xEvent), (char *)&eventTo); - } else { - (void)WriteToClient(pClient, sizeof(xEvent), (char *) xE); - } -} - -static void -XevieKbdProcessInputProc(xEvent *xE, DeviceIntPtr dev, int count) -{ - int key, bit; - BYTE *kptr; - ProcessInputProc tmp; - KeyClassPtr keyc = dev->key; - xevieDeviceInfoPtr xeviep = XEVIEINFO(dev); - - if(XEVIE_EVENT(xE)) { - key = xE->u.u.detail; - kptr = &keyc->down[key >> 3]; - bit = 1 << (key & 7); - - if (dev->key->modifierMap[xE->u.u.detail]) - xevieModifiersOn = TRUE; - - xE->u.keyButtonPointer.event = xeviewin->drawable.id; - xE->u.keyButtonPointer.root = GetCurrentRootWindow()->drawable.id; - xE->u.keyButtonPointer.child = (xeviewin->firstChild) - ? xeviewin->firstChild->drawable.id:0; - xE->u.keyButtonPointer.rootX = xeviehot.x; - xE->u.keyButtonPointer.rootY = xeviehot.y; - xE->u.keyButtonPointer.state = keyc->state | inputInfo.pointer->button->state; - /* fix bug: sequence lost in Xlib */ - xE->u.u.sequenceNumber = clients[xevieClientIndex]->sequence; - /* fix for bug5092586 */ - if(!noXkbExtension) { - switch(xE->u.u.type) { - case KeyPress: *kptr |= bit; break; - case KeyRelease: *kptr &= ~bit; break; - } - } - keycq[keycqHead].time = xE->u.keyButtonPointer.time; - memcpy(keycq[keycqHead].keyc, keyc, sizeof(KeyClassRec) - sizeof(KeyClassPtr)); - memcpy(keycq[keycqHead].keyc->xkbInfo, keyc->xkbInfo, sizeof(XkbSrvInfoRec)); - if(++keycqHead >=KEYC_QUEUE_SIZE) - keycqHead = 0; - sendEvent(clients[xevieClientIndex], xE); - return; - } - - tmp = dev->public.realInputProc; - UNWRAP_INPUTPROC(dev,xeviep); - dev->public.processInputProc(xE,dev,count); - COND_WRAP_INPUTPROC(dev,xeviep,tmp); -} - -static void -XeviePointerProcessInputProc(xEvent *xE, DeviceIntPtr dev, int count) -{ - xevieDeviceInfoPtr xeviep = XEVIEINFO(dev); - ProcessInputProc tmp; - - if (XEVIE_EVENT(xE)) { - /* fix bug: sequence lost in Xlib */ - xE->u.u.sequenceNumber = clients[xevieClientIndex]->sequence; - sendEvent(clients[xevieClientIndex], xE); - return; - } - - tmp = dev->public.realInputProc; - UNWRAP_INPUTPROC(dev,xeviep); - dev->public.processInputProc(xE,dev,count); - COND_WRAP_INPUTPROC(dev,xeviep,tmp); -} - -static Bool -XevieStart(void) -{ - ProcessInputProc prp; - prp = XevieKbdProcessInputProc; - if (!XevieAdd(inputInfo.keyboard,&prp)) - return FALSE; - prp = XeviePointerProcessInputProc; - if (!XevieAdd(inputInfo.pointer,&prp)) - return FALSE; - - return TRUE; -} - - -static void -XevieEnd(int clientIndex) -{ - if (!clientIndex || clientIndex == xevieClientIndex) { - - if(!noXkbExtension) { - - XevieRemove(inputInfo.keyboard,NULL); - - inputInfo.keyboard->public.processInputProc = CoreProcessKeyboardEvent; - inputInfo.keyboard->public.realInputProc = CoreProcessKeyboardEvent; - XkbSetExtension(inputInfo.keyboard,ProcessKeyboardEvent); - - - XevieRemove(inputInfo.pointer,NULL); - - inputInfo.pointer->public.processInputProc = CoreProcessPointerEvent; - inputInfo.pointer->public.realInputProc = CoreProcessPointerEvent; - XkbSetExtension(inputInfo.pointer,ProcessPointerEvent); - } - - xevieFlag = 0; - xevieClientIndex = 0; - DeleteCallback (&ClientStateCallback, XevieClientStateCallback, NULL); - } -} - -static void -XevieClientStateCallback(CallbackListPtr *pcbl, void * nulldata, - void * calldata) -{ - NewClientInfoRec *pci = (NewClientInfoRec *)calldata; - ClientPtr client = pci->client; - if (client->clientState == ClientStateGone - || client->clientState == ClientStateRetained) - XevieEnd(client->index); -} - -static void -XevieServerGrabStateCallback(CallbackListPtr *pcbl, void * nulldata, - void * calldata) -{ - ServerGrabInfoRec *grbinfo = (ServerGrabInfoRec *)calldata; - if (grbinfo->grabstate == SERVER_GRABBED) - xeviegrabState = TRUE; - else - xeviegrabState = FALSE; -} - -#define UNWRAP_UNWRAPPROC(device,proc_store) \ - device->unwrapProc = proc_store; - -#define WRAP_UNWRAPPROC(device,proc_store,proc) \ - proc_store = device->unwrapProc; \ - device->unwrapProc = proc; - -static void -xevieUnwrapProc(DeviceIntPtr device, DeviceHandleProc proc, void * data) -{ - xevieDeviceInfoPtr xeviep = XEVIEINFO(device); - ProcessInputProc tmp = device->public.processInputProc; - - UNWRAP_INPUTPROC(device,xeviep); - UNWRAP_UNWRAPPROC(device,xeviep->unwrapProc); - proc(device,data); - WRAP_INPUTPROC(device,xeviep,tmp); - WRAP_UNWRAPPROC(device,xeviep->unwrapProc,xevieUnwrapProc); -} - -static Bool -XevieUnwrapAdd(DeviceIntPtr device, void* data) -{ - if (device->unwrapProc) - device->unwrapProc(device,XevieUnwrapAdd,data); - else { - ProcessInputProc *ptr = data; - XevieWrap(device,*ptr); - } - - return TRUE; -} - -static Bool -XevieAdd(DeviceIntPtr device, void* data) -{ - xevieDeviceInfoPtr xeviep; - - if (!AllocateDevicePrivate(device, xevieDevicePrivateIndex)) - return FALSE; - - xeviep = xalloc (sizeof (xevieDeviceInfoRec)); - if (!xeviep) - return FALSE; - - device->devPrivates[xevieDevicePrivateIndex].ptr = xeviep; - XevieUnwrapAdd(device, data); - - return TRUE; -} - -static Bool -XevieRemove(DeviceIntPtr device,void * data) -{ - xevieDeviceInfoPtr xeviep = XEVIEINFO(device); - - if (!xeviep) return TRUE; - - UNWRAP_INPUTPROC(device,xeviep); - UNWRAP_UNWRAPPROC(device,xeviep->unwrapProc); - - xfree(xeviep); - device->devPrivates[xevieDevicePrivateIndex].ptr = NULL; - return TRUE; -} - -static void -XevieWrap(DeviceIntPtr device, ProcessInputProc proc) -{ - xevieDeviceInfoPtr xeviep = XEVIEINFO(device); - - WRAP_INPUTPROC(device,xeviep,proc); - WRAP_UNWRAPPROC(device,xeviep->unwrapProc,xevieUnwrapProc); -} - -static void -doSendEvent(xEvent *xE, DeviceIntPtr dev) -{ - xevieDeviceInfoPtr xeviep = XEVIEINFO(dev); - ProcessInputProc tmp = dev->public.realInputProc; - if (((xE->u.u.type==KeyPress)||(xE->u.u.type==KeyRelease)) - && !xevieModifiersOn) { - KeyClassPtr keyc = dev->key; - CARD8 realModes = dev->key->modifierMap[xE->u.u.detail]; - int notFound = 0; - /* if some events are consumed by client, move the queue tail pointer to the current - event which just comes back from Xevie client . - */ - if(keycq[keycqTail].time != xE->u.keyButtonPointer.time) { - while(keycq[keycqTail].time != xE->u.keyButtonPointer.time) { - if(++keycqTail >= KEYC_QUEUE_SIZE) - keycqTail = 0; - if(keycqTail == keycqHead) { - notFound = 1; - break; - } - } - } - if(!notFound) { - dev->key = keycq[keycqTail].keyc; - if(++keycqTail >= KEYC_QUEUE_SIZE) - keycqTail = 0; - } - dev->key->modifierMap[xE->u.u.detail] = 0; - - if(dev->key->xkbInfo->repeatKey != 0 && xE->u.u.type != KeyPress) - XkbLastRepeatEvent= (void *)xE; - UNWRAP_INPUTPROC(dev,xeviep); - dev->public.processInputProc(xE,dev,1); - COND_WRAP_INPUTPROC(dev,xeviep,tmp); - XkbLastRepeatEvent= NULL; - - dev->key->modifierMap[xE->u.u.detail] = realModes; - dev->key = keyc; - if(notFound) { - DeleteCallback(&ClientStateCallback,XevieClientStateCallback,NULL); - XevieEnd(xevieClientIndex); - ErrorF("Error: Xevie keyc queue size is not enough, disable Xevie\n"); - } - } else { - UNWRAP_INPUTPROC(dev,xeviep); - dev->public.processInputProc(xE,dev,1); - COND_WRAP_INPUTPROC(dev,xeviep,tmp); - } -} - diff --git a/nx-X11/programs/Xserver/Xext/xf86dga.c b/nx-X11/programs/Xserver/Xext/xf86dga.c deleted file mode 100644 index 074118c18..000000000 --- a/nx-X11/programs/Xserver/Xext/xf86dga.c +++ /dev/null @@ -1,307 +0,0 @@ -/* $XFree86: xc/programs/Xserver/Xext/xf86dga.c,v 3.21 2000/06/30 19:06:54 keithp Exp $ */ - -/* - -Copyright (c) 1995 Jon Tombs -Copyright (c) 1995, 1996, 1999 XFree86 Inc - -*/ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#define NEED_REPLIES -#define NEED_EVENTS -#include -#include -#include "misc.h" -#include "dixstruct.h" -#include "extnsionst.h" -#include "colormapst.h" -#include "cursorstr.h" -#include "scrnintstr.h" -#include "servermd.h" -#define _XF86DGA_SERVER_ -#include -#include -#include "swaprep.h" -#include "dgaproc.h" - -#include "xf86dgaext.h" - - -static DISPATCH_PROC(ProcXF86DGADirectVideo); -static DISPATCH_PROC(ProcXF86DGAGetVidPage); -static DISPATCH_PROC(ProcXF86DGAGetVideoLL); -static DISPATCH_PROC(ProcXF86DGAGetViewPortSize); -static DISPATCH_PROC(ProcXF86DGASetVidPage); -static DISPATCH_PROC(ProcXF86DGASetViewPort); -static DISPATCH_PROC(ProcXF86DGAInstallColormap); -static DISPATCH_PROC(ProcXF86DGAQueryDirectVideo); -static DISPATCH_PROC(ProcXF86DGAViewPortChanged); - - -static int -ProcXF86DGAGetVideoLL(ClientPtr client) -{ - REQUEST(xXF86DGAGetVideoLLReq); - xXF86DGAGetVideoLLReply rep; - XDGAModeRec mode; - int num, offset, flags; - char *name; - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - REQUEST_SIZE_MATCH(xXF86DGAGetVideoLLReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - - if(!DGAAvailable(stuff->screen)) - return (DGAErrorBase + XF86DGANoDirectVideoMode); - - if(!(num = DGAGetOldDGAMode(stuff->screen))) - return (DGAErrorBase + XF86DGANoDirectVideoMode); - - /* get the parameters for the mode that best matches */ - DGAGetModeInfo(stuff->screen, &mode, num); - - if(!DGAOpenFramebuffer(stuff->screen, &name, - (unsigned char**)(&rep.offset), - (int*)(&rep.bank_size), &offset, &flags)) - return BadAlloc; - - rep.offset += mode.offset; - rep.width = mode.bytesPerScanline / (mode.bitsPerPixel >> 3); - rep.ram_size = rep.bank_size >> 10; - - WriteToClient(client, SIZEOF(xXF86DGAGetVideoLLReply), (char *)&rep); - return (client->noClientException); -} - -static int -ProcXF86DGADirectVideo(ClientPtr client) -{ - int num; - PixmapPtr pix; - XDGAModeRec mode; - REQUEST(xXF86DGADirectVideoReq); - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - REQUEST_SIZE_MATCH(xXF86DGADirectVideoReq); - - if (!DGAAvailable(stuff->screen)) - return DGAErrorBase + XF86DGANoDirectVideoMode; - - if (stuff->enable & XF86DGADirectGraphics) { - if(!(num = DGAGetOldDGAMode(stuff->screen))) - return (DGAErrorBase + XF86DGANoDirectVideoMode); - } else - num = 0; - - if(Success != DGASetMode(stuff->screen, num, &mode, &pix)) - return (DGAErrorBase + XF86DGAScreenNotActive); - - DGASetInputMode (stuff->screen, - (stuff->enable & XF86DGADirectKeyb) != 0, - (stuff->enable & XF86DGADirectMouse) != 0); - - return (client->noClientException); -} - -static int -ProcXF86DGAGetViewPortSize(ClientPtr client) -{ - int num; - XDGAModeRec mode; - REQUEST(xXF86DGAGetViewPortSizeReq); - xXF86DGAGetViewPortSizeReply rep; - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - REQUEST_SIZE_MATCH(xXF86DGAGetViewPortSizeReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - - if (!DGAAvailable(stuff->screen)) - return (DGAErrorBase + XF86DGANoDirectVideoMode); - - if(!(num = DGAGetOldDGAMode(stuff->screen))) - return (DGAErrorBase + XF86DGANoDirectVideoMode); - - DGAGetModeInfo(stuff->screen, &mode, num); - - rep.width = mode.viewportWidth; - rep.height = mode.viewportHeight; - - WriteToClient(client, SIZEOF(xXF86DGAGetViewPortSizeReply), (char *)&rep); - return (client->noClientException); -} - -static int -ProcXF86DGASetViewPort(ClientPtr client) -{ - REQUEST(xXF86DGASetViewPortReq); - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - REQUEST_SIZE_MATCH(xXF86DGASetViewPortReq); - - if (!DGAActive(stuff->screen)) - { - int num; - PixmapPtr pix; - XDGAModeRec mode; - - if(!(num = DGAGetOldDGAMode(stuff->screen))) - return (DGAErrorBase + XF86DGANoDirectVideoMode); - if(Success != DGASetMode(stuff->screen, num, &mode, &pix)) - return (DGAErrorBase + XF86DGAScreenNotActive); - } - - if (DGASetViewport(stuff->screen, stuff->x, stuff->y, DGA_FLIP_RETRACE) - != Success) - return DGAErrorBase + XF86DGADirectNotActivated; - - return (client->noClientException); -} - -static int -ProcXF86DGAGetVidPage(ClientPtr client) -{ - REQUEST(xXF86DGAGetVidPageReq); - xXF86DGAGetVidPageReply rep; - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - REQUEST_SIZE_MATCH(xXF86DGAGetVidPageReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.vpage = 0; /* silently fail */ - - WriteToClient(client, SIZEOF(xXF86DGAGetVidPageReply), (char *)&rep); - return (client->noClientException); -} - - -static int -ProcXF86DGASetVidPage(ClientPtr client) -{ - REQUEST(xXF86DGASetVidPageReq); - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - REQUEST_SIZE_MATCH(xXF86DGASetVidPageReq); - - /* silently fail */ - - return (client->noClientException); -} - - -static int -ProcXF86DGAInstallColormap(ClientPtr client) -{ - ColormapPtr pcmp; - REQUEST(xXF86DGAInstallColormapReq); - - REQUEST_SIZE_MATCH(xXF86DGAInstallColormapReq); - - if (!DGAActive(stuff->screen)) - return (DGAErrorBase + XF86DGADirectNotActivated); - - pcmp = (ColormapPtr )LookupIDByType(stuff->id, RT_COLORMAP); - if (pcmp) { - DGAInstallCmap(pcmp); - return (client->noClientException); - } else { - client->errorValue = stuff->id; - return (BadColor); - } -} - -static int -ProcXF86DGAQueryDirectVideo(ClientPtr client) -{ - REQUEST(xXF86DGAQueryDirectVideoReq); - xXF86DGAQueryDirectVideoReply rep; - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - REQUEST_SIZE_MATCH(xXF86DGAQueryDirectVideoReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.flags = 0; - - if (DGAAvailable(stuff->screen)) - rep.flags = XF86DGADirectPresent; - - WriteToClient(client, SIZEOF(xXF86DGAQueryDirectVideoReply), (char *)&rep); - return (client->noClientException); -} - -static int -ProcXF86DGAViewPortChanged(ClientPtr client) -{ - REQUEST(xXF86DGAViewPortChangedReq); - xXF86DGAViewPortChangedReply rep; - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - REQUEST_SIZE_MATCH(xXF86DGAViewPortChangedReq); - - if (!DGAActive(stuff->screen)) - return (DGAErrorBase + XF86DGADirectNotActivated); - - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.result = 1; - - WriteToClient(client, SIZEOF(xXF86DGAViewPortChangedReply), (char *)&rep); - return (client->noClientException); -} - -int -ProcXF86DGADispatch(register ClientPtr client) -{ - REQUEST(xReq); - - switch (stuff->data) - { - case X_XF86DGAGetVideoLL: - return ProcXF86DGAGetVideoLL(client); - case X_XF86DGADirectVideo: - return ProcXF86DGADirectVideo(client); - case X_XF86DGAGetViewPortSize: - return ProcXF86DGAGetViewPortSize(client); - case X_XF86DGASetViewPort: - return ProcXF86DGASetViewPort(client); - case X_XF86DGAGetVidPage: - return ProcXF86DGAGetVidPage(client); - case X_XF86DGASetVidPage: - return ProcXF86DGASetVidPage(client); - case X_XF86DGAInstallColormap: - return ProcXF86DGAInstallColormap(client); - case X_XF86DGAQueryDirectVideo: - return ProcXF86DGAQueryDirectVideo(client); - case X_XF86DGAViewPortChanged: - return ProcXF86DGAViewPortChanged(client); - default: - return BadRequest; - } -} - diff --git a/nx-X11/programs/Xserver/Xext/xf86dga2.c b/nx-X11/programs/Xserver/Xext/xf86dga2.c deleted file mode 100644 index c2b64b048..000000000 --- a/nx-X11/programs/Xserver/Xext/xf86dga2.c +++ /dev/null @@ -1,775 +0,0 @@ -/* - Copyright (c) 1999 - The XFree86 Project Inc. - - Written by Mark Vojkovich -*/ -/* $XFree86: xc/programs/Xserver/Xext/xf86dga2.c,v 1.17 2001/10/28 03:32:51 tsi Exp $ */ - - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#define NEED_REPLIES -#define NEED_EVENTS -#include -#include -#include "misc.h" -#include "dixstruct.h" -#include "dixevents.h" -#include "pixmapstr.h" -#include "extnsionst.h" -#include "colormapst.h" -#include "cursorstr.h" -#include "scrnintstr.h" -#include "servermd.h" -#define _XF86DGA_SERVER_ -#include -#include -#include "swaprep.h" -#include "dgaproc.h" -#include "xf86dgaext.h" - -#ifdef EXTMODULE -#include "xf86_ansic.h" -#else -#include -#endif - -#include "modinit.h" - -static DISPATCH_PROC(ProcXDGADispatch); -static DISPATCH_PROC(SProcXDGADispatch); -static DISPATCH_PROC(ProcXDGAQueryVersion); -static DISPATCH_PROC(ProcXDGAQueryModes); -static DISPATCH_PROC(ProcXDGASetMode); -static DISPATCH_PROC(ProcXDGAOpenFramebuffer); -static DISPATCH_PROC(ProcXDGACloseFramebuffer); -static DISPATCH_PROC(ProcXDGASetViewport); -static DISPATCH_PROC(ProcXDGAInstallColormap); -static DISPATCH_PROC(ProcXDGASelectInput); -static DISPATCH_PROC(ProcXDGAFillRectangle); -static DISPATCH_PROC(ProcXDGACopyArea); -static DISPATCH_PROC(ProcXDGACopyTransparentArea); -static DISPATCH_PROC(ProcXDGAGetViewportStatus); -static DISPATCH_PROC(ProcXDGASync); -static DISPATCH_PROC(ProcXDGASetClientVersion); -static DISPATCH_PROC(ProcXDGAChangePixmapMode); -static DISPATCH_PROC(ProcXDGACreateColormap); - -static void XDGAResetProc(ExtensionEntry *extEntry); - -static void DGAClientStateChange (CallbackListPtr*, void *, void *); - -static ClientPtr DGAClients[MAXSCREENS]; - -unsigned char DGAReqCode = 0; -int DGAErrorBase; -int DGAEventBase; - -static int DGAGeneration = 0; -static int DGAClientPrivateIndex; -static int DGACallbackRefCount = 0; - -/* This holds the client's version information */ -typedef struct { - int major; - int minor; -} DGAPrivRec, *DGAPrivPtr; - -#define DGAPRIV(c) ((c)->devPrivates[DGAClientPrivateIndex].ptr) - -void -XFree86DGAExtensionInit(INITARGS) -{ - ExtensionEntry* extEntry; - - if ((extEntry = AddExtension(XF86DGANAME, - XF86DGANumberEvents, - XF86DGANumberErrors, - ProcXDGADispatch, - SProcXDGADispatch, - XDGAResetProc, - StandardMinorOpcode))) { - int i; - - for(i = 0; i < MAXSCREENS; i++) - DGAClients[i] = NULL; - - DGAReqCode = (unsigned char)extEntry->base; - DGAErrorBase = extEntry->errorBase; - DGAEventBase = extEntry->eventBase; - for (i = KeyPress; i <= MotionNotify; i++) - SetCriticalEvent (DGAEventBase + i); - } - - /* - * Allocate a client private index to hold the client's version - * information. - */ - if (DGAGeneration != serverGeneration) { - DGAClientPrivateIndex = AllocateClientPrivateIndex(); - /* - * Allocate 0 length, and use the private to hold a pointer to - * our DGAPrivRec. - */ - if (!AllocateClientPrivate(DGAClientPrivateIndex, 0)) { - ErrorF("XFree86DGAExtensionInit: AllocateClientPrivate failed\n"); - return; - } - DGAGeneration = serverGeneration; - } -} - - - -static void -XDGAResetProc (ExtensionEntry *extEntry) -{ - DeleteCallback (&ClientStateCallback, DGAClientStateChange, NULL); - DGACallbackRefCount = 0; -} - - -static int -ProcXDGAQueryVersion(ClientPtr client) -{ - xXDGAQueryVersionReply rep; - - REQUEST_SIZE_MATCH(xXDGAQueryVersionReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.majorVersion = XDGA_MAJOR_VERSION; - rep.minorVersion = XDGA_MINOR_VERSION; - - WriteToClient(client, sizeof(xXDGAQueryVersionReply), (char *)&rep); - return (client->noClientException); -} - - -static int -ProcXDGAOpenFramebuffer(ClientPtr client) -{ - REQUEST(xXDGAOpenFramebufferReq); - xXDGAOpenFramebufferReply rep; - char *deviceName; - int nameSize; - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - if (!DGAAvailable(stuff->screen)) - return DGAErrorBase + XF86DGANoDirectVideoMode; - - REQUEST_SIZE_MATCH(xXDGAOpenFramebufferReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - - if(!DGAOpenFramebuffer(stuff->screen, &deviceName, - (unsigned char**)(&rep.mem1), - (int*)&rep.size, (int*)&rep.offset, (int*)&rep.extra)) - { - return BadAlloc; - } - - nameSize = deviceName ? (strlen(deviceName) + 1) : 0; - rep.length = (nameSize + 3) >> 2; - - WriteToClient(client, sizeof(xXDGAOpenFramebufferReply), (char *)&rep); - if(rep.length) - WriteToClient(client, nameSize, deviceName); - - return (client->noClientException); -} - - -static int -ProcXDGACloseFramebuffer(ClientPtr client) -{ - REQUEST(xXDGACloseFramebufferReq); - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - if (!DGAAvailable(stuff->screen)) - return DGAErrorBase + XF86DGANoDirectVideoMode; - - REQUEST_SIZE_MATCH(xXDGACloseFramebufferReq); - - DGACloseFramebuffer(stuff->screen); - - return (client->noClientException); -} - -static int -ProcXDGAQueryModes(ClientPtr client) -{ - int i, num, size; - REQUEST(xXDGAQueryModesReq); - xXDGAQueryModesReply rep; - xXDGAModeInfo info; - XDGAModePtr mode; - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - REQUEST_SIZE_MATCH(xXDGAQueryModesReq); - rep.type = X_Reply; - rep.length = 0; - rep.number = 0; - rep.sequenceNumber = client->sequence; - - if (!DGAAvailable(stuff->screen)) { - rep.number = 0; - rep.length = 0; - WriteToClient(client, sz_xXDGAQueryModesReply, (char*)&rep); - return (client->noClientException); - } - - if(!(num = DGAGetModes(stuff->screen))) { - WriteToClient(client, sz_xXDGAQueryModesReply, (char*)&rep); - return (client->noClientException); - } - - if(!(mode = (XDGAModePtr)xalloc(num * sizeof(XDGAModeRec)))) - return BadAlloc; - - for(i = 0; i < num; i++) - DGAGetModeInfo(stuff->screen, mode + i, i + 1); - - size = num * sz_xXDGAModeInfo; - for(i = 0; i < num; i++) - size += (strlen(mode[i].name) + 4) & ~3L; /* plus NULL */ - - rep.number = num; - rep.length = size >> 2; - - WriteToClient(client, sz_xXDGAQueryModesReply, (char*)&rep); - - for(i = 0; i < num; i++) { - size = strlen(mode[i].name) + 1; - - info.byte_order = mode[i].byteOrder; - info.depth = mode[i].depth; - info.num = mode[i].num; - info.bpp = mode[i].bitsPerPixel; - info.name_size = (size + 3) & ~3L; - info.vsync_num = mode[i].VSync_num; - info.vsync_den = mode[i].VSync_den; - info.flags = mode[i].flags; - info.image_width = mode[i].imageWidth; - info.image_height = mode[i].imageHeight; - info.pixmap_width = mode[i].pixmapWidth; - info.pixmap_height = mode[i].pixmapHeight; - info.bytes_per_scanline = mode[i].bytesPerScanline; - info.red_mask = mode[i].red_mask; - info.green_mask = mode[i].green_mask; - info.blue_mask = mode[i].blue_mask; - info.visual_class = mode[i].visualClass; - info.viewport_width = mode[i].viewportWidth; - info.viewport_height = mode[i].viewportHeight; - info.viewport_xstep = mode[i].xViewportStep; - info.viewport_ystep = mode[i].yViewportStep; - info.viewport_xmax = mode[i].maxViewportX; - info.viewport_ymax = mode[i].maxViewportY; - info.viewport_flags = mode[i].viewportFlags; - info.reserved1 = mode[i].reserved1; - info.reserved2 = mode[i].reserved2; - - WriteToClient(client, sz_xXDGAModeInfo, (char*)(&info)); - WriteToClient(client, size, mode[i].name); - } - - xfree(mode); - - return (client->noClientException); -} - - -static void -DGAClientStateChange ( - CallbackListPtr* pcbl, - void * nulldata, - void * calldata -){ - NewClientInfoRec* pci = (NewClientInfoRec*) calldata; - ClientPtr client = NULL; - int i; - - for(i = 0; i < screenInfo.numScreens; i++) { - if(DGAClients[i] == pci->client) { - client = pci->client; - break; - } - } - - if(client && - ((client->clientState == ClientStateGone) || - (client->clientState == ClientStateRetained))) { - XDGAModeRec mode; - PixmapPtr pPix; - - DGAClients[i] = NULL; - DGASelectInput(i, NULL, 0); - DGASetMode(i, 0, &mode, &pPix); - - if(--DGACallbackRefCount == 0) - DeleteCallback(&ClientStateCallback, DGAClientStateChange, NULL); - } -} - -static int -ProcXDGASetMode(ClientPtr client) -{ - REQUEST(xXDGASetModeReq); - xXDGASetModeReply rep; - XDGAModeRec mode; - xXDGAModeInfo info; - PixmapPtr pPix; - int size; - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - REQUEST_SIZE_MATCH(xXDGASetModeReq); - rep.type = X_Reply; - rep.length = 0; - rep.offset = 0; - rep.flags = 0; - rep.sequenceNumber = client->sequence; - - if (!DGAAvailable(stuff->screen)) - return DGAErrorBase + XF86DGANoDirectVideoMode; - - if(DGAClients[stuff->screen] && - (DGAClients[stuff->screen] != client)) - return DGAErrorBase + XF86DGANoDirectVideoMode; - - if(!stuff->mode) { - if(DGAClients[stuff->screen]) { - if(--DGACallbackRefCount == 0) - DeleteCallback(&ClientStateCallback, DGAClientStateChange, NULL); - } - DGAClients[stuff->screen] = NULL; - DGASelectInput(stuff->screen, NULL, 0); - DGASetMode(stuff->screen, 0, &mode, &pPix); - WriteToClient(client, sz_xXDGASetModeReply, (char*)&rep); - return (client->noClientException); - } - - if(Success != DGASetMode(stuff->screen, stuff->mode, &mode, &pPix)) - return BadValue; - - if(!DGAClients[stuff->screen]) { - if(DGACallbackRefCount++ == 0) - AddCallback (&ClientStateCallback, DGAClientStateChange, NULL); - } - - DGAClients[stuff->screen] = client; - - if(pPix) { - if(AddResource(stuff->pid, RT_PIXMAP, (void *)(pPix))) { - pPix->drawable.id = (int)stuff->pid; - rep.flags = DGA_PIXMAP_AVAILABLE; - } - } - - size = strlen(mode.name) + 1; - - info.byte_order = mode.byteOrder; - info.depth = mode.depth; - info.num = mode.num; - info.bpp = mode.bitsPerPixel; - info.name_size = (size + 3) & ~3L; - info.vsync_num = mode.VSync_num; - info.vsync_den = mode.VSync_den; - info.flags = mode.flags; - info.image_width = mode.imageWidth; - info.image_height = mode.imageHeight; - info.pixmap_width = mode.pixmapWidth; - info.pixmap_height = mode.pixmapHeight; - info.bytes_per_scanline = mode.bytesPerScanline; - info.red_mask = mode.red_mask; - info.green_mask = mode.green_mask; - info.blue_mask = mode.blue_mask; - info.visual_class = mode.visualClass; - info.viewport_width = mode.viewportWidth; - info.viewport_height = mode.viewportHeight; - info.viewport_xstep = mode.xViewportStep; - info.viewport_ystep = mode.yViewportStep; - info.viewport_xmax = mode.maxViewportX; - info.viewport_ymax = mode.maxViewportY; - info.viewport_flags = mode.viewportFlags; - info.reserved1 = mode.reserved1; - info.reserved2 = mode.reserved2; - - rep.length = (sz_xXDGAModeInfo + info.name_size) >> 2; - - WriteToClient(client, sz_xXDGASetModeReply, (char*)&rep); - WriteToClient(client, sz_xXDGAModeInfo, (char*)(&info)); - WriteToClient(client, size, mode.name); - - return (client->noClientException); -} - -static int -ProcXDGASetViewport(ClientPtr client) -{ - REQUEST(xXDGASetViewportReq); - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - if(DGAClients[stuff->screen] != client) - return DGAErrorBase + XF86DGADirectNotActivated; - - REQUEST_SIZE_MATCH(xXDGASetViewportReq); - - DGASetViewport(stuff->screen, stuff->x, stuff->y, stuff->flags); - - return (client->noClientException); -} - -static int -ProcXDGAInstallColormap(ClientPtr client) -{ - ColormapPtr cmap; - REQUEST(xXDGAInstallColormapReq); - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - if(DGAClients[stuff->screen] != client) - return DGAErrorBase + XF86DGADirectNotActivated; - - REQUEST_SIZE_MATCH(xXDGAInstallColormapReq); - - cmap = (ColormapPtr)LookupIDByType(stuff->cmap, RT_COLORMAP); - if (cmap) { - DGAInstallCmap(cmap); - return (client->noClientException); - } else { - client->errorValue = stuff->cmap; - return (BadColor); - } - - return (client->noClientException); -} - - -static int -ProcXDGASelectInput(ClientPtr client) -{ - REQUEST(xXDGASelectInputReq); - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - if(DGAClients[stuff->screen] != client) - return DGAErrorBase + XF86DGADirectNotActivated; - - REQUEST_SIZE_MATCH(xXDGASelectInputReq); - - if(DGAClients[stuff->screen] == client) - DGASelectInput(stuff->screen, client, stuff->mask); - - return (client->noClientException); -} - - -static int -ProcXDGAFillRectangle(ClientPtr client) -{ - REQUEST(xXDGAFillRectangleReq); - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - if(DGAClients[stuff->screen] != client) - return DGAErrorBase + XF86DGADirectNotActivated; - - REQUEST_SIZE_MATCH(xXDGAFillRectangleReq); - - if(Success != DGAFillRect(stuff->screen, stuff->x, stuff->y, - stuff->width, stuff->height, stuff->color)) - return BadMatch; - - return (client->noClientException); -} - -static int -ProcXDGACopyArea(ClientPtr client) -{ - REQUEST(xXDGACopyAreaReq); - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - if(DGAClients[stuff->screen] != client) - return DGAErrorBase + XF86DGADirectNotActivated; - - REQUEST_SIZE_MATCH(xXDGACopyAreaReq); - - if(Success != DGABlitRect(stuff->screen, stuff->srcx, stuff->srcy, - stuff->width, stuff->height, stuff->dstx, stuff->dsty)) - return BadMatch; - - return (client->noClientException); -} - - -static int -ProcXDGACopyTransparentArea(ClientPtr client) -{ - REQUEST(xXDGACopyTransparentAreaReq); - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - if(DGAClients[stuff->screen] != client) - return DGAErrorBase + XF86DGADirectNotActivated; - - REQUEST_SIZE_MATCH(xXDGACopyTransparentAreaReq); - - if(Success != DGABlitTransRect(stuff->screen, stuff->srcx, stuff->srcy, - stuff->width, stuff->height, stuff->dstx, stuff->dsty, stuff->key)) - return BadMatch; - - return (client->noClientException); -} - - -static int -ProcXDGAGetViewportStatus(ClientPtr client) -{ - REQUEST(xXDGAGetViewportStatusReq); - xXDGAGetViewportStatusReply rep; - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - if(DGAClients[stuff->screen] != client) - return DGAErrorBase + XF86DGADirectNotActivated; - - REQUEST_SIZE_MATCH(xXDGAGetViewportStatusReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - - rep.status = DGAGetViewportStatus(stuff->screen); - - WriteToClient(client, sizeof(xXDGAGetViewportStatusReply), (char *)&rep); - return (client->noClientException); -} - -static int -ProcXDGASync(ClientPtr client) -{ - REQUEST(xXDGASyncReq); - xXDGASyncReply rep; - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - if(DGAClients[stuff->screen] != client) - return DGAErrorBase + XF86DGADirectNotActivated; - - REQUEST_SIZE_MATCH(xXDGASyncReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - - DGASync(stuff->screen); - - WriteToClient(client, sizeof(xXDGASyncReply), (char *)&rep); - return (client->noClientException); -} - -static int -ProcXDGASetClientVersion(ClientPtr client) -{ - REQUEST(xXDGASetClientVersionReq); - - DGAPrivPtr pPriv; - - REQUEST_SIZE_MATCH(xXDGASetClientVersionReq); - if ((pPriv = DGAPRIV(client)) == NULL) { - pPriv = xalloc(sizeof(DGAPrivRec)); - /* XXX Need to look into freeing this */ - if (!pPriv) - return BadAlloc; - DGAPRIV(client) = pPriv; - } - pPriv->major = stuff->major; - pPriv->minor = stuff->minor; - - return (client->noClientException); -} - -static int -ProcXDGAChangePixmapMode(ClientPtr client) -{ - REQUEST(xXDGAChangePixmapModeReq); - xXDGAChangePixmapModeReply rep; - int x, y; - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - if(DGAClients[stuff->screen] != client) - return DGAErrorBase + XF86DGADirectNotActivated; - - REQUEST_SIZE_MATCH(xXDGAChangePixmapModeReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - - x = stuff->x; - y = stuff->y; - - if(!DGAChangePixmapMode(stuff->screen, &x, &y, stuff->flags)) - return BadMatch; - - rep.x = x; - rep.y = y; - WriteToClient(client, sizeof(xXDGAChangePixmapModeReply), (char *)&rep); - - return (client->noClientException); -} - - -static int -ProcXDGACreateColormap(ClientPtr client) -{ - REQUEST(xXDGACreateColormapReq); - int result; - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - if(DGAClients[stuff->screen] != client) - return DGAErrorBase + XF86DGADirectNotActivated; - - REQUEST_SIZE_MATCH(xXDGACreateColormapReq); - - if(!stuff->mode) - return BadValue; - - result = DGACreateColormap(stuff->screen, client, stuff->id, - stuff->mode, stuff->alloc); - if(result != Success) - return result; - - return (client->noClientException); -} - - -static int -SProcXDGADispatch (ClientPtr client) -{ - return DGAErrorBase + XF86DGAClientNotLocal; -} - -#if 0 -#define DGA_REQ_DEBUG -#endif - -#ifdef DGA_REQ_DEBUG -static char *dgaMinor[] = { - "QueryVersion", - "GetVideoLL", - "DirectVideo", - "GetViewPortSize", - "SetViewPort", - "GetVidPage", - "SetVidPage", - "InstallColormap", - "QueryDirectVideo", - "ViewPortChanged", - "10", - "11", - "QueryModes", - "SetMode", - "SetViewport", - "InstallColormap", - "SelectInput", - "FillRectangle", - "CopyArea", - "CopyTransparentArea", - "GetViewportStatus", - "Sync", - "OpenFramebuffer", - "CloseFramebuffer", - "SetClientVersion", - "ChangePixmapMode", - "CreateColormap", -}; -#endif - -static int -ProcXDGADispatch (ClientPtr client) -{ - REQUEST(xReq); - - if (!LocalClient(client)) - return DGAErrorBase + XF86DGAClientNotLocal; - -#ifdef DGA_REQ_DEBUG - if (stuff->data <= X_XDGACreateColormap) - fprintf (stderr, " DGA %s\n", dgaMinor[stuff->data]); -#endif - - /* divert old protocol */ -#if 1 - if( (stuff->data <= X_XF86DGAViewPortChanged) && - (stuff->data >= X_XF86DGAGetVideoLL)) - return ProcXF86DGADispatch(client); -#endif - - switch (stuff->data){ - case X_XDGAQueryVersion: - return ProcXDGAQueryVersion(client); - case X_XDGAQueryModes: - return ProcXDGAQueryModes(client); - case X_XDGASetMode: - return ProcXDGASetMode(client); - case X_XDGAOpenFramebuffer: - return ProcXDGAOpenFramebuffer(client); - case X_XDGACloseFramebuffer: - return ProcXDGACloseFramebuffer(client); - case X_XDGASetViewport: - return ProcXDGASetViewport(client); - case X_XDGAInstallColormap: - return ProcXDGAInstallColormap(client); - case X_XDGASelectInput: - return ProcXDGASelectInput(client); - case X_XDGAFillRectangle: - return ProcXDGAFillRectangle(client); - case X_XDGACopyArea: - return ProcXDGACopyArea(client); - case X_XDGACopyTransparentArea: - return ProcXDGACopyTransparentArea(client); - case X_XDGAGetViewportStatus: - return ProcXDGAGetViewportStatus(client); - case X_XDGASync: - return ProcXDGASync(client); - case X_XDGASetClientVersion: - return ProcXDGASetClientVersion(client); - case X_XDGAChangePixmapMode: - return ProcXDGAChangePixmapMode(client); - case X_XDGACreateColormap: - return ProcXDGACreateColormap(client); - default: - return BadRequest; - } -} - -#ifdef EXTMODULE -void -XFree86DGARegister(INITARGS) -{ - XDGAEventBase = &DGAEventBase; -} -#endif diff --git a/nx-X11/programs/Xserver/Xext/xf86dgaext.h b/nx-X11/programs/Xserver/Xext/xf86dgaext.h deleted file mode 100644 index 16fc4c8b2..000000000 --- a/nx-X11/programs/Xserver/Xext/xf86dgaext.h +++ /dev/null @@ -1,12 +0,0 @@ -/* $XFree86$ */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef _XF86DGAEXT_H_ -#define _XF86DGAEXT_H_ - -extern DISPATCH_PROC(ProcXF86DGADispatch); - -#endif /* _XF86DGAEXT_H_ */ diff --git a/nx-X11/programs/Xserver/Xext/xf86misc.c b/nx-X11/programs/Xserver/Xext/xf86misc.c deleted file mode 100644 index ccf983fae..000000000 --- a/nx-X11/programs/Xserver/Xext/xf86misc.c +++ /dev/null @@ -1,854 +0,0 @@ -/* $XFree86: xc/programs/Xserver/Xext/xf86misc.c,v 3.41 2003/11/17 22:20:27 dawes Exp $ */ - -/* - * Copyright (c) 1995, 1996 The XFree86 Project, Inc - */ - -/* THIS IS NOT AN X CONSORTIUM STANDARD */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#define NEED_REPLIES -#define NEED_EVENTS -#include -#include -#include "misc.h" -#include "dixstruct.h" -#include "extnsionst.h" -#include "scrnintstr.h" -#include "inputstr.h" -#include "servermd.h" -#define _XF86MISC_SERVER_ -#undef _XF86MISC_SAVER_COMPAT_ -#include -#include "swaprep.h" -#include "xf86.h" -#include -#include "xf86miscproc.h" - -#if 0 -#include -#include "../os/osdep.h" -#include -#ifndef USL -#ifndef Lynx -#include -#else -#include -#endif -#endif /* USL */ -#endif - -#ifdef EXTMODULE -#include "xf86_ansic.h" -#endif - -static int miscErrorBase; -static int MiscGeneration = 0; -static int MiscClientPrivateIndex; - -/* This holds the client's version information */ -typedef struct { - int major; - int minor; -} MiscPrivRec, *MiscPrivPtr; - -#define MPRIV(c) ((c)->devPrivates[MiscClientPrivateIndex].ptr) - -static void XF86MiscResetProc( - ExtensionEntry* /* extEntry */ -); - -static void -ClientVersion(ClientPtr client, int *major, int *minor) -{ - MiscPrivPtr pPriv; - - pPriv = MPRIV(client); - if (!pPriv) { - if (major) *major = 0; - if (minor) *minor = 0; - return; - } - - if (major) *major = pPriv->major; - if (minor) *minor = pPriv->minor; -} - -static DISPATCH_PROC(ProcXF86MiscDispatch); -static DISPATCH_PROC(ProcXF86MiscQueryVersion); -static DISPATCH_PROC(ProcXF86MiscGetKbdSettings); -static DISPATCH_PROC(ProcXF86MiscGetMouseSettings); -static DISPATCH_PROC(ProcXF86MiscSetKbdSettings); -static DISPATCH_PROC(ProcXF86MiscSetMouseSettings); -static DISPATCH_PROC(ProcXF86MiscSetGrabKeysState); -static DISPATCH_PROC(ProcXF86MiscSetClientVersion); -static DISPATCH_PROC(ProcXF86MiscGetFilePaths); -static DISPATCH_PROC(ProcXF86MiscPassMessage); -#ifdef _XF86MISC_SAVER_COMPAT_ -static DISPATCH_PROC(ProcXF86MiscGetSaver); -static DISPATCH_PROC(ProcXF86MiscSetSaver); -#endif -static DISPATCH_PROC(SProcXF86MiscDispatch); -static DISPATCH_PROC(SProcXF86MiscQueryVersion); -static DISPATCH_PROC(SProcXF86MiscGetKbdSettings); -static DISPATCH_PROC(SProcXF86MiscGetMouseSettings); -static DISPATCH_PROC(SProcXF86MiscSetKbdSettings); -static DISPATCH_PROC(SProcXF86MiscSetMouseSettings); -static DISPATCH_PROC(SProcXF86MiscSetGrabKeysState); -static DISPATCH_PROC(SProcXF86MiscSetClientVersion); -static DISPATCH_PROC(SProcXF86MiscGetFilePaths); -static DISPATCH_PROC(SProcXF86MiscPassMessage); -#ifdef _XF86MISC_SAVER_COMPAT_ -static DISPATCH_PROC(SProcXF86MiscGetSaver); -static DISPATCH_PROC(SProcXF86MiscSetSaver); -#endif - -#if 0 -static unsigned char XF86MiscReqCode = 0; -#endif - -#ifdef DEBUG -# define DEBUG_P(x) ErrorF(x"\n"); -#else -# define DEBUG_P(x) /**/ -#endif - -#define MISCERR(x) (miscErrorBase + x) - -void -XFree86MiscExtensionInit(void) -{ - ExtensionEntry* extEntry; - - DEBUG_P("XFree86MiscExtensionInit"); - - if (!xf86GetModInDevEnabled()) - return; - - /* - * Allocate a client private index to hold the client's version - * information. - */ - if (MiscGeneration != serverGeneration) { - MiscClientPrivateIndex = AllocateClientPrivateIndex(); - /* - * Allocate 0 length, and use the private to hold a pointer to our - * MiscPrivRec. - */ - if (!AllocateClientPrivate(MiscClientPrivateIndex, 0)) { - ErrorF("XFree86MiscExtensionInit: " - "AllocateClientPrivate failed\n"); - return; - } - MiscGeneration = serverGeneration; - } - - if ( - (extEntry = AddExtension(XF86MISCNAME, - XF86MiscNumberEvents, - XF86MiscNumberErrors, - ProcXF86MiscDispatch, - SProcXF86MiscDispatch, - XF86MiscResetProc, - StandardMinorOpcode))) { -#if 0 - XF86MiscReqCode = (unsigned char)extEntry->base; -#endif - miscErrorBase = extEntry->errorBase; - } -} - -/*ARGSUSED*/ -static void -XF86MiscResetProc (extEntry) - ExtensionEntry* extEntry; -{ -} - -static int -ProcXF86MiscQueryVersion(client) - register ClientPtr client; -{ - xXF86MiscQueryVersionReply rep; - register int n; - - DEBUG_P("XF86MiscQueryVersion"); - - REQUEST_SIZE_MATCH(xXF86MiscQueryVersionReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.majorVersion = XF86MISC_MAJOR_VERSION; - rep.minorVersion = XF86MISC_MINOR_VERSION; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.majorVersion, n); - swaps(&rep.minorVersion, n); - } - WriteToClient(client, sizeof(xXF86MiscQueryVersionReply), (char *)&rep); - return (client->noClientException); -} - -#ifdef _XF86MISC_SAVER_COMPAT_ -/* THESE HAVE NOT BEEN CONVERTED TO THE NEW DESIGN */ - -/* - * This will go away, but remains for now for compatibility with older - * clients. - */ -static int -ProcXF86MiscSetSaver(client) - register ClientPtr client; -{ - REQUEST(xXF86MiscSetSaverReq); - ScrnInfoPtr vptr; - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - vptr = (ScrnInfoPtr) screenInfo.screens[stuff->screen]->devPrivates[xf86ScreenIndex].ptr; - - REQUEST_SIZE_MATCH(xXF86MiscSetSaverReq); - - if (stuff->suspendTime < 0) - return BadValue; - if (stuff->offTime < 0) - return BadValue; - - return (client->noClientException); -} - -/* - * This will go away, but remains for now for compatibility with older - * clients. - */ -static int -ProcXF86MiscGetSaver(client) - register ClientPtr client; -{ - REQUEST(xXF86MiscGetSaverReq); - xXF86MiscGetSaverReply rep; - register int n; - ScrnInfoPtr vptr; - - if (stuff->screen > screenInfo.numScreens) - return BadValue; - - vptr = (ScrnInfoPtr) screenInfo.screens[stuff->screen]->devPrivates[xf86ScreenIndex].ptr; - - REQUEST_SIZE_MATCH(xXF86MiscGetSaverReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.suspendTime = 0; - rep.offTime = 0; - - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.suspendTime, n); - swapl(&rep.offTime, n); - } - WriteToClient(client, SIZEOF(xXF86MiscGetSaverReply), (char *)&rep); - return (client->noClientException); -} - -#endif /* _XF86MISC_SAVER_COMPAT_ */ - -static int -ProcXF86MiscGetMouseSettings(client) - register ClientPtr client; -{ - xXF86MiscGetMouseSettingsReply rep; - char *devname; - void * mouse; - register int n; - - DEBUG_P("XF86MiscGetMouseSettings"); - - REQUEST_SIZE_MATCH(xXF86MiscGetMouseSettingsReq); - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - - if (!MiscExtGetMouseSettings(&mouse, &devname)) - return BadValue; - - rep.mousetype = MiscExtGetMouseValue(mouse, MISC_MSE_PROTO); - rep.baudrate = MiscExtGetMouseValue(mouse, MISC_MSE_BAUDRATE); - rep.samplerate = MiscExtGetMouseValue(mouse, MISC_MSE_SAMPLERATE); - rep.resolution = MiscExtGetMouseValue(mouse, MISC_MSE_RESOLUTION); - rep.buttons = MiscExtGetMouseValue(mouse, MISC_MSE_BUTTONS); - rep.emulate3buttons = MiscExtGetMouseValue(mouse, MISC_MSE_EM3BUTTONS); - rep.emulate3timeout = MiscExtGetMouseValue(mouse, MISC_MSE_EM3TIMEOUT); - rep.chordmiddle = MiscExtGetMouseValue(mouse, MISC_MSE_CHORDMIDDLE); - rep.flags = MiscExtGetMouseValue(mouse, MISC_MSE_FLAGS); - rep.devnamelen = (devname? strlen(devname): 0); - rep.length = (sizeof(xXF86MiscGetMouseSettingsReply) - - sizeof(xGenericReply) + ((rep.devnamelen+3) & ~3)) >> 2; - - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.mousetype, n); - swapl(&rep.baudrate, n); - swapl(&rep.samplerate, n); - swapl(&rep.resolution, n); - swapl(&rep.buttons, n); - swapl(&rep.emulate3buttons, n); - swapl(&rep.emulate3timeout, n); - swapl(&rep.chordmiddle, n); - swapl(&rep.flags, n); - } - WriteToClient(client, SIZEOF(xXF86MiscGetMouseSettingsReply), (char *)&rep); - MiscExtDestroyStruct(mouse, MISC_POINTER); - - if (rep.devnamelen) - WriteToClient(client, rep.devnamelen, devname); - return (client->noClientException); -} - -static int -ProcXF86MiscGetKbdSettings(client) - register ClientPtr client; -{ - xXF86MiscGetKbdSettingsReply rep; - void * kbd; - register int n; - - DEBUG_P("XF86MiscGetKbdSettings"); - - REQUEST_SIZE_MATCH(xXF86MiscGetKbdSettingsReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - if (!MiscExtGetKbdSettings(&kbd)) - return BadValue; - - rep.kbdtype = MiscExtGetKbdValue(kbd, MISC_KBD_TYPE); - rep.rate = MiscExtGetKbdValue(kbd, MISC_KBD_RATE); - rep.delay = MiscExtGetKbdValue(kbd, MISC_KBD_DELAY); - rep.servnumlock = MiscExtGetKbdValue(kbd, MISC_KBD_SERVNUMLOCK); - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.kbdtype, n); - swapl(&rep.rate, n); - swapl(&rep.delay, n); - } - WriteToClient(client, SIZEOF(xXF86MiscGetKbdSettingsReply), (char *)&rep); - return (client->noClientException); -} - -static int -ProcXF86MiscSetMouseSettings(client) - register ClientPtr client; -{ - MiscExtReturn ret; - void * mouse; - char *devname = NULL; - int major, minor; - - REQUEST(xXF86MiscSetMouseSettingsReq); - - DEBUG_P("XF86MiscSetMouseSettings"); - - REQUEST_AT_LEAST_SIZE(xXF86MiscSetMouseSettingsReq); - - ClientVersion(client, &major, &minor); - - if (xf86GetVerbosity() > 1) { - ErrorF("SetMouseSettings - type: %d brate: %d srate: %d chdmid: %d\n", - (int)stuff->mousetype, (int)stuff->baudrate, - (int)stuff->samplerate, stuff->chordmiddle); - ErrorF(" em3but: %d em3tim: %d res: %d flags: %ld\n", - stuff->emulate3buttons, (int)stuff->emulate3timeout, - (int)stuff->resolution, (unsigned long)stuff->flags); - } - - if ((mouse = MiscExtCreateStruct(MISC_POINTER)) == (void *) 0) - return BadAlloc; - - MiscExtSetMouseValue(mouse, MISC_MSE_PROTO, stuff->mousetype); - MiscExtSetMouseValue(mouse, MISC_MSE_BAUDRATE, stuff->baudrate); - MiscExtSetMouseValue(mouse, MISC_MSE_SAMPLERATE, stuff->samplerate); - MiscExtSetMouseValue(mouse, MISC_MSE_RESOLUTION, stuff->resolution); - MiscExtSetMouseValue(mouse, MISC_MSE_BUTTONS, stuff->buttons); - MiscExtSetMouseValue(mouse, MISC_MSE_EM3BUTTONS, stuff->emulate3buttons); - MiscExtSetMouseValue(mouse, MISC_MSE_EM3TIMEOUT, stuff->emulate3timeout); - MiscExtSetMouseValue(mouse, MISC_MSE_CHORDMIDDLE, stuff->chordmiddle); - MiscExtSetMouseValue(mouse, MISC_MSE_FLAGS, stuff->flags); - - if ((major > 0 || minor > 5) && stuff->devnamelen) { - int size = sizeof(xXF86MiscSetMouseSettingsReq) + stuff->devnamelen; - size = (size + 3) >> 2; - if (client->req_len < size) - return BadLength; - if (stuff->devnamelen) { - if (!(devname = xalloc(stuff->devnamelen))) - return BadAlloc; - strncpy(devname,(char*)(&stuff[1]),stuff->devnamelen); - if (xf86GetVerbosity() > 1) - ErrorF("SetMouseSettings - device: %s\n",devname); - MiscExtSetMouseDevice(mouse, devname); - } - } - - ret = MiscExtApply(mouse, MISC_POINTER); - - if (devname) - xfree(devname); - - switch ((ret)) { - case MISC_RET_SUCCESS: break; - case MISC_RET_BADVAL: return BadValue; - case MISC_RET_BADMSEPROTO: return MISCERR(XF86MiscBadMouseProtocol); - case MISC_RET_BADBAUDRATE: return MISCERR(XF86MiscBadMouseBaudRate); - case MISC_RET_BADFLAGS: return MISCERR(XF86MiscBadMouseFlags); - case MISC_RET_BADCOMBO: return MISCERR(XF86MiscBadMouseCombo); - case MISC_RET_NOMODULE: return MISCERR(XF86MiscNoModule); - default: - ErrorF("Unexpected return from MiscExtApply(POINTER) = %d\n", ret); - return BadImplementation; - } - - if (xf86GetVerbosity() > 1) - ErrorF("SetMouseSettings - Succeeded\n"); - return (client->noClientException); -} - -static int -ProcXF86MiscSetKbdSettings(client) - register ClientPtr client; -{ - MiscExtReturn ret; - void * kbd; - REQUEST(xXF86MiscSetKbdSettingsReq); - - DEBUG_P("XF86MiscSetKbdSettings"); - - REQUEST_SIZE_MATCH(xXF86MiscSetKbdSettingsReq); - - if (xf86GetVerbosity() > 1) - ErrorF("SetKbdSettings - type: %d rate: %d delay: %d snumlk: %d\n", - (int)stuff->kbdtype, (int)stuff->rate, - (int)stuff->delay, stuff->servnumlock); - - if ((kbd = MiscExtCreateStruct(MISC_KEYBOARD)) == (void *) 0) - return BadAlloc; - - MiscExtSetKbdValue(kbd, MISC_KBD_TYPE, stuff->kbdtype); - MiscExtSetKbdValue(kbd, MISC_KBD_RATE, stuff->rate); - MiscExtSetKbdValue(kbd, MISC_KBD_DELAY, stuff->delay); - MiscExtSetKbdValue(kbd, MISC_KBD_SERVNUMLOCK, stuff->servnumlock); - - switch ((ret = MiscExtApply(kbd, MISC_KEYBOARD))) { - case MISC_RET_SUCCESS: break; - case MISC_RET_BADVAL: return BadValue; - case MISC_RET_BADKBDTYPE: return MISCERR(XF86MiscBadKbdType); - default: - ErrorF("Unexpected return from MiscExtApply(KEYBOARD) = %d\n", ret); - return BadImplementation; - } - - if (xf86GetVerbosity() > 1) - ErrorF("SetKbdSettings - Succeeded\n"); - return (client->noClientException); -} - -static int -ProcXF86MiscSetGrabKeysState(client) - register ClientPtr client; -{ - int n, status; - xXF86MiscSetGrabKeysStateReply rep; - REQUEST(xXF86MiscSetGrabKeysStateReq); - - DEBUG_P("XF86MiscSetGrabKeysState"); - - REQUEST_SIZE_MATCH(xXF86MiscSetGrabKeysStateReq); - - if ((status = MiscExtSetGrabKeysState(client, stuff->enable)) == 0) { - if (xf86GetVerbosity() > 1) - ErrorF("SetGrabKeysState - %s\n", - stuff->enable ? "enabled" : "disabled"); - } - - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.status = status; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.status, n); - } - WriteToClient(client, SIZEOF(xXF86MiscSetGrabKeysStateReply), (char *)&rep); - - return (client->noClientException); -} - -static int -ProcXF86MiscSetClientVersion(ClientPtr client) -{ - REQUEST(xXF86MiscSetClientVersionReq); - - MiscPrivPtr pPriv; - - DEBUG_P("XF86MiscSetClientVersion"); - - REQUEST_SIZE_MATCH(xXF86MiscSetClientVersionReq); - - if ((pPriv = MPRIV(client)) == NULL) { - pPriv = xalloc(sizeof(MiscPrivRec)); - if (!pPriv) - return BadAlloc; - MPRIV(client) = pPriv; - } - ErrorF("SetClientVersion: %i %i\n",stuff->major,stuff->minor); - pPriv->major = stuff->major; - pPriv->minor = stuff->minor; - - return (client->noClientException); -} - -static int -ProcXF86MiscGetFilePaths(client) - register ClientPtr client; -{ - xXF86MiscGetFilePathsReply rep; - const char *configfile; - const char *modulepath; - const char *logfile; - register int n; - - DEBUG_P("XF86MiscGetFilePaths"); - - REQUEST_SIZE_MATCH(xXF86MiscGetFilePathsReq); - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - - if (!MiscExtGetFilePaths(&configfile, &modulepath, &logfile)) - return BadValue; - - rep.configlen = (configfile? strlen(configfile): 0); - rep.modulelen = (modulepath? strlen(modulepath): 0); - rep.loglen = (logfile? strlen(logfile): 0); - rep.length = (SIZEOF(xXF86MiscGetFilePathsReply) - SIZEOF(xGenericReply) + - ((rep.configlen + 3) & ~3) + - ((rep.modulelen + 3) & ~3) + - ((rep.loglen + 3) & ~3) ) >> 2; - - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.configlen, n); - swaps(&rep.modulelen, n); - swaps(&rep.loglen, n); - } - WriteToClient(client, SIZEOF(xXF86MiscGetFilePathsReply), (char *)&rep); - - if (rep.configlen) - WriteToClient(client, rep.configlen, (char *)configfile); - if (rep.modulelen) - WriteToClient(client, rep.modulelen, (char *)modulepath); - if (rep.loglen) - WriteToClient(client, rep.loglen, (char *)logfile); - - return (client->noClientException); -} - -static int -ProcXF86MiscPassMessage(client) - register ClientPtr client; -{ - xXF86MiscPassMessageReply rep; - char *msgtype, *msgval, *retstr; - int retval, size; - register int n; - - REQUEST(xXF86MiscPassMessageReq); - - DEBUG_P("XF86MiscPassMessage"); - - REQUEST_AT_LEAST_SIZE(xXF86MiscPassMessageReq); - size = (sizeof(xXF86MiscPassMessageReq) + 3) >> 2; - size+= (stuff->typelen + 3) >> 2; - size+= (stuff->vallen + 3) >> 2; - if (client->req_len < size) - return BadLength; - if (stuff->typelen) { - if (!(msgtype = xalloc(stuff->typelen))) - return BadAlloc; - strncpy(msgtype,(char*)(&stuff[1]),stuff->typelen); - } else return BadValue; - if (stuff->vallen) { - if (!(msgval = xalloc(stuff->vallen))) { - xfree(msgtype); - return BadAlloc; - } - strncpy(msgval,(char*)((char*)&stuff[1] + ((stuff->typelen + 3) & ~3)), - stuff->vallen); - } else { - xfree(msgtype); - return BadValue; - } - - if ((retval = MiscExtPassMessage(stuff->screen,msgtype,msgval,&retstr)) != 0) { - xfree(msgtype); - xfree(msgval); - return retval; - } - - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.mesglen = (retstr? strlen(retstr): 0); - rep.length = (SIZEOF(xXF86MiscPassMessageReply) - SIZEOF(xGenericReply) + - ((rep.mesglen + 3) & ~3)) >> 2; - rep.status = 0; - - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.mesglen, n); - } - WriteToClient(client, SIZEOF(xXF86MiscPassMessageReply), (char *)&rep); - - if (rep.mesglen) - WriteToClient(client, rep.mesglen, (char *)retstr); - - xfree(msgtype); - xfree(msgval); - - return (client->noClientException); -} - -static int -ProcXF86MiscDispatch (client) - register ClientPtr client; -{ - REQUEST(xReq); - switch (stuff->data) - { - case X_XF86MiscQueryVersion: - return ProcXF86MiscQueryVersion(client); -#ifdef _XF86MISC_SAVER_COMPAT_ - case X_XF86MiscGetSaver: - return ProcXF86MiscGetSaver(client); - case X_XF86MiscSetSaver: - return ProcXF86MiscSetSaver(client); -#endif - case X_XF86MiscGetMouseSettings: - return ProcXF86MiscGetMouseSettings(client); - case X_XF86MiscGetKbdSettings: - return ProcXF86MiscGetKbdSettings(client); - case X_XF86MiscSetClientVersion: - return ProcXF86MiscSetClientVersion(client); - case X_XF86MiscGetFilePaths: - return ProcXF86MiscGetFilePaths(client); - case X_XF86MiscPassMessage: - return ProcXF86MiscPassMessage(client); - default: - if (!xf86GetModInDevEnabled()) - return miscErrorBase + XF86MiscModInDevDisabled; - if (xf86GetModInDevAllowNonLocal() || LocalClient (client)) { - switch (stuff->data) { - case X_XF86MiscSetMouseSettings: - return ProcXF86MiscSetMouseSettings(client); - case X_XF86MiscSetKbdSettings: - return ProcXF86MiscSetKbdSettings(client); - case X_XF86MiscSetGrabKeysState: - return ProcXF86MiscSetGrabKeysState(client); - default: - return BadRequest; - } - } else - return miscErrorBase + XF86MiscModInDevClientNotLocal; - } -} - -static int -SProcXF86MiscQueryVersion(client) - register ClientPtr client; -{ - register int n; - REQUEST(xXF86MiscQueryVersionReq); - swaps(&stuff->length, n); - return ProcXF86MiscQueryVersion(client); -} - -#ifdef _XF86MISC_SAVER_COMPAT_ -static int -SProcXF86MiscGetSaver(client) - ClientPtr client; -{ - register int n; - REQUEST(xXF86MiscGetSaverReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86MiscGetSaverReq); - swaps(&stuff->screen, n); - return ProcXF86MiscGetSaver(client); -} - -static int -SProcXF86MiscSetSaver(client) - ClientPtr client; -{ - register int n; - REQUEST(xXF86MiscSetSaverReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86MiscSetSaverReq); - swaps(&stuff->screen, n); - swapl(&stuff->suspendTime, n); - swapl(&stuff->offTime, n); - return ProcXF86MiscSetSaver(client); -} -#endif /* _XF86MISC_SAVER_COMPAT_ */ - -static int -SProcXF86MiscGetMouseSettings(client) - ClientPtr client; -{ - register int n; - REQUEST(xXF86MiscGetMouseSettingsReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86MiscGetMouseSettingsReq); - return ProcXF86MiscGetMouseSettings(client); -} - -static int -SProcXF86MiscGetKbdSettings(client) - ClientPtr client; -{ - register int n; - REQUEST(xXF86MiscGetKbdSettingsReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86MiscGetKbdSettingsReq); - return ProcXF86MiscGetKbdSettings(client); -} - -static int -SProcXF86MiscSetMouseSettings(client) - ClientPtr client; -{ - register int n; - REQUEST(xXF86MiscSetMouseSettingsReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86MiscSetMouseSettingsReq); - swapl(&stuff->mousetype, n); - swapl(&stuff->baudrate, n); - swapl(&stuff->samplerate, n); - swapl(&stuff->resolution, n); - swapl(&stuff->buttons, n); - swapl(&stuff->emulate3timeout, n); - swapl(&stuff->flags, n); - return ProcXF86MiscSetMouseSettings(client); -} - -static int -SProcXF86MiscSetKbdSettings(client) - ClientPtr client; -{ - register int n; - REQUEST(xXF86MiscSetKbdSettingsReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86MiscSetKbdSettingsReq); - swapl(&stuff->kbdtype, n); - swapl(&stuff->rate, n); - swapl(&stuff->delay, n); - return ProcXF86MiscSetKbdSettings(client); -} - -static int -SProcXF86MiscSetGrabKeysState(client) - ClientPtr client; -{ - register int n; - REQUEST(xXF86MiscSetGrabKeysStateReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86MiscSetGrabKeysStateReq); - swaps(&stuff->enable, n); - return ProcXF86MiscSetGrabKeysState(client); -} - -static int -SProcXF86MiscSetClientVersion(ClientPtr client) -{ - register int n; - REQUEST(xXF86MiscSetClientVersionReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86MiscSetClientVersionReq); - swaps(&stuff->major, n); - swaps(&stuff->minor, n); - return ProcXF86MiscSetClientVersion(client); -} - -static int -SProcXF86MiscGetFilePaths(client) - ClientPtr client; -{ - register int n; - REQUEST(xXF86MiscGetFilePathsReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86MiscGetFilePathsReq); - return ProcXF86MiscGetFilePaths(client); -} - -static int -SProcXF86MiscPassMessage(client) - ClientPtr client; -{ - register int n; - REQUEST(xXF86MiscPassMessageReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86MiscPassMessageReq); - return ProcXF86MiscPassMessage(client); -} - -static int -SProcXF86MiscDispatch (client) - register ClientPtr client; -{ - REQUEST(xReq); - switch (stuff->data) - { - case X_XF86MiscQueryVersion: - return SProcXF86MiscQueryVersion(client); -#ifdef _XF86MISC_SAVER_COMPAT_ - case X_XF86MiscGetSaver: - return SProcXF86MiscGetSaver(client); - case X_XF86MiscSetSaver: - return SProcXF86MiscSetSaver(client); -#endif - case X_XF86MiscGetMouseSettings: - return SProcXF86MiscGetMouseSettings(client); - case X_XF86MiscGetKbdSettings: - return SProcXF86MiscGetKbdSettings(client); - case X_XF86MiscSetClientVersion: - return SProcXF86MiscSetClientVersion(client); - case X_XF86MiscGetFilePaths: - return SProcXF86MiscGetFilePaths(client); - case X_XF86MiscPassMessage: - return SProcXF86MiscPassMessage(client); - default: - if (!xf86GetModInDevEnabled()) - return miscErrorBase + XF86MiscModInDevDisabled; - if (xf86GetModInDevAllowNonLocal() || LocalClient (client)) { - switch (stuff->data) { - case X_XF86MiscSetMouseSettings: - return SProcXF86MiscSetMouseSettings(client); - case X_XF86MiscSetKbdSettings: - return SProcXF86MiscSetKbdSettings(client); - case X_XF86MiscSetGrabKeysState: - return SProcXF86MiscSetGrabKeysState(client); - default: - return BadRequest; - } - } else - return miscErrorBase + XF86MiscModInDevClientNotLocal; - } -} - diff --git a/nx-X11/programs/Xserver/Xext/xf86miscproc.h b/nx-X11/programs/Xserver/Xext/xf86miscproc.h deleted file mode 100644 index 5eefa02a3..000000000 --- a/nx-X11/programs/Xserver/Xext/xf86miscproc.h +++ /dev/null @@ -1,70 +0,0 @@ -/* $XFree86: xc/programs/Xserver/Xext/xf86miscproc.h,v 1.5 2002/11/20 04:04:58 dawes Exp $ */ - -/* Prototypes for Pointer/Keyboard functions that the DDX must provide */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#ifndef _XF86MISCPROC_H_ -#define _XF86MISCPROC_H_ - -typedef enum { - MISC_MSE_PROTO, - MISC_MSE_BAUDRATE, - MISC_MSE_SAMPLERATE, - MISC_MSE_RESOLUTION, - MISC_MSE_BUTTONS, - MISC_MSE_EM3BUTTONS, - MISC_MSE_EM3TIMEOUT, - MISC_MSE_CHORDMIDDLE, - MISC_MSE_FLAGS -} MiscExtMseValType; - -typedef enum { - MISC_KBD_TYPE, - MISC_KBD_RATE, - MISC_KBD_DELAY, - MISC_KBD_SERVNUMLOCK -} MiscExtKbdValType; - -typedef enum { - MISC_RET_SUCCESS, - MISC_RET_BADVAL, - MISC_RET_BADMSEPROTO, - MISC_RET_BADBAUDRATE, - MISC_RET_BADFLAGS, - MISC_RET_BADCOMBO, - MISC_RET_BADKBDTYPE, - MISC_RET_NOMODULE -} MiscExtReturn; - -typedef enum { - MISC_POINTER, - MISC_KEYBOARD -} MiscExtStructType; - -#define MISC_MSEFLAG_CLEARDTR 1 -#define MISC_MSEFLAG_CLEARRTS 2 -#define MISC_MSEFLAG_REOPEN 128 - -void XFree86MiscExtensionInit(void); - -Bool MiscExtGetMouseSettings(void **mouse, char **devname); -int MiscExtGetMouseValue(void * mouse, MiscExtMseValType valtype); -Bool MiscExtSetMouseValue(void * mouse, MiscExtMseValType valtype, int value); -Bool MiscExtGetKbdSettings(void **kbd); -int MiscExtGetKbdValue(void * kbd, MiscExtKbdValType valtype); -Bool MiscExtSetKbdValue(void * kbd, MiscExtKbdValType valtype, int value); -int MiscExtSetGrabKeysState(ClientPtr client, int enable); -void * MiscExtCreateStruct(MiscExtStructType mse_or_kbd); -void MiscExtDestroyStruct(void * structure, MiscExtStructType mse_or_kbd); -MiscExtReturn MiscExtApply(void * structure, MiscExtStructType mse_or_kbd); -Bool MiscExtSetMouseDevice(void * mouse, char* device); -Bool MiscExtGetFilePaths(const char **configfile, const char **modulepath, - const char **logfile); -int MiscExtPassMessage(int scrn, const char *msgtype, const char *msgval, - char **retstr); - -#endif - diff --git a/nx-X11/programs/Xserver/Xext/xf86vmode.c b/nx-X11/programs/Xserver/Xext/xf86vmode.c deleted file mode 100644 index 0595343c9..000000000 --- a/nx-X11/programs/Xserver/Xext/xf86vmode.c +++ /dev/null @@ -1,2206 +0,0 @@ -/* $XFree86: xc/programs/Xserver/Xext/xf86vmode.c,v 3.58 2003/11/06 18:37:57 tsi Exp $ */ - -/* - -Copyright 1995 Kaleb S. KEITHLEY - -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 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 Kaleb S. KEITHLEY 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. - -Except as contained in this notice, the name of Kaleb S. KEITHLEY -shall not be used in advertising or otherwise to promote the sale, use -or other dealings in this Software without prior written authorization -from Kaleb S. KEITHLEY - -*/ -/* $XdotOrg: xc/programs/Xserver/Xext/xf86vmode.c,v 1.8 2005/07/16 03:49:58 kem Exp $ */ -/* $Xorg: xf86vmode.c,v 1.3 2000/08/17 19:47:59 cpqbld Exp $ */ -/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */ - -#ifdef HAVE_XORG_CONFIG_H -#include -#endif - -#define NEED_REPLIES -#define NEED_EVENTS -#include -#include -#include "misc.h" -#include "dixstruct.h" -#include "extnsionst.h" -#include "scrnintstr.h" -#include "servermd.h" -#define _XF86VIDMODE_SERVER_ -#include -#include "swaprep.h" -#include "xf86.h" -#include "vidmodeproc.h" - -#ifdef EXTMODULE -#include "xf86_ansic.h" -#endif - -#define DEFAULT_XF86VIDMODE_VERBOSITY 3 - -static int VidModeErrorBase; -static int VidModeGeneration = 0; -static int VidModeClientPrivateIndex; - -/* This holds the client's version information */ -typedef struct { - int major; - int minor; -} VidModePrivRec, *VidModePrivPtr; - -#define VMPRIV(c) ((c)->devPrivates[VidModeClientPrivateIndex].ptr) - -static void XF86VidModeResetProc( - ExtensionEntry* /* extEntry */ -); - -static DISPATCH_PROC(ProcXF86VidModeDispatch); -static DISPATCH_PROC(ProcXF86VidModeGetAllModeLines); -static DISPATCH_PROC(ProcXF86VidModeGetModeLine); -static DISPATCH_PROC(ProcXF86VidModeGetMonitor); -static DISPATCH_PROC(ProcXF86VidModeLockModeSwitch); -static DISPATCH_PROC(ProcXF86VidModeAddModeLine); -static DISPATCH_PROC(ProcXF86VidModeDeleteModeLine); -static DISPATCH_PROC(ProcXF86VidModeModModeLine); -static DISPATCH_PROC(ProcXF86VidModeValidateModeLine); -static DISPATCH_PROC(ProcXF86VidModeQueryVersion); -static DISPATCH_PROC(ProcXF86VidModeSwitchMode); -static DISPATCH_PROC(ProcXF86VidModeSwitchToMode); -static DISPATCH_PROC(ProcXF86VidModeGetViewPort); -static DISPATCH_PROC(ProcXF86VidModeSetViewPort); -static DISPATCH_PROC(ProcXF86VidModeGetDotClocks); -static DISPATCH_PROC(ProcXF86VidModeSetGamma); -static DISPATCH_PROC(ProcXF86VidModeGetGamma); -static DISPATCH_PROC(ProcXF86VidModeSetClientVersion); -static DISPATCH_PROC(ProcXF86VidModeGetGammaRamp); -static DISPATCH_PROC(ProcXF86VidModeSetGammaRamp); -static DISPATCH_PROC(ProcXF86VidModeGetGammaRampSize); -static DISPATCH_PROC(SProcXF86VidModeDispatch); -static DISPATCH_PROC(SProcXF86VidModeGetAllModeLines); -static DISPATCH_PROC(SProcXF86VidModeGetModeLine); -static DISPATCH_PROC(SProcXF86VidModeGetMonitor); -static DISPATCH_PROC(SProcXF86VidModeLockModeSwitch); -static DISPATCH_PROC(SProcXF86VidModeAddModeLine); -static DISPATCH_PROC(SProcXF86VidModeDeleteModeLine); -static DISPATCH_PROC(SProcXF86VidModeModModeLine); -static DISPATCH_PROC(SProcXF86VidModeValidateModeLine); -static DISPATCH_PROC(SProcXF86VidModeQueryVersion); -static DISPATCH_PROC(SProcXF86VidModeSwitchMode); -static DISPATCH_PROC(SProcXF86VidModeSwitchToMode); -static DISPATCH_PROC(SProcXF86VidModeGetViewPort); -static DISPATCH_PROC(SProcXF86VidModeSetViewPort); -static DISPATCH_PROC(SProcXF86VidModeGetDotClocks); -static DISPATCH_PROC(SProcXF86VidModeSetGamma); -static DISPATCH_PROC(SProcXF86VidModeGetGamma); -static DISPATCH_PROC(SProcXF86VidModeSetClientVersion); -static DISPATCH_PROC(SProcXF86VidModeGetGammaRamp); -static DISPATCH_PROC(SProcXF86VidModeSetGammaRamp); -static DISPATCH_PROC(SProcXF86VidModeGetGammaRampSize); - -#if 0 -static unsigned char XF86VidModeReqCode = 0; -#endif - -/* The XF86VIDMODE_EVENTS code is far from complete */ - -#ifdef XF86VIDMODE_EVENTS -static int XF86VidModeEventBase = 0; - -static void SXF86VidModeNotifyEvent(); - xXF86VidModeNotifyEvent * /* from */, - xXF86VidModeNotifyEvent * /* to */ -); - -extern WindowPtr *WindowTable; - -static RESTYPE EventType; /* resource type for event masks */ - -typedef struct _XF86VidModeEvent *XF86VidModeEventPtr; - -typedef struct _XF86VidModeEvent { - XF86VidModeEventPtr next; - ClientPtr client; - ScreenPtr screen; - XID resource; - CARD32 mask; -} XF86VidModeEventRec; - -static int XF86VidModeFreeEvents(); - -typedef struct _XF86VidModeScreenPrivate { - XF86VidModeEventPtr events; - Bool hasWindow; -} XF86VidModeScreenPrivateRec, *XF86VidModeScreenPrivatePtr; - -static int ScreenPrivateIndex; - -#define GetScreenPrivate(s) ((ScreenSaverScreenPrivatePtr)(s)->devPrivates[ScreenPrivateIndex].ptr) -#define SetScreenPrivate(s,v) ((s)->devPrivates[ScreenPrivateIndex].ptr = (void *) v); -#define SetupScreen(s) ScreenSaverScreenPrivatePtr pPriv = GetScreenPrivate(s) - -#define New(t) (xalloc (sizeof (t))) -#endif - -#ifdef DEBUG -# define DEBUG_P(x) ErrorF(x"\n"); -#else -# define DEBUG_P(x) /**/ -#endif - -void -XFree86VidModeExtensionInit(void) -{ - ExtensionEntry* extEntry; - ScreenPtr pScreen; - int i; - Bool enabled = FALSE; - - DEBUG_P("XFree86VidModeExtensionInit"); - -#ifdef XF86VIDMODE_EVENTS - EventType = CreateNewResourceType(XF86VidModeFreeEvents); - ScreenPrivateIndex = AllocateScreenPrivateIndex (); -#endif - - for(i = 0; i < screenInfo.numScreens; i++) { - pScreen = screenInfo.screens[i]; - if (VidModeExtensionInit(pScreen)) - enabled = TRUE; -#ifdef XF86VIDMODE_EVENTS - SetScreenPrivate (pScreen, NULL); -#endif - } - /* This means that the DDX doesn't want the vidmode extension enabled */ - if (!enabled) - return; - - /* - * Allocate a client private index to hold the client's version - * information. - */ - if (VidModeGeneration != serverGeneration) { - VidModeClientPrivateIndex = AllocateClientPrivateIndex(); - /* - * Allocate 0 length, and use the private to hold a pointer to our - * VidModePrivRec. - */ - if (!AllocateClientPrivate(VidModeClientPrivateIndex, 0)) { - ErrorF("XFree86VidModeExtensionInit: " - "AllocateClientPrivate failed\n"); - return; - } - VidModeGeneration = serverGeneration; - } - - if ( -#ifdef XF86VIDMODE_EVENTS - EventType && ScreenPrivateIndex != -1 && -#endif - (extEntry = AddExtension(XF86VIDMODENAME, - XF86VidModeNumberEvents, - XF86VidModeNumberErrors, - ProcXF86VidModeDispatch, - SProcXF86VidModeDispatch, - XF86VidModeResetProc, - StandardMinorOpcode))) { -#if 0 - XF86VidModeReqCode = (unsigned char)extEntry->base; -#endif - VidModeErrorBase = extEntry->errorBase; -#ifdef XF86VIDMODE_EVENTS - XF86VidModeEventBase = extEntry->eventBase; - EventSwapVector[XF86VidModeEventBase] = (EventSwapPtr)SXF86VidModeNotifyEvent; -#endif - } -} - -/*ARGSUSED*/ -static void -XF86VidModeResetProc (extEntry) - ExtensionEntry* extEntry; -{ -} - -static int -ClientMajorVersion(ClientPtr client) -{ - VidModePrivPtr pPriv; - - pPriv = VMPRIV(client); - if (!pPriv) - return 0; - else - return pPriv->major; -} - -#ifdef XF86VIDMODE_EVENTS -static void -CheckScreenPrivate (pScreen) - ScreenPtr pScreen; -{ - SetupScreen (pScreen); - - if (!pPriv) - return; - if (!pPriv->events && !pPriv->hasWindow) { - xfree (pPriv); - SetScreenPrivate (pScreen, NULL); - } -} - -static XF86VidModeScreenPrivatePtr -MakeScreenPrivate (pScreen) - ScreenPtr pScreen; -{ - SetupScreen (pScreen); - - if (pPriv) - return pPriv; - pPriv = New (XF86VidModeScreenPrivateRec); - if (!pPriv) - return 0; - pPriv->events = 0; - pPriv->hasWindow = FALSE; - SetScreenPrivate (pScreen, pPriv); - return pPriv; -} - -static unsigned long -getEventMask (ScreenPtr pScreen, ClientPtr client) -{ - SetupScreen(pScreen); - XF86VidModeEventPtr pEv; - - if (!pPriv) - return 0; - for (pEv = pPriv->events; pEv; pEv = pEv->next) - if (pEv->client == client) - return pEv->mask; - return 0; -} - -static Bool -setEventMask (ScreenPtr pScreen, ClientPtr client, unsigned long mask) -{ - SetupScreen(pScreen); - XF86VidModeEventPtr pEv, *pPrev; - - if (getEventMask (pScreen, client) == mask) - return TRUE; - if (!pPriv) { - pPriv = MakeScreenPrivate (pScreen); - if (!pPriv) - return FALSE; - } - for (pPrev = &pPriv->events; pEv = *pPrev; pPrev = &pEv->next) - if (pEv->client == client) - break; - if (mask == 0) { - *pPrev = pEv->next; - xfree (pEv); - CheckScreenPrivate (pScreen); - } else { - if (!pEv) { - pEv = New (ScreenSaverEventRec); - if (!pEv) { - CheckScreenPrivate (pScreen); - return FALSE; - } - *pPrev = pEv; - pEv->next = NULL; - pEv->client = client; - pEv->screen = pScreen; - pEv->resource = FakeClientID (client->index); - } - pEv->mask = mask; - } - return TRUE; -} - -static int -XF86VidModeFreeEvents(void * value, XID id) -{ - XF86VidModeEventPtr pOld = (XF86VidModeEventPtr)value; - ScreenPtr pScreen = pOld->screen; - SetupScreen (pScreen); - XF86VidModeEventPtr pEv, *pPrev; - - if (!pPriv) - return TRUE; - for (pPrev = &pPriv->events; pEv = *pPrev; pPrev = &pEv->next) - if (pEv == pOld) - break; - if (!pEv) - return TRUE; - *pPrev = pEv->next; - xfree (pEv); - CheckScreenPrivate (pScreen); - return TRUE; -} - -static void -SendXF86VidModeNotify(ScreenPtr pScreen, int state, Bool forced) -{ - XF86VidModeScreenPrivatePtr pPriv; - XF86VidModeEventPtr pEv; - unsigned long mask; - xXF86VidModeNotifyEvent ev; - ClientPtr client; - int kind; - - UpdateCurrentTimeIf (); - mask = XF86VidModeNotifyMask; - pScreen = screenInfo.screens[pScreen->myNum]; - pPriv = GetScreenPrivate(pScreen); - if (!pPriv) - return; - kind = XF86VidModeModeChange; - for (pEv = pPriv->events; pEv; pEv = pEv->next) - { - client = pEv->client; - if (client->clientGone) - continue; - if (!(pEv->mask & mask)) - continue; - ev.type = XF86VidModeNotify + XF86VidModeEventBase; - ev.state = state; - ev.sequenceNumber = client->sequence; - ev.timestamp = currentTime.milliseconds; - ev.root = WindowTable[pScreen->myNum]->drawable.id; - ev.kind = kind; - ev.forced = forced; - WriteEventsToClient (client, 1, (xEvent *) &ev); - } -} - -static void -SXF86VidModeNotifyEvent(xXF86VidModeNotifyEvent *from, - xXF86VidModeNotifyEvent *to) -{ - to->type = from->type; - to->state = from->state; - cpswaps (from->sequenceNumber, to->sequenceNumber); - cpswapl (from->timestamp, to->timestamp); - cpswapl (from->root, to->root); - to->kind = from->kind; - to->forced = from->forced; -} -#endif - -static int -ProcXF86VidModeQueryVersion(ClientPtr client) -{ - xXF86VidModeQueryVersionReply rep; - register int n; - - DEBUG_P("XF86VidModeQueryVersion"); - - REQUEST_SIZE_MATCH(xXF86VidModeQueryVersionReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.majorVersion = XF86VIDMODE_MAJOR_VERSION; - rep.minorVersion = XF86VIDMODE_MINOR_VERSION; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.majorVersion, n); - swaps(&rep.minorVersion, n); - } - WriteToClient(client, sizeof(xXF86VidModeQueryVersionReply), (char *)&rep); - return (client->noClientException); -} - -static int -ProcXF86VidModeGetModeLine(ClientPtr client) -{ - REQUEST(xXF86VidModeGetModeLineReq); - xXF86VidModeGetModeLineReply rep; - xXF86OldVidModeGetModeLineReply oldrep; - void * mode; - register int n; - int dotClock; - int ver; - - DEBUG_P("XF86VidModeGetModeline"); - - ver = ClientMajorVersion(client); - REQUEST_SIZE_MATCH(xXF86VidModeGetModeLineReq); - rep.type = X_Reply; - if (ver < 2) { - rep.length = (SIZEOF(xXF86OldVidModeGetModeLineReply) - - SIZEOF(xGenericReply)) >> 2; - } else { - rep.length = (SIZEOF(xXF86VidModeGetModeLineReply) - - SIZEOF(xGenericReply)) >> 2; - } - rep.sequenceNumber = client->sequence; - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - if (!VidModeGetCurrentModeline(stuff->screen, &mode, &dotClock)) - return BadValue; - - rep.dotclock = dotClock; - rep.hdisplay = VidModeGetModeValue(mode, VIDMODE_H_DISPLAY); - rep.hsyncstart = VidModeGetModeValue(mode, VIDMODE_H_SYNCSTART); - rep.hsyncend = VidModeGetModeValue(mode, VIDMODE_H_SYNCEND); - rep.htotal = VidModeGetModeValue(mode, VIDMODE_H_TOTAL); - rep.hskew = VidModeGetModeValue(mode, VIDMODE_H_SKEW); - rep.vdisplay = VidModeGetModeValue(mode, VIDMODE_V_DISPLAY); - rep.vsyncstart = VidModeGetModeValue(mode, VIDMODE_V_SYNCSTART); - rep.vsyncend = VidModeGetModeValue(mode, VIDMODE_V_SYNCEND); - rep.vtotal = VidModeGetModeValue(mode, VIDMODE_V_TOTAL); - rep.flags = VidModeGetModeValue(mode, VIDMODE_FLAGS); - - if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) { - ErrorF("GetModeLine - scrn: %d clock: %ld\n", - stuff->screen, (unsigned long)rep.dotclock); - ErrorF("GetModeLine - hdsp: %d hbeg: %d hend: %d httl: %d\n", - rep.hdisplay, rep.hsyncstart, - rep.hsyncend, rep.htotal); - ErrorF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %ld\n", - rep.vdisplay, rep.vsyncstart, rep.vsyncend, - rep.vtotal, (unsigned long)rep.flags); - } - - /* - * Older servers sometimes had server privates that the VidMode - * extention made available. So to be compatiable pretend that - * there are no server privates to pass to the client - */ - rep.privsize = 0; - - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.dotclock, n); - swaps(&rep.hdisplay, n); - swaps(&rep.hsyncstart, n); - swaps(&rep.hsyncend, n); - swaps(&rep.htotal, n); - swaps(&rep.hskew, n); - swaps(&rep.vdisplay, n); - swaps(&rep.vsyncstart, n); - swaps(&rep.vsyncend, n); - swaps(&rep.vtotal, n); - swapl(&rep.flags, n); - swapl(&rep.privsize, n); - } - if (ver < 2) { - oldrep.type = rep.type; - oldrep.sequenceNumber = rep.sequenceNumber; - oldrep.length = rep.length; - oldrep.dotclock = rep.dotclock; - oldrep.hdisplay = rep.hdisplay; - oldrep.hsyncstart = rep.hsyncstart; - oldrep.hsyncend = rep.hsyncend; - oldrep.htotal = rep.htotal; - oldrep.vdisplay = rep.vdisplay; - oldrep.vsyncstart = rep.vsyncstart; - oldrep.vsyncend = rep.vsyncend; - oldrep.vtotal = rep.vtotal; - oldrep.flags = rep.flags; - oldrep.privsize = rep.privsize; - WriteToClient(client, sizeof(xXF86OldVidModeGetModeLineReply), - (char *)&oldrep); - } else { - WriteToClient(client, sizeof(xXF86VidModeGetModeLineReply), - (char *)&rep); - } - return (client->noClientException); -} - -static int -ProcXF86VidModeGetAllModeLines(ClientPtr client) -{ - REQUEST(xXF86VidModeGetAllModeLinesReq); - xXF86VidModeGetAllModeLinesReply rep; - xXF86VidModeModeInfo mdinf; - xXF86OldVidModeModeInfo oldmdinf; - void * mode; - int modecount, dotClock; - register int n; - int ver; - - DEBUG_P("XF86VidModeGetAllModelines"); - - REQUEST_SIZE_MATCH(xXF86VidModeGetAllModeLinesReq); - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - ver = ClientMajorVersion(client); - - modecount = VidModeGetNumOfModes(stuff->screen); - if (modecount < 1) - return (VidModeErrorBase + XF86VidModeExtensionDisabled); - - if (!VidModeGetFirstModeline(stuff->screen, &mode, &dotClock)) - return BadValue; - - rep.type = X_Reply; - rep.length = SIZEOF(xXF86VidModeGetAllModeLinesReply) - - SIZEOF(xGenericReply); - if (ver < 2) - rep.length += modecount * sizeof(xXF86OldVidModeModeInfo); - else - rep.length += modecount * sizeof(xXF86VidModeModeInfo); - rep.length >>= 2; - rep.sequenceNumber = client->sequence; - rep.modecount = modecount; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.modecount, n); - } - WriteToClient(client, sizeof(xXF86VidModeGetAllModeLinesReply), (char *)&rep); - - do { - mdinf.dotclock = dotClock; - mdinf.hdisplay = VidModeGetModeValue(mode, VIDMODE_H_DISPLAY); - mdinf.hsyncstart = VidModeGetModeValue(mode, VIDMODE_H_SYNCSTART); - mdinf.hsyncend = VidModeGetModeValue(mode, VIDMODE_H_SYNCEND); - mdinf.htotal = VidModeGetModeValue(mode, VIDMODE_H_TOTAL); - mdinf.hskew = VidModeGetModeValue(mode, VIDMODE_H_SKEW); - mdinf.vdisplay = VidModeGetModeValue(mode, VIDMODE_V_DISPLAY); - mdinf.vsyncstart = VidModeGetModeValue(mode, VIDMODE_V_SYNCSTART); - mdinf.vsyncend = VidModeGetModeValue(mode, VIDMODE_V_SYNCEND); - mdinf.vtotal = VidModeGetModeValue(mode, VIDMODE_V_TOTAL); - mdinf.flags = VidModeGetModeValue(mode, VIDMODE_FLAGS); - mdinf.privsize = 0; - if (client->swapped) { - swapl(&mdinf.dotclock, n); - swaps(&mdinf.hdisplay, n); - swaps(&mdinf.hsyncstart, n); - swaps(&mdinf.hsyncend, n); - swaps(&mdinf.htotal, n); - swaps(&mdinf.hskew, n); - swaps(&mdinf.vdisplay, n); - swaps(&mdinf.vsyncstart, n); - swaps(&mdinf.vsyncend, n); - swaps(&mdinf.vtotal, n); - swapl(&mdinf.flags, n); - swapl(&mdinf.privsize, n); - } - if (ver < 2) { - oldmdinf.dotclock = mdinf.dotclock; - oldmdinf.hdisplay = mdinf.hdisplay; - oldmdinf.hsyncstart = mdinf.hsyncstart; - oldmdinf.hsyncend = mdinf.hsyncend; - oldmdinf.htotal = mdinf.htotal; - oldmdinf.vdisplay = mdinf.vdisplay; - oldmdinf.vsyncstart = mdinf.vsyncstart; - oldmdinf.vsyncend = mdinf.vsyncend; - oldmdinf.vtotal = mdinf.vtotal; - oldmdinf.flags = mdinf.flags; - oldmdinf.privsize = mdinf.privsize; - WriteToClient(client, sizeof(xXF86OldVidModeModeInfo), - (char *)&oldmdinf); - } else { - WriteToClient(client, sizeof(xXF86VidModeModeInfo), (char *)&mdinf); - } - - } while (VidModeGetNextModeline(stuff->screen, &mode, &dotClock)); - - return (client->noClientException); -} - -#define MODEMATCH(mode,stuff) \ - (VidModeGetModeValue(mode, VIDMODE_H_DISPLAY) == stuff->hdisplay \ - && VidModeGetModeValue(mode, VIDMODE_H_SYNCSTART) == stuff->hsyncstart \ - && VidModeGetModeValue(mode, VIDMODE_H_SYNCEND) == stuff->hsyncend \ - && VidModeGetModeValue(mode, VIDMODE_H_TOTAL) == stuff->htotal \ - && VidModeGetModeValue(mode, VIDMODE_V_DISPLAY) == stuff->vdisplay \ - && VidModeGetModeValue(mode, VIDMODE_V_SYNCSTART) == stuff->vsyncstart \ - && VidModeGetModeValue(mode, VIDMODE_V_SYNCEND) == stuff->vsyncend \ - && VidModeGetModeValue(mode, VIDMODE_V_TOTAL) == stuff->vtotal \ - && VidModeGetModeValue(mode, VIDMODE_FLAGS) == stuff->flags ) - -static int -ProcXF86VidModeAddModeLine(ClientPtr client) -{ - REQUEST(xXF86VidModeAddModeLineReq); - xXF86OldVidModeAddModeLineReq *oldstuff = - (xXF86OldVidModeAddModeLineReq *)client->requestBuffer; - xXF86VidModeAddModeLineReq newstuff; - void * mode; - int len; - int dotClock; - int ver; - - DEBUG_P("XF86VidModeAddModeline"); - - ver = ClientMajorVersion(client); - if (ver < 2) { - /* convert from old format */ - stuff = &newstuff; - stuff->length = oldstuff->length; - stuff->screen = oldstuff->screen; - stuff->dotclock = oldstuff->dotclock; - stuff->hdisplay = oldstuff->hdisplay; - stuff->hsyncstart = oldstuff->hsyncstart; - stuff->hsyncend = oldstuff->hsyncend; - stuff->htotal = oldstuff->htotal; - stuff->hskew = 0; - stuff->vdisplay = oldstuff->vdisplay; - stuff->vsyncstart = oldstuff->vsyncstart; - stuff->vsyncend = oldstuff->vsyncend; - stuff->vtotal = oldstuff->vtotal; - stuff->flags = oldstuff->flags; - stuff->privsize = oldstuff->privsize; - stuff->after_dotclock = oldstuff->after_dotclock; - stuff->after_hdisplay = oldstuff->after_hdisplay; - stuff->after_hsyncstart = oldstuff->after_hsyncstart; - stuff->after_hsyncend = oldstuff->after_hsyncend; - stuff->after_htotal = oldstuff->after_htotal; - stuff->after_hskew = 0; - stuff->after_vdisplay = oldstuff->after_vdisplay; - stuff->after_vsyncstart = oldstuff->after_vsyncstart; - stuff->after_vsyncend = oldstuff->after_vsyncend; - stuff->after_vtotal = oldstuff->after_vtotal; - stuff->after_flags = oldstuff->after_flags; - } - if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) { - ErrorF("AddModeLine - scrn: %d clock: %ld\n", - (int)stuff->screen, (unsigned long)stuff->dotclock); - ErrorF("AddModeLine - hdsp: %d hbeg: %d hend: %d httl: %d\n", - stuff->hdisplay, stuff->hsyncstart, - stuff->hsyncend, stuff->htotal); - ErrorF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %ld\n", - stuff->vdisplay, stuff->vsyncstart, stuff->vsyncend, - stuff->vtotal, (unsigned long)stuff->flags); - ErrorF(" after - scrn: %d clock: %ld\n", - (int)stuff->screen, (unsigned long)stuff->after_dotclock); - ErrorF(" hdsp: %d hbeg: %d hend: %d httl: %d\n", - stuff->after_hdisplay, stuff->after_hsyncstart, - stuff->after_hsyncend, stuff->after_htotal); - ErrorF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %ld\n", - stuff->after_vdisplay, stuff->after_vsyncstart, - stuff->after_vsyncend, stuff->after_vtotal, - (unsigned long)stuff->after_flags); - } - - if (ver < 2) { - REQUEST_AT_LEAST_SIZE(xXF86OldVidModeAddModeLineReq); - len = client->req_len - (sizeof(xXF86OldVidModeAddModeLineReq) >> 2); - } else { - REQUEST_AT_LEAST_SIZE(xXF86VidModeAddModeLineReq); - len = client->req_len - (sizeof(xXF86VidModeAddModeLineReq) >> 2); - } - if (len != stuff->privsize) - return BadLength; - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - if (stuff->hsyncstart < stuff->hdisplay || - stuff->hsyncend < stuff->hsyncstart || - stuff->htotal < stuff->hsyncend || - stuff->vsyncstart < stuff->vdisplay || - stuff->vsyncend < stuff->vsyncstart || - stuff->vtotal < stuff->vsyncend) - return BadValue; - - if (stuff->after_hsyncstart < stuff->after_hdisplay || - stuff->after_hsyncend < stuff->after_hsyncstart || - stuff->after_htotal < stuff->after_hsyncend || - stuff->after_vsyncstart < stuff->after_vdisplay || - stuff->after_vsyncend < stuff->after_vsyncstart || - stuff->after_vtotal < stuff->after_vsyncend) - return BadValue; - - if (stuff->after_htotal != 0 || stuff->after_vtotal != 0) { - Bool found = FALSE; - if (VidModeGetFirstModeline(stuff->screen, &mode, &dotClock)) { - do { - if ((VidModeGetDotClock(stuff->screen, stuff->dotclock) - == dotClock) && MODEMATCH(mode, stuff)) { - found = TRUE; - break; - } - } while (VidModeGetNextModeline(stuff->screen, &mode, &dotClock)); - } - if (!found) - return BadValue; - } - - - mode = VidModeCreateMode(); - if (mode == NULL) - return BadValue; - - VidModeSetModeValue(mode, VIDMODE_CLOCK, stuff->dotclock); - VidModeSetModeValue(mode, VIDMODE_H_DISPLAY, stuff->hdisplay); - VidModeSetModeValue(mode, VIDMODE_H_SYNCSTART, stuff->hsyncstart); - VidModeSetModeValue(mode, VIDMODE_H_SYNCEND, stuff->hsyncend); - VidModeSetModeValue(mode, VIDMODE_H_TOTAL, stuff->htotal); - VidModeSetModeValue(mode, VIDMODE_H_SKEW, stuff->hskew); - VidModeSetModeValue(mode, VIDMODE_V_DISPLAY, stuff->vdisplay); - VidModeSetModeValue(mode, VIDMODE_V_SYNCSTART, stuff->vsyncstart); - VidModeSetModeValue(mode, VIDMODE_V_SYNCEND, stuff->vsyncend); - VidModeSetModeValue(mode, VIDMODE_V_TOTAL, stuff->vtotal); - VidModeSetModeValue(mode, VIDMODE_FLAGS, stuff->flags); - - if (stuff->privsize) - ErrorF("AddModeLine - Privates in request have been ignored\n"); - - /* Check that the mode is consistent with the monitor specs */ - switch (VidModeCheckModeForMonitor(stuff->screen, mode)) { - case MODE_OK: - break; - case MODE_HSYNC: - case MODE_H_ILLEGAL: - xfree(mode); - return VidModeErrorBase + XF86VidModeBadHTimings; - case MODE_VSYNC: - case MODE_V_ILLEGAL: - xfree(mode); - return VidModeErrorBase + XF86VidModeBadVTimings; - default: - xfree(mode); - return VidModeErrorBase + XF86VidModeModeUnsuitable; - } - - /* Check that the driver is happy with the mode */ - if (VidModeCheckModeForDriver(stuff->screen, mode) != MODE_OK) { - xfree(mode); - return VidModeErrorBase + XF86VidModeModeUnsuitable; - } - - VidModeSetCrtcForMode(stuff->screen, mode); - - VidModeAddModeline(stuff->screen, mode); - - if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) - ErrorF("AddModeLine - Succeeded\n"); - return client->noClientException; -} - -static int -ProcXF86VidModeDeleteModeLine(ClientPtr client) -{ - REQUEST(xXF86VidModeDeleteModeLineReq); - xXF86OldVidModeDeleteModeLineReq *oldstuff = - (xXF86OldVidModeDeleteModeLineReq *)client->requestBuffer; - xXF86VidModeDeleteModeLineReq newstuff; - void * mode; - int len, dotClock; - int ver; - - DEBUG_P("XF86VidModeDeleteModeline"); - - ver = ClientMajorVersion(client); - if (ver < 2) { - /* convert from old format */ - stuff = &newstuff; - stuff->length = oldstuff->length; - stuff->screen = oldstuff->screen; - stuff->dotclock = oldstuff->dotclock; - stuff->hdisplay = oldstuff->hdisplay; - stuff->hsyncstart = oldstuff->hsyncstart; - stuff->hsyncend = oldstuff->hsyncend; - stuff->htotal = oldstuff->htotal; - stuff->hskew = 0; - stuff->vdisplay = oldstuff->vdisplay; - stuff->vsyncstart = oldstuff->vsyncstart; - stuff->vsyncend = oldstuff->vsyncend; - stuff->vtotal = oldstuff->vtotal; - stuff->flags = oldstuff->flags; - stuff->privsize = oldstuff->privsize; - } - if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) { - ErrorF("DeleteModeLine - scrn: %d clock: %ld\n", - (int)stuff->screen, (unsigned long)stuff->dotclock); - ErrorF(" hdsp: %d hbeg: %d hend: %d httl: %d\n", - stuff->hdisplay, stuff->hsyncstart, - stuff->hsyncend, stuff->htotal); - ErrorF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %ld\n", - stuff->vdisplay, stuff->vsyncstart, stuff->vsyncend, - stuff->vtotal, (unsigned long)stuff->flags); - } - - if (ver < 2) { - REQUEST_AT_LEAST_SIZE(xXF86OldVidModeDeleteModeLineReq); - len = client->req_len - (sizeof(xXF86OldVidModeDeleteModeLineReq) >> 2); - } else { - REQUEST_AT_LEAST_SIZE(xXF86VidModeDeleteModeLineReq); - len = client->req_len - (sizeof(xXF86VidModeDeleteModeLineReq) >> 2); - } - if (len != stuff->privsize) { - if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) { - ErrorF("req_len = %ld, sizeof(Req) = %d, privsize = %ld, " - "len = %d, length = %d\n", - (unsigned long)client->req_len, - (int)sizeof(xXF86VidModeDeleteModeLineReq)>>2, - (unsigned long)stuff->privsize, len, stuff->length); - } - return BadLength; - } - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - if (!VidModeGetCurrentModeline(stuff->screen, &mode, &dotClock)) - return BadValue; - - if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) { - ErrorF("Checking against clock: %d (%d)\n", - VidModeGetModeValue(mode, VIDMODE_CLOCK), dotClock); - ErrorF(" hdsp: %d hbeg: %d hend: %d httl: %d\n", - VidModeGetModeValue(mode, VIDMODE_H_DISPLAY), - VidModeGetModeValue(mode, VIDMODE_H_SYNCSTART), - VidModeGetModeValue(mode, VIDMODE_H_SYNCEND), - VidModeGetModeValue(mode, VIDMODE_H_TOTAL)); - ErrorF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %d\n", - VidModeGetModeValue(mode, VIDMODE_V_DISPLAY), - VidModeGetModeValue(mode, VIDMODE_V_SYNCSTART), - VidModeGetModeValue(mode, VIDMODE_V_SYNCEND), - VidModeGetModeValue(mode, VIDMODE_V_TOTAL), - VidModeGetModeValue(mode, VIDMODE_FLAGS)); - } - if ((VidModeGetDotClock(stuff->screen, stuff->dotclock) == dotClock) && - MODEMATCH(mode, stuff)) - return BadValue; - - if (!VidModeGetFirstModeline(stuff->screen, &mode, &dotClock)) - return BadValue; - - do { - if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) { - ErrorF("Checking against clock: %d (%d)\n", - VidModeGetModeValue(mode, VIDMODE_CLOCK), dotClock); - ErrorF(" hdsp: %d hbeg: %d hend: %d httl: %d\n", - VidModeGetModeValue(mode, VIDMODE_H_DISPLAY), - VidModeGetModeValue(mode, VIDMODE_H_SYNCSTART), - VidModeGetModeValue(mode, VIDMODE_H_SYNCEND), - VidModeGetModeValue(mode, VIDMODE_H_TOTAL)); - ErrorF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %d\n", - VidModeGetModeValue(mode, VIDMODE_V_DISPLAY), - VidModeGetModeValue(mode, VIDMODE_V_SYNCSTART), - VidModeGetModeValue(mode, VIDMODE_V_SYNCEND), - VidModeGetModeValue(mode, VIDMODE_V_TOTAL), - VidModeGetModeValue(mode, VIDMODE_FLAGS)); - } - if ((VidModeGetDotClock(stuff->screen, stuff->dotclock) == dotClock) && - MODEMATCH(mode, stuff)) { - VidModeDeleteModeline(stuff->screen, mode); - if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) - ErrorF("DeleteModeLine - Succeeded\n"); - return(client->noClientException); - } - } while (VidModeGetNextModeline(stuff->screen, &mode, &dotClock)); - - return BadValue; -} - -static int -ProcXF86VidModeModModeLine(ClientPtr client) -{ - REQUEST(xXF86VidModeModModeLineReq); - xXF86OldVidModeModModeLineReq *oldstuff = - (xXF86OldVidModeModModeLineReq *)client->requestBuffer; - xXF86VidModeModModeLineReq newstuff; - void * mode, modetmp; - int len, dotClock; - int ver; - - DEBUG_P("XF86VidModeModModeline"); - - ver = ClientMajorVersion(client); - if (ver < 2 ) { - /* convert from old format */ - stuff = &newstuff; - stuff->length = oldstuff->length; - stuff->screen = oldstuff->screen; - stuff->hdisplay = oldstuff->hdisplay; - stuff->hsyncstart = oldstuff->hsyncstart; - stuff->hsyncend = oldstuff->hsyncend; - stuff->htotal = oldstuff->htotal; - stuff->hskew = 0; - stuff->vdisplay = oldstuff->vdisplay; - stuff->vsyncstart = oldstuff->vsyncstart; - stuff->vsyncend = oldstuff->vsyncend; - stuff->vtotal = oldstuff->vtotal; - stuff->flags = oldstuff->flags; - stuff->privsize = oldstuff->privsize; - } - if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) { - ErrorF("ModModeLine - scrn: %d hdsp: %d hbeg: %d hend: %d httl: %d\n", - (int)stuff->screen, stuff->hdisplay, stuff->hsyncstart, - stuff->hsyncend, stuff->htotal); - ErrorF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %ld\n", - stuff->vdisplay, stuff->vsyncstart, stuff->vsyncend, - stuff->vtotal, (unsigned long)stuff->flags); - } - - if (ver < 2) { - REQUEST_AT_LEAST_SIZE(xXF86OldVidModeModModeLineReq); - len = client->req_len - (sizeof(xXF86OldVidModeModModeLineReq) >> 2); - } else { - REQUEST_AT_LEAST_SIZE(xXF86VidModeModModeLineReq); - len = client->req_len - (sizeof(xXF86VidModeModModeLineReq) >> 2); - } - if (len != stuff->privsize) - return BadLength; - - if (stuff->hsyncstart < stuff->hdisplay || - stuff->hsyncend < stuff->hsyncstart || - stuff->htotal < stuff->hsyncend || - stuff->vsyncstart < stuff->vdisplay || - stuff->vsyncend < stuff->vsyncstart || - stuff->vtotal < stuff->vsyncend) - return BadValue; - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - if (!VidModeGetCurrentModeline(stuff->screen, &mode, &dotClock)) - return BadValue; - - modetmp = VidModeCreateMode(); - VidModeCopyMode(mode, modetmp); - - VidModeSetModeValue(modetmp, VIDMODE_H_DISPLAY, stuff->hdisplay); - VidModeSetModeValue(modetmp, VIDMODE_H_SYNCSTART, stuff->hsyncstart); - VidModeSetModeValue(modetmp, VIDMODE_H_SYNCEND, stuff->hsyncend); - VidModeSetModeValue(modetmp, VIDMODE_H_TOTAL, stuff->htotal); - VidModeSetModeValue(modetmp, VIDMODE_H_SKEW, stuff->hskew); - VidModeSetModeValue(modetmp, VIDMODE_V_DISPLAY, stuff->vdisplay); - VidModeSetModeValue(modetmp, VIDMODE_V_SYNCSTART, stuff->vsyncstart); - VidModeSetModeValue(modetmp, VIDMODE_V_SYNCEND, stuff->vsyncend); - VidModeSetModeValue(modetmp, VIDMODE_V_TOTAL, stuff->vtotal); - VidModeSetModeValue(modetmp, VIDMODE_FLAGS, stuff->flags); - - if (stuff->privsize) - ErrorF("ModModeLine - Privates in request have been ignored\n"); - - /* Check that the mode is consistent with the monitor specs */ - switch (VidModeCheckModeForMonitor(stuff->screen, modetmp)) { - case MODE_OK: - break; - case MODE_HSYNC: - case MODE_H_ILLEGAL: - xfree(modetmp); - return VidModeErrorBase + XF86VidModeBadHTimings; - case MODE_VSYNC: - case MODE_V_ILLEGAL: - xfree(modetmp); - return VidModeErrorBase + XF86VidModeBadVTimings; - default: - xfree(modetmp); - return VidModeErrorBase + XF86VidModeModeUnsuitable; - } - - /* Check that the driver is happy with the mode */ - if (VidModeCheckModeForDriver(stuff->screen, modetmp) != MODE_OK) { - xfree(modetmp); - return VidModeErrorBase + XF86VidModeModeUnsuitable; - } - xfree(modetmp); - - VidModeSetModeValue(mode, VIDMODE_H_DISPLAY, stuff->hdisplay); - VidModeSetModeValue(mode, VIDMODE_H_SYNCSTART, stuff->hsyncstart); - VidModeSetModeValue(mode, VIDMODE_H_SYNCEND, stuff->hsyncend); - VidModeSetModeValue(mode, VIDMODE_H_TOTAL, stuff->htotal); - VidModeSetModeValue(mode, VIDMODE_H_SKEW, stuff->hskew); - VidModeSetModeValue(mode, VIDMODE_V_DISPLAY, stuff->vdisplay); - VidModeSetModeValue(mode, VIDMODE_V_SYNCSTART, stuff->vsyncstart); - VidModeSetModeValue(mode, VIDMODE_V_SYNCEND, stuff->vsyncend); - VidModeSetModeValue(mode, VIDMODE_V_TOTAL, stuff->vtotal); - VidModeSetModeValue(mode, VIDMODE_FLAGS, stuff->flags); - - VidModeSetCrtcForMode(stuff->screen, mode); - VidModeSwitchMode(stuff->screen, mode); - - if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) - ErrorF("ModModeLine - Succeeded\n"); - return(client->noClientException); -} - -static int -ProcXF86VidModeValidateModeLine(ClientPtr client) -{ - REQUEST(xXF86VidModeValidateModeLineReq); - xXF86OldVidModeValidateModeLineReq *oldstuff = - (xXF86OldVidModeValidateModeLineReq *)client->requestBuffer; - xXF86VidModeValidateModeLineReq newstuff; - xXF86VidModeValidateModeLineReply rep; - void * mode, modetmp = NULL; - int len, status, dotClock; - int ver; - - DEBUG_P("XF86VidModeValidateModeline"); - - ver = ClientMajorVersion(client); - if (ver < 2) { - /* convert from old format */ - stuff = &newstuff; - stuff->length = oldstuff->length; - stuff->screen = oldstuff->screen; - stuff->dotclock = oldstuff->dotclock; - stuff->hdisplay = oldstuff->hdisplay; - stuff->hsyncstart = oldstuff->hsyncstart; - stuff->hsyncend = oldstuff->hsyncend; - stuff->htotal = oldstuff->htotal; - stuff->hskew = 0; - stuff->vdisplay = oldstuff->vdisplay; - stuff->vsyncstart = oldstuff->vsyncstart; - stuff->vsyncend = oldstuff->vsyncend; - stuff->vtotal = oldstuff->vtotal; - stuff->flags = oldstuff->flags; - stuff->privsize = oldstuff->privsize; - } - if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) { - ErrorF("ValidateModeLine - scrn: %d clock: %ld\n", - (int)stuff->screen, (unsigned long)stuff->dotclock); - ErrorF(" hdsp: %d hbeg: %d hend: %d httl: %d\n", - stuff->hdisplay, stuff->hsyncstart, - stuff->hsyncend, stuff->htotal); - ErrorF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %ld\n", - stuff->vdisplay, stuff->vsyncstart, stuff->vsyncend, - stuff->vtotal, (unsigned long)stuff->flags); - } - - if (ver < 2) { - REQUEST_AT_LEAST_SIZE(xXF86OldVidModeValidateModeLineReq); - len = client->req_len - - (sizeof(xXF86OldVidModeValidateModeLineReq) >> 2); - } else { - REQUEST_AT_LEAST_SIZE(xXF86VidModeValidateModeLineReq); - len = client->req_len - (sizeof(xXF86VidModeValidateModeLineReq) >> 2); - } - if (len != stuff->privsize) - return BadLength; - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - status = MODE_OK; - - if (stuff->hsyncstart < stuff->hdisplay || - stuff->hsyncend < stuff->hsyncstart || - stuff->htotal < stuff->hsyncend || - stuff->vsyncstart < stuff->vdisplay || - stuff->vsyncend < stuff->vsyncstart || - stuff->vtotal < stuff->vsyncend) - { - status = MODE_BAD; - goto status_reply; - } - - if (!VidModeGetCurrentModeline(stuff->screen, &mode, &dotClock)) - return BadValue; - - modetmp = VidModeCreateMode(); - VidModeCopyMode(mode, modetmp); - - VidModeSetModeValue(modetmp, VIDMODE_H_DISPLAY, stuff->hdisplay); - VidModeSetModeValue(modetmp, VIDMODE_H_SYNCSTART, stuff->hsyncstart); - VidModeSetModeValue(modetmp, VIDMODE_H_SYNCEND, stuff->hsyncend); - VidModeSetModeValue(modetmp, VIDMODE_H_TOTAL, stuff->htotal); - VidModeSetModeValue(modetmp, VIDMODE_H_SKEW, stuff->hskew); - VidModeSetModeValue(modetmp, VIDMODE_V_DISPLAY, stuff->vdisplay); - VidModeSetModeValue(modetmp, VIDMODE_V_SYNCSTART, stuff->vsyncstart); - VidModeSetModeValue(modetmp, VIDMODE_V_SYNCEND, stuff->vsyncend); - VidModeSetModeValue(modetmp, VIDMODE_V_TOTAL, stuff->vtotal); - VidModeSetModeValue(modetmp, VIDMODE_FLAGS, stuff->flags); - if (stuff->privsize) - ErrorF("ValidateModeLine - Privates in request have been ignored\n"); - - /* Check that the mode is consistent with the monitor specs */ - if ((status = VidModeCheckModeForMonitor(stuff->screen, modetmp)) != MODE_OK) - goto status_reply; - - /* Check that the driver is happy with the mode */ - status = VidModeCheckModeForDriver(stuff->screen, modetmp); - -status_reply: - if(modetmp) - xfree(modetmp); - - rep.type = X_Reply; - rep.length = (SIZEOF(xXF86VidModeValidateModeLineReply) - - SIZEOF(xGenericReply)) >> 2; - rep.sequenceNumber = client->sequence; - rep.status = status; - if (client->swapped) { - register int n; - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.status, n); - } - WriteToClient(client, sizeof(xXF86VidModeValidateModeLineReply), (char *)&rep); - if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) - ErrorF("ValidateModeLine - Succeeded (status = %d)\n", status); - return(client->noClientException); -} - -static int -ProcXF86VidModeSwitchMode(ClientPtr client) -{ - REQUEST(xXF86VidModeSwitchModeReq); - - DEBUG_P("XF86VidModeSwitchMode"); - - REQUEST_SIZE_MATCH(xXF86VidModeSwitchModeReq); - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - VidModeZoomViewport(stuff->screen, (short)stuff->zoom); - - return (client->noClientException); -} - -static int -ProcXF86VidModeSwitchToMode(ClientPtr client) -{ - REQUEST(xXF86VidModeSwitchToModeReq); - xXF86OldVidModeSwitchToModeReq *oldstuff = - (xXF86OldVidModeSwitchToModeReq *)client->requestBuffer; - xXF86VidModeSwitchToModeReq newstuff; - void * mode; - int len, dotClock; - int ver; - - DEBUG_P("XF86VidModeSwitchToMode"); - - ver = ClientMajorVersion(client); - if (ver < 2) { - /* convert from old format */ - stuff = &newstuff; - stuff->length = oldstuff->length; - stuff->screen = oldstuff->screen; - stuff->dotclock = oldstuff->dotclock; - stuff->hdisplay = oldstuff->hdisplay; - stuff->hsyncstart = oldstuff->hsyncstart; - stuff->hsyncend = oldstuff->hsyncend; - stuff->htotal = oldstuff->htotal; - stuff->hskew = 0; - stuff->vdisplay = oldstuff->vdisplay; - stuff->vsyncstart = oldstuff->vsyncstart; - stuff->vsyncend = oldstuff->vsyncend; - stuff->vtotal = oldstuff->vtotal; - stuff->flags = oldstuff->flags; - stuff->privsize = oldstuff->privsize; - } - if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) { - ErrorF("SwitchToMode - scrn: %d clock: %ld\n", - (int)stuff->screen, (unsigned long)stuff->dotclock); - ErrorF(" hdsp: %d hbeg: %d hend: %d httl: %d\n", - stuff->hdisplay, stuff->hsyncstart, - stuff->hsyncend, stuff->htotal); - ErrorF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %ld\n", - stuff->vdisplay, stuff->vsyncstart, stuff->vsyncend, - stuff->vtotal, (unsigned long)stuff->flags); - } - - if (ver < 2) { - REQUEST_AT_LEAST_SIZE(xXF86OldVidModeSwitchToModeReq); - len = client->req_len - (sizeof(xXF86OldVidModeSwitchToModeReq) >> 2); - } else { - REQUEST_AT_LEAST_SIZE(xXF86VidModeSwitchToModeReq); - len = client->req_len - (sizeof(xXF86VidModeSwitchToModeReq) >> 2); - } - if (len != stuff->privsize) - return BadLength; - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - if (!VidModeGetCurrentModeline(stuff->screen, &mode, &dotClock)) - return BadValue; - - if ((VidModeGetDotClock(stuff->screen, stuff->dotclock) == dotClock) - && MODEMATCH(mode, stuff)) - return (client->noClientException); - - if (!VidModeGetFirstModeline(stuff->screen, &mode, &dotClock)) - return BadValue; - - do { - if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) { - ErrorF("Checking against clock: %d (%d)\n", - VidModeGetModeValue(mode, VIDMODE_CLOCK), dotClock); - ErrorF(" hdsp: %d hbeg: %d hend: %d httl: %d\n", - VidModeGetModeValue(mode, VIDMODE_H_DISPLAY), - VidModeGetModeValue(mode, VIDMODE_H_SYNCSTART), - VidModeGetModeValue(mode, VIDMODE_H_SYNCEND), - VidModeGetModeValue(mode, VIDMODE_H_TOTAL)); - ErrorF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %d\n", - VidModeGetModeValue(mode, VIDMODE_V_DISPLAY), - VidModeGetModeValue(mode, VIDMODE_V_SYNCSTART), - VidModeGetModeValue(mode, VIDMODE_V_SYNCEND), - VidModeGetModeValue(mode, VIDMODE_V_TOTAL), - VidModeGetModeValue(mode, VIDMODE_FLAGS)); - } - if ((VidModeGetDotClock(stuff->screen, stuff->dotclock) == dotClock) && - MODEMATCH(mode, stuff)) { - - if (!VidModeSwitchMode(stuff->screen, mode)) - return BadValue; - - if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) - ErrorF("SwitchToMode - Succeeded\n"); - return(client->noClientException); - } - } while (VidModeGetNextModeline(stuff->screen, &mode, &dotClock)); - - return BadValue; -} - -static int -ProcXF86VidModeLockModeSwitch(ClientPtr client) -{ - REQUEST(xXF86VidModeLockModeSwitchReq); - - REQUEST_SIZE_MATCH(xXF86VidModeLockModeSwitchReq); - - DEBUG_P("XF86VidModeLockModeSwitch"); - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - if (!VidModeLockZoom(stuff->screen, (short)stuff->lock)) - return VidModeErrorBase + XF86VidModeZoomLocked; - - return (client->noClientException); -} - -static int -ProcXF86VidModeGetMonitor(ClientPtr client) -{ - REQUEST(xXF86VidModeGetMonitorReq); - xXF86VidModeGetMonitorReply rep; - register int n; - CARD32 *hsyncdata, *vsyncdata; - int i, nHsync, nVrefresh; - void * monitor; - - DEBUG_P("XF86VidModeGetMonitor"); - - REQUEST_SIZE_MATCH(xXF86VidModeGetMonitorReq); - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - if (!VidModeGetMonitor(stuff->screen, &monitor)) - return BadValue; - - nHsync = VidModeGetMonitorValue(monitor, VIDMODE_MON_NHSYNC, 0).i; - nVrefresh = VidModeGetMonitorValue(monitor, VIDMODE_MON_NVREFRESH, 0).i; - - rep.type = X_Reply; - if ((char *)(VidModeGetMonitorValue(monitor, VIDMODE_MON_VENDOR, 0)).ptr) - rep.vendorLength = strlen((char *)(VidModeGetMonitorValue(monitor, - VIDMODE_MON_VENDOR, 0)).ptr); - else - rep.vendorLength = 0; - if ((char *)(VidModeGetMonitorValue(monitor, VIDMODE_MON_MODEL, 0)).ptr) - rep.modelLength = strlen((char *)(VidModeGetMonitorValue(monitor, - VIDMODE_MON_MODEL, 0)).ptr); - else - rep.modelLength = 0; - rep.length = (SIZEOF(xXF86VidModeGetMonitorReply) - SIZEOF(xGenericReply) + - (nHsync + nVrefresh) * sizeof(CARD32) + - ((rep.vendorLength + 3) & ~3) + - ((rep.modelLength + 3) & ~3)) >> 2; - rep.sequenceNumber = client->sequence; - rep.nhsync = nHsync; - rep.nvsync = nVrefresh; - hsyncdata = ALLOCATE_LOCAL(nHsync * sizeof(CARD32)); - if (!hsyncdata) { - return BadAlloc; - } - - vsyncdata = ALLOCATE_LOCAL(nVrefresh * sizeof(CARD32)); - if (!vsyncdata) { - DEALLOCATE_LOCAL(hsyncdata); - return BadAlloc; - } - - for (i = 0; i < nHsync; i++) { - hsyncdata[i] = (unsigned short)(VidModeGetMonitorValue(monitor, - VIDMODE_MON_HSYNC_LO, i)).f | - (unsigned short)(VidModeGetMonitorValue(monitor, - VIDMODE_MON_HSYNC_HI, i)).f << 16; - } - for (i = 0; i < nVrefresh; i++) { - vsyncdata[i] = (unsigned short)(VidModeGetMonitorValue(monitor, - VIDMODE_MON_VREFRESH_LO, i)).f | - (unsigned short)(VidModeGetMonitorValue(monitor, - VIDMODE_MON_VREFRESH_HI, i)).f << 16; - } - - - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - } - WriteToClient(client, SIZEOF(xXF86VidModeGetMonitorReply), (char *)&rep); - client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; - WriteSwappedDataToClient(client, nHsync * sizeof(CARD32), - hsyncdata); - WriteSwappedDataToClient(client, nVrefresh * sizeof(CARD32), - vsyncdata); - if (rep.vendorLength) - WriteToClient(client, rep.vendorLength, (char *)(VidModeGetMonitorValue(monitor, VIDMODE_MON_VENDOR, 0)).ptr); - if (rep.modelLength) - WriteToClient(client, rep.modelLength, (char *)(VidModeGetMonitorValue(monitor, VIDMODE_MON_MODEL, 0)).ptr); - - DEALLOCATE_LOCAL(hsyncdata); - DEALLOCATE_LOCAL(vsyncdata); - - return (client->noClientException); -} - -static int -ProcXF86VidModeGetViewPort(ClientPtr client) -{ - REQUEST(xXF86VidModeGetViewPortReq); - xXF86VidModeGetViewPortReply rep; - int x, y, n; - - DEBUG_P("XF86VidModeGetViewPort"); - - REQUEST_SIZE_MATCH(xXF86VidModeGetViewPortReq); - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - - VidModeGetViewPort(stuff->screen, &x, &y); - rep.x = x; - rep.y = y; - - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.x, n); - swapl(&rep.y, n); - } - WriteToClient(client, SIZEOF(xXF86VidModeGetViewPortReply), (char *)&rep); - return (client->noClientException); -} - -static int -ProcXF86VidModeSetViewPort(ClientPtr client) -{ - REQUEST(xXF86VidModeSetViewPortReq); - - DEBUG_P("XF86VidModeSetViewPort"); - - REQUEST_SIZE_MATCH(xXF86VidModeSetViewPortReq); - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - if (!VidModeSetViewPort(stuff->screen, stuff->x, stuff->y)) - return BadValue; - - return (client->noClientException); -} - -static int -ProcXF86VidModeGetDotClocks(ClientPtr client) -{ - REQUEST(xXF86VidModeGetDotClocksReq); - xXF86VidModeGetDotClocksReply rep; - register int n; - int numClocks; - CARD32 dotclock; - int *Clocks = NULL; - Bool ClockProg; - - DEBUG_P("XF86VidModeGetDotClocks"); - - REQUEST_SIZE_MATCH(xXF86VidModeGetDotClocksReq); - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - numClocks = VidModeGetNumOfClocks(stuff->screen, &ClockProg); - - rep.type = X_Reply; - rep.length = (SIZEOF(xXF86VidModeGetDotClocksReply) - - SIZEOF(xGenericReply) + numClocks) >> 2; - rep.sequenceNumber = client->sequence; - rep.clocks = numClocks; - rep.maxclocks = MAXCLOCKS; - rep.flags = 0; - - if (!ClockProg) { - Clocks = ALLOCATE_LOCAL(numClocks * sizeof(int)); - if (!Clocks) - return BadValue; - if (!VidModeGetClocks(stuff->screen, Clocks)) { - DEALLOCATE_LOCAL(Clocks); - return BadValue; - } - } - - if (ClockProg) { - rep.flags |= CLKFLAG_PROGRAMABLE; - } - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.clocks, n); - swapl(&rep.maxclocks, n); - swapl(&rep.flags, n); - } - WriteToClient(client, sizeof(xXF86VidModeGetDotClocksReply), (char *)&rep); - if (!ClockProg) { - for (n = 0; n < numClocks; n++) { - dotclock = *Clocks++; - if (client->swapped) { - WriteSwappedDataToClient(client, 4, (char *)&dotclock); - } else { - WriteToClient(client, 4, (char *)&dotclock); - } - } - } - - DEALLOCATE_LOCAL(Clocks); - return (client->noClientException); -} - -static int -ProcXF86VidModeSetGamma(ClientPtr client) -{ - REQUEST(xXF86VidModeSetGammaReq); - - DEBUG_P("XF86VidModeSetGamma"); - - REQUEST_SIZE_MATCH(xXF86VidModeSetGammaReq); - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - if (!VidModeSetGamma(stuff->screen, ((float)stuff->red)/10000., - ((float)stuff->green)/10000., ((float)stuff->blue)/10000.)) - return BadValue; - - return (client->noClientException); -} - -static int -ProcXF86VidModeGetGamma(ClientPtr client) -{ - REQUEST(xXF86VidModeGetGammaReq); - xXF86VidModeGetGammaReply rep; - register int n; - float red, green, blue; - - DEBUG_P("XF86VidModeGetGamma"); - - REQUEST_SIZE_MATCH(xXF86VidModeGetGammaReq); - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - if (!VidModeGetGamma(stuff->screen, &red, &green, &blue)) - return BadValue; - rep.red = (CARD32)(red * 10000.); - rep.green = (CARD32)(green * 10000.); - rep.blue = (CARD32)(blue * 10000.); - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.red, n); - swapl(&rep.green, n); - swapl(&rep.blue, n); - } - WriteToClient(client, sizeof(xXF86VidModeGetGammaReply), (char *)&rep); - return (client->noClientException); -} - -static int -ProcXF86VidModeSetGammaRamp(ClientPtr client) -{ - CARD16 *r, *g, *b; - int length; - REQUEST(xXF86VidModeSetGammaRampReq); - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - if(stuff->size != VidModeGetGammaRampSize(stuff->screen)) - return BadValue; - - length = (stuff->size + 1) & ~1; - - REQUEST_FIXED_SIZE(xXF86VidModeSetGammaRampReq, length * 6); - - r = (CARD16*)&stuff[1]; - g = r + length; - b = g + length; - - if (!VidModeSetGammaRamp(stuff->screen, stuff->size, r, g, b)) - return BadValue; - - return (client->noClientException); -} - -static int -ProcXF86VidModeGetGammaRamp(ClientPtr client) -{ - CARD16 *ramp = NULL; - int n, length, i; - xXF86VidModeGetGammaRampReply rep; - REQUEST(xXF86VidModeGetGammaRampReq); - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - if(stuff->size != VidModeGetGammaRampSize(stuff->screen)) - return BadValue; - - REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampReq); - - length = (stuff->size + 1) & ~1; - - if(stuff->size) { - if(!(ramp = xalloc(length * 3 * sizeof(CARD16)))) - return BadAlloc; - - if (!VidModeGetGammaRamp(stuff->screen, stuff->size, - ramp, ramp + length, ramp + (length * 2))) - return BadValue; - } - - rep.type = X_Reply; - rep.length = (length >> 1) * 3; - rep.sequenceNumber = client->sequence; - rep.size = stuff->size; - if(client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.size, n); - for(i = 0; i < length * 3; i++) - swaps(&ramp[i],n); - } - WriteToClient(client, sizeof(xXF86VidModeGetGammaRampReply), (char *)&rep); - - if(stuff->size) { - WriteToClient(client, rep.length << 2, (char*)ramp); - xfree(ramp); - } - - return (client->noClientException); -} - - -static int -ProcXF86VidModeGetGammaRampSize(ClientPtr client) -{ - xXF86VidModeGetGammaRampSizeReply rep; - int n; - REQUEST(xXF86VidModeGetGammaRampSizeReq); - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampSizeReq); - - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.size = VidModeGetGammaRampSize(stuff->screen); - if(client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.size, n); - } - WriteToClient(client,sizeof(xXF86VidModeGetGammaRampSizeReply),(char*)&rep); - - return (client->noClientException); -} - -static int -ProcXF86VidModeGetPermissions(ClientPtr client) -{ - xXF86VidModeGetPermissionsReply rep; - int n; - REQUEST(xXF86VidModeGetPermissionsReq); - - if(stuff->screen >= screenInfo.numScreens) - return BadValue; - - REQUEST_SIZE_MATCH(xXF86VidModeGetPermissionsReq); - - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.permissions = XF86VM_READ_PERMISSION; - if (xf86GetVidModeEnabled() && - (xf86GetVidModeAllowNonLocal() || LocalClient (client))) { - rep.permissions |= XF86VM_WRITE_PERMISSION; - } - if(client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.permissions, n); - } - WriteToClient(client,sizeof(xXF86VidModeGetPermissionsReply),(char*)&rep); - - return (client->noClientException); -} - - -static int -ProcXF86VidModeSetClientVersion(ClientPtr client) -{ - REQUEST(xXF86VidModeSetClientVersionReq); - - VidModePrivPtr pPriv; - - DEBUG_P("XF86VidModeSetClientVersion"); - - REQUEST_SIZE_MATCH(xXF86VidModeSetClientVersionReq); - - if ((pPriv = VMPRIV(client)) == NULL) { - pPriv = xalloc(sizeof(VidModePrivRec)); - if (!pPriv) - return BadAlloc; - VMPRIV(client) = pPriv; - } - pPriv->major = stuff->major; - pPriv->minor = stuff->minor; - - return (client->noClientException); -} - -static int -ProcXF86VidModeDispatch(ClientPtr client) -{ - REQUEST(xReq); - switch (stuff->data) - { - case X_XF86VidModeQueryVersion: - return ProcXF86VidModeQueryVersion(client); - case X_XF86VidModeGetModeLine: - return ProcXF86VidModeGetModeLine(client); - case X_XF86VidModeGetMonitor: - return ProcXF86VidModeGetMonitor(client); - case X_XF86VidModeGetAllModeLines: - return ProcXF86VidModeGetAllModeLines(client); - case X_XF86VidModeValidateModeLine: - return ProcXF86VidModeValidateModeLine(client); - case X_XF86VidModeGetViewPort: - return ProcXF86VidModeGetViewPort(client); - case X_XF86VidModeGetDotClocks: - return ProcXF86VidModeGetDotClocks(client); - case X_XF86VidModeSetClientVersion: - return ProcXF86VidModeSetClientVersion(client); - case X_XF86VidModeGetGamma: - return ProcXF86VidModeGetGamma(client); - case X_XF86VidModeGetGammaRamp: - return ProcXF86VidModeGetGammaRamp(client); - case X_XF86VidModeGetGammaRampSize: - return ProcXF86VidModeGetGammaRampSize(client); - case X_XF86VidModeGetPermissions: - return ProcXF86VidModeGetPermissions(client); - default: - if (!xf86GetVidModeEnabled()) - return VidModeErrorBase + XF86VidModeExtensionDisabled; - if (xf86GetVidModeAllowNonLocal() || LocalClient (client)) { - switch (stuff->data) { - case X_XF86VidModeAddModeLine: - return ProcXF86VidModeAddModeLine(client); - case X_XF86VidModeDeleteModeLine: - return ProcXF86VidModeDeleteModeLine(client); - case X_XF86VidModeModModeLine: - return ProcXF86VidModeModModeLine(client); - case X_XF86VidModeSwitchMode: - return ProcXF86VidModeSwitchMode(client); - case X_XF86VidModeSwitchToMode: - return ProcXF86VidModeSwitchToMode(client); - case X_XF86VidModeLockModeSwitch: - return ProcXF86VidModeLockModeSwitch(client); - case X_XF86VidModeSetViewPort: - return ProcXF86VidModeSetViewPort(client); - case X_XF86VidModeSetGamma: - return ProcXF86VidModeSetGamma(client); - case X_XF86VidModeSetGammaRamp: - return ProcXF86VidModeSetGammaRamp(client); - default: - return BadRequest; - } - } else - return VidModeErrorBase + XF86VidModeClientNotLocal; - } -} - -static int -SProcXF86VidModeQueryVersion(ClientPtr client) -{ - register int n; - REQUEST(xXF86VidModeQueryVersionReq); - swaps(&stuff->length, n); - return ProcXF86VidModeQueryVersion(client); -} - -static int -SProcXF86VidModeGetModeLine(ClientPtr client) -{ - register int n; - REQUEST(xXF86VidModeGetModeLineReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86VidModeGetModeLineReq); - swaps(&stuff->screen, n); - return ProcXF86VidModeGetModeLine(client); -} - -static int -SProcXF86VidModeGetAllModeLines(ClientPtr client) -{ - register int n; - REQUEST(xXF86VidModeGetAllModeLinesReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86VidModeGetAllModeLinesReq); - swaps(&stuff->screen, n); - return ProcXF86VidModeGetAllModeLines(client); -} - -static int -SProcXF86VidModeAddModeLine(ClientPtr client) -{ - xXF86OldVidModeAddModeLineReq *oldstuff = - (xXF86OldVidModeAddModeLineReq *)client->requestBuffer; - int ver; - register int n; - - REQUEST(xXF86VidModeAddModeLineReq); - ver = ClientMajorVersion(client); - if (ver < 2) { - swaps(&oldstuff->length, n); - REQUEST_AT_LEAST_SIZE(xXF86OldVidModeAddModeLineReq); - swapl(&oldstuff->screen, n); - swaps(&oldstuff->hdisplay, n); - swaps(&oldstuff->hsyncstart, n); - swaps(&oldstuff->hsyncend, n); - swaps(&oldstuff->htotal, n); - swaps(&oldstuff->vdisplay, n); - swaps(&oldstuff->vsyncstart, n); - swaps(&oldstuff->vsyncend, n); - swaps(&oldstuff->vtotal, n); - swapl(&oldstuff->flags, n); - swapl(&oldstuff->privsize, n); - SwapRestL(oldstuff); - } else { - swaps(&stuff->length, n); - REQUEST_AT_LEAST_SIZE(xXF86VidModeAddModeLineReq); - swapl(&stuff->screen, n); - swaps(&stuff->hdisplay, n); - swaps(&stuff->hsyncstart, n); - swaps(&stuff->hsyncend, n); - swaps(&stuff->htotal, n); - swaps(&stuff->hskew, n); - swaps(&stuff->vdisplay, n); - swaps(&stuff->vsyncstart, n); - swaps(&stuff->vsyncend, n); - swaps(&stuff->vtotal, n); - swapl(&stuff->flags, n); - swapl(&stuff->privsize, n); - SwapRestL(stuff); - } - return ProcXF86VidModeAddModeLine(client); -} - -static int -SProcXF86VidModeDeleteModeLine(ClientPtr client) -{ - xXF86OldVidModeDeleteModeLineReq *oldstuff = - (xXF86OldVidModeDeleteModeLineReq *)client->requestBuffer; - int ver; - register int n; - - REQUEST(xXF86VidModeDeleteModeLineReq); - ver = ClientMajorVersion(client); - if (ver < 2) { - swaps(&oldstuff->length, n); - REQUEST_AT_LEAST_SIZE(xXF86OldVidModeDeleteModeLineReq); - swapl(&oldstuff->screen, n); - swaps(&oldstuff->hdisplay, n); - swaps(&oldstuff->hsyncstart, n); - swaps(&oldstuff->hsyncend, n); - swaps(&oldstuff->htotal, n); - swaps(&oldstuff->vdisplay, n); - swaps(&oldstuff->vsyncstart, n); - swaps(&oldstuff->vsyncend, n); - swaps(&oldstuff->vtotal, n); - swapl(&oldstuff->flags, n); - swapl(&oldstuff->privsize, n); - SwapRestL(oldstuff); - } else { - swaps(&stuff->length, n); - REQUEST_AT_LEAST_SIZE(xXF86VidModeDeleteModeLineReq); - swapl(&stuff->screen, n); - swaps(&stuff->hdisplay, n); - swaps(&stuff->hsyncstart, n); - swaps(&stuff->hsyncend, n); - swaps(&stuff->htotal, n); - swaps(&stuff->hskew, n); - swaps(&stuff->vdisplay, n); - swaps(&stuff->vsyncstart, n); - swaps(&stuff->vsyncend, n); - swaps(&stuff->vtotal, n); - swapl(&stuff->flags, n); - swapl(&stuff->privsize, n); - SwapRestL(stuff); - } - return ProcXF86VidModeDeleteModeLine(client); -} - -static int -SProcXF86VidModeModModeLine(ClientPtr client) -{ - xXF86OldVidModeModModeLineReq *oldstuff = - (xXF86OldVidModeModModeLineReq *)client->requestBuffer; - int ver; - register int n; - - REQUEST(xXF86VidModeModModeLineReq); - ver = ClientMajorVersion(client); - if (ver < 2) { - swaps(&oldstuff->length, n); - REQUEST_AT_LEAST_SIZE(xXF86OldVidModeModModeLineReq); - swapl(&oldstuff->screen, n); - swaps(&oldstuff->hdisplay, n); - swaps(&oldstuff->hsyncstart, n); - swaps(&oldstuff->hsyncend, n); - swaps(&oldstuff->htotal, n); - swaps(&oldstuff->vdisplay, n); - swaps(&oldstuff->vsyncstart, n); - swaps(&oldstuff->vsyncend, n); - swaps(&oldstuff->vtotal, n); - swapl(&oldstuff->flags, n); - swapl(&oldstuff->privsize, n); - SwapRestL(oldstuff); - } else { - swaps(&stuff->length, n); - REQUEST_AT_LEAST_SIZE(xXF86VidModeModModeLineReq); - swapl(&stuff->screen, n); - swaps(&stuff->hdisplay, n); - swaps(&stuff->hsyncstart, n); - swaps(&stuff->hsyncend, n); - swaps(&stuff->htotal, n); - swaps(&stuff->hskew, n); - swaps(&stuff->vdisplay, n); - swaps(&stuff->vsyncstart, n); - swaps(&stuff->vsyncend, n); - swaps(&stuff->vtotal, n); - swapl(&stuff->flags, n); - swapl(&stuff->privsize, n); - SwapRestL(stuff); - } - return ProcXF86VidModeModModeLine(client); -} - -static int -SProcXF86VidModeValidateModeLine(ClientPtr client) -{ - xXF86OldVidModeValidateModeLineReq *oldstuff = - (xXF86OldVidModeValidateModeLineReq *)client->requestBuffer; - int ver; - register int n; - - REQUEST(xXF86VidModeValidateModeLineReq); - ver = ClientMajorVersion(client); - if (ver < 2) { - swaps(&oldstuff->length, n); - REQUEST_AT_LEAST_SIZE(xXF86OldVidModeValidateModeLineReq); - swapl(&oldstuff->screen, n); - swaps(&oldstuff->hdisplay, n); - swaps(&oldstuff->hsyncstart, n); - swaps(&oldstuff->hsyncend, n); - swaps(&oldstuff->htotal, n); - swaps(&oldstuff->vdisplay, n); - swaps(&oldstuff->vsyncstart, n); - swaps(&oldstuff->vsyncend, n); - swaps(&oldstuff->vtotal, n); - swapl(&oldstuff->flags, n); - swapl(&oldstuff->privsize, n); - SwapRestL(oldstuff); - } else { - swaps(&stuff->length, n); - REQUEST_AT_LEAST_SIZE(xXF86VidModeValidateModeLineReq); - swapl(&stuff->screen, n); - swaps(&stuff->hdisplay, n); - swaps(&stuff->hsyncstart, n); - swaps(&stuff->hsyncend, n); - swaps(&stuff->htotal, n); - swaps(&stuff->hskew, n); - swaps(&stuff->vdisplay, n); - swaps(&stuff->vsyncstart, n); - swaps(&stuff->vsyncend, n); - swaps(&stuff->vtotal, n); - swapl(&stuff->flags, n); - swapl(&stuff->privsize, n); - SwapRestL(stuff); - } - return ProcXF86VidModeValidateModeLine(client); -} - -static int -SProcXF86VidModeSwitchMode(ClientPtr client) -{ - register int n; - REQUEST(xXF86VidModeSwitchModeReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86VidModeSwitchModeReq); - swaps(&stuff->screen, n); - swaps(&stuff->zoom, n); - return ProcXF86VidModeSwitchMode(client); -} - -static int -SProcXF86VidModeSwitchToMode(ClientPtr client) -{ - register int n; - REQUEST(xXF86VidModeSwitchToModeReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86VidModeSwitchToModeReq); - swaps(&stuff->screen, n); - return ProcXF86VidModeSwitchToMode(client); -} - -static int -SProcXF86VidModeLockModeSwitch(ClientPtr client) -{ - register int n; - REQUEST(xXF86VidModeLockModeSwitchReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86VidModeLockModeSwitchReq); - swaps(&stuff->screen, n); - swaps(&stuff->lock, n); - return ProcXF86VidModeLockModeSwitch(client); -} - -static int -SProcXF86VidModeGetMonitor(ClientPtr client) -{ - register int n; - REQUEST(xXF86VidModeGetMonitorReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86VidModeGetMonitorReq); - swaps(&stuff->screen, n); - return ProcXF86VidModeGetMonitor(client); -} - -static int -SProcXF86VidModeGetViewPort(ClientPtr client) -{ - register int n; - REQUEST(xXF86VidModeGetViewPortReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86VidModeGetViewPortReq); - swaps(&stuff->screen, n); - return ProcXF86VidModeGetViewPort(client); -} - -static int -SProcXF86VidModeSetViewPort(ClientPtr client) -{ - register int n; - REQUEST(xXF86VidModeSetViewPortReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86VidModeSetViewPortReq); - swaps(&stuff->screen, n); - swapl(&stuff->x, n); - swapl(&stuff->y, n); - return ProcXF86VidModeSetViewPort(client); -} - -static int -SProcXF86VidModeGetDotClocks(ClientPtr client) -{ - register int n; - REQUEST(xXF86VidModeGetDotClocksReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86VidModeGetDotClocksReq); - swaps(&stuff->screen, n); - return ProcXF86VidModeGetDotClocks(client); -} - -static int -SProcXF86VidModeSetClientVersion(ClientPtr client) -{ - register int n; - REQUEST(xXF86VidModeSetClientVersionReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86VidModeSetClientVersionReq); - swaps(&stuff->major, n); - swaps(&stuff->minor, n); - return ProcXF86VidModeSetClientVersion(client); -} - -static int -SProcXF86VidModeSetGamma(ClientPtr client) -{ - register int n; - REQUEST(xXF86VidModeSetGammaReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86VidModeSetGammaReq); - swaps(&stuff->screen, n); - swapl(&stuff->red, n); - swapl(&stuff->green, n); - swapl(&stuff->blue, n); - return ProcXF86VidModeSetGamma(client); -} - -static int -SProcXF86VidModeGetGamma(ClientPtr client) -{ - register int n; - REQUEST(xXF86VidModeGetGammaReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86VidModeGetGammaReq); - swaps(&stuff->screen, n); - return ProcXF86VidModeGetGamma(client); -} - -static int -SProcXF86VidModeSetGammaRamp(ClientPtr client) -{ - CARD16 *ramp; - int length, n; - REQUEST(xXF86VidModeSetGammaRampReq); - swaps(&stuff->length, n); - REQUEST_AT_LEAST_SIZE(xXF86VidModeSetGammaRampReq); - swaps(&stuff->size, n); - swaps(&stuff->screen, n); - length = ((stuff->size + 1) & ~1) * 6; - REQUEST_FIXED_SIZE(xXF86VidModeSetGammaRampReq, length); - ramp = (CARD16*)&stuff[1]; - while(length--) { - swaps(ramp, n); - ramp++; - } - return ProcXF86VidModeSetGammaRamp(client); -} - -static int -SProcXF86VidModeGetGammaRamp(ClientPtr client) -{ - int n; - REQUEST(xXF86VidModeGetGammaRampReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampReq); - swaps(&stuff->size, n); - swaps(&stuff->screen, n); - return ProcXF86VidModeGetGammaRamp(client); -} - -static int -SProcXF86VidModeGetGammaRampSize(ClientPtr client) -{ - int n; - REQUEST(xXF86VidModeGetGammaRampSizeReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampSizeReq); - swaps(&stuff->screen, n); - return ProcXF86VidModeGetGammaRampSize(client); -} - -static int -SProcXF86VidModeGetPermissions(ClientPtr client) -{ - int n; - REQUEST(xXF86VidModeGetPermissionsReq); - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH(xXF86VidModeGetPermissionsReq); - swaps(&stuff->screen, n); - return ProcXF86VidModeGetPermissions(client); -} - - -static int -SProcXF86VidModeDispatch(ClientPtr client) -{ - REQUEST(xReq); - switch (stuff->data) - { - case X_XF86VidModeQueryVersion: - return SProcXF86VidModeQueryVersion(client); - case X_XF86VidModeGetModeLine: - return SProcXF86VidModeGetModeLine(client); - case X_XF86VidModeGetMonitor: - return SProcXF86VidModeGetMonitor(client); - case X_XF86VidModeGetAllModeLines: - return SProcXF86VidModeGetAllModeLines(client); - case X_XF86VidModeGetViewPort: - return SProcXF86VidModeGetViewPort(client); - case X_XF86VidModeValidateModeLine: - return SProcXF86VidModeValidateModeLine(client); - case X_XF86VidModeGetDotClocks: - return SProcXF86VidModeGetDotClocks(client); - case X_XF86VidModeSetClientVersion: - return SProcXF86VidModeSetClientVersion(client); - case X_XF86VidModeGetGamma: - return SProcXF86VidModeGetGamma(client); - case X_XF86VidModeGetGammaRamp: - return SProcXF86VidModeGetGammaRamp(client); - case X_XF86VidModeGetGammaRampSize: - return SProcXF86VidModeGetGammaRampSize(client); - case X_XF86VidModeGetPermissions: - return SProcXF86VidModeGetPermissions(client); - default: - if (!xf86GetVidModeEnabled()) - return VidModeErrorBase + XF86VidModeExtensionDisabled; - if (xf86GetVidModeAllowNonLocal() || LocalClient(client)) { - switch (stuff->data) { - case X_XF86VidModeAddModeLine: - return SProcXF86VidModeAddModeLine(client); - case X_XF86VidModeDeleteModeLine: - return SProcXF86VidModeDeleteModeLine(client); - case X_XF86VidModeModModeLine: - return SProcXF86VidModeModModeLine(client); - case X_XF86VidModeSwitchMode: - return SProcXF86VidModeSwitchMode(client); - case X_XF86VidModeSwitchToMode: - return SProcXF86VidModeSwitchToMode(client); - case X_XF86VidModeLockModeSwitch: - return SProcXF86VidModeLockModeSwitch(client); - case X_XF86VidModeSetViewPort: - return SProcXF86VidModeSetViewPort(client); - case X_XF86VidModeSetGamma: - return SProcXF86VidModeSetGamma(client); - case X_XF86VidModeSetGammaRamp: - return SProcXF86VidModeSetGammaRamp(client); - default: - return BadRequest; - } - } else - return VidModeErrorBase + XF86VidModeClientNotLocal; - } -} diff --git a/nx-X11/programs/Xserver/dix/dispatch.c b/nx-X11/programs/Xserver/dix/dispatch.c index 009e1ac08..0649b53c4 100644 --- a/nx-X11/programs/Xserver/dix/dispatch.c +++ b/nx-X11/programs/Xserver/dix/dispatch.c @@ -104,24 +104,18 @@ int ProcInitialConnection(); #include "swaprep.h" #include "swapreq.h" #ifdef PANORAMIX -#include "panoramiX.h" -#include "panoramiXsrv.h" +#include "../Xext/panoramiX.h" +#include "../Xext/panoramiXsrv.h" #endif #ifdef XCSECURITY #define _SECURITY_SERVER #include #endif -#ifdef XAPPGROUP -#include -#endif #ifdef XKB #define XKB_IN_SERVER #include "inputstr.h" #include #endif -#ifdef LBX -#include "lbxserve.h" -#endif #define mskcnt ((MAXCLIENTS + 31) / 32) #define BITMASK(i) (1U << ((i) & 31)) diff --git a/nx-libs.spec b/nx-libs.spec index 98cee6926..a1074df66 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -207,13 +207,9 @@ the X11 protocol. This increases performance when using X applications over a network, especially a slow one. The NX_Xext library contains a handful of X11 extensions: -- Double Buffer extension (DBE/Xdbe) - Display Power Management Signaling (DPMS) extension - X11 Nonrectangular Window Shape extension (Xshape) - The MIT Shared Memory extension (MIT-SHM/Xshm) -- TOG-CUP (colormap) protocol extension (Xcup) -- X Extended Visual Information extension (XEvi) -- X11 Double-Buffering, Multi-Buffering, and Stereo extension (Xmbuf) This package contains all necessary include files and libraries needed to develop applications that require these. @@ -563,26 +559,11 @@ rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans %defattr(-,root,root) %{_libdir}/libNX_Xext.so %dir %{_includedir}/nx-X11/extensions -%{_includedir}/nx-X11/extensions/MITMisc.h -%{_includedir}/nx-X11/extensions/XEVI.h -%{_includedir}/nx-X11/extensions/XEVIstr.h -%{_includedir}/nx-X11/extensions/XLbx.h %{_includedir}/nx-X11/extensions/XShm.h -%{_includedir}/nx-X11/extensions/Xag.h -%{_includedir}/nx-X11/extensions/Xagsrv.h -%{_includedir}/nx-X11/extensions/Xagstr.h -%{_includedir}/nx-X11/extensions/Xcup.h -%{_includedir}/nx-X11/extensions/Xcupstr.h -%{_includedir}/nx-X11/extensions/Xdbe.h -%{_includedir}/nx-X11/extensions/Xdbeproto.h %{_includedir}/nx-X11/extensions/Xext.h %{_includedir}/nx-X11/extensions/dpms.h %{_includedir}/nx-X11/extensions/dpmsstr.h %{_includedir}/nx-X11/extensions/extutil.h -%{_includedir}/nx-X11/extensions/lbxstr.h -%{_includedir}/nx-X11/extensions/mitmiscstr.h -%{_includedir}/nx-X11/extensions/multibuf.h -%{_includedir}/nx-X11/extensions/multibufst.h %{_includedir}/nx-X11/extensions/security.h %{_includedir}/nx-X11/extensions/securstr.h %{_includedir}/nx-X11/extensions/shape.h @@ -650,17 +631,8 @@ rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans %defattr(-,root,root) %{_includedir}/nx-X11/X10.h %dir %{_includedir}/nx-X11/extensions -%{_includedir}/nx-X11/extensions/Xevie.h -%{_includedir}/nx-X11/extensions/lbxbuf.h -%{_includedir}/nx-X11/extensions/lbxbufstr.h -%{_includedir}/nx-X11/extensions/lbxdeltastr.h -%{_includedir}/nx-X11/extensions/lbximage.h -%{_includedir}/nx-X11/extensions/lbxopts.h -%{_includedir}/nx-X11/extensions/lbxzlib.h %{_includedir}/nx-X11/extensions/panoramiXext.h %{_includedir}/nx-X11/extensions/record.h -%{_includedir}/nx-X11/extensions/xf86dga1.h -%{_includedir}/nx-X11/extensions/xf86vmode.h %{_includedir}/nx-X11/misc.h %{_includedir}/nx-X11/os.h @@ -690,10 +662,10 @@ rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans %{_includedir}/nx-X11/ap_keysym.h %{_includedir}/nx-X11/keysym.h %{_includedir}/nx-X11/keysymdef.h +%{_includedir}/nx-X11/extensions/Xdbeproto.h %{_includedir}/nx-X11/extensions/XI.h %{_includedir}/nx-X11/extensions/XIproto.h %{_includedir}/nx-X11/extensions/XResproto.h -%{_includedir}/nx-X11/extensions/Xeviestr.h %{_includedir}/nx-X11/extensions/bigreqstr.h %{_includedir}/nx-X11/extensions/composite.h %{_includedir}/nx-X11/extensions/compositeproto.h @@ -711,23 +683,10 @@ rm -r %{buildroot}%{_includedir}/nx-X11/Xtrans %{_includedir}/nx-X11/extensions/xcmiscstr.h %{_includedir}/nx-X11/extensions/xf86bigfont.h %{_includedir}/nx-X11/extensions/xf86bigfstr.h -%{_includedir}/nx-X11/extensions/xf86dga.h -%{_includedir}/nx-X11/extensions/xf86dga1str.h -%{_includedir}/nx-X11/extensions/xf86dgastr.h -%{_includedir}/nx-X11/extensions/xf86misc.h -%{_includedir}/nx-X11/extensions/xf86mscstr.h -%{_includedir}/nx-X11/extensions/xf86vmstr.h %{_includedir}/nx-X11/extensions/xfixesproto.h %{_includedir}/nx-X11/extensions/xfixeswire.h %{_includedir}/nx-X11/extensions/xtestconst.h %{_includedir}/nx-X11/extensions/xteststr.h -%{_includedir}/nx-X11/extensions/xtrapbits.h -%{_includedir}/nx-X11/extensions/xtrapddmi.h -%{_includedir}/nx-X11/extensions/xtrapdi.h -%{_includedir}/nx-X11/extensions/xtrapemacros.h -%{_includedir}/nx-X11/extensions/xtraplib.h -%{_includedir}/nx-X11/extensions/xtraplibp.h -%{_includedir}/nx-X11/extensions/xtrapproto.h %files -n nxagent %defattr(-,root,root) -- cgit v1.2.3