diff options
121 files changed, 12324 insertions, 0 deletions
diff --git a/applewmproto/.gitignore b/applewmproto/.gitignore new file mode 100644 index 0000000..f18e437 --- /dev/null +++ b/applewmproto/.gitignore @@ -0,0 +1,78 @@ +# +# X.Org module default exclusion patterns +# The next section if for module specific patterns +# +# Do not edit the following section +# GNU Build System (Autotools) +aclocal.m4 +autom4te.cache/ +autoscan.log +ChangeLog +compile +config.guess +config.h +config.h.in +config.log +config-ml.in +config.py +config.status +config.status.lineno +config.sub +configure +configure.scan +depcomp +.deps/ +INSTALL +install-sh +.libs/ +libtool +libtool.m4 +ltmain.sh +lt~obsolete.m4 +ltoptions.m4 +ltsugar.m4 +ltversion.m4 +Makefile +Makefile.in +mdate-sh +missing +mkinstalldirs +*.pc +py-compile +stamp-h? +symlink-tree +texinfo.tex +ylwrap + +# Do not edit the following section +# Edit Compile Debug Document Distribute +*~ +*.[0-9] +*.[0-9]x +*.bak +*.bin +core +*.dll +*.exe +*-ISO*.bdf +*-JIS*.bdf +*-KOI8*.bdf +*.kld +*.ko +*.ko.cmd +*.lai +*.l[oa] +*.[oa] +*.obj +*.patch +*.so +*.pcf.gz +*.pdb +*.tar.bz2 +*.tar.gz +# +# Add & Override patterns for applewmproto +# +# Edit the following section as needed +# For example, !report.pc overrides *.pc. See 'man gitignore' +# diff --git a/applewmproto/COPYING b/applewmproto/COPYING new file mode 100644 index 0000000..be403fd --- /dev/null +++ b/applewmproto/COPYING @@ -0,0 +1,27 @@ +/************************************************************************** + +Copyright (c) 2002-2009 Apple, 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, sub license, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice (including the +next paragraph) shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. +IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS 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. + +**************************************************************************/ + diff --git a/applewmproto/Makefile.am b/applewmproto/Makefile.am new file mode 100644 index 0000000..63db4c7 --- /dev/null +++ b/applewmproto/Makefile.am @@ -0,0 +1,19 @@ +applewmdir = $(includedir)/X11/extensions +applewm_HEADERS = \ + applewmconst.h \ + applewmproto.h + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = applewmproto.pc + + +MAINTAINERCLEANFILES = ChangeLog INSTALL + +.PHONY: ChangeLog INSTALL + +ChangeLog: + $(CHANGELOG_CMD) +INSTALL: + $(INSTALL_CMD) + +dist-hook: ChangeLog INSTALL diff --git a/applewmproto/README b/applewmproto/README new file mode 100644 index 0000000..78e3c08 --- /dev/null +++ b/applewmproto/README @@ -0,0 +1,31 @@ + Apple Rootless Window Management Extension + +This extension defines a protcol that allows X window managers +to better interact with the Mac OS X Aqua user interface when +running X11 in a rootless mode. + +Extension name: Apple-WM + +All questions regarding this software should be directed at the +Xorg mailing list: + + http://lists.freedesktop.org/mailman/listinfo/xorg + +Please submit bug reports to the Xorg bugzilla: + + https://bugs.freedesktop.org/enter_bug.cgi?product=xorg + +The master development code repository can be found at: + + git://anongit.freedesktop.org/git/xorg/proto/applewmproto + + http://cgit.freedesktop.org/xorg/proto/applewmproto + +For patch submission instructions, see: + + http://www.x.org/wiki/Development/Documentation/SubmittingPatches + +For more information on the git code manager, see: + + http://wiki.x.org/wiki/GitPage + diff --git a/applewmproto/applewmconst.h b/applewmproto/applewmconst.h new file mode 100644 index 0000000..5088804 --- /dev/null +++ b/applewmproto/applewmconst.h @@ -0,0 +1,107 @@ +/************************************************************************** + +Copyright (c) 2002 Apple Computer, 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, sub license, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice (including the +next paragraph) shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. +IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS 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. + +**************************************************************************/ + +#ifndef _APPLEWMCONST_H_ +#define _APPLEWMCONST_H_ + +/* Events */ +#define AppleWMControllerNotify 0 +#define AppleWMActivationNotify 1 +#define AppleWMPasteboardNotify 2 +#define AppleWMNumberEvents 3 + +#define AppleWMControllerNotifyMask (1L << 0) +#define AppleWMActivationNotifyMask (1L << 1) +#define AppleWMPasteboardNotifyMask (1L << 2) + +/* "Kinds" of ControllerNotify events */ +#define AppleWMMinimizeWindow 0 +#define AppleWMZoomWindow 1 +#define AppleWMCloseWindow 2 +#define AppleWMBringAllToFront 3 +#define AppleWMHideWindow 4 +#define AppleWMHideAll 5 +#define AppleWMShowAll 6 +#define AppleWMWindowMenuItem 9 +#define AppleWMWindowMenuNotify 10 +#define AppleWMNextWindow 11 +#define AppleWMPreviousWindow 12 + +/* "Kinds" of ActivationNotify events */ +#define AppleWMIsActive 0 +#define AppleWMIsInactive 1 +#define AppleWMReloadPreferences 2 + +/* "Kinds" of PasteboardNotify events */ +#define AppleWMCopyToPasteboard 0 + +/* Errors */ +#define AppleWMClientNotLocal 0 +#define AppleWMOperationNotSupported 1 +#define AppleWMNumberErrors (AppleWMOperationNotSupported + 1) + +/* Window level ids */ +#define AppleWMWindowLevelNormal 0 +#define AppleWMWindowLevelFloating 1 +#define AppleWMWindowLevelTornOff 2 +#define AppleWMWindowLevelDock 3 +#define AppleWMWindowLevelDesktop 4 +#define AppleWMNumWindowLevels 5 + +/* Possible value for frame_rect argument to XAppleWMFrameGetRect() */ +#define AppleWMFrameRectTitleBar 1 +#define AppleWMFrameRectTracking 2 +#define AppleWMFrameRectGrowBox 3 + +/* Window frame classes */ +#define AppleWMFrameClassDocument 1 << 0 +#define AppleWMFrameClassDialog 1 << 1 +#define AppleWMFrameClassModalDialog 1 << 2 +#define AppleWMFrameClassSystemModalDialog 1 << 3 +#define AppleWMFrameClassUtility 1 << 4 +#define AppleWMFrameClassToolbar 1 << 5 +#define AppleWMFrameClassMenu 1 << 6 +#define AppleWMFrameClassSplash 1 << 7 +#define AppleWMFrameClassBorderless 1 << 8 + +/* Window frame attributes */ +#define AppleWMFrameActive 0x0001 +#define AppleWMFrameUrgent 0x0002 +#define AppleWMFrameTitle 0x0004 +#define AppleWMFramePrelight 0x0008 +#define AppleWMFrameShaded 0x0010 +#define AppleWMFrameCloseBox 0x0100 +#define AppleWMFrameCollapseBox 0x0200 +#define AppleWMFrameZoomBox 0x0400 +#define AppleWMFrameAnyBox 0x0700 +#define AppleWMFrameCloseBoxClicked 0x0800 +#define AppleWMFrameCollapseBoxClicked 0x1000 +#define AppleWMFrameZoomBoxClicked 0x2000 +#define AppleWMFrameAnyBoxClicked 0x3800 +#define AppleWMFrameGrowBox 0x4000 + +#endif /* _APPLEWMCONST_H_ */ diff --git a/applewmproto/applewmproto.h b/applewmproto/applewmproto.h new file mode 100644 index 0000000..d8be4e6 --- /dev/null +++ b/applewmproto/applewmproto.h @@ -0,0 +1,293 @@ +/************************************************************************** + +Copyright (c) 2002 Apple Computer, 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, sub license, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice (including the +next paragraph) shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. +IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS 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. + +**************************************************************************/ + +#ifndef _APPLEWMPROTO_H_ +#define _APPLEWMPROTO_H_ + +#include <X11/extensions/applewmconst.h> +#include <X11/X.h> +#include <X11/Xmd.h> + +#define APPLEWMNAME "Apple-WM" + +#define APPLE_WM_MAJOR_VERSION 1 /* current version numbers */ +#define APPLE_WM_MINOR_VERSION 3 +#define APPLE_WM_PATCH_VERSION 0 + +#define X_AppleWMQueryVersion 0 +#define X_AppleWMFrameGetRect 1 +#define X_AppleWMFrameHitTest 2 +#define X_AppleWMFrameDraw 3 +#define X_AppleWMDisableUpdate 4 +#define X_AppleWMReenableUpdate 5 +#define X_AppleWMSelectInput 6 +#define X_AppleWMSetWindowMenuCheck 7 +#define X_AppleWMSetFrontProcess 8 +#define X_AppleWMSetWindowLevel 9 +#define X_AppleWMSetCanQuit 10 +#define X_AppleWMSetWindowMenu 11 +#define X_AppleWMSendPSN 12 +#define X_AppleWMAttachTransient 13 + +/* For the purpose of the structure definitions in this file, +we must redefine the following types in terms of Xmd.h's types, which may +include bit fields. All of these are #undef'd at the end of this file, +restoring the definitions in X.h. */ + +#define Window CARD32 +#define Drawable CARD32 +#define Font CARD32 +#define Pixmap CARD32 +#define Cursor CARD32 +#define Colormap CARD32 +#define GContext CARD32 +#define Atom CARD32 +#define VisualID CARD32 +#define Time CARD32 +#define KeyCode CARD8 +#define KeySym CARD32 + +typedef struct _AppleWMQueryVersion { + CARD8 reqType; /* always WMReqCode */ + CARD8 wmReqType; /* always X_AppleWMQueryVersion */ + CARD16 length B16; +} xAppleWMQueryVersionReq; +#define sz_xAppleWMQueryVersionReq 4 + +typedef struct { + BYTE type; /* X_Reply */ + BOOL pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 majorVersion B16; /* major version of WM protocol */ + CARD16 minorVersion B16; /* minor version of WM protocol */ + CARD32 patchVersion B32; /* patch version of WM protocol */ + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xAppleWMQueryVersionReply; +#define sz_xAppleWMQueryVersionReply 32 + +typedef struct _AppleWMDisableUpdate { + CARD8 reqType; /* always WMReqCode */ + CARD8 wmReqType; /* always X_AppleWMDisableUpdate */ + CARD16 length B16; + CARD32 screen B32; +} xAppleWMDisableUpdateReq; +#define sz_xAppleWMDisableUpdateReq 8 + +typedef struct _AppleWMReenableUpdate { + CARD8 reqType; /* always WMReqCode */ + CARD8 wmReqType; /* always X_AppleWMReenableUpdate */ + CARD16 length B16; + CARD32 screen B32; +} xAppleWMReenableUpdateReq; +#define sz_xAppleWMReenableUpdateReq 8 + +typedef struct _AppleWMSelectInput { + CARD8 reqType; /* always WMReqCode */ + CARD8 wmReqType; /* always X_AppleWMSelectInput */ + CARD16 length B16; + CARD32 mask B32; +} xAppleWMSelectInputReq; +#define sz_xAppleWMSelectInputReq 8 + +typedef struct _AppleWMNotify { + BYTE type; /* always eventBase + event type */ + BYTE kind; + CARD16 sequenceNumber B16; + Time time B32; /* time of change */ + CARD16 pad1 B16; + CARD32 arg B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xAppleWMNotifyEvent; +#define sz_xAppleWMNotifyEvent 32 + +typedef struct _AppleWMSetWindowMenu { + CARD8 reqType; /* always WMReqCode */ + CARD8 wmReqType; /* always X_AppleWMSetWindowMenu */ + CARD16 length B16; + CARD16 nitems B16; + CARD16 pad1 B16; +} xAppleWMSetWindowMenuReq; +#define sz_xAppleWMSetWindowMenuReq 8 + +typedef struct _AppleWMSetWindowMenuCheck { + CARD8 reqType; /* always WMReqCode */ + CARD8 wmReqType; /* always X_AppleWMSetWindowMenuCheck */ + CARD16 length B16; + CARD32 index; +} xAppleWMSetWindowMenuCheckReq; +#define sz_xAppleWMSetWindowMenuCheckReq 8 + +typedef struct _AppleWMSetFrontProcess { + CARD8 reqType; /* always WMReqCode */ + CARD8 wmReqType; /* always X_AppleWMSetFrontProcess */ + CARD16 length B16; +} xAppleWMSetFrontProcessReq; +#define sz_xAppleWMSetFrontProcessReq 4 + +typedef struct _AppleWMSetWindowLevel { + CARD8 reqType; /* always WMReqCode */ + CARD8 wmReqType; /* always X_AppleWMSetWindowLevel */ + CARD16 length B16; + CARD32 window; + CARD32 level; +} xAppleWMSetWindowLevelReq; +#define sz_xAppleWMSetWindowLevelReq 12 + +typedef struct _AppleWMSendPSN { + CARD8 reqType; /* always WMReqCode */ + CARD8 wmReqType; /* always X_AppleWMSendPSN */ + CARD16 length B16; + CARD32 psn_hi; + CARD32 psn_lo; +} xAppleWMSendPSNReq; +#define sz_xAppleWMSendPSNReq 12 + +typedef struct _AppleWMAttachTransient { + CARD8 reqType; /* always WMReqCode */ + CARD8 wmReqType; /* always X_AppleWMAttachTransient */ + CARD16 length B16; + CARD32 child; + CARD32 parent; +} xAppleWMAttachTransientReq; +#define sz_xAppleWMAttachTransientReq 12 + +typedef struct _AppleWMSetCanQuit { + CARD8 reqType; /* always WMReqCode */ + CARD8 wmReqType; /* always X_AppleWMSetCanQuit */ + CARD16 length B16; + CARD32 state; +} xAppleWMSetCanQuitReq; +#define sz_xAppleWMSetCanQuitReq 8 + +typedef struct _AppleWMFrameGetRect { + CARD8 reqType; /* always WMReqCode */ + CARD8 wmReqType; /* always X_AppleWMFrameGetRect */ + CARD16 length B16; + CARD16 frame_class B16; + CARD16 frame_rect B16; + CARD16 ix B16; + CARD16 iy B16; + CARD16 iw B16; + CARD16 ih B16; + CARD16 ox B16; + CARD16 oy B16; + CARD16 ow B16; + CARD16 oh B16; +} xAppleWMFrameGetRectReq; +#define sz_xAppleWMFrameGetRectReq 24 + +typedef struct { + BYTE type; /* X_Reply */ + BOOL pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 x B16; + CARD16 y B16; + CARD16 w B16; + CARD16 h B16; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xAppleWMFrameGetRectReply; +#define sz_xAppleWMFrameGetRectReply 32 + +typedef struct _AppleWMFrameHitTest { + CARD8 reqType; /* always WMReqCode */ + CARD8 wmReqType; /* always X_AppleWMFrameHitTest */ + CARD16 length B16; + CARD16 frame_class B16; + CARD16 pad1 B16; + CARD16 px B16; + CARD16 py B16; + CARD16 ix B16; + CARD16 iy B16; + CARD16 iw B16; + CARD16 ih B16; + CARD16 ox B16; + CARD16 oy B16; + CARD16 ow B16; + CARD16 oh B16; +} xAppleWMFrameHitTestReq; +#define sz_xAppleWMFrameHitTestReq 28 + +typedef struct { + BYTE type; /* X_Reply */ + BOOL pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 ret B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xAppleWMFrameHitTestReply; +#define sz_xAppleWMFrameHitTestReply 32 + +typedef struct _AppleWMFrameDraw { + CARD8 reqType; /* always WMReqCode */ + CARD8 wmReqType; /* always X_AppleWMFrameDraw */ + CARD16 length B16; + CARD32 screen B32; + CARD32 window B32; + CARD16 frame_class B16; + CARD16 frame_attr B16; + CARD16 ix B16; + CARD16 iy B16; + CARD16 iw B16; + CARD16 ih B16; + CARD16 ox B16; + CARD16 oy B16; + CARD16 ow B16; + CARD16 oh B16; + CARD32 title_length B32; +} xAppleWMFrameDrawReq; +#define sz_xAppleWMFrameDrawReq 36 + +/* restore these definitions back to the typedefs in X.h */ +#undef Window +#undef Drawable +#undef Font +#undef Pixmap +#undef Cursor +#undef Colormap +#undef GContext +#undef Atom +#undef VisualID +#undef Time +#undef KeyCode +#undef KeySym + +#endif /* _APPLEWMPROTO_H_ */ diff --git a/applewmproto/applewmproto.pc.in b/applewmproto/applewmproto.pc.in new file mode 100644 index 0000000..6ec1c48 --- /dev/null +++ b/applewmproto/applewmproto.pc.in @@ -0,0 +1,9 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: AppleWMProto +Description: AppleWM extension headers +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} diff --git a/applewmproto/autogen.sh b/applewmproto/autogen.sh new file mode 100755 index 0000000..904cd67 --- /dev/null +++ b/applewmproto/autogen.sh @@ -0,0 +1,12 @@ +#! /bin/sh + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +ORIGDIR=`pwd` +cd $srcdir + +autoreconf -v --install || exit 1 +cd $ORIGDIR || exit $? + +$srcdir/configure --enable-maintainer-mode "$@" diff --git a/applewmproto/configure.ac b/applewmproto/configure.ac new file mode 100644 index 0000000..84be89b --- /dev/null +++ b/applewmproto/configure.ac @@ -0,0 +1,13 @@ +AC_PREREQ([2.60]) +AC_INIT([AppleWMProto], [1.4.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg]) +AM_INIT_AUTOMAKE([foreign dist-bzip2]) +AM_MAINTAINER_MODE + +# Require xorg-macros: XORG_DEFAULT_OPTIONS +m4_ifndef([XORG_MACROS_VERSION], + [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.3) +XORG_DEFAULT_OPTIONS + +AC_OUTPUT([Makefile + applewmproto.pc]) diff --git a/bigreqsproto/.gitignore b/bigreqsproto/.gitignore new file mode 100644 index 0000000..9edb463 --- /dev/null +++ b/bigreqsproto/.gitignore @@ -0,0 +1,78 @@ +# +# X.Org module default exclusion patterns +# The next section if for module specific patterns +# +# Do not edit the following section +# GNU Build System (Autotools) +aclocal.m4 +autom4te.cache/ +autoscan.log +ChangeLog +compile +config.guess +config.h +config.h.in +config.log +config-ml.in +config.py +config.status +config.status.lineno +config.sub +configure +configure.scan +depcomp +.deps/ +INSTALL +install-sh +.libs/ +libtool +libtool.m4 +ltmain.sh +lt~obsolete.m4 +ltoptions.m4 +ltsugar.m4 +ltversion.m4 +Makefile +Makefile.in +mdate-sh +missing +mkinstalldirs +*.pc +py-compile +stamp-h? +symlink-tree +texinfo.tex +ylwrap + +# Do not edit the following section +# Edit Compile Debug Document Distribute +*~ +*.[0-9] +*.[0-9]x +*.bak +*.bin +core +*.dll +*.exe +*-ISO*.bdf +*-JIS*.bdf +*-KOI8*.bdf +*.kld +*.ko +*.ko.cmd +*.lai +*.l[oa] +*.[oa] +*.obj +*.patch +*.so +*.pcf.gz +*.pdb +*.tar.bz2 +*.tar.gz +# +# Add & Override patterns for bigreqsproto +# +# Edit the following section as needed +# For example, !report.pc overrides *.pc. See 'man gitignore' +# diff --git a/bigreqsproto/COPYING b/bigreqsproto/COPYING new file mode 100644 index 0000000..142f2fa --- /dev/null +++ b/bigreqsproto/COPYING @@ -0,0 +1,21 @@ +Copyright 1992, 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. diff --git a/bigreqsproto/Makefile.am b/bigreqsproto/Makefile.am new file mode 100644 index 0000000..45960ba --- /dev/null +++ b/bigreqsproto/Makefile.am @@ -0,0 +1,20 @@ +bigreqsdir = $(includedir)/X11/extensions +bigreqs_HEADERS = \ + bigreqsproto.h \ + bigreqstr.h + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = bigreqsproto.pc + + +MAINTAINERCLEANFILES = ChangeLog INSTALL + +.PHONY: ChangeLog INSTALL + +INSTALL: + $(INSTALL_CMD) + +ChangeLog: + $(CHANGELOG_CMD) + +dist-hook: ChangeLog INSTALL diff --git a/bigreqsproto/README b/bigreqsproto/README new file mode 100644 index 0000000..f8b14de --- /dev/null +++ b/bigreqsproto/README @@ -0,0 +1,30 @@ + Big Requests Extension + +This extension defines a protocol to enable the use of requests +that exceed 262140 bytes in length. + +Extension name: BIG-REQUESTS + +All questions regarding this software should be directed at the +Xorg mailing list: + + http://lists.freedesktop.org/mailman/listinfo/xorg + +Please submit bug reports to the Xorg bugzilla: + + https://bugs.freedesktop.org/enter_bug.cgi?product=xorg + +The master development code repository can be found at: + + git://anongit.freedesktop.org/git/xorg/proto/bigreqsproto + + http://cgit.freedesktop.org/xorg/proto/bigreqsproto + +For patch submission instructions, see: + + http://www.x.org/wiki/Development/Documentation/SubmittingPatches + +For more information on the git code manager, see: + + http://wiki.x.org/wiki/GitPage + diff --git a/bigreqsproto/autogen.sh b/bigreqsproto/autogen.sh new file mode 100755 index 0000000..904cd67 --- /dev/null +++ b/bigreqsproto/autogen.sh @@ -0,0 +1,12 @@ +#! /bin/sh + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +ORIGDIR=`pwd` +cd $srcdir + +autoreconf -v --install || exit 1 +cd $ORIGDIR || exit $? + +$srcdir/configure --enable-maintainer-mode "$@" diff --git a/bigreqsproto/bigreqsproto.h b/bigreqsproto/bigreqsproto.h new file mode 100644 index 0000000..bd0f8e5 --- /dev/null +++ b/bigreqsproto/bigreqsproto.h @@ -0,0 +1,67 @@ +/* + +Copyright 1992, 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. + +*/ + +#ifndef _BIGREQSPROTO_H_ +#define _BIGREQSPROTO_H_ + +#define X_BigReqEnable 0 + +#define XBigReqNumberEvents 0 + +#define XBigReqNumberErrors 0 + +#define XBigReqExtensionName "BIG-REQUESTS" + +typedef struct { + CARD8 reqType; /* always XBigReqCode */ + CARD8 brReqType; /* always X_BigReqEnable */ + CARD16 length B16; +} xBigReqEnableReq; +#define sz_xBigReqEnableReq 4 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 pad0; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 max_request_size B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xBigReqEnableReply; +#define sz_xBigReqEnableReply 32 + + +typedef struct { + CARD8 reqType; + CARD8 data; + CARD16 zero B16; + CARD32 length B32; +} xBigReq; + +#endif /* _BIGREQSPROTO_H_ */ diff --git a/bigreqsproto/bigreqsproto.pc.in b/bigreqsproto/bigreqsproto.pc.in new file mode 100644 index 0000000..e3adbfd --- /dev/null +++ b/bigreqsproto/bigreqsproto.pc.in @@ -0,0 +1,9 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: BigReqsProto +Description: BigReqs extension headers +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} diff --git a/bigreqsproto/bigreqstr.h b/bigreqsproto/bigreqstr.h new file mode 100644 index 0000000..0a023db --- /dev/null +++ b/bigreqsproto/bigreqstr.h @@ -0,0 +1,3 @@ +#warning "bigreqstr.h is obsolete and may be removed in the future." +#warning "include <X11/extensions/bigreqsproto.h> for the protocol defines." +#include <X11/extensions/bigreqsproto.h> diff --git a/bigreqsproto/configure.ac b/bigreqsproto/configure.ac new file mode 100644 index 0000000..9c1cf55 --- /dev/null +++ b/bigreqsproto/configure.ac @@ -0,0 +1,13 @@ +AC_PREREQ([2.60]) +AC_INIT([BigReqsProto], [1.1.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg]) +AM_INIT_AUTOMAKE([foreign dist-bzip2]) +AM_MAINTAINER_MODE + +# Require xorg-macros: XORG_DEFAULT_OPTIONS +m4_ifndef([XORG_MACROS_VERSION], + [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.3) +XORG_DEFAULT_OPTIONS + +AC_OUTPUT([Makefile + bigreqsproto.pc]) diff --git a/calibrateproto/Makefile.am b/calibrateproto/Makefile.am new file mode 100644 index 0000000..2e7dee2 --- /dev/null +++ b/calibrateproto/Makefile.am @@ -0,0 +1,39 @@ +# +# Copyright © 2003 Philip Blundell +# +# 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 Philip Blundell not be used in +# advertising or publicity pertaining to distribution of the software without +# specific, written prior permission. Philip Blundell makes no +# representations about the suitability of this software for any purpose. It +# is provided "as is" without express or implied warranty. +# +# PHILIP BLUNDELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +# EVENT SHALL PHILIP BLUNDELL 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. +# + +XCalibrateincludedir = $(includedir)/X11/extensions +XCalibrateinclude_HEADERS = xcalibrateproto.h xcalibratewire.h + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = xcalibrateproto.pc + +EXTRA_DIST = autogen.sh xcalibrateproto.pc.in + +EXTRA_DIST += ChangeLog +MAINTAINERCLEANFILES = ChangeLog + +.PHONY: ChangeLog + +ChangeLog: + (GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2) + +dist-hook: ChangeLog diff --git a/calibrateproto/autogen.sh b/calibrateproto/autogen.sh new file mode 100755 index 0000000..904cd67 --- /dev/null +++ b/calibrateproto/autogen.sh @@ -0,0 +1,12 @@ +#! /bin/sh + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +ORIGDIR=`pwd` +cd $srcdir + +autoreconf -v --install || exit 1 +cd $ORIGDIR || exit $? + +$srcdir/configure --enable-maintainer-mode "$@" diff --git a/calibrateproto/configure.ac b/calibrateproto/configure.ac new file mode 100644 index 0000000..eb41072 --- /dev/null +++ b/calibrateproto/configure.ac @@ -0,0 +1,6 @@ +AC_PREREQ([2.59]) +AC_INIT([xcalibrateproto], [0.1.0], [pb@nexus.co.uk]) +AM_INIT_AUTOMAKE([foreign dist-bzip2]) + +AC_OUTPUT([Makefile + xcalibrateproto.pc]) diff --git a/calibrateproto/xcalibrateproto.h b/calibrateproto/xcalibrateproto.h new file mode 100644 index 0000000..feded32 --- /dev/null +++ b/calibrateproto/xcalibrateproto.h @@ -0,0 +1,120 @@ +/* + * $Id: xcalibrateproto.h,v 1.1.1.1 2004/06/02 19:18:47 pb Exp $ + * + * Copyright © 2003 Philip Blundell + * + * 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 Philip Blundell not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Philip Blundell makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * PHILIP BLUNDELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL PHILIP BLUNDELL 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 XCALIBRATEPROTO_H +#define XCALIBRATEPROTO_H + +/* + * requests and replies + */ +typedef struct { + CARD8 reqType; + CARD8 xCalibrateReqType; + CARD16 length B16; + CARD32 majorVersion B32; + CARD32 minorVersion B32; +} xXCalibrateQueryVersionReq; + +#define sz_xXCalibrateQueryVersionReq 12 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 majorVersion B32; + CARD32 minorVersion B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xXCalibrateQueryVersionReply; + +#define sz_xXCalibrateQueryVersionReply 32 + +typedef struct { + CARD8 reqType; + CARD8 xCalibrateReqType; + CARD16 length B16; + CARD16 on B16; + CARD16 pad B16; +} xXCalibrateRawModeReq; + +#define sz_xXCalibrateRawModeReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 status; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; + CARD32 pad7 B32; +} xXCalibrateRawModeReply; + +#define sz_xXCalibrateRawModeReply 32 + +typedef struct { + CARD8 reqType; + CARD8 xCalibrateReqType; + CARD16 length B16; + CARD32 x B32; + CARD32 y B32; +} xXCalibrateScreenToCoordReq; + +#define sz_xXCalibrateScreenToCoordReq 12 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 x; + CARD32 y; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xXCalibrateScreenToCoordReply; + +#define sz_xXCalibrateScreenToCoordReply 32 + +/* Events */ + +typedef struct { + CARD8 type; + CARD8 pad1; + CARD16 sequenceNumber B16; + CARD16 x; + CARD16 y; + CARD16 pressure; + CARD16 pad2; +} xXCalibrateRawTouchscreenEvent; + +#define sz_xXCalibrateRawTouchscreenEvent 12 + +#endif diff --git a/calibrateproto/xcalibrateproto.pc.in b/calibrateproto/xcalibrateproto.pc.in new file mode 100644 index 0000000..f17f8d7 --- /dev/null +++ b/calibrateproto/xcalibrateproto.pc.in @@ -0,0 +1,9 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: XCalibrate +Description: XCalibrate extension headers +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} diff --git a/calibrateproto/xcalibratewire.h b/calibrateproto/xcalibratewire.h new file mode 100644 index 0000000..0a1c904 --- /dev/null +++ b/calibrateproto/xcalibratewire.h @@ -0,0 +1,44 @@ +/* + * $Id: xcalibratewire.h,v 1.1.1.1 2004/06/02 19:18:47 pb Exp $ + * + * Copyright © 2003 Philip Blundell + * + * 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 Philip Blundell not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Philip Blundell makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * PHILIP BLUNDELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL PHILIP BLUNDELL 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 XCALIBRATEWIRE_H +#define XCALIBRATEWIRE_H + +#define XCALIBRATE_MAJOR_VERSION 0 +#define XCALIBRATE_MINOR_VERSION 1 +#define XCALIBRATE_NAME "XCALIBRATE" + +#define X_XCalibrateQueryVersion 0 +#define X_XCalibrateRawMode 1 +#define X_XCalibrateScreenToCoord 2 + +#define XCalibrateNumberRequests (X_XCalibrateScreenToCoord + 1) + +#define X_XCalibrateRawTouchscreen 0 + +#define XCalibrateNumberEvents (X_XCalibrateRawTouchscreen + 1) + +#define XCalibrateNumberErrors 0 + +#endif diff --git a/compositeproto/.gitignore b/compositeproto/.gitignore new file mode 100644 index 0000000..896b3f5 --- /dev/null +++ b/compositeproto/.gitignore @@ -0,0 +1,78 @@ +# +# X.Org module default exclusion patterns +# The next section if for module specific patterns +# +# Do not edit the following section +# GNU Build System (Autotools) +aclocal.m4 +autom4te.cache/ +autoscan.log +ChangeLog +compile +config.guess +config.h +config.h.in +config.log +config-ml.in +config.py +config.status +config.status.lineno +config.sub +configure +configure.scan +depcomp +.deps/ +INSTALL +install-sh +.libs/ +libtool +libtool.m4 +ltmain.sh +lt~obsolete.m4 +ltoptions.m4 +ltsugar.m4 +ltversion.m4 +Makefile +Makefile.in +mdate-sh +missing +mkinstalldirs +*.pc +py-compile +stamp-h? +symlink-tree +texinfo.tex +ylwrap + +# Do not edit the following section +# Edit Compile Debug Document Distribute +*~ +*.[0-9] +*.[0-9]x +*.bak +*.bin +core +*.dll +*.exe +*-ISO*.bdf +*-JIS*.bdf +*-KOI8*.bdf +*.kld +*.ko +*.ko.cmd +*.lai +*.l[oa] +*.[oa] +*.obj +*.patch +*.so +*.pcf.gz +*.pdb +*.tar.bz2 +*.tar.gz +# +# Add & Override patterns for compositeproto +# +# Edit the following section as needed +# For example, !report.pc overrides *.pc. See 'man gitignore' +# diff --git a/compositeproto/AUTHORS b/compositeproto/AUTHORS new file mode 100644 index 0000000..8e18f9b --- /dev/null +++ b/compositeproto/AUTHORS @@ -0,0 +1 @@ +Keith Packard, HP diff --git a/compositeproto/COPYING b/compositeproto/COPYING new file mode 100644 index 0000000..23c1a6c --- /dev/null +++ b/compositeproto/COPYING @@ -0,0 +1,41 @@ +Copyright © 2006 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, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +Copyright © 2003 Keith Packard + +Permission to use, copy, modify, distribute, and sell this software and its +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. + diff --git a/compositeproto/Makefile.am b/compositeproto/Makefile.am new file mode 100644 index 0000000..5a14884 --- /dev/null +++ b/compositeproto/Makefile.am @@ -0,0 +1,43 @@ +# +# Copyright © 2003 Keith Packard, Noah Levitt +# +# 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. + +compositedir = $(includedir)/X11/extensions +composite_HEADERS = \ + composite.h \ + compositeproto.h + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = compositeproto.pc + +dist_doc_DATA = compositeproto.txt + + +MAINTAINERCLEANFILES = ChangeLog INSTALL + +.PHONY: ChangeLog INSTALL + +INSTALL: + $(INSTALL_CMD) + +ChangeLog: + $(CHANGELOG_CMD) + +dist-hook: ChangeLog INSTALL diff --git a/compositeproto/README b/compositeproto/README new file mode 100644 index 0000000..66b40a4 --- /dev/null +++ b/compositeproto/README @@ -0,0 +1,33 @@ + Composite Extension + Version 0.1 + 2003-11-04 + +This package contains header files and documentation for the composite +extension. Library and server implementations are separate. + +Keith Packard +keithp@keithp.com + +All questions regarding this software should be directed at the +Xorg mailing list: + + http://lists.freedesktop.org/mailman/listinfo/xorg + +Please submit bug reports to the Xorg bugzilla: + + https://bugs.freedesktop.org/enter_bug.cgi?product=xorg + +The master development code repository can be found at: + + git://anongit.freedesktop.org/git/xorg/proto/compositeproto + + http://cgit.freedesktop.org/xorg/proto/compositeproto + +For patch submission instructions, see: + + http://www.x.org/wiki/Development/Documentation/SubmittingPatches + +For more information on the git code manager, see: + + http://wiki.x.org/wiki/GitPage + diff --git a/compositeproto/autogen.sh b/compositeproto/autogen.sh new file mode 100755 index 0000000..904cd67 --- /dev/null +++ b/compositeproto/autogen.sh @@ -0,0 +1,12 @@ +#! /bin/sh + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +ORIGDIR=`pwd` +cd $srcdir + +autoreconf -v --install || exit 1 +cd $ORIGDIR || exit $? + +$srcdir/configure --enable-maintainer-mode "$@" diff --git a/compositeproto/composite.h b/compositeproto/composite.h new file mode 100644 index 0000000..7725321 --- /dev/null +++ b/compositeproto/composite.h @@ -0,0 +1,71 @@ +/* + * Copyright © 2006 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, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ +/* + * Copyright © 2003 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _COMPOSITE_H_ +#define _COMPOSITE_H_ + +#include <X11/extensions/xfixeswire.h> + +#define COMPOSITE_NAME "Composite" +#define COMPOSITE_MAJOR 0 +#define COMPOSITE_MINOR 4 + +#define CompositeRedirectAutomatic 0 +#define CompositeRedirectManual 1 + +#define X_CompositeQueryVersion 0 +#define X_CompositeRedirectWindow 1 +#define X_CompositeRedirectSubwindows 2 +#define X_CompositeUnredirectWindow 3 +#define X_CompositeUnredirectSubwindows 4 +#define X_CompositeCreateRegionFromBorderClip 5 +#define X_CompositeNameWindowPixmap 6 +#define X_CompositeGetOverlayWindow 7 +#define X_CompositeReleaseOverlayWindow 8 + +#define CompositeNumberRequests (X_CompositeReleaseOverlayWindow + 1) + +#define CompositeNumberEvents 0 + +#endif /* _COMPOSITE_H_ */ diff --git a/compositeproto/compositeproto.h b/compositeproto/compositeproto.h new file mode 100644 index 0000000..aa6cd8a --- /dev/null +++ b/compositeproto/compositeproto.h @@ -0,0 +1,192 @@ +/* + * Copyright © 2006 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, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ +/* + * Copyright © 2003 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _COMPOSITEPROTO_H_ +#define _COMPOSITEPROTO_H_ + +#include <X11/Xmd.h> +#include <X11/extensions/composite.h> + +#define Window CARD32 +#define Region CARD32 +#define Pixmap CARD32 + +/* + * requests and replies + */ +typedef struct { + CARD8 reqType; + CARD8 compositeReqType; + CARD16 length B16; + CARD32 majorVersion B32; + CARD32 minorVersion B32; +} xCompositeQueryVersionReq; + +#define sz_xCompositeQueryVersionReq 12 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 majorVersion B32; + CARD32 minorVersion B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xCompositeQueryVersionReply; + +#define sz_xCompositeQueryVersionReply 32 + +typedef struct { + CARD8 reqType; + CARD8 compositeReqType; + CARD16 length B16; + Window window B32; + CARD8 update; + CARD8 pad1; + CARD16 pad2 B16; +} xCompositeRedirectWindowReq; + +#define sz_xCompositeRedirectWindowReq 12 + +typedef struct { + CARD8 reqType; + CARD8 compositeReqType; + CARD16 length B16; + Window window B32; + CARD8 update; + CARD8 pad1; + CARD16 pad2 B16; +} xCompositeRedirectSubwindowsReq; + +#define sz_xCompositeRedirectSubwindowsReq 12 + +typedef struct { + CARD8 reqType; + CARD8 compositeReqType; + CARD16 length B16; + Window window B32; + CARD8 update; + CARD8 pad1; + CARD16 pad2 B16; +} xCompositeUnredirectWindowReq; + +#define sz_xCompositeUnredirectWindowReq 12 + +typedef struct { + CARD8 reqType; + CARD8 compositeReqType; + CARD16 length B16; + Window window B32; + CARD8 update; + CARD8 pad1; + CARD16 pad2 B16; +} xCompositeUnredirectSubwindowsReq; + +#define sz_xCompositeUnredirectSubwindowsReq 12 + +typedef struct { + CARD8 reqType; + CARD8 compositeReqType; + CARD16 length B16; + Region region B32; + Window window B32; +} xCompositeCreateRegionFromBorderClipReq; + +#define sz_xCompositeCreateRegionFromBorderClipReq 12 + +/* Version 0.2 additions */ + +typedef struct { + CARD8 reqType; + CARD8 compositeReqType; + CARD16 length; + Window window B32; + Pixmap pixmap B32; +} xCompositeNameWindowPixmapReq; + +#define sz_xCompositeNameWindowPixmapReq 12 + +/* Version 0.3 additions */ + +typedef struct { + CARD8 reqType; + CARD8 compositeReqType; + CARD16 length B16; + Window window B32; +} xCompositeGetOverlayWindowReq; + +#define sz_xCompositeGetOverlayWindowReq sizeof(xCompositeGetOverlayWindowReq) + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + Window overlayWin B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xCompositeGetOverlayWindowReply; + +#define sz_xCompositeGetOverlayWindowReply sizeof(xCompositeGetOverlayWindowReply) + +typedef struct { + CARD8 reqType; + CARD8 compositeReqType; + CARD16 length B16; + Window window B32; +} xCompositeReleaseOverlayWindowReq; + +#define sz_xCompositeReleaseOverlayWindowReq sizeof(xCompositeReleaseOverlayWindowReq) + +#undef Window +#undef Region +#undef Pixmap + +#endif /* _COMPOSITEPROTO_H_ */ diff --git a/compositeproto/compositeproto.pc.in b/compositeproto/compositeproto.pc.in new file mode 100644 index 0000000..6348022 --- /dev/null +++ b/compositeproto/compositeproto.pc.in @@ -0,0 +1,9 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: CompositeExt +Description: Composite extension headers +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} diff --git a/compositeproto/compositeproto.txt b/compositeproto/compositeproto.txt new file mode 100644 index 0000000..4b86621 --- /dev/null +++ b/compositeproto/compositeproto.txt @@ -0,0 +1,339 @@ + Composite Extension + Version 0.4 + 2007-7-3 + Keith Packard + keithp@keithp.com + Deron Johnson + deron.johnson@sun.com + +1. Introduction + +Many user interface operations would benefit from having pixel contents of +window hierarchies available without respect to sibling and antecedent +clipping. In addition, placing control over the composition of these pixel +contents into a final screen image in an external application will enable +a flexible system for dynamic application content presentation. + +2. Acknowledgements + +This small extension has been brewing for several years, contributors to +both early prototypes and the final design include: + + + Bill Haneman for motivating the ability to magnify occluded windows + with his work on accessibility + + + Carsten Haitzler for Enlightenment, the original eye-candy window + manager which demonstrated that clever hacks are an awfully + close substitute for changes in the underlying system. + + + Jim Gettys for key insights into the relationship between damage + events and per-window pixmap usage + + + Mike Harris and Owen Taylor for figuring out what to call it. + + + Deron Johnson for the Looking Glass implementation and + a prototype of the coordinate transformation mechanism. + + + Ryan Lortie for helping figure out reasonable parent clipping + semantics in the presense of manual redirected children. + +3. Architecture + +The composite extension provides three related mechanisms: + + 1. Per-hierarchy storage. The rendering of an entire hierarchy of windows + is redirected to off-screen storage. The pixels of that hierarchy + are available whenever it is viewable. Storage is automatically + reallocated when the top level window changes size. Contents beyond + the geometry of the top window are not preserved. + + 2. Automatic shadow update. When a hierarchy is rendered off-screen, + the X server provides an automatic mechanism for presenting those + contents within the parent window. The implementation is free to + make this update lag behind actual rendering operations by an + unspecified amount of time. This automatic update mechanism may + be disabled so that the parent window contents can be completely + determined by an external application. + + 3. External parent - child pointer coordinate transformation. + When a hierarchy is under manual compositing, the relationship + of coordinates within the parent to those in the child may + not be known within the X server. This mechanism provides + for redirection of these transformations through a client. + +Per-hierarchy storage may be created for individual windows or for all +children of a window. Manual shadow update may be selected by only a single +application for each window; manual update may also be selected on a +per-window basis or for each child of a window. Detecting when to update +may be done with the Damage extension. + +The off-screen storage includes the window contents, its borders and the +contents of all descendants. + +3.1 NameWindowPixmap + +Version 0.2 of the protocol introduces a mechanism for associating an XID +with the off-screen pixmap used to store these contents. This can be used +to hold onto window contents after the window is unmapped (and hence animate +it's disappearance), and also to access the border of the window, which is +not reachable through the Window ID itself. A new pixmap is created each +time the window is mapped or resized; as these events are nicely signalled +with existing events, no additional notification is needed. The old pixmap +will remain allocated as long as the Pixmap ID is left valid, it is +important that the client use the FreePixmap request when it is done with +the contents and to create a new name for the newly allocated pixmap. + +In automatic update mode, the X server is itself responsible for presenting +the child window contents within the parent. It seems reasonable, then, for +rendering to the parent window to be clipped so as not to interfere with any +child window content. In an environment with a mixure of manual and +automatic updating windows, rendering to the parent in the area nominally +occupied by a manual update window should be able to affect parent pixel +values in those areas, but such rendering should be clipped to automatic +update windows, and presumably to other manual update windows managed by +other applications. In any of these cases, it should be easy to ensure that +rendering has no effect on any non-redirected windows. + +Instead of attempting to define new clipping modes for rendering, the +Composite extension instead defines ClipByChildren rendering to the parent +to exclude regions occupied by redirected windows (either automatic or +manual). The CreateRegionFromBorderClip request can be used along with +IncludeInferiors clipping modes to restrict manual shadow updates to the +apporpriate region of the screen. Bracketing operations with +GrabServer/UngrabServer will permit atomic sequences that can update the +screen without artifact. As all of these operations are asynchronous, +network latency should not adversely affect update latency. + +3.2 Composite Overlay Window + +Version 0.3 of the protocol adds the Composite Overlay Window, which +provides compositing managers with a surface on which to draw without +interference. This window is always above normal windows and is always +below the screen saver window. It is an InputOutput window whose width +and height are the screen dimensions. Its visual is the root visual +and its border width is zero. Attempts to redirect it using the +composite extension are ignored. This window does not appear in the +reply of the QueryTree request. It is also an override redirect window. +These last two features make it invisible to window managers and other X11 +clients. The only way to access the XID of this window is via the +CompositeGetOverlayWindow request. Initially, the Composite Overlay +Window is unmapped. + +CompositeGetOverlayWindow returns the XID of the Composite Overlay +Window. If the window has not yet been mapped, it is mapped by this +request. When all clients who have called this request have terminated +their X11 connections the window is unmapped. + +Composite managers may render directly to the Composite Overlay +Window, or they may reparent other windows to be children of this +window and render to these. Multiple clients may render to the +Composite Overlay Window, create child windows of it, reshape it, and +redefine its input region, but the specific arbitration rules followed +by these clients is not defined by this specification; these policies +should be defined by the clients themselves. + +3.3 Clipping semantics redefined + +Version 0.4 of the protocol changes the semantics of clipping in the +presense of manual redirect children. In version 0.3, a parent was always +clipped to child windows, independent of the kind of redirection going on. +With version 0.4, the parent is no longer clipped to child windows which are +manually redirected. This means the parent can draw in the child region without using +IncludeInferiors mode, and (perhaps more importantly), it will receive +expose events in those regions caused by other actions. This new behaviour +is not selectable. + +4. Errors + +The composite extension does not define any new errors. + +5. Types + + UPDATETYPE { Automatic, Manual } + + CompositeCoordinate + child: Window + x, y: CARD16 + +7. Extension Initialization + +The client must negotiate the version of the extension before executing +extension requests. Otherwise, the server will return BadRequest for any +operations other than QueryVersion. + + QueryVersion + + client-major-version: CARD32 + client-minor-version: CARD32 + + -> + + major-version: CARD32 + minor-version: CARD32 + + The client sends the highest supported version to the server and + the server sends the highest version it supports, but no higher than + the requested version. Major versions changes can introduce + incompatibilities in existing functionality, minor version + changes introduce only backward compatible changes. It is + the client's responsibility to ensure that the server supports + a version which is compatible with its expectations. Servers + are encouraged to support multiple versions of the extension. + +8. Hierarchy Redirection + + RedirectWindow + + window: Window + update: UPDATETYPE + + errors: Window, Access, Match + + The hierarchy starting at 'window' is directed to off-screen + storage. 'update' specifies whether the contents are mirrored to + the parent window automatically or not. Only one client may specify + an update type of Manual, another attempt will result in an + Access error. When all clients enabling redirection terminate, + the redirection will automatically be disabled. + + The root window may not be redirected. Doing so results in a Match + error. + + RedirectSubwindows + + window: Window + update UPDATETYPE + + errors: Window, Access + + Hierarchies starting at all current and future children of window + will be redirected as in RedirectWindow. If update is Manual, + then painting of the window background during window manipulation + and ClearArea requests is inhibited. + + UnredirectWindow: + + window: Window + + errors: Window, Value + + Redirection of the specified window will be terminated. If + the specified window was not selected for redirection by the + current client, a 'Value' error results. + + UnredirectWindows: + + window: Window + + errors: Window, Value + + Redirection of all children of window will be terminated. If + the specified window was not selected for sub-redirection by the + current client, a 'Value' error results. + +9. Clip lists + + CreateRegionFromBorderClip + + region: Region + window: Window + + errors: Window, IDChoice + + This request creates a region containing the "usual" border clip + value; that is the area of the window clipped against siblings and + the parent. This region can be used to restrict rendering to + suitable areas while updating only a single window. The region + is copied at the moment the request is executed; future changes + to the window hierarchy will not be reflected in this region. + +10. Associating a Pixmap ID with the off-screen storage (0.2 and later) + + NameWindowPixmap + + window: Window + pixmap: Pixmap + + errors: Window, Match, IDChoice + + This request makes 'pixmap' a reference to the off-screen storage + for 'window'. This pixmap will remain allocated until freed, even + if 'window' is unmapped, reconfigured or destroyed. However, + 'window' will get a new pixmap allocated each time it is + mapped or resized, so this request will need to be reinvoked for + the client to continue to refer to the storage holding the current + window contents. Generates a 'Match' error if 'window' is not + redirected or is not visible. + +11. Composite Overlay Window (0.3 and later) + + CompositeGetOverlayWindow + + window: Window + + -> + + overlayWin: Window + + This request returns the XID of the Composite Overlay Window for + the screen specified by the argument 'window'. This request + indicates that the client wishes to use the Composite Overlay + Window of this screen. If this Composite Overlay Window has not + yet been mapped, it is mapped by this request. + + The Composite Overlay Window for a particular screen will be + unmapped when all clients who have invoked this request have + also invoked CompositeReleaseOverlayWindow for that screen. Also, + CompositeReleaseOverlayWindow for a screen will be implicitly + called when a client using the Composite Overlay Window on that + screen terminates its X11 connection. + + + CompositeReleaseOverlayWindow + + window: Window + + This request specifies that the client is no longer using the + Composite Overlay Window on the screen specified by the + argument 'window'. A screen's Composite Overlay Window is + unmapped when there are no longer any clients using it. + +12. External coordinate transformation (0.4 and later) + + RedirectCoordinate + + window: Window + redirect: BOOL + + errors: Window, Access + + If 'redirect' is TRUE, the requesting client is placed in charge of + coordinate transformations between 'window' and its children. If + 'redirect' is FALSE, any such redirection is disabled. Any + transformations needed by the server will be delivered to the + requesting client in TransformCoordinateNotify events and the + requesting client must reply with matching TransformCoordinate + requests for the server to continue with the operation. + + Generates an 'Access' error if another client has + redirected coordinates for 'window'. + + TransformCoordinate + + window: Window + serialNumber: CARD32 + x, y: INT16 + coordinates: LISTofCompositeCoordinate + + This provides the transformation data needed by the server for a + single TransformCoordinateNotify event. 'serialNumber' must match + the serial number delivered in the event. 'x' and 'y' represent the + coordinate from the event relative to the 'window'. 'coordinates' + represent the coordinate from the event relative to each child + listed. Any children not listed in 'coordinates' are given the + default transformation using the child window position within the + parent as a simple translation. + + The result of this is that any pointer data seen by means of + the protocol will appear to reflect the transformation + performed by this request. diff --git a/compositeproto/configure.ac b/compositeproto/configure.ac new file mode 100644 index 0000000..45969f7 --- /dev/null +++ b/compositeproto/configure.ac @@ -0,0 +1,37 @@ +dnl +dnl Copyright © 2003 Keith Packard, Noah Levitt +dnl +dnl Permission to use, copy, modify, distribute, and sell this software and its +dnl documentation for any purpose is hereby granted without fee, provided that +dnl the above copyright notice appear in all copies and that both that +dnl copyright notice and this permission notice appear in supporting +dnl documentation, and that the name of Keith Packard not be used in +dnl advertising or publicity pertaining to distribution of the software without +dnl specific, written prior permission. Keith Packard makes no +dnl representations about the suitability of this software for any purpose. It +dnl is provided "as is" without express or implied warranty. +dnl +dnl KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +dnl EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR +dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +dnl PERFORMANCE OF THIS SOFTWARE. +dnl +dnl Process this file with autoconf to create configure. + +AC_PREREQ([2.60]) +AC_INIT([CompositeProto], [0.4.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg]) +AM_INIT_AUTOMAKE([foreign dist-bzip2]) +AM_MAINTAINER_MODE + +# Require xorg-macros: XORG_DEFAULT_OPTIONS +m4_ifndef([XORG_MACROS_VERSION], + [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.3) +XORG_DEFAULT_OPTIONS + +AC_OUTPUT([Makefile + compositeproto.pc]) + diff --git a/damageproto/.gitignore b/damageproto/.gitignore new file mode 100644 index 0000000..cd9ffab --- /dev/null +++ b/damageproto/.gitignore @@ -0,0 +1,78 @@ +# +# X.Org module default exclusion patterns +# The next section if for module specific patterns +# +# Do not edit the following section +# GNU Build System (Autotools) +aclocal.m4 +autom4te.cache/ +autoscan.log +ChangeLog +compile +config.guess +config.h +config.h.in +config.log +config-ml.in +config.py +config.status +config.status.lineno +config.sub +configure +configure.scan +depcomp +.deps/ +INSTALL +install-sh +.libs/ +libtool +libtool.m4 +ltmain.sh +lt~obsolete.m4 +ltoptions.m4 +ltsugar.m4 +ltversion.m4 +Makefile +Makefile.in +mdate-sh +missing +mkinstalldirs +*.pc +py-compile +stamp-h? +symlink-tree +texinfo.tex +ylwrap + +# Do not edit the following section +# Edit Compile Debug Document Distribute +*~ +*.[0-9] +*.[0-9]x +*.bak +*.bin +core +*.dll +*.exe +*-ISO*.bdf +*-JIS*.bdf +*-KOI8*.bdf +*.kld +*.ko +*.ko.cmd +*.lai +*.l[oa] +*.[oa] +*.obj +*.patch +*.so +*.pcf.gz +*.pdb +*.tar.bz2 +*.tar.gz +# +# Add & Override patterns for damageproto +# +# Edit the following section as needed +# For example, !report.pc overrides *.pc. See 'man gitignore' +# diff --git a/damageproto/AUTHORS b/damageproto/AUTHORS new file mode 100644 index 0000000..78b329f --- /dev/null +++ b/damageproto/AUTHORS @@ -0,0 +1,2 @@ +Keith Packard, HP +Eric Anholt, Intel diff --git a/damageproto/COPYING b/damageproto/COPYING new file mode 100644 index 0000000..a44e065 --- /dev/null +++ b/damageproto/COPYING @@ -0,0 +1,23 @@ +$Id: COPYING,v 1.1 2003-10-24 06:16:46 keithp Exp $ + +Copyright © 2001,2003 Keith Packard +Copyright © 2007 Eric Anholt + +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. + diff --git a/damageproto/Makefile.am b/damageproto/Makefile.am new file mode 100644 index 0000000..7c9b757 --- /dev/null +++ b/damageproto/Makefile.am @@ -0,0 +1,43 @@ +# +# Copyright © 2003 Keith Packard, Noah Levitt +# +# 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. + +damagedir = $(includedir)/X11/extensions +damage_HEADERS = \ + damageproto.h \ + damagewire.h + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = damageproto.pc + +dist_doc_DATA = damageproto.txt + + +MAINTAINERCLEANFILES = ChangeLog INSTALL + +.PHONY: ChangeLog INSTALL + +INSTALL: + $(INSTALL_CMD) + +ChangeLog: + $(CHANGELOG_CMD) + +dist-hook: ChangeLog INSTALL diff --git a/damageproto/NEWS b/damageproto/NEWS new file mode 100644 index 0000000..29b8edd --- /dev/null +++ b/damageproto/NEWS @@ -0,0 +1,2 @@ +2004-01-05: Version 1.0 released. +2007-01-09: Version 1.1 released, adding the DamageAdd request.
\ No newline at end of file diff --git a/damageproto/README b/damageproto/README new file mode 100644 index 0000000..a8a4e78 --- /dev/null +++ b/damageproto/README @@ -0,0 +1,34 @@ + Damage + X Damage Extension + Version 1.1 + 2007-01-08 + +This package contains header files and documentation for the X Damage +extension. Library and server implementations are separate. + +Keith Packard +keithp@keithp.com + +All questions regarding this software should be directed at the +Xorg mailing list: + + http://lists.freedesktop.org/mailman/listinfo/xorg + +Please submit bug reports to the Xorg bugzilla: + + https://bugs.freedesktop.org/enter_bug.cgi?product=xorg + +The master development code repository can be found at: + + git://anongit.freedesktop.org/git/xorg/proto/damageproto + + http://cgit.freedesktop.org/xorg/proto/damageproto + +For patch submission instructions, see: + + http://www.x.org/wiki/Development/Documentation/SubmittingPatches + +For more information on the git code manager, see: + + http://wiki.x.org/wiki/GitPage + diff --git a/damageproto/autogen.sh b/damageproto/autogen.sh new file mode 100755 index 0000000..904cd67 --- /dev/null +++ b/damageproto/autogen.sh @@ -0,0 +1,12 @@ +#! /bin/sh + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +ORIGDIR=`pwd` +cd $srcdir + +autoreconf -v --install || exit 1 +cd $ORIGDIR || exit $? + +$srcdir/configure --enable-maintainer-mode "$@" diff --git a/damageproto/configure.ac b/damageproto/configure.ac new file mode 100644 index 0000000..b0d682b --- /dev/null +++ b/damageproto/configure.ac @@ -0,0 +1,37 @@ +dnl +dnl Copyright © 2003 Keith Packard, Noah Levitt +dnl +dnl Permission to use, copy, modify, distribute, and sell this software and its +dnl documentation for any purpose is hereby granted without fee, provided that +dnl the above copyright notice appear in all copies and that both that +dnl copyright notice and this permission notice appear in supporting +dnl documentation, and that the name of Keith Packard not be used in +dnl advertising or publicity pertaining to distribution of the software without +dnl specific, written prior permission. Keith Packard makes no +dnl representations about the suitability of this software for any purpose. It +dnl is provided "as is" without express or implied warranty. +dnl +dnl KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +dnl EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR +dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +dnl PERFORMANCE OF THIS SOFTWARE. +dnl +dnl Process this file with autoconf to create configure. + +AC_PREREQ([2.60]) +AC_INIT([DamageProto], [1.2.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg]) +AM_INIT_AUTOMAKE([foreign dist-bzip2]) +AM_MAINTAINER_MODE + +# Require xorg-macros: XORG_DEFAULT_OPTIONS +m4_ifndef([XORG_MACROS_VERSION], + [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.3) +XORG_DEFAULT_OPTIONS + +AC_OUTPUT([Makefile + damageproto.pc]) + diff --git a/damageproto/damageproto.h b/damageproto/damageproto.h new file mode 100644 index 0000000..107e192 --- /dev/null +++ b/damageproto/damageproto.h @@ -0,0 +1,158 @@ +/* + * Copyright © 2003 Keith Packard + * Copyright © 2007 Eric Anholt + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _DAMAGEPROTO_H_ +#define _DAMAGEPROTO_H_ + +#include <X11/Xmd.h> +#include <X11/extensions/xfixesproto.h> +#include <X11/extensions/damagewire.h> + +#define Window CARD32 +#define Drawable CARD32 +#define Font CARD32 +#define Pixmap CARD32 +#define Cursor CARD32 +#define Colormap CARD32 +#define GContext CARD32 +#define Atom CARD32 +#define VisualID CARD32 +#define Time CARD32 +#define KeyCode CARD8 +#define KeySym CARD32 +#define Picture CARD32 +#define Region CARD32 +#define Damage CARD32 + +/************** Version 0 ******************/ + +typedef struct { + CARD8 reqType; + CARD8 damageReqType; + CARD16 length B16; +} xDamageReq; + +/* + * requests and replies + */ + +typedef struct { + CARD8 reqType; + CARD8 damageReqType; + CARD16 length B16; + CARD32 majorVersion B32; + CARD32 minorVersion B32; +} xDamageQueryVersionReq; + +#define sz_xDamageQueryVersionReq 12 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 majorVersion B32; + CARD32 minorVersion B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xDamageQueryVersionReply; + +#define sz_xDamageQueryVersionReply 32 + +typedef struct { + CARD8 reqType; + CARD8 damageReqType; + CARD16 length B16; + Damage damage B32; + Drawable drawable B32; + CARD8 level; + CARD8 pad1; + CARD16 pad2 B16; +} xDamageCreateReq; + +#define sz_xDamageCreateReq 16 + +typedef struct { + CARD8 reqType; + CARD8 damageReqType; + CARD16 length B16; + Damage damage B32; +} xDamageDestroyReq; + +#define sz_xDamageDestroyReq 8 + +typedef struct { + CARD8 reqType; + CARD8 damageReqType; + CARD16 length B16; + Damage damage B32; + Region repair B32; + Region parts B32; +} xDamageSubtractReq; + +#define sz_xDamageSubtractReq 16 + +typedef struct { + CARD8 reqType; + CARD8 damageReqType; + CARD16 length B16; + Drawable drawable B32; + Region region B32; +} xDamageAddReq; + +#define sz_xDamageAddReq 12 + +/* Events */ + +#define DamageNotifyMore 0x80 + +typedef struct { + CARD8 type; + CARD8 level; + CARD16 sequenceNumber B16; + Drawable drawable B32; + Damage damage B32; + Time timestamp B32; + xRectangle area; + xRectangle geometry; +} xDamageNotifyEvent; + +#undef Damage +#undef Region +#undef Picture +#undef Window +#undef Drawable +#undef Font +#undef Pixmap +#undef Cursor +#undef Colormap +#undef GContext +#undef Atom +#undef VisualID +#undef Time +#undef KeyCode +#undef KeySym + +#endif /* _DAMAGEPROTO_H_ */ diff --git a/damageproto/damageproto.pc.in b/damageproto/damageproto.pc.in new file mode 100644 index 0000000..25476b9 --- /dev/null +++ b/damageproto/damageproto.pc.in @@ -0,0 +1,9 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: DamageProto +Description: Damage extension headers +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} diff --git a/damageproto/damageproto.txt b/damageproto/damageproto.txt new file mode 100644 index 0000000..1f254d4 --- /dev/null +++ b/damageproto/damageproto.txt @@ -0,0 +1,222 @@ + The DAMAGE Extension + Protocol Version 1.1 + Document Revision 1 + 2007-01-08 + + Keith Packard + keithp@keithp.com + + Eric Anholt + eric@anholt.net + Open Source Technology Center + Intel Corporation +1. Introduction + +Monitoring the regions affected by rendering has wide-spread use, from +VNC-like systems scraping the screen to screen magnifying applications +designed to aid users with limited visual acuity. The DAMAGE extension is +designed to make such applications reasonably efficient in the face of +server-client latency. + +2. Acknolwedgements + +As usual, the author had significant input from many people, in particular: + + + Havoc Pennington who designed and implemented a Damage extension + last year which was then lost to the mists of time. + + + Bill Haneman whose work on accessibility in the Gnome environment + is legendary. + + + Jim Gettys who found a way to avoid streaming damage rectangles + to the client in many cases. + + + Owen Taylor who suggested that streaming damage rectangles may + be warranted in some cases after all. + +3. Damage Model + +We call changes made to pixel contents of windows and pixmaps 'damage' +throughout this extension. Another notion of 'damage' are drawable regions +which are in need of redisplay to repair the effects of window manipulation +or other data loss. This extension doesn't deal with this second notion at +all; suggestions on a better term which isn't easily conflated with existing +notions are eagerly solicited. + +Damage accumulates as drawing occurs in the drawable. Each drawing operation +'damages' one or more rectangular areas within the drawable. The rectangles +are guaranteed to include the set of pixels modified by each operation, but +may include significantly more than just those pixels. The desire is for +the damage to strike a balance between the number of rectangles reported and +the extraneous area included. A reasonable goal is for each primitive +object drawn (line, string, rectangle) to be represented as a single +rectangle and for the damage area of the operation to be the union of these +rectangles. + +The DAMAGE extension allows applications to either receive the raw +rectangles as a stream of events, or to have them partially processed within +the X server to reduce the amount of data transmitted as well as reduce the +processing latency once the repaint operation has started. + +Damage to a window reflects both drawing within the window itself as well as +drawing within any inferior window that affects pixels seen by +IncludeInferiors rendering operations. To reduce the computational +complexity of this, the DAMAGE extension allows the server to monitor all +rendering operations within the physical target pixel storage that fall +within the bounds of the window. In a system with a single frame buffer +holding all windows, this means that damage will accumulate for all +rendering operations that lie within the visible part of the window. + +The precise reason for this architecture is to enable the Composite +extension which provides multiple pixel storage areas for the screen +contents. + +3.1 Additions in the 1.1 version of the protocol + +Damage is automatically computed by the X Server for X rendering operations, +but direct rendering extensions have allowed clients to perform rendering +outside of the control of the X Server. The 1.1 version of the protocol +added a request to allow direct rendering clients to report damage to a +drawable. Some direct rendering clients, due to architectural limitations, +always perform rendering to the root window, even in when it should be +performed to the backing pixmap in the Composite case. To provide +less-incorrect rendering in this cases, the direct rendering client should +translate its damage region to screen coordinates and report the damage against +the root window rather than the drawable. + +4. Data types + +The "Damage" object holds any accumulated damage region and reflects the +relationship between the drawable selected for damage notification and the +drawable for which damage is tracked. + +5. Errors + +Damage + A value for a DAMAGE argument does not name a defined DAMAGE. + +6. Types + + DAMAGE 32-bit value (top three bits guaranteed to be zero) + + DamageReportLevel { DamageReportRawRectangles, + DamageReportDeltaRectangles, + DamageReportBoundingBox, + DamageReportNonEmpty } + + DamageReportRawRectangles + + Delivers DamageNotify events each time the screen + is modified with rectangular bounds that circumscribe + the damaged area. No attempt to compress out overlapping + rectangles is made. + + DamageReportDeltaRectangles + + Delivers DamageNotify events each time damage occurs + which is not included in the damage region. The + reported rectangles include only the changes to that + area, not the raw damage data. + + DamageReportBoundingBox + + Delivers DamageNotify events each time the bounding + box enclosing the damage region increases in size. + The reported rectangle encloses the entire damage region, + not just the changes to that size. + + DamageReportNonEmpty + + Delivers a single DamageNotify event each time the + damage rectangle changes from empty to non-empty, and + also whenever the result of a DamageSubtract request + results in a non-empty region. + +7. Events + +DamageNotify + + level: DamageReportLevel + drawable: Drawable + damage: DAMAGE + more: Bool + timestamp: Timestamp + area: Rectangle + drawable-geometry: Rectangle + + 'more' indicates whether there are subsequent damage events + being delivered immediately as part of a larger damage region + +8. Extension Initialization + +The client must negotiate the version of the extension before executing +extension requests. Otherwise, the server will return BadRequest for any +operations other than QueryVersion. + +QueryVersion + + client-major-version: CARD32 + client-minor-version: CARD32 + + -> + + major-version: CARD32 + minor-version: CARD32 + + The client sends the highest supported version to the server and + the server sends the highest version it supports, but no higher than + the requested version. Major versions changes can introduce + incompatibilities in existing functionality, minor version + changes introduce only backward compatible changes. It is + the clients responsibility to ensure that the server supports + a version which is compatible with its expectations. Servers + are encouraged to support multiple versions of the extension. + +9. Enable Monitoring + +DamageCreate + + damage: DAMAGE + drawable: Drawable + level: DamageReportLevel + + Creates a damage object to monitor changes to Drawable + +DamageDestroy + damage: DAMAGE + + Destroys damage. + +DamageSubtract + + damage: DAMAGE + repair: Region or None + parts: Region or None + + Synchronously modifies the regions in the following manner: + + If repair is None: + + 1) if parts is not None, parts = damage + 2) damage = <empty> + + Otherwise: + + 1) tmp = damage INTERSECT repair + 2) damage = damage - tmp + 3) if parts is not None, parts = tmp + 4) Generate DamageNotify for remaining damage areas + +DamageAdd + + drawable: Drawable + region: Region + + Reports damage of the region within the given drawable. This may be + used by direct rendering clients to report damage that the server would + otherwise be unaware of. The damage region is relative to the origin + of the drawable. + + Damage posted in this way will appear in DamageNotify events as normal, + and also in server internal damage tracking (for shadow framebuffer + updates, pixmap damage, and other uses). diff --git a/damageproto/damagewire.h b/damageproto/damagewire.h new file mode 100644 index 0000000..d90a0dd --- /dev/null +++ b/damageproto/damagewire.h @@ -0,0 +1,56 @@ +/* + * Copyright © 2003 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _DAMAGEWIRE_H_ +#define _DAMAGEWIRE_H_ + +#define DAMAGE_NAME "DAMAGE" +#define DAMAGE_MAJOR 1 +#define DAMAGE_MINOR 1 + +/************* Version 1 ****************/ + +/* Constants */ +#define XDamageReportRawRectangles 0 +#define XDamageReportDeltaRectangles 1 +#define XDamageReportBoundingBox 2 +#define XDamageReportNonEmpty 3 + +/* Requests */ +#define X_DamageQueryVersion 0 +#define X_DamageCreate 1 +#define X_DamageDestroy 2 +#define X_DamageSubtract 3 +#define X_DamageAdd 4 + +#define XDamageNumberRequests (X_DamageAdd + 1) + +/* Events */ +#define XDamageNotify 0 + +#define XDamageNumberEvents (XDamageNotify + 1) + +/* Errors */ +#define BadDamage 0 +#define XDamageNumberErrors (BadDamage + 1) + +#endif /* _DAMAGEWIRE_H_ */ diff --git a/dmxproto/.gitignore b/dmxproto/.gitignore new file mode 100644 index 0000000..71417e4 --- /dev/null +++ b/dmxproto/.gitignore @@ -0,0 +1,78 @@ +# +# X.Org module default exclusion patterns +# The next section if for module specific patterns +# +# Do not edit the following section +# GNU Build System (Autotools) +aclocal.m4 +autom4te.cache/ +autoscan.log +ChangeLog +compile +config.guess +config.h +config.h.in +config.log +config-ml.in +config.py +config.status +config.status.lineno +config.sub +configure +configure.scan +depcomp +.deps/ +INSTALL +install-sh +.libs/ +libtool +libtool.m4 +ltmain.sh +lt~obsolete.m4 +ltoptions.m4 +ltsugar.m4 +ltversion.m4 +Makefile +Makefile.in +mdate-sh +missing +mkinstalldirs +*.pc +py-compile +stamp-h? +symlink-tree +texinfo.tex +ylwrap + +# Do not edit the following section +# Edit Compile Debug Document Distribute +*~ +*.[0-9] +*.[0-9]x +*.bak +*.bin +core +*.dll +*.exe +*-ISO*.bdf +*-JIS*.bdf +*-KOI8*.bdf +*.kld +*.ko +*.ko.cmd +*.lai +*.l[oa] +*.[oa] +*.obj +*.patch +*.so +*.pcf.gz +*.pdb +*.tar.bz2 +*.tar.gz +# +# Add & Override patterns for dmxproto +# +# Edit the following section as needed +# For example, !report.pc overrides *.pc. See 'man gitignore' +# diff --git a/dmxproto/COPYING b/dmxproto/COPYING new file mode 100644 index 0000000..7ea03ea --- /dev/null +++ b/dmxproto/COPYING @@ -0,0 +1,24 @@ +Copyright 2002-2004 Red Hat Inc., Durham, North Carolina. + +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 on the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, +and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice (including the +next paragraph) shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS +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. diff --git a/dmxproto/Makefile.am b/dmxproto/Makefile.am new file mode 100644 index 0000000..6883b29 --- /dev/null +++ b/dmxproto/Makefile.am @@ -0,0 +1,20 @@ +dmxdir = $(includedir)/X11/extensions +dmx_HEADERS = \ + dmx.h \ + dmxproto.h + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = dmxproto.pc + + +MAINTAINERCLEANFILES = ChangeLog INSTALL + +.PHONY: ChangeLog INSTALL + +INSTALL: + $(INSTALL_CMD) + +ChangeLog: + $(CHANGELOG_CMD) + +dist-hook: ChangeLog INSTALL diff --git a/dmxproto/README b/dmxproto/README new file mode 100644 index 0000000..3b93b48 --- /dev/null +++ b/dmxproto/README @@ -0,0 +1,31 @@ + Distributed Multihead X (DMX) Extension + +This extension defines a protocol for clients to access a front-end proxy +X server that controls multiple back-end X servers making up a large display. + +Extension name: DMX + +All questions regarding this software should be directed at the +Xorg mailing list: + + http://lists.freedesktop.org/mailman/listinfo/xorg + +Please submit bug reports to the Xorg bugzilla: + + https://bugs.freedesktop.org/enter_bug.cgi?product=xorg + +The master development code repository can be found at: + + git://anongit.freedesktop.org/git/xorg/proto/dmxproto + + http://cgit.freedesktop.org/xorg/proto/dmxproto + +For patch submission instructions, see: + + http://www.x.org/wiki/Development/Documentation/SubmittingPatches + +For more information on the git code manager, see: + + http://wiki.x.org/wiki/GitPage + + diff --git a/dmxproto/autogen.sh b/dmxproto/autogen.sh new file mode 100755 index 0000000..904cd67 --- /dev/null +++ b/dmxproto/autogen.sh @@ -0,0 +1,12 @@ +#! /bin/sh + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +ORIGDIR=`pwd` +cd $srcdir + +autoreconf -v --install || exit 1 +cd $ORIGDIR || exit $? + +$srcdir/configure --enable-maintainer-mode "$@" diff --git a/dmxproto/configure.ac b/dmxproto/configure.ac new file mode 100644 index 0000000..c25791e --- /dev/null +++ b/dmxproto/configure.ac @@ -0,0 +1,13 @@ +AC_PREREQ([2.60]) +AC_INIT([DMXProto], [2.3], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg]) +AM_INIT_AUTOMAKE([foreign dist-bzip2]) +AM_MAINTAINER_MODE + +# Require xorg-macros: XORG_DEFAULT_OPTIONS +m4_ifndef([XORG_MACROS_VERSION], + [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.3) +XORG_DEFAULT_OPTIONS + +AC_OUTPUT([Makefile + dmxproto.pc]) diff --git a/dmxproto/dmx.h b/dmxproto/dmx.h new file mode 100644 index 0000000..8cbd4d3 --- /dev/null +++ b/dmxproto/dmx.h @@ -0,0 +1,68 @@ +/* + * Copyright 2002-2004 Red Hat Inc., Durham, North Carolina. + * + * 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 on the rights to use, copy, modify, merge, + * publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS + * 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. + */ + +/* + * Authors: + * Rickard E. (Rik) Faith <faith@redhat.com> + * + */ + +/** \file + * This file describes the interface to the client-side libdmx.a + * library. All DMX-aware client-side applications should include this + * file. */ + +#ifndef _DMX_H_ +#define _DMX_H_ + +/* These values must be larger than LastExtensionError. + The values in dmxext.h and dmxproto.h *MUST* match. */ +#define DmxBadXinerama 1001 +#define DmxBadValue 1002 +#define DmxBadReply 1003 + +#define DMXScreenWindowWidth (1L<<0) +#define DMXScreenWindowHeight (1L<<1) +#define DMXScreenWindowXoffset (1L<<2) +#define DMXScreenWindowYoffset (1L<<3) +#define DMXRootWindowWidth (1L<<4) +#define DMXRootWindowHeight (1L<<5) +#define DMXRootWindowXoffset (1L<<6) +#define DMXRootWindowYoffset (1L<<7) +#define DMXRootWindowXorigin (1L<<8) +#define DMXRootWindowYorigin (1L<<9) + +#define DMXDesktopWidth (1L<<0) +#define DMXDesktopHeight (1L<<1) +#define DMXDesktopShiftX (1L<<2) +#define DMXDesktopShiftY (1L<<3) + +#define DMXInputType (1L<<0) +#define DMXInputPhysicalScreen (1L<<1) +#define DMXInputSendsCore (1L<<2) + +#endif diff --git a/dmxproto/dmxproto.h b/dmxproto/dmxproto.h new file mode 100644 index 0000000..4bb160e --- /dev/null +++ b/dmxproto/dmxproto.h @@ -0,0 +1,445 @@ +/* + * Copyright 2002-2004 Red Hat Inc., Durham, North Carolina. + * + * 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 on the rights to use, copy, modify, merge, + * publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS + * 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. + */ + +/* + * Authors: + * Rickard E. (Rik) Faith <faith@redhat.com> + * + */ + +/** \file + * This file describes the structures necessary to implement the wire + * protocol for the DMX protocol extension. It should be included only + * in files that implement the client-side (or server-side) part of the + * protocol (i.e., client-side applications should \b not include this + * file). */ + +#ifndef _DMXSTR_H_ +#define _DMXSTR_H_ + +#define DMX_EXTENSION_NAME "DMX" +#define DMX_EXTENSION_MAJOR 2 +#define DMX_EXTENSION_MINOR 2 +#define DMX_EXTENSION_PATCH 20040604 + +/* These values must be larger than LastExtensionError. + The values in dmxext.h and dmxproto.h *MUST* match. */ +#define DMX_BAD_XINERAMA 1001 +#define DMX_BAD_VALUE 1002 + +#define X_DMXQueryVersion 0 +#define X_DMXGetScreenCount 1 +#define X_DMXGetScreenInformationDEPRECATED 2 +#define X_DMXGetWindowAttributes 3 +#define X_DMXGetInputCount 4 +#define X_DMXGetInputAttributes 5 +#define X_DMXForceWindowCreationDEPRECATED 6 +#define X_DMXReconfigureScreenDEPRECATED 7 +#define X_DMXSync 8 +#define X_DMXForceWindowCreation 9 +#define X_DMXGetScreenAttributes 10 +#define X_DMXChangeScreensAttributes 11 +#define X_DMXAddScreen 12 +#define X_DMXRemoveScreen 13 +#define X_DMXGetDesktopAttributes 14 +#define X_DMXChangeDesktopAttributes 15 +#define X_DMXAddInput 16 +#define X_DMXRemoveInput 17 + +/** Wire-level description of DMXQueryVersion protocol request. */ +typedef struct { + CARD8 reqType; /* dmxcode */ + CARD8 dmxReqType; /* X_DMXQueryVersion */ + CARD16 length B16; +} xDMXQueryVersionReq; +#define sz_xDMXQueryVersionReq 4 + +/** Wire-level description of DMXQueryVersion protocol reply. */ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 ununsed; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 majorVersion B32; + CARD32 minorVersion B32; + CARD32 patchVersion B32; + CARD32 pad0 B32; + CARD32 pad1 B32; + CARD32 pad2 B32; +} xDMXQueryVersionReply; +#define sz_xDMXQueryVersionReply 32 + +/** Wire-level description of DMXSync protocol request. */ +typedef struct { + CARD8 reqType; /* DMXCode */ + CARD8 dmxReqType; /* X_DMXSync */ + CARD16 length B16; +} xDMXSyncReq; +#define sz_xDMXSyncReq 4 + +/** Wire-level description of DMXSync protocol reply. */ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 status B32; + CARD32 pad0 B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xDMXSyncReply; +#define sz_xDMXSyncReply 32 + +/** Wire-level description of DMXForceWindowCreation protocol request. */ +typedef struct { + CARD8 reqType; /* DMXCode */ + CARD8 dmxReqType; /* X_DMXForceWindowCreation */ + CARD16 length B16; + CARD32 window B32; +} xDMXForceWindowCreationReq; +#define sz_xDMXForceWindowCreationReq 8 + +/** Wire-level description of DMXForceWindowCreation protocol reply. */ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 status B32; + CARD32 pad0 B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xDMXForceWindowCreationReply; +#define sz_xDMXForceWindowCreationReply 32 + +/** Wire-level description of DMXGetScreenCount protocol request. */ +typedef struct { + CARD8 reqType; /* DMXCode */ + CARD8 dmxReqType; /* X_DMXGetScreenCount */ + CARD16 length B16; +} xDMXGetScreenCountReq; +#define sz_xDMXGetScreenCountReq 4 + +/** Wire-level description of DMXGetScreenCount protocol reply. */ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 screenCount B32; + CARD32 pad0 B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xDMXGetScreenCountReply; +#define sz_xDMXGetScreenCountReply 32 + +/** Wire-level description of DMXGetScreenAttributes protocol request. */ +typedef struct { + CARD8 reqType; /* DMXCode */ + CARD8 dmxReqType; /* X_DMXGetScreenAttributes */ + CARD16 length B16; + CARD32 physicalScreen B32; +} xDMXGetScreenAttributesReq; +#define sz_xDMXGetScreenAttributesReq 8 + +/** Wire-level description of DMXGetScreenAttributes protocol reply. */ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 displayNameLength B32; + CARD32 logicalScreen B32; + + CARD16 screenWindowWidth B16; + CARD16 screenWindowHeight B16; + INT16 screenWindowXoffset B16; + INT16 screenWindowYoffset B16; + + CARD16 rootWindowWidth B16; + CARD16 rootWindowHeight B16; + INT16 rootWindowXoffset B16; + INT16 rootWindowYoffset B16; + INT16 rootWindowXorigin B16; + INT16 rootWindowYorigin B16; +} xDMXGetScreenAttributesReply; +#define sz_xDMXGetScreenAttributesReply 36 + +/** Wire-level description of DMXChangeScreensAttributes protocol request. */ +typedef struct { + CARD8 reqType; /* DMXCode */ + CARD8 dmxReqType; /* X_DMXChangeScreensAttributes */ + CARD16 length B16; + CARD32 screenCount B32; + CARD32 maskCount B32; +} xDMXChangeScreensAttributesReq; +#define sz_xDMXChangeScreensAttributesReq 12 + +/** Wire-level description of DMXChangeScreensAttributes protocol reply. */ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 status B32; + CARD32 errorScreen B32; + CARD32 pad0 B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; +} xDMXChangeScreensAttributesReply; +#define sz_xDMXChangeScreensAttributesReply 32 + +/** Wire-level description of DMXAddScreen protocol request. */ +typedef struct { + CARD8 reqType; /* DMXCode */ + CARD8 dmxReqType; /* X_DMXAddScreen */ + CARD16 length B16; + CARD32 displayNameLength B32; + CARD32 physicalScreen B32; + CARD32 valueMask B32; +} xDMXAddScreenReq; +#define sz_xDMXAddScreenReq 16 + +/** Wire-level description of DMXAddScreen protocol reply. */ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 status B32; + CARD32 physicalScreen B32; + CARD32 pad0 B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; +} xDMXAddScreenReply; +#define sz_xDMXAddScreenReply 32 + +/** Wire-level description of DMXRemoveScreen protocol request. */ +typedef struct { + CARD8 reqType; /* DMXCode */ + CARD8 dmxReqType; /* X_DMXRemoveScreen */ + CARD16 length B16; + CARD32 physicalScreen B32; +} xDMXRemoveScreenReq; +#define sz_xDMXRemoveScreenReq 8 + +/** Wire-level description of DMXRemoveScreen protocol reply. */ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 status B32; + CARD32 pad0 B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xDMXRemoveScreenReply; +#define sz_xDMXRemoveScreenReply 32 + +/** Wire-level description of DMXGetWindowAttributes protocol request. */ +typedef struct { + CARD8 reqType; /* DMXCode */ + CARD8 dmxReqType; /* X_DMXGetWindowAttributes */ + CARD16 length B16; + CARD32 window B32; +} xDMXGetWindowAttributesReq; +#define sz_xDMXGetWindowAttributesReq 8 + +/** Wire-level description of DMXGetWindowAttributes protocol reply. */ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 screenCount B32; + CARD32 pad0 B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xDMXGetWindowAttributesReply; +#define sz_xDMXGetWindowAttributesReply 32 + +/** Wire-level description of DMXGetDesktopAttributes protocol request. */ +typedef struct { + CARD8 reqType; /* DMXCode */ + CARD8 dmxReqType; /* X_DMXGetDesktopAttributes */ + CARD16 length B16; +} xDMXGetDesktopAttributesReq; +#define sz_xDMXGetDesktopAttributesReq 4 + +/** Wire-level description of DMXGetDesktopAttributes protocol reply. */ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; + CARD16 sequenceNumber B16; + CARD32 length B32; + INT16 width; + INT16 height; + INT16 shiftX; + INT16 shiftY; + CARD32 pad0 B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; +} xDMXGetDesktopAttributesReply; +#define sz_xDMXGetDesktopAttributesReply 32 + +/** Wire-level description of DMXChangeDesktopAttributes protocol request. */ +typedef struct { + CARD8 reqType; /* DMXCode */ + CARD8 dmxReqType; /* X_DMXChangeDesktopAttributes */ + CARD16 length B16; + CARD32 valueMask B32; +} xDMXChangeDesktopAttributesReq; +#define sz_xDMXChangeDesktopAttributesReq 8 + +/** Wire-level description of DMXChangeDesktopAttributes protocol reply. */ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 status B32; + CARD32 pad0 B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xDMXChangeDesktopAttributesReply; +#define sz_xDMXChangeDesktopAttributesReply 32 + +/** Wire-level description of DMXGetInputCount protocol request. */ +typedef struct { + CARD8 reqType; /* DMXCode */ + CARD8 dmxReqType; /* X_DMXGetInputCount */ + CARD16 length B16; +} xDMXGetInputCountReq; +#define sz_xDMXGetInputCountReq 4 + +/** Wire-level description of DMXGetInputCount protocol reply. */ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 inputCount B32; + CARD32 pad0 B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xDMXGetInputCountReply; +#define sz_xDMXGetInputCountReply 32 + +/** Wire-level description of DMXGetInputAttributes protocol request. */ +typedef struct { + CARD8 reqType; /* DMXCode */ + CARD8 dmxReqType; /* X_DMXGetInputAttributes */ + CARD16 length B16; + CARD32 deviceId B32; +} xDMXGetInputAttributesReq; +#define sz_xDMXGetInputAttributesReq 8 + +/** Wire-level description of DMXGetInputAttributes protocol reply. */ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 inputType B32; + CARD32 physicalScreen B32; + CARD32 physicalId B32; + CARD32 nameLength B32; + BOOL isCore; + BOOL sendsCore; + BOOL detached; + CARD8 pad0; + CARD32 pad1 B32; +} xDMXGetInputAttributesReply; +#define sz_xDMXGetInputAttributesReply 32 + +/** Wire-level description of DMXAddInput protocol request. */ +typedef struct { + CARD8 reqType; /* DMXCode */ + CARD8 dmxReqType; /* X_DMXAddInput */ + CARD16 length B16; + CARD32 displayNameLength B32; + CARD32 valueMask; +} xDMXAddInputReq; +#define sz_xDMXAddInputReq 12 + +/** Wire-level description of DMXAddInput protocol reply. */ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 status B32; + CARD32 physicalId B32; + CARD32 pad0 B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; +} xDMXAddInputReply; +#define sz_xDMXAddInputReply 32 + +/** Wire-level description of DMXRemoveInput protocol request. */ +typedef struct { + CARD8 reqType; /* DMXCode */ + CARD8 dmxReqType; /* X_DMXRemoveInput */ + CARD16 length B16; + CARD32 physicalId B32; +} xDMXRemoveInputReq; +#define sz_xDMXRemoveInputReq 8 + +/** Wire-level description of DMXRemoveInput protocol reply. */ +typedef struct { + BYTE type; + CARD8 unused; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 status B32; + CARD32 pad0 B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xDMXRemoveInputReply; +#define sz_xDMXRemoveInputReply 32 + +#endif diff --git a/dmxproto/dmxproto.pc.in b/dmxproto/dmxproto.pc.in new file mode 100644 index 0000000..97cd1b8 --- /dev/null +++ b/dmxproto/dmxproto.pc.in @@ -0,0 +1,9 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: DMXProto +Description: DMX extension headers +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} diff --git a/dri2proto/.gitignore b/dri2proto/.gitignore new file mode 100644 index 0000000..507f5dd --- /dev/null +++ b/dri2proto/.gitignore @@ -0,0 +1,78 @@ +# +# X.Org module default exclusion patterns +# The next section if for module specific patterns +# +# Do not edit the following section +# GNU Build System (Autotools) +aclocal.m4 +autom4te.cache/ +autoscan.log +ChangeLog +compile +config.guess +config.h +config.h.in +config.log +config-ml.in +config.py +config.status +config.status.lineno +config.sub +configure +configure.scan +depcomp +.deps/ +INSTALL +install-sh +.libs/ +libtool +libtool.m4 +ltmain.sh +lt~obsolete.m4 +ltoptions.m4 +ltsugar.m4 +ltversion.m4 +Makefile +Makefile.in +mdate-sh +missing +mkinstalldirs +*.pc +py-compile +stamp-h? +symlink-tree +texinfo.tex +ylwrap + +# Do not edit the following section +# Edit Compile Debug Document Distribute +*~ +*.[0-9] +*.[0-9]x +*.bak +*.bin +core +*.dll +*.exe +*-ISO*.bdf +*-JIS*.bdf +*-KOI8*.bdf +*.kld +*.ko +*.ko.cmd +*.lai +*.l[oa] +*.[oa] +*.obj +*.patch +*.so +*.pcf.gz +*.pdb +*.tar.bz2 +*.tar.gz +# +# Add & Override patterns for dri2proto +# +# Edit the following section as needed +# For example, !report.pc overrides *.pc. See 'man gitignore' +# diff --git a/dri2proto/COPYING b/dri2proto/COPYING new file mode 100644 index 0000000..a99b75a --- /dev/null +++ b/dri2proto/COPYING @@ -0,0 +1,29 @@ +Copyright © 2007 Red Hat, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Soft- +ware"), 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 Soft- +ware 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 MERCHANTABIL- +ITY, 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 CONSE- +QUENTIAL 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 PERFOR- +MANCE 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. + +Authors: + Kristian Høgsberg (krh@redhat.com) diff --git a/dri2proto/Makefile.am b/dri2proto/Makefile.am new file mode 100644 index 0000000..5990273 --- /dev/null +++ b/dri2proto/Makefile.am @@ -0,0 +1,20 @@ +dri2dir = $(includedir)/X11/extensions +dri2_HEADERS = dri2proto.h dri2tokens.h + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = dri2proto.pc + +dist_doc_DATA = dri2proto.txt + + +MAINTAINERCLEANFILES = ChangeLog INSTALL + +.PHONY: ChangeLog INSTALL + +INSTALL: + $(INSTALL_CMD) + +ChangeLog: + $(CHANGELOG_CMD) + +dist-hook: ChangeLog INSTALL diff --git a/dri2proto/README b/dri2proto/README new file mode 100644 index 0000000..1115e51 --- /dev/null +++ b/dri2proto/README @@ -0,0 +1,30 @@ + Direct Rendering Infrastructure 2 Extension + +This extension defines a protocol to securely allow user applications to access +the video hardware without requiring data to be passed through the X server. + +Extension name: DRI2 + +All questions regarding this software should be directed at the +Xorg mailing list: + + http://lists.freedesktop.org/mailman/listinfo/xorg + +Please submit bug reports to the Xorg bugzilla: + + https://bugs.freedesktop.org/enter_bug.cgi?product=xorg + +The master development code repository can be found at: + + git://anongit.freedesktop.org/git/xorg/proto/dri2proto + + http://cgit.freedesktop.org/xorg/proto/dri2proto + +For patch submission instructions, see: + + http://www.x.org/wiki/Development/Documentation/SubmittingPatches + +For more information on the git code manager, see: + + http://wiki.x.org/wiki/GitPage + diff --git a/dri2proto/autogen.sh b/dri2proto/autogen.sh new file mode 100755 index 0000000..904cd67 --- /dev/null +++ b/dri2proto/autogen.sh @@ -0,0 +1,12 @@ +#! /bin/sh + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +ORIGDIR=`pwd` +cd $srcdir + +autoreconf -v --install || exit 1 +cd $ORIGDIR || exit $? + +$srcdir/configure --enable-maintainer-mode "$@" diff --git a/dri2proto/configure.ac b/dri2proto/configure.ac new file mode 100644 index 0000000..5b78d6b --- /dev/null +++ b/dri2proto/configure.ac @@ -0,0 +1,13 @@ +AC_PREREQ([2.60]) +AC_INIT([DRI2Proto], [2.3], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg]) +AM_INIT_AUTOMAKE([foreign dist-bzip2]) +AM_MAINTAINER_MODE + +# Require xorg-macros: XORG_DEFAULT_OPTIONS +m4_ifndef([XORG_MACROS_VERSION], + [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.3) +XORG_DEFAULT_OPTIONS + +AC_OUTPUT([Makefile + dri2proto.pc]) diff --git a/dri2proto/dri2proto.h b/dri2proto/dri2proto.h new file mode 100644 index 0000000..9708a4a --- /dev/null +++ b/dri2proto/dri2proto.h @@ -0,0 +1,317 @@ +/* + * Copyright © 2008 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Soft- + * ware"), 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 Soft- + * ware 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 MERCHANTABIL- + * ITY, 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 CONSE- + * QUENTIAL 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 PERFOR- + * MANCE 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. + * + * Authors: + * Kristian Høgsberg (krh@redhat.com) + */ + +#ifndef _DRI2_PROTO_H_ +#define _DRI2_PROTO_H_ + +#define DRI2_NAME "DRI2" +#define DRI2_MAJOR 1 +#define DRI2_MINOR 3 + +#define DRI2NumberErrors 0 +#define DRI2NumberEvents 2 +#define DRI2NumberRequests 13 + +#define X_DRI2QueryVersion 0 +#define X_DRI2Connect 1 +#define X_DRI2Authenticate 2 +#define X_DRI2CreateDrawable 3 +#define X_DRI2DestroyDrawable 4 +#define X_DRI2GetBuffers 5 +#define X_DRI2CopyRegion 6 +#define X_DRI2GetBuffersWithFormat 7 +#define X_DRI2SwapBuffers 8 +#define X_DRI2GetMSC 9 +#define X_DRI2WaitMSC 10 +#define X_DRI2WaitSBC 11 +#define X_DRI2SwapInterval 12 + +/* + * Events + */ +#define DRI2_BufferSwapComplete 0 +#define DRI2_InvalidateBuffers 1 + +typedef struct { + CARD32 attachment B32; + CARD32 name B32; + CARD32 pitch B32; + CARD32 cpp B32; + CARD32 flags B32; +} xDRI2Buffer; + +typedef struct { + CARD8 reqType; + CARD8 dri2ReqType; + CARD16 length B16; + CARD32 majorVersion B32; + CARD32 minorVersion B32; +} xDRI2QueryVersionReq; +#define sz_xDRI2QueryVersionReq 12 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 majorVersion B32; + CARD32 minorVersion B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xDRI2QueryVersionReply; +#define sz_xDRI2QueryVersionReply 32 + +typedef struct { + CARD8 reqType; + CARD8 dri2ReqType; + CARD16 length B16; + CARD32 window B32; + CARD32 driverType B32; +} xDRI2ConnectReq; +#define sz_xDRI2ConnectReq 12 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 driverNameLength B32; + CARD32 deviceNameLength B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xDRI2ConnectReply; +#define sz_xDRI2ConnectReply 32 + +typedef struct { + CARD8 reqType; + CARD8 dri2ReqType; + CARD16 length B16; + CARD32 window B32; + CARD32 magic B32; +} xDRI2AuthenticateReq; +#define sz_xDRI2AuthenticateReq 12 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 authenticated B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xDRI2AuthenticateReply; +#define sz_xDRI2AuthenticateReply 32 + +typedef struct { + CARD8 reqType; + CARD8 dri2ReqType; + CARD16 length B16; + CARD32 drawable B32; +} xDRI2CreateDrawableReq; +#define sz_xDRI2CreateDrawableReq 8 + +typedef struct { + CARD8 reqType; + CARD8 dri2ReqType; + CARD16 length B16; + CARD32 drawable B32; +} xDRI2DestroyDrawableReq; +#define sz_xDRI2DestroyDrawableReq 8 + +typedef struct { + CARD8 reqType; + CARD8 dri2ReqType; + CARD16 length B16; + CARD32 drawable B32; + CARD32 count B32; +} xDRI2GetBuffersReq; +#define sz_xDRI2GetBuffersReq 12 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 width B32; + CARD32 height B32; + CARD32 count B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xDRI2GetBuffersReply; +#define sz_xDRI2GetBuffersReply 32 + +typedef struct { + CARD8 reqType; + CARD8 dri2ReqType; + CARD16 length B16; + CARD32 drawable B32; + CARD32 region B32; + CARD32 dest B32; + CARD32 src B32; +} xDRI2CopyRegionReq; +#define sz_xDRI2CopyRegionReq 20 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE 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; +} xDRI2CopyRegionReply; +#define sz_xDRI2CopyRegionReply 32 + +typedef struct { + CARD8 reqType; + CARD8 dri2ReqType; + CARD16 length B16; + CARD32 drawable B32; + CARD32 target_msc_hi B32; + CARD32 target_msc_lo B32; + CARD32 divisor_hi B32; + CARD32 divisor_lo B32; + CARD32 remainder_hi B32; + CARD32 remainder_lo B32; +} xDRI2SwapBuffersReq; +#define sz_xDRI2SwapBuffersReq 32 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 swap_hi B32; + CARD32 swap_lo B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xDRI2SwapBuffersReply; +#define sz_xDRI2SwapBuffersReply 32 + +typedef struct { + CARD8 reqType; + CARD8 dri2ReqType; + CARD16 length B16; + CARD32 drawable B32; +} xDRI2GetMSCReq; +#define sz_xDRI2GetMSCReq 8 + +typedef struct { + CARD8 reqType; + CARD8 dri2ReqType; + CARD16 length B16; + CARD32 drawable B32; + CARD32 target_msc_hi B32; + CARD32 target_msc_lo B32; + CARD32 divisor_hi B32; + CARD32 divisor_lo B32; + CARD32 remainder_hi B32; + CARD32 remainder_lo B32; +} xDRI2WaitMSCReq; +#define sz_xDRI2WaitMSCReq 32 + +typedef struct { + CARD8 reqType; + CARD8 dri2ReqType; + CARD16 length B16; + CARD32 drawable B32; + CARD32 target_sbc_hi B32; + CARD32 target_sbc_lo B32; +} xDRI2WaitSBCReq; +#define sz_xDRI2WaitSBCReq 16 + +typedef struct { + CARD8 type; + CARD8 pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 ust_hi B32; + CARD32 ust_lo B32; + CARD32 msc_hi B32; + CARD32 msc_lo B32; + CARD32 sbc_hi B32; + CARD32 sbc_lo B32; +} xDRI2MSCReply; +#define sz_xDRI2MSCReply 32 + +typedef struct { + CARD8 reqType; + CARD8 dri2ReqType; + CARD16 length B16; + CARD32 drawable B32; + CARD32 interval B32; +} xDRI2SwapIntervalReq; +#define sz_xDRI2SwapIntervalReq 12 + +typedef struct { + CARD8 type; + CARD8 pad; + CARD16 sequenceNumber B16; + CARD16 event_type B16; + CARD32 drawable B32; + CARD32 ust_hi B32; + CARD32 ust_lo B32; + CARD32 msc_hi B32; + CARD32 msc_lo B32; + CARD32 sbc_hi B32; + CARD32 sbc_lo B32; +} xDRI2BufferSwapComplete; +#define sz_xDRI2BufferSwapComplete 32 + +typedef struct { + CARD8 type; + CARD8 pad; + CARD16 sequenceNumber B16; + CARD32 drawable B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xDRI2InvalidateBuffers; +#define sz_xDRI2InvalidateBuffers 32 + +#endif diff --git a/dri2proto/dri2proto.pc.in b/dri2proto/dri2proto.pc.in new file mode 100644 index 0000000..647416e --- /dev/null +++ b/dri2proto/dri2proto.pc.in @@ -0,0 +1,9 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: DRI2Proto +Description: DRI2 extension headers +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} diff --git a/dri2proto/dri2proto.txt b/dri2proto/dri2proto.txt new file mode 100644 index 0000000..f74792e --- /dev/null +++ b/dri2proto/dri2proto.txt @@ -0,0 +1,873 @@ + The DRI2 Extension + Version 2.0 + 2008-09-04 + + Kristian Høgsberg + krh@redhat.com + Red Hat, Inc + + +1. Introduction + +The DRI2 extension is designed to associate and access auxillary +rendering buffers with an X drawable. + +DRI2 is a essentially a helper extension to support implementation of +direct rendering drivers/libraries/technologies. + +The main consumer of this extension will be a direct rendering OpenGL +driver, but the DRI2 extension is not designed to be OpenGL specific. +Direct rendering implementations of OpenVG, Xv, cairo and other +graphics APIs should find the functionality exposed by this extension +helpful and hopefully sufficient. + +Relation to XF86DRI + + +1.1. Acknowledgements + +Kevin E. Martin <kem@redhat.com> +Keith Packard <keithp@keithp.com> +Eric Anholt <eric@anholt.net> +Keith Whitwell <keith@tungstengraphics.com> +Jerome Glisse <glisse@freedesktop.org> +Ian Romanick <ian.d.romanick@intel.com> +Michel Dänzer <michel@tungstengraphics.com> +Jesse Barnes <jbarnes@virtuousgeek.org> + + + ⚙ ⚙ ⚙ ⚙ ⚙ ⚙ + + +2. DRI2 Concepts + + +2.1. Attachment points + +Stolen from OpenGL FBOs, I guess. + + +2.2. Kernel rendering manager + +This specification assumes a rendering architechture, where an +underlying kernel rendering manager that can provide 32 bit integer +handles to video memory buffers. These handles can be passed between +processes, which, through a direct rendering driver, submit rendering +to the kernel rendering manager, targeting and/or sourcing from these +buffers. This extension provides a means to communicate about such +buffers as associated with an X drawable. + +The details of how the a direct rendering driver use the buffer names +and submit the rendering requests is outside the scope of this +specification. However, Appendix B does discuss implementation of +this specification on the Graphics Execution Manager (GEM). + + +2.3. Request ordering + +No ordering between swap buffers and X rendering. X rendering to src +buffers will block if they have a vblank pending. + + +2.4 Authentication model + +The purpose of the DRM authentication scheme is to grant access to the +kernel rendering manager buffers created by the X server if, and only +if, the client has access to the X server. This is achieved in a +three-step protocol: + + 1) The client gets a token from the kernel rendering manager + that uniquely identifies it. The token is a 32 bit integer. + + 2) The client passes the token to the X server in the + DRI2Authenticate request. This request is a round trip to + make sure the X server has received and processed the + authentication before the client starts accessing the DRM. + + 3) The X server authorizes the client by passing the token to + the kernel rendering manager. + +A kernel rendering manager can choose not to implement any +authentication and just allow access to all buffers. + + +2.5 Rendering to the X front buffer + +OpenGL allows the client to render to the front buffer, either by +using a single-buffered configuration or but explicitly setting the +draw buffer to GL_FRONT_LEFT. Not allowed! + +The client must ask for a fake front buffer, render to that and then +use DRI2CopyRegion to copy contents back and forth between the fake +front buffer and the real front buffer. When X and direct rendering +to a front buffer is interleaved, it is the responsibility of the +application to synchronize access using glXWaitGL and glXWaitX. A +DRI2 implementation of direct rendering GLX, should use these enty +points to copy contents back and forth to as necessary to ensure +consistent rendering. + +The client may also use the DRI2SwapBuffers function to request a swap +of the front and back buffers. If the display server supports it, this +operation may be preferred, since it may be easier and/or more performant +for the server to perform a simple buffer swap rather than a blit. + +2.6 Synchronizing rendering + +DRI2 provides several methods for synchronizing drawing with various events. +The protocol for these methods is based on the SGI_video_sync and +OML_sync_control GLX extensions. Using the DRI2WaitMSC request, a client +can wait for a specific frame count or divisor/remainder before continuing +its processing. With the DRI2WaitSBC request, clients can block until a given +swap count is reached (as incremented by DRI2SwapBuffers). Finally, using +DRI2SwapBuffers, clients can limit their frame rate by specifying a swap +interval using the swap interval call (currently only available through GLX) +or by using the OML swap buffers routine. + +2.7 Events + +DRI2 provides an event to indicate when a DRI2SwapBuffers request has +been completed. This can be used to throttle drawing on the client +side and tie into application main loops. + +Another event is generated when the validity of the requested buffers +changes. + + ⚙ ⚙ ⚙ ⚙ ⚙ ⚙ + + +3. Data Types + +The server side region support specified in the Xfixes extension +version 2 is used in the CopyRegion request. + + + ⚙ ⚙ ⚙ ⚙ ⚙ ⚙ + + +4. Errors + +No errors are defined by the DRI2 extension. + + + ⚙ ⚙ ⚙ ⚙ ⚙ ⚙ + +5. Events + +The only events provided by DRI2 are DRI2_BufferSwapComplete +and DRI2InvalidateBuffers. + + + ⚙ ⚙ ⚙ ⚙ ⚙ ⚙ + + +6. Protocol Types + +DRI2DRIVER { DRI2DriverDRI + DRI2DriverVDPAU } + + These values describe the type of driver the client will want + to load. The server sends back the name of the driver to use + for the screen in question. + +DRI2ATTACHMENT { DRI2BufferFrontLeft + DRI2BufferBackLeft + DRI2BufferFrontRight + DRI2BufferBackRight + DRI2BufferDepth + DRI2BufferStencil + DRI2BufferAccum + DRI2BufferFakeFrontLeft + DRI2BufferFakeFrontRight + DRI2BufferDepthStencil } + + These values describe various attachment points for DRI2 + buffers. + +DRI2BUFFER { attachment: CARD32 + name: CARD32 + pitch: CARD32 + cpp: CARD32 + flags: CARD32 } + + The DRI2BUFFER describes an auxillary rendering buffer + associated with an X drawable. 'attachment' describes the + attachment point for the buffer, 'name' is the name of the + underlying kernel buffer, + + +DRI2ATTACH_FORMAT { attachment: CARD32 + format: CARD32 } + + The DRI2ATTACH_FORMAT describes an attachment and the associated + format. 'attachment' describes the attachment point for the buffer, + 'format' describes an opaque, device-dependent format for the buffer. + + ⚙ ⚙ ⚙ ⚙ ⚙ ⚙ + + +7. Extension Initialization + +The name of this extension is "DRI2". + +┌─── + DRI2QueryVersion + client-major-version: CARD32 + client-minor-version: CARD32 + ▶ + major-version: CARD32 + minor-version: CARD32 +└─── + + The client sends the highest supported version to the server + and the server sends the highest version it supports, but no + higher than the requested version. Major versions changes can + introduce incompatibilities in existing functionality, minor + version changes introduce only backward compatible changes. + It is the clients responsibility to ensure that the server + supports a version which is compatible with its expectations. + + Backwards compatible changes included addition of new + requests, but also new value types in the DRI2CopyRegion + request. When new values are introduced, the minor version + will be increased so the client can know which values the X + server understands from the version number. + + + ⚙ ⚙ ⚙ ⚙ ⚙ ⚙ + + +8. Extension Requests + +┌─── + DRI2Connect + window: WINDOW + driverType: DRI2DRIVER + ▶ + driver: STRING + device: STRING +└─── + + Returns the driver name and device file to use for the + specified driver type for the screen associated with 'window'. + + 'type' identifies the type of driver to query for. + + 'driver' is the name of the driver to load. The client is + assumed to know where to look for the drivers and what to do + with it. + + 'device' is the filename of the DRM device file. + + If the client is not local, or the request driver type is + unknown or not available, 'driver' and 'device' will be empty + strings. We are not using an regular X + error here to indicate failure, which will allow the client + fall back to other options more easily. + + ISSUE: We could add the list of supported attachments and the + supported DRI2CopyRegion values here (just the bitmask of all + supported values). + +┌─── + DRI2Authenticate + window: WINDOW + token: CARD32 + ▶ + authenticated: CARD32 +└─── + Errors: Window + + Request that the X server authenticates 'token', allowing the + client to access the DRM buffers created by the X server on + the screen associated with 'window'. + + Authentication shouldn't fail at this point, except if an + invalid token is passed, in which case authenticated is False. + +┌─── + DRI2GetBuffers + drawable: DRAWABLE + attachments: LISTofDRI2ATTACHMENTS + ▶ + width, height: CARD32 + buffers: LISTofDRI2BUFFER +└─── + Errors: Window + + Get buffers for the provided attachment points for the given + drawable. + + If the DDX driver does not support one or more of the + specified attachment points, a Value error is generated, with + the first unsupported attachment point as the error value. + + 'width' and 'height' describes the dimensions of the drawable. + + 'buffers' is a list of DRI2BUFFER for the given DRI2 + attachment points. + +┌─── + DRI2CopyRegion + drawable: DRAWABLE + region: REGION + source: DRI2ATTACHMENT + destination: DRI2ATTACHMENT + ▶ +└─── + Errors: Window, Value + + Schedule a copy from one DRI2 buffer to another. + + The DRICopyRegion request has a reply but it is empty. The + reply is there to let the direct rendering client wait until + the server has seen the request before proceeding with + rendering the next frame. + +┌─── + DRI2SwapBuffers + drawable: DRAWABLE + ▶ + count: two CARD32s +└─── + Errors: Window + + Schedule a swap of the front and back buffers with the display + server. + + Returns the swap count value when the swap will actually occur (e.g. + the last queued swap count + (pending swap count * swap interval)). + + This request is only available with protocol version 1.2 or + later. + +┌─── + DRI2GetBuffersWithFormat + drawable: DRAWABLE + attachments: LISTofDRI2ATTACH_FORMAT + ▶ + width, height: CARD32 + buffers: LISTofDRI2BUFFER +└─── + Errors: Window + + Get buffers for the provided attachment points with the specified + formats for the given drawable. + + If the DDX driver does not support one or more of the + specified attachment points or formats, a Value error is generated, + with the first unsupported attachment point as the error value. + + 'width' and 'height' describes the dimensions of the drawable. + + 'buffers' is a list of DRI2BUFFER for the given DRI2 + attachment points. + + This request is only available with protocol version 1.1 or + later. + +┌─── + DRI2GetMSC + drawable: DRAWABLE + ▶ + ust, msc, sbc: CARD64 +└─── + Errors: Window + + Get the current media stamp counter (MSC) and swap buffer count (SBC) + along with the unadjusted system time (UST) when the MSC was last + incremented. + + This request is only available with protocol version 1.2 or + later. + +┌─── + DRI2WaitMSC + drawable: DRAWABLE + target_msc: two CARD32s + divisor: two CARD32s + remainder: two CARD32s + ▶ + ust, msc, sbc: CARD64 +└─── + Errors: Window + + Blocks the client until either the frame count reaches target_msc or, + if the frame count is already greater than target_msc when the request + is received, until the frame count % divisor = remainder. If divisor + is 0, the client will be unblocked if the frame count is greater than + or equal to the target_msc. + + Returns the current media stamp counter (MSC) and swap buffer count + (SBC) along with the unadjusted system time (UST) when the MSC was last + incremented. + + This request is only available with protocol version 1.2 or + later. + +┌─── + DRI2WaitSBC + drawable: DRAWABLE + target_sbc: two CARD32s + ▶ + ust, msc, sbc: CARD64 +└─── + Errors: Window + + Blocks the client until the swap buffer count reaches target_sbc. If + the swap buffer count is already greater than or equal to target_sbc + when the request is recieved, this request will return immediately. + + If target_sbc is 0, this request will block the client until all + previous DRI2SwapBuffers requests have completed. + + Returns the current media stamp counter (MSC) and swap buffer count + (SBC) along with the unadjusted system time (UST) when the MSC was last + incremented. + + This request is only available with protocol version 1.2 or + later. + +┌─── + DRI2SwapInterval + drawable: DRAWABLE + interval: CARD32 + ▶ +└─── + Errors: Window + + Sets the swap interval for DRAWABLE. This will throttle + DRI2SwapBuffers requests to swap at most once per interval frames, + which is useful useful for limiting the frame rate. + + ⚙ ⚙ ⚙ ⚙ ⚙ ⚙ + +9. Extension Events + +┌─── + DRI2BufferSwapComplete + ▶ + event_type: CARD16 + drawable: CARD32 + ust: CARD64 + msc: CARD64 + sbc: CARD64 +└─── + + This event reports the status of the last DRI2SwapBuffers event to + the client. The event type should be one of DRI2_EXCHANGE_COMPLETE, + indicating a successful buffer exchange, DRI2_BLIT_COMPLETE, indicating + the swap was performed with a blit, and DRI2_FLIP_COMPLETE, indicating + a full page flip was completed. + +┌─── + DRI2InvalidateBuffers + ▶ + drawable: CARD32 +└─── + + This event is generated when the buffers the client had + requested for 'drawable' (with DRI2GetBuffers or + DRI2GetBuffersWithFormat) become inappropriate because they + don't match the drawable dimensions anymore, or a buffer swap + has been performed. + + Note that the server is only required to warn the client once + about this condition, until the client takes care of bringing + them back up-to-date with another GetBuffers request. + + ⚙ ⚙ ⚙ ⚙ ⚙ ⚙ + +10. Extension Versioning + +The DRI2 extension has undergone a number of revisions before + + 1.0: Released, but never used. Relied on a number of + constructs from the XF86DRI extension, such as a + shared memory area (SAREA) to communicate changes in + cliprects and window sizes, and + + 1.99.1: Move the swap buffer functionality into the X server, + introduce SwapBuffer request to copy back buffer + contents to the X drawable. + + 1.99.2: Rethink the SwapBuffer request as an asynchronous + request to copy a region between DRI2 buffers. Drop + CreateDrawable and DestroyDrawable, update Connect to + support different driver types and to send the + authentication group. + + 1.99.3: Drop the bitmask argument intended to indicate + presence of optional arguments for CopyRegion. + + 2.0: Awesomeness! + + 2.1: True excellence. Added DRI2GetBuffersWithFormat to allow + more flexible object creation. + + 2.2: Approaching perfection. Added requests for swapbuffers, + MSC and SBC related requests, and events. + + 2.3: Added the DRI2InvalidateBuffers event. + +Compatibility up to 2.0 is not preserved, but was also never released. + + + ⚙ ⚙ ⚙ ⚙ ⚙ ⚙ + + +11. Relationship with other extensions + +As an extension designed to support other extensions, there is +naturally some interactions with other extensions. + + +11.1 GLX + +The GL auxilary buffers map directly to the DRI2 buffers... eh + + +11.2 DBE + +The DBE back buffer must correspond to the DRI2_BUFFER_FRONT_LEFT +DRI2 buffer for servers that support both DBE and DRI2. + + +11.3 XvMC / Xv + +We might add a DRI2_BUFFER_YUV to do vsynced colorspace conversion +blits. Maybe... not really sure. + + + ⚙ ⚙ ⚙ ⚙ ⚙ ⚙ + + +Appendix A. Protocol Encoding + +Syntactic Conventions + +This document uses the same syntactic conventions as the core X +protocol encoding document. + + +A.1 Common Types + +┌─── + DRI2DRIVER + 0x0 DRI2DriverDRI + 0x1 DRI2DriverVDPAU +└─── + +┌─── + DRI2ATTACHMENT + 0x0 DRI2BufferFrontLeft + 0x1 DRI2BufferBackLeft + 0x2 DRI2BufferFrontRight + 0x3 DRI2BufferBackRight + 0x4 DRI2BufferDepth + 0x5 DRI2BufferStencil + 0x6 DRI2BufferAccum + 0x7 DRI2BufferFakeFrontLeft + 0x8 DRI2BufferFakeFrontRight + 0x9 DRI2BufferDepthStencil +└─── + Used to encode the possible attachment points. The attachment + DRI2BufferDepthStencil is only available with protocol version 1.1 or + later. + +┌─── + DRI2BUFFER + 4 CARD32 attachment + 4 CARD32 name + 4 CARD32 pitch + 4 CARD32 cpp + 4 CARD32 flags +└─── + A DRI2 buffer specifies the attachment, the kernel memory + manager name, the pitch and chars per pixel for a buffer + attached to a given drawable. + +┌─── + DRI2ATTACH_FORMAT + 4 CARD32 attachment + 4 CARD32 format +└─── + Used to describe the attachment and format requested from the server. + This data type is only available with protocol version 1.1 or + later. + +A.2 Protocol Requests + +┌─── + DRI2QueryVersion + 1 CARD8 major opcode + 1 0 DRI2 opcode + 2 3 length + 4 CARD32 major version + 4 CARD32 minor version + ▶ + 1 1 Reply + 1 unused + 2 CARD16 sequence number + 4 0 reply length + 4 CARD32 major version + 4 CARD32 minor version + 16 unused +└─── + +┌─── + DRI2Connect + 1 CARD8 major opcode + 1 1 DRI2 opcode + 2 3+(n+p)/4 length + 4 WINDOW window + 4 CARD32 driver type + ▶ + 1 1 Reply + 1 unused + 2 CARD16 sequence number + 4 (n+m+p)/4 reply length + 4 n driver name length + 4 m device name length + 16 unused + n CARD8 driver name + m CARD8 device name + p unused, p=pad(n+m) +└─── + +┌─── + DRI2Authenticate + 1 CARD8 major opcode + 1 2 DRI2 opcode + 2 3 length + 4 WINDOW window + 4 CARD32 authentication token + ▶ + 1 1 Reply + 1 unused + 2 CARD16 sequence number + 4 0 reply length + 4 CARD32 authenticated + 20 unused +└─── + +┌─── + DRI2GetBuffers + 1 CARD8 major opcode + 1 3 DRI2 opcode + 2 3 length + 4 DRAWABLE drawable + 4 n number of attachments + 4n LISTofDRI2ATTACHMENTS attachments + ▶ + 1 1 Reply + 1 unused + 2 CARD16 sequence number + 4 0 reply length + 4 CARD32 width of drawable + 4 CARD32 height of drawable + 4 CARD32 buffer count + 12 unused + 5n LISTofDRI2BUFFER buffers +└─── + +┌─── + DRI2CopyRegion + 1 CARD8 major opcode + 1 4 DRI2 opcode + 2 3 length + 4 DRAWABLE drawable + 4 REGION region + 4 DRI2ATTACHMENT source + 4 DRI2ATTACHMENT destination + ▶ + 1 1 Reply + 1 unused + 2 CARD16 sequence number + 4 0 reply length + 24 unused +└─── + +┌─── + DRI2GetBuffersWithFormat + 1 CARD8 major opcode + 1 3 DRI2 opcode + 2 3 length + 4 DRAWABLE drawable + 4 n number of attachments + 8n LISTofDRI2ATTACH_FORMAT attachments and formats + ▶ + 1 1 Reply + 1 unused + 2 CARD16 sequence number + 4 0 reply length + 4 CARD32 width of drawable + 4 CARD32 height of drawable + 4 CARD32 buffer count + 12 unused + 5n LISTofDRI2BUFFER buffers +└─── + +┌─── + DRI2SwapBuffers + 1 CARD8 major opcode + 1 7 DRI2 opcode + 2 8 length + 4 DRAWABLE drawable + ▶ + 1 1 Reply + 1 unused + 2 CARD16 sequence number + 4 0 reply length + 4 CARD32 buffer count + 4 CARD32 unused + 4 CARD32 unused + 4 CARD32 unused + 4 CARD32 unused + 4 CARD32 unused + 4 CARD32 unused + 5n LISTofDRI2BUFFER buffers +└─── + +┌─── + DRI2SwapBuffers + 1 CARD8 major opcode + 1 7 DRI2 opcode + 2 8 length + 4 DRAWABLE drawable + 4 CARD32 target_msc_hi + 4 CARD32 target_msc_lo + 4 CARD32 divisor_hi + 4 CARD32 divisor_lo + 4 CARD32 remainder_hi + 4 CARD32 remainder_lo + ▶ + 1 1 Reply + 1 unused + 2 CARD16 sequence number + 4 0 reply length + 4 CARD32 swap_hi + 4 CARD32 swap_lo + 5n LISTofDRI2BUFFER buffers +└─── + +┌─── + DRI2GetMSC + 1 CARD8 major opcode + 1 7 DRI2 opcode + 2 8 length + 4 DRAWABLE drawable + ▶ + 1 1 Reply + 1 unused + 2 CARD16 sequence number + 4 0 reply length + 4 CARD32 ust_hi + 4 CARD32 ust_lo + 4 CARD32 msc_hi + 4 CARD32 msc_lo + 4 CARD32 sbc_hi + 4 CARD32 sbc_lo +└─── + +┌─── + DRI2WaitMSC + 1 CARD8 major opcode + 1 7 DRI2 opcode + 2 8 length + 4 DRAWABLE drawable + 4 CARD32 target_msc_hi + 4 CARD32 target_msc_lo + 4 CARD32 divisor_hi + 4 CARD32 divisor_lo + 4 CARD32 remainder_hi + 4 CARD32 remainder_lo + ▶ + 1 1 Reply + 1 unused + 2 CARD16 sequence number + 4 0 reply length + 4 CARD32 ust_hi + 4 CARD32 ust_lo + 4 CARD32 msc_hi + 4 CARD32 msc_lo + 4 CARD32 sbc_hi + 4 CARD32 sbc_lo +└─── + +┌─── + DRI2WaitSBC + 1 CARD8 major opcode + 1 7 DRI2 opcode + 2 8 length + 4 DRAWABLE drawable + 4 CARD32 swap_hi + 4 CARD32 swap_lo + ▶ + 1 1 Reply + 1 unused + 2 CARD16 sequence number + 4 0 reply length + 4 CARD32 ust_hi + 4 CARD32 ust_lo + 4 CARD32 msc_hi + 4 CARD32 msc_lo + 4 CARD32 sbc_hi + 4 CARD32 sbc_lo +└─── + +┌─── + DRI2SwapInterval + 1 CARD8 major opcode + 1 7 DRI2 opcode + 2 8 length + 4 DRAWABLE drawable + 4 CARD32 interval + ▶ +└─── + +A.3 Protocol Events + +The DRI2 extension specifies DRI2_BufferSwapComplete and +DRI2_InvalidateBuffers events. + +┌─── + DRI2_BufferSwapComplete + 1 CARD8 type + 1 CARD8 extension + 2 CARD16 sequenceNumber + 2 CARD16 event_type + 4 DRAWABLE drawable + 4 CARD32 ust_hi + 4 CARD32 ust_lo + 4 CARD32 msc_hi + 4 CARD32 msc_lo + 4 CARD32 sbc_hi + 4 CARD32 sbc_lo +└─── + + +┌─── + DRI2_InvalidateBuffers + 1 CARD8 type + 1 CARD8 extension + 2 CARD16 sequenceNumber + 4 DRAWABLE drawable + 4 CARD32 unused + 4 CARD32 unused + 4 CARD32 unused + 4 CARD32 unused + 4 CARD32 unused + 4 CARD32 unused +└─── + +A.4 Protocol Errors + +The DRI2 extension specifies no errors. + + + ⚙ ⚙ ⚙ ⚙ ⚙ ⚙ + + +Appendix B. Implementation on GEM + +Where to begin... diff --git a/dri2proto/dri2tokens.h b/dri2proto/dri2tokens.h new file mode 100644 index 0000000..7804e4d --- /dev/null +++ b/dri2proto/dri2tokens.h @@ -0,0 +1,55 @@ +/* + * Copyright © 2008 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Soft- + * ware"), 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 Soft- + * ware 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 MERCHANTABIL- + * ITY, 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 CONSE- + * QUENTIAL 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 PERFOR- + * MANCE 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. + * + * Authors: + * Kristian Høgsberg (krh@redhat.com) + */ + +#ifndef _DRI2_TOKENS_H_ +#define _DRI2_TOKENS_H_ + +#define DRI2BufferFrontLeft 0 +#define DRI2BufferBackLeft 1 +#define DRI2BufferFrontRight 2 +#define DRI2BufferBackRight 3 +#define DRI2BufferDepth 4 +#define DRI2BufferStencil 5 +#define DRI2BufferAccum 6 +#define DRI2BufferFakeFrontLeft 7 +#define DRI2BufferFakeFrontRight 8 +#define DRI2BufferDepthStencil 9 + +#define DRI2DriverDRI 0 +#define DRI2DriverVDPAU 1 + +/* Event sub-types for the swap complete event */ +#define DRI2_EXCHANGE_COMPLETE 0x1 +#define DRI2_BLIT_COMPLETE 0x2 +#define DRI2_FLIP_COMPLETE 0x3 + +#endif diff --git a/evieproto/.gitignore b/evieproto/.gitignore new file mode 100644 index 0000000..24f0fd9 --- /dev/null +++ b/evieproto/.gitignore @@ -0,0 +1,78 @@ +# +# X.Org module default exclusion patterns +# The next section if for module specific patterns +# +# Do not edit the following section +# GNU Build System (Autotools) +aclocal.m4 +autom4te.cache/ +autoscan.log +ChangeLog +compile +config.guess +config.h +config.h.in +config.log +config-ml.in +config.py +config.status +config.status.lineno +config.sub +configure +configure.scan +depcomp +.deps/ +INSTALL +install-sh +.libs/ +libtool +libtool.m4 +ltmain.sh +lt~obsolete.m4 +ltoptions.m4 +ltsugar.m4 +ltversion.m4 +Makefile +Makefile.in +mdate-sh +missing +mkinstalldirs +*.pc +py-compile +stamp-h? +symlink-tree +texinfo.tex +ylwrap + +# Do not edit the following section +# Edit Compile Debug Document Distribute +*~ +*.[0-9] +*.[0-9]x +*.bak +*.bin +core +*.dll +*.exe +*-ISO*.bdf +*-JIS*.bdf +*-KOI8*.bdf +*.kld +*.ko +*.ko.cmd +*.lai +*.l[oa] +*.[oa] +*.obj +*.patch +*.so +*.pcf.gz +*.pdb +*.tar.bz2 +*.tar.gz +# +# Add & Override patterns for evieproto +# +# Edit the following section as needed +# For example, !report.pc overrides *.pc. See 'man gitignore' +# diff --git a/evieproto/COPYING b/evieproto/COPYING new file mode 100644 index 0000000..2c05030 --- /dev/null +++ b/evieproto/COPYING @@ -0,0 +1,20 @@ +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, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/evieproto/Makefile.am b/evieproto/Makefile.am new file mode 100644 index 0000000..6de80c3 --- /dev/null +++ b/evieproto/Makefile.am @@ -0,0 +1,21 @@ +eviedir = $(includedir)/X11/extensions +evie_HEADERS = \ + evieproto.h \ + Xeviestr.h + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = evieproto.pc + +EXTRA_DIST = evieproto.pc.in + +MAINTAINERCLEANFILES = ChangeLog INSTALL + +.PHONY: ChangeLog INSTALL + +INSTALL: + $(INSTALL_CMD) + +ChangeLog: + $(CHANGELOG_CMD) + +dist-hook: ChangeLog INSTALL diff --git a/evieproto/README b/evieproto/README new file mode 100644 index 0000000..e49ea91 --- /dev/null +++ b/evieproto/README @@ -0,0 +1,31 @@ + Extended Visual Information Extension (XEVIE) + + +This extension defines a protocol for a client to determine information +about core X visuals beyond what the core protocol provides. + +Extension name: XEVIE + +All questions regarding this software should be directed at the +Xorg mailing list: + + http://lists.freedesktop.org/mailman/listinfo/xorg + +Please submit bug reports to the Xorg bugzilla: + + https://bugs.freedesktop.org/enter_bug.cgi?product=xorg + +The master development code repository can be found at: + + git://anongit.freedesktop.org/git/xorg/proto/evieproto + + http://cgit.freedesktop.org/xorg/proto/evieproto + +For patch submission instructions, see: + + http://www.x.org/wiki/Development/Documentation/SubmittingPatches + +For more information on the git code manager, see: + + http://wiki.x.org/wiki/GitPage + diff --git a/evieproto/Xeviestr.h b/evieproto/Xeviestr.h new file mode 100644 index 0000000..78871f1 --- /dev/null +++ b/evieproto/Xeviestr.h @@ -0,0 +1,3 @@ +#warning "Xeviestr.h is obsolete and may be removed in the future." +#warning "include <X11/extensions/evieproto.h> for the protocol defines." +#include <X11/extensions/evieproto.h> diff --git a/evieproto/autogen.sh b/evieproto/autogen.sh new file mode 100755 index 0000000..904cd67 --- /dev/null +++ b/evieproto/autogen.sh @@ -0,0 +1,12 @@ +#! /bin/sh + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +ORIGDIR=`pwd` +cd $srcdir + +autoreconf -v --install || exit 1 +cd $ORIGDIR || exit $? + +$srcdir/configure --enable-maintainer-mode "$@" diff --git a/evieproto/configure.ac b/evieproto/configure.ac new file mode 100644 index 0000000..9d6e33f --- /dev/null +++ b/evieproto/configure.ac @@ -0,0 +1,13 @@ +AC_PREREQ([2.57]) +AC_INIT([EvIEExt], [1.1.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg]) +AM_INIT_AUTOMAKE([foreign dist-bzip2]) +AM_MAINTAINER_MODE + +# Require xorg-macros: XORG_DEFAULT_OPTIONS +m4_ifndef([XORG_MACROS_VERSION], + [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.3) +XORG_DEFAULT_OPTIONS + +AC_OUTPUT([Makefile + evieproto.pc]) diff --git a/evieproto/evieproto.h b/evieproto/evieproto.h new file mode 100644 index 0000000..3f0ec18 --- /dev/null +++ b/evieproto/evieproto.h @@ -0,0 +1,156 @@ +/************************************************************ + +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, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +************************************************************/ + +#ifndef _XEVIEPROTO_H_ +#define _XEVIEPROTO_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 /* } _XEVIEPROTO_H_ */ + diff --git a/evieproto/evieproto.pc.in b/evieproto/evieproto.pc.in new file mode 100644 index 0000000..795a1cd --- /dev/null +++ b/evieproto/evieproto.pc.in @@ -0,0 +1,9 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: EvIEExt +Description: EvIE extension headers +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} diff --git a/fixesproto/.gitignore b/fixesproto/.gitignore new file mode 100644 index 0000000..edc43df --- /dev/null +++ b/fixesproto/.gitignore @@ -0,0 +1,78 @@ +# +# X.Org module default exclusion patterns +# The next section if for module specific patterns +# +# Do not edit the following section +# GNU Build System (Autotools) +aclocal.m4 +autom4te.cache/ +autoscan.log +ChangeLog +compile +config.guess +config.h +config.h.in +config.log +config-ml.in +config.py +config.status +config.status.lineno +config.sub +configure +configure.scan +depcomp +.deps/ +INSTALL +install-sh +.libs/ +libtool +libtool.m4 +ltmain.sh +lt~obsolete.m4 +ltoptions.m4 +ltsugar.m4 +ltversion.m4 +Makefile +Makefile.in +mdate-sh +missing +mkinstalldirs +*.pc +py-compile +stamp-h? +symlink-tree +texinfo.tex +ylwrap + +# Do not edit the following section +# Edit Compile Debug Document Distribute +*~ +*.[0-9] +*.[0-9]x +*.bak +*.bin +core +*.dll +*.exe +*-ISO*.bdf +*-JIS*.bdf +*-KOI8*.bdf +*.kld +*.ko +*.ko.cmd +*.lai +*.l[oa] +*.[oa] +*.obj +*.patch +*.so +*.pcf.gz +*.pdb +*.tar.bz2 +*.tar.gz +# +# Add & Override patterns for fixesproto +# +# Edit the following section as needed +# For example, !report.pc overrides *.pc. See 'man gitignore' +# diff --git a/fixesproto/AUTHORS b/fixesproto/AUTHORS new file mode 100644 index 0000000..8e18f9b --- /dev/null +++ b/fixesproto/AUTHORS @@ -0,0 +1 @@ +Keith Packard, HP diff --git a/fixesproto/COPYING b/fixesproto/COPYING new file mode 100644 index 0000000..6f42002 --- /dev/null +++ b/fixesproto/COPYING @@ -0,0 +1,41 @@ +Copyright © 2006 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, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +Copyright © 2001,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. + diff --git a/fixesproto/Makefile.am b/fixesproto/Makefile.am new file mode 100644 index 0000000..f1716b0 --- /dev/null +++ b/fixesproto/Makefile.am @@ -0,0 +1,43 @@ +# +# Copyright © 2003 Keith Packard, Noah Levitt +# +# 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. + +fixesdir = $(includedir)/X11/extensions +fixes_HEADERS = \ + xfixesproto.h \ + xfixeswire.h + +dist_doc_DATA = fixesproto.txt + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = fixesproto.pc + + +MAINTAINERCLEANFILES = ChangeLog INSTALL + +.PHONY: ChangeLog INSTALL + +INSTALL: + $(INSTALL_CMD) + +ChangeLog: + $(CHANGELOG_CMD) + +dist-hook: ChangeLog INSTALL diff --git a/fixesproto/README b/fixesproto/README new file mode 100644 index 0000000..99604e4 --- /dev/null +++ b/fixesproto/README @@ -0,0 +1,31 @@ + X Fixes Extension + +The extension makes changes to many areas of the protocol to resolve +issues raised by application interaction with core protocol mechanisms +that cannot be adequately worked around on the client side of the wire. + +Extension name: XFIXES + +All questions regarding this software should be directed at the +Xorg mailing list: + + http://lists.freedesktop.org/mailman/listinfo/xorg + +Please submit bug reports to the Xorg bugzilla: + + https://bugs.freedesktop.org/enter_bug.cgi?product=xorg + +The master development code repository can be found at: + + git://anongit.freedesktop.org/git/xorg/proto/fixesproto + + http://cgit.freedesktop.org/xorg/proto/fixesproto + +For patch submission instructions, see: + + http://www.x.org/wiki/Development/Documentation/SubmittingPatches + +For more information on the git code manager, see: + + http://wiki.x.org/wiki/GitPage + diff --git a/fixesproto/autogen.sh b/fixesproto/autogen.sh new file mode 100755 index 0000000..904cd67 --- /dev/null +++ b/fixesproto/autogen.sh @@ -0,0 +1,12 @@ +#! /bin/sh + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +ORIGDIR=`pwd` +cd $srcdir + +autoreconf -v --install || exit 1 +cd $ORIGDIR || exit $? + +$srcdir/configure --enable-maintainer-mode "$@" diff --git a/fixesproto/configure.ac b/fixesproto/configure.ac new file mode 100644 index 0000000..04a9feb --- /dev/null +++ b/fixesproto/configure.ac @@ -0,0 +1,37 @@ +dnl +dnl Copyright © 2003 Keith Packard, Noah Levitt +dnl +dnl Permission to use, copy, modify, distribute, and sell this software and its +dnl documentation for any purpose is hereby granted without fee, provided that +dnl the above copyright notice appear in all copies and that both that +dnl copyright notice and this permission notice appear in supporting +dnl documentation, and that the name of Keith Packard not be used in +dnl advertising or publicity pertaining to distribution of the software without +dnl specific, written prior permission. Keith Packard makes no +dnl representations about the suitability of this software for any purpose. It +dnl is provided "as is" without express or implied warranty. +dnl +dnl KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +dnl EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR +dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +dnl PERFORMANCE OF THIS SOFTWARE. +dnl +dnl Process this file with autoconf to create configure. + +AC_PREREQ([2.60]) +AC_INIT([FixesProto], [4.1.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg]) +AM_INIT_AUTOMAKE([foreign dist-bzip2]) +AM_MAINTAINER_MODE + +# Require xorg-macros: XORG_DEFAULT_OPTIONS +m4_ifndef([XORG_MACROS_VERSION], + [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.3) +XORG_DEFAULT_OPTIONS + +AC_OUTPUT([Makefile + fixesproto.pc]) + diff --git a/fixesproto/fixesproto.pc.in b/fixesproto/fixesproto.pc.in new file mode 100644 index 0000000..fabce86 --- /dev/null +++ b/fixesproto/fixesproto.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: FixesProto +Description: X Fixes extension headers +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} +Requires: xextproto >= 7.0.99.1 diff --git a/fixesproto/fixesproto.txt b/fixesproto/fixesproto.txt new file mode 100644 index 0000000..5ef8153 --- /dev/null +++ b/fixesproto/fixesproto.txt @@ -0,0 +1,577 @@ + The XFIXES Extension + Version 4.0 + Document Revision 2 + 2006-12-14 + Keith Packard + keithp@keithp.com + +1. Introduction + +X applications have often needed to work around various shortcomings in the +core X window system. This extension is designed to provide the minimal +server-side support necessary to eliminate problems caused by these +workarounds. + +2. Acknowledgements + +This extension is a direct result of requests made by application +developers, in particular, + + + Owen Taylor for describing the issues raised with the XEMBED + mechanisms and SaveSet processing and his initial extension + to handle this issue. + + + Bill Haneman for the design for cursor image tracking. + + + Havoc Pennington + + + Fredrik Höglund for cursor names + + + Deron Johnson for cursor visibility + +3. Basic Premise + +Requests in this extension may seem to wander all over the map of X server +capabilities, but they are tied by a simple rule -- resolving issues raised +by application interaction with core protocol mechanisms that cannot be +adequately worked around on the client side of the wire. + +4. Extension initialization + +The client must negotiate the version of the extension before executing +extension requests. Behavior of the server is undefined otherwise. + +QueryVersion + + client-major-version: CARD32 + client-minor-version: CARD32 + + -> + + major-version: CARD32 + minor-version: CARD32 + + The client sends the highest supported version to the server and + the server sends the highest version it supports, but no higher than + the requested version. Major versions changes can introduce + new requests, minor version changes introduce only adjustments to + existing requests or backward compatible changes. It is + the clients responsibility to ensure that the server supports + a version which is compatible with its expectations. + +************* XFIXES VERSION 1 OR BETTER *********** + +5. Save Set processing changes + +Embedding one application within another provides a way of unifying +disparate documents and views within a single framework. From the X +protocol perspective, this appears similar to nested window managers; the +embedding application "manages" the embedded windows much as a window +manager does for top-level windows. To protect the embedded application +from embedding application failure, it is reasonable to use the core SaveSet +mechanism so that embedding application failure causes embedded windows to +be preserved instead of destroyed. + +The core save set mechanism defines the target for each save set member +window as the nearest enclosing window not owned by the terminating client. +For embedding applications, this nearest window is usually the window +manager frame. The problem here is that the window manager will not +generally expect to receive and correctly manage new windows appearing within +that window by the save set mechanism, and will instead destroy the frame +window in response to the client window destruction. This causes the +embedded window to be destroyed. + +An easy fix for this problem is to change the target of the save set member +to a window which won't be affected by the underlying window destruction. +XFIXES chooses the root window as the target. + +Having embedded windows suddenly appear at the top level can confuse users, +so XFIXES also lets the client select whether the window should end up +unmapped after the save set processing instead of unconditionally making +them be mapped. + +5.1 Requests + +ChangeSaveSet + + window: Window + mode: { Insert, Delete } + target: { Nearest, Root } + map: { Map, Unmap } + + ChangeSaveSet is an extension of the core protocol ChangeSaveSet + request. As in that request, mode specifies whether the indicated + window is inserted or deleted from the save-set. Target specifies + whether the window is reparented to the nearest non-client window as + in the core protocol, or reparented to the root window. Map + specifies whether the window is mapped as in the core protocol or + unmapped. + +6. Selection Tracking + +Applications wishing to monitor the contents of current selections must +poll for selection changes. XFIXES improves this by providing an event +delivered whenever the selection ownership changes. + +6.1 Types + + SELECTIONEVENT { SetSelectionOwner, + SelectionWindowDestroy, + SelectionClientClose } + +6.1 Events + +SelectionNotify + + subtype: SELECTIONEVENT + window: Window + owner: Window + selection: Atom + timestamp: Timestamp + selection-timestamp: Timestamp + +6.2 Requests + +SelectSelectionInput + + window: Window + selection: Atom + event-mask: SETofSELECTIONEVENT + + Selects for events to be delivered to window when various causes of + ownership of selection occur. Subtype indicates the cause of the + selection ownership change. Owner is set to the current selection + owner, or None. Timestamp indicates the time the event was + generated while selection-timestamp indicates the timestamp used to + own the selection. + +7. Cursor Image Monitoring + +Mirroring the screen contents is easily done with the core protocol or VNC +addons, except for the current cursor image. There is no way using the core +protocol to discover which cursor image is currently displayed. The +cursor image often contains significant semantic content about the user +interface. XFIXES provides a simple mechanism to discover when the cursor +image changes and to fetch the current cursor image. + +As the current cursor may or may not have any XID associated with it, there +is no stable name available. Instead, XFIXES returns only the image of the +current cursor and provides a way to identify cursor images to avoid +refetching the image each time it changes to a previously seen cursor. + +7.1 Types + CURSOREVENT { DisplayCursor } + +7.2 Events + +CursorNotify + + subtype: CURSOREVENT + window: Window + cursor-serial: CARD32 + timestamp: Timestamp + name: Atom (Version 2 only) + +7.3 Requests + +SelectCursorInput + + window: Window + event-mask: SETofCURSOREVENT + + This request directs cursor change events to the named window. + Events will be delivered irrespective of the screen on which they + occur. Subtype indicates the cause of the cursor image change + (there is only one subtype at present). Cursor-serial is a number + assigned to the cursor image which identifies the image. Cursors + with different serial numbers may have different images. Timestamp + is the time of the cursor change. + + Servers supporting the X Input Extension Version 2.0 or higher only + notify the clients of cursor change events for the ClientPointer, not + of any other master pointer (see Section 4.4. in the XI2 protocol + specificiation). + +GetCursorImage + + -> + + x: INT16 + y: INT16 + width: CARD16 + height: CARD16 + x-hot: CARD16 + y-hot: CARD16 + cursor-serial: CARD32 + cursor-image: LISTofCARD32 + + GetCursorImage returns the image of the current cursor. X and y are + the current cursor position. Width and height are the size of the + cursor image. X-hot and y-hot mark the hotspot within the cursor + image. Cursor-serial provides the number assigned to this cursor + image, this same serial number will be reported in a CursorNotify + event if this cursor image is redisplayed in the future. + + The cursor image itself is returned as a single image at 32 bits per + pixel with 8 bits of alpha in the most significant 8 bits of the + pixel followed by 8 bits each of red, green and finally 8 bits of + blue in the least significant 8 bits. The color components are + pre-multiplied with the alpha component. + +************* XFIXES VERSION 2 OR BETTER *********** + +8. Region Objects + +The core protocol doesn't expose regions as a primitive object and this +makes many operations more complicated than they really need to be. Adding +region objects simplifies expose handling, the Shape extension and other +operations. These operations are also designed to support a separate +extension, the X Damage Extension. + +8.1 Types + + Region: XID + WINDOW_REGION_KIND: { Bounding, Clip } + +8.2 Errors + + Region The specified region is invalid + +8.3 Requests + +CreateRegion + + region: REGION + rects: LISTofRECTANGLE + + Creates a region initialized to the specified list of rectangles. + The rectangles may be specified in any order, their union becomes + the region. The core protocol allows applications to specify an + order for the rectangles, but it turns out to be just as hard to + verify the rectangles are actually in that order as it is to simply + ignore the ordering information and union them together. Hence, + this request dispenses with the ordering information. + + Errors: IDChoice + +CreateRegionFromBitmap + + region: REGION + bitmap: PIXMAP + + Creates a region initialized to the set of 'one' pixels in bitmap + (which must be depth 1, else Match error). + + Errors: Pixmap, IDChoice, Match + +CreateRegionFromWindow + + window: Window + kind: WINDOW_REGION_KIND + region: Region + + Creates a region initialized to the specified window region. See the + Shape extension for the definition of Bounding and Clip regions. + + Errors: Window, IDChoice, Value + +CreateRegionFromGC + + gc: GContext + region: Region + + Creates a region initialized from the clip list of the specified + GContext. + + Errors: GContext, IDChoice + +CreateRegionFromPicture + + picture: Picture + region: Region + + + Creates a region initialized from the clip list of the specified + Picture. + + Errors: Picture, IDChoice + +DestroyRegion + + region: Region + + Destroys the specified region. + + Errors: Region + +SetRegion + + region: Region + rects: LISTofRECTANGLE + + This replaces the current contents of region with the region formed + by the union of rects. + +CopyRegion + source: Region + destination: Region + + This replaces the contents of destination with the contents of + source. + +UnionRegion +IntersectRegion +SubtractRegion + + source1: Region + source2: Region + destination: Region + + Combines source1 and source2, placing the result in destination. + Destination may be the same as either source1 or source2. + + Errors: Region, Value + +InvertRegion + + source: Region + bounds: RECTANGLE + destination: Region + + The source region is subtracted from the region specified by + bounds. The result is placed in destination, replacing its contents. + + Errors: Region + +TranslateRegion + + region: Region + dx, dy: INT16 + + The region is translated by dx, dy in place. + + Errors: Region + +RegionExtents + + source: Region + destination: Region + + The extents of the source region are placed in the destination + +FetchRegion + + region: Region + -> + extents: RECTANGLE + rectangles: LISTofRECTANGLE + + The region is returned as a list of rectangles in YX-banded order. + + Errors: Region + +SetGCClipRegion + + gc: GCONTEXT + clip-x-origin, clip-y-origin: INT16 + region: Region or None + + This request changes clip-mask in gc to the specified region and + sets the clip origin. Output will be clipped to remain contained + within the region. The clip origin is interpreted relative to the + origin of whatever destination drawable is specified in a graphics + request. The region is interpreted relative to the clip origin. + Future changes to region have no effect on the gc clip-mask. + + Errors: GContext, Region + +SetWindowShapeRegion + + dest: Window + destKind: SHAPE_KIND + xOff, yOff: INT16 + region: Region or None + + This request sets the specified (by destKind) Shape extension region + of the window to region, offset by xOff and yOff. Future changes to + region have no effect on the window shape. + + Errors: Window, Value, Region + +SetPictureClipRegion + + picture: Picture + clip-x-origin, clip-y-origin: INT16 + region: Region or None + + This request changes clip-mask in picture to the specified region + and sets the clip origin. Input and output will be clipped to + remain contained within the region. The clip origin is interpreted + relative to the origin of the drawable associated with picture. The + region is interpreted relative to the clip origin. Future changes + to region have no effect on the picture clip-mask. + + Errors: Picture, Region + +9. Cursor Names + +Attaching names to cursors permits some abstract semantic content to be +associated with specific cursor images. Reflecting those names back to +applications allows that semantic content to be related to the user through +non-visual means. + +9.1 Events + +CursorNotify + + subtype: CURSOREVENT + window: Window + cursor-serial: CARD32 + timestamp: Timestamp + name: Atom or None + + In Version 2 of the XFIXES protocol, this event adds the atom + of any name associated with the current cursor (else None). + +9.2 Requests + +SetCursorName + + cursor: CURSOR + name: LISTofCARD8 + + This request interns name as an atom and sets that atom as the name + of cursor. + + Errors: Cursor + +GetCursorName + + cursor: CURSOR + -> + atom: ATOM or None + name: LISTofCARD8 + + This request returns the name and atom of cursor. If no name is + set, atom is None and name is empty. + + Errors: Cursor + +GetCursorImageAndName + + -> + + x: INT16 + y: INT16 + width: CARD16 + height: CARD16 + x-hot: CARD16 + y-hot: CARD16 + cursor-serial: CARD32 + cursor-atom: ATOM + cursor-name: LISTofCARD8 + cursor-image: LISTofCARD32 + + This is similar to GetCursorImage except for including both + the atom and name of the current cursor. + +ChangeCursor + + source, destination: CURSOR + + This request replaces all references to the destination with a + reference to source. Any existing uses of the destination cursor + object will now show the source cursor image. + +ChangeCursorByName + + src: CURSOR + name: LISTofCARD8 + + This request replaces the contents of all cursors with the specified + name with the src cursor. + +************* XFIXES VERSION 3 OR BETTER *********** + +10. Region Expansion + +This update provides another operation on the region objects defined in +Section 8 of this document. + +10.1 Requests + +ExpandRegion + source: REGION + destination: REGION + left, right, top, bottom: CARD16 + + Creates destination region containing the area specified by + expanding each rectangle in the source region by the specified + number of pixels to the left, right, top and bottom. + +************* XFIXES VERSION 4 OR BETTER *********** + +11. Cursor Visibility + +Composite managers may want to render the cursor themselves instead of +relying on the X server sprite drawing, this provides a way for them to +do so without getting a double cursor image. + +11.1 Requests + +HideCursor + + window: WINDOW + + A client sends this request to indicate that it wants the + cursor image to be hidden (i.e. to not be displayed) when + the sprite is inside the specified window, or one of its + subwindows. If the sprite is inside a window for which one + or more active clients have requested cursor hiding then the + cursor image will not be displayed. + + Note that even though cursor hiding causes the cursor image + to be invisible, CursorNotify events will still be sent + normally, as if the cursor image were visible. + + If, during a grab, one or more active clients have requested + cursor hiding for grab window, or one of its ancestors, the + cursor image of the grab cursor will not be displayed during + the lifetime of that grab. + + When a client with outstanding cursor hiding requests + terminates its connection these requests will be deleted. + + Servers supporting the X Input Extension Version 2.0 or higher hide + all visible cursors in response to a HideCursor request. If a master + pointer is created while the cursors are hidden, this master pointer's + cursor will be hidden as well. + +ShowCursor + + window: WINDOW + + A client sends this request to indicate that it wants the + cursor image to be displayed when the sprite is inside the + specified window, or one of its subwindows. If the sprite + is inside a window for which no active clients have requested + cursor hiding then the cursor image for that window will be + displayed. In other words, if a client calls HideCursor for + a specified window, or window subtree, this request reverses + the effects of the HideCursor request. + + If the client has made no outstanding HideCursor requests + a BadMatch error is generated. + + Servers supporting the X Input Extension Version 2.0 or higher show + all visible cursors in response to a ShowCursor request. + +99. Future compatibility + +This extension is not expected to remain fixed. Future changes will +strive to remain compatible if at all possible. The X server will always +support version 1 of the extension protocol if requested by a client. + +Additions to the protocol will always by marked by minor version number +changes so that applications will be able to detect what requests are +supported. diff --git a/fixesproto/xfixesproto.h b/fixesproto/xfixesproto.h new file mode 100644 index 0000000..d7d7bed --- /dev/null +++ b/fixesproto/xfixesproto.h @@ -0,0 +1,518 @@ +/* + * Copyright © 2006 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, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ +/* + * Copyright © 2002 Keith Packard, member of The XFree86 Project, 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 Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _XFIXESPROTO_H_ +#define _XFIXESPROTO_H_ + +#include <X11/Xmd.h> +#include <X11/extensions/xfixeswire.h> +#include <X11/extensions/shapeconst.h> + +#define Window CARD32 +#define Drawable CARD32 +#define Font CARD32 +#define Pixmap CARD32 +#define Cursor CARD32 +#define Colormap CARD32 +#define GContext CARD32 +#define Atom CARD32 +#define VisualID CARD32 +#define Time CARD32 +#define KeyCode CARD8 +#define KeySym CARD32 +#define Picture CARD32 + +/*************** Version 1 ******************/ + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; +} xXFixesReq; + +/* + * requests and replies + */ +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + CARD32 majorVersion B32; + CARD32 minorVersion B32; +} xXFixesQueryVersionReq; + +#define sz_xXFixesQueryVersionReq 12 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 majorVersion B32; + CARD32 minorVersion B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xXFixesQueryVersionReply; + +#define sz_xXFixesQueryVersionReply 32 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + BYTE mode; /* SetModeInsert/SetModeDelete*/ + BYTE target; /* SaveSetNearest/SaveSetRoot*/ + BYTE map; /* SaveSetMap/SaveSetUnmap */ + BYTE pad1; + Window window; +} xXFixesChangeSaveSetReq; + +#define sz_xXFixesChangeSaveSetReq 12 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Window window B32; + Atom selection B32; + CARD32 eventMask B32; +} xXFixesSelectSelectionInputReq; + +#define sz_xXFixesSelectSelectionInputReq 16 + +typedef struct { + CARD8 type; + CARD8 subtype; + CARD16 sequenceNumber B16; + Window window B32; + Window owner B32; + Atom selection B32; + Time timestamp B32; + Time selectionTimestamp B32; + CARD32 pad2 B32; + CARD32 pad3 B32; +} xXFixesSelectionNotifyEvent; + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Window window B32; + CARD32 eventMask B32; +} xXFixesSelectCursorInputReq; + +#define sz_xXFixesSelectCursorInputReq 12 + +typedef struct { + CARD8 type; + CARD8 subtype; + CARD16 sequenceNumber B16; + Window window B32; + CARD32 cursorSerial B32; + Time timestamp; + Atom name B32; /* Version 2 */ + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; +} xXFixesCursorNotifyEvent; + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; +} xXFixesGetCursorImageReq; + +#define sz_xXFixesGetCursorImageReq 4 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + INT16 x B16; + INT16 y B16; + CARD16 width B16; + CARD16 height B16; + CARD16 xhot B16; + CARD16 yhot B16; + CARD32 cursorSerial B32; + CARD32 pad2 B32; + CARD32 pad3 B32; +} xXFixesGetCursorImageReply; + +#define sz_xXFixesGetCursorImageReply 32 + +/*************** Version 2 ******************/ + +#define Region CARD32 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region region B32; + /* LISTofRECTANGLE */ +} xXFixesCreateRegionReq; + +#define sz_xXFixesCreateRegionReq 8 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region region B32; + Pixmap bitmap B32; +} xXFixesCreateRegionFromBitmapReq; + +#define sz_xXFixesCreateRegionFromBitmapReq 12 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region region B32; + Window window B32; + CARD8 kind; + CARD8 pad1; + CARD16 pad2 B16; +} xXFixesCreateRegionFromWindowReq; + +#define sz_xXFixesCreateRegionFromWindowReq 16 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region region B32; + GContext gc B32; +} xXFixesCreateRegionFromGCReq; + +#define sz_xXFixesCreateRegionFromGCReq 12 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region region B32; + Picture picture B32; +} xXFixesCreateRegionFromPictureReq; + +#define sz_xXFixesCreateRegionFromPictureReq 12 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region region B32; +} xXFixesDestroyRegionReq; + +#define sz_xXFixesDestroyRegionReq 8 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region region B32; + /* LISTofRECTANGLE */ +} xXFixesSetRegionReq; + +#define sz_xXFixesSetRegionReq 8 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region source B32; + Region destination B32; +} xXFixesCopyRegionReq; + +#define sz_xXFixesCopyRegionReq 12 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region source1 B32; + Region source2 B32; + Region destination B32; +} xXFixesCombineRegionReq, + xXFixesUnionRegionReq, + xXFixesIntersectRegionReq, + xXFixesSubtractRegionReq; + +#define sz_xXFixesCombineRegionReq 16 +#define sz_xXFixesUnionRegionReq sz_xXFixesCombineRegionReq +#define sz_xXFixesIntersectRegionReq sz_xXFixesCombineRegionReq +#define sz_xXFixesSubtractRegionReq sz_xXFixesCombineRegionReq + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region source B32; + INT16 x B16, y B16; + CARD16 width B16, height B16; + Region destination B32; +} xXFixesInvertRegionReq; + +#define sz_xXFixesInvertRegionReq 20 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region region B32; + INT16 dx B16, dy B16; +} xXFixesTranslateRegionReq; + +#define sz_xXFixesTranslateRegionReq 12 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region source B32; + Region destination B32; +} xXFixesRegionExtentsReq; + +#define sz_xXFixesRegionExtentsReq 12 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region region B32; +} xXFixesFetchRegionReq; + +#define sz_xXFixesFetchRegionReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + INT16 x B16, y B16; + CARD16 width B16, height B16; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xXFixesFetchRegionReply; + +#define sz_xXFixesFetchRegionReply 32 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + GContext gc B32; + Region region B32; + INT16 xOrigin B16, yOrigin B16; +} xXFixesSetGCClipRegionReq; + +#define sz_xXFixesSetGCClipRegionReq 16 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Window dest; + BYTE destKind; + CARD8 pad1; + CARD16 pad2 B16; + INT16 xOff B16, yOff B16; + Region region; +} xXFixesSetWindowShapeRegionReq; + +#define sz_xXFixesSetWindowShapeRegionReq 20 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Picture picture B32; + Region region B32; + INT16 xOrigin B16, yOrigin B16; +} xXFixesSetPictureClipRegionReq; + +#define sz_xXFixesSetPictureClipRegionReq 16 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Cursor cursor B32; + CARD16 nbytes B16; + CARD16 pad B16; +} xXFixesSetCursorNameReq; + +#define sz_xXFixesSetCursorNameReq 12 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Cursor cursor B32; +} xXFixesGetCursorNameReq; + +#define sz_xXFixesGetCursorNameReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + Atom atom B32; + CARD16 nbytes B16; + CARD16 pad2 B16; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xXFixesGetCursorNameReply; + +#define sz_xXFixesGetCursorNameReply 32 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; +} xXFixesGetCursorImageAndNameReq; + +#define sz_xXFixesGetCursorImageAndNameReq 4 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + INT16 x B16; + INT16 y B16; + CARD16 width B16; + CARD16 height B16; + CARD16 xhot B16; + CARD16 yhot B16; + CARD32 cursorSerial B32; + Atom cursorName B32; + CARD16 nbytes B16; + CARD16 pad B16; +} xXFixesGetCursorImageAndNameReply; + +#define sz_xXFixesGetCursorImageAndNameReply 32 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Cursor source B32; + Cursor destination B32; +} xXFixesChangeCursorReq; + +#define sz_xXFixesChangeCursorReq 12 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Cursor source B32; + CARD16 nbytes; + CARD16 pad; +} xXFixesChangeCursorByNameReq; + +#define sz_xXFixesChangeCursorByNameReq 12 + +/*************** Version 3 ******************/ + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region source B32; + Region destination B32; + CARD16 left B16; + CARD16 right B16; + CARD16 top B16; + CARD16 bottom B16; +} xXFixesExpandRegionReq; + +#define sz_xXFixesExpandRegionReq 20 + +/*************** Version 4.0 ******************/ + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Window window B32; +} xXFixesHideCursorReq; + +#define sz_xXFixesHideCursorReq sizeof(xXFixesHideCursorReq) + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Window window B32; +} xXFixesShowCursorReq; + +#define sz_xXFixesShowCursorReq sizeof(xXFixesShowCursorReq) + +#undef Region +#undef Picture +#undef Window +#undef Drawable +#undef Font +#undef Pixmap +#undef Cursor +#undef Colormap +#undef GContext +#undef Atom +#undef VisualID +#undef Time +#undef KeyCode +#undef KeySym + +#endif /* _XFIXESPROTO_H_ */ diff --git a/fixesproto/xfixeswire.h b/fixesproto/xfixeswire.h new file mode 100644 index 0000000..3342753 --- /dev/null +++ b/fixesproto/xfixeswire.h @@ -0,0 +1,127 @@ +/* + * Copyright © 2006 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, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ +/* + * Copyright © 2002 Keith Packard, member of The XFree86 Project, 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 Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + + +#ifndef _XFIXESWIRE_H_ +#define _XFIXESWIRE_H_ + +#define XFIXES_NAME "XFIXES" +#define XFIXES_MAJOR 4 +#define XFIXES_MINOR 0 + +/*************** Version 1 ******************/ +#define X_XFixesQueryVersion 0 +#define X_XFixesChangeSaveSet 1 +#define X_XFixesSelectSelectionInput 2 +#define X_XFixesSelectCursorInput 3 +#define X_XFixesGetCursorImage 4 +/*************** Version 2 ******************/ +#define X_XFixesCreateRegion 5 +#define X_XFixesCreateRegionFromBitmap 6 +#define X_XFixesCreateRegionFromWindow 7 +#define X_XFixesCreateRegionFromGC 8 +#define X_XFixesCreateRegionFromPicture 9 +#define X_XFixesDestroyRegion 10 +#define X_XFixesSetRegion 11 +#define X_XFixesCopyRegion 12 +#define X_XFixesUnionRegion 13 +#define X_XFixesIntersectRegion 14 +#define X_XFixesSubtractRegion 15 +#define X_XFixesInvertRegion 16 +#define X_XFixesTranslateRegion 17 +#define X_XFixesRegionExtents 18 +#define X_XFixesFetchRegion 19 +#define X_XFixesSetGCClipRegion 20 +#define X_XFixesSetWindowShapeRegion 21 +#define X_XFixesSetPictureClipRegion 22 +#define X_XFixesSetCursorName 23 +#define X_XFixesGetCursorName 24 +#define X_XFixesGetCursorImageAndName 25 +#define X_XFixesChangeCursor 26 +#define X_XFixesChangeCursorByName 27 +/*************** Version 3 ******************/ +#define X_XFixesExpandRegion 28 +/*************** Version 4 ******************/ +#define X_XFixesHideCursor 29 +#define X_XFixesShowCursor 30 + +#define XFixesNumberRequests (X_XFixesShowCursor+1) + +/* Selection events share one event number */ +#define XFixesSelectionNotify 0 + +/* Within the selection, the 'subtype' field distinguishes */ +#define XFixesSetSelectionOwnerNotify 0 +#define XFixesSelectionWindowDestroyNotify 1 +#define XFixesSelectionClientCloseNotify 2 + +#define XFixesSetSelectionOwnerNotifyMask (1L << 0) +#define XFixesSelectionWindowDestroyNotifyMask (1L << 1) +#define XFixesSelectionClientCloseNotifyMask (1L << 2) + +/* There's only one cursor event so far */ +#define XFixesCursorNotify 1 + +#define XFixesDisplayCursorNotify 0 + +#define XFixesDisplayCursorNotifyMask (1L << 0) + +#define XFixesNumberEvents (2) + +/* errors */ +#define BadRegion 0 +#define XFixesNumberErrors (BadRegion+1) + +#define SaveSetNearest 0 +#define SaveSetRoot 1 + +#define SaveSetMap 0 +#define SaveSetUnmap 1 + +/*************** Version 2 ******************/ + +#define WindowRegionBounding 0 +#define WindowRegionClip 1 + +#endif /* _XFIXESWIRE_H_ */ diff --git a/fontcacheproto/.gitignore b/fontcacheproto/.gitignore new file mode 100644 index 0000000..51f6b55 --- /dev/null +++ b/fontcacheproto/.gitignore @@ -0,0 +1,78 @@ +# +# X.Org module default exclusion patterns +# The next section if for module specific patterns +# +# Do not edit the following section +# GNU Build System (Autotools) +aclocal.m4 +autom4te.cache/ +autoscan.log +ChangeLog +compile +config.guess +config.h +config.h.in +config.log +config-ml.in +config.py +config.status +config.status.lineno +config.sub +configure +configure.scan +depcomp +.deps/ +INSTALL +install-sh +.libs/ +libtool +libtool.m4 +ltmain.sh +lt~obsolete.m4 +ltoptions.m4 +ltsugar.m4 +ltversion.m4 +Makefile +Makefile.in +mdate-sh +missing +mkinstalldirs +*.pc +py-compile +stamp-h? +symlink-tree +texinfo.tex +ylwrap + +# Do not edit the following section +# Edit Compile Debug Document Distribute +*~ +*.[0-9] +*.[0-9]x +*.bak +*.bin +core +*.dll +*.exe +*-ISO*.bdf +*-JIS*.bdf +*-KOI8*.bdf +*.kld +*.ko +*.ko.cmd +*.lai +*.l[oa] +*.[oa] +*.obj +*.patch +*.so +*.pcf.gz +*.pdb +*.tar.bz2 +*.tar.gz +# +# Add & Override patterns for fontcacheproto +# +# Edit the following section as needed +# For example, !report.pc overrides *.pc. See 'man gitignore' +# diff --git a/fontcacheproto/COPYING b/fontcacheproto/COPYING new file mode 100644 index 0000000..3e473ad --- /dev/null +++ b/fontcacheproto/COPYING @@ -0,0 +1,24 @@ +Copyright (c) 1998-1999 Shunsuke Akiyama <akiyama@jp.FreeBSD.org>. +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. diff --git a/fontcacheproto/Makefile.am b/fontcacheproto/Makefile.am new file mode 100644 index 0000000..9092f8a --- /dev/null +++ b/fontcacheproto/Makefile.am @@ -0,0 +1,22 @@ +fontcachedir = $(includedir)/X11/extensions +fontcache_HEADERS = \ + fontcache.h \ + fontcacheP.h \ + fontcachstr.h + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = fontcacheproto.pc + +EXTRA_DIST = fontcacheproto.pc.in + +MAINTAINERCLEANFILES = ChangeLog INSTALL + +.PHONY: ChangeLog INSTALL + +INSTALL: + $(INSTALL_CMD) + +ChangeLog: + $(CHANGELOG_CMD) + +dist-hook: ChangeLog INSTALL diff --git a/fontcacheproto/README b/fontcacheproto/README new file mode 100644 index 0000000..7cce9a7 --- /dev/null +++ b/fontcacheproto/README @@ -0,0 +1,30 @@ + FontCache Extension + +This extension defines a protocol to allow client control over the caching +of server-side core fonts. + +Extension name: FontCache + +All questions regarding this software should be directed at the +Xorg mailing list: + + http://lists.freedesktop.org/mailman/listinfo/xorg + +Please submit bug reports to the Xorg bugzilla: + + https://bugs.freedesktop.org/enter_bug.cgi?product=xorg + +The master development code repository can be found at: + + git://anongit.freedesktop.org/git/xorg/proto/fontcacheproto + + http://cgit.freedesktop.org/xorg/proto/fontcacheproto + +For patch submission instructions, see: + + http://www.x.org/wiki/Development/Documentation/SubmittingPatches + +For more information on the git code manager, see: + + http://wiki.x.org/wiki/GitPage + diff --git a/fontcacheproto/autogen.sh b/fontcacheproto/autogen.sh new file mode 100755 index 0000000..904cd67 --- /dev/null +++ b/fontcacheproto/autogen.sh @@ -0,0 +1,12 @@ +#! /bin/sh + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +ORIGDIR=`pwd` +cd $srcdir + +autoreconf -v --install || exit 1 +cd $ORIGDIR || exit $? + +$srcdir/configure --enable-maintainer-mode "$@" diff --git a/fontcacheproto/configure.ac b/fontcacheproto/configure.ac new file mode 100644 index 0000000..2c13bd2 --- /dev/null +++ b/fontcacheproto/configure.ac @@ -0,0 +1,13 @@ +AC_PREREQ([2.57]) +AC_INIT([FontcacheProto], [0.1.3], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg]) +AM_INIT_AUTOMAKE([foreign dist-bzip2]) +AM_MAINTAINER_MODE + +# Require xorg-macros: XORG_DEFAULT_OPTIONS +m4_ifndef([XORG_MACROS_VERSION], + [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.3) +XORG_DEFAULT_OPTIONS + +AC_OUTPUT([Makefile + fontcacheproto.pc]) diff --git a/fontcacheproto/fontcache.h b/fontcacheproto/fontcache.h new file mode 100644 index 0000000..b767db1 --- /dev/null +++ b/fontcacheproto/fontcache.h @@ -0,0 +1,106 @@ +/*- + * Copyright (c) 1998-1999 Shunsuke Akiyama <akiyama@jp.FreeBSD.org>. + * 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 <X11/Xlib.h> + +_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/fontcacheproto/fontcacheP.h b/fontcacheproto/fontcacheP.h new file mode 100644 index 0000000..75677f3 --- /dev/null +++ b/fontcacheproto/fontcacheP.h @@ -0,0 +1,40 @@ +/*- + * Copyright (c) 1998-1999 Shunsuke Akiyama <akiyama@jp.FreeBSD.org>. + * 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 <X11/extensions/fontcache.h> + +int FontCacheChangeSettings(FontCacheSettingsPtr /* cinfo */); +void FontCacheGetSettings(FontCacheSettingsPtr /* cinfo */); +void FontCacheGetStatistics(FontCacheStatisticsPtr /* cstats */); + +#endif /* _FONTCACHEP_H_ */ diff --git a/fontcacheproto/fontcacheproto.pc.in b/fontcacheproto/fontcacheproto.pc.in new file mode 100644 index 0000000..afb2127 --- /dev/null +++ b/fontcacheproto/fontcacheproto.pc.in @@ -0,0 +1,9 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: FontcacheProto +Description: Fontcache extension headers +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} diff --git a/fontcacheproto/fontcachstr.h b/fontcacheproto/fontcachstr.h new file mode 100644 index 0000000..eab704e --- /dev/null +++ b/fontcacheproto/fontcachstr.h @@ -0,0 +1,130 @@ +/*- + * Copyright (c) 1998-1999 Shunsuke Akiyama <akiyama@jp.FreeBSD.org>. + * 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 <X11/extensions/fontcache.h> + +#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/fontsproto/.gitignore b/fontsproto/.gitignore new file mode 100644 index 0000000..f1ca084 --- /dev/null +++ b/fontsproto/.gitignore @@ -0,0 +1,78 @@ +# +# X.Org module default exclusion patterns +# The next section if for module specific patterns +# +# Do not edit the following section +# GNU Build System (Autotools) +aclocal.m4 +autom4te.cache/ +autoscan.log +ChangeLog +compile +config.guess +config.h +config.h.in +config.log +config-ml.in +config.py +config.status +config.status.lineno +config.sub +configure +configure.scan +depcomp +.deps/ +INSTALL +install-sh +.libs/ +libtool +libtool.m4 +ltmain.sh +lt~obsolete.m4 +ltoptions.m4 +ltsugar.m4 +ltversion.m4 +Makefile +Makefile.in +mdate-sh +missing +mkinstalldirs +*.pc +py-compile +stamp-h? +symlink-tree +texinfo.tex +ylwrap + +# Do not edit the following section +# Edit Compile Debug Document Distribute +*~ +*.[0-9] +*.[0-9]x +*.bak +*.bin +core +*.dll +*.exe +*-ISO*.bdf +*-JIS*.bdf +*-KOI8*.bdf +*.kld +*.ko +*.ko.cmd +*.lai +*.l[oa] +*.[oa] +*.obj +*.patch +*.so +*.pcf.gz +*.pdb +*.tar.bz2 +*.tar.gz +# +# Add & Override patterns for fontsproto +# +# Edit the following section as needed +# For example, !report.pc overrides *.pc. See 'man gitignore' +# diff --git a/fontsproto/COPYING b/fontsproto/COPYING new file mode 100644 index 0000000..eac45aa --- /dev/null +++ b/fontsproto/COPYING @@ -0,0 +1,86 @@ +Copyright 1990, 1991 Network Computing Devices; +Portions Copyright 1987 by Digital Equipment Corporation + +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 names of Network Computing Devices or Digital +not be used in advertising or publicity pertaining to distribution +of the software without specific, written prior permission. +Network Computing Devices and Digital make no representations +about the suitability of this software for any purpose. It is provided +"as is" without express or implied warranty. + +NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES +OR 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. + + +Copyright 1990, 1991, 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. + + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +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. + + +Copyright (c) 1999 The XFree86 Project Inc. + +All Rights Reserved. + +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 XFree86 Project +Inc. 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 XFree86 Project Inc.. diff --git a/fontsproto/FS.h b/fontsproto/FS.h new file mode 100644 index 0000000..605b5a8 --- /dev/null +++ b/fontsproto/FS.h @@ -0,0 +1,129 @@ +/* + * Copyright 1990, 1991 Network Computing Devices; + * Portions Copyright 1987 by Digital Equipment Corporation + * + * 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 names of Network Computing Devices or Digital + * not be used in advertising or publicity pertaining to distribution + * of the software without specific, written prior permission. + * Network Computing Devices and Digital make no representations + * about the suitability of this software for any purpose. It is provided + * "as is" without express or implied warranty. + * + * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES + * OR 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. + */ + +/* + +Portions Copyright 1987, 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. + +*/ + +#ifndef _FS_H_ +#define _FS_H_ + +#include <X11/Xdefs.h> +#include <X11/fonts/fsmasks.h> + +#define FS_PROTOCOL 2 +#define FS_PROTOCOL_MINOR 0 + +#ifndef X_PROTOCOL +/* protocol familes */ +#define FamilyInternet 0 +#define FamilyDECnet 1 +#define FamilyChaos 2 +#define FamilyInternet6 6 + + +typedef unsigned int FSDrawDirection; +#endif + +#ifndef None +#define None 0L +#endif + +#define LeftToRightDrawDirection 0 +#define RightToLeftDrawDirection 1 + +/* font info flags */ +#define FontInfoAllCharsExist (1L << 0) +#define FontInfoInkInside (1L << 1) +#define FontInfoHorizontalOverlap (1L << 2) + +/* auth status flags */ +#define AuthSuccess 0 +#define AuthContinue 1 +#define AuthBusy 2 +#define AuthDenied 3 + +/* property types */ +#define PropTypeString 0 +#define PropTypeUnsigned 1 +#define PropTypeSigned 2 + +#ifndef LSBFirst +/* byte order */ +#define LSBFirst 0 +#define MSBFirst 1 +#endif + +/* event masks */ +#define CatalogueChangeNotifyMask (1L << 0) +#define FontChangeNotifyMask (1L << 1) + +/* errors */ +#define FSSuccess -1 +#define FSBadRequest 0 +#define FSBadFormat 1 +#define FSBadFont 2 +#define FSBadRange 3 +#define FSBadEventMask 4 +#define FSBadAccessContext 5 +#define FSBadIDChoice 6 +#define FSBadName 7 +#define FSBadResolution 8 +#define FSBadAlloc 9 +#define FSBadLength 10 +#define FSBadImplementation 11 + +#define FirstExtensionError 128 +#define LastExtensionError 255 + +/* events */ +#define KeepAlive 0 +#define CatalogueChangeNotify 1 +#define FontChangeNotify 2 +#define FSLASTEvent 3 + +#endif /* _FS_H_ */ diff --git a/fontsproto/FSproto.h b/fontsproto/FSproto.h new file mode 100644 index 0000000..028156f --- /dev/null +++ b/fontsproto/FSproto.h @@ -0,0 +1,814 @@ +/* + +Copyright 1990, 1991, 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. + + * Copyright 1990, 1991 Network Computing Devices; + * Portions Copyright 1987 by Digital Equipment Corporation + * + * 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 names of Network Computing Devices, or Digital + * not be used in advertising or publicity pertaining to distribution + * of the software without specific, written prior permission. + * + * NETWORK COMPUTING DEVICES, AND DIGITAL DISCLAIM ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, + * OR 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. + */ + +#ifndef _FS_PROTO_H_ +#define _FS_PROTO_H_ + +#include <X11/fonts/FS.h> + +#define sz_fsPropOffset 20 +#define sz_fsPropInfo 8 +#define sz_fsResolution 6 + +#define sz_fsChar2b 2 +#define sz_fsChar2b_version1 2 +#define sz_fsOffset32 8 +#define sz_fsRange 4 + +#define sz_fsXCharInfo 12 +#define sz_fsXFontInfoHeader 40 + +#define sz_fsConnClientPrefix 8 +#define sz_fsConnSetup 12 +#define sz_fsConnSetupExtra 8 +#define sz_fsConnSetupAccept 12 + +/* request sizes */ +#define sz_fsReq 4 +#define sz_fsListExtensionsReq 4 +#define sz_fsResourceReq 8 + +#define sz_fsNoopReq 4 +#define sz_fsListExtensionReq 4 +#define sz_fsQueryExtensionReq 4 +#define sz_fsListCataloguesReq 12 +#define sz_fsSetCataloguesReq 4 +#define sz_fsGetCataloguesReq 4 +#define sz_fsSetEventMaskReq 8 +#define sz_fsGetEventMaskReq 4 +#define sz_fsCreateACReq 8 +#define sz_fsFreeACReq 8 +#define sz_fsSetAuthorizationReq 8 +#define sz_fsSetResolutionReq 4 +#define sz_fsGetResolutionReq 4 +#define sz_fsListFontsReq 12 +#define sz_fsListFontsWithXInfoReq 12 +#define sz_fsOpenBitmapFontReq 16 +#define sz_fsQueryXInfoReq 8 +#define sz_fsQueryXExtents8Req 12 +#define sz_fsQueryXExtents16Req 12 +#define sz_fsQueryXBitmaps8Req 16 +#define sz_fsQueryXBitmaps16Req 16 +#define sz_fsCloseReq 8 + +/* reply sizes */ +#define sz_fsReply 8 +#define sz_fsGenericReply 8 + +#define sz_fsListExtensionsReply 8 +#define sz_fsQueryExtensionReply 20 +#define sz_fsListCataloguesReply 16 +#define sz_fsGetCataloguesReply 8 +#define sz_fsGetEventMaskReply 12 +#define sz_fsCreateACReply 12 +#define sz_fsGetResolutionReply 8 +#define sz_fsListFontsReply 16 +#define sz_fsListFontsWithXInfoReply (12 + sz_fsXFontInfoHeader) +#define sz_fsOpenBitmapFontReply 16 +#define sz_fsQueryXInfoReply (8 + sz_fsXFontInfoHeader) +#define sz_fsQueryXExtents8Reply 12 +#define sz_fsQueryXExtents16Reply 12 +#define sz_fsQueryXBitmaps8Reply 20 +#define sz_fsQueryXBitmaps16Reply 20 + +#define sz_fsError 16 +#define sz_fsEvent 12 +#define sz_fsKeepAliveEvent 12 + +#define fsTrue 1 +#define fsFalse 0 + +/* temp decls */ +#define Mask CARD32 +#define Font CARD32 +#define AccContext CARD32 + +typedef CARD32 fsTimestamp; + +#ifdef NOTDEF /* in fsmasks.h */ +typedef CARD32 fsBitmapFormat; +typedef CARD32 fsBitmapFormatMask; +#endif + +#define sz_fsBitmapFormat 4 + +typedef struct { + INT16 left B16, + right B16; + INT16 width B16; + INT16 ascent B16, + descent B16; + CARD16 attributes B16; +} fsXCharInfo; + +typedef struct { + CARD8 high; + CARD8 low; +} fsChar2b; + +typedef struct { + CARD8 low; + CARD8 high; +} fsChar2b_version1; + +typedef struct { + CARD8 min_char_high; + CARD8 min_char_low; + CARD8 max_char_high; + CARD8 max_char_low; +} fsRange; + +typedef struct { + CARD32 position B32; + CARD32 length B32; +} fsOffset32; + +typedef struct { + fsOffset32 name; + fsOffset32 value; + CARD8 type; + BYTE pad0; + CARD16 pad1 B16; +} fsPropOffset; + +typedef struct { + CARD32 num_offsets B32; + CARD32 data_len B32; + /* offsets */ + /* data */ +} fsPropInfo; + +typedef struct { + CARD16 x_resolution B16; + CARD16 y_resolution B16; + CARD16 point_size B16; +} fsResolution; + + +typedef struct { + CARD32 flags B32; + CARD8 char_range_min_char_high; + CARD8 char_range_min_char_low; + CARD8 char_range_max_char_high; + CARD8 char_range_max_char_low; + + CARD8 draw_direction; + CARD8 pad; + CARD8 default_char_high; + CARD8 default_char_low; + INT16 min_bounds_left B16; + INT16 min_bounds_right B16; + + INT16 min_bounds_width B16; + INT16 min_bounds_ascent B16; + INT16 min_bounds_descent B16; + CARD16 min_bounds_attributes B16; + + INT16 max_bounds_left B16; + INT16 max_bounds_right B16; + INT16 max_bounds_width B16; + INT16 max_bounds_ascent B16; + + INT16 max_bounds_descent B16; + CARD16 max_bounds_attributes B16; + INT16 font_ascent B16; + INT16 font_descent B16; + /* propinfo */ +} fsXFontInfoHeader; + + +/* requests */ + +typedef struct { + BYTE byteOrder; + CARD8 num_auths; + CARD16 major_version B16; + CARD16 minor_version B16; + CARD16 auth_len B16; + /* auth data */ +} fsConnClientPrefix; + +typedef struct { + CARD16 status B16; + CARD16 major_version B16; + CARD16 minor_version B16; + CARD8 num_alternates; + CARD8 auth_index; + CARD16 alternate_len B16; + CARD16 auth_len B16; + /* alternates */ + /* auth data */ +} fsConnSetup; + +typedef struct { + CARD32 length B32; + CARD16 status B16; + CARD16 pad B16; + /* more auth data */ +} fsConnSetupExtra; + +typedef struct { + CARD32 length B32; + CARD16 max_request_len B16; + CARD16 vendor_len B16; + CARD32 release_number B32; + /* vendor string */ +} fsConnSetupAccept; + +typedef struct { + CARD8 reqType; + CARD8 data; + CARD16 length B16; +} fsReq; + +/* + * The fsFakeReq structure is never used in the protocol; it is prepended + * to incoming packets when setting up a connection so we can index + * through InitialVector. To avoid alignment problems, it is padded + * to the size of a word on the largest machine this code runs on. + * Hence no sz_fsFakeReq constant is necessary. + */ +typedef struct { + CARD8 reqType; + CARD8 data; + CARD16 length B16; + CARD32 pad B32; /* to fill out to multiple of 64 bits */ +} fsFakeReq; + +typedef struct { + CARD8 reqType; + BYTE pad; + CARD16 length B16; + Font id B32; +} fsResourceReq; + +typedef fsReq fsNoopReq; +typedef fsReq fsListExtensionsReq; + +typedef struct { + CARD8 reqType; + BYTE nbytes; + CARD16 length B16; + /* name */ +} fsQueryExtensionReq; + +typedef struct { + CARD8 reqType; + CARD8 data; + CARD16 length B16; + CARD32 maxNames B32; + CARD16 nbytes B16; + CARD16 pad2 B16; + /* pattern */ +} fsListCataloguesReq; + +typedef struct { + CARD8 reqType; + BYTE num_catalogues; + CARD16 length B16; + /* catalogues */ +} fsSetCataloguesReq; + +typedef fsReq fsGetCataloguesReq; + +typedef struct { + CARD8 reqType; + CARD8 ext_opcode; + CARD16 length B16; + Mask event_mask; +} fsSetEventMaskReq; + +typedef struct { + CARD8 reqType; + CARD8 ext_opcode; + CARD16 length B16; +} fsGetEventMaskReq; + +typedef struct { + CARD8 reqType; + BYTE num_auths; + CARD16 length B16; + AccContext acid B32; + /* auth protocols */ +} fsCreateACReq; + +typedef fsResourceReq fsFreeACReq; +typedef fsResourceReq fsSetAuthorizationReq; + +typedef struct { + CARD8 reqType; + BYTE num_resolutions; + CARD16 length B16; + /* resolutions */ +} fsSetResolutionReq; + +typedef fsReq fsGetResolutionReq; + +typedef struct { + CARD8 reqType; + BYTE pad; + CARD16 length B16; + CARD32 maxNames B32; + CARD16 nbytes B16; + CARD16 pad2 B16; + /* pattern */ +} fsListFontsReq; + +typedef fsListFontsReq fsListFontsWithXInfoReq; + +typedef struct { + CARD8 reqType; + BYTE pad; + CARD16 length B16; + Font fid B32; + fsBitmapFormatMask format_mask B32; + fsBitmapFormat format_hint B32; + /* pattern */ +} fsOpenBitmapFontReq; + +typedef fsResourceReq fsQueryXInfoReq; + +typedef struct { + CARD8 reqType; + BOOL range; + CARD16 length B16; + Font fid B32; + CARD32 num_ranges B32; + /* list of chars */ +} fsQueryXExtents8Req; + +typedef fsQueryXExtents8Req fsQueryXExtents16Req; + +typedef struct { + CARD8 reqType; + BOOL range; + CARD16 length B16; + Font fid B32; + fsBitmapFormat format B32; + CARD32 num_ranges B32; + /* list of chars */ +} fsQueryXBitmaps8Req; + +typedef fsQueryXBitmaps8Req fsQueryXBitmaps16Req; + +typedef fsResourceReq fsCloseReq; + + +/* replies */ +typedef struct { + BYTE type; + BYTE data1; + CARD16 sequenceNumber B16; + CARD32 length B32; +} fsGenericReply; + +typedef struct { + BYTE type; + CARD8 nExtensions; + CARD16 sequenceNumber B16; + CARD32 length B32; + /* extension names */ +} fsListExtensionsReply; + +typedef struct { + BYTE type; + CARD8 present; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 major_version B16; + CARD16 minor_version B16; + CARD8 major_opcode; + CARD8 first_event; + CARD8 num_events; + CARD8 first_error; + CARD8 num_errors; + CARD8 pad1; + CARD16 pad2 B16; +} fsQueryExtensionReply; + +typedef struct { + BYTE type; + BYTE pad; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 num_replies B32; + CARD32 num_catalogues B32; + /* catalog names */ +} fsListCataloguesReply; + +typedef struct { + BYTE type; + CARD8 num_catalogues; + CARD16 sequenceNumber B16; + CARD32 length B32; + /* catalogue names */ +} fsGetCataloguesReply; + +typedef struct { + BYTE type; + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 event_mask B32; +} fsGetEventMaskReply; + +typedef struct { + BYTE type; + CARD8 auth_index; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 status B16; + CARD16 pad B16; + /* auth data */ +} fsCreateACReply; + +typedef struct { + CARD32 length B32; + CARD16 status B16; + CARD16 pad B16; + /* auth data */ +} fsCreateACExtraReply; + +typedef struct { + BYTE type; + CARD8 num_resolutions; + CARD16 sequenceNumber B16; + CARD32 length B32; + /* resolutions */ +} fsGetResolutionReply; + +typedef struct { + BYTE type; + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 following B32; + CARD32 nFonts B32; + /* font names */ +} fsListFontsReply; + +/* + * this one is messy. the reply itself is variable length (unknown + * number of replies) and the contents of each is variable (unknown + * number of properties) + * + */ + +typedef struct { + BYTE type; + CARD8 nameLength; /* 0 is end-of-reply */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 nReplies B32; + CARD32 font_header_flags B32; + CARD8 font_hdr_char_range_min_char_high; + CARD8 font_hdr_char_range_min_char_low; + CARD8 font_hdr_char_range_max_char_high; + CARD8 font_hdr_char_range_max_char_low; + CARD8 font_header_draw_direction; + CARD8 font_header_pad; + CARD8 font_header_default_char_high; + CARD8 font_header_default_char_low; + INT16 font_header_min_bounds_left B16; + INT16 font_header_min_bounds_right B16; + INT16 font_header_min_bounds_width B16; + INT16 font_header_min_bounds_ascent B16; + INT16 font_header_min_bounds_descent B16; + CARD16 font_header_min_bounds_attributes B16; + INT16 font_header_max_bounds_left B16; + INT16 font_header_max_bounds_right B16; + INT16 font_header_max_bounds_width B16; + INT16 font_header_max_bounds_ascent B16; + INT16 font_header_max_bounds_descent B16; + CARD16 font_header_max_bounds_attributes B16; + INT16 font_header_font_ascent B16; + INT16 font_header_font_descent B16; + /* propinfo */ + /* name */ +} fsListFontsWithXInfoReply; + +typedef struct { + BYTE type; + CARD8 otherid_valid; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 otherid B32; + BYTE cachable; + BYTE pad1; + CARD16 pad2 B16; +} fsOpenBitmapFontReply; + +typedef struct { + BYTE type; + CARD8 pad0; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 font_header_flags B32; + CARD8 font_hdr_char_range_min_char_high; + CARD8 font_hdr_char_range_min_char_low; + CARD8 font_hdr_char_range_max_char_high; + CARD8 font_hdr_char_range_max_char_low; + CARD8 font_header_draw_direction; + CARD8 font_header_pad; + CARD8 font_header_default_char_high; + CARD8 font_header_default_char_low; + INT16 font_header_min_bounds_left B16; + INT16 font_header_min_bounds_right B16; + INT16 font_header_min_bounds_width B16; + INT16 font_header_min_bounds_ascent B16; + INT16 font_header_min_bounds_descent B16; + CARD16 font_header_min_bounds_attributes B16; + INT16 font_header_max_bounds_left B16; + INT16 font_header_max_bounds_right B16; + INT16 font_header_max_bounds_width B16; + INT16 font_header_max_bounds_ascent B16; + INT16 font_header_max_bounds_descent B16; + CARD16 font_header_max_bounds_attributes B16; + INT16 font_header_font_ascent B16; + INT16 font_header_font_descent B16; + /* propinfo */ +} fsQueryXInfoReply; + +typedef struct { + BYTE type; + CARD8 pad0; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 num_extents B32; + /* extents */ +} fsQueryXExtents8Reply; + +typedef fsQueryXExtents8Reply fsQueryXExtents16Reply; + +typedef struct { + BYTE type; + CARD8 pad0; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 replies_hint B32; + CARD32 num_chars B32; + CARD32 nbytes B32; + /* offsets */ + /* glyphs */ +} fsQueryXBitmaps8Reply; + +typedef fsQueryXBitmaps8Reply fsQueryXBitmaps16Reply; + +typedef union { + fsGenericReply generic; + fsListExtensionsReply extensions; + fsGetResolutionReply getres; +} fsReply; + +/* errors */ +typedef struct { + BYTE type; + BYTE request; + CARD16 sequenceNumber B16; + CARD32 length B32; + fsTimestamp timestamp; + CARD8 major_opcode; + CARD8 minor_opcode; + CARD16 pad B16; +} fsError; + +typedef struct { + BYTE type; + BYTE request; + CARD16 sequenceNumber B16; + CARD32 length B32; + fsTimestamp timestamp; + CARD8 major_opcode; + CARD8 minor_opcode; + CARD16 pad B16; +} fsRequestError; + +typedef struct { + BYTE type; + BYTE request; + CARD16 sequenceNumber B16; + CARD32 length B32; + fsTimestamp timestamp; + CARD8 major_opcode; + CARD8 minor_opcode; + CARD16 pad B16; + fsBitmapFormat format B32; +} fsFormatError; + +typedef struct { + BYTE type; + BYTE request; + CARD16 sequenceNumber B16; + CARD32 length B32; + fsTimestamp timestamp; + CARD8 major_opcode; + CARD8 minor_opcode; + CARD16 pad B16; + Font fontid; +} fsFontError; + +typedef struct { + BYTE type; + BYTE request; + CARD16 sequenceNumber B16; + CARD32 length B32; + fsTimestamp timestamp; + CARD8 major_opcode; + CARD8 minor_opcode; + CARD16 pad B16; + fsRange range; +} fsRangeError; + +typedef struct { + BYTE type; + BYTE request; + CARD16 sequenceNumber B16; + CARD32 length B32; + fsTimestamp timestamp; + CARD8 major_opcode; + CARD8 minor_opcode; + CARD16 pad B16; + Mask event_mask; +} fsEventMaskError; + +typedef struct { + BYTE type; + BYTE request; + CARD16 sequenceNumber B16; + CARD32 length B32; + fsTimestamp timestamp; + CARD8 major_opcode; + CARD8 minor_opcode; + CARD16 pad B16; + AccContext acid; +} fsAccessContextError; + +typedef struct { + BYTE type; + BYTE request; + CARD16 sequenceNumber B16; + CARD32 length B32; + fsTimestamp timestamp; + CARD8 major_opcode; + CARD8 minor_opcode; + CARD16 pad B16; + Font fontid; +} fsIDChoiceError; + +typedef struct { + BYTE type; + BYTE request; + CARD16 sequenceNumber B16; + CARD32 length B32; + fsTimestamp timestamp; + CARD8 major_opcode; + CARD8 minor_opcode; + CARD16 pad B16; +} fsNameError; + +typedef struct { + BYTE type; + BYTE request; + CARD16 sequenceNumber B16; + CARD32 length B32; + fsTimestamp timestamp; + CARD8 major_opcode; + CARD8 minor_opcode; + fsResolution resolution; +} fsResolutionError; + +typedef struct { + BYTE type; + BYTE request; + CARD16 sequenceNumber B16; + CARD32 length B32; + fsTimestamp timestamp; + CARD8 major_opcode; + CARD8 minor_opcode; + CARD16 pad B16; +} fsAllocError; + +typedef struct { + BYTE type; + BYTE request; + CARD16 sequenceNumber B16; + CARD32 length B32; + fsTimestamp timestamp; + CARD8 major_opcode; + CARD8 minor_opcode; + CARD16 pad B16; + CARD32 bad_length B32; +} fsLengthError; + +typedef struct { + BYTE type; + BYTE request; + CARD16 sequenceNumber B16; + CARD32 length B32; + fsTimestamp timestamp; + CARD8 major_opcode; + CARD8 minor_opcode; + CARD16 pad B16; +} fsImplementationError; + +/* events */ +typedef struct { + BYTE type; + BYTE event_code; + CARD16 sequenceNumber B16; + CARD32 length B32; + fsTimestamp timestamp; +} fsKeepAliveEvent; + +typedef struct { + BYTE type; + BYTE event_code; + CARD16 sequenceNumber B16; + CARD32 length B32; + fsTimestamp timestamp; + BOOL added; + BOOL deleted; + CARD16 pad B16; +} fsCatalogueChangeNotifyEvent; + +typedef fsCatalogueChangeNotifyEvent fsFontChangeNotifyEvent; + +typedef fsCatalogueChangeNotifyEvent fsEvent; + +/* reply codes */ +#define FS_Reply 0 /* normal reply */ +#define FS_Error 1 /* error */ +#define FS_Event 2 + +/* request codes */ +#define FS_Noop 0 +#define FS_ListExtensions 1 +#define FS_QueryExtension 2 +#define FS_ListCatalogues 3 +#define FS_SetCatalogues 4 +#define FS_GetCatalogues 5 +#define FS_SetEventMask 6 +#define FS_GetEventMask 7 +#define FS_CreateAC 8 +#define FS_FreeAC 9 +#define FS_SetAuthorization 10 +#define FS_SetResolution 11 +#define FS_GetResolution 12 +#define FS_ListFonts 13 +#define FS_ListFontsWithXInfo 14 +#define FS_OpenBitmapFont 15 +#define FS_QueryXInfo 16 +#define FS_QueryXExtents8 17 +#define FS_QueryXExtents16 18 +#define FS_QueryXBitmaps8 19 +#define FS_QueryXBitmaps16 20 +#define FS_CloseFont 21 + +/* restore decls */ +#undef Mask +#undef Font +#undef AccContext + +#endif /* _FS_PROTO_H_ */ diff --git a/fontsproto/Makefile.am b/fontsproto/Makefile.am new file mode 100644 index 0000000..c1ff54a --- /dev/null +++ b/fontsproto/Makefile.am @@ -0,0 +1,24 @@ +fontsdir = $(includedir)/X11/fonts +fonts_HEADERS = \ + font.h \ + fontproto.h \ + fontstruct.h \ + FS.h \ + fsmasks.h \ + FSproto.h + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = fontsproto.pc + + +MAINTAINERCLEANFILES = ChangeLog INSTALL + +.PHONY: ChangeLog INSTALL + +INSTALL: + $(INSTALL_CMD) + +ChangeLog: + $(CHANGELOG_CMD) + +dist-hook: ChangeLog INSTALL diff --git a/fontsproto/README b/fontsproto/README new file mode 100644 index 0000000..0f8ba55 --- /dev/null +++ b/fontsproto/README @@ -0,0 +1,25 @@ + X Fonts Extension + +All questions regarding this software should be directed at the +Xorg mailing list: + + http://lists.freedesktop.org/mailman/listinfo/xorg + +Please submit bug reports to the Xorg bugzilla: + + https://bugs.freedesktop.org/enter_bug.cgi?product=xorg + +The master development code repository can be found at: + + git://anongit.freedesktop.org/git/xorg/proto/fontsproto + + http://cgit.freedesktop.org/xorg/proto/fontsproto + +For patch submission instructions, see: + + http://www.x.org/wiki/Development/Documentation/SubmittingPatches + +For more information on the git code manager, see: + + http://wiki.x.org/wiki/GitPage + diff --git a/fontsproto/autogen.sh b/fontsproto/autogen.sh new file mode 100755 index 0000000..904cd67 --- /dev/null +++ b/fontsproto/autogen.sh @@ -0,0 +1,12 @@ +#! /bin/sh + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +ORIGDIR=`pwd` +cd $srcdir + +autoreconf -v --install || exit 1 +cd $ORIGDIR || exit $? + +$srcdir/configure --enable-maintainer-mode "$@" diff --git a/fontsproto/configure.ac b/fontsproto/configure.ac new file mode 100644 index 0000000..0bee874 --- /dev/null +++ b/fontsproto/configure.ac @@ -0,0 +1,13 @@ +AC_PREREQ([2.60]) +AC_INIT([FontsProto], [2.1.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg]) +AM_INIT_AUTOMAKE([foreign dist-bzip2]) +AM_MAINTAINER_MODE + +# Require xorg-macros: XORG_DEFAULT_OPTIONS +m4_ifndef([XORG_MACROS_VERSION], + [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.3) +XORG_DEFAULT_OPTIONS + +AC_OUTPUT([Makefile + fontsproto.pc]) diff --git a/fontsproto/font.h b/fontsproto/font.h new file mode 100644 index 0000000..b71046b --- /dev/null +++ b/fontsproto/font.h @@ -0,0 +1,166 @@ +/*********************************************************** +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +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. + +******************************************************************/ + +#ifndef FONT_H +#define FONT_H + +#ifndef BitmapFormatByteOrderMask +#include "fsmasks.h" +#endif + +/* data structures */ +#ifndef _XTYPEDEF_FONTPTR +typedef struct _Font *FontPtr; +#define _XTYPEDEF_FONTPTR +#endif + +typedef struct _FontInfo *FontInfoPtr; +typedef struct _FontProp *FontPropPtr; +typedef struct _ExtentInfo *ExtentInfoPtr; +typedef struct _FontPathElement *FontPathElementPtr; + +#ifndef _XTYPEDEF_CHARINFOPTR +typedef struct _CharInfo *CharInfoPtr; +#define _XTYPEDEF_CHARINFOPTR +#endif + +typedef struct _FontNames *FontNamesPtr; +typedef struct _FontResolution *FontResolutionPtr; + +#define NullCharInfo ((CharInfoPtr) 0) +#define NullFont ((FontPtr) 0) +#define NullFontInfo ((FontInfoPtr) 0) + + /* draw direction */ +#define LeftToRight 0 +#define RightToLeft 1 +#define BottomToTop 2 +#define TopToBottom 3 +typedef int DrawDirection; + +#define NO_SUCH_CHAR -1 + + +#define FontAliasType 0x1000 + +#define AllocError 80 +#define StillWorking 81 +#define FontNameAlias 82 +#define BadFontName 83 +#define Suspended 84 +#define Successful 85 +#define BadFontPath 86 +#define BadCharRange 87 +#define BadFontFormat 88 +#define FPEResetFailed 89 /* for when an FPE reset won't work */ + +/* OpenFont flags */ +#define FontLoadInfo 0x0001 +#define FontLoadProps 0x0002 +#define FontLoadMetrics 0x0004 +#define FontLoadBitmaps 0x0008 +#define FontLoadAll 0x000f +#define FontOpenSync 0x0010 +#define FontReopen 0x0020 + +/* Query flags */ +#define LoadAll 0x1 +#define FinishRamge 0x2 +#define EightBitFont 0x4 +#define SixteenBitFont 0x8 + +/* Glyph Caching Modes */ +#define CACHING_OFF 0 +#define CACHE_16_BIT_GLYPHS 1 +#define CACHE_ALL_GLYPHS 2 +#define DEFAULT_GLYPH_CACHING_MODE CACHE_16_BIT_GLYPHS +extern int glyphCachingMode; + +struct _Client; + +extern int StartListFontsWithInfo( + struct _Client * /*client*/, + int /*length*/, + unsigned char * /*pattern*/, + int /*max_names*/ +); + +extern FontNamesPtr MakeFontNamesRecord( + unsigned /* size */ +); + +extern void FreeFontNames( + FontNamesPtr /* pFN*/ +); + +extern int AddFontNamesName( + FontNamesPtr /* names */, + char * /* name */, + int /* length */ +); + +#if 0 /* unused */ +extern int FontToFSError(); +extern FontResolutionPtr GetClientResolution(); +#endif + +typedef struct _FontPatternCache *FontPatternCachePtr; + +extern FontPatternCachePtr MakeFontPatternCache ( + void +); + +extern void FreeFontPatternCache ( + FontPatternCachePtr /* cache */ +); + +extern void EmptyFontPatternCache ( + FontPatternCachePtr /* cache */ +); + +extern void CacheFontPattern ( + FontPatternCachePtr /* cache */, + char * /* pattern */, + int /* patlen */, + FontPtr /* pFont */ +); +extern FontResolutionPtr GetClientResolutions( + int * /* num */ +); + +extern FontPtr FindCachedFontPattern ( + FontPatternCachePtr /* cache */, + char * /* pattern */, + int /* patlen */ +); + +extern void RemoveCachedFontPattern ( + FontPatternCachePtr /* cache */, + FontPtr /* pFont */ +); + +typedef enum { + Linear8Bit, TwoD8Bit, Linear16Bit, TwoD16Bit +} FontEncoding; + +#endif /* FONT_H */ diff --git a/fontsproto/fontproto.h b/fontsproto/fontproto.h new file mode 100644 index 0000000..1ab8f37 --- /dev/null +++ b/fontsproto/fontproto.h @@ -0,0 +1,91 @@ +/*********************************************************** + +Copyright (c) 1999 The XFree86 Project Inc. + +All Rights Reserved. + +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 XFree86 Project +Inc. 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 XFree86 Project Inc.. + +*/ +#ifndef _FONTPROTO_H +#define _FONTPROTO_H + +/* Externally provided functions required by libXfont */ + +extern int RegisterFPEFunctions ( NameCheckFunc name_func, + InitFpeFunc init_func, + FreeFpeFunc free_func, + ResetFpeFunc reset_func, + OpenFontFunc open_func, + CloseFontFunc close_func, + ListFontsFunc list_func, + StartLfwiFunc start_lfwi_func, + NextLfwiFunc next_lfwi_func, + WakeupFpeFunc wakeup_func, + ClientDiedFunc client_died, + LoadGlyphsFunc load_glyphs, + StartLaFunc start_list_alias_func, + NextLaFunc next_list_alias_func, + SetPathFunc set_path_func); + +extern int GetDefaultPointSize ( void ); + +extern int init_fs_handlers ( FontPathElementPtr fpe, + BlockHandlerProcPtr block_handler); +extern void remove_fs_handlers ( FontPathElementPtr fpe, + BlockHandlerProcPtr block_handler, + Bool all ); + +extern int client_auth_generation ( ClientPtr client ); + +#ifndef ___CLIENTSIGNAL_DEFINED___ +#define ___CLIENTSIGNAL_DEFINED___ +extern Bool ClientSignal ( ClientPtr client ); +#endif /* ___CLIENTSIGNAL_DEFINED___ */ + +extern void DeleteFontClientID ( Font id ); +extern Font GetNewFontClientID ( void ); +extern int StoreFontClientFont ( FontPtr pfont, Font id ); +extern void FontFileRegisterFpeFunctions ( void ); +extern void FontFileCheckRegisterFpeFunctions ( void ); + +extern Bool XpClientIsBitmapClient ( ClientPtr client ); +extern Bool XpClientIsPrintClient( ClientPtr client, FontPathElementPtr fpe ); +extern void PrinterFontRegisterFpeFunctions ( void ); + +extern void fs_register_fpe_functions ( void ); +extern void check_fs_register_fpe_functions ( void ); + +/* util/private.c */ +extern FontPtr CreateFontRec (void); +extern void DestroyFontRec (FontPtr font); +extern Bool _FontSetNewPrivate (FontPtr /* pFont */, + int /* n */, + pointer /* ptr */); +extern int AllocateFontPrivateIndex (void); +extern void ResetFontPrivateIndex (void); + +/* Type1/t1funcs.c */ +extern void Type1RegisterFontFileFunctions(void); +extern void CIDRegisterFontFileFunctions(void); + +/* Speedo/spfuncs.c */ +extern void SpeedoRegisterFontFileFunctions(void); + +/* FreeType/ftfuncs.c */ +extern void FreeTypeRegisterFontFileFunctions(void); + +#endif diff --git a/fontsproto/fontsproto.pc.in b/fontsproto/fontsproto.pc.in new file mode 100644 index 0000000..b7db169 --- /dev/null +++ b/fontsproto/fontsproto.pc.in @@ -0,0 +1,9 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: FontsProto +Description: Fonts extension headers +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} diff --git a/fontsproto/fontstruct.h b/fontsproto/fontstruct.h new file mode 100644 index 0000000..97e771a --- /dev/null +++ b/fontsproto/fontstruct.h @@ -0,0 +1,293 @@ +/*********************************************************** +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +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. + +******************************************************************/ + +#ifndef FONTSTR_H +#define FONTSTR_H + +#include <X11/Xproto.h> +#include "font.h" +#include <X11/Xfuncproto.h> +#include <X11/Xdefs.h> + +/* + * This version of the server font data strucutre is only for describing + * the in memory data structure. The file structure is not necessarily a + * copy of this. That is up to the compiler and the OS layer font loading + * machinery. + */ + +#define GLYPHPADOPTIONS 4 /* 1, 2, 4, or 8 */ + +typedef struct _FontProp { + long name; + long value; /* assumes ATOM is not larger than INT32 */ +} FontPropRec; + +typedef struct _FontResolution { + unsigned short x_resolution; + unsigned short y_resolution; + unsigned short point_size; +} FontResolutionRec; + +typedef struct _ExtentInfo { + DrawDirection drawDirection; + int fontAscent; + int fontDescent; + int overallAscent; + int overallDescent; + int overallWidth; + int overallLeft; + int overallRight; +} ExtentInfoRec; + +typedef struct _CharInfo { + xCharInfo metrics; /* info preformatted for Queries */ + char *bits; /* pointer to glyph image */ +} CharInfoRec; + +/* + * Font is created at font load time. It is specific to a single encoding. + * e.g. not all of the glyphs in a font may be part of a single encoding. + */ + +typedef struct _FontInfo { + unsigned short firstCol; + unsigned short lastCol; + unsigned short firstRow; + unsigned short lastRow; + unsigned short defaultCh; + unsigned int noOverlap:1; + unsigned int terminalFont:1; + unsigned int constantMetrics:1; + unsigned int constantWidth:1; + unsigned int inkInside:1; + unsigned int inkMetrics:1; + unsigned int allExist:1; + unsigned int drawDirection:2; + unsigned int cachable:1; + unsigned int anamorphic:1; + short maxOverlap; + short pad; + xCharInfo maxbounds; + xCharInfo minbounds; + xCharInfo ink_maxbounds; + xCharInfo ink_minbounds; + short fontAscent; + short fontDescent; + int nprops; + FontPropPtr props; + char *isStringProp; +} FontInfoRec; + +typedef struct _Font { + int refcnt; + FontInfoRec info; + char bit; + char byte; + char glyph; + char scan; + fsBitmapFormat format; + int (*get_glyphs) (FontPtr /* font */, + unsigned long /* count */, + unsigned char * /* chars */, + FontEncoding /* encoding */, + unsigned long * /* count */, + CharInfoPtr * /* glyphs */); + int (*get_metrics) (FontPtr /* font */, + unsigned long /* count */, + unsigned char * /* chars */, + FontEncoding /* encoding */, + unsigned long * /* count */, + xCharInfo ** /* glyphs */); + void (*unload_font) (FontPtr /* font */); + void (*unload_glyphs) (FontPtr /* font */); + FontPathElementPtr fpe; + pointer svrPrivate; + pointer fontPrivate; + pointer fpePrivate; + int maxPrivate; + pointer *devPrivates; +} FontRec; + +#define FontGetPrivate(pFont,n) ((n) > (pFont)->maxPrivate ? (pointer) 0 : \ + (pFont)->devPrivates[n]) + +#define FontSetPrivate(pFont,n,ptr) ((n) > (pFont)->maxPrivate ? \ + _FontSetNewPrivate (pFont, n, ptr) : \ + ((((pFont)->devPrivates[n] = (ptr)) != 0) || TRUE)) + +typedef struct _FontNames { + int nnames; + int size; + int *length; + char **names; +} FontNamesRec; + +/* External view of font paths */ +typedef struct _FontPathElement { + int name_length; + char *name; + int type; + int refcount; + pointer private; +} FontPathElementRec; + +typedef Bool (*NameCheckFunc) (char *name); +typedef int (*InitFpeFunc) (FontPathElementPtr fpe); +typedef int (*FreeFpeFunc) (FontPathElementPtr fpe); +typedef int (*ResetFpeFunc) (FontPathElementPtr fpe); +typedef int (*OpenFontFunc) ( pointer client, + FontPathElementPtr fpe, + Mask flags, + char* name, + int namelen, + fsBitmapFormat format, + fsBitmapFormatMask fmask, + XID id, + FontPtr* pFont, + char** aliasName, + FontPtr non_cachable_font); +typedef void (*CloseFontFunc) (FontPathElementPtr fpe, FontPtr pFont); +typedef int (*ListFontsFunc) (pointer client, + FontPathElementPtr fpe, + char* pat, + int len, + int max, + FontNamesPtr names); + +typedef int (*StartLfwiFunc) (pointer client, + FontPathElementPtr fpe, + char* pat, + int len, + int max, + pointer* privatep); + +typedef int (*NextLfwiFunc) (pointer client, + FontPathElementPtr fpe, + char** name, + int* namelen, + FontInfoPtr* info, + int* numFonts, + pointer private); + +typedef int (*WakeupFpeFunc) (FontPathElementPtr fpe, + unsigned long* LastSelectMask); + +typedef void (*ClientDiedFunc) (pointer client, + FontPathElementPtr fpe); + +typedef int (*LoadGlyphsFunc) (pointer client, + FontPtr pfont, + Bool range_flag, + unsigned int nchars, + int item_size, + unsigned char* data); + +typedef int (*StartLaFunc) (pointer client, + FontPathElementPtr fpe, + char* pat, + int len, + int max, + pointer* privatep); + +typedef int (*NextLaFunc) (pointer client, + FontPathElementPtr fpe, + char** namep, + int* namelenp, + char** resolvedp, + int* resolvedlenp, + pointer private); + +typedef void (*SetPathFunc)(void); + +typedef struct _FPEFunctions { + NameCheckFunc name_check; + InitFpeFunc init_fpe; + ResetFpeFunc reset_fpe; + FreeFpeFunc free_fpe; + OpenFontFunc open_font; + CloseFontFunc close_font; + ListFontsFunc list_fonts; + StartLaFunc start_list_fonts_and_aliases; + NextLaFunc list_next_font_or_alias; + StartLfwiFunc start_list_fonts_with_info; + NextLfwiFunc list_next_font_with_info; + WakeupFpeFunc wakeup_fpe; + ClientDiedFunc client_died; + /* for load_glyphs, range_flag = 0 -> + nchars = # of characters in data + item_size = bytes/char + data = list of characters + range_flag = 1 -> + nchars = # of fsChar2b's in data + item_size is ignored + data = list of fsChar2b's */ + LoadGlyphsFunc load_glyphs; + SetPathFunc set_path_hook; +} FPEFunctionsRec, FPEFunctions; + +/* + * Various macros for computing values based on contents of + * the above structures + */ + +#define GLYPHWIDTHPIXELS(pci) \ + ((pci)->metrics.rightSideBearing - (pci)->metrics.leftSideBearing) + +#define GLYPHHEIGHTPIXELS(pci) \ + ((pci)->metrics.ascent + (pci)->metrics.descent) + +#define GLYPHWIDTHBYTES(pci) (((GLYPHWIDTHPIXELS(pci))+7) >> 3) + +#define GLYPHWIDTHPADDED(bc) (((bc)+7) & ~0x7) + +#define BYTES_PER_ROW(bits, nbytes) \ + ((nbytes) == 1 ? (((bits)+7)>>3) /* pad to 1 byte */ \ + :(nbytes) == 2 ? ((((bits)+15)>>3)&~1) /* pad to 2 bytes */ \ + :(nbytes) == 4 ? ((((bits)+31)>>3)&~3) /* pad to 4 bytes */ \ + :(nbytes) == 8 ? ((((bits)+63)>>3)&~7) /* pad to 8 bytes */ \ + : 0) + +#define BYTES_FOR_GLYPH(ci,pad) (GLYPHHEIGHTPIXELS(ci) * \ + BYTES_PER_ROW(GLYPHWIDTHPIXELS(ci),pad)) +/* + * Macros for computing different bounding boxes for fonts; from + * the font protocol + */ + +#define FONT_MAX_ASCENT(pi) ((pi)->fontAscent > (pi)->ink_maxbounds.ascent ? \ + (pi)->fontAscent : (pi)->ink_maxbounds.ascent) +#define FONT_MAX_DESCENT(pi) ((pi)->fontDescent > (pi)->ink_maxbounds.descent ? \ + (pi)->fontDescent : (pi)->ink_maxbounds.descent) +#define FONT_MAX_HEIGHT(pi) (FONT_MAX_ASCENT(pi) + FONT_MAX_DESCENT(pi)) +#define FONT_MIN_LEFT(pi) ((pi)->ink_minbounds.leftSideBearing < 0 ? \ + (pi)->ink_minbounds.leftSideBearing : 0) +#define FONT_MAX_RIGHT(pi) ((pi)->ink_maxbounds.rightSideBearing > \ + (pi)->ink_maxbounds.characterWidth ? \ + (pi)->ink_maxbounds.rightSideBearing : \ + (pi)->ink_maxbounds.characterWidth) +#define FONT_MAX_WIDTH(pi) (FONT_MAX_RIGHT(pi) - FONT_MIN_LEFT(pi)) + +#include "fontproto.h" + +#endif /* FONTSTR_H */ diff --git a/fontsproto/fsmasks.h b/fontsproto/fsmasks.h new file mode 100644 index 0000000..c86be83 --- /dev/null +++ b/fontsproto/fsmasks.h @@ -0,0 +1,97 @@ +/* + * Copyright 1990, 1991 Network Computing Devices; + * Portions Copyright 1987 by Digital Equipment Corporation + * + * 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 names of Network Computing Devices or Digital + * not be used in advertising or publicity pertaining to distribution + * of the software without specific, written prior permission. + * Network Computing Devices and Digital make no representations + * about the suitability of this software for any purpose. It is provided + * "as is" without express or implied warranty. + * + * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES + * OR 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. + */ + +/* + +Portions Copyright 1987, 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. + +*/ + + +/* + * masks & values used by the font lib and the font server + */ + +#ifndef _FSMASKS_H_ +#define _FSMASKS_H_ + +#include <X11/Xmd.h> + +/* font format macros */ +#define BitmapFormatByteOrderMask (1L << 0) +#define BitmapFormatBitOrderMask (1L << 1) +#define BitmapFormatImageRectMask (3L << 2) +#define BitmapFormatScanlinePadMask (3L << 8) +#define BitmapFormatScanlineUnitMask (3L << 12) + +#define BitmapFormatByteOrderLSB (0) +#define BitmapFormatByteOrderMSB (1L << 0) +#define BitmapFormatBitOrderLSB (0) +#define BitmapFormatBitOrderMSB (1L << 1) + +#define BitmapFormatImageRectMin (0L << 2) +#define BitmapFormatImageRectMaxWidth (1L << 2) +#define BitmapFormatImageRectMax (2L << 2) + +#define BitmapFormatScanlinePad8 (0L << 8) +#define BitmapFormatScanlinePad16 (1L << 8) +#define BitmapFormatScanlinePad32 (2L << 8) +#define BitmapFormatScanlinePad64 (3L << 8) + +#define BitmapFormatScanlineUnit8 (0L << 12) +#define BitmapFormatScanlineUnit16 (1L << 12) +#define BitmapFormatScanlineUnit32 (2L << 12) +#define BitmapFormatScanlineUnit64 (3L << 12) + +#define BitmapFormatMaskByte (1L << 0) +#define BitmapFormatMaskBit (1L << 1) +#define BitmapFormatMaskImageRectangle (1L << 2) +#define BitmapFormatMaskScanLinePad (1L << 3) +#define BitmapFormatMaskScanLineUnit (1L << 4) + +typedef CARD32 fsBitmapFormat; +typedef CARD32 fsBitmapFormatMask; + +#endif /* _FSMASKS_H_ */ diff --git a/glproto/.gitignore b/glproto/.gitignore new file mode 100644 index 0000000..8582544 --- /dev/null +++ b/glproto/.gitignore @@ -0,0 +1,78 @@ +# +# X.Org module default exclusion patterns +# The next section if for module specific patterns +# +# Do not edit the following section +# GNU Build System (Autotools) +aclocal.m4 +autom4te.cache/ +autoscan.log +ChangeLog +compile +config.guess +config.h +config.h.in +config.log +config-ml.in +config.py +config.status +config.status.lineno +config.sub +configure +configure.scan +depcomp +.deps/ +INSTALL +install-sh +.libs/ +libtool +libtool.m4 +ltmain.sh +lt~obsolete.m4 +ltoptions.m4 +ltsugar.m4 +ltversion.m4 +Makefile +Makefile.in +mdate-sh +missing +mkinstalldirs +*.pc +py-compile +stamp-h? +symlink-tree +texinfo.tex +ylwrap + +# Do not edit the following section +# Edit Compile Debug Document Distribute +*~ +*.[0-9] +*.[0-9]x +*.bak +*.bin +core +*.dll +*.exe +*-ISO*.bdf +*-JIS*.bdf +*-KOI8*.bdf +*.kld +*.ko +*.ko.cmd +*.lai +*.l[oa] +*.[oa] +*.obj +*.patch +*.so +*.pcf.gz +*.pdb +*.tar.bz2 +*.tar.gz +# +# Add & Override patterns for glproto +# +# Edit the following section as needed +# For example, !report.pc overrides *.pc. See 'man gitignore' +# diff --git a/glproto/COPYING b/glproto/COPYING new file mode 100644 index 0000000..78b6de4 --- /dev/null +++ b/glproto/COPYING @@ -0,0 +1,27 @@ +SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) +Copyright (C) 1991-2000 Silicon Graphics, 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, 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 including the dates of first publication and +either this permission notice or a reference to +http://oss.sgi.com/projects/FreeB/ +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 +SILICON GRAPHICS, INC. 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 Silicon Graphics, Inc. +shall not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization from +Silicon Graphics, Inc. diff --git a/glproto/Makefile.am b/glproto/Makefile.am new file mode 100644 index 0000000..40cb57c --- /dev/null +++ b/glproto/Makefile.am @@ -0,0 +1,26 @@ +gldir = $(includedir)/GL +gl_HEADERS = \ + glxint.h \ + glxmd.h \ + glxproto.h \ + glxtokens.h + +glinternaldir = $(includedir)/GL/internal +glinternal_HEADERS = \ + glcore.h + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = glproto.pc + + +MAINTAINERCLEANFILES = ChangeLog INSTALL + +.PHONY: ChangeLog INSTALL + +INSTALL: + $(INSTALL_CMD) + +ChangeLog: + $(CHANGELOG_CMD) + +dist-hook: ChangeLog INSTALL diff --git a/glproto/README b/glproto/README new file mode 100644 index 0000000..16c59cb --- /dev/null +++ b/glproto/README @@ -0,0 +1,30 @@ + OpenGL Extension to the X Window System + +This extension defines a protocol for the client to send 3D rendering +commands to the X server. + +Extension name: GLX + +All questions regarding this software should be directed at the +Xorg mailing list: + + http://lists.freedesktop.org/mailman/listinfo/xorg + +Please submit bug reports to the Xorg bugzilla: + + https://bugs.freedesktop.org/enter_bug.cgi?product=xorg + +The master development code repository can be found at: + + git://anongit.freedesktop.org/git/xorg/proto/glproto + + http://cgit.freedesktop.org/xorg/proto/glproto + +For patch submission instructions, see: + + http://www.x.org/wiki/Development/Documentation/SubmittingPatches + +For more information on the git code manager, see: + + http://wiki.x.org/wiki/GitPage + diff --git a/glproto/autogen.sh b/glproto/autogen.sh new file mode 100755 index 0000000..904cd67 --- /dev/null +++ b/glproto/autogen.sh @@ -0,0 +1,12 @@ +#! /bin/sh + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +ORIGDIR=`pwd` +cd $srcdir + +autoreconf -v --install || exit 1 +cd $ORIGDIR || exit $? + +$srcdir/configure --enable-maintainer-mode "$@" diff --git a/glproto/configure.ac b/glproto/configure.ac new file mode 100644 index 0000000..5160edb --- /dev/null +++ b/glproto/configure.ac @@ -0,0 +1,13 @@ +AC_PREREQ([2.60]) +AC_INIT([GLProto], [1.4.11], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg]) +AM_INIT_AUTOMAKE([foreign dist-bzip2]) +AM_MAINTAINER_MODE + +# Require xorg-macros: XORG_DEFAULT_OPTIONS +m4_ifndef([XORG_MACROS_VERSION], + [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.3) +XORG_DEFAULT_OPTIONS + +AC_OUTPUT([Makefile + glproto.pc]) diff --git a/glproto/glcore.h b/glproto/glcore.h new file mode 100644 index 0000000..547b111 --- /dev/null +++ b/glproto/glcore.h @@ -0,0 +1,181 @@ +#ifndef __gl_core_h_ +#define __gl_core_h_ + +/* + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, 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, 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 including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * 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 + * SILICON GRAPHICS, INC. 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 Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ + +#if !defined(_WIN32_WCE) +#include <sys/types.h> +#endif + +#define GL_CORE_SGI 1 +#define GL_CORE_MESA 2 +#define GL_CORE_APPLE 4 +#define GL_CORE_WINDOWS 8 + +typedef struct __GLcontextRec __GLcontext; + +/* +** This file defines the interface between the GL core and the surrounding +** "operating system" that supports it (currently the GLX or WGL extensions). +** +** Members (data and function pointers) are documented as imported or +** exported according to how they are used by the core rendering functions. +** Imported members are initialized by the "operating system" and used by +** the core functions. Exported members are initialized by the core functions +** and used by the "operating system". +*/ + +/** + * Mode and limit information for a context. This information is + * kept around in the context so that values can be used during + * command execution, and for returning information about the + * context to the application. + * + * Instances of this structure are shared by the driver and the loader. To + * maintain binary compatability, new fields \b must be added only to the + * end of the structure. + * + * \sa _gl_context_modes_create + */ +typedef struct __GLcontextModesRec { + struct __GLcontextModesRec * next; + + GLboolean rgbMode; + GLboolean floatMode; + GLboolean colorIndexMode; + GLuint doubleBufferMode; + GLuint stereoMode; + + GLboolean haveAccumBuffer; + GLboolean haveDepthBuffer; + GLboolean haveStencilBuffer; + + GLint redBits, greenBits, blueBits, alphaBits; /* bits per comp */ + GLuint redMask, greenMask, blueMask, alphaMask; + GLint rgbBits; /* total bits for rgb */ + GLint indexBits; /* total bits for colorindex */ + + GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits; + GLint depthBits; + GLint stencilBits; + + GLint numAuxBuffers; + + GLint level; + + GLint pixmapMode; + + /* GLX */ + GLint visualID; + GLint visualType; /**< One of the GLX X visual types. (i.e., + * \c GLX_TRUE_COLOR, etc.) + */ + + /* EXT_visual_rating / GLX 1.2 */ + GLint visualRating; + + /* EXT_visual_info / GLX 1.2 */ + GLint transparentPixel; + /* colors are floats scaled to ints */ + GLint transparentRed, transparentGreen, transparentBlue, transparentAlpha; + GLint transparentIndex; + + /* ARB_multisample / SGIS_multisample */ + GLint sampleBuffers; + GLint samples; + + /* SGIX_fbconfig / GLX 1.3 */ + GLint drawableType; + GLint renderType; + GLint xRenderable; + GLint fbconfigID; + + /* SGIX_pbuffer / GLX 1.3 */ + GLint maxPbufferWidth; + GLint maxPbufferHeight; + GLint maxPbufferPixels; + GLint optimalPbufferWidth; /* Only for SGIX_pbuffer. */ + GLint optimalPbufferHeight; /* Only for SGIX_pbuffer. */ + + /* SGIX_visual_select_group */ + GLint visualSelectGroup; + + /* OML_swap_method */ + GLint swapMethod; + + GLint screen; + + /* EXT_texture_from_pixmap */ + GLint bindToTextureRgb; + GLint bindToTextureRgba; + GLint bindToMipmapTexture; + GLint bindToTextureTargets; + GLint yInverted; +} __GLcontextModes; + +/* Several fields of __GLcontextModes can take these as values. Since + * GLX header files may not be available everywhere they need to be used, + * redefine them here. + */ +#define GLX_NONE 0x8000 +#define GLX_SLOW_CONFIG 0x8001 +#define GLX_TRUE_COLOR 0x8002 +#define GLX_DIRECT_COLOR 0x8003 +#define GLX_PSEUDO_COLOR 0x8004 +#define GLX_STATIC_COLOR 0x8005 +#define GLX_GRAY_SCALE 0x8006 +#define GLX_STATIC_GRAY 0x8007 +#define GLX_TRANSPARENT_RGB 0x8008 +#define GLX_TRANSPARENT_INDEX 0x8009 +#define GLX_NON_CONFORMANT_CONFIG 0x800D +#define GLX_SWAP_EXCHANGE_OML 0x8061 +#define GLX_SWAP_COPY_OML 0x8062 +#define GLX_SWAP_UNDEFINED_OML 0x8063 + +#define GLX_DONT_CARE 0xFFFFFFFF + +#define GLX_RGBA_BIT 0x00000001 +#define GLX_COLOR_INDEX_BIT 0x00000002 +#define GLX_WINDOW_BIT 0x00000001 +#define GLX_PIXMAP_BIT 0x00000002 +#define GLX_PBUFFER_BIT 0x00000004 + +#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0 +#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1 +#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2 +#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3 +#define GLX_Y_INVERTED_EXT 0x20D4 + +#define GLX_TEXTURE_1D_BIT_EXT 0x00000001 +#define GLX_TEXTURE_2D_BIT_EXT 0x00000002 +#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004 + +#endif /* __gl_core_h_ */ diff --git a/glproto/glproto.pc.in b/glproto/glproto.pc.in new file mode 100644 index 0000000..bd275d8 --- /dev/null +++ b/glproto/glproto.pc.in @@ -0,0 +1,9 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: GLProto +Description: GL extension headers +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} diff --git a/glproto/glxint.h b/glproto/glxint.h new file mode 100644 index 0000000..9da4910 --- /dev/null +++ b/glproto/glxint.h @@ -0,0 +1,137 @@ +#ifndef __GLX_glxint_h__ +#define __GLX_glxint_h__ + +/* + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, 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, 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 including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * 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 + * SILICON GRAPHICS, INC. 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 Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ + +#include <X11/X.h> +#include <X11/Xdefs.h> +#include "GL/gl.h" + +typedef struct __GLXvisualConfigRec __GLXvisualConfig; +typedef struct __GLXFBConfigRec __GLXFBConfig; + +struct __GLXvisualConfigRec { + VisualID vid; + int class; + Bool rgba; + int redSize, greenSize, blueSize, alphaSize; + unsigned long redMask, greenMask, blueMask, alphaMask; + int accumRedSize, accumGreenSize, accumBlueSize, accumAlphaSize; + Bool doubleBuffer; + Bool stereo; + int bufferSize; + int depthSize; + int stencilSize; + int auxBuffers; + int level; + /* Start of Extended Visual Properties */ + int visualRating; /* visual_rating extension */ + int transparentPixel; /* visual_info extension */ + /* colors are floats scaled to ints */ + int transparentRed, transparentGreen, transparentBlue, transparentAlpha; + int transparentIndex; + int multiSampleSize; + int nMultiSampleBuffers; + int visualSelectGroup; +}; + +#define __GLX_MIN_CONFIG_PROPS 18 +#define __GLX_MAX_CONFIG_PROPS 500 + +#define __GLX_EXT_CONFIG_PROPS 10 + +/* +** Since we send all non-core visual properties as token, value pairs, +** we require 2 words across the wire. In order to maintain backwards +** compatibility, we need to send the total number of words that the +** VisualConfigs are sent back in so old libraries can simply "ignore" +** the new properties. +*/ +#define __GLX_TOTAL_CONFIG (__GLX_MIN_CONFIG_PROPS + \ + 2 * __GLX_EXT_CONFIG_PROPS) + +struct __GLXFBConfigRec { + int visualType; + int transparentType; + /* colors are floats scaled to ints */ + int transparentRed, transparentGreen, transparentBlue, transparentAlpha; + int transparentIndex; + + int visualCaveat; + + int associatedVisualId; + int screen; + + int drawableType; + int renderType; + + int maxPbufferWidth, maxPbufferHeight, maxPbufferPixels; + int optimalPbufferWidth, optimalPbufferHeight; /* for SGIX_pbuffer */ + + int visualSelectGroup; /* visuals grouped by select priority */ + + unsigned int id; + + GLboolean rgbMode; + GLboolean colorIndexMode; + GLboolean doubleBufferMode; + GLboolean stereoMode; + GLboolean haveAccumBuffer; + GLboolean haveDepthBuffer; + GLboolean haveStencilBuffer; + + /* The number of bits present in various buffers */ + GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits; + GLint depthBits; + GLint stencilBits; + GLint indexBits; + GLint redBits, greenBits, blueBits, alphaBits; + GLuint redMask, greenMask, blueMask, alphaMask; + + GLuint multiSampleSize; /* Number of samples per pixel (0 if no ms) */ + + GLuint nMultiSampleBuffers; /* Number of availble ms buffers */ + GLint maxAuxBuffers; + + /* frame buffer level */ + GLint level; + + /* color ranges (for SGI_color_range) */ + GLboolean extendedRange; + GLdouble minRed, maxRed; + GLdouble minGreen, maxGreen; + GLdouble minBlue, maxBlue; + GLdouble minAlpha, maxAlpha; +}; + +#define __GLX_TOTAL_FBCONFIG_PROPS 35 + +#endif /* !__GLX_glxint_h__ */ diff --git a/glproto/glxmd.h b/glproto/glxmd.h new file mode 100644 index 0000000..96c07db --- /dev/null +++ b/glproto/glxmd.h @@ -0,0 +1,54 @@ +#ifndef _GLX_glxmd_h_ +#define _GLX_glxmd_h_ + + +/* + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, 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, 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 including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * 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 + * SILICON GRAPHICS, INC. 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 Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ + +/* +** Machine dependent declarations. +*/ + +/* +** Define floating point wire types. These are in IEEE format on the wire. +*/ +typedef float FLOAT32; +typedef double FLOAT64; + +/* +** Like B32, but this is used to store floats in a request. +** +** NOTE: Machines that have a native 32-bit IEEE float can define this as +** nothing. Machines that don't might mimic the float with an integer, +** and then define this to :32. +*/ +#define F32 + +#endif /* _GLX_glxmd_h_ */ diff --git a/glproto/glxproto.h b/glproto/glxproto.h new file mode 100644 index 0000000..4783fee --- /dev/null +++ b/glproto/glxproto.h @@ -0,0 +1,2613 @@ +#ifndef _GLX_glxproto_h_ +#define _GLX_glxproto_h_ + +/* + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, 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, 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 including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * 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 + * SILICON GRAPHICS, INC. 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 Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ + +#include <GL/glxmd.h> + +/*****************************************************************************/ + +/* +** Errrors. +*/ +#define GLXBadContext 0 +#define GLXBadContextState 1 +#define GLXBadDrawable 2 +#define GLXBadPixmap 3 +#define GLXBadContextTag 4 +#define GLXBadCurrentWindow 5 +#define GLXBadRenderRequest 6 +#define GLXBadLargeRequest 7 +#define GLXUnsupportedPrivateRequest 8 +#define GLXBadFBConfig 9 +#define GLXBadPbuffer 10 +#define GLXBadCurrentDrawable 11 +#define GLXBadWindow 12 + +#define __GLX_NUMBER_ERRORS 13 + +/* +** Events. +** __GLX_NUMBER_EVENTS is set to 17 to account for the BufferClobberSGIX +** event - this helps initialization if the server supports the pbuffer +** extension and the client doesn't. +*/ +#define GLX_PbufferClobber 0 +#define GLX_BufferSwapComplete 1 + +#define __GLX_NUMBER_EVENTS 17 + +#define GLX_EXTENSION_NAME "GLX" +#define GLX_EXTENSION_ALIAS "SGI-GLX" + +#define __GLX_MAX_CONTEXT_PROPS 3 + +#ifndef GLX_VENDOR +#define GLX_VENDOR 0x1 +#endif +#ifndef GLX_VERSION +#define GLX_VERSION 0x2 +#endif +#ifndef GLX_EXTENSIONS +#define GLX_EXTENSIONS 0x3 +#endif + +/*****************************************************************************/ + +/* +** For the structure definitions in this file, we must redefine these types in +** terms of Xmd.h types, which may include bitfields. All of these are +** undef'ed at the end of this file, restoring the definitions in glx.h. +*/ +#define GLXContextID CARD32 +#define GLXPixmap CARD32 +#define GLXDrawable CARD32 +#define GLXPbuffer CARD32 +#define GLXWindow CARD32 +#define GLXFBConfigID CARD32 +#define GLXFBConfigIDSGIX CARD32 +#define GLXPbufferSGIX CARD32 + +/* +** ContextTag is not exposed to the API. +*/ +typedef CARD32 GLXContextTag; + +/*****************************************************************************/ + +/* +** Sizes of basic wire types. +*/ +#define __GLX_SIZE_INT8 1 +#define __GLX_SIZE_INT16 2 +#define __GLX_SIZE_INT32 4 +#define __GLX_SIZE_CARD8 1 +#define __GLX_SIZE_CARD16 2 +#define __GLX_SIZE_CARD32 4 +#define __GLX_SIZE_FLOAT32 4 +#define __GLX_SIZE_FLOAT64 8 + +/*****************************************************************************/ + +/* Requests */ + +/* +** Render command request. A bunch of rendering commands are packed into +** a single X extension request. +*/ +typedef struct GLXRender { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXContextTag contextTag B32; +} xGLXRenderReq; +#define sz_xGLXRenderReq 8 + +/* +** The maximum size that a GLXRender command can be. The value must fit +** in 16 bits and should be a multiple of 4. +*/ +#define __GLX_MAX_RENDER_CMD_SIZE 64000 + +/* +** Large render command request. A single large rendering command +** is output in multiple X extension requests. The first packet +** contains an opcode dependent header (see below) that describes +** the data that follows. +*/ +typedef struct GLXRenderLarge { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXContextTag contextTag B32; + CARD16 requestNumber B16; + CARD16 requestTotal B16; + CARD32 dataBytes B32; +} xGLXRenderLargeReq; +#define sz_xGLXRenderLargeReq 16 + +/* +** GLX single request. Commands that go over as single GLX protocol +** requests use this structure. The glxCode will be one of the X_GLsop +** opcodes. +*/ +typedef struct GLXSingle { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXContextTag contextTag B32; +} xGLXSingleReq; +#define sz_xGLXSingleReq 8 + +/* +** glXQueryVersion request +*/ +typedef struct GLXQueryVersion { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 majorVersion B32; + CARD32 minorVersion B32; +} xGLXQueryVersionReq; +#define sz_xGLXQueryVersionReq 12 + +/* +** glXIsDirect request +*/ +typedef struct GLXIsDirect { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXContextID context B32; +} xGLXIsDirectReq; +#define sz_xGLXIsDirectReq 8 + +/* +** glXCreateContext request +*/ +typedef struct GLXCreateContext { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXContextID context B32; + CARD32 visual B32; + CARD32 screen B32; + GLXContextID shareList B32; + BOOL isDirect; + CARD8 reserved1; + CARD16 reserved2 B16; +} xGLXCreateContextReq; +#define sz_xGLXCreateContextReq 24 + +/* +** glXDestroyContext request +*/ +typedef struct GLXDestroyContext { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXContextID context B32; +} xGLXDestroyContextReq; +#define sz_xGLXDestroyContextReq 8 + +/* +** glXMakeCurrent request +*/ +typedef struct GLXMakeCurrent { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXDrawable drawable B32; + GLXContextID context B32; + GLXContextTag oldContextTag B32; +} xGLXMakeCurrentReq; +#define sz_xGLXMakeCurrentReq 16 + +/* +** glXWaitGL request +*/ +typedef struct GLXWaitGL { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXContextTag contextTag B32; +} xGLXWaitGLReq; +#define sz_xGLXWaitGLReq 8 + +/* +** glXWaitX request +*/ +typedef struct GLXWaitX { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXContextTag contextTag B32; +} xGLXWaitXReq; +#define sz_xGLXWaitXReq 8 + +/* +** glXCopyContext request +*/ +typedef struct GLXCopyContext { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXContextID source B32; + GLXContextID dest B32; + CARD32 mask B32; + GLXContextTag contextTag B32; +} xGLXCopyContextReq; +#define sz_xGLXCopyContextReq 20 + +/* +** glXSwapBuffers request +*/ +typedef struct GLXSwapBuffers { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXContextTag contextTag B32; + GLXDrawable drawable B32; +} xGLXSwapBuffersReq; +#define sz_xGLXSwapBuffersReq 12 + +/* +** glXUseXFont request +*/ +typedef struct GLXUseXFont { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXContextTag contextTag B32; + CARD32 font B32; + CARD32 first B32; + CARD32 count B32; + CARD32 listBase B32; +} xGLXUseXFontReq; +#define sz_xGLXUseXFontReq 24 + +/* +** glXCreateGLXPixmap request +*/ +typedef struct GLXCreateGLXPixmap { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 screen B32; + CARD32 visual B32; + CARD32 pixmap B32; + GLXPixmap glxpixmap B32; +} xGLXCreateGLXPixmapReq; +#define sz_xGLXCreateGLXPixmapReq 20 + +/* +** glXDestroyGLXPixmap request +*/ +typedef struct GLXDestroyGLXPixmap { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXPixmap glxpixmap B32; +} xGLXDestroyGLXPixmapReq; +#define sz_xGLXDestroyGLXPixmapReq 8 + +/* +** glXGetVisualConfigs request +*/ +typedef struct GLXGetVisualConfigs { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 screen B32; +} xGLXGetVisualConfigsReq; +#define sz_xGLXGetVisualConfigsReq 8 + +/* +** glXVendorPrivate request. +*/ +typedef struct GLXVendorPrivate { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + GLXContextTag contextTag B32; + /* + ** More data may follow; this is just the header. + */ +} xGLXVendorPrivateReq; +#define sz_xGLXVendorPrivateReq 12 + +/* +** glXVendorPrivateWithReply request +*/ +typedef struct GLXVendorPrivateWithReply { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + GLXContextTag contextTag B32; + /* + ** More data may follow; this is just the header. + */ +} xGLXVendorPrivateWithReplyReq; +#define sz_xGLXVendorPrivateWithReplyReq 12 + +/* +** glXQueryExtensionsString request +*/ +typedef struct GLXQueryExtensionsString { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 screen B32; +} xGLXQueryExtensionsStringReq; +#define sz_xGLXQueryExtensionsStringReq 8 + +/* +** glXQueryServerString request +*/ +typedef struct GLXQueryServerString { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 screen B32; + CARD32 name B32; +} xGLXQueryServerStringReq; +#define sz_xGLXQueryServerStringReq 12 + +/* +** glXClientInfo request +*/ +typedef struct GLXClientInfo { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 major B32; + CARD32 minor B32; + CARD32 numbytes B32; +} xGLXClientInfoReq; +#define sz_xGLXClientInfoReq 16 + +/*** Start of GLX 1.3 requests */ + +/* +** glXGetFBConfigs request +*/ +typedef struct GLXGetFBConfigs { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 screen B32; +} xGLXGetFBConfigsReq; +#define sz_xGLXGetFBConfigsReq 8 + +/* +** glXCreatePixmap request +*/ +typedef struct GLXCreatePixmap { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 screen B32; + GLXFBConfigID fbconfig B32; + CARD32 pixmap B32; + GLXPixmap glxpixmap B32; + CARD32 numAttribs B32; + /* followed by attribute list */ +} xGLXCreatePixmapReq; +#define sz_xGLXCreatePixmapReq 24 + +/* +** glXDestroyPixmap request +*/ +typedef struct GLXDestroyPixmap { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXPixmap glxpixmap B32; +} xGLXDestroyPixmapReq; +#define sz_xGLXDestroyPixmapReq 8 + +/* +** glXCreateNewContext request +*/ +typedef struct GLXCreateNewContext { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXContextID context B32; + GLXFBConfigID fbconfig B32; + CARD32 screen B32; + CARD32 renderType; + GLXContextID shareList B32; + BOOL isDirect; + CARD8 reserved1; + CARD16 reserved2 B16; +} xGLXCreateNewContextReq; +#define sz_xGLXCreateNewContextReq 28 + +/* +** glXQueryContext request +*/ +typedef struct GLXQueryContext { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXContextID context B32; +} xGLXQueryContextReq; +#define sz_xGLXQueryContextReq 8 + +/* +** glXMakeContextCurrent request +*/ +typedef struct GLXMakeContextCurrent { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXContextTag oldContextTag B32; + GLXDrawable drawable B32; + GLXDrawable readdrawable B32; + GLXContextID context B32; +} xGLXMakeContextCurrentReq; +#define sz_xGLXMakeContextCurrentReq 20 + +/* +** glXCreatePbuffer request +*/ +typedef struct GLXCreatePbuffer { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 screen B32; + GLXFBConfigID fbconfig B32; + GLXPbuffer pbuffer B32; + CARD32 numAttribs B32; + /* followed by attribute list */ +} xGLXCreatePbufferReq; +#define sz_xGLXCreatePbufferReq 20 + +/* +** glXDestroyPbuffer request +*/ +typedef struct GLXDestroyPbuffer { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXPbuffer pbuffer B32; +} xGLXDestroyPbufferReq; +#define sz_xGLXDestroyPbufferReq 8 + +/* +** glXGetDrawableAttributes request +*/ +typedef struct GLXGetDrawableAttributes { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXDrawable drawable B32; +} xGLXGetDrawableAttributesReq; +#define sz_xGLXGetDrawableAttributesReq 8 + +/* +** glXChangeDrawableAttributes request +*/ +typedef struct GLXChangeDrawableAttributes { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXDrawable drawable B32; + CARD32 numAttribs B32; + /* followed by attribute list */ +} xGLXChangeDrawableAttributesReq; +#define sz_xGLXChangeDrawableAttributesReq 12 + +/* +** glXCreateWindow request +*/ +typedef struct GLXCreateWindow { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 screen B32; + GLXFBConfigID fbconfig B32; + CARD32 window B32; + GLXWindow glxwindow B32; + CARD32 numAttribs B32; + /* followed by attribute list */ +} xGLXCreateWindowReq; +#define sz_xGLXCreateWindowReq 24 + +/* +** glXDestroyWindow request +*/ +typedef struct GLXDestroyWindow { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXWindow glxwindow B32; +} xGLXDestroyWindowReq; +#define sz_xGLXDestroyWindowReq 8 + +/* Replies */ + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 error B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXGetErrorReply; +#define sz_xGLXGetErrorReply 32 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + GLXContextTag contextTag B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXMakeCurrentReply; +#define sz_xGLXMakeCurrentReply 32 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXReadPixelsReply; +#define sz_xGLXReadPixelsReply 32 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 width B32; + CARD32 height B32; + CARD32 depth B32; + CARD32 pad6 B32; +} xGLXGetTexImageReply; +#define sz_xGLXGetTexImageReply 32 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 width B32; + CARD32 height B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXGetSeparableFilterReply; +#define sz_xGLXGetSeparableFilterReply 32 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 width B32; + CARD32 height B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXGetConvolutionFilterReply; +#define sz_xGLXGetConvolutionFilterReply 32 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 width B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXGetHistogramReply; +#define sz_xGLXGetHistogramReply 32 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXGetMinmaxReply; +#define sz_xGLXGetMinmaxReply 32 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 retval B32; + CARD32 size B32; + CARD32 newMode B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXRenderModeReply; +#define sz_xGLXRenderModeReply 32 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 majorVersion B32; + CARD32 minorVersion B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXQueryVersionReply; +#define sz_xGLXQueryVersionReply 32 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 numVisuals B32; + CARD32 numProps B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXGetVisualConfigsReply; +#define sz_xGLXGetVisualConfigsReply 32 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + BOOL isDirect; + CARD8 pad1; + CARD16 pad2 B16; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; + CARD32 pad7 B32; +} xGLXIsDirectReply; +#define sz_xGLXIsDirectReply 32 + +/* +** This reply structure is used for all single replies. Single replies +** ship either 1 piece of data or N pieces of data. In these cases +** size indicates how much data is to be returned. +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 retval B32; + CARD32 size B32; + CARD32 pad3 B32; /* NOTE: may hold a single value */ + CARD32 pad4 B32; /* NOTE: may hold half a double */ + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXSingleReply; +#define sz_xGLXSingleReply 32 + +/* +** This reply structure is used for all Vendor Private replies. Vendor +** Private replies can ship up to 24 bytes within the header or can +** be variable sized, in which case, the reply length field indicates +** the number of words of data which follow the header. +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 retval B32; + CARD32 size B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXVendorPrivReply; +#define sz_xGLXVendorPrivReply 32 + +/* +** QueryExtensionsStringReply +** n indicates the number of bytes to be returned. +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad1 B32; + CARD32 n B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXQueryExtensionsStringReply; +#define sz_xGLXQueryExtensionsStringReply 32 + +/* +** QueryServerString Reply struct +** n indicates the number of bytes to be returned. +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad1 B32; + CARD32 n B32; + CARD32 pad3 B32; /* NOTE: may hold a single value */ + CARD32 pad4 B32; /* NOTE: may hold half a double */ + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXQueryServerStringReply; +#define sz_xGLXQueryServerStringReply 32 + +/*** Start of GLX 1.3 replies */ + +/* +** glXGetFBConfigs reply +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 numFBConfigs B32; + CARD32 numAttribs B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXGetFBConfigsReply; +#define sz_xGLXGetFBConfigsReply 32 + +/* +** glXQueryContext reply +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 n B32; /* number of attribute/value pairs */ + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXQueryContextReply; +#define sz_xGLXQueryContextReply 32 + +/* +** glXMakeContextCurrent reply +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + GLXContextTag contextTag B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXMakeContextCurrentReply; +#define sz_xGLXMakeContextCurrentReply 32 + +/* +** glXCreateGLXPbuffer reply +** This is used only in the direct rendering case on SGIs - otherwise +** CreateGLXPbuffer has no reply. It is not part of GLX 1.3. +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 success; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXCreateGLXPbufferReply; +#define sz_xGLXCreateGLXPbufferReply 32 + +/* +** glXGetDrawableAttributes reply +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 numAttribs B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXGetDrawableAttributesReply; +#define sz_xGLXGetDrawableAttributesReply 32 + +/* +** glXGetColorTable reply +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 width B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXGetColorTableReply; +#define sz_xGLXGetColorTableReply 32 + +/************************************************************************/ + +/* GLX extension requests and replies */ + +/* +** glXQueryContextInfoEXT request +*/ +typedef struct GLXQueryContextInfoEXT { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ + GLXContextID context B32; +} xGLXQueryContextInfoEXTReq; +#define sz_xGLXQueryContextInfoEXTReq 16 + +/* +** glXQueryContextInfoEXT reply +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 n B32; /* number of attribute/value pairs */ + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXQueryContextInfoEXTReply; +#define sz_xGLXQueryContextInfoEXTReply 32 + +/* +** glXMakeCurrentReadSGI request +*/ +typedef struct GLXMakeCurrentReadSGI { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + GLXContextTag oldContextTag B32; + GLXDrawable drawable B32; + GLXDrawable readable B32; + GLXContextID context B32; +} xGLXMakeCurrentReadSGIReq; +#define sz_xGLXMakeCurrentReadSGIReq 24 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + GLXContextTag contextTag B32; + CARD32 writeVid B32; + CARD32 writeType B32; + CARD32 readVid B32; + CARD32 readType B32; + CARD32 pad6 B32; +} xGLXMakeCurrentReadSGIReply; +#define sz_xGLXMakeCurrentReadSGIReply 32 + +/* +** glXGetFBConfigsSGIX request +*/ +typedef struct GLXGetFBConfigsSGIX { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ + CARD32 screen B32; +} xGLXGetFBConfigsSGIXReq; +#define sz_xGLXGetFBConfigsSGIXReq 16 + +/* +** glXCreateContextWithConfigSGIX request +*/ + +typedef struct GLXCreateContextWithConfigSGIX { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ + GLXContextID context B32; + GLXFBConfigID fbconfig B32; + CARD32 screen B32; + CARD32 renderType; + GLXContextID shareList B32; + BOOL isDirect; + CARD8 reserved1; + CARD16 reserved2 B16; +} xGLXCreateContextWithConfigSGIXReq; +#define sz_xGLXCreateContextWithConfigSGIXReq 36 + +/* +** glXCreatePixmapWithConfigSGIX request +*/ + +typedef struct GLXCreateGLXPixmapWithConfigSGIX { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ + CARD32 screen B32; + GLXFBConfigID fbconfig B32; + CARD32 pixmap B32; + GLXPixmap glxpixmap B32; +} xGLXCreateGLXPixmapWithConfigSGIXReq; +#define sz_xGLXCreateGLXPixmapWithConfigSGIXReq 28 + +/* +** glXCreateGLXPbufferSGIX request +*/ +typedef struct GLXCreateGLXPbufferSGIX { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ + CARD32 screen B32; + GLXFBConfigID fbconfig B32; + GLXPbuffer pbuffer B32; + CARD32 width B32; + CARD32 height B32; + /* followed by attribute list */ +} xGLXCreateGLXPbufferSGIXReq; +#define sz_xGLXCreateGLXPbufferSGIXReq 32 + +/* +** glXDestroyGLXPbufferSGIX request +*/ +typedef struct GLXDestroyGLXPbuffer { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ + GLXPbuffer pbuffer B32; +} xGLXDestroyGLXPbufferSGIXReq; +#define sz_xGLXDestroyGLXPbufferSGIXReq 16 + +/* +** glXChangeDrawableAttributesSGIX request +*/ +typedef struct GLXChangeDrawableAttributesSGIX { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ + GLXDrawable drawable B32; + CARD32 numAttribs B32; + /* followed by attribute list */ +} xGLXChangeDrawableAttributesSGIXReq; +#define sz_xGLXChangeDrawableAttributesSGIXReq 20 + +/* +** glXGetDrawableAttributesSGIX request +*/ +typedef struct GLXGetDrawableAttributesSGIX { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ + GLXDrawable drawable B32; +} xGLXGetDrawableAttributesSGIXReq; +#define sz_xGLXGetDrawableAttributesSGIXReq 16 + +/* +** glXGetDrawableAttributesSGIX reply +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 numAttribs B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXGetDrawableAttributesSGIXReply; +#define sz_xGLXGetDrawableAttributesSGIXReply 32 + +/* +** glXJoinSwapGroupSGIX request +*/ +typedef struct GLXJoinSwapGroupSGIX { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + CARD32 unused B32; /* corresponds to contextTag in hdr */ + GLXDrawable drawable B32; + GLXDrawable member B32; +} xGLXJoinSwapGroupSGIXReq; +#define sz_xGLXJoinSwapGroupSGIXReq 20 + +/* +** glXBindSwapBarrierSGIX request +*/ +typedef struct GLXBindSwapBarrierSGIX { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + CARD32 unused B32; /* corresponds to contextTag in hdr */ + GLXDrawable drawable B32; + CARD32 barrier B32; +} xGLXBindSwapBarrierSGIXReq; +#define sz_xGLXBindSwapBarrierSGIXReq 20 + +/* +** glXQueryMaxSwapBarriersSGIX request +*/ +typedef struct GLXQueryMaxSwapBarriersSGIX { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + CARD32 unused B32; /* corresponds to contextTag in hdr */ + CARD32 screen B32; +} xGLXQueryMaxSwapBarriersSGIXReq; +#define sz_xGLXQueryMaxSwapBarriersSGIXReq 16 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 max B32; + CARD32 size B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXQueryMaxSwapBarriersSGIXReply; +#define sz_xGLXQueryMaxSwapBarriersSGIXReply 32 + +/* +** glXQueryHyperpipeNetworkSGIX request +*/ +typedef struct GLXQueryHyperpipeNetworkSGIX { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ + CARD32 screen B32; +} xGLXQueryHyperpipeNetworkSGIXReq; +#define sz_xGLXQueryHyperpipeNetworkSGIXReq 16 + +/* +** glXQueryHyperpipeNetworkSGIX reply +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad1 B32; + CARD32 n B32; + CARD32 npipes B32; /* NOTE: may hold a single value */ + CARD32 pad4 B32; /* NOTE: may hold half a double */ + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXQueryHyperpipeNetworkSGIXReply; +#define sz_xGLXQueryHyperpipeNetworkSGIXReply 32 + +/* +** glXDestroyHyperpipeConfigSGIX request +*/ +typedef struct GLXDestroyHyperpipeConfigSGIX { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ + CARD32 screen B32; + CARD32 hpId B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xGLXDestroyHyperpipeConfigSGIXReq; +#define sz_xGLXDestroyHyperpipeConfigSGIXReq 32 + +/* +** glXDestroyHyperpipeConfigSGIX reply +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad1 B32; + CARD32 n B32; + CARD32 success B32; /* NOTE: may hold a single value */ + CARD32 pad4 B32; /* NOTE: may hold half a double */ + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXDestroyHyperpipeConfigSGIXReply; +#define sz_xGLXDestroyHyperpipeConfigSGIXReply 32 + +/* +** glXQueryHyperpipeConfigSGIX request +*/ +typedef struct GLXQueryHyperpipeConfigSGIX { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ + CARD32 screen B32; + CARD32 hpId B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xGLXQueryHyperpipeConfigSGIXReq; +#define sz_xGLXQueryHyperpipeConfigSGIXReq 32 + +/* +** glXQueryHyperpipeConfigSGIX reply +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad1 B32; + CARD32 n B32; + CARD32 npipes B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXQueryHyperpipeConfigSGIXReply; +#define sz_xGLXQueryHyperpipeConfigSGIXReply 32 + +/* +** glXHyperpipeConfigSGIX request +*/ +typedef struct GLXHyperpipeConfigSGIX { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ + CARD32 screen B32; + CARD32 npipes B32; + CARD32 networkId B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + /* followed by attribute list */ +} xGLXHyperpipeConfigSGIXReq; +#define sz_xGLXHyperpipeConfigSGIXReq 32 + +/* +** glXHyperpipeConfigSGIX reply +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad1 B32; + CARD32 n B32; + CARD32 npipes B32; + CARD32 hpId B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXHyperpipeConfigSGIXReply; +#define sz_xGLXHyperpipeConfigSGIXReply 32 + +/************************************************************************/ + +/* +** Events +*/ + +typedef struct { + BYTE type; + BYTE pad; + CARD16 sequenceNumber B16; + CARD16 event_type B16; /*** was clobber_class */ + CARD16 draw_type B16; + CARD32 drawable B32; + CARD32 buffer_mask B32; /*** was mask */ + CARD16 aux_buffer B16; + CARD16 x B16; + CARD16 y B16; + CARD16 width B16; + CARD16 height B16; + CARD16 count B16; + CARD32 unused2 B32; +} xGLXPbufferClobberEvent; + +typedef struct { + BYTE type; + BYTE pad; + CARD16 sequenceNumber B16; + CARD16 event_type B16; + CARD32 drawable; + CARD32 ust_hi B32; + CARD32 ust_lo B32; + CARD32 msc_hi B32; + CARD32 msc_lo B32; + CARD32 sbc_hi B32; + CARD32 sbc_lo B32; +} xGLXBufferSwapComplete; + +/************************************************************************/ + +/* +** Size of the standard X request header. +*/ +#define __GLX_SINGLE_HDR_SIZE sz_xGLXSingleReq +#define __GLX_VENDPRIV_HDR_SIZE sz_xGLXVendorPrivateReq + +#define __GLX_RENDER_HDR \ + CARD16 length B16; \ + CARD16 opcode B16 + +#define __GLX_RENDER_HDR_SIZE 4 + +typedef struct { + __GLX_RENDER_HDR; +} __GLXrenderHeader; + +#define __GLX_RENDER_LARGE_HDR \ + CARD32 length B32; \ + CARD32 opcode B32 + +#define __GLX_RENDER_LARGE_HDR_SIZE 8 + +typedef struct { + __GLX_RENDER_LARGE_HDR; +} __GLXrenderLargeHeader; + +/* +** The glBitmap, glPolygonStipple, glTexImage[12]D, glTexSubImage[12]D +** and glDrawPixels calls all have a pixel header transmitted after the +** Render or RenderLarge header and before their own opcode specific +** headers. +*/ +#define __GLX_PIXEL_HDR \ + BOOL swapBytes; \ + BOOL lsbFirst; \ + CARD8 reserved0; \ + CARD8 reserved1; \ + CARD32 rowLength B32; \ + CARD32 skipRows B32; \ + CARD32 skipPixels B32; \ + CARD32 alignment B32 + +#define __GLX_PIXEL_HDR_SIZE 20 + +typedef struct { + __GLX_PIXEL_HDR; +} __GLXpixelHeader; + +/* +** glTexImage[34]D and glTexSubImage[34]D calls +** all have a pixel header transmitted after the Render or RenderLarge +** header and before their own opcode specific headers. +*/ +#define __GLX_PIXEL_3D_HDR \ + BOOL swapBytes; \ + BOOL lsbFirst; \ + CARD8 reserved0; \ + CARD8 reserved1; \ + CARD32 rowLength B32; \ + CARD32 imageHeight B32; \ + CARD32 imageDepth B32; \ + CARD32 skipRows B32; \ + CARD32 skipImages B32; \ + CARD32 skipVolumes B32; \ + CARD32 skipPixels B32; \ + CARD32 alignment B32 + +#define __GLX_PIXEL_3D_HDR_SIZE 36 + +/* +** Data that is specific to a glBitmap call. The data is sent in the +** following order: +** Render or RenderLarge header +** Pixel header +** Bitmap header +*/ +#define __GLX_BITMAP_HDR \ + CARD32 width B32; \ + CARD32 height B32; \ + FLOAT32 xorig F32; \ + FLOAT32 yorig F32; \ + FLOAT32 xmove F32; \ + FLOAT32 ymove F32 + +typedef struct { + __GLX_RENDER_HDR; + __GLX_PIXEL_HDR; + __GLX_BITMAP_HDR; +} __GLXbitmapHeader; + +typedef struct { + __GLX_RENDER_LARGE_HDR; + __GLX_PIXEL_HDR; + __GLX_BITMAP_HDR; +} __GLXbitmapLargeHeader; + +typedef struct { + __GLX_PIXEL_HDR; + __GLX_BITMAP_HDR; +} __GLXdispatchBitmapHeader; + +#define __GLX_BITMAP_HDR_SIZE 24 + +#define __GLX_BITMAP_CMD_HDR_SIZE \ + (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + __GLX_BITMAP_HDR_SIZE) + +#define __GLX_BITMAP_CMD_DISPATCH_HDR_SIZE \ + (__GLX_PIXEL_HDR_SIZE + __GLX_BITMAP_HDR_SIZE) + +typedef struct { + __GLX_RENDER_HDR; + __GLX_PIXEL_HDR; +} __GLXpolygonStippleHeader; + +#define __GLX_POLYGONSTIPPLE_CMD_HDR_SIZE \ + (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE) + +/* +** Data that is specific to a glTexImage1D or glTexImage2D call. The +** data is sent in the following order: +** Render or RenderLarge header +** Pixel header +** TexImage header +** When a glTexImage1D call the height field is unexamined by the server. +*/ +#define __GLX_TEXIMAGE_HDR \ + CARD32 target B32; \ + CARD32 level B32; \ + CARD32 components B32; \ + CARD32 width B32; \ + CARD32 height B32; \ + CARD32 border B32; \ + CARD32 format B32; \ + CARD32 type B32 + +#define __GLX_TEXIMAGE_HDR_SIZE 32 + +#define __GLX_TEXIMAGE_CMD_HDR_SIZE \ + (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + __GLX_TEXIMAGE_HDR_SIZE) + +#define __GLX_TEXIMAGE_CMD_DISPATCH_HDR_SIZE \ + (__GLX_PIXEL_HDR_SIZE + __GLX_TEXIMAGE_HDR_SIZE) + +typedef struct { + __GLX_RENDER_HDR; + __GLX_PIXEL_HDR; + __GLX_TEXIMAGE_HDR; +} __GLXtexImageHeader; + +typedef struct { + __GLX_RENDER_LARGE_HDR; + __GLX_PIXEL_HDR; + __GLX_TEXIMAGE_HDR; +} __GLXtexImageLargeHeader; + +typedef struct { + __GLX_PIXEL_HDR; + __GLX_TEXIMAGE_HDR; +} __GLXdispatchTexImageHeader; + +/* +** Data that is specific to a glTexImage3D or glTexImage4D call. The +** data is sent in the following order: +** Render or RenderLarge header +** Pixel 3D header +** TexImage 3D header +** When a glTexImage3D call the size4d and woffset fields are unexamined +** by the server. +** Could be used by all TexImage commands and perhaps should be in the +** future. +*/ +#define __GLX_TEXIMAGE_3D_HDR \ + CARD32 target B32; \ + CARD32 level B32; \ + CARD32 internalformat B32; \ + CARD32 width B32; \ + CARD32 height B32; \ + CARD32 depth B32; \ + CARD32 size4d B32; \ + CARD32 border B32; \ + CARD32 format B32; \ + CARD32 type B32; \ + CARD32 nullimage B32 + +#define __GLX_TEXIMAGE_3D_HDR_SIZE 44 + +#define __GLX_TEXIMAGE_3D_CMD_HDR_SIZE \ + (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_3D_HDR_SIZE + \ + __GLX_TEXIMAGE_3D_HDR_SIZE) + +#define __GLX_TEXIMAGE_3D_CMD_DISPATCH_HDR_SIZE \ + (__GLX_PIXEL_3D_HDR_SIZE + __GLX_TEXIMAGE_3D_HDR_SIZE) + +typedef struct { + __GLX_RENDER_HDR; + __GLX_PIXEL_3D_HDR; + __GLX_TEXIMAGE_3D_HDR; +} __GLXtexImage3DHeader; + +typedef struct { + __GLX_RENDER_LARGE_HDR; + __GLX_PIXEL_3D_HDR; + __GLX_TEXIMAGE_3D_HDR; +} __GLXtexImage3DLargeHeader; + +typedef struct { + __GLX_PIXEL_3D_HDR; + __GLX_TEXIMAGE_3D_HDR; +} __GLXdispatchTexImage3DHeader; + +/* +** Data that is specific to a glTexSubImage1D or glTexSubImage2D call. The +** data is sent in the following order: +** Render or RenderLarge header +** Pixel header +** TexSubImage header +** When a glTexSubImage1D call is made, the yoffset and height fields +** are unexamined by the server and are considered to be padding. +*/ +#define __GLX_TEXSUBIMAGE_HDR \ + CARD32 target B32; \ + CARD32 level B32; \ + CARD32 xoffset B32; \ + CARD32 yoffset B32; \ + CARD32 width B32; \ + CARD32 height B32; \ + CARD32 format B32; \ + CARD32 type B32; \ + CARD32 nullImage \ + +#define __GLX_TEXSUBIMAGE_HDR_SIZE 36 + +#define __GLX_TEXSUBIMAGE_CMD_HDR_SIZE \ + (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + __GLX_TEXSUBIMAGE_HDR_SIZE) + +#define __GLX_TEXSUBIMAGE_CMD_DISPATCH_HDR_SIZE \ + (__GLX_PIXEL_HDR_SIZE + __GLX_TEXSUBIMAGE_HDR_SIZE) + +typedef struct { + __GLX_RENDER_HDR; + __GLX_PIXEL_HDR; + __GLX_TEXSUBIMAGE_HDR; +} __GLXtexSubImageHeader; + +typedef struct { + __GLX_RENDER_LARGE_HDR; + __GLX_PIXEL_HDR; + __GLX_TEXSUBIMAGE_HDR; +} __GLXtexSubImageLargeHeader; + +typedef struct { + __GLX_PIXEL_HDR; + __GLX_TEXSUBIMAGE_HDR; +} __GLXdispatchTexSubImageHeader; + +/* +** Data that is specific to a glTexSubImage3D and 4D calls. The +** data is sent in the following order: +** Render or RenderLarge header +** Pixel 3D header +** TexSubImage 3D header +** When a glTexSubImage3D call is made, the woffset and size4d fields +** are unexamined by the server and are considered to be padding. +*/ +#define __GLX_TEXSUBIMAGE_3D_HDR \ + CARD32 target B32; \ + CARD32 level B32; \ + CARD32 xoffset B32; \ + CARD32 yoffset B32; \ + CARD32 zoffset B32; \ + CARD32 woffset B32; \ + CARD32 width B32; \ + CARD32 height B32; \ + CARD32 depth B32; \ + CARD32 size4d B32; \ + CARD32 format B32; \ + CARD32 type B32; \ + CARD32 nullImage \ + +#define __GLX_TEXSUBIMAGE_3D_HDR_SIZE 52 + +#define __GLX_TEXSUBIMAGE_3D_CMD_HDR_SIZE \ + (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_3D_HDR_SIZE + \ + __GLX_TEXSUBIMAGE_3D_HDR_SIZE) + +#define __GLX_TEXSUBIMAGE_3D_CMD_DISPATCH_HDR_SIZE \ + (__GLX_PIXEL_3D_HDR_SIZE + __GLX_TEXSUBIMAGE_3D_HDR_SIZE) + +typedef struct { + __GLX_RENDER_HDR; + __GLX_PIXEL_3D_HDR; + __GLX_TEXSUBIMAGE_3D_HDR; +} __GLXtexSubImage3DHeader; + +typedef struct { + __GLX_RENDER_LARGE_HDR; + __GLX_PIXEL_3D_HDR; + __GLX_TEXSUBIMAGE_3D_HDR; +} __GLXtexSubImage3DLargeHeader; + +typedef struct { + __GLX_PIXEL_3D_HDR; + __GLX_TEXSUBIMAGE_3D_HDR; +} __GLXdispatchTexSubImage3DHeader; + +/** + * Data that is specific to a \c glCompressedTexImage1D or + * \c glCompressedTexImage2D call. The data is sent in the following + * order: + * - Render or RenderLarge header + * - CompressedTexImage header + * + * When a \c glCompressedTexImage1D call is made, the \c height field is + * not examined by the server and is considered padding. + */ + +#define __GLX_COMPRESSED_TEXIMAGE_HDR \ + CARD32 target B32; \ + CARD32 level B32; \ + CARD32 internalFormat B32; \ + CARD32 width B32; \ + CARD32 height B32; \ + CARD32 border B32; \ + CARD32 imageSize B32 + +#define __GLX_COMPRESSED_TEXIMAGE_HDR_SIZE 28 + +#define __GLX_COMPRESSED_TEXIMAGE_CMD_HDR_SIZE \ + (__GLX_RENDER_HDR_SIZE + __GLX_COMPRESSED_TEXIMAGE_HDR_SIZE) + +#define __GLX_COMPRESSED_TEXIMAGE_DISPATCH_HDR_SIZE \ + (__GLX_COMPRESSED_TEXIMAGE_HDR_SIZE) + +typedef struct { + __GLX_RENDER_HDR; + __GLX_COMPRESSED_TEXIMAGE_HDR; +} __GLXcompressedTexImageHeader; + +typedef struct { + __GLX_RENDER_LARGE_HDR; + __GLX_COMPRESSED_TEXIMAGE_HDR; +} __GLXcompressedTexImageLargeHeader; + +typedef struct { + __GLX_COMPRESSED_TEXIMAGE_HDR; +} __GLXdispatchCompressedTexImageHeader; + +/** + * Data that is specifi to a \c glCompressedTexSubImage1D or + * \c glCompressedTexSubImage2D call. The data is sent in the following + * order: + * - Render or RenderLarge header + * - CompressedTexSubImage header + * + * When a \c glCompressedTexSubImage1D call is made, the \c yoffset and + * \c height fields are not examined by the server and are considered padding. + */ + +#define __GLX_COMPRESSED_TEXSUBIMAGE_HDR \ + CARD32 target B32; \ + CARD32 level B32; \ + CARD32 xoffset B32; \ + CARD32 yoffset B32; \ + CARD32 width B32; \ + CARD32 height B32; \ + CARD32 format B32; \ + CARD32 imageSize B32 + +#define __GLX_COMPRESSED_TEXSUBIMAGE_HDR_SIZE 32 + +#define __GLX_COMPRESSED_TEXSUBIMAGE_CMD_HDR_SIZE \ + (__GLX_RENDER_HDR_SIZE + __GLX_COMPRESSED_TEXSUBIMAGE_HDR_SIZE) + +#define __GLX_COMPRESSED_TEXSUBIMAGE_DISPATCH_HDR_SIZE \ + (__GLX_COMPRESSED_TEXSUBIMAGE_HDR_SIZE) + +typedef struct { + __GLX_RENDER_HDR; + __GLX_COMPRESSED_TEXSUBIMAGE_HDR; +} __GLXcompressedTexSubImageHeader; + +typedef struct { + __GLX_RENDER_LARGE_HDR; + __GLX_COMPRESSED_TEXSUBIMAGE_HDR; +} __GLXcompressedTexSubImageLargeHeader; + +typedef struct { + __GLX_COMPRESSED_TEXSUBIMAGE_HDR; +} __GLXdispatchCompressedTexSubImageHeader; + +/** + * Data that is specific to a \c glCompressedTexImage3D call. The data is + * sent in the following order: + * - Render or RenderLarge header + * - CompressedTexImage3D header + */ + +#define __GLX_COMPRESSED_TEXIMAGE_3D_HDR \ + CARD32 target B32; \ + CARD32 level B32; \ + CARD32 internalFormat B32; \ + CARD32 width B32; \ + CARD32 height B32; \ + CARD32 depth B32; \ + CARD32 border B32; \ + CARD32 imageSize B32 + +#define __GLX_COMPRESSED_TEXIMAGE_3D_HDR_SIZE 32 + +#define __GLX_COMPRESSED_TEXIMAGE_3D_CMD_HDR_SIZE \ + (__GLX_RENDER_HDR_SIZE + __GLX_COMPRESSED_TEXIMAGE_3D_HDR_SIZE) + +#define __GLX_COMPRESSED_TEXIMAGE_3D_DISPATCH_HDR_SIZE \ + (__GLX_COMPRESSED_TEXIMAGE_3D_HDR_SIZE) + +typedef struct { + __GLX_RENDER_HDR; + __GLX_COMPRESSED_TEXIMAGE_3D_HDR; +} __GLXcompressedTexImage3DHeader; + +typedef struct { + __GLX_RENDER_LARGE_HDR; + __GLX_COMPRESSED_TEXIMAGE_3D_HDR; +} __GLXcompressedTexImage3DLargeHeader; + +typedef struct { + __GLX_COMPRESSED_TEXIMAGE_3D_HDR; +} __GLXdispatchCompressedTexImage3DHeader; + +/** + * Data that is specifi to a \c glCompressedTexSubImage3D call. The data is + * sent in the following order: + * - Render or RenderLarge header + * - CompressedTexSubImage3D header + */ + +#define __GLX_COMPRESSED_TEXSUBIMAGE_3D_HDR \ + CARD32 target B32; \ + CARD32 level B32; \ + CARD32 xoffset B32; \ + CARD32 yoffset B32; \ + CARD32 zoffset B32; \ + CARD32 width B32; \ + CARD32 height B32; \ + CARD32 depth B32; \ + CARD32 format B32; \ + CARD32 imageSize B32 + +#define __GLX_COMPRESSED_TEXSUBIMAGE_3D_HDR_SIZE 32 + +#define __GLX_COMPRESSED_TEXSUBIMAGE_3D_CMD_HDR_SIZE \ + (__GLX_RENDER_HDR_SIZE + __GLX_COMPRESSED_TEXSUBIMAGE_3D_HDR_SIZE) + +#define __GLX_COMPRESSED_TEXSUBIMAGE_3D_DISPATCH_HDR_SIZE \ + (__GLX_COMPRESSED_TEXSUBIMAGE_3D_HDR_SIZE) + +typedef struct { + __GLX_RENDER_HDR; + __GLX_COMPRESSED_TEXSUBIMAGE_3D_HDR; +} __GLXcompressedTexSubImage3DHeader; + +typedef struct { + __GLX_RENDER_LARGE_HDR; + __GLX_COMPRESSED_TEXSUBIMAGE_3D_HDR; +} __GLXcompressedTexSubImage3DLargeHeader; + +typedef struct { + __GLX_COMPRESSED_TEXSUBIMAGE_3D_HDR; +} __GLXdispatchCompressedTexSubImage3DHeader; + +/* +** Data that is specific to a glDrawPixels call. The data is sent in the +** following order: +** Render or RenderLarge header +** Pixel header +** DrawPixels header +*/ +#define __GLX_DRAWPIXELS_HDR \ + CARD32 width B32; \ + CARD32 height B32; \ + CARD32 format B32; \ + CARD32 type B32 + +#define __GLX_DRAWPIXELS_HDR_SIZE 16 + +#define __GLX_DRAWPIXELS_CMD_HDR_SIZE \ + (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + __GLX_DRAWPIXELS_HDR_SIZE) + +#define __GLX_DRAWPIXELS_CMD_DISPATCH_HDR_SIZE \ + (__GLX_PIXEL_HDR_SIZE + __GLX_DRAWPIXELS_HDR_SIZE) + +typedef struct { + __GLX_RENDER_HDR; + __GLX_PIXEL_HDR; + __GLX_DRAWPIXELS_HDR; +} __GLXdrawPixelsHeader; + +typedef struct { + __GLX_RENDER_LARGE_HDR; + __GLX_PIXEL_HDR; + __GLX_DRAWPIXELS_HDR; +} __GLXdrawPixelsLargeHeader; + +typedef struct { + __GLX_PIXEL_HDR; + __GLX_DRAWPIXELS_HDR; +} __GLXdispatchDrawPixelsHeader; + +/* +** Data that is specific to a glConvolutionFilter1D or glConvolutionFilter2D +** call. The data is sent in the following order: +** Render or RenderLarge header +** Pixel header +** ConvolutionFilter header +** When a glConvolutionFilter1D call the height field is unexamined by the server. +*/ +#define __GLX_CONV_FILT_HDR \ + CARD32 target B32; \ + CARD32 internalformat B32; \ + CARD32 width B32; \ + CARD32 height B32; \ + CARD32 format B32; \ + CARD32 type B32 + +#define __GLX_CONV_FILT_HDR_SIZE 24 + +#define __GLX_CONV_FILT_CMD_HDR_SIZE \ + (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + __GLX_CONV_FILT_HDR_SIZE) + +#define __GLX_CONV_FILT_CMD_DISPATCH_HDR_SIZE \ + (__GLX_PIXEL_HDR_SIZE + __GLX_CONV_FILT_HDR_SIZE) +typedef struct { + __GLX_RENDER_HDR; + __GLX_PIXEL_HDR; + __GLX_CONV_FILT_HDR; +} __GLXConvolutionFilterHeader; + +typedef struct { + __GLX_RENDER_LARGE_HDR; + __GLX_PIXEL_HDR; + __GLX_CONV_FILT_HDR; +} __GLXConvolutionFilterLargeHeader; + +typedef struct { + __GLX_PIXEL_HDR; + __GLX_CONV_FILT_HDR; +} __GLXdispatchConvolutionFilterHeader; + +/* +** Data that is specific to a glDrawArraysEXT call. The data is sent in the +** following order: +** Render or RenderLarge header +** Draw Arrays header +** a variable number of Component headers +** vertex data for each component type +*/ + +#define __GLX_DRAWARRAYS_HDR \ + CARD32 numVertexes B32; \ + CARD32 numComponents B32; \ + CARD32 primType B32 + +#define __GLX_DRAWARRAYS_HDR_SIZE 12 + +#define __GLX_DRAWARRAYS_CMD_HDR_SIZE \ + (__GLX_RENDER_HDR_SIZE + __GLX_DRAWARRAYS_HDR_SIZE) + +typedef struct { + __GLX_RENDER_HDR; + __GLX_DRAWARRAYS_HDR; +} __GLXdrawArraysHeader; + +typedef struct { + __GLX_RENDER_LARGE_HDR; + __GLX_DRAWARRAYS_HDR; +} __GLXdrawArraysLargeHeader; + +typedef struct { + __GLX_DRAWARRAYS_HDR; +} __GLXdispatchDrawArraysHeader; + +#define __GLX_COMPONENT_HDR \ + CARD32 datatype B32; \ + INT32 numVals B32; \ + CARD32 component B32 + +typedef struct { + __GLX_COMPONENT_HDR; +} __GLXdispatchDrawArraysComponentHeader; + +#define __GLX_COMPONENT_HDR_SIZE 12 + +/* +** Data that is specific to a glColorTable call +** The data is sent in the following order: +** Render or RenderLarge header +** Pixel header +** ColorTable header +*/ + +#define __GLX_COLOR_TABLE_HDR \ + CARD32 target B32; \ + CARD32 internalformat B32; \ + CARD32 width B32; \ + CARD32 format B32; \ + CARD32 type B32 + +#define __GLX_COLOR_TABLE_HDR_SIZE 20 + +#define __GLX_COLOR_TABLE_CMD_HDR_SIZE \ + (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + __GLX_COLOR_TABLE_HDR_SIZE) + +typedef struct { + __GLX_RENDER_HDR; + __GLX_PIXEL_HDR; + __GLX_COLOR_TABLE_HDR; +} __GLXColorTableHeader; + +typedef struct { + __GLX_RENDER_LARGE_HDR; + __GLX_PIXEL_HDR; + __GLX_COLOR_TABLE_HDR; +} __GLXColorTableLargeHeader; + +typedef struct { + __GLX_PIXEL_HDR; + __GLX_COLOR_TABLE_HDR; +} __GLXdispatchColorTableHeader; + +/* +** Data that is specific to a glColorSubTable call +** The data is sent in the following order: +** Render or RenderLarge header +** Pixel header +** ColorTable header +*/ + +#define __GLX_COLOR_SUBTABLE_HDR \ + CARD32 target B32; \ + CARD32 start B32; \ + CARD32 count B32; \ + CARD32 format B32; \ + CARD32 type B32 + +#define __GLX_COLOR_SUBTABLE_HDR_SIZE 20 + +#define __GLX_COLOR_SUBTABLE_CMD_HDR_SIZE \ + (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + \ + __GLX_COLOR_SUBTABLE_HDR_SIZE) + +typedef struct { + __GLX_RENDER_HDR; + __GLX_PIXEL_HDR; + __GLX_COLOR_SUBTABLE_HDR; +} __GLXColorSubTableHeader; + +typedef struct { + __GLX_RENDER_LARGE_HDR; + __GLX_PIXEL_HDR; + __GLX_COLOR_SUBTABLE_HDR; +} __GLXColorSubTableLargeHeader; + +typedef struct { + __GLX_PIXEL_HDR; + __GLX_COLOR_SUBTABLE_HDR; +} __GLXdispatchColorSubTableHeader; + +#define GLX_WINDOW_TYPE 1 +#define GLX_PIXMAP_TYPE 2 +#define GLX_VIDEO_SOURCE_TYPE 3 +#define GLX_PBUFFER_TYPE 4 +/* 5 is for DM_PBUFFER */ +#define GLX_GLXWINDOW_TYPE 6 + +/*****************************************************************************/ + +/* +** Restore these definitions back to the typedefs in glx.h +*/ +#undef GLXContextID +#undef GLXPixmap +#undef GLXDrawable +#undef GLXPbuffer +#undef GLXWindow +#undef GLXFBConfigID +#undef GLXFBConfigIDSGIX +#undef GLXPbufferSGIX + + +/* Opcodes for GLX commands */ + +#define X_GLXRender 1 +#define X_GLXRenderLarge 2 +#define X_GLXCreateContext 3 +#define X_GLXDestroyContext 4 +#define X_GLXMakeCurrent 5 +#define X_GLXIsDirect 6 +#define X_GLXQueryVersion 7 +#define X_GLXWaitGL 8 +#define X_GLXWaitX 9 +#define X_GLXCopyContext 10 +#define X_GLXSwapBuffers 11 +#define X_GLXUseXFont 12 +#define X_GLXCreateGLXPixmap 13 +#define X_GLXGetVisualConfigs 14 +#define X_GLXDestroyGLXPixmap 15 +#define X_GLXVendorPrivate 16 +#define X_GLXVendorPrivateWithReply 17 +#define X_GLXQueryExtensionsString 18 +#define X_GLXQueryServerString 19 +#define X_GLXClientInfo 20 +#define X_GLXGetFBConfigs 21 +#define X_GLXCreatePixmap 22 +#define X_GLXDestroyPixmap 23 +#define X_GLXCreateNewContext 24 +#define X_GLXQueryContext 25 +#define X_GLXMakeContextCurrent 26 +#define X_GLXCreatePbuffer 27 +#define X_GLXDestroyPbuffer 28 +#define X_GLXGetDrawableAttributes 29 +#define X_GLXChangeDrawableAttributes 30 +#define X_GLXCreateWindow 31 +#define X_GLXDestroyWindow 32 + + +/* Opcodes for single commands (part of GLX command space) */ + +#define X_GLsop_NewList 101 +#define X_GLsop_EndList 102 +#define X_GLsop_DeleteLists 103 +#define X_GLsop_GenLists 104 +#define X_GLsop_FeedbackBuffer 105 +#define X_GLsop_SelectBuffer 106 +#define X_GLsop_RenderMode 107 +#define X_GLsop_Finish 108 +#define X_GLsop_Flush 142 +#define X_GLsop_PixelStoref 109 +#define X_GLsop_PixelStorei 110 +#define X_GLsop_ReadPixels 111 +#define X_GLsop_GetBooleanv 112 +#define X_GLsop_GetClipPlane 113 +#define X_GLsop_GetDoublev 114 +#define X_GLsop_GetError 115 +#define X_GLsop_GetFloatv 116 +#define X_GLsop_GetIntegerv 117 +#define X_GLsop_GetLightfv 118 +#define X_GLsop_GetLightiv 119 +#define X_GLsop_GetMapdv 120 +#define X_GLsop_GetMapfv 121 +#define X_GLsop_GetMapiv 122 +#define X_GLsop_GetMaterialfv 123 +#define X_GLsop_GetMaterialiv 124 +#define X_GLsop_GetPixelMapfv 125 +#define X_GLsop_GetPixelMapuiv 126 +#define X_GLsop_GetPixelMapusv 127 +#define X_GLsop_GetPolygonStipple 128 +#define X_GLsop_GetString 129 +#define X_GLsop_GetTexEnvfv 130 +#define X_GLsop_GetTexEnviv 131 +#define X_GLsop_GetTexGendv 132 +#define X_GLsop_GetTexGenfv 133 +#define X_GLsop_GetTexGeniv 134 +#define X_GLsop_GetTexImage 135 +#define X_GLsop_GetTexParameterfv 136 +#define X_GLsop_GetTexParameteriv 137 +#define X_GLsop_GetTexLevelParameterfv 138 +#define X_GLsop_GetTexLevelParameteriv 139 +#define X_GLsop_IsEnabled 140 +#define X_GLsop_IsList 141 +#define X_GLsop_AreTexturesResident 143 +#define X_GLsop_DeleteTextures 144 +#define X_GLsop_GenTextures 145 +#define X_GLsop_IsTexture 146 +#define X_GLsop_GetColorTable 147 +#define X_GLsop_GetColorTableParameterfv 148 +#define X_GLsop_GetColorTableParameteriv 149 +#define X_GLsop_GetConvolutionFilter 150 +#define X_GLsop_GetConvolutionParameterfv 151 +#define X_GLsop_GetConvolutionParameteriv 152 +#define X_GLsop_GetSeparableFilter 153 +#define X_GLsop_GetHistogram 154 +#define X_GLsop_GetHistogramParameterfv 155 +#define X_GLsop_GetHistogramParameteriv 156 +#define X_GLsop_GetMinmax 157 +#define X_GLsop_GetMinmaxParameterfv 158 +#define X_GLsop_GetMinmaxParameteriv 159 +#define X_GLsop_GetCompressedTexImage 160 + + +/* Opcodes for rendering commands */ + +#define X_GLrop_CallList 1 +#define X_GLrop_CallLists 2 +#define X_GLrop_ListBase 3 +#define X_GLrop_Begin 4 +#define X_GLrop_Bitmap 5 +#define X_GLrop_Color3bv 6 +#define X_GLrop_Color3dv 7 +#define X_GLrop_Color3fv 8 +#define X_GLrop_Color3iv 9 +#define X_GLrop_Color3sv 10 +#define X_GLrop_Color3ubv 11 +#define X_GLrop_Color3uiv 12 +#define X_GLrop_Color3usv 13 +#define X_GLrop_Color4bv 14 +#define X_GLrop_Color4dv 15 +#define X_GLrop_Color4fv 16 +#define X_GLrop_Color4iv 17 +#define X_GLrop_Color4sv 18 +#define X_GLrop_Color4ubv 19 +#define X_GLrop_Color4uiv 20 +#define X_GLrop_Color4usv 21 +#define X_GLrop_EdgeFlagv 22 +#define X_GLrop_End 23 +#define X_GLrop_Indexdv 24 +#define X_GLrop_Indexfv 25 +#define X_GLrop_Indexiv 26 +#define X_GLrop_Indexsv 27 +#define X_GLrop_Normal3bv 28 +#define X_GLrop_Normal3dv 29 +#define X_GLrop_Normal3fv 30 +#define X_GLrop_Normal3iv 31 +#define X_GLrop_Normal3sv 32 +#define X_GLrop_RasterPos2dv 33 +#define X_GLrop_RasterPos2fv 34 +#define X_GLrop_RasterPos2iv 35 +#define X_GLrop_RasterPos2sv 36 +#define X_GLrop_RasterPos3dv 37 +#define X_GLrop_RasterPos3fv 38 +#define X_GLrop_RasterPos3iv 39 +#define X_GLrop_RasterPos3sv 40 +#define X_GLrop_RasterPos4dv 41 +#define X_GLrop_RasterPos4fv 42 +#define X_GLrop_RasterPos4iv 43 +#define X_GLrop_RasterPos4sv 44 +#define X_GLrop_Rectdv 45 +#define X_GLrop_Rectfv 46 +#define X_GLrop_Rectiv 47 +#define X_GLrop_Rectsv 48 +#define X_GLrop_TexCoord1dv 49 +#define X_GLrop_TexCoord1fv 50 +#define X_GLrop_TexCoord1iv 51 +#define X_GLrop_TexCoord1sv 52 +#define X_GLrop_TexCoord2dv 53 +#define X_GLrop_TexCoord2fv 54 +#define X_GLrop_TexCoord2iv 55 +#define X_GLrop_TexCoord2sv 56 +#define X_GLrop_TexCoord3dv 57 +#define X_GLrop_TexCoord3fv 58 +#define X_GLrop_TexCoord3iv 59 +#define X_GLrop_TexCoord3sv 60 +#define X_GLrop_TexCoord4dv 61 +#define X_GLrop_TexCoord4fv 62 +#define X_GLrop_TexCoord4iv 63 +#define X_GLrop_TexCoord4sv 64 +#define X_GLrop_Vertex2dv 65 +#define X_GLrop_Vertex2fv 66 +#define X_GLrop_Vertex2iv 67 +#define X_GLrop_Vertex2sv 68 +#define X_GLrop_Vertex3dv 69 +#define X_GLrop_Vertex3fv 70 +#define X_GLrop_Vertex3iv 71 +#define X_GLrop_Vertex3sv 72 +#define X_GLrop_Vertex4dv 73 +#define X_GLrop_Vertex4fv 74 +#define X_GLrop_Vertex4iv 75 +#define X_GLrop_Vertex4sv 76 +#define X_GLrop_ClipPlane 77 +#define X_GLrop_ColorMaterial 78 +#define X_GLrop_CullFace 79 +#define X_GLrop_Fogf 80 +#define X_GLrop_Fogfv 81 +#define X_GLrop_Fogi 82 +#define X_GLrop_Fogiv 83 +#define X_GLrop_FrontFace 84 +#define X_GLrop_Hint 85 +#define X_GLrop_Lightf 86 +#define X_GLrop_Lightfv 87 +#define X_GLrop_Lighti 88 +#define X_GLrop_Lightiv 89 +#define X_GLrop_LightModelf 90 +#define X_GLrop_LightModelfv 91 +#define X_GLrop_LightModeli 92 +#define X_GLrop_LightModeliv 93 +#define X_GLrop_LineStipple 94 +#define X_GLrop_LineWidth 95 +#define X_GLrop_Materialf 96 +#define X_GLrop_Materialfv 97 +#define X_GLrop_Materiali 98 +#define X_GLrop_Materialiv 99 +#define X_GLrop_PointSize 100 +#define X_GLrop_PolygonMode 101 +#define X_GLrop_PolygonStipple 102 +#define X_GLrop_Scissor 103 +#define X_GLrop_ShadeModel 104 +#define X_GLrop_TexParameterf 105 +#define X_GLrop_TexParameterfv 106 +#define X_GLrop_TexParameteri 107 +#define X_GLrop_TexParameteriv 108 +#define X_GLrop_TexImage1D 109 +#define X_GLrop_TexImage2D 110 +#define X_GLrop_TexEnvf 111 +#define X_GLrop_TexEnvfv 112 +#define X_GLrop_TexEnvi 113 +#define X_GLrop_TexEnviv 114 +#define X_GLrop_TexGend 115 +#define X_GLrop_TexGendv 116 +#define X_GLrop_TexGenf 117 +#define X_GLrop_TexGenfv 118 +#define X_GLrop_TexGeni 119 +#define X_GLrop_TexGeniv 120 +#define X_GLrop_InitNames 121 +#define X_GLrop_LoadName 122 +#define X_GLrop_PassThrough 123 +#define X_GLrop_PopName 124 +#define X_GLrop_PushName 125 +#define X_GLrop_DrawBuffer 126 +#define X_GLrop_Clear 127 +#define X_GLrop_ClearAccum 128 +#define X_GLrop_ClearIndex 129 +#define X_GLrop_ClearColor 130 +#define X_GLrop_ClearStencil 131 +#define X_GLrop_ClearDepth 132 +#define X_GLrop_StencilMask 133 +#define X_GLrop_ColorMask 134 +#define X_GLrop_DepthMask 135 +#define X_GLrop_IndexMask 136 +#define X_GLrop_Accum 137 +#define X_GLrop_Disable 138 +#define X_GLrop_Enable 139 +#define X_GLrop_PopAttrib 141 +#define X_GLrop_PushAttrib 142 +#define X_GLrop_Map1d 143 +#define X_GLrop_Map1f 144 +#define X_GLrop_Map2d 145 +#define X_GLrop_Map2f 146 +#define X_GLrop_MapGrid1d 147 +#define X_GLrop_MapGrid1f 148 +#define X_GLrop_MapGrid2d 149 +#define X_GLrop_MapGrid2f 150 +#define X_GLrop_EvalCoord1dv 151 +#define X_GLrop_EvalCoord1fv 152 +#define X_GLrop_EvalCoord2dv 153 +#define X_GLrop_EvalCoord2fv 154 +#define X_GLrop_EvalMesh1 155 +#define X_GLrop_EvalPoint1 156 +#define X_GLrop_EvalMesh2 157 +#define X_GLrop_EvalPoint2 158 +#define X_GLrop_AlphaFunc 159 +#define X_GLrop_BlendFunc 160 +#define X_GLrop_LogicOp 161 +#define X_GLrop_StencilFunc 162 +#define X_GLrop_StencilOp 163 +#define X_GLrop_DepthFunc 164 +#define X_GLrop_PixelZoom 165 +#define X_GLrop_PixelTransferf 166 +#define X_GLrop_PixelTransferi 167 +#define X_GLrop_PixelMapfv 168 +#define X_GLrop_PixelMapuiv 169 +#define X_GLrop_PixelMapusv 170 +#define X_GLrop_ReadBuffer 171 +#define X_GLrop_CopyPixels 172 +#define X_GLrop_DrawPixels 173 +#define X_GLrop_DepthRange 174 +#define X_GLrop_Frustum 175 +#define X_GLrop_LoadIdentity 176 +#define X_GLrop_LoadMatrixf 177 +#define X_GLrop_LoadMatrixd 178 +#define X_GLrop_MatrixMode 179 +#define X_GLrop_MultMatrixf 180 +#define X_GLrop_MultMatrixd 181 +#define X_GLrop_Ortho 182 +#define X_GLrop_PopMatrix 183 +#define X_GLrop_PushMatrix 184 +#define X_GLrop_Rotated 185 +#define X_GLrop_Rotatef 186 +#define X_GLrop_Scaled 187 +#define X_GLrop_Scalef 188 +#define X_GLrop_Translated 189 +#define X_GLrop_Translatef 190 +#define X_GLrop_Viewport 191 +#define X_GLrop_DrawArrays 193 +#define X_GLrop_PolygonOffset 192 +#define X_GLrop_CopyTexImage1D 4119 +#define X_GLrop_CopyTexImage2D 4120 +#define X_GLrop_CopyTexSubImage1D 4121 +#define X_GLrop_CopyTexSubImage2D 4122 +#define X_GLrop_TexSubImage1D 4099 +#define X_GLrop_TexSubImage2D 4100 +#define X_GLrop_BindTexture 4117 +#define X_GLrop_PrioritizeTextures 4118 +#define X_GLrop_Indexubv 194 +#define X_GLrop_BlendColor 4096 +#define X_GLrop_BlendEquation 4097 +#define X_GLrop_ColorTable 2053 +#define X_GLrop_ColorTableParameterfv 2054 +#define X_GLrop_ColorTableParameteriv 2055 +#define X_GLrop_CopyColorTable 2056 +#define X_GLrop_ColorSubTable 195 +#define X_GLrop_CopyColorSubTable 196 +#define X_GLrop_ConvolutionFilter1D 4101 +#define X_GLrop_ConvolutionFilter2D 4102 +#define X_GLrop_ConvolutionParameterf 4103 +#define X_GLrop_ConvolutionParameterfv 4104 +#define X_GLrop_ConvolutionParameteri 4105 +#define X_GLrop_ConvolutionParameteriv 4106 +#define X_GLrop_CopyConvolutionFilter1D 4107 +#define X_GLrop_CopyConvolutionFilter2D 4108 +#define X_GLrop_SeparableFilter2D 4109 +#define X_GLrop_Histogram 4110 +#define X_GLrop_Minmax 4111 +#define X_GLrop_ResetHistogram 4112 +#define X_GLrop_ResetMinmax 4113 +#define X_GLrop_TexImage3D 4114 +#define X_GLrop_TexSubImage3D 4115 +#define X_GLrop_CopyTexSubImage3D 4123 +#define X_GLrop_DrawArraysEXT 4116 + +/* Added for core GL version 1.3 */ + +#define X_GLrop_ActiveTextureARB 197 +#define X_GLrop_MultiTexCoord1dvARB 198 +#define X_GLrop_MultiTexCoord1fvARB 199 +#define X_GLrop_MultiTexCoord1ivARB 200 +#define X_GLrop_MultiTexCoord1svARB 201 +#define X_GLrop_MultiTexCoord2dvARB 202 +#define X_GLrop_MultiTexCoord2fvARB 203 +#define X_GLrop_MultiTexCoord2ivARB 204 +#define X_GLrop_MultiTexCoord2svARB 205 +#define X_GLrop_MultiTexCoord3dvARB 206 +#define X_GLrop_MultiTexCoord3fvARB 207 +#define X_GLrop_MultiTexCoord3ivARB 208 +#define X_GLrop_MultiTexCoord3svARB 209 +#define X_GLrop_MultiTexCoord4dvARB 210 +#define X_GLrop_MultiTexCoord4fvARB 211 +#define X_GLrop_MultiTexCoord4ivARB 212 +#define X_GLrop_MultiTexCoord4svARB 213 +#define X_GLrop_CompressedTexImage1D 214 +#define X_GLrop_CompressedTexImage2D 215 +#define X_GLrop_CompressedTexImage3D 216 +#define X_GLrop_CompressedTexSubImage1D 217 +#define X_GLrop_CompressedTexSubImage2D 218 +#define X_GLrop_CompressedTexSubImage3D 219 +#define X_GLrop_SampleCoverageARB 229 + +/* Added for core GL version 1.4 */ + +#define X_GLrop_WindowPos3fARB 230 +#define X_GLrop_FogCoordfv 4124 +#define X_GLrop_FogCoorddv 4125 +#define X_GLrop_PointParameterfARB 2065 +#define X_GLrop_PointParameterfvARB 2066 +#define X_GLrop_SecondaryColor3bv 4126 +#define X_GLrop_SecondaryColor3sv 4127 +#define X_GLrop_SecondaryColor3iv 4128 +#define X_GLrop_SecondaryColor3fv 4129 +#define X_GLrop_SecondaryColor3dv 4130 +#define X_GLrop_SecondaryColor3ubv 4131 +#define X_GLrop_SecondaryColor3usv 4132 +#define X_GLrop_SecondaryColor3uiv 4133 +#define X_GLrop_BlendFuncSeparate 4134 +#define X_GLrop_PointParameteri 4221 +#define X_GLrop_PointParameteriv 4222 + +/* Added for core GL version 1.5 */ +/* XXX opcodes not defined in the spec */ + +/* Opcodes for Vendor Private commands */ + + +#define X_GLvop_GetConvolutionFilterEXT 1 +#define X_GLvop_GetConvolutionParameterfvEXT 2 +#define X_GLvop_GetConvolutionParameterivEXT 3 +#define X_GLvop_GetSeparableFilterEXT 4 +#define X_GLvop_GetHistogramEXT 5 +#define X_GLvop_GetHistogramParameterfvEXT 6 +#define X_GLvop_GetHistogramParameterivEXT 7 +#define X_GLvop_GetMinmaxEXT 8 +#define X_GLvop_GetMinmaxParameterfvEXT 9 +#define X_GLvop_GetMinmaxParameterivEXT 10 +#define X_GLvop_AreTexturesResidentEXT 11 +#define X_GLvop_DeleteTexturesEXT 12 +#define X_GLvop_GenTexturesEXT 13 +#define X_GLvop_IsTextureEXT 14 +#define X_GLvop_GetCombinerInputParameterfvNV 1270 +#define X_GLvop_GetCombinerInputParameterivNV 1271 +#define X_GLvop_GetCombinerOutputParameterfvNV 1272 +#define X_GLvop_GetCombinerOutputParameterivNV 1273 +#define X_GLvop_GetFinalCombinerOutputParameterfvNV 1274 +#define X_GLvop_GetFinalCombinerOutputParameterivNV 1275 +#define X_GLvop_DeleteFenceNV 1276 +#define X_GLvop_GenFencesNV 1277 +#define X_GLvop_IsFenceNV 1278 +#define X_GLvop_TestFenceNV 1279 +#define X_GLvop_GetFenceivNV 1280 +#define X_GLvop_AreProgramsResidentNV 1293 +#define X_GLvop_DeleteProgramARB 1294 +#define X_GLvop_GenProgramsARB 1295 +#define X_GLvop_GetProgramEnvParameterfvARB 1296 +#define X_GLvop_GetProgramEnvParameterdvARB 1297 +#define X_GLvop_GetProgramEnvParameterivNV 1298 +#define X_GLvop_GetProgramStringNV 1299 +#define X_GLvop_GetTrackMatrixivNV 1300 +#define X_GLvop_GetVertexAttribdvARB 1301 +#define X_GLvop_GetVertexAttribfvARB 1302 +#define X_GLvop_GetVertexAttribivARB 1303 +#define X_GLvop_IsProgramARB 1304 +#define X_GLvop_GetProgramLocalParameterfvARB 1305 +#define X_GLvop_GetProgramLocalParameterdvARB 1306 +#define X_GLvop_GetProgramivARB 1307 +#define X_GLvop_GetProgramStringARB 1308 +#define X_GLvop_GetProgramNamedParameter4fvNV 1310 +#define X_GLvop_GetProgramNamedParameter4dvNV 1311 +#define X_GLvop_SampleMaskSGIS 2048 +#define X_GLvop_SamplePatternSGIS 2049 +#define X_GLvop_GetDetailTexFuncSGIS 4096 +#define X_GLvop_GetSharpenTexFuncSGIS 4097 +#define X_GLvop_GetColorTableSGI 4098 +#define X_GLvop_GetColorTableParameterfvSGI 4099 +#define X_GLvop_GetColorTableParameterivSGI 4100 +#define X_GLvop_GetTexFilterFuncSGIS 4101 +#define X_GLvop_GetInstrumentsSGIX 4102 +#define X_GLvop_InstrumentsBufferSGIX 4103 +#define X_GLvop_PollInstrumentsSGIX 4104 +#define X_GLvop_FlushRasterSGIX 4105 + +/* Opcodes for GLX vendor private commands */ + +#define X_GLXvop_QueryContextInfoEXT 1024 +#define X_GLXvop_BindTexImageEXT 1330 +#define X_GLXvop_ReleaseTexImageEXT 1331 +#define X_GLXvop_SwapIntervalSGI 65536 +#define X_GLXvop_MakeCurrentReadSGI 65537 +#define X_GLXvop_CreateGLXVideoSourceSGIX 65538 +#define X_GLXvop_DestroyGLXVideoSourceSGIX 65539 +#define X_GLXvop_GetFBConfigsSGIX 65540 +#define X_GLXvop_CreateContextWithConfigSGIX 65541 +#define X_GLXvop_CreateGLXPixmapWithConfigSGIX 65542 +#define X_GLXvop_CreateGLXPbufferSGIX 65543 +#define X_GLXvop_DestroyGLXPbufferSGIX 65544 +#define X_GLXvop_ChangeDrawableAttributesSGIX 65545 +#define X_GLXvop_GetDrawableAttributesSGIX 65546 +#define X_GLXvop_JoinSwapGroupSGIX 65547 +#define X_GLXvop_BindSwapBarrierSGIX 65548 +#define X_GLXvop_QueryMaxSwapBarriersSGIX 65549 +#define X_GLXvop_QueryHyperpipeNetworkSGIX 65550 +#define X_GLXvop_QueryHyperpipeConfigSGIX 65551 +#define X_GLXvop_HyperpipeConfigSGIX 65552 +#define X_GLXvop_DestroyHyperpipeConfigSGIX 65553 + +/* ARB extension opcodes */ + +/* 1. GL_ARB_multitexture - see GL 1.2 opcodes */ +/* 5. GL_ARB_multisample - see GL 1.3 opcodes */ +/* 12. GL_ARB_texture_compression - see GL 1.3 opcodes */ +/* 14. GL_ARB_point_parameters - see GL 1.4 opcodees */ + +/* 15. GL_ARB_vertex_blend */ +#define X_GLrop_WeightbvARB 220 +#define X_GLrop_WeightubvARB 221 +#define X_GLrop_WeightsvARB 222 +#define X_GLrop_WeightusvARB 223 +#define X_GLrop_WeightivARB 224 +#define X_GLrop_WeightuivARB 225 +#define X_GLrop_VertexBlendARB 226 +#define X_GLrop_WeightfvARB 227 +#define X_GLrop_WeightdvARB 228 + +/* 16. GL_ARB_matrix_palette */ +/* XXX opcodes not defined in the spec */ + +/* 25. GL_ARB_window_pos - see GL 1.4 opcodes */ + +/* 26. GL_ARB_vertex_program */ +#define X_GLrop_BindProgramARB 4180 +#define X_GLrop_ProgramEnvParameter4fvARB 4184 +#define X_GLrop_ProgramEnvParameter4dvARB 4185 +#define X_GLrop_VertexAttrib1svARB 4189 +#define X_GLrop_VertexAttrib2svARB 4190 +#define X_GLrop_VertexAttrib3svARB 4191 +#define X_GLrop_VertexAttrib4svARB 4192 +#define X_GLrop_VertexAttrib1fvARB 4193 +#define X_GLrop_VertexAttrib2fvARB 4194 +#define X_GLrop_VertexAttrib3fvARB 4195 +#define X_GLrop_VertexAttrib4fvARB 4196 +#define X_GLrop_VertexAttrib1dvARB 4197 +#define X_GLrop_VertexAttrib2dvARB 4198 +#define X_GLrop_VertexAttrib3dvARB 4199 +#define X_GLrop_ProgramLocalParameter4fvARB 4215 +#define X_GLrop_ProgramLocalParameter4dvARB 4216 +#define X_GLrop_ProgramStringARB 4217 +#define X_GLrop_VertexAttrib4dvARB 4200 +#define X_GLrop_VertexAttrib4NubvARB 4201 +#define X_GLrop_VertexAttrib4bvARB 4230 +#define X_GLrop_VertexAttrib4ivARB 4231 +#define X_GLrop_VertexAttrib4ubvARB 4232 +#define X_GLrop_VertexAttrib4usvARB 4233 +#define X_GLrop_VertexAttrib4uivARB 4234 +#define X_GLrop_VertexAttrib4NbvARB 4235 +#define X_GLrop_VertexAttrib4NsvARB 4236 +#define X_GLrop_VertexAttrib4NivARB 4237 +#define X_GLrop_VertexAttrib4NusvARB 4238 +#define X_GLrop_VertexAttrib4NuivARB 4239 + +/* 27. GL_ARB_fragment_program - see GL_ARB_vertex_program opcodes */ + +/* 29. GL_ARB_occlusion_query */ +/* XXX opcodes not defined in the spec */ + + +/* New extension opcodes */ + +/* 145. GL_EXT_secondary_color - see GL 1.4 opcodes */ + +/* 188. GL_EXT_vertex_weighting */ +#define X_GLrop_VertexWeightfvEXT 4135 + +/* 191. GL_NV_register_combiners */ +#define X_GLrop_CombinerParameterfNV 4136 +#define X_GLrop_CombinerParameterfvNV 4137 +#define X_GLrop_CombinerParameteriNV 4138 +#define X_GLrop_CombinerParameterivNV 4139 +#define X_GLrop_CombinerInputNV 4140 +#define X_GLrop_CombinerOutputNV 4141 +#define X_GLrop_FinalCombinerInputNV 4142 + +/* 222. GL_NV_fence */ +#define X_GLrop_SetFenceNV 4143 +#define X_GLrop_FinishFenceNV 4144 + +/* 227. GL_NV_register_combiners2 */ +/* XXX opcodes not defined in the spec */ + +/* 233. GL_NV_vertex_program - see also GL_ARB_vertex_program opcodes */ +#define X_GLrop_ExecuteProgramNV 4181 +#define X_GLrop_RequestResidentProgramsNV 4182 +#define X_GLrop_LoadProgamNV 4183 +#define X_GLrop_ProgramParameters4fvNV 4186 +#define X_GLrop_ProgramParameters4dvNV 4187 +#define X_GLrop_TrackMatrixNV 4188 +#define X_GLrop_VertexAttribs1svNV 4202 +#define X_GLrop_VertexAttribs2svNV 4203 +#define X_GLrop_VertexAttribs3svNV 4204 +#define X_GLrop_VertexAttribs4svNV 4205 +#define X_GLrop_VertexAttribs1fvNV 4206 +#define X_GLrop_VertexAttribs2fvNV 4207 +#define X_GLrop_VertexAttribs3fvNV 4208 +#define X_GLrop_VertexAttribs4fvNV 4209 +#define X_GLrop_VertexAttribs1dvNV 4210 +#define X_GLrop_VertexAttribs2dvNV 4211 +#define X_GLrop_VertexAttribs3dvNV 4212 +#define X_GLrop_VertexAttribs4dvNV 4213 +#define X_GLrop_VertexAttribs4ubvNV 4214 + +/* 261. GL_NV_occlusion_query */ +/* XXX opcodes not defined in the spec */ + +/* 262. GL_NV_point_sprite - see GL 1.4 opcodes */ + +/* 268. GL_EXT_stencil_two_side */ +#define X_GLrop_ActiveStencilFaceEXT 4220 + +/* 282. GL_NV_fragment_program - see also GL_NV_vertex_program and GL_ARB_vertex_program opcodes */ +#define X_GLrop_ProgramNamedParameter4fvNV 4218 +#define X_GLrop_ProgramNamedParameter4dvNV 4219 + +/* 285. GL_NV_primitive_restart */ +/* XXX opcodes not defined in the spec */ + +/* 297. GL_EXT_depth_bounds_test */ +#define X_GLrop_DepthBoundsEXT 4229 + +/* 299. GL_EXT_blend_equation_separate */ +#define X_GLrop_BlendEquationSeparateEXT 4228 + +/* 310. GL_EXT_framebuffer_object */ +#define X_GLvop_IsRenderbufferEXT 1422 +#define X_GLvop_GenRenderbuffersEXT 1423 +#define X_GLvop_GetRenderbufferParameterivEXT 1424 +#define X_GLvop_IsFramebufferEXT 1425 +#define X_GLvop_GenFramebuffersEXT 1426 +#define X_GLvop_CheckFramebufferStatusEXT 1427 +#define X_GLvop_GetFramebufferAttachmentParameterivEXT 1428 + +#endif /* _GLX_glxproto_h_ */ diff --git a/glproto/glxtokens.h b/glproto/glxtokens.h new file mode 100644 index 0000000..949935b --- /dev/null +++ b/glproto/glxtokens.h @@ -0,0 +1,285 @@ +#ifndef __GLX_glxtokens_h__ +#define __GLX_glxtokens_h__ + +/* + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, 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, 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 including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * 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 + * SILICON GRAPHICS, INC. 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 Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ + +#ifdef __cplusplus +extern "C" { +#endif + +#define GLX_VERSION_1_1 1 +#define GLX_VERSION_1_2 1 +#define GLX_VERSION_1_3 1 +#define GLX_VERSION_1_4 1 + +/* +** Visual Config Attributes (glXGetConfig, glXGetFBConfigAttrib) +*/ +#define GLX_USE_GL 1 /* support GLX rendering */ +#define GLX_BUFFER_SIZE 2 /* depth of the color buffer */ +#define GLX_LEVEL 3 /* level in plane stacking */ +#define GLX_RGBA 4 /* true if RGBA mode */ +#define GLX_DOUBLEBUFFER 5 /* double buffering supported */ +#define GLX_STEREO 6 /* stereo buffering supported */ +#define GLX_AUX_BUFFERS 7 /* number of aux buffers */ +#define GLX_RED_SIZE 8 /* number of red component bits */ +#define GLX_GREEN_SIZE 9 /* number of green component bits */ +#define GLX_BLUE_SIZE 10 /* number of blue component bits */ +#define GLX_ALPHA_SIZE 11 /* number of alpha component bits */ +#define GLX_DEPTH_SIZE 12 /* number of depth bits */ +#define GLX_STENCIL_SIZE 13 /* number of stencil bits */ +#define GLX_ACCUM_RED_SIZE 14 /* number of red accum bits */ +#define GLX_ACCUM_GREEN_SIZE 15 /* number of green accum bits */ +#define GLX_ACCUM_BLUE_SIZE 16 /* number of blue accum bits */ +#define GLX_ACCUM_ALPHA_SIZE 17 /* number of alpha accum bits */ +/* +** FBConfig-specific attributes +*/ +#define GLX_X_VISUAL_TYPE 0x22 +#define GLX_CONFIG_CAVEAT 0x20 /* Like visual_info VISUAL_CAVEAT_EXT */ +#define GLX_TRANSPARENT_TYPE 0x23 +#define GLX_TRANSPARENT_INDEX_VALUE 0x24 +#define GLX_TRANSPARENT_RED_VALUE 0x25 +#define GLX_TRANSPARENT_GREEN_VALUE 0x26 +#define GLX_TRANSPARENT_BLUE_VALUE 0x27 +#define GLX_TRANSPARENT_ALPHA_VALUE 0x28 +#define GLX_DRAWABLE_TYPE 0x8010 +#define GLX_RENDER_TYPE 0x8011 +#define GLX_X_RENDERABLE 0x8012 +#define GLX_FBCONFIG_ID 0x8013 +#define GLX_MAX_PBUFFER_WIDTH 0x8016 +#define GLX_MAX_PBUFFER_HEIGHT 0x8017 +#define GLX_MAX_PBUFFER_PIXELS 0x8018 +#define GLX_VISUAL_ID 0x800B + +/* FBConfigSGIX Attributes */ +#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019 +#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A + +/* +** Error return values from glXGetConfig. Success is indicated by +** a value of 0. +*/ +#define GLX_BAD_SCREEN 1 /* screen # is bad */ +#define GLX_BAD_ATTRIBUTE 2 /* attribute to get is bad */ +#define GLX_NO_EXTENSION 3 /* no glx extension on server */ +#define GLX_BAD_VISUAL 4 /* visual # not known by GLX */ +#define GLX_BAD_CONTEXT 5 /* returned only by import_context EXT? */ +#define GLX_BAD_VALUE 6 /* returned only by glXSwapIntervalSGI? */ +#define GLX_BAD_ENUM 7 /* unused? */ + +/* FBConfig attribute values */ + +/* +** Generic "don't care" value for glX ChooseFBConfig attributes (except +** GLX_LEVEL) +*/ +#define GLX_DONT_CARE 0xFFFFFFFF + +/* GLX_RENDER_TYPE bits */ +#define GLX_RGBA_BIT 0x00000001 +#define GLX_COLOR_INDEX_BIT 0x00000002 + +/* GLX_DRAWABLE_TYPE bits */ +#define GLX_WINDOW_BIT 0x00000001 +#define GLX_PIXMAP_BIT 0x00000002 +#define GLX_PBUFFER_BIT 0x00000004 + +/* GLX_CONFIG_CAVEAT attribute values */ +#define GLX_NONE 0x8000 +#define GLX_SLOW_CONFIG 0x8001 +#define GLX_NON_CONFORMANT_CONFIG 0x800D + +/* GLX_X_VISUAL_TYPE attribute values */ +#define GLX_TRUE_COLOR 0x8002 +#define GLX_DIRECT_COLOR 0x8003 +#define GLX_PSEUDO_COLOR 0x8004 +#define GLX_STATIC_COLOR 0x8005 +#define GLX_GRAY_SCALE 0x8006 +#define GLX_STATIC_GRAY 0x8007 + +/* GLX_TRANSPARENT_TYPE attribute values */ +/* #define GLX_NONE 0x8000 */ +#define GLX_TRANSPARENT_RGB 0x8008 +#define GLX_TRANSPARENT_INDEX 0x8009 + +/* glXCreateGLXPbuffer attributes */ +#define GLX_PRESERVED_CONTENTS 0x801B +#define GLX_LARGEST_PBUFFER 0x801C +#define GLX_PBUFFER_HEIGHT 0x8040 /* New for GLX 1.3 */ +#define GLX_PBUFFER_WIDTH 0x8041 /* New for GLX 1.3 */ + +/* glXQueryGLXPBuffer attributes */ +#define GLX_WIDTH 0x801D +#define GLX_HEIGHT 0x801E +#define GLX_EVENT_MASK 0x801F + +/* glXCreateNewContext render_type attribute values */ +#define GLX_RGBA_TYPE 0x8014 +#define GLX_COLOR_INDEX_TYPE 0x8015 + +/* glXQueryContext attributes */ +/* #define GLX_FBCONFIG_ID 0x8013 */ +/* #define GLX_RENDER_TYPE 0x8011 */ +#define GLX_SCREEN 0x800C + +/* glXSelectEvent event mask bits */ +#define GLX_PBUFFER_CLOBBER_MASK 0x08000000 +#define GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK 0x04000000 + +/* GLXPbufferClobberEvent event_type values */ +#define GLX_DAMAGED 0x8020 +#define GLX_SAVED 0x8021 +#define GLX_EXCHANGE_COMPLETE_INTEL 0x8180 +#define GLX_BLIT_COMPLETE_INTEL 0x8181 +#define GLX_FLIP_COMPLETE_INTEL 0x8182 + +/* GLXPbufferClobberEvent draw_type values */ +#define GLX_WINDOW 0x8022 +#define GLX_PBUFFER 0x8023 + +/* GLXPbufferClobberEvent buffer_mask bits */ +#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001 +#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002 +#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004 +#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008 +#define GLX_AUX_BUFFERS_BIT 0x00000010 +#define GLX_DEPTH_BUFFER_BIT 0x00000020 +#define GLX_STENCIL_BUFFER_BIT 0x00000040 +#define GLX_ACCUM_BUFFER_BIT 0x00000080 + +/* +** Extension return values from glXGetConfig. These are also +** accepted as parameter values for glXChooseVisual. +*/ + +#define GLX_X_VISUAL_TYPE_EXT 0x22 /* visual_info extension type */ +#define GLX_TRANSPARENT_TYPE_EXT 0x23 /* visual_info extension */ +#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24 /* visual_info extension */ +#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25 /* visual_info extension */ +#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26 /* visual_info extension */ +#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27 /* visual_info extension */ +#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28 /* visual_info extension */ + +/* Property values for visual_type */ +#define GLX_TRUE_COLOR_EXT 0x8002 +#define GLX_DIRECT_COLOR_EXT 0x8003 +#define GLX_PSEUDO_COLOR_EXT 0x8004 +#define GLX_STATIC_COLOR_EXT 0x8005 +#define GLX_GRAY_SCALE_EXT 0x8006 +#define GLX_STATIC_GRAY_EXT 0x8007 + +/* Property values for transparent pixel */ +#define GLX_NONE_EXT 0x8000 +#define GLX_TRANSPARENT_RGB_EXT 0x8008 +#define GLX_TRANSPARENT_INDEX_EXT 0x8009 + +/* Property values for visual_rating */ +#define GLX_VISUAL_CAVEAT_EXT 0x20 /* visual_rating extension type */ +#define GLX_SLOW_VISUAL_EXT 0x8001 +#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D + +/* Property values for swap method (GLX_OML_swap_method) */ +#define GLX_SWAP_METHOD_OML 0x8060 +#define GLX_SWAP_EXCHANGE_OML 0x8061 +#define GLX_SWAP_COPY_OML 0x8062 +#define GLX_SWAP_UNDEFINED_OML 0x8063 + +/* Property values for multi-sampling */ +#define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028 /* visuals grouped by select priority */ + +/* +** Names for attributes to glXGetClientString. +*/ +#define GLX_VENDOR 0x1 +#define GLX_VERSION 0x2 +#define GLX_EXTENSIONS 0x3 + +/* +** Names for attributes to glXQueryContextInfoEXT. +*/ +#define GLX_SHARE_CONTEXT_EXT 0x800A /* id of share context */ +#define GLX_VISUAL_ID_EXT 0x800B /* id of context's visual */ +#define GLX_SCREEN_EXT 0x800C /* screen number */ + +/* +** GLX_EXT_texture_from_pixmap +*/ +#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0 +#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1 +#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2 +#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3 +#define GLX_Y_INVERTED_EXT 0x20D4 + +#define GLX_TEXTURE_FORMAT_EXT 0x20D5 +#define GLX_TEXTURE_TARGET_EXT 0x20D6 +#define GLX_MIPMAP_TEXTURE_EXT 0x20D7 + +#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8 +#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9 +#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA + +#define GLX_TEXTURE_1D_BIT_EXT 0x00000001 +#define GLX_TEXTURE_2D_BIT_EXT 0x00000002 +#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004 + +#define GLX_TEXTURE_1D_EXT 0x20DB +#define GLX_TEXTURE_2D_EXT 0x20DC +#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD + +#define GLX_FRONT_LEFT_EXT 0x20DE +#define GLX_FRONT_RIGHT_EXT 0x20DF +#define GLX_BACK_LEFT_EXT 0x20E0 +#define GLX_BACK_RIGHT_EXT 0x20E1 +#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT +#define GLX_BACK_EXT GLX_BACK_LEFT_EXT +#define GLX_AUX0_EXT 0x20E2 +#define GLX_AUX1_EXT 0x20E3 +#define GLX_AUX2_EXT 0x20E4 +#define GLX_AUX3_EXT 0x20E5 +#define GLX_AUX4_EXT 0x20E6 +#define GLX_AUX5_EXT 0x20E7 +#define GLX_AUX6_EXT 0x20E8 +#define GLX_AUX7_EXT 0x20E9 +#define GLX_AUX8_EXT 0x20EA +#define GLX_AUX9_EXT 0x20EB + +/* + * GLX 1.4 and later: + */ +#define GLX_SAMPLE_BUFFERS_SGIS 100000 +#define GLX_SAMPLES_SGIS 100001 + +#ifdef __cplusplus +} +#endif + +#endif /* !__GLX_glxtokens_h__ */ |