Update to xextproto 7.1.1. Tested on a bulk port build by naddy@.

A few fallouts will be fixed shortly.
This commit is contained in:
matthieu 2010-05-10 20:02:59 +00:00
parent c698665859
commit 1fe9a460de
51 changed files with 1581 additions and 3806 deletions

View File

@ -177,3 +177,25 @@ suitability of this software for any purpose. It is provided
This software is not subject to any license of the American
Telephone and Telegraph Company or of the Regents of the
University of California.
Copyright © 2007-2008 Peter Hutterer
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.

View File

@ -1,3 +1,255 @@
commit 987aeb9bd1915a655f31e250ee9c02d04927b150
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue Aug 25 09:30:15 2009 +1000
xextproto 7.1.1
commit 55a0bbdde9b27b8dbc6e75d41c51af3f92dea6e3
Author: Eduard Bagrov <ebagrov@linuxtesting.org>
Date: Fri Aug 21 18:48:19 2009 +0200
Fix XSyncValueSubtract typo
X.Org bug#23438 <http://bugs.freedesktop.org/show_bug.cgi?id=23438>
Signed-off-by: Julien Cristau <jcristau@debian.org>
commit 23ac4d5235862d51f0cfb080ad2118a9fb181673
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed Aug 5 15:09:11 2009 +1000
xextproto 7.1.0
commit 5ffa318ddb35308e3a87122bfb3944e3201532ba
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed Aug 5 15:06:52 2009 +1000
lbxproto: remove debug macro and definition of lbxDebug.
This should not be in the protocol headers.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit 5a266968b1ced367df1a47dc9729313c85be0516
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed Jul 22 20:26:35 2009 +1000
Bump to 7.0.99.3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit d7ead7a591da851f6bb2efecdd35b63836df4ed0
Author: Magnus Kessler <Magnus.Kessler@gmx.net>
Date: Wed Jul 22 09:37:38 2009 +0100
Rename xtest.h to xtestconst.h to avoid a collision with XTest.h on case-insensitive filesystems
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit 2fd05eca7dd501c58b284d9cceb73d6146672b0a
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Tue Jul 21 13:35:58 2009 +1000
Bump to 7.0.99.2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit a049c37f789f881fad09e60a061488cba2b4072e
Author: Jon TURNEY <jon.turney@dronecode.org.uk>
Date: Mon Jul 20 22:42:59 2009 +0100
Rename mitmisc.h to mitmiscconst.h to avoid a collision with MITMisc.h on case-insensitive filesystems
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit 609c3b03fbed24f05d636d98dad9febc7226624c
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed Jul 15 16:28:12 2009 +1000
Remove RCS tags.
commit 6e9e47edf97a0bb504b4b65f5ef066f3d5e3d34b
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed Jul 15 16:20:13 2009 +1000
Bump to 7.0.99.1
commit ef8766e44c5cdd1e3ba7ebabf576e2de77f57a09
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Jun 25 11:43:12 2009 +1000
xtestext1: split xtestext1.h header into xtestext1proto.h
commit a1f0b58efce74176c71070818fa98c25021bb25e
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Jun 25 11:36:22 2009 +1000
sync: remove sync.h library header, split into syncconst.h
Rename syncstr.h to syncproto.h
commit 35ec2669091197a4e5b3c56d79ea26ae87759b16
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Jun 25 11:32:29 2009 +1000
shape: remove shape.h, split into shapeconst.h
Rename shapestr.h to shapeproto.h
commit 7cfdafd5ec565502a40e9e1f5b3edbb2be6aafbc
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Jun 25 11:30:17 2009 +1000
security: remove security.h, split into secur.h
Rename securstr.h to securproto.h
commit 19f527b4abe17b58dd78ec988a11c8081166cf01
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Jun 25 11:28:02 2009 +1000
multibuf: remove multibuf.h, split into multibufconst.h
commit 4b7fff5309f3e51e17372e3eaf91ee01c00ffd08
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Jun 25 11:19:04 2009 +1000
remove extutil.h, pure library header
commit 0af7f152239a0f14fc85acd146845c784bb1cd6a
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Jun 25 11:18:06 2009 +1000
dpms: remove dpms.h library header, split into dpmsconst.h
commit ac0dfab3fe1ae9c9633696825636a4bcfa14dfd6
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Jun 25 11:14:14 2009 +1000
Remove Xext.h and Xge.h - pure library headers.
commit 413572e112e24aa7a28632e13a8aa15c9fdaa57e
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Jun 25 11:10:01 2009 +1000
Xdbe: remove Xdbe.h library header, split into dbe.h
Rename Xdbeproto to dbeproto.h
commit d2574e8804a204653bda1786c1ece3437f7901a2
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Jun 25 11:04:12 2009 +1000
Xcup: remove XCup.h library header, split into cup.h
Rename Xcupstr.h to cupproto.h
commit 38daa9d8d9d86f3b9df12dd5032959822b7c0a45
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Jun 25 10:59:10 2009 +1000
Xag: remove Xag.h library header, split into Xagconst.h
commit 8cb2568c4a7df1eb0482009bf9150912e98969e6
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Jun 25 10:54:21 2009 +1000
XTest: remove XTest.h, split into xtest.h and xtestproto.h
To avoid conflicts, xtest.h uses a XTEST_CONST_H include barrier.
commit c63abdd1eb7bc1d8ae4e25073ef2f29d94991e2b
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Jun 25 10:46:33 2009 +1000
XShm: remove XShm.h library header, split into shm.h, shmproto.h
Removing Xlib function prototypes.
Move extension name to shm.h
Move protocol request opcodes to shmproto.h
commit 0adb09e032e3bd56426620b19438be9c0c66dd54
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Jun 25 10:43:32 2009 +1000
XLbx: remove XLbx library headers, split into lbx.h, lbxproto.h
Remove Xlib function prototypes.
Move extension name into lbx.h, move protocol opcodes into lbxproto.h
commit 727003b51844dd1bd41b668bedfa92d2bb7ef964
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Jun 25 10:30:40 2009 +1000
XEVI: remove XEVI.h library header, split into EVIproto.h
Remove Xlib function prototypes.
Move protocol opcodes to EVIproto.h
Move extension name from EVIproto.h into EVI.h
commit 3770d4bd035e43c8e2228d45184d9d398fccb325
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Jun 25 10:24:57 2009 +1000
MITMisc: remove MITMisc.h library header, split into mitmistproto.h
Moving extension name from mitmiststr.h into mitmisc.h.
Removing Xlib function prototypes from mitmisc.h.
Moving protocol request opcodes into mitmiscproto.h
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
commit 57d09e47d05fce0d6df4060b2eff9a8efcc25b2f
Author: Adam Jackson <ajax@redhat.com>
Date: Wed Jul 15 13:41:36 2009 -0400
Remove most LBX headers.
XLbx.h and lbxstr.h are required for libXext to build, and we're not
allowed to remove API from that.
commit 7629def0733b82687f2879095451d72e42e13db7
Author: James Cloos <cloos@jhcloos.com>
Date: Sat Mar 28 14:20:38 2009 -0400
C sucks: define XEventClass in terms of unsigned int, not CARD32.
Apparently pulling in Xmd.h here breaks qt, since they both define an
INT32 type (and incompatible ones even, since Xmd's is unsigned long on
ILP32 because whoever wrote Xmd.h is a C novice).
(Based on inputproto commit b5cbe2d93f6c0129b8f29da97778f6d1b15c38f9.
Patch submitted to xorg@ in <20090117121713.46bf3332@family.dyweni.com>.)
commit ac98d8c559dc798f09e35d13f51cb1116c6378bb
Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
Date: Thu Jan 29 16:22:20 2009 -0200
Bump to libXext Version 7.0.5.
Add required change to correct #18038
(patch to avoid gcc warning in libXext)
commit 8b5b82ec72dd6952d0664655715a0a47951454f4
Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
Date: Tue Jan 27 20:06:28 2009 -0200
Janitor: Correct make distcheck and dont distribute autogen.sh
commit fa652c6013a5d3ae8106814d97245fdbac3557ac
Author: Julien Cristau <jcristau@debian.org>
Date: Tue Dec 23 16:16:46 2008 +0100
Add geproto.txt to EXTRA_DIST
commit bd7f3e16b5a5520f0abb8c481f23a19219d26c7f
Author: Julien Cristau <jcristau@debian.org>
Date: Tue Dec 23 15:45:13 2008 +0100
COPYING: add Peter Hutterer's license and copyright notice
Taken from Xge.h
commit e1773d8ad7d36535f856dcb308be9a1b0601c1fc
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu Dec 18 10:10:42 2008 +1000
@ -35,7 +287,7 @@ Date: Mon May 12 17:26:02 2008 +0930
Xge: replace copyrights with standard format from xserver COPYING.
commit 9dc48efe2b3136756613ae00afd706f9a52d6f10
Merge: 69356e4... a07a30f...
Merge: 69356e4 a07a30f
Author: Peter Hutterer <peter@cs.unisa.edu.au>
Date: Mon May 12 17:22:14 2008 +0930

View File

@ -1,4 +1,3 @@
/* $Xorg: XEVI.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */
/************************************************************
Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc.
Permission to use, copy, modify, and distribute this
@ -21,44 +20,17 @@ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
/* $XFree86$ */
#ifndef _XEVI_H_
#define _XEVI_H_
#include <X11/Xfuncproto.h>
#define X_EVIQueryVersion 0
#define X_EVIGetVisualInfo 1
#ifndef _EVI_H_
#define _EVI_H_
#define XEVI_TRANSPARENCY_NONE 0
#define XEVI_TRANSPARENCY_PIXEL 1
#define XEVI_TRANSPARENCY_MASK 2
#ifndef _XEVI_SERVER_
typedef struct {
VisualID core_visual_id;
int screen;
int level;
unsigned int transparency_type;
unsigned int transparency_value;
unsigned int min_hw_colormaps;
unsigned int max_hw_colormaps;
unsigned int num_colormap_conflicts;
VisualID* colormap_conflicts;
} ExtendedVisualInfo;
_XFUNCPROTOBEGIN
Bool XeviQueryExtension(
Display* /* dpy */
);
Status XeviQueryVersion(
Display* /* dpy */,
int* /* majorVersion */,
int* /* minorVersion */
);
Status XeviGetVisualInfo(
Display* /* dpy */,
VisualID* /* visual_query */,
int /* nVisual_query */,
ExtendedVisualInfo** /* extendedVisualInfo_return */,
int* /* nInfo_return */
);
_XFUNCPROTOEND
#endif
#define EVINAME "Extended-Visual-Information"
#define XEVI_MAJOR_VERSION 1 /* current version numbers */
#define XEVI_MINOR_VERSION 0
#endif

View File

@ -1,4 +1,3 @@
/* $Xorg: XEVIstr.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */
/************************************************************
Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc.
Permission to use, copy, modify, and distribute this
@ -21,17 +20,16 @@ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
/* $XFree86$ */
#ifndef _EVISTR_H_
#define _EVISTR_H_
#ifndef _EVIPROTO_H_
#define _EVIPROTO_H_
#include <X11/extensions/XEVI.h>
#include <X11/extensions/EVI.h>
#define X_EVIQueryVersion 0
#define X_EVIGetVisualInfo 1
#define VisualID CARD32
#define EVINAME "Extended-Visual-Information"
#define XEVI_MAJOR_VERSION 1 /* current version numbers */
#define XEVI_MINOR_VERSION 0
typedef CARD32 VisualID32;
#define sz_VisualID32 4
@ -95,4 +93,4 @@ typedef struct _XEVIGetVisualInfoReply {
#undef VisualID
#endif /* _EVISTR_H_ */
#endif /* _EVIPROTO_H_ */

View File

@ -1,14 +1,14 @@
# $OpenBSD: Makefile,v 1.2 2008/09/14 07:32:43 matthieu Exp $
# $OpenBSD: Makefile,v 1.3 2010/05/10 20:02:59 matthieu Exp $
HEADERS_SUBDIR= X11/extensions/
HEADERS= dpms.h dpmsstr.h extutil.h ge.h geproto.h Xge.h \
lbxbuf.h lbxbufstr.h \
lbxdeltastr.h lbximage.h lbxopts.h lbxstr.h lbxzlib.h \
MITMisc.h mitmiscstr.h multibuf.h multibufst.h security.h \
securstr.h shape.h shapestr.h shmstr.h sync.h syncstr.h \
Xag.h Xagstr.h Xcup.h Xcupstr.h Xdbe.h \
Xdbeproto.h XEVI.h XEVIstr.h Xext.h XLbx.h XShm.h \
xtestext1.h XTest.h xteststr.h
HEADERS= dpmsconst.h dpmsproto.h ge.h geproto.h \
lbx.h lbxproto.h \
mitmiscconst.h mitmiscproto.h multibufconst.h multibufproto.h \
secur.h securproto.h shapeconst.h shapeproto.h \
shm.h shmproto.h syncconst.h syncproto.h \
ag.h agproto.h cup.h cupproto.h dbe.h \
dbeproto.h EVI.h EVIproto.h \
xtestext1proto.h xtestext1const.h xtestconst.h xtestproto.h
PKGCONFIG= xextproto.pc
.include <bsd.xorg.mk>

View File

@ -1,48 +1,40 @@
xextdir = $(includedir)/X11/extensions
xext_HEADERS = \
dpms.h \
dpmsstr.h \
extutil.h \
dpmsconst.h \
dpmsproto.h \
ge.h \
geproto.h \
Xge.h \
lbxbuf.h \
lbxbufstr.h \
lbxdeltastr.h \
lbximage.h \
lbxopts.h \
lbxstr.h \
lbxzlib.h \
MITMisc.h \
mitmiscstr.h \
multibuf.h \
multibufst.h \
security.h \
securstr.h \
shape.h \
shapestr.h \
shmstr.h \
sync.h \
syncstr.h \
Xag.h \
Xagstr.h \
Xcup.h \
Xcupstr.h \
Xdbe.h \
Xdbeproto.h \
XEVI.h \
XEVIstr.h \
Xext.h \
XLbx.h \
XShm.h \
xtestext1.h \
XTest.h \
xteststr.h
lbx.h \
lbxproto.h \
mitmiscconst.h \
mitmiscproto.h \
multibufconst.h \
multibufproto.h \
secur.h \
securproto.h \
shapeconst.h \
shapeproto.h \
shm.h \
shmproto.h \
syncconst.h \
syncproto.h \
ag.h \
agproto.h \
cup.h \
cupproto.h \
dbe.h \
dbeproto.h \
EVI.h \
EVIproto.h \
xtestext1proto.h \
xtestext1const.h \
xtestconst.h \
xtestproto.h
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = xextproto.pc
EXTRA_DIST = autogen.sh xextproto.pc.in
EXTRA_DIST = xextproto.pc.in geproto.txt
EXTRA_DIST += ChangeLog
MAINTAINERCLEANFILES = ChangeLog
@ -50,6 +42,6 @@ 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)
$(CHANGELOG_CMD)
dist-hook: ChangeLog

View File

@ -1,161 +0,0 @@
/* $XFree86: xc/include/extensions/XShm.h,v 1.11 2003/04/03 15:11:07 dawes Exp $ */
/************************************************************
Copyright 1989, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
********************************************************/
/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */
/* $Xorg: XShm.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
#ifndef _XSHM_H_
#define _XSHM_H_
#include <X11/Xfuncproto.h>
#define X_ShmQueryVersion 0
#define X_ShmAttach 1
#define X_ShmDetach 2
#define X_ShmPutImage 3
#define X_ShmGetImage 4
#define X_ShmCreatePixmap 5
#define ShmCompletion 0
#define ShmNumberEvents (ShmCompletion + 1)
#define BadShmSeg 0
#define ShmNumberErrors (BadShmSeg + 1)
typedef unsigned long ShmSeg;
#ifndef _XSHM_SERVER_
typedef struct {
int type; /* of event */
unsigned long serial; /* # of last request processed by server */
Bool send_event; /* true if this came frome a SendEvent request */
Display *display; /* Display the event was read from */
Drawable drawable; /* drawable of request */
int major_code; /* ShmReqCode */
int minor_code; /* X_ShmPutImage */
ShmSeg shmseg; /* the ShmSeg used in the request */
unsigned long offset; /* the offset into ShmSeg used in the request */
} XShmCompletionEvent;
typedef struct {
ShmSeg shmseg; /* resource id */
int shmid; /* kernel id */
char *shmaddr; /* address in client */
Bool readOnly; /* how the server should attach it */
} XShmSegmentInfo;
_XFUNCPROTOBEGIN
Bool XShmQueryExtension(
Display* /* dpy */
);
int XShmGetEventBase(
Display* /* dpy */
);
Bool XShmQueryVersion(
Display* /* dpy */,
int* /* majorVersion */,
int* /* minorVersion */,
Bool* /* sharedPixmaps */
);
int XShmPixmapFormat(
Display* /* dpy */
);
Status XShmAttach(
Display* /* dpy */,
XShmSegmentInfo* /* shminfo */
);
Status XShmDetach(
Display* /* dpy */,
XShmSegmentInfo* /* shminfo */
);
Status XShmPutImage(
Display* /* dpy */,
Drawable /* d */,
GC /* gc */,
XImage* /* image */,
int /* src_x */,
int /* src_y */,
int /* dst_x */,
int /* dst_y */,
unsigned int /* src_width */,
unsigned int /* src_height */,
Bool /* send_event */
);
Status XShmGetImage(
Display* /* dpy */,
Drawable /* d */,
XImage* /* image */,
int /* x */,
int /* y */,
unsigned long /* plane_mask */
);
XImage *XShmCreateImage(
Display* /* dpy */,
Visual* /* visual */,
unsigned int /* depth */,
int /* format */,
char* /* data */,
XShmSegmentInfo* /* shminfo */,
unsigned int /* width */,
unsigned int /* height */
);
Pixmap XShmCreatePixmap(
Display* /* dpy */,
Drawable /* d */,
char* /* data */,
XShmSegmentInfo* /* shminfo */,
unsigned int /* width */,
unsigned int /* height */,
unsigned int /* depth */
);
_XFUNCPROTOEND
#else /* _XSHM_SERVER_ */
#include "screenint.h"
#include "pixmap.h"
#include "gc.h"
extern void ShmRegisterFbFuncs(
ScreenPtr /* pScreen */
);
#endif
#endif

View File

@ -1,164 +0,0 @@
/* $Xorg: XTest.h,v 1.5 2001/02/09 02:03:24 xorgcvs Exp $ */
/*
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.
*/
/* $XFree86: xc/include/extensions/XTest.h,v 3.3 2001/12/14 19:53:28 dawes Exp $ */
#ifndef _XTEST_H_
#define _XTEST_H_
#include <X11/Xfuncproto.h>
#define X_XTestGetVersion 0
#define X_XTestCompareCursor 1
#define X_XTestFakeInput 2
#define X_XTestGrabControl 3
#define XTestNumberEvents 0
#define XTestNumberErrors 0
#define XTestMajorVersion 2
#define XTestMinorVersion 2
#define XTestExtensionName "XTEST"
#ifndef _XTEST_SERVER_
#include <X11/extensions/XInput.h>
_XFUNCPROTOBEGIN
Bool XTestQueryExtension(
Display* /* dpy */,
int* /* event_basep */,
int* /* error_basep */,
int* /* majorp */,
int* /* minorp */
);
Bool XTestCompareCursorWithWindow(
Display* /* dpy */,
Window /* window */,
Cursor /* cursor */
);
Bool XTestCompareCurrentCursorWithWindow(
Display* /* dpy */,
Window /* window */
);
extern int XTestFakeKeyEvent(
Display* /* dpy */,
unsigned int /* keycode */,
Bool /* is_press */,
unsigned long /* delay */
);
extern int XTestFakeButtonEvent(
Display* /* dpy */,
unsigned int /* button */,
Bool /* is_press */,
unsigned long /* delay */
);
extern int XTestFakeMotionEvent(
Display* /* dpy */,
int /* screen */,
int /* x */,
int /* y */,
unsigned long /* delay */
);
extern int XTestFakeRelativeMotionEvent(
Display* /* dpy */,
int /* x */,
int /* y */,
unsigned long /* delay */
);
extern int XTestFakeDeviceKeyEvent(
Display* /* dpy */,
XDevice* /* dev */,
unsigned int /* keycode */,
Bool /* is_press */,
int* /* axes */,
int /* n_axes */,
unsigned long /* delay */
);
extern int XTestFakeDeviceButtonEvent(
Display* /* dpy */,
XDevice* /* dev */,
unsigned int /* button */,
Bool /* is_press */,
int* /* axes */,
int /* n_axes */,
unsigned long /* delay */
);
extern int XTestFakeProximityEvent(
Display* /* dpy */,
XDevice* /* dev */,
Bool /* in_prox */,
int* /* axes */,
int /* n_axes */,
unsigned long /* delay */
);
extern int XTestFakeDeviceMotionEvent(
Display* /* dpy */,
XDevice* /* dev */,
Bool /* is_relative */,
int /* first_axis */,
int* /* axes */,
int /* n_axes */,
unsigned long /* delay */
);
extern int XTestGrabControl(
Display* /* dpy */,
Bool /* impervious */
);
void XTestSetGContextOfGC(
GC /* gc */,
GContext /* gid */
);
void XTestSetVisualIDOfVisual(
Visual* /* visual */,
VisualID /* visualid */
);
Status XTestDiscard(
Display* /* dpy */
);
_XFUNCPROTOEND
#endif /* _XTEST_SERVER_ */
#endif

View File

@ -1,114 +0,0 @@
/* $XFree86: xc/include/extensions/Xag.h,v 1.5 2001/12/17 20:52:24 dawes Exp $ */
/*
Copyright 1996, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall
not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization
from The Open Group.
*/
/* $Xorg: Xag.h,v 1.5 2001/02/09 02:03:24 xorgcvs Exp $ */
#ifndef _XAG_H_
#define _XAG_H_
#include <X11/Xfuncproto.h>
#define X_XagQueryVersion 0
#define X_XagCreate 1
#define X_XagDestroy 2
#define X_XagGetAttr 3
#define X_XagQuery 4
#define X_XagCreateAssoc 5
#define X_XagDestroyAssoc 6
#define XagBadAppGroup 0
#define XagNumberErrors (XagBadAppGroup + 1)
#define XagNsingleScreen 7
#define XagNdefaultRoot 1
#define XagNrootVisual 2
#define XagNdefaultColormap 3
#define XagNblackPixel 4
#define XagNwhitePixel 5
#define XagNappGroupLeader 6
#ifndef _XAG_SERVER_
#include <stdarg.h>
_XFUNCPROTOBEGIN
typedef XID XAppGroup;
Bool XagQueryVersion(
Display* /* dpy */,
int* /* major_version */,
int* /* minor_version */
);
Status XagCreateEmbeddedApplicationGroup(
Display* /* dpy */,
VisualID /* root_visual */,
Colormap /* default_colormap */,
unsigned long /* black_pixel */,
unsigned long /* white_pixel */,
XAppGroup* /* app_group_return */
);
Status XagCreateNonembeddedApplicationGroup(
Display* /* dpy */,
XAppGroup* /* app_group_return */
);
Status XagDestroyApplicationGroup(
Display* /* dpy */,
XAppGroup /* app_group */
);
Status XagGetApplicationGroupAttributes(
Display* /* dpy */,
XAppGroup /* app_group */,
...
);
Status XagQueryApplicationGroup(
Display* /* dpy */,
XID /* resource_base */,
XAppGroup* /* app_group_ret */
);
Status XagCreateAssociation(
Display* /* dpy */,
Window* /* window_ret */,
void* /* system_window */
);
Status XagDestroyAssociation(
Display* /* dpy */,
Window /* window */
);
_XFUNCPROTOEND
#endif /* _XAG_SERVER_ */
#endif /* _XAG_H_ */

View File

@ -1,136 +0,0 @@
/* $Xorg: Xdbe.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */
/******************************************************************************
*
* Copyright (c) 1994, 1995 Hewlett-Packard Company
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL HEWLETT-PACKARD COMPANY BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Except as contained in this notice, the name of the Hewlett-Packard
* Company shall not be used in advertising or otherwise to promote the
* sale, use or other dealings in this Software without prior written
* authorization from the Hewlett-Packard Company.
*
* Header file for Xlib-related DBE
*
*****************************************************************************/
/* $XFree86: xc/include/extensions/Xdbe.h,v 3.2 2001/08/01 00:44:35 tsi Exp $ */
#ifndef XDBE_H
#define XDBE_H
/* INCLUDES */
#include <X11/Xfuncproto.h>
#include <X11/extensions/Xdbeproto.h>
/* DEFINES */
/* Errors */
#define XdbeBadBuffer 0
/* TYPEDEFS */
typedef Drawable XdbeBackBuffer;
typedef unsigned char XdbeSwapAction;
typedef struct
{
Window swap_window; /* window for which to swap buffers */
XdbeSwapAction swap_action; /* swap action to use for swap_window */
}
XdbeSwapInfo;
typedef struct
{
Window window; /* window that buffer belongs to */
}
XdbeBackBufferAttributes;
typedef struct
{
int type;
Display *display; /* display the event was read from */
XdbeBackBuffer buffer; /* resource id */
unsigned long serial; /* serial number of failed request */
unsigned char error_code; /* error base + XdbeBadBuffer */
unsigned char request_code; /* major opcode of failed request */
unsigned char minor_code; /* minor opcode of failed request */
}
XdbeBufferError;
/* _XFUNCPROTOBEGIN and _XFUNCPROTOEND are defined as noops
* (for non-C++ builds) in X11/Xfuncproto.h.
*/
_XFUNCPROTOBEGIN
extern Status XdbeQueryExtension(
Display* /* dpy */,
int* /* major_version_return */,
int* /* minor_version_return */
);
extern XdbeBackBuffer XdbeAllocateBackBufferName(
Display* /* dpy */,
Window /* window */,
XdbeSwapAction /* swap_action */
);
extern Status XdbeDeallocateBackBufferName(
Display* /* dpy */,
XdbeBackBuffer /* buffer */
);
extern Status XdbeSwapBuffers(
Display* /* dpy */,
XdbeSwapInfo* /* swap_info */,
int /* num_windows */
);
extern Status XdbeBeginIdiom(
Display* /* dpy */
);
extern Status XdbeEndIdiom(
Display* /* dpy */
);
extern XdbeScreenVisualInfo *XdbeGetVisualInfo(
Display* /* dpy */,
Drawable* /* screen_specifiers */,
int* /* num_screens */
);
extern void XdbeFreeVisualInfo(
XdbeScreenVisualInfo* /* visual_info */
);
extern XdbeBackBufferAttributes *XdbeGetBackBufferAttributes(
Display* /* dpy */,
XdbeBackBuffer /* buffer */
);
_XFUNCPROTOEND
#endif /* XDBE_H */

View File

@ -1,55 +0,0 @@
/*
* Copyright ?2007-2008 Peter Hutterer
*
* 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.
*
* Authors: Peter Hutterer, University of South Australia, NICTA
*
*/
/* XGE Client interfaces */
#ifndef _XGE_H_
#define _XGE_H_
#include <X11/Xmd.h>
#include <X11/Xlib.h>
#include <X11/Xfuncproto.h>
_XFUNCPROTOBEGIN
/**
* Generic Event mask.
* To be used whenever a list of masks per extension has to be provided.
*/
typedef struct {
CARD8 extension;
CARD8 pad0;
CARD16 pad1;
CARD32 evmask;
} XGenericEventMask;
Bool XGEQueryExtension(Display* dpy, int *event_basep, int *err_basep);
Bool XGEQueryVersion(Display* dpy, int *major, int* minor);
_XFUNCPROTOEND
#endif /* _XGE_H_ */

52
proto/xextproto/ag.h Normal file
View File

@ -0,0 +1,52 @@
/*
Copyright 1996, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall
not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization
from The Open Group.
*/
#ifndef _AG_H_
#define _AG_H_
#define XAGNAME "XC-APPGROUP"
#define XAG_MAJOR_VERSION 1 /* current version numbers */
#define XAG_MINOR_VERSION 0
#define XagWindowTypeX11 0
#define XagWindowTypeMacintosh 1
#define XagWindowTypeWin32 2
#define XagWindowTypeWin16 3
#define XagBadAppGroup 0
#define XagNumberErrors (XagBadAppGroup + 1)
#define XagNsingleScreen 7
#define XagNdefaultRoot 1
#define XagNrootVisual 2
#define XagNdefaultColormap 3
#define XagNblackPixel 4
#define XagNwhitePixel 5
#define XagNappGroupLeader 6
#endif /* _AG_H_ */

View File

@ -1,4 +1,3 @@
/* $XFree86: xc/include/extensions/Xagstr.h,v 1.4 2001/12/14 19:53:28 dawes Exp $ */
/*
Copyright 1996, 1998, 2001 The Open Group
@ -24,36 +23,33 @@ not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization
from The Open Group.
*/
/* $Xorg: Xagstr.h,v 1.6 2001/02/09 02:03:24 xorgcvs Exp $ */
#ifndef _XAGSTR_H_ /* { */
#define _XAGSTR_H_
#ifndef _AGPROTO_H_ /* { */
#define _AGPROTO_H_
#include <X11/extensions/Xag.h>
#include <X11/extensions/ag.h>
#define X_XagQueryVersion 0
#define X_XagCreate 1
#define X_XagDestroy 2
#define X_XagGetAttr 3
#define X_XagQuery 4
#define X_XagCreateAssoc 5
#define X_XagDestroyAssoc 6
#define XAppGroup CARD32
#define XAGNAME "XC-APPGROUP"
#define XAG_MAJOR_VERSION 1 /* current version numbers */
#define XAG_MINOR_VERSION 0
#define XagWindowTypeX11 0
#define XagWindowTypeMacintosh 1
#define XagWindowTypeWin32 2
#define XagWindowTypeWin16 3
/*
* Redefine some basic types used by structures defined herein. This allows
* both the library and server to view communicated data as 32-bit entities,
* thus preventing problems on 64-bit architectures where libXext sees this
* data as 64 bits and the server sees it as 32 bits.
*/
#define Colormap CARD32
#define VisualID CARD32
#define Window CARD32
typedef struct _XagQueryVersion {
CARD8 reqType; /* always XagReqCode */
CARD8 xagReqType; /* always X_XagQueryVersion */
@ -178,5 +174,5 @@ typedef struct _XagDestroyAssoc {
#undef Colormap
#undef VisualID
#endif /* } _XAGSTR_H_ */
#endif /* } _AGPROTO_H_ */

View File

@ -1,12 +0,0 @@
#! /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 "$@"

View File

@ -1,8 +1,12 @@
AC_PREREQ([2.57])
AC_INIT([XExtProto], [7.0.4], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
AC_INIT([XExtProto], [7.1.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
# Require xorg-macros: XORG_CHANGELOG
m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])])
XORG_MACROS_VERSION(1.2)
XORG_RELEASE_VERSION
XORG_CHANGELOG
AC_OUTPUT([Makefile
xextproto.pc])

View File

@ -1,4 +1,3 @@
/* $Xorg: Xcup.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
/*
Copyright 1987, 1988, 1998 The Open Group
@ -24,46 +23,16 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
/* $XFree86$ */
#ifndef _XCUP_H_
#define _XCUP_H_
#ifndef _CUP_H_
#define _CUP_H_
#include <X11/Xfuncproto.h>
#define XCUPNAME "TOG-CUP"
#define X_XcupQueryVersion 0
#define X_XcupGetReservedColormapEntries 1
#define X_XcupStoreColors 2
#define XCUP_MAJOR_VERSION 1 /* current version numbers */
#define XCUP_MINOR_VERSION 0
#define XcupNumberErrors 0
#ifndef _XCUP_SERVER_
_XFUNCPROTOBEGIN
Bool XcupQueryVersion(
Display* /* dpy */,
int* /* major_version */,
int* /* minor_version */
);
Status XcupGetReservedColormapEntries(
Display* /* dpy */,
int /* screen */,
XColor** /* colors_out */,
int* /* ncolors */
);
Status XcupStoreColors(
Display* /* dpy */,
Colormap /* colormap */,
XColor* /* colors */,
int /* ncolors */
);
_XFUNCPROTOEND
#endif /* _XCUP_SERVER_ */
#endif /* _XCUP_H_ */
#endif /* _CUP_H_ */

View File

@ -1,5 +1,3 @@
/* $Xorg: Xcupstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
/*
Copyright 1987, 1988, 1998 The Open Group
@ -25,17 +23,15 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
/* $XFree86: xc/include/extensions/Xcupstr.h,v 3.5 2001/08/01 00:44:35 tsi Exp $ */
#ifndef _XCUPSTR_H_ /* { */
#define _XCUPSTR_H_
#ifndef _XCUPPROTO_H_ /* { */
#define _XCUPPROTO_H_
#include <X11/extensions/Xcup.h>
#include <X11/extensions/cup.h>
#define XCUPNAME "TOG-CUP"
#define XCUP_MAJOR_VERSION 1 /* current version numbers */
#define XCUP_MINOR_VERSION 0
#define X_XcupQueryVersion 0
#define X_XcupGetReservedColormapEntries 1
#define X_XcupStoreColors 2
typedef struct _XcupQueryVersion {
CARD8 reqType; /* always XcupReqCode */
@ -105,5 +101,5 @@ typedef struct {
} xXcupStoreColorsReply;
#define sz_xXcupStoreColorsReply 32
#endif /* } _XCUPSTR_H_ */
#endif /* } _XCUPPROTO_H_ */

57
proto/xextproto/dbe.h Normal file
View File

@ -0,0 +1,57 @@
/******************************************************************************
*
* Copyright (c) 1994, 1995 Hewlett-Packard Company
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL HEWLETT-PACKARD COMPANY BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Except as contained in this notice, the name of the Hewlett-Packard
* Company shall not be used in advertising or otherwise to promote the
* sale, use or other dealings in this Software without prior written
* authorization from the Hewlett-Packard Company.
*
* Header file for Xlib-related DBE
*
*****************************************************************************/
#ifndef DBE_H
#define DBE_H
/* Values for swap_action field of XdbeSwapInfo structure */
#define XdbeUndefined 0
#define XdbeBackground 1
#define XdbeUntouched 2
#define XdbeCopied 3
/* Errors */
#define XdbeBadBuffer 0
#define DBE_PROTOCOL_NAME "DOUBLE-BUFFER"
/* Current version numbers */
#define DBE_MAJOR_VERSION 1
#define DBE_MINOR_VERSION 0
/* Used when adding extension; also used in Xdbe macros */
#define DbeNumberEvents 0
#define DbeBadBuffer 0
#define DbeNumberErrors (DbeBadBuffer + 1)
#endif /* DBE_H */

View File

@ -1,6 +1,5 @@
/* $Xorg: Xdbeproto.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */
/******************************************************************************
*
*
* Copyright (c) 1994, 1995 Hewlett-Packard Company
*
* Permission is hereby granted, free of charge, to any person obtaining
@ -10,10 +9,10 @@
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@ -21,43 +20,20 @@
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
* Except as contained in this notice, the name of the Hewlett-Packard
* Company shall not be used in advertising or otherwise to promote the
* sale, use or other dealings in this Software without prior written
* authorization from the Hewlett-Packard Company.
*
*
* Header file for Xlib-related DBE
*
*****************************************************************************/
#ifndef DBE_PROTO_H
#define DBE_PROTO_H
#ifndef XDBE_PROTO_H
#define XDBE_PROTO_H
/* INCLUDES */
/* DEFINES */
/* Values for swap_action field of XdbeSwapInfo structure */
#define XdbeUndefined 0
#define XdbeBackground 1
#define XdbeUntouched 2
#define XdbeCopied 3
#ifdef NEED_DBE_PROTOCOL
#define DBE_PROTOCOL_NAME "DOUBLE-BUFFER"
/* Current version numbers */
#define DBE_MAJOR_VERSION 1
#define DBE_MINOR_VERSION 0
/* Used when adding extension; also used in Xdbe macros */
#define DbeNumberEvents 0
#define DbeBadBuffer 0
#define DbeNumberErrors (DbeBadBuffer + 1)
#include <X11/extensions/dbe.h>
/* Request values used in (S)ProcDbeDispatch() */
#define X_DbeGetVersion 0
@ -72,37 +48,10 @@
typedef CARD8 xDbeSwapAction;
typedef CARD32 xDbeBackBuffer;
#endif /* NEED_DBE_PROTOCOL */
/* TYPEDEFS */
/* Client data types */
/* XdbeVisualInfo and XdbeScreenVisualInfo are defined in this file,
* "Xdbeproto.h", rather than "Xdbe.h" because the server uses these data
* types.
*/
typedef struct
{
VisualID visual; /* one visual ID that supports double-buffering */
int depth; /* depth of visual in bits */
int perflevel; /* performance level of visual */
}
XdbeVisualInfo;
typedef struct
{
int count; /* number of items in visual_depth */
XdbeVisualInfo *visinfo; /* list of visuals & depths for scrn */
}
XdbeScreenVisualInfo;
/* Protocol data types */
#ifdef NEED_DBE_PROTOCOL
typedef struct
{
CARD32 window B32; /* window */
@ -271,7 +220,5 @@ typedef struct
} xDbeGetBackBufferAttributesReply;
#define sz_xDbeGetBackBufferAttributesReply 32
#endif /* NEED_DBE_PROTOCOL */
#endif /* XDBE_PROTO_H */
#endif /* DBE_PROTO_H */

View File

@ -1,4 +1,3 @@
/* $Xorg: dpms.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */
/*****************************************************************
Copyright (c) 1996 Digital Equipment Corporation, Maynard, Massachusetts.
@ -15,53 +14,30 @@ 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
DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL 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 Digital Equipment Corporation
Except as contained in this notice, the name of Digital Equipment Corporation
shall not be used in advertising or otherwise to promote the sale, use or other
dealings in this Software without prior written authorization from Digital
dealings in this Software without prior written authorization from Digital
Equipment Corporation.
******************************************************************/
/* $XFree86: xc/include/extensions/dpms.h,v 3.4 2000/03/15 16:51:51 tsi Exp $ */
#ifndef _X11_EXTENSIONS_DPMS_H
#define _X11_EXTENSIONS_DPMS_H 1
#ifndef _DPMSCONST_H
#define _DPMSCONST_H 1
/*
* HISTORY
*/
/*
* @(#)RCSfile: dpms.h,v Revision: 1.1.4.2 (DEC) Date: 1995/11/21 19:34:17
*/
#define DPMSMajorVersion 1
#define DPMSMinorVersion 1
#define DPMSExtensionName "DPMS"
#define DPMSModeOn 0
#define DPMSModeStandby 1
#define DPMSModeSuspend 2
#define DPMSModeOff 3
#ifndef DPMS_SERVER
#include <X11/X.h>
#include <X11/Xmd.h>
_XFUNCPROTOBEGIN
extern Bool DPMSQueryExtension(Display *, int *, int *);
extern Status DPMSGetVersion(Display *, int *, int *);
extern Bool DPMSCapable(Display *);
extern Status DPMSSetTimeouts(Display *, CARD16, CARD16, CARD16);
extern Bool DPMSGetTimeouts(Display *, CARD16 *, CARD16 *, CARD16 *);
extern Status DPMSEnable(Display *);
extern Status DPMSDisable(Display *);
extern Status DPMSForceLevel(Display *, CARD16);
extern Status DPMSInfo(Display *, CARD16 *, BOOL *);
_XFUNCPROTOEND
#endif /* !DPMS_SERVER */
#endif /* !_X11_EXTENSIONS_DPMS_H */
#endif /* !_DPMSCONST_H */

View File

@ -1,4 +1,3 @@
/* $Xorg: dpmsstr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */
/*****************************************************************
Copyright (c) 1996 Digital Equipment Corporation, Maynard, Massachusetts.
@ -15,28 +14,22 @@ 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
DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL 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 Digital Equipment Corporation
Except as contained in this notice, the name of Digital Equipment Corporation
shall not be used in advertising or otherwise to promote the sale, use or other
dealings in this Software without prior written authorization from Digital
dealings in this Software without prior written authorization from Digital
Equipment Corporation.
******************************************************************/
/* $XFree86$ */
/*
* HISTORY
*/
/*
* @(#)RCSfile: dpmsstr.h,v Revision: 1.1.4.2 (DEC) Date: 1995/11/21 19:34:19
*/
#ifndef _DPMSPROTO_H_
#define _DPMSPROTO_H_
#ifndef _DPMSSTR_H_
#define _DPMSSTR_H_
#include <X11/extensions/dpmsconst.h>
#define X_DPMSGetVersion 0
#define X_DPMSCapable 1
@ -51,10 +44,6 @@ Equipment Corporation.
#define DPMSNumberErrors 0
#define DPMSMajorVersion 1
#define DPMSMinorVersion 1
#define DPMSExtensionName "DPMS"
typedef struct {
CARD8 reqType; /* always DPMSCode */
@ -183,4 +172,4 @@ typedef struct {
} xDPMSInfoReply;
#define sz_xDPMSInfoReply 32
#endif /* _DPMSSTR_H_ */
#endif /* _DPMSPROTO_H_ */

View File

@ -1,192 +0,0 @@
/*
* $Xorg: extutil.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $
*
Copyright 1989, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*
* Author: Jim Fulton, MIT The Open Group
*
* Xlib Extension-Writing Utilities
*
* This package contains utilities for writing the client API for various
* protocol extensions. THESE INTERFACES ARE NOT PART OF THE X STANDARD AND
* ARE SUBJECT TO CHANGE!
*/
/* $XFree86: xc/include/extensions/extutil.h,v 1.9 2001/12/14 19:53:28 dawes Exp $ */
#ifndef _EXTUTIL_H_
#define _EXTUTIL_H_
#include <X11/extensions/Xext.h>
/*
* We need to keep a list of open displays since the Xlib display list isn't
* public. We also have to per-display info in a separate block since it isn't
* stored directly in the Display structure.
*/
typedef struct _XExtDisplayInfo {
struct _XExtDisplayInfo *next; /* keep a linked list */
Display *display; /* which display this is */
XExtCodes *codes; /* the extension protocol codes */
XPointer data; /* extra data for extension to use */
} XExtDisplayInfo;
typedef struct _XExtensionInfo {
XExtDisplayInfo *head; /* start of list */
XExtDisplayInfo *cur; /* most recently used */
int ndisplays; /* number of displays */
} XExtensionInfo;
typedef struct _XExtensionHooks {
int (*create_gc)(
Display* /* display */,
GC /* gc */,
XExtCodes* /* codes */
);
int (*copy_gc)(
Display* /* display */,
GC /* gc */,
XExtCodes* /* codes */
);
int (*flush_gc)(
Display* /* display */,
GC /* gc */,
XExtCodes* /* codes */
);
int (*free_gc)(
Display* /* display */,
GC /* gc */,
XExtCodes* /* codes */
);
int (*create_font)(
Display* /* display */,
XFontStruct* /* fs */,
XExtCodes* /* codes */
);
int (*free_font)(
Display* /* display */,
XFontStruct* /* fs */,
XExtCodes* /* codes */
);
int (*close_display)(
Display* /* display */,
XExtCodes* /* codes */
);
Bool (*wire_to_event)(
Display* /* display */,
XEvent* /* re */,
xEvent* /* event */
);
Status (*event_to_wire)(
Display* /* display */,
XEvent* /* re */,
xEvent* /* event */
);
int (*error)(
Display* /* display */,
xError* /* err */,
XExtCodes* /* codes */,
int* /* ret_code */
);
char *(*error_string)(
Display* /* display */,
int /* code */,
XExtCodes* /* codes */,
char* /* buffer */,
int /* nbytes */
);
} XExtensionHooks;
extern XExtensionInfo *XextCreateExtension(
void
);
extern void XextDestroyExtension(
XExtensionInfo* /* info */
);
extern XExtDisplayInfo *XextAddDisplay(
XExtensionInfo* /* extinfo */,
Display* /* dpy */,
char* /* ext_name */,
XExtensionHooks* /* hooks */,
int /* nevents */,
XPointer /* data */
);
extern int XextRemoveDisplay(
XExtensionInfo* /* extinfo */,
Display* /* dpy */
);
extern XExtDisplayInfo *XextFindDisplay(
XExtensionInfo* /* extinfo */,
Display* /* dpy */
);
#define XextHasExtension(i) ((i) && ((i)->codes))
#define XextCheckExtension(dpy,i,name,val) \
if (!XextHasExtension(i)) { XMissingExtension (dpy, name); return val; }
#define XextSimpleCheckExtension(dpy,i,name) \
if (!XextHasExtension(i)) { XMissingExtension (dpy, name); return; }
/*
* helper macros to generate code that is common to all extensions; caller
* should prefix it with static if extension source is in one file; this
* could be a utility function, but have to stack 6 unused arguments for
* something that is called many, many times would be bad.
*/
#define XEXT_GENERATE_FIND_DISPLAY(proc,extinfo,extname,hooks,nev,data) \
XExtDisplayInfo *proc (Display *dpy) \
{ \
XExtDisplayInfo *dpyinfo; \
if (!extinfo) { if (!(extinfo = XextCreateExtension())) return NULL; } \
if (!(dpyinfo = XextFindDisplay (extinfo, dpy))) \
dpyinfo = XextAddDisplay (extinfo,dpy,extname,hooks,nev,data); \
return dpyinfo; \
}
#define XEXT_FIND_DISPLAY_PROTO(proc) \
XExtDisplayInfo *proc(Display *dpy)
#define XEXT_GENERATE_CLOSE_DISPLAY(proc,extinfo) \
int proc (Display *dpy, XExtCodes *codes) \
{ \
return XextRemoveDisplay (extinfo, dpy); \
}
#define XEXT_CLOSE_DISPLAY_PROTO(proc) \
int proc(Display *dpy, XExtCodes *codes)
#define XEXT_GENERATE_ERROR_STRING(proc,extname,nerr,errl) \
char *proc (Display *dpy, int code, XExtCodes *codes, char *buf, int n) \
{ \
code -= codes->first_error; \
if (code >= 0 && code < nerr) { \
char tmp[256]; \
sprintf (tmp, "%s.%d", extname, code); \
XGetErrorDatabaseText (dpy, "XProtoError", tmp, errl[code], buf, n); \
return buf; \
} \
return (char *)0; \
}
#define XEXT_ERROR_STRING_PROTO(proc) \
char *proc(Display *dpy, int code, XExtCodes *codes, char *buf, int n)
#endif

View File

@ -0,0 +1,83 @@
X Generic Event Extension
Peter Hutterer
peter.hutterer@who-t.net
1. Introduction
2. Extension Initialization
3. Extension Events
4. Notes
_____________________________________________________________________________
1. Introduction
X was designed to provide 64 event opcodes for all extensions. These events
are limited to 32 bytes.
The Generic Event Extension provides a template event for extensions to re-use
a single event opcode. GE only provide headers and the most basic
functionality, leaving the extensions to interpret the events in their
specific context.
GenericEvents may be longer than 32 bytes. If so, the number of 4 byte units
following the initial 32 bytes must be specified in the length field of the
event.
_____________________________________________________________________________
2. Extension Initialization
The name of this extension is "Generic Event Extension"
┌───
GEQueryVersion
client-major-version: CARD16
client-minor-version: CARD16
major-version: CARD16
minor-version: CARD16
└───
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.
As of version 1.0, no other requests are provided by this extension.
_____________________________________________________________________________
3. Extension Events
GE defines a single event, to be used by all extensions. The event's structure
is similar to a reply.
┌───
GenericEvent
type: BYTE; always GenericEvent
extension: CARD8; extension offset
sequenceNumber: CARD16 low 16 bits of request seq. number
length: CARD32 length
evtype: CARD16 event type
└───
The field 'extension' is to be set to the major opcode of the
extension. The 'evtype' field is the actual opcode of the event.
The length field specifies the number of 4-byte blocks after the
initial 32 bytes. If length is 0, the event is 32 bytes long.
_____________________________________________________________________________
4. Notes
Although the wire event is of arbitrary length, the actual size of an XEvent
is restricted to sizeof(XEvent) [96 bytes, see Xlib.h]. If an extension
converts a wire event to an XEvent > 96 bytes, it will overwrite the space
allocated for the event. See struct _XSQEvent in Xlibint.h for details.
Extensions need to malloc additional data and fill the XEvent structure with
pointers to the malloc'd data. The client then needs to free the data, only
the XEvent structure will be released by Xlib.
The server must not send GenericEvents longer than 32 bytes until it has
verified that the client is able to interpret these events. If a long event is
sent to a client unable to process GenericEvents, future interpretation of
replies and events by this client will fail.

View File

@ -1,4 +1,3 @@
/* $Xorg: XLbx.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */
/*
* Copyright 1992 Network Computing Devices
*
@ -16,75 +15,20 @@
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD.
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
/* $XFree86: xc/include/extensions/XLbx.h,v 1.3 2002/10/16 01:59:55 dawes Exp $ */
#ifndef _XLBX_H_
#define _XLBX_H_
#include <X11/Xfuncproto.h>
#ifndef _LBX_H_
#define _LBX_H_
/*
* NOTE: any changes or additions to the opcodes needs to be reflected
* in the lbxCacheable array in Xserver/lbx/lbxmain.c
*/
#define X_LbxQueryVersion 0
#define X_LbxStartProxy 1
#define X_LbxStopProxy 2
#define X_LbxSwitch 3
#define X_LbxNewClient 4
#define X_LbxCloseClient 5
#define X_LbxModifySequence 6
#define X_LbxAllowMotion 7
#define X_LbxIncrementPixel 8
#define X_LbxDelta 9
#define X_LbxGetModifierMapping 10
#define X_LbxInvalidateTag 12
#define X_LbxPolyPoint 13
#define X_LbxPolyLine 14
#define X_LbxPolySegment 15
#define X_LbxPolyRectangle 16
#define X_LbxPolyArc 17
#define X_LbxFillPoly 18
#define X_LbxPolyFillRectangle 19
#define X_LbxPolyFillArc 20
#define X_LbxGetKeyboardMapping 21
#define X_LbxQueryFont 22
#define X_LbxChangeProperty 23
#define X_LbxGetProperty 24
#define X_LbxTagData 25
#define LBXNAME "LBX"
#define X_LbxCopyArea 26
#define X_LbxCopyPlane 27
#define X_LbxPolyText8 28
#define X_LbxPolyText16 29
#define X_LbxImageText8 30
#define X_LbxImageText16 31
#define X_LbxQueryExtension 32
#define X_LbxPutImage 33
#define X_LbxGetImage 34
#define X_LbxBeginLargeRequest 35
#define X_LbxLargeRequestData 36
#define X_LbxEndLargeRequest 37
#define X_LbxInternAtoms 38
#define X_LbxGetWinAttrAndGeom 39
#define X_LbxGrabCmap 40
#define X_LbxReleaseCmap 41
#define X_LbxAllocColor 42
#define X_LbxSync 43
#define LBX_MAJOR_VERSION 1
#define LBX_MINOR_VERSION 0
#define LbxNumberReqs 44
#define LbxEvent 0
#define LbxQuickMotionDeltaEvent 1
#define LbxNumberEvents 2
@ -126,30 +70,4 @@
#define LbxTagTypeFont 4
#define LbxTagTypeConnInfo 5
#ifndef _XLBX_SERVER_
#include <X11/Xdefs.h>
#include <X11/Xlib.h>
_XFUNCPROTOBEGIN
Bool XLbxQueryExtension(
Display* /* dpy */,
int* /* requestp */,
int* /* event_basep */,
int* /* error_basep */
);
Bool XLbxQueryVersion(
Display* /* dpy */,
int* /* majorVersion */,
int* /* minorVersion */
);
int XLbxGetEventBase(Display *dpy);
_XFUNCPROTOEND
#endif
#endif

View File

@ -1,51 +0,0 @@
/* $Xorg: lbxbuf.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */
/*
* Copyright 1988, 1989, 1990, 1994 Network Computing Devices, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby granted without fee, provided
* that the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name Network Computing Devices, Inc. not be
* used in advertising or publicity pertaining to distribution of this
* software without specific, written prior permission.
*
* THIS SOFTWARE IS PROVIDED `AS-IS'. NETWORK COMPUTING DEVICES, INC.,
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT
* LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE, OR NONINFRINGEMENT. IN NO EVENT SHALL NETWORK
* COMPUTING DEVICES, INC., BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING
* SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOSS OF USE,
* DATA, OR PROFITS, EVEN IF ADVISED OF THE POSSIBILITY THEREOF, AND
* REGARDLESS OF WHETHER IN AN ACTION IN CONTRACT, TORT OR NEGLIGENCE,
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*
*/
#ifndef _BUFFER_H_
#define _BUFFER_H_
#define INBUFFER_SIZE (1 << 13) /* 8K */
#define OUTBUFFER_SIZE (1 << 12) /* 4K */
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
typedef struct _zlibbuffer *ZlibBufferPtr;
#include <X11/Xfuncproto.h>
_XFUNCPROTOBEGIN
extern int InitZlibBuffer(ZlibBufferPtr b, int size);
extern void FreeZlibBuffer(ZlibBufferPtr b);
extern char *ReserveOutBuf(ZlibBufferPtr outbuf, int outlen);
_XFUNCPROTOEND
#endif /* _BUFFER_H_ */

View File

@ -1,45 +0,0 @@
/* $Xorg: lbxbufstr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */
/*
* Copyright 1988, 1989, 1990, 1994 Network Computing Devices, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby granted without fee, provided
* that the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name Network Computing Devices, Inc. not be
* used in advertising or publicity pertaining to distribution of this
* software without specific, written prior permission.
*
* THIS SOFTWARE IS PROVIDED `AS-IS'. NETWORK COMPUTING DEVICES, INC.,
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT
* LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE, OR NONINFRINGEMENT. IN NO EVENT SHALL NETWORK
* COMPUTING DEVICES, INC., BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING
* SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOSS OF USE,
* DATA, OR PROFITS, EVEN IF ADVISED OF THE POSSIBILITY THEREOF, AND
* REGARDLESS OF WHETHER IN AN ACTION IN CONTRACT, TORT OR NEGLIGENCE,
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*
*/
/* $XFree86$ */
#ifndef _BUFFERSTR_H_
#define _BUFFERSTR_H_
#include <X11/extensions/lbxbuf.h>
/*
* ZLIB Input/Output buffer
*/
typedef struct _zlibbuffer {
char *bufbase;
char *bufend;
char *bufptr;
int bufcnt;
} ZlibBuffer;
#define BYTES_AVAIL(inbuf, len) \
(((inbuf)->bufcnt >= (len)) ? (inbuf)->bufptr : NULL)
#endif /* _BUFFERSTR_H_ */

View File

@ -1,105 +0,0 @@
/* $Xorg: lbxdeltastr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */
/*
* Copyright 1993 Network Computing Devices
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of NCD. not be used in advertising or
* publicity pertaining to distribution of the software without specific,
* written prior permission. NCD. makes no representations about the
* suitability of this software for any purpose. It is provided "as is"
* without express or implied warranty.
*
* NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD.
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
#ifndef LBX_DELTA_STRUCT_H
#define LBX_DELTA_STRUCT_H
#define MIN_CACHEABLE_LEN 8
#define DELTA_CACHEABLE(pcache, len) \
((len) > MIN_CACHEABLE_LEN && (len) <= (pcache)->maxDeltasize)
/*
* An entry in the delta compactor cache
*/
typedef struct _LBXDeltaElem {
int length;
unsigned char *buf;
} LBXDeltaElemRec, *LBXDeltaElemPtr;
/*
* Delta compactor cache
*/
typedef struct _LBXDeltas {
unsigned short nDeltas;
unsigned short maxDeltasize;
LBXDeltaElemPtr deltas;
unsigned short nextDelta;
unsigned short activeDeltas; /* only needed for outgoing */
} LBXDeltasRec, *LBXDeltasPtr;
/*
* Motion delta cache
*/
typedef struct {
BYTE swapped;
BYTE detail;
CARD16 sequenceNumber B16;
Time time B32;
Window root B32, event B32, child B32;
INT16 rootX B16, rootY B16, eventX B16, eventY B16;
KeyButMask state B16;
BOOL sameScreen;
} lbxMotionCache;
/*
* Motion delta events
*/
typedef struct {
BYTE type; /* always eventBase + LbxQuickMotionDeltaEvent */
CARD8 deltaTime;
INT8 deltaX;
INT8 deltaY;
} lbxQuickMotionDeltaEvent;
#define sz_lbxQuickMotionDeltaEvent 4
typedef struct {
BYTE type; /* always eventBase + LbxEvent */
BYTE lbxType; /* LbxMotionDeltaEvent */
INT8 deltaX;
INT8 deltaY;
CARD16 deltaTime B16;
CARD16 deltaSequence B16;
} lbxMotionDeltaEvent;
#define sz_lbxMotionDeltaEvent 8
extern int LBXInitDeltaCache ( LBXDeltasPtr pcache, int nDeltas,
int maxDeltasize );
extern void LBXFreeDeltaCache ( LBXDeltasPtr pcache );
extern int LBXDeltaMinDiffs ( LBXDeltasPtr pcache, unsigned char *inmsg,
int inmsglen, int maxdiff, int *pindex );
extern void LBXEncodeDelta ( LBXDeltasPtr pcache, unsigned char *inmsg,
int ndiff, int index, unsigned char *buf );
extern int LBXDecodeDelta ( LBXDeltasPtr pcache, xLbxDiffItem *deltas,
int ndiff, int index, unsigned char **buf );
extern void LBXAddDeltaOut ( LBXDeltasPtr pcache, unsigned char *inmsg,
int inmsglen );
extern void LBXAddDeltaIn ( LBXDeltasPtr pcache, unsigned char *inmsg,
int inmsglen );
#endif /* LBX_DELTA_STRUCT_H */

View File

@ -1,151 +0,0 @@
/* $Xorg: lbximage.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
/******************************************************************************
Copyright 1994, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
******************************************************************************/
/* $XFree86: xc/include/extensions/lbximage.h,v 1.4 2001/12/20 19:28:54 tsi Exp $ */
#ifndef _LBX_IMAGE_H_
#define _LBX_IMAGE_H_
#include <X11/Xfuncproto.h>
_XFUNCPROTOBEGIN
typedef struct _LbxBitmapCompMethod {
char *methodName;
int inited;
int methodOpCode; /* to be filled on reply from server */
int (*compInit)(
void
);
int (*compFunc)(
unsigned char * /* inbuf */,
unsigned char * /* outbuf */,
int /* outbufSize */,
int /* image_bytes */,
int /* pixels_per_line */,
int /* padded_bytes_per_scanline */,
int /* reverse_bits */,
int * /* bytesCompressed */
);
int (*decompFunc)(
unsigned char * /* inbuf */,
unsigned char * /* outbuf */,
int /* image_bytes */,
int /* pixels_per_line */,
int /* padded_bytes_per_scanline */,
int /* reverse_bits */
);
} LbxBitmapCompMethod;
#define LBX_MAX_DEPTHS 5
typedef struct _LbxPixmapCompMethod {
char *methodName;
unsigned formatMask;
int depthCount;
int depths[LBX_MAX_DEPTHS];
int inited;
int methodOpCode; /* to be filled on reply from server */
int (*compInit)(
void
);
int (*compFunc)(
char * /* inbuf */,
char * /* outbuf */,
int /* outbufSize */,
int /* format */,
int /* depth */,
int /* num_scan_lines */,
int /* scan_line_size */,
int * /* bytesCompressed */
);
int (*decompFunc)(
char * /* inbuf */,
char * /* outbuf */,
int /* num_scan_lines */,
int /* scan_line_size */
);
} LbxPixmapCompMethod;
extern int LbxImageEncodePackBits (
char * /* inbuf */,
char * /* outbuf */,
int /* outbufSize */,
int /* format */,
int /* depth */,
int /* num_scan_lines */,
int /* scan_line_size */,
int * /* bytesCompressed */
);
extern int LbxImageEncodeFaxG42D (
unsigned char * /* inbuf */,
unsigned char * /* outbuf */,
int /* outbufSize */,
int /* image_bytes */,
int /* pixels_per_line */,
int /* padded_bytes_per_scanline */,
int /* reverse_bits */,
int * /* bytesCompressed */
);
extern int LbxImageDecodePackBits (
char * /* inbuf */,
char * /* outbuf */,
int /* num_scan_lines */,
int /* scan_line_size */
);
extern int LbxImageDecodeFaxG42D (
unsigned char * /* inbuf */,
unsigned char * /* outbuf */,
int /* image_bytes */,
int /* pixels_per_line */,
int /* padded_bytes_per_scanline */,
int /* reverse_bits */
);
_XFUNCPROTOEND
#define LBX_IMAGE_COMPRESS_SUCCESS 0
#define LBX_IMAGE_COMPRESS_NO_SUPPORT 1
#define LBX_IMAGE_COMPRESS_BAD_MALLOC 2
#define LBX_IMAGE_COMPRESS_NOT_WORTH_IT 3
#endif /* _LBX_IMAGE_H_ */

View File

@ -1,133 +0,0 @@
/* $Xorg: lbxopts.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */
/*
* Copyright 1994 Network Computing Devices, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby granted without fee, provided
* that the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name Network Computing Devices, Inc. not be
* used in advertising or publicity pertaining to distribution of this
* software without specific, written prior permission.
*
* THIS SOFTWARE IS PROVIDED `AS-IS'. NETWORK COMPUTING DEVICES, INC.,
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT
* LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE, OR NONINFRINGEMENT. IN NO EVENT SHALL NETWORK
* COMPUTING DEVICES, INC., BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING
* SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOSS OF USE, DATA,
* OR PROFITS, EVEN IF ADVISED OF THE POSSIBILITY THEREOF, AND REGARDLESS OF
* WHETHER IN AN ACTION IN CONTRACT, TORT OR NEGLIGENCE, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
/* $XFree86: xc/include/extensions/lbxopts.h,v 1.5 2001/01/17 17:53:21 dawes Exp $ */
#ifndef _LBX_OPTS_H_
#define _LBX_OPTS_H_
/*
* Negotiable configuration options
*/
#define LBX_OPT_DELTA_PROXY 0
#define LBX_OPT_DELTA_SERVER 1
#define LBX_OPT_STREAM_COMP 2
#define LBX_OPT_BITMAP_COMP 3
#define LBX_OPT_PIXMAP_COMP 4
#define LBX_OPT_MSG_COMP 5 /* aka "squishing" */
#define LBX_OPT_USE_TAGS 6
#define LBX_OPT_CMAP_ALL 7
#define LBX_OPT_EXTENSION 255
/*
* Length fields are encoded in 1 or 3 bytes
*/
#define LBX_OPT_SMALLLEN_SIZE 1
#define LBX_OPT_BIGLEN_SIZE 3
#define LBX_OPT_BIGLEN_MIN 256
#define LBX_OPT_DECODE_LEN(p, len, size) \
if ((p)[0]) { \
(len) = (p)[0]; \
(size) = LBX_OPT_SMALLLEN_SIZE; \
} \
else { \
(len) = ((LBX_OPT_BIGLEN_MIN + (p)[1]) << 8) | (p)[2]; \
(size) = LBX_OPT_BIGLEN_SIZE; \
}
/*
* Option header lengths
*/
#define LBX_OPT_SMALLHDR_LEN (1 + LBX_OPT_SMALLLEN_SIZE)
#define LBX_OPT_BIGHDR_LEN (1 + LBX_OPT_BIGLEN_SIZE)
/*
* Delta compression parameters
*/
#define LBX_OPT_DELTA_REQLEN 6
#define LBX_OPT_DELTA_REPLYLEN 2
#define LBX_OPT_DELTA_NCACHE_DFLT 16
#define LBX_OPT_DELTA_MSGLEN_MIN 32
#define LBX_OPT_DELTA_MSGLEN_DFLT 64
/*
* Stream compression opts
*/
#include <sys/types.h>
#if defined(WIN32) || (defined(USG) && !defined(CRAY) && !defined(umips) && !defined(MOTOROLA) && !defined(uniosu) && !defined(__sxg__))
struct iovec {
caddr_t iov_base;
int iov_len;
};
#else
#ifndef Lynx
#include <sys/uio.h>
#else
#include <uio.h>
#endif
#endif
typedef void *LbxStreamCompHandle;
typedef struct _LbxStreamOpts {
LbxStreamCompHandle (*streamCompInit)(int fd, pointer arg);
pointer streamCompArg;
int (*streamCompStuffInput)(
int fd,
unsigned char *buf,
int buflen
);
int (*streamCompInputAvail)(
int fd
);
int (*streamCompFlush)(
int fd
);
int (*streamCompRead)(
int fd,
unsigned char *buf,
int buflen
);
int (*streamCompWriteV)(
int fd,
struct iovec *iov,
int iovcnt
);
void (*streamCompOn)(
int fd
);
void (*streamCompOff)(
int fd
);
void (*streamCompFreeHandle)(
LbxStreamCompHandle handle
);
} LbxStreamOpts;
#endif /* _LBX_OPTS_H_ */

View File

@ -1,4 +1,3 @@
/* $Xorg: lbxstr.h,v 1.4 2001/02/13 20:14:04 pookie Exp $ */
/*
* Copyright 1992 Network Computing Devices
*
@ -16,21 +15,69 @@
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD.
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
/* $XFree86: xc/include/extensions/lbxstr.h,v 1.2 2001/08/01 00:44:35 tsi Exp $ */
#ifndef _LBXSTR_H_
#define _LBXSTR_H_
#include <X11/extensions/XLbx.h>
#ifndef _LBXPROTO_H_
#define _LBXPROTO_H_
#define LBXNAME "LBX"
#include <X11/extensions/lbx.h>
/*
* NOTE: any changes or additions to the opcodes needs to be reflected
* in the lbxCacheable array in Xserver/lbx/lbxmain.c
*/
#define LBX_MAJOR_VERSION 1
#define LBX_MINOR_VERSION 0
#define X_LbxQueryVersion 0
#define X_LbxStartProxy 1
#define X_LbxStopProxy 2
#define X_LbxSwitch 3
#define X_LbxNewClient 4
#define X_LbxCloseClient 5
#define X_LbxModifySequence 6
#define X_LbxAllowMotion 7
#define X_LbxIncrementPixel 8
#define X_LbxDelta 9
#define X_LbxGetModifierMapping 10
#define X_LbxInvalidateTag 12
#define X_LbxPolyPoint 13
#define X_LbxPolyLine 14
#define X_LbxPolySegment 15
#define X_LbxPolyRectangle 16
#define X_LbxPolyArc 17
#define X_LbxFillPoly 18
#define X_LbxPolyFillRectangle 19
#define X_LbxPolyFillArc 20
#define X_LbxGetKeyboardMapping 21
#define X_LbxQueryFont 22
#define X_LbxChangeProperty 23
#define X_LbxGetProperty 24
#define X_LbxTagData 25
#define X_LbxCopyArea 26
#define X_LbxCopyPlane 27
#define X_LbxPolyText8 28
#define X_LbxPolyText16 29
#define X_LbxImageText8 30
#define X_LbxImageText16 31
#define X_LbxQueryExtension 32
#define X_LbxPutImage 33
#define X_LbxGetImage 34
#define X_LbxBeginLargeRequest 35
#define X_LbxLargeRequestData 36
#define X_LbxEndLargeRequest 37
#define X_LbxInternAtoms 38
#define X_LbxGetWinAttrAndGeom 39
#define X_LbxGrabCmap 40
#define X_LbxReleaseCmap 41
#define X_LbxAllocColor 42
#define X_LbxSync 43
/*
* Redefine some basic types used by structures defined herein. This removes
@ -121,7 +168,7 @@ typedef struct _LbxModifySequence {
CARD32 adjust B32;
} xLbxModifySequenceReq;
#define sz_xLbxModifySequenceReq 8
typedef struct _LbxAllowMotion {
CARD8 reqType; /* always LbxReqCode */
CARD8 lbxReqType; /* always X_LbxAllowMotion */
@ -129,13 +176,13 @@ typedef struct _LbxAllowMotion {
CARD32 num B32;
} xLbxAllowMotionReq;
#define sz_xLbxAllowMotionReq 8
typedef struct {
CARD8 reqType; /* always LbxReqCode */
CARD8 lbxReqType; /* always X_LbxGrabCmap */
CARD16 length B16;
Colormap cmap B32;
} xLbxGrabCmapReq;
} xLbxGrabCmapReq;
#define sz_xLbxGrabCmapReq 8
#define LBX_SMART_GRAB 0x80
@ -172,7 +219,7 @@ typedef struct {
CARD8 lbxReqType; /* always X_LbxReleaseCmap */
CARD16 length B16;
Colormap cmap B32;
} xLbxReleaseCmapReq;
} xLbxReleaseCmapReq;
#define sz_xLbxReleaseCmapReq 8
typedef struct {
@ -183,7 +230,7 @@ typedef struct {
CARD32 pixel B32;
CARD16 red B16, green B16, blue B16;
CARD16 pad B16;
} xLbxAllocColorReq;
} xLbxAllocColorReq;
#define sz_xLbxAllocColorReq 20
typedef struct _LbxIncrementPixel {
@ -264,7 +311,7 @@ typedef struct _LbxInternAtoms {
CARD16 length B16;
CARD16 num B16;
} xLbxInternAtomsReq;
#define sz_xLbxInternAtomsReq 6
#define sz_xLbxInternAtomsReq 6
typedef struct {
BYTE type; /* X_Reply */
@ -371,16 +418,16 @@ typedef struct {
CARD32 metrics B32;
} xLbxCharInfo;
/* note that this is identical to xQueryFontReply except for missing
/* note that this is identical to xQueryFontReply except for missing
* first 2 words
*/
typedef struct {
xCharInfo minBounds;
xCharInfo minBounds;
/* XXX do we need to leave this gunk? */
#ifndef WORD64
CARD32 walign1 B32;
#endif
xCharInfo maxBounds;
xCharInfo maxBounds;
#ifndef WORD64
CARD32 walign2 B32;
#endif
@ -510,7 +557,7 @@ typedef struct {
CARD8 format;
CARD8 pad1;
CARD16 pad2 B16;
} xLbxGetImageReq;
} xLbxGetImageReq;
#define sz_xLbxGetImageReq 24
@ -530,7 +577,7 @@ typedef struct {
} xLbxGetImageReply;
#define sz_xLbxGetImageReply 32
/* Following used for LbxPolyPoint, LbxPolyLine, LbxPolySegment,
LbxPolyRectangle, LbxPolyArc, LbxPolyFillRectangle and LbxPolyFillArc */
@ -584,7 +631,7 @@ typedef struct _LbxCopyArea {
CARD8 cacheEnts; /* dest drawable and gc */
/* followed by encoded src x, src y, dst x, dst y, width, height */
} xLbxCopyAreaReq;
#define sz_xLbxCopyAreaReq 6
typedef struct _LbxCopyPlane {
@ -596,7 +643,7 @@ typedef struct _LbxCopyPlane {
CARD8 cacheEnts; /* dest drawable and gc */
/* followed by encoded src x, src y, dst x, dst y, width, height */
} xLbxCopyPlaneReq;
#define sz_xLbxCopyPlaneReq 10
typedef struct _LbxPolyText {
@ -611,7 +658,7 @@ typedef struct _LbxPolyText {
typedef xLbxPolyTextReq xLbxPolyText8Req;
typedef xLbxPolyTextReq xLbxPolyText16Req;
#define sz_xLbxPolyTextReq 5
#define sz_xLbxPolyText8Req 5
#define sz_xLbxPolyText16Req 5
@ -624,10 +671,10 @@ typedef struct _LbxImageText {
CARD8 nChars;
/* followed by encoded src x, src y coordinates and string */
} xLbxImageTextReq;
typedef xLbxImageTextReq xLbxImageText8Req;
typedef xLbxImageTextReq xLbxImageText16Req;
#define sz_xLbxImageTextReq 6
#define sz_xLbxImageText8Req 6
#define sz_xLbxImageText16Req 6
@ -912,14 +959,7 @@ typedef struct _LbxFreeCellsEvent {
#define DBG_BLOCK 0x00000020
#define DBG_CLIENT 0x00000040
#define DBG_DELTA 0x00000080
extern int lbxDebug;
#define DBG(n,m) if (lbxDebug & (n)) { fprintf m; } else
#else
#define DBG(n,m)
#endif
/*
* Cancel the previous redefinition of the basic types, thus restoring their
* X.h definitions.
@ -932,4 +972,4 @@ extern int lbxDebug;
#undef VisualID
#undef Window
#endif /* _LBXSTR_H_ */
#endif /* _LBXPROTO_H_ */

View File

@ -1,64 +0,0 @@
/* $Xorg: lbxzlib.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */
/*
* Copyright 1993 Network Computing Devices
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of NCD. not be used in advertising or
* publicity pertaining to distribution of the software without specific,
* written prior permission. NCD. makes no representations about the
* suitability of this software for any purpose. It is provided "as is"
* without express or implied warranty.
*
* NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD.
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Dale Tonogai, Network Computing Devices
*/
#ifndef _ZLIB_H_
#define _ZLIB_H_
#define ZLIB_STRCOMP_OPT "XC-ZLIB"
#define ZLIB_STRCOMP_OPT_LEN 7
#define ZLIB_PACKET_HDRLEN 2
#define ZLIB_MAX_DATALEN 0xfff
#define ZLIB_MAX_PLAIN 270
#define ZLIB_MAX_OUTLEN (ZLIB_MAX_PLAIN << 1)
#define ZLIB_COMPRESS_FLAG 0x80
#define ZLIB_DATALEN_MASK 0x0f
#define ZLIB_PUT_PKTHDR(p, len, compflag) \
{ \
(p)[0] = ((unsigned)(len)) >> 8 | ((compflag) ? ZLIB_COMPRESS_FLAG : 0);\
(p)[1] = (len) & 0xff; \
}
#define ZLIB_GET_DATALEN(p) \
((((unsigned)((p)[0] & ZLIB_DATALEN_MASK)) << 8) | (unsigned)(p)[1])
#define ZLIB_COMPRESSED(p) ((p)[0] & ZLIB_COMPRESS_FLAG)
struct ZlibInfo;
extern void * ZlibInit ( int fd, int level );
extern void ZlibFree ( struct ZlibInfo *comp );
extern int ZlibFlush ( int fd );
extern int ZlibStuffInput ( int fd, unsigned char *buffer, int buflen );
extern void ZlibCompressOn ( int fd );
extern void ZlibCompressOff ( int fd );
extern int ZlibWrite ( int fd, unsigned char *buffer, int buflen );
extern int ZlibWriteV ( int fd, struct iovec *iov, int iovcnt );
extern int ZlibRead ( int fd, unsigned char *buffer, int buflen );
extern int ZlibInputAvail ( int fd );
#endif /* _ZLIB_H_ */

View File

@ -26,41 +26,13 @@ in this Software without prior written authorization from The Open Group.
/* RANDOM CRUFT! THIS HAS NO OFFICIAL X CONSORTIUM OR X PROJECT TEAM BLESSING */
/* $Xorg: MITMisc.h,v 1.4 2001/02/09 02:03:23 xorgcvs Exp $ */
#ifndef _XMITMISC_H_
#define _XMITMISC_H_
#include <X11/Xfuncproto.h>
#define X_MITSetBugMode 0
#define X_MITGetBugMode 1
#ifndef _MITMISCCONST_H_
#define _MITMISCCONST_H_
#define MITMiscNumberEvents 0
#define MITMiscNumberErrors 0
#ifndef _MITMISC_SERVER_
_XFUNCPROTOBEGIN
Bool XMITMiscQueryExtension(
Display* /* dpy */,
int* /* event_basep */,
int* /* error_basep */
);
Status XMITMiscSetBugMode(
Display* /* dpy */,
Bool /* onOff */
);
Bool XMITMiscGetBugMode(
Display* /* dpy */
);
_XFUNCPROTOEND
#endif
#define MITMISCNAME "MIT-SUNDRY-NONSTANDARD"
#endif

View File

@ -1,4 +1,3 @@
/* $XFree86$ */
/************************************************************
Copyright 1989, 1998 The Open Group
@ -27,14 +26,13 @@ in this Software without prior written authorization from The Open Group.
/* RANDOM CRUFT! THIS HAS NO OFFICIAL X CONSORTIUM OR X PROJECT TEAM BLESSING */
/* $Xorg: mitmiscstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
#ifndef _MITMISCPROTO_H_
#define _MITMISCPROTO_H_
#ifndef _MITMISCSTR_H_
#define _MITMISCSTR_H_
#include <X11/extensions/mitmiscconst.h>
#include "MITMisc.h"
#define MITMISCNAME "MIT-SUNDRY-NONSTANDARD"
#define X_MITSetBugMode 0
#define X_MITGetBugMode 1
typedef struct _SetBugMode {
CARD8 reqType; /* always MITReqCode */
@ -67,4 +65,4 @@ typedef struct {
} xMITGetBugModeReply;
#define sz_xMITGetBugModeReply 32
#endif /* _MITMISCSTR_H_ */
#endif /* _MITMISCPROTO_H_ */

View File

@ -1,317 +0,0 @@
/*
* $Xorg: multibuf.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $
*
Copyright 1989, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
/* $XFree86: xc/include/extensions/multibuf.h,v 3.4 2001/12/14 19:53:28 dawes Exp $ */
#ifndef _MULTIBUF_H_
#define _MULTIBUF_H_
#include <X11/Xfuncproto.h>
#define MULTIBUFFER_PROTOCOL_NAME "Multi-Buffering"
#define MULTIBUFFER_MAJOR_VERSION 1 /* current version numbers */
#define MULTIBUFFER_MINOR_VERSION 1 /* has ClearImageBufferArea */
#define X_MbufGetBufferVersion 0
#define X_MbufCreateImageBuffers 1
#define X_MbufDestroyImageBuffers 2
#define X_MbufDisplayImageBuffers 3
#define X_MbufSetMBufferAttributes 4
#define X_MbufGetMBufferAttributes 5
#define X_MbufSetBufferAttributes 6
#define X_MbufGetBufferAttributes 7
#define X_MbufGetBufferInfo 8
#define X_MbufCreateStereoWindow 9
#define X_MbufClearImageBufferArea 10
/*
* update_action field
*/
#define MultibufferUpdateActionUndefined 0
#define MultibufferUpdateActionBackground 1
#define MultibufferUpdateActionUntouched 2
#define MultibufferUpdateActionCopied 3
/*
* update_hint field
*/
#define MultibufferUpdateHintFrequent 0
#define MultibufferUpdateHintIntermittent 1
#define MultibufferUpdateHintStatic 2
/*
* valuemask fields
*/
#define MultibufferWindowUpdateHint (1L << 0)
#define MultibufferBufferEventMask (1L << 0)
/*
* mono vs. stereo and left vs. right
*/
#define MultibufferModeMono 0
#define MultibufferModeStereo 1
#define MultibufferSideMono 0
#define MultibufferSideLeft 1
#define MultibufferSideRight 2
/*
* clobber state
*/
#define MultibufferUnclobbered 0
#define MultibufferPartiallyClobbered 1
#define MultibufferFullyClobbered 2
/*
* event stuff
*/
#define MultibufferClobberNotifyMask 0x02000000
#define MultibufferUpdateNotifyMask 0x04000000
#define MultibufferClobberNotify 0
#define MultibufferUpdateNotify 1
#define MultibufferNumberEvents (MultibufferUpdateNotify + 1)
#define MultibufferBadBuffer 0
#define MultibufferNumberErrors (MultibufferBadBuffer + 1)
#ifndef _MULTIBUF_SERVER_
/*
* Extra definitions that will only be needed in the client
*/
typedef XID Multibuffer;
typedef struct {
int type; /* of event */
unsigned long serial; /* # of last request processed by server */
int send_event; /* true if this came frome a SendEvent request */
Display *display; /* Display the event was read from */
Multibuffer buffer; /* buffer of event */
int state; /* see Clobbered constants above */
} XmbufClobberNotifyEvent;
typedef struct {
int type; /* of event */
unsigned long serial; /* # of last request processed by server */
int send_event; /* true if this came frome a SendEvent request */
Display *display; /* Display the event was read from */
Multibuffer buffer; /* buffer of event */
} XmbufUpdateNotifyEvent;
/*
* per-window attributes that can be got
*/
typedef struct {
int displayed_index; /* which buffer is being displayed */
int update_action; /* Undefined, Background, Untouched, Copied */
int update_hint; /* Frequent, Intermittent, Static */
int window_mode; /* Mono, Stereo */
int nbuffers; /* Number of buffers */
Multibuffer *buffers; /* Buffers */
} XmbufWindowAttributes;
/*
* per-window attributes that can be set
*/
typedef struct {
int update_hint; /* Frequent, Intermittent, Static */
} XmbufSetWindowAttributes;
/*
* per-buffer attributes that can be got
*/
typedef struct {
Window window; /* which window this belongs to */
unsigned long event_mask; /* events that have been selected */
int buffer_index; /* which buffer is this */
int side; /* Mono, Left, Right */
} XmbufBufferAttributes;
/*
* per-buffer attributes that can be set
*/
typedef struct {
unsigned long event_mask; /* events that have been selected */
} XmbufSetBufferAttributes;
/*
* per-screen buffer info (there will be lists of them)
*/
typedef struct {
VisualID visualid; /* visual usuable at this depth */
int max_buffers; /* most buffers for this visual */
int depth; /* depth of buffers to be created */
} XmbufBufferInfo;
_XFUNCPROTOBEGIN
extern Bool XmbufQueryExtension(
Display* /* dpy */,
int* /* event_base_return */,
int* /* error_base_return */
);
extern Status XmbufGetVersion(
Display* /* dpy */,
int* /* major_version_return */,
int* /* minor_version_return */
);
extern int XmbufCreateBuffers(
Display* /* dpy */,
Window /* w */,
int /* count */,
int /* update_action */,
int /* update_hint */,
Multibuffer* /* buffers */
);
extern void XmbufDestroyBuffers(
Display* /* dpy */,
Window /* window */
);
extern void XmbufDisplayBuffers(
Display* /* dpy */,
int /* count */,
Multibuffer* /* buffers */,
int /* min_delay */,
int /* max_delay */
);
extern Status XmbufGetWindowAttributes(
Display* /* dpy */,
Window /* w */,
XmbufWindowAttributes* /* attr */
);
extern void XmbufChangeWindowAttributes(
Display* /* dpy */,
Window /* w */,
unsigned long /* valuemask */,
XmbufSetWindowAttributes* /* attr */
);
extern Status XmbufGetBufferAttributes(
Display* /* dpy */,
Multibuffer /* b */,
XmbufBufferAttributes* /* attr */
);
extern void XmbufChangeBufferAttributes(
Display* /* dpy */,
Multibuffer /* b */,
unsigned long /* valuemask */,
XmbufSetBufferAttributes* /* attr */
);
extern Status XmbufGetScreenInfo(
Display* /* dpy */,
Drawable /* d */,
int* /* nmono_return */,
XmbufBufferInfo** /* mono_info_return */,
int* /* nstereo_return */,
XmbufBufferInfo** /* stereo_info_return */
);
extern Window XmbufCreateStereoWindow(
Display* /* dpy */,
Window /* parent */,
int /* x */,
int /* y */,
unsigned int /* width */,
unsigned int /* height */,
unsigned int /* border_width */,
int /* depth */,
unsigned int /* class */,
Visual* /* visual */,
unsigned long /* valuemask */,
XSetWindowAttributes* /* attr */,
Multibuffer* /* leftp */,
Multibuffer* /* rightp */
);
extern void XmbufClearBufferArea(
Display* /* dpy */,
Multibuffer /* buffer */,
int /* x */,
int /* y */,
unsigned int /* width */,
unsigned int /* height */,
Bool /* exposures */
);
_XFUNCPROTOEND
#else
#include "scrnintstr.h"
typedef Bool (* mbInitFunc)();
struct _mbufScreen; /* declared in multibufst.h */
extern void RegisterMultibufferInit(
ScreenPtr /* pScreen */,
Bool (* /* bufMultibufferInit */)(
ScreenPtr /* pScreen */,
struct _mbufScreen * /* pMBScreen */
)
);
struct xMbufBufferInfo; /* declared in multibufst.h */
extern void RegisterDoubleBufferHardware(
ScreenPtr /* pScreen */,
int /* nInfo */,
struct xMbufBufferInfo * /* pInfo */,
DevUnion * /* frameBuffer */,
DevUnion /* selectPlane */,
void (* /* CopyBufferBitsFunc */ )(),
void (* /* DrawSelectPlaneFunc */ )()
);
extern int CreateImageBuffers (
WindowPtr /* pWin */,
int /* nbuf */,
XID * /* ids */,
int /* action */,
int /* hint */
);
extern void DestroyImageBuffers (
WindowPtr /* pWin */
);
extern int DisplayImageBuffers (
XID * /* ids */,
int /* nbuf */
);
#endif /* _MULTIBUF_SERVER_ */
#endif /* _MULTIBUF_H_ */

View File

@ -0,0 +1,83 @@
/*
Copyright 1989, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
#ifndef _MULTIBUFCONST_H_
#define _MULTIBUFCONST_H_
#define MULTIBUFFER_PROTOCOL_NAME "Multi-Buffering"
#define MULTIBUFFER_MAJOR_VERSION 1 /* current version numbers */
#define MULTIBUFFER_MINOR_VERSION 1 /* has ClearImageBufferArea */
/*
* update_action field
*/
#define MultibufferUpdateActionUndefined 0
#define MultibufferUpdateActionBackground 1
#define MultibufferUpdateActionUntouched 2
#define MultibufferUpdateActionCopied 3
/*
* update_hint field
*/
#define MultibufferUpdateHintFrequent 0
#define MultibufferUpdateHintIntermittent 1
#define MultibufferUpdateHintStatic 2
/*
* valuemask fields
*/
#define MultibufferWindowUpdateHint (1L << 0)
#define MultibufferBufferEventMask (1L << 0)
/*
* mono vs. stereo and left vs. right
*/
#define MultibufferModeMono 0
#define MultibufferModeStereo 1
#define MultibufferSideMono 0
#define MultibufferSideLeft 1
#define MultibufferSideRight 2
/*
* clobber state
*/
#define MultibufferUnclobbered 0
#define MultibufferPartiallyClobbered 1
#define MultibufferFullyClobbered 2
/*
* event stuff
*/
#define MultibufferClobberNotifyMask 0x02000000
#define MultibufferUpdateNotifyMask 0x04000000
#define MultibufferClobberNotify 0
#define MultibufferUpdateNotify 1
#define MultibufferNumberEvents (MultibufferUpdateNotify + 1)
#define MultibufferBadBuffer 0
#define MultibufferNumberErrors (MultibufferBadBuffer + 1)
#endif /* _MULTIBUFCONST_H_ */

View File

@ -0,0 +1,295 @@
/*
Copyright 1989, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
#ifndef _MULTIBUFPROTO_H_
#define _MULTIBUFPROTO_H_
#include <X11/extensions/multibufconst.h>
/*
* Protocol requests constants and alignment values
*/
#define Window CARD32
#define Drawable CARD32
#define VisualID CARD32
#define Multibuffer CARD32
#define X_MbufGetBufferVersion 0
#define X_MbufCreateImageBuffers 1
#define X_MbufDestroyImageBuffers 2
#define X_MbufDisplayImageBuffers 3
#define X_MbufSetMBufferAttributes 4
#define X_MbufGetMBufferAttributes 5
#define X_MbufSetBufferAttributes 6
#define X_MbufGetBufferAttributes 7
#define X_MbufGetBufferInfo 8
#define X_MbufCreateStereoWindow 9
#define X_MbufClearImageBufferArea 10
typedef struct xMbufBufferInfo {
CARD32 visualID B32; /* associated visual */
CARD16 maxBuffers B16; /* maximum supported buffers */
CARD8 depth; /* depth of visual (redundant) */
CARD8 unused;
} xMbufBufferInfo;
#define sz_xMbufBufferInfo 8
typedef struct {
BYTE type;
BYTE unused;
CARD16 sequenceNumber B16;
CARD32 buffer B32; /* affected buffer */
BYTE state; /* current status */
CARD8 unused1;
CARD16 unused2 B16;
CARD32 unused3 B32;
CARD32 unused4 B32;
CARD32 unused5 B32;
CARD32 unused6 B32;
CARD32 unused7 B32;
} xMbufClobberNotifyEvent;
typedef struct {
BYTE type;
BYTE unused;
CARD16 sequenceNumber B16;
CARD32 buffer B32; /* affected buffer */
CARD32 timeStamp B32; /* update time */
CARD32 unused1 B32;
CARD32 unused2 B32;
CARD32 unused3 B32;
CARD32 unused4 B32;
CARD32 unused5 B32;
CARD32 unused6 B32;
} xMbufUpdateNotifyEvent;
typedef struct {
CARD8 reqType; /* always codes->major_opcode */
CARD8 mbufReqType; /* always X_MbufGetBufferVersion */
CARD16 length B16;
} xMbufGetBufferVersionReq;
#define sz_xMbufGetBufferVersionReq 4
typedef struct {
BYTE type; /* X_Reply */
CARD8 unused; /* not used */
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD8 majorVersion; /* major version of Multi-Buffering protocol */
CARD8 minorVersion; /* minor version of Multi-Buffering protocol */
CARD16 pad1 B16;
CARD32 pad2 B32;
CARD32 pad3 B32;
CARD32 pad4 B32;
CARD32 pad5 B32;
CARD32 pad6 B32;
} xMbufGetBufferVersionReply;
#define sz_xMbufGetBufferVersionReply 32
typedef struct {
CARD8 reqType; /* always codes->major_opcode */
CARD8 mbufReqType; /* always X_MbufCreateImageBuffers */
CARD16 length B16;
CARD32 window B32; /* associated window */
CARD8 updateAction; /* action at update */
CARD8 updateHint; /* hint as to frequency of updates */
CARD16 unused;
} xMbufCreateImageBuffersReq; /* followed by buffer ids */
#define sz_xMbufCreateImageBuffersReq 12
typedef struct {
BYTE type; /* X_Reply */
CARD8 unused; /* not used */
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD16 numberBuffer B16; /* number successfully allocated */
CARD16 unused1 B16;
CARD32 unused2 B32;
CARD32 unused3 B32;
CARD32 unused4 B32;
CARD32 unused5 B32;
CARD32 unused6 B32;
} xMbufCreateImageBuffersReply;
#define sz_xMbufCreateImageBuffersReply 32
typedef struct {
CARD8 reqType; /* always codes->major_opcode */
CARD8 mbufReqType; /* always X_MbufDestroyImageBuffers */
CARD16 length B16;
CARD32 window B32; /* associated window */
} xMbufDestroyImageBuffersReq;
#define sz_xMbufDestroyImageBuffersReq 8
typedef struct {
CARD8 reqType; /* always codes->major_opcode */
CARD8 mbufReqType; /* always X_MbufDisplayImageBuffers */
CARD16 length B16;
CARD16 minDelay B16; /* minimum time between last update and now */
CARD16 maxDelay B16; /* maximum time between last update and now */
} xMbufDisplayImageBuffersReq; /* followed by list of buffers */
#define sz_xMbufDisplayImageBuffersReq 8
typedef struct {
CARD8 reqType; /* always codes->major_opcode */
CARD8 mbufReqType; /* always X_MbufSetMBufferAttributes */
CARD16 length B16;
CARD32 window B32; /* associated window */
CARD32 valueMask B32; /* modified entries */
} xMbufSetMBufferAttributesReq; /* followed by values */
#define sz_xMbufSetMBufferAttributesReq 12
typedef struct {
CARD8 reqType; /* always codes->major_opcode */
CARD8 mbufReqType; /* always X_MbufGetMBufferAttributes */
CARD16 length B16;
CARD32 window B32; /* associated window */
} xMbufGetMBufferAttributesReq;
#define sz_xMbufGetMBufferAttributesReq 8
typedef struct {
BYTE type; /* X_Reply */
CARD8 unused; /* not used */
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD16 displayedBuffer B16; /* currently visible buffer */
CARD8 updateAction;
CARD8 updateHint;
CARD8 windowMode;
CARD8 unused0;
CARD16 unused1 B16;
CARD32 unused2 B32;
CARD32 unused3 B32;
CARD32 unused4 B32;
CARD32 unused5 B32;
} xMbufGetMBufferAttributesReply;
#define sz_xMbufGetMBufferAttributesReply 32
typedef struct {
CARD8 reqType; /* always codes->major_opcode */
CARD8 mbufReqType; /* always X_MbufSetBufferAttributes */
CARD16 length B16;
CARD32 buffer B32;
CARD32 valueMask B32;
} xMbufSetBufferAttributesReq; /* followed by values */
#define sz_xMbufSetBufferAttributesReq 12
typedef struct {
CARD8 reqType; /* always codes->major_opcode */
CARD8 mbufReqType; /* always X_MbufGetBufferAttributes */
CARD16 length B16;
CARD32 buffer B32;
} xMbufGetBufferAttributesReq;
#define sz_xMbufGetBufferAttributesReq 8
typedef struct {
BYTE type; /* X_Reply */
CARD8 unused; /* not used */
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 window B32;
CARD32 eventMask B32;
CARD16 bufferIndex B16;
CARD8 side;
CARD8 unused0;
CARD32 unused1 B32;
CARD32 unused2 B32;
CARD32 unused3 B32;
} xMbufGetBufferAttributesReply;
#define sz_xMbufGetBufferAttributesReply 32
typedef struct {
CARD8 reqType; /* always codes->major_opcode */
CARD8 mbufReqType; /* always X_MbufGetBufferInfo */
CARD16 length B16;
Drawable drawable B32;
} xMbufGetBufferInfoReq;
#define sz_xMbufGetBufferInfoReq 8
typedef struct {
BYTE type; /* X_Reply */
CARD8 unused; /* not used */
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD16 normalInfo B16;
CARD16 stereoInfo B16;
CARD32 unused1 B32;
CARD32 unused2 B32;
CARD32 unused3 B32;
CARD32 unused4 B32;
CARD32 unused5 B32;
} xMbufGetBufferInfoReply; /* followed by buffer infos */
#define sz_xMbufGetBufferInfoReply 32
typedef struct {
CARD8 reqType; /* always codes->major_opcode */
CARD8 mbufReqType; /* always X_MbufCreateStereoWindow */
CARD16 length B16;
CARD8 unused0;
CARD8 unused1;
CARD8 unused2;
CARD8 depth;
Window wid B32;
Window parent B32;
Multibuffer left B32; /* associated buffers */
Multibuffer right B32;
INT16 x B16;
INT16 y B16;
CARD16 width B16;
CARD16 height B16;
CARD16 borderWidth B16;
#if defined(__cplusplus) || defined(c_plusplus)
CARD16 c_class B16;
#else
CARD16 class B16;
#endif
VisualID visual B32;
CARD32 mask B32;
} xMbufCreateStereoWindowReq; /* followed by value list */
#define sz_xMbufCreateStereoWindowReq 44
typedef struct {
CARD8 reqType; /* always codes->major_opcode */
CARD8 mbufReqType; /* always X_MbufClearImageBufferArea */
CARD16 length B16;
Multibuffer buffer B32;
INT16 x B16;
INT16 y B16;
CARD16 width B16;
CARD16 height B16;
CARD8 unused0;
CARD8 unused1;
CARD8 unused2;
BOOL exposures;
} xMbufClearImageBufferAreaReq;
#define sz_xMbufClearImageBufferAreaReq 20
#undef Window
#undef Drawable
#undef VisualID
#undef Multibuffer
#endif /* _MULTIBUFPROTO_H_ */

View File

@ -1,609 +0,0 @@
/*
* $Xorg: multibufst.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $
*
Copyright 1989, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
/* $XFree86: xc/include/extensions/multibufst.h,v 3.8 2001/12/19 21:37:29 dawes Exp $ */
#ifndef _MULTIBUFST_H_
#define _MULTIBUFST_H_
/*
* Protocol requests constants and alignment values
*/
#include "multibuf.h"
#ifdef _MULTIBUF_SERVER_
#include "inputstr.h"
#endif
#if !defined(UNIXCPP) || defined(ANSICPP)
#define MbufGetReq(name,req,info) GetReq (name, req); \
req->reqType = info->codes->major_opcode; \
req->mbufReqType = X_##name;
#else
#define MbufGetReq(name,req,info) GetReq (name, req); \
req->reqType = info->codes->major_opcode; \
req->mbufReqType = X_/**/name;
#endif
#define Window CARD32
#define Drawable CARD32
#define VisualID CARD32
#define Multibuffer CARD32
typedef struct xMbufBufferInfo {
CARD32 visualID B32; /* associated visual */
CARD16 maxBuffers B16; /* maximum supported buffers */
CARD8 depth; /* depth of visual (redundant) */
CARD8 unused;
} xMbufBufferInfo;
#define sz_xMbufBufferInfo 8
typedef struct {
BYTE type;
BYTE unused;
CARD16 sequenceNumber B16;
CARD32 buffer B32; /* affected buffer */
BYTE state; /* current status */
CARD8 unused1;
CARD16 unused2 B16;
CARD32 unused3 B32;
CARD32 unused4 B32;
CARD32 unused5 B32;
CARD32 unused6 B32;
CARD32 unused7 B32;
} xMbufClobberNotifyEvent;
typedef struct {
BYTE type;
BYTE unused;
CARD16 sequenceNumber B16;
CARD32 buffer B32; /* affected buffer */
CARD32 timeStamp B32; /* update time */
CARD32 unused1 B32;
CARD32 unused2 B32;
CARD32 unused3 B32;
CARD32 unused4 B32;
CARD32 unused5 B32;
CARD32 unused6 B32;
} xMbufUpdateNotifyEvent;
typedef struct {
CARD8 reqType; /* always codes->major_opcode */
CARD8 mbufReqType; /* always X_MbufGetBufferVersion */
CARD16 length B16;
} xMbufGetBufferVersionReq;
#define sz_xMbufGetBufferVersionReq 4
typedef struct {
BYTE type; /* X_Reply */
CARD8 unused; /* not used */
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD8 majorVersion; /* major version of Multi-Buffering protocol */
CARD8 minorVersion; /* minor version of Multi-Buffering protocol */
CARD16 pad1 B16;
CARD32 pad2 B32;
CARD32 pad3 B32;
CARD32 pad4 B32;
CARD32 pad5 B32;
CARD32 pad6 B32;
} xMbufGetBufferVersionReply;
#define sz_xMbufGetBufferVersionReply 32
typedef struct {
CARD8 reqType; /* always codes->major_opcode */
CARD8 mbufReqType; /* always X_MbufCreateImageBuffers */
CARD16 length B16;
CARD32 window B32; /* associated window */
CARD8 updateAction; /* action at update */
CARD8 updateHint; /* hint as to frequency of updates */
CARD16 unused;
} xMbufCreateImageBuffersReq; /* followed by buffer ids */
#define sz_xMbufCreateImageBuffersReq 12
typedef struct {
BYTE type; /* X_Reply */
CARD8 unused; /* not used */
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD16 numberBuffer B16; /* number successfully allocated */
CARD16 unused1 B16;
CARD32 unused2 B32;
CARD32 unused3 B32;
CARD32 unused4 B32;
CARD32 unused5 B32;
CARD32 unused6 B32;
} xMbufCreateImageBuffersReply;
#define sz_xMbufCreateImageBuffersReply 32
typedef struct {
CARD8 reqType; /* always codes->major_opcode */
CARD8 mbufReqType; /* always X_MbufDestroyImageBuffers */
CARD16 length B16;
CARD32 window B32; /* associated window */
} xMbufDestroyImageBuffersReq;
#define sz_xMbufDestroyImageBuffersReq 8
typedef struct {
CARD8 reqType; /* always codes->major_opcode */
CARD8 mbufReqType; /* always X_MbufDisplayImageBuffers */
CARD16 length B16;
CARD16 minDelay B16; /* minimum time between last update and now */
CARD16 maxDelay B16; /* maximum time between last update and now */
} xMbufDisplayImageBuffersReq; /* followed by list of buffers */
#define sz_xMbufDisplayImageBuffersReq 8
typedef struct {
CARD8 reqType; /* always codes->major_opcode */
CARD8 mbufReqType; /* always X_MbufSetMBufferAttributes */
CARD16 length B16;
CARD32 window B32; /* associated window */
CARD32 valueMask B32; /* modified entries */
} xMbufSetMBufferAttributesReq; /* followed by values */
#define sz_xMbufSetMBufferAttributesReq 12
typedef struct {
CARD8 reqType; /* always codes->major_opcode */
CARD8 mbufReqType; /* always X_MbufGetMBufferAttributes */
CARD16 length B16;
CARD32 window B32; /* associated window */
} xMbufGetMBufferAttributesReq;
#define sz_xMbufGetMBufferAttributesReq 8
typedef struct {
BYTE type; /* X_Reply */
CARD8 unused; /* not used */
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD16 displayedBuffer B16; /* currently visible buffer */
CARD8 updateAction;
CARD8 updateHint;
CARD8 windowMode;
CARD8 unused0;
CARD16 unused1 B16;
CARD32 unused2 B32;
CARD32 unused3 B32;
CARD32 unused4 B32;
CARD32 unused5 B32;
} xMbufGetMBufferAttributesReply;
#define sz_xMbufGetMBufferAttributesReply 32
typedef struct {
CARD8 reqType; /* always codes->major_opcode */
CARD8 mbufReqType; /* always X_MbufSetBufferAttributes */
CARD16 length B16;
CARD32 buffer B32;
CARD32 valueMask B32;
} xMbufSetBufferAttributesReq; /* followed by values */
#define sz_xMbufSetBufferAttributesReq 12
typedef struct {
CARD8 reqType; /* always codes->major_opcode */
CARD8 mbufReqType; /* always X_MbufGetBufferAttributes */
CARD16 length B16;
CARD32 buffer B32;
} xMbufGetBufferAttributesReq;
#define sz_xMbufGetBufferAttributesReq 8
typedef struct {
BYTE type; /* X_Reply */
CARD8 unused; /* not used */
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 window B32;
CARD32 eventMask B32;
CARD16 bufferIndex B16;
CARD8 side;
CARD8 unused0;
CARD32 unused1 B32;
CARD32 unused2 B32;
CARD32 unused3 B32;
} xMbufGetBufferAttributesReply;
#define sz_xMbufGetBufferAttributesReply 32
typedef struct {
CARD8 reqType; /* always codes->major_opcode */
CARD8 mbufReqType; /* always X_MbufGetBufferInfo */
CARD16 length B16;
Drawable drawable B32;
} xMbufGetBufferInfoReq;
#define sz_xMbufGetBufferInfoReq 8
typedef struct {
BYTE type; /* X_Reply */
CARD8 unused; /* not used */
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD16 normalInfo B16;
CARD16 stereoInfo B16;
CARD32 unused1 B32;
CARD32 unused2 B32;
CARD32 unused3 B32;
CARD32 unused4 B32;
CARD32 unused5 B32;
} xMbufGetBufferInfoReply; /* followed by buffer infos */
#define sz_xMbufGetBufferInfoReply 32
typedef struct {
CARD8 reqType; /* always codes->major_opcode */
CARD8 mbufReqType; /* always X_MbufCreateStereoWindow */
CARD16 length B16;
CARD8 unused0;
CARD8 unused1;
CARD8 unused2;
CARD8 depth;
Window wid B32;
Window parent B32;
Multibuffer left B32; /* associated buffers */
Multibuffer right B32;
INT16 x B16;
INT16 y B16;
CARD16 width B16;
CARD16 height B16;
CARD16 borderWidth B16;
#if defined(__cplusplus) || defined(c_plusplus)
CARD16 c_class B16;
#else
CARD16 class B16;
#endif
VisualID visual B32;
CARD32 mask B32;
} xMbufCreateStereoWindowReq; /* followed by value list */
#define sz_xMbufCreateStereoWindowReq 44
typedef struct {
CARD8 reqType; /* always codes->major_opcode */
CARD8 mbufReqType; /* always X_MbufClearImageBufferArea */
CARD16 length B16;
Multibuffer buffer B32;
INT16 x B16;
INT16 y B16;
CARD16 width B16;
CARD16 height B16;
CARD8 unused0;
CARD8 unused1;
CARD8 unused2;
BOOL exposures;
} xMbufClearImageBufferAreaReq;
#define sz_xMbufClearImageBufferAreaReq 20
#undef Window
#undef Drawable
#undef VisualID
#undef Multibuffer
#ifdef _MULTIBUF_SERVER_
/* Macros for wrapping and unwrapping functions */
#define SWAP_FUNC_VECTOR(pSTRUCT1,pSTRUCT2,DATA_TYPE,FUNC_NAME) \
{ \
DATA_TYPE (* tmpFn)(); \
\
tmpFn = pSTRUCT1->FUNC_NAME; \
pSTRUCT1->FUNC_NAME = pSTRUCT2->FUNC_NAME; \
pSTRUCT2->FUNC_NAME = tmpFn; \
}
#if !defined(UNIXCPP) || defined(ANSICPP)
#define WRAP_SCREEN_FUNC(pSCREEN,pPRIV,FUNC_NAME, PRIV_FUNC_NAME) \
{ \
if ((pPRIV->funcsWrapped & FUNC_NAME##Mask) == 0) \
{ \
pPRIV->FUNC_NAME = pSCREEN->FUNC_NAME; \
pSCREEN->FUNC_NAME = PRIV_FUNC_NAME; \
pPRIV->funcsWrapped |= FUNC_NAME##Mask; \
} \
}
#define UNWRAP_SCREEN_FUNC(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME) \
{ \
SWAP_FUNC_VECTOR(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME); \
pPRIV->funcsWrapped &= ~(FUNC_NAME##Mask); \
}
#define REWRAP_SCREEN_FUNC(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME) \
{ \
if (MB_SCREEN_PRIV(pSCREEN)->mbufWindowCount) \
{ \
SWAP_FUNC_VECTOR(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME); \
pPRIV->funcsWrapped |= FUNC_NAME##Mask; \
} \
}
#else
#define WRAP_SCREEN_FUNC(pSCREEN,pPRIV,FUNC_NAME, PRIV_FUNC_NAME) \
{ \
if ((pPRIV->funcsWrapped & FUNC_NAME/**/Mask) == 0) \
{ \
pPRIV->FUNC_NAME = pSCREEN->FUNC_NAME; \
pSCREEN->FUNC_NAME = PRIV_FUNC_NAME; \
pPRIV->funcsWrapped |= FUNC_NAME/**/Mask; \
} \
}
#define UNWRAP_SCREEN_FUNC(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME) \
{ \
SWAP_FUNC_VECTOR(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME); \
pPRIV->funcsWrapped &= ~(FUNC_NAME/**/Mask); \
}
#define REWRAP_SCREEN_FUNC(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME) \
{ \
if (MB_SCREEN_PRIV(pSCREEN)->mbufWindowCount) \
{ \
SWAP_FUNC_VECTOR(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME); \
pPRIV->funcsWrapped |= FUNC_NAME/**/Mask; \
} \
}
#endif
/* The _Multibuffer and _Multibuffers structures below refer to each other,
* so we need this forward declaration
*/
typedef struct _Multibuffers *MultibuffersPtr;
/*
* per-Multibuffer data
*/
typedef struct _Multibuffer {
MultibuffersPtr pMultibuffers; /* associated window data */
Mask eventMask; /* MultibufferClobberNotifyMask|ExposureMask|MultibufferUpdateNotifyMask */
Mask otherEventMask; /* mask of all other clients event masks */
OtherClients *otherClients; /* other clients that want events */
int number; /* index of this buffer into array */
int side; /* always Mono */
int clobber; /* Unclobbered, PartiallyClobbered, FullClobbered */
PixmapPtr pPixmap; /* associated pixmap */
} MultibufferRec, *MultibufferPtr;
/*
* per-window data
*/
typedef struct _Multibuffers {
WindowPtr pWindow; /* associated window */
int numMultibuffer; /* count of buffers */
int refcnt; /* ref count for delete */
int displayedMultibuffer; /* currently active buffer */
int updateAction; /* Undefined, Background, Untouched, Copied */
int updateHint; /* Frequent, Intermittent, Static */
int windowMode; /* always Mono */
TimeStamp lastUpdate; /* time of last update */
unsigned short width, height; /* last known window size */
short x, y; /* for static gravity */
MultibufferPtr buffers; /* array of numMultibuffer buffers */
} MultibuffersRec;
/*
* per-screen data
*/
typedef struct _MultibufferScreen {
PositionWindowProcPtr PositionWindow; /* pWin, x,y */
} MultibufferScreenRec, *MultibufferScreenPtr;
/*
* per display-image-buffers request data.
*/
typedef struct _DisplayRequest {
struct _DisplayRequest *next;
TimeStamp activateTime;
ClientPtr pClient;
XID id;
} DisplayRequestRec, *DisplayRequestPtr;
#define DestroyWindowMask (1L<<0)
#define PositionWindowMask (1L<<1)
#define PostValidateTreeMask (1L<<2)
#define ClipNotifyMask (1L<<3)
#define WindowExposuresMask (1L<<4)
#define CopyWindowMask (1L<<5)
#define ClearToBackgroundMask (1L<<6)
#define ChangeWindowAttributesMask (1L<<7)
extern int MultibufferScreenIndex;
extern int MultibufferWindowIndex;
extern RESTYPE MultibufferDrawableResType;
extern void MultibufferUpdate( /* pMbuffer, time */
MultibufferPtr /* pMultibuffer */,
CARD32 /* time */
);
extern void MultibufferExpose( /* pMbuffer, pRegion */
MultibufferPtr /* pMultibuffer */,
RegionPtr /* pRegion */
);
extern void MultibufferClobber( /* pMbuffer */
MultibufferPtr /* pMultibuffer */
);
typedef struct _mbufWindow *mbufWindowPtr;
/*
* per-buffer data
*/
#define MB_DISPLAYED_BUFFER(pMBWindow) \
((pMBWindow)->buffers + (pMBWindow)->displayedMultibuffer)
typedef struct _mbufBuffer {
mbufWindowPtr pMBWindow; /* associated window data */
Mask eventMask; /* client event mask */
Mask otherEventMask; /* union of other clients' event masks */
OtherClientsPtr otherClients; /* other clients that want events */
int number; /* index of this buffer into array */
int side; /* stero side: always Mono */
int clobber; /* clober state */
DrawablePtr pDrawable; /* associated drawable */
} mbufBufferRec, *mbufBufferPtr;
/*
* per-window data
*/
#define MB_WINDOW_PRIV(pWin) \
((mbufWindowPtr)((pWin)->devPrivates[MultibufferWindowIndex].ptr))
typedef struct _mbufWindow {
WindowPtr pWindow; /* associated window */
int numMultibuffer; /* count of buffers */
mbufBufferPtr buffers; /* array of (numMultibuffer) buffers */
int displayedMultibuffer; /* currently active buffer */
int updateAction; /* Undefined, Background,
Untouched, Copied */
int updateHint; /* Frequent, Intermittent, Static */
int windowMode; /* always Mono */
TimeStamp lastUpdate; /* time of last update */
short x, y; /* for static gravity */
unsigned short width, height; /* last known window size */
DevUnion devPrivate;
} mbufWindowRec;
/*
* per-screen data
*/
#define MB_SCREEN_PRIV(pScreen) \
((mbufScreenPtr)((pScreen)->devPrivates[MultibufferScreenIndex].ptr))
typedef struct _mbufScreen {
long mbufWindowCount; /* count of multibuffered windows */
/* Wrap pScreen->DestroyWindow */
DestroyWindowProcPtr DestroyWindow;
long funcsWrapped; /* flags which functions are wrapped */
/* Initialized by device-dependent section */
int nInfo; /* number of buffer info rec's */
xMbufBufferInfo *pInfo; /* buffer info (for Normal buffers) */
int (* CreateImageBuffers)(
WindowPtr /* pWin */,
int /* nbuf */,
XID * /* ids */,
int /* action */,
int /* hint */
);
void (* DestroyImageBuffers)(
WindowPtr /* pWin */
);
void (* DisplayImageBuffers)(
ScreenPtr /* pScreen */,
mbufBufferPtr * /* ppMBBuffer */,
mbufWindowPtr * /* ppMBWindow */,
int /* nbuf */
);
void (* ClearImageBufferArea)(
mbufBufferPtr /* pMBBuffer */,
short /* x */,
short /* y */,
unsigned short /* width */,
unsigned short /* height */,
Bool /* exposures */
);
Bool (* ChangeMBufferAttributes)( /* pMBWindow, vmask */
/* FIXME */
);
Bool (* ChangeBufferAttributes)( /* pMBBuffer, vmask */
/* FIXME */
);
void (* DeleteBufferDrawable)(
DrawablePtr /* pDrawable */
);
void (* WrapScreenFuncs)(
ScreenPtr /* pScreen */
);
void (* ResetProc)(
ScreenPtr /* pScreen */
);
DevUnion devPrivate;
} mbufScreenRec, *mbufScreenPtr;
/* Privates to mbufScreenRec */
#ifdef _MULTIBUF_PIXMAP_
#define MB_SCREEN_PRIV_PIXMAP(pScreen) \
((mbufPixmapPrivPtr) MB_SCREEN_PRIV((pScreen))->devPrivate.ptr)
typedef struct _mbufPixmapPriv
{
/* Pointers to wrapped functions */
PositionWindowProcPtr PositionWindow; /* pWin, x,y */
long funcsWrapped; /* flags which functions are wrapped */
} mbufPixmapPrivRec, *mbufPixmapPrivPtr;
#endif /* _MULTIBUF_PIXMAP_ */
#ifdef _MULTIBUF_BUFFER_
extern int frameWindowPrivateIndex;
#define MB_SCREEN_PRIV_BUFFER(pScreen) \
((mbufBufferPrivPtr) MB_SCREEN_PRIV((pScreen))->devPrivate.ptr)
typedef struct _mbufBufferPriv
{
DevUnion *frameBuffer; /* Array of screen framebuffers */
DevUnion selectPlane; /* Plane(s) that select displayed buffer */
/*
* Note: subtractRgn and unionRgn may overlap. subtractRgn is a union
* of all the old clipLists of the windows that are displaying
* the backbuffer. unionRgn is the union of all the new clipLists
* of the same windows.
*/
RegionRec backBuffer; /* Area of screen displaying back buffer */
RegionRec subtractRgn; /* Regions lost to backBuffer */
RegionRec unionRgn; /* Regions gained by backBuffer */
Bool rgnChanged; /* TRUE if "backBuffer" needs to be updated */
void (* CopyBufferBits)(); /* pMBWindow, srcBufferNum, dstBufferNum */
void (* DrawSelectPlane)(); /* pScreen, selectPlane, pRegion, bufferNum */
/* Pointers to wrapped functions */
PostValidateTreeProcPtr PostValidateTree; /* pParent, pChild, kind */
ClipNotifyProcPtr ClipNotify; /* pWin, dx, dy */
WindowExposuresProcPtr WindowExposures; /* pWin, pRegion */
CopyWindowProcPtr CopyWindow; /* pWin, oldPt, pOldRegion */
ClearToBackgroundProcPtr ClearToBackground; /* pWin, x,y,w,h, sendExpose */
ChangeWindowAttributesProcPtr ChangeWindowAttributes; /* pWin, vmask */
long funcsWrapped; /* flags which functions are wrapped */
unsigned inClearToBackground:1; /* used by WindowExposure */
} mbufBufferPrivRec, *mbufBufferPrivPtr;
#endif /* _MULTIBUF_BUFFER_ */
#endif /* _MULTIBUF_SERVER_ */
#endif /* _MULTIBUFST_H_ */

View File

@ -1,4 +1,3 @@
/* $Xorg: security.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
/*
Copyright 1996, 1998 The Open Group
@ -24,15 +23,13 @@ not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization
from The Open Group.
*/
/* $XFree86: xc/include/extensions/security.h,v 1.3 2001/12/14 19:53:29 dawes Exp $ */
#ifndef _SECURITY_H
#define _SECURITY_H
#ifndef _SECUR_H
#define _SECUR_H
#define _XAUTH_STRUCT_ONLY
#include <X11/Xauth.h>
/* constants that server, library, and application all need */
#define SECURITY_EXTENSION_NAME "SECURITY"
#define SECURITY_MAJOR_VERSION 1
#define SECURITY_MINOR_VERSION 0
#define XSecurityNumberEvents 1
#define XSecurityNumberErrors 2
@ -57,55 +54,8 @@ from The Open Group.
/* event offsets */
#define XSecurityAuthorizationRevoked 0
#define XSecurityAuthorizationName "XC-QUERY-SECURITY-1"
#define XSecurityAuthorizationNameLen 19
#ifndef _SECURITY_SERVER
_XFUNCPROTOBEGIN
Status XSecurityQueryExtension (
Display *dpy,
int *major_version_return,
int *minor_version_return);
Xauth *XSecurityAllocXauth(void);
void XSecurityFreeXauth(Xauth *auth);
/* type for returned auth ids */
typedef unsigned long XSecurityAuthorization;
typedef struct {
unsigned int timeout;
unsigned int trust_level;
XID group;
long event_mask;
} XSecurityAuthorizationAttributes;
Xauth *XSecurityGenerateAuthorization(
Display *dpy,
Xauth *auth_in,
unsigned long valuemask,
XSecurityAuthorizationAttributes *attributes,
XSecurityAuthorization *auth_id_return);
Status XSecurityRevokeAuthorization(
Display *dpy,
XSecurityAuthorization auth_id);
_XFUNCPROTOEND
typedef struct {
int type; /* event base + XSecurityAuthorizationRevoked */
unsigned long serial; /* # of last request processed by server */
Bool send_event; /* true if this came from a SendEvent request */
Display *display; /* Display the event was read from */
XSecurityAuthorization auth_id; /* revoked authorization id */
} XSecurityAuthorizationRevokedEvent;
#endif /* _SECURITY_SERVER */
#endif /* _SECURITY_H */
#endif /* _SECUR_H */

View File

@ -1,4 +1,3 @@
/* $Xorg: securstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
/*
Copyright 1996, 1998 The Open Group
@ -24,16 +23,11 @@ not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization
from The Open Group.
*/
/* $XFree86: xc/include/extensions/securstr.h,v 1.2 2001/08/01 00:44:35 tsi Exp $ */
#ifndef _SECURSTR_H
#define _SECURSTR_H
#ifndef _SECURPROTO_H
#define _SECURPROTO_H
#include <X11/extensions/security.h>
#define SECURITY_EXTENSION_NAME "SECURITY"
#define SECURITY_MAJOR_VERSION 1
#define SECURITY_MINOR_VERSION 0
#include <X11/extensions/secur.h>
#define X_SecurityQueryVersion 0
#define X_SecurityGenerateAuthorization 1
@ -69,7 +63,7 @@ typedef struct {
CARD16 length B16;
CARD16 nbytesAuthProto B16;
CARD16 nbytesAuthData B16;
CARD32 valueMask B32;
CARD32 valueMask B32;
/* auth protocol name padded to 4 bytes */
/* auth protocol data padded to 4 bytes */
/* list of CARD32 values, if any */
@ -113,4 +107,4 @@ typedef struct _xSecurityAuthorizationRevokedEvent {
} xSecurityAuthorizationRevokedEvent;
#define sz_xSecurityAuthorizationRevokedEvent 32
#endif /* _SECURSTR_H */
#endif /* _SECURPROTO_H */

View File

@ -1,180 +0,0 @@
/* $XFree86: xc/include/extensions/shape.h,v 1.3 2001/12/14 19:53:29 dawes Exp $ */
/************************************************************
Copyright 1989, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
********************************************************/
/* $Xorg: shape.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
#ifndef _SHAPE_H_
#define _SHAPE_H_
#include <X11/Xfuncproto.h>
#define X_ShapeQueryVersion 0
#define X_ShapeRectangles 1
#define X_ShapeMask 2
#define X_ShapeCombine 3
#define X_ShapeOffset 4
#define X_ShapeQueryExtents 5
#define X_ShapeSelectInput 6
#define X_ShapeInputSelected 7
#define X_ShapeGetRectangles 8
#define ShapeSet 0
#define ShapeUnion 1
#define ShapeIntersect 2
#define ShapeSubtract 3
#define ShapeInvert 4
#define ShapeBounding 0
#define ShapeClip 1
#define ShapeInput 2
#define ShapeNotifyMask (1L << 0)
#define ShapeNotify 0
#define ShapeNumberEvents (ShapeNotify + 1)
#ifndef _SHAPE_SERVER_
#include <X11/Xutil.h>
typedef struct {
int type; /* of event */
unsigned long serial; /* # of last request processed by server */
Bool send_event; /* true if this came frome a SendEvent request */
Display *display; /* Display the event was read from */
Window window; /* window of event */
int kind; /* ShapeBounding or ShapeClip */
int x, y; /* extents of new region */
unsigned width, height;
Time time; /* server timestamp when region changed */
Bool shaped; /* true if the region exists */
} XShapeEvent;
_XFUNCPROTOBEGIN
extern Bool XShapeQueryExtension (
Display* /* display */,
int* /* event_base */,
int* /* error_base */
);
extern Status XShapeQueryVersion (
Display* /* display */,
int* /* major_version */,
int* /* minor_version */
);
extern void XShapeCombineRegion (
Display* /* display */,
Window /* dest */,
int /* dest_kind */,
int /* x_off */,
int /* y_off */,
Region /* region */,
int /* op */
);
extern void XShapeCombineRectangles (
Display* /* display */,
Window /* dest */,
int /* dest_kind */,
int /* x_off */,
int /* y_off */,
XRectangle* /* rectangles */,
int /* n_rects */,
int /* op */,
int /* ordering */
);
extern void XShapeCombineMask (
Display* /* display */,
Window /* dest */,
int /* dest_kind */,
int /* x_off */,
int /* y_off */,
Pixmap /* src */,
int /* op */
);
extern void XShapeCombineShape (
Display* /* display */,
Window /* dest */,
int /* dest_kind */,
int /* x_off */,
int /* y_off */,
Window /* src */,
int /* src_kind */,
int /* op */
);
extern void XShapeOffsetShape (
Display* /* display */,
Window /* dest */,
int /* dest_kind */,
int /* x_off */,
int /* y_off */
);
extern Status XShapeQueryExtents (
Display* /* display */,
Window /* window */,
Bool* /* bounding_shaped */,
int* /* x_bounding */,
int* /* y_bounding */,
unsigned int* /* w_bounding */,
unsigned int* /* h_bounding */,
Bool* /* clip_shaped */,
int* /* x_clip */,
int* /* y_clip */,
unsigned int* /* w_clip */,
unsigned int* /* h_clip */
);
extern void XShapeSelectInput (
Display* /* display */,
Window /* window */,
unsigned long /* mask */
);
extern unsigned long XShapeInputSelected (
Display* /* display */,
Window /* window */
);
extern XRectangle *XShapeGetRectangles (
Display* /* display */,
Window /* window */,
int /* kind */,
int* /* count */,
int* /* ordering */
);
_XFUNCPROTOEND
#endif /* _SHAPE_SERVER_ */
#endif /* _SHAPE_H_ */

View File

@ -0,0 +1,55 @@
/************************************************************
Copyright 1989, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
********************************************************/
#ifndef _SHAPECONST_H_
#define _SHAPECONST_H_
/*
* Protocol requests constants and alignment values
* These would really be in SHAPE's X.h and Xproto.h equivalents
*/
#define SHAPENAME "SHAPE"
#define SHAPE_MAJOR_VERSION 1 /* current version numbers */
#define SHAPE_MINOR_VERSION 1
#define ShapeSet 0
#define ShapeUnion 1
#define ShapeIntersect 2
#define ShapeSubtract 3
#define ShapeInvert 4
#define ShapeBounding 0
#define ShapeClip 1
#define ShapeInput 2
#define ShapeNotifyMask (1L << 0)
#define ShapeNotify 0
#define ShapeNumberEvents (ShapeNotify + 1)
#endif /* _SHAPECONST_H_ */

View File

@ -24,25 +24,28 @@ in this Software without prior written authorization from The Open Group.
********************************************************/
/* $Xorg: shapestr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
#ifndef _SHAPEPROTO_H_
#define _SHAPEPROTO_H_
#ifndef _SHAPESTR_H_
#define _SHAPESTR_H_
#include <X11/extensions/shapeconst.h>
/*
* Protocol requests constants and alignment values
* These would really be in SHAPE's X.h and Xproto.h equivalents
*/
#include "shape.h"
#define Window CARD32
#define Time CARD32
#define SHAPENAME "SHAPE"
#define SHAPE_MAJOR_VERSION 1 /* current version numbers */
#define SHAPE_MINOR_VERSION 1
#define X_ShapeQueryVersion 0
#define X_ShapeRectangles 1
#define X_ShapeMask 2
#define X_ShapeCombine 3
#define X_ShapeOffset 4
#define X_ShapeQueryExtents 5
#define X_ShapeSelectInput 6
#define X_ShapeInputSelected 7
#define X_ShapeGetRectangles 8
typedef struct _ShapeQueryVersion {
CARD8 reqType; /* always ShapeReqCode */
@ -95,7 +98,7 @@ typedef struct _ShapeMask {
CARD32 src B32; /* 1 bit pixmap */
} xShapeMaskReq;
#define sz_xShapeMaskReq 20
typedef struct _ShapeCombine {
CARD8 reqType; /* always ShapeReqCode */
CARD8 shapeReqType; /* always X_ShapeCombine */
@ -110,7 +113,7 @@ typedef struct _ShapeCombine {
Window src B32;
} xShapeCombineReq;
#define sz_xShapeCombineReq 20
typedef struct _ShapeOffset {
CARD8 reqType; /* always ShapeReqCode */
CARD8 shapeReqType; /* always X_ShapeOffset */
@ -231,4 +234,4 @@ typedef struct {
#undef Window
#undef Time
#endif /* _SHAPESTR_H_ */
#endif /* _SHAPEPROTO_H_ */

View File

@ -1,6 +1,5 @@
/*
* $Xorg: Xext.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $
*
/************************************************************
Copyright 1989, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
@ -22,36 +21,24 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
/* $XFree86: xc/include/extensions/Xext.h,v 1.4 2001/12/14 19:53:28 dawes Exp $ */
#ifndef _XEXT_H_
#define _XEXT_H_
********************************************************/
#include <X11/Xfuncproto.h>
/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */
_XFUNCPROTOBEGIN
#ifndef _SHM_H_
#define _SHM_H_
extern int (*XSetExtensionErrorHandler(
int (*handler)(
Display *,
char *,
char *
)
))(
Display *,
char *,
char *
);
#define SHMNAME "MIT-SHM"
extern int XMissingExtension(
Display* /* dpy */,
_Xconst char* /* ext_name */
);
#define SHM_MAJOR_VERSION 1 /* current version numbers */
#define SHM_MINOR_VERSION 1
_XFUNCPROTOEND
#define ShmCompletion 0
#define ShmNumberEvents (ShmCompletion + 1)
#define X_EXTENSION_UNKNOWN "unknown"
#define X_EXTENSION_MISSING "missing"
#define BadShmSeg 0
#define ShmNumberErrors (BadShmSeg + 1)
#endif /* _XEXT_H_ */
#endif /* _SHM_H_ */

View File

@ -1,4 +1,3 @@
/* $XFree86: xc/include/extensions/shmstr.h,v 3.3 2001/12/14 19:53:29 dawes Exp $ */
/************************************************************
Copyright 1989, 1998 The Open Group
@ -27,12 +26,10 @@ in this Software without prior written authorization from The Open Group.
/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */
#ifndef _SHMSTR_H_
#define _SHMSTR_H_
#ifndef _SHMPROTO_H_
#define _SHMPROTO_H_
/* $Xorg: shmstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
#include "XShm.h"
#include <X11/extensions/shm.h>
#define ShmSeg CARD32
#define Drawable CARD32
@ -40,39 +37,12 @@ in this Software without prior written authorization from The Open Group.
#define GContext CARD32
#define Pixmap CARD32
#define SHMNAME "MIT-SHM"
#define SHM_MAJOR_VERSION 1 /* current version numbers */
#define SHM_MINOR_VERSION 1
#ifdef _XSHM_SERVER_
#define XSHM_PUT_IMAGE_ARGS \
DrawablePtr /* dst */, \
GCPtr /* pGC */, \
int /* depth */, \
unsigned int /* format */, \
int /* w */, \
int /* h */, \
int /* sx */, \
int /* sy */, \
int /* sw */, \
int /* sh */, \
int /* dx */, \
int /* dy */, \
char * /* data */
#define XSHM_CREATE_PIXMAP_ARGS \
ScreenPtr /* pScreen */, \
int /* width */, \
int /* height */, \
int /* depth */, \
char * /* addr */
typedef struct _ShmFuncs {
PixmapPtr (* CreatePixmap)(XSHM_CREATE_PIXMAP_ARGS);
void (* PutImage)(XSHM_PUT_IMAGE_ARGS);
} ShmFuncs, *ShmFuncsPtr;
#endif
#define X_ShmQueryVersion 0
#define X_ShmAttach 1
#define X_ShmDetach 2
#define X_ShmPutImage 3
#define X_ShmGetImage 4
#define X_ShmCreatePixmap 5
typedef struct _ShmQueryVersion {
CARD8 reqType; /* always ShmReqCode */
@ -139,7 +109,7 @@ typedef struct _ShmPutImage {
CARD8 bpad;
ShmSeg shmseg B32;
CARD32 offset B32;
} xShmPutImageReq;
} xShmPutImageReq;
#define sz_xShmPutImageReq 40
typedef struct _ShmGetImage {
@ -158,7 +128,7 @@ typedef struct _ShmGetImage {
CARD8 pad2;
ShmSeg shmseg B32;
CARD32 offset B32;
} xShmGetImageReq;
} xShmGetImageReq;
#define sz_xShmGetImageReq 32
typedef struct _ShmGetImageReply {
@ -214,4 +184,4 @@ typedef struct _ShmCompletion {
#undef GContext
#undef Pixmap
#endif /* _SHMSTR_H_ */
#endif /* _SHMPROTO_H_ */

View File

@ -1,469 +0,0 @@
/* $Xorg: sync.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
/*
Copyright 1991, 1993, 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.
*/
/***********************************************************
Copyright 1991,1993 by Digital Equipment Corporation, Maynard, Massachusetts,
and Olivetti Research Limited, Cambridge, England.
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 names of Digital or Olivetti
not be used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL AND OLIVETTI DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL THEY BE LIABLE FOR ANY SPECIAL, INDIRECT OR
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
******************************************************************/
/* $XFree86: xc/include/extensions/sync.h,v 1.4 2001/12/20 19:40:59 tsi Exp $ */
#ifndef _SYNC_H_
#define _SYNC_H_
#include <X11/Xfuncproto.h>
_XFUNCPROTOBEGIN
#define SYNC_NAME "SYNC"
#define SYNC_MAJOR_VERSION 3
#define SYNC_MINOR_VERSION 0
#define X_SyncInitialize 0
#define X_SyncListSystemCounters 1
#define X_SyncCreateCounter 2
#define X_SyncSetCounter 3
#define X_SyncChangeCounter 4
#define X_SyncQueryCounter 5
#define X_SyncDestroyCounter 6
#define X_SyncAwait 7
#define X_SyncCreateAlarm 8
#define X_SyncChangeAlarm 9
#define X_SyncQueryAlarm 10
#define X_SyncDestroyAlarm 11
#define X_SyncSetPriority 12
#define X_SyncGetPriority 13
#define XSyncCounterNotify 0
#define XSyncAlarmNotify 1
#define XSyncAlarmNotifyMask (1L << XSyncAlarmNotify)
#define XSyncNumberEvents 2L
#define XSyncBadCounter 0L
#define XSyncBadAlarm 1L
#define XSyncNumberErrors (XSyncBadAlarm + 1)
/*
* Flags for Alarm Attributes
*/
#define XSyncCACounter (1L<<0)
#define XSyncCAValueType (1L<<1)
#define XSyncCAValue (1L<<2)
#define XSyncCATestType (1L<<3)
#define XSyncCADelta (1L<<4)
#define XSyncCAEvents (1L<<5)
/*
* Constants for the value_type argument of various requests
*/
typedef enum {
XSyncAbsolute,
XSyncRelative
} XSyncValueType;
/*
* Alarm Test types
*/
typedef enum {
XSyncPositiveTransition,
XSyncNegativeTransition,
XSyncPositiveComparison,
XSyncNegativeComparison
} XSyncTestType;
/*
* Alarm state constants
*/
typedef enum {
XSyncAlarmActive,
XSyncAlarmInactive,
XSyncAlarmDestroyed
} XSyncAlarmState;
typedef XID XSyncCounter;
typedef XID XSyncAlarm;
typedef struct _XSyncValue {
int hi;
unsigned int lo;
} XSyncValue;
/*
* Macros/functions for manipulating 64 bit values
*/
/* have to put these prototypes before the corresponding macro definitions */
extern void XSyncIntToValue(
XSyncValue* /*pv*/,
int /*i*/
);
extern void XSyncIntsToValue(
XSyncValue* /*pv*/,
unsigned int /*l*/,
int /*h*/
);
extern Bool XSyncValueGreaterThan(
XSyncValue /*a*/,
XSyncValue /*b*/
);
extern Bool XSyncValueLessThan(
XSyncValue /*a*/,
XSyncValue /*b*/
);
extern Bool XSyncValueGreaterOrEqual(
XSyncValue /*a*/,
XSyncValue /*b*/
);
extern Bool XSyncValueLessOrEqual(
XSyncValue /*a*/,
XSyncValue /*b*/
);
extern Bool XSyncValueEqual(
XSyncValue /*a*/,
XSyncValue /*b*/
);
extern Bool XSyncValueIsNegative(
XSyncValue /*v*/
);
extern Bool XSyncValueIsZero(
XSyncValue /*a*/
);
extern Bool XSyncValueIsPositive(
XSyncValue /*v*/
);
extern unsigned int XSyncValueLow32(
XSyncValue /*v*/
);
extern int XSyncValueHigh32(
XSyncValue /*v*/
);
extern void XSyncValueAdd(
XSyncValue* /*presult*/,
XSyncValue /*a*/,
XSyncValue /*b*/,
int* /*poverflow*/
);
extern void XSyncValueSubtract(
XSyncValue* /*presult*/,
XSyncValue /*a*/,
XSyncValue /*b*/,
int* /*poverflow*/
);
extern void XSyncMaxValue(
XSyncValue* /*pv*/
);
extern void XSyncMinValue(
XSyncValue* /*pv*/
);
_XFUNCPROTOEND
/* The _XSync macros below are for library internal use only. They exist
* so that if we have to make a fix, we can change it in this one place
* and have both the macro and function variants inherit the fix.
*/
#define _XSyncIntToValue(pv, i) ((pv)->hi=((i<0)?~0:0),(pv)->lo=(i))
#define _XSyncIntsToValue(pv, l, h) ((pv)->lo = (l), (pv)->hi = (h))
#define _XSyncValueGreaterThan(a, b)\
((a).hi>(b).hi || ((a).hi==(b).hi && (a).lo>(b).lo))
#define _XSyncValueLessThan(a, b)\
((a).hi<(b).hi || ((a).hi==(b).hi && (a).lo<(b).lo))
#define _XSyncValueGreaterOrEqual(a, b)\
((a).hi>(b).hi || ((a).hi==(b).hi && (a).lo>=(b).lo))
#define _XSyncValueLessOrEqual(a, b)\
((a).hi<(b).hi || ((a).hi==(b).hi && (a).lo<=(b).lo))
#define _XSyncValueEqual(a, b) ((a).lo==(b).lo && (a).hi==(b).hi)
#define _XSyncValueIsNegative(v) (((v).hi & 0x80000000) ? 1 : 0)
#define _XSyncValueIsZero(a) ((a).lo==0 && (a).hi==0)
#define _XSyncValueIsPositive(v) (((v).hi & 0x80000000) ? 0 : 1)
#define _XSyncValueLow32(v) ((v).lo)
#define _XSyncValueHigh32(v) ((v).hi)
#define _XSyncValueAdd(presult,a,b,poverflow) {\
int t = (a).lo;\
Bool signa = XSyncValueIsNegative(a);\
Bool signb = XSyncValueIsNegative(b);\
((presult)->lo = (a).lo + (b).lo);\
((presult)->hi = (a).hi + (b).hi);\
if (t>(presult)->lo) (presult)->hi++;\
*poverflow = ((signa == signb) && !(signa == XSyncValueIsNegative(*presult)));\
}
#define _XSyncValueSubtract(presult,a,b,poverflow) {\
int t = (a).lo;\
Bool signa = XSyncValueIsNegative(a);\
Bool signb = XSyncValueIsNegative(b);\
((presult)->lo = (a).lo - (b).lo);\
((presult)->hi = (a).hi - (b).hi);\
if (t>(presult)->lo) (presult)->hi--;\
*poverflow = ((signa == signb) && !(signa == XSyncValueIsNegative(*presult)));\
}
#define _XSyncMaxValue(pv) ((pv)->hi = 0x7fffffff, (pv)->lo = 0xffffffff)
#define _XSyncMinValue(pv) ((pv)->hi = 0x80000000, (pv)->lo = 0)
/*
* These are the publically usable macros. If you want the function version
* of one of these, just #undef the macro to uncover the function.
* (This is the same convention that the ANSI C library uses.)
*/
#define XSyncIntToValue(pv, i) _XSyncIntToValue(pv, i)
#define XSyncIntsToValue(pv, l, h) _XSyncIntsToValue(pv, l, h)
#define XSyncValueGreaterThan(a, b) _XSyncValueGreaterThan(a, b)
#define XSyncValueLessThan(a, b) _XSyncValueLessThan(a, b)
#define XSyncValueGreaterOrEqual(a, b) _XSyncValueGreaterOrEqual(a, b)
#define XSyncValueLessOrEqual(a, b) _XSyncValueLessOrEqual(a, b)
#define XSyncValueEqual(a, b) _XSyncValueEqual(a, b)
#define XSyncValueIsNegative(v) _XSyncValueIsNegative(v)
#define XSyncValueIsZero(a) _XSyncValueIsZero(a)
#define XSyncValueIsPositive(v) _XSyncValueIsPositive(v)
#define XSyncValueLow32(v) _XSyncValueLow32(v)
#define XSyncValueHigh32(v) _XSyncValueHigh32(v)
#define XSyncValueAdd(presult,a,b,poverflow) _XSyncValueAdd(presult,a,b,poverflow)
#define XSyncValueSubtract(presult,a,b,poverflow) _XSyncValueSubtract(presult,a,b,poverflow)
#define XSyncMaxValue(pv) _XSyncMaxValue(pv)
#define XSyncMinValue(pv) _XSyncMinValue(pv)
#ifndef _SYNC_SERVER
typedef struct _XSyncSystemCounter {
char *name; /* null-terminated name of system counter */
XSyncCounter counter; /* counter id of this system counter */
XSyncValue resolution; /* resolution of this system counter */
} XSyncSystemCounter;
typedef struct {
XSyncCounter counter; /* counter to trigger on */
XSyncValueType value_type; /* absolute/relative */
XSyncValue wait_value; /* value to compare counter to */
XSyncTestType test_type; /* pos/neg comparison/transtion */
} XSyncTrigger;
typedef struct {
XSyncTrigger trigger; /* trigger for await */
XSyncValue event_threshold; /* send event if past threshold */
} XSyncWaitCondition;
typedef struct {
XSyncTrigger trigger;
XSyncValue delta;
Bool events;
XSyncAlarmState state;
} XSyncAlarmAttributes;
/*
* Events
*/
typedef struct {
int type; /* event base + XSyncCounterNotify */
unsigned long serial; /* # of last request processed by server */
Bool send_event; /* true if this came from a SendEvent request */
Display *display; /* Display the event was read from */
XSyncCounter counter; /* counter involved in await */
XSyncValue wait_value; /* value being waited for */
XSyncValue counter_value; /* counter value when this event was sent */
Time time; /* milliseconds */
int count; /* how many more events to come */
Bool destroyed; /* True if counter was destroyed */
} XSyncCounterNotifyEvent;
typedef struct {
int type; /* event base + XSyncCounterNotify */
unsigned long serial; /* # of last request processed by server */
Bool send_event; /* true if this came from a SendEvent request */
Display *display; /* Display the event was read from */
XSyncAlarm alarm; /* alarm that triggered */
XSyncValue counter_value; /* value that triggered the alarm */
XSyncValue alarm_value; /* test value of trigger in alarm */
Time time; /* milliseconds */
XSyncAlarmState state; /* new state of alarm */
} XSyncAlarmNotifyEvent;
/*
* Errors
*/
typedef struct {
int type;
Display *display; /* Display the event was read from */
XSyncAlarm alarm; /* resource id */
unsigned long serial; /* serial number of failed request */
unsigned char error_code; /* error base + XSyncBadAlarm */
unsigned char request_code; /* Major op-code of failed request */
unsigned char minor_code; /* Minor op-code of failed request */
} XSyncAlarmError;
typedef struct {
int type;
Display *display; /* Display the event was read from */
XSyncCounter counter; /* resource id */
unsigned long serial; /* serial number of failed request */
unsigned char error_code; /* error base + XSyncBadCounter */
unsigned char request_code; /* Major op-code of failed request */
unsigned char minor_code; /* Minor op-code of failed request */
} XSyncCounterError;
/*
* Prototypes
*/
_XFUNCPROTOBEGIN
extern Status XSyncQueryExtension(
Display* /*dpy*/,
int* /*event_base_return*/,
int* /*error_base_return*/
);
extern Status XSyncInitialize(
Display* /*dpy*/,
int* /*major_version_return*/,
int* /*minor_version_return*/
);
extern XSyncSystemCounter *XSyncListSystemCounters(
Display* /*dpy*/,
int* /*n_counters_return*/
);
extern void XSyncFreeSystemCounterList(
XSyncSystemCounter* /*list*/
);
extern XSyncCounter XSyncCreateCounter(
Display* /*dpy*/,
XSyncValue /*initial_value*/
);
extern Status XSyncSetCounter(
Display* /*dpy*/,
XSyncCounter /*counter*/,
XSyncValue /*value*/
);
extern Status XSyncChangeCounter(
Display* /*dpy*/,
XSyncCounter /*counter*/,
XSyncValue /*value*/
);
extern Status XSyncDestroyCounter(
Display* /*dpy*/,
XSyncCounter /*counter*/
);
extern Status XSyncQueryCounter(
Display* /*dpy*/,
XSyncCounter /*counter*/,
XSyncValue* /*value_return*/
);
extern Status XSyncAwait(
Display* /*dpy*/,
XSyncWaitCondition* /*wait_list*/,
int /*n_conditions*/
);
extern XSyncAlarm XSyncCreateAlarm(
Display* /*dpy*/,
unsigned long /*values_mask*/,
XSyncAlarmAttributes* /*values*/
);
extern Status XSyncDestroyAlarm(
Display* /*dpy*/,
XSyncAlarm /*alarm*/
);
extern Status XSyncQueryAlarm(
Display* /*dpy*/,
XSyncAlarm /*alarm*/,
XSyncAlarmAttributes* /*values_return*/
);
extern Status XSyncChangeAlarm(
Display* /*dpy*/,
XSyncAlarm /*alarm*/,
unsigned long /*values_mask*/,
XSyncAlarmAttributes* /*values*/
);
extern Status XSyncSetPriority(
Display* /*dpy*/,
XID /*client_resource_id*/,
int /*priority*/
);
extern Status XSyncGetPriority(
Display* /*dpy*/,
XID /*client_resource_id*/,
int* /*return_priority*/
);
#endif /* _SYNC_SERVER */
_XFUNCPROTOEND
#endif /* _SYNC_H_ */

179
proto/xextproto/syncconst.h Normal file
View File

@ -0,0 +1,179 @@
/*
Copyright 1991, 1993, 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.
*/
/***********************************************************
Copyright 1991,1993 by Digital Equipment Corporation, Maynard, Massachusetts,
and Olivetti Research Limited, Cambridge, England.
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 names of Digital or Olivetti
not be used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL AND OLIVETTI DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL THEY 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 _SYNCCONST_H_
#define _SYNCCONST_H_
#define SYNC_NAME "SYNC"
#define SYNC_MAJOR_VERSION 3
#define SYNC_MINOR_VERSION 0
#define XSyncCounterNotify 0
#define XSyncAlarmNotify 1
#define XSyncAlarmNotifyMask (1L << XSyncAlarmNotify)
#define XSyncNumberEvents 2L
#define XSyncBadCounter 0L
#define XSyncBadAlarm 1L
#define XSyncNumberErrors (XSyncBadAlarm + 1)
/*
* Flags for Alarm Attributes
*/
#define XSyncCACounter (1L<<0)
#define XSyncCAValueType (1L<<1)
#define XSyncCAValue (1L<<2)
#define XSyncCATestType (1L<<3)
#define XSyncCADelta (1L<<4)
#define XSyncCAEvents (1L<<5)
/* The _XSync macros below are for library internal use only. They exist
* so that if we have to make a fix, we can change it in this one place
* and have both the macro and function variants inherit the fix.
*/
#define _XSyncIntToValue(pv, i) ((pv)->hi=((i<0)?~0:0),(pv)->lo=(i))
#define _XSyncIntsToValue(pv, l, h) ((pv)->lo = (l), (pv)->hi = (h))
#define _XSyncValueGreaterThan(a, b)\
((a).hi>(b).hi || ((a).hi==(b).hi && (a).lo>(b).lo))
#define _XSyncValueLessThan(a, b)\
((a).hi<(b).hi || ((a).hi==(b).hi && (a).lo<(b).lo))
#define _XSyncValueGreaterOrEqual(a, b)\
((a).hi>(b).hi || ((a).hi==(b).hi && (a).lo>=(b).lo))
#define _XSyncValueLessOrEqual(a, b)\
((a).hi<(b).hi || ((a).hi==(b).hi && (a).lo<=(b).lo))
#define _XSyncValueEqual(a, b) ((a).lo==(b).lo && (a).hi==(b).hi)
#define _XSyncValueIsNegative(v) (((v).hi & 0x80000000) ? 1 : 0)
#define _XSyncValueIsZero(a) ((a).lo==0 && (a).hi==0)
#define _XSyncValueIsPositive(v) (((v).hi & 0x80000000) ? 0 : 1)
#define _XSyncValueLow32(v) ((v).lo)
#define _XSyncValueHigh32(v) ((v).hi)
#define _XSyncValueAdd(presult,a,b,poverflow) {\
int t = (a).lo;\
Bool signa = XSyncValueIsNegative(a);\
Bool signb = XSyncValueIsNegative(b);\
((presult)->lo = (a).lo + (b).lo);\
((presult)->hi = (a).hi + (b).hi);\
if (t>(presult)->lo) (presult)->hi++;\
*poverflow = ((signa == signb) && !(signa == XSyncValueIsNegative(*presult)));\
}
#define _XSyncValueSubtract(presult,a,b,poverflow) {\
int t = (a).lo;\
Bool signa = XSyncValueIsNegative(a);\
Bool signb = XSyncValueIsNegative(b);\
((presult)->lo = (a).lo - (b).lo);\
((presult)->hi = (a).hi - (b).hi);\
if (t<(presult)->lo) (presult)->hi--;\
*poverflow = ((signa == signb) && !(signa == XSyncValueIsNegative(*presult)));\
}
#define _XSyncMaxValue(pv) ((pv)->hi = 0x7fffffff, (pv)->lo = 0xffffffff)
#define _XSyncMinValue(pv) ((pv)->hi = 0x80000000, (pv)->lo = 0)
/*
* These are the publically usable macros. If you want the function version
* of one of these, just #undef the macro to uncover the function.
* (This is the same convention that the ANSI C library uses.)
*/
#define XSyncIntToValue(pv, i) _XSyncIntToValue(pv, i)
#define XSyncIntsToValue(pv, l, h) _XSyncIntsToValue(pv, l, h)
#define XSyncValueGreaterThan(a, b) _XSyncValueGreaterThan(a, b)
#define XSyncValueLessThan(a, b) _XSyncValueLessThan(a, b)
#define XSyncValueGreaterOrEqual(a, b) _XSyncValueGreaterOrEqual(a, b)
#define XSyncValueLessOrEqual(a, b) _XSyncValueLessOrEqual(a, b)
#define XSyncValueEqual(a, b) _XSyncValueEqual(a, b)
#define XSyncValueIsNegative(v) _XSyncValueIsNegative(v)
#define XSyncValueIsZero(a) _XSyncValueIsZero(a)
#define XSyncValueIsPositive(v) _XSyncValueIsPositive(v)
#define XSyncValueLow32(v) _XSyncValueLow32(v)
#define XSyncValueHigh32(v) _XSyncValueHigh32(v)
#define XSyncValueAdd(presult,a,b,poverflow) _XSyncValueAdd(presult,a,b,poverflow)
#define XSyncValueSubtract(presult,a,b,poverflow) _XSyncValueSubtract(presult,a,b,poverflow)
#define XSyncMaxValue(pv) _XSyncMaxValue(pv)
#define XSyncMinValue(pv) _XSyncMinValue(pv)
/*
* Constants for the value_type argument of various requests
*/
typedef enum {
XSyncAbsolute,
XSyncRelative
} XSyncValueType;
/*
* Alarm Test types
*/
typedef enum {
XSyncPositiveTransition,
XSyncNegativeTransition,
XSyncPositiveComparison,
XSyncNegativeComparison
} XSyncTestType;
/*
* Alarm state constants
*/
typedef enum {
XSyncAlarmActive,
XSyncAlarmInactive,
XSyncAlarmDestroyed
} XSyncAlarmState;
typedef XID XSyncCounter;
typedef XID XSyncAlarm;
typedef struct _XSyncValue {
int hi;
unsigned int lo;
} XSyncValue;
#endif /* _SYNCCONST_H_ */

View File

@ -1,4 +1,3 @@
/* $Xorg: syncstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
/*
Copyright 1991, 1993, 1994, 1998 The Open Group
@ -31,13 +30,13 @@ and Olivetti Research Limited, Cambridge, England.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
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
both that copyright notice and this permission notice appear in
supporting documentation, and that the names of Digital or Olivetti
not be used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
software without specific, written prior permission.
DIGITAL AND OLIVETTI DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
@ -48,14 +47,26 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
******************************************************************/
/* $XFree86: xc/include/extensions/syncstr.h,v 1.3 2003/07/16 01:38:24 dawes Exp $ */
#ifndef _SYNCSTR_H_
#define _SYNCSTR_H_
#ifndef _SYNCPROTO_H_
#define _SYNCPROTO_H_
#include "sync.h"
#include <X11/extensions/syncconst.h>
#ifndef _SYNC_OS
#define X_SyncInitialize 0
#define X_SyncListSystemCounters 1
#define X_SyncCreateCounter 2
#define X_SyncSetCounter 3
#define X_SyncChangeCounter 4
#define X_SyncQueryCounter 5
#define X_SyncDestroyCounter 6
#define X_SyncAwait 7
#define X_SyncCreateAlarm 8
#define X_SyncChangeAlarm 9
#define X_SyncQueryAlarm 10
#define X_SyncDestroyAlarm 11
#define X_SyncSetPriority 12
#define X_SyncGetPriority 13
/* cover up types from sync.h to make sure they're the right size for
* protocol packaging. These will be undef'ed after all the protocol
@ -363,132 +374,5 @@ typedef struct _xSyncAlarmNotifyEvent {
#undef XSyncCounter
#undef XSyncAlarm
#endif /* _SYNC_OS */
#ifdef _SYNC_SERVER
#define CARD64 XSyncValue /* XXX temporary! need real 64 bit values for Alpha */
typedef struct _SyncCounter {
ClientPtr client; /* Owning client. 0 for system counters */
XSyncCounter id; /* resource ID */
CARD64 value; /* counter value */
struct _SyncTriggerList *pTriglist; /* list of triggers */
Bool beingDestroyed; /* in process of going away */
struct _SysCounterInfo *pSysCounterInfo; /* NULL if not a system counter */
} SyncCounter;
/*
* The System Counter interface
*/
typedef enum {
XSyncCounterNeverChanges,
XSyncCounterNeverIncreases,
XSyncCounterNeverDecreases,
XSyncCounterUnrestricted
} SyncCounterType;
typedef struct _SysCounterInfo {
char *name;
CARD64 resolution;
CARD64 bracket_greater;
CARD64 bracket_less;
SyncCounterType counterType; /* how can this counter change */
void (*QueryValue)(
pointer /*pCounter*/,
CARD64 * /*freshvalue*/
);
void (*BracketValues)(
pointer /*pCounter*/,
CARD64 * /*lessthan*/,
CARD64 * /*greaterthan*/
);
} SysCounterInfo;
typedef struct _SyncTrigger {
SyncCounter *pCounter;
CARD64 wait_value; /* wait value */
unsigned int value_type; /* Absolute or Relative */
unsigned int test_type; /* transition or Comparision type */
CARD64 test_value; /* trigger event threshold value */
Bool (*CheckTrigger)(
struct _SyncTrigger * /*pTrigger*/,
CARD64 /*newval*/
);
void (*TriggerFired)(
struct _SyncTrigger * /*pTrigger*/
);
void (*CounterDestroyed)(
struct _SyncTrigger * /*pTrigger*/
);
} SyncTrigger;
typedef struct _SyncTriggerList {
SyncTrigger *pTrigger;
struct _SyncTriggerList *next;
} SyncTriggerList;
typedef struct _SyncAlarmClientList {
ClientPtr client;
XID delete_id;
struct _SyncAlarmClientList *next;
} SyncAlarmClientList;
typedef struct _SyncAlarm {
SyncTrigger trigger;
ClientPtr client;
XSyncAlarm alarm_id;
CARD64 delta;
int events;
int state;
SyncAlarmClientList *pEventClients;
} SyncAlarm;
typedef struct {
ClientPtr client;
CARD32 delete_id;
int num_waitconditions;
} SyncAwaitHeader;
typedef struct {
SyncTrigger trigger;
CARD64 event_threshold;
SyncAwaitHeader *pHeader;
} SyncAwait;
typedef union {
SyncAwaitHeader header;
SyncAwait await;
} SyncAwaitUnion;
extern pointer SyncCreateSystemCounter(
char * /* name */,
CARD64 /* inital_value */,
CARD64 /* resolution */,
SyncCounterType /* change characterization */,
void (* /*QueryValue*/ ) (
pointer /* pCounter */,
CARD64 * /* pValue_return */), /* XXX prototype */
void (* /*BracketValues*/) (
pointer /* pCounter */,
CARD64 * /* pbracket_less */,
CARD64 * /* pbracket_greater */)
);
extern void SyncChangeCounter(
SyncCounter * /* pCounter*/,
CARD64 /* new_value */
);
extern void SyncDestroySystemCounter(
pointer pCounter
);
extern void InitServertime(void);
#endif /* _SYNC_SERVER */
#endif /* _SYNCSTR_H_ */
#endif /* _SYNCPROTO_H_ */

View File

@ -0,0 +1,41 @@
/*
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 _XTEST_CONST_H_
#define _XTEST_CONST_H_
#define XTestNumberEvents 0
#define XTestNumberErrors 0
#define XTestCurrentCursor ((Cursor)1)
#define XTestMajorVersion 2
#define XTestMinorVersion 2
#define XTestExtensionName "XTEST"
#endif

View File

@ -0,0 +1,160 @@
/*
* xtestext1.h
*
* X11 Input Synthesis Extension include file
*/
/*
Copyright 1986, 1987, 1988, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
Copyright 1986, 1987, 1988 by Hewlett-Packard Corporation
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 Hewlett-Packard not be used in
advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
Hewlett-Packard makes no representations about the
suitability of this software for any purpose. It is provided
"as is" without express or implied warranty.
This software is not subject to any license of the American
Telephone and Telegraph Company or of the Regents of the
University of California.
*/
#ifndef _XTESTEXT1CONST_H
#define _XTESTEXT1CONST_H 1
#define XTestMAX_ACTION_LIST_SIZE 64
#define XTestACTIONS_SIZE 28
/*
* used in the XTestPressButton and XTestPressKey functions
*/
#define XTestPRESS 1 << 0
#define XTestRELEASE 1 << 1
#define XTestSTROKE 1 << 2
/*
* When doing a key or button stroke, the number of milliseconds
* to delay between the press and the release of a key or button
* in the XTestPressButton and XTestPressKey functions.
*/
#define XTestSTROKE_DELAY_TIME 10
/*
* used in the XTestGetInput function
*/
#define XTestEXCLUSIVE 1 << 0
#define XTestPACKED_ACTIONS 1 << 1
#define XTestPACKED_MOTION 1 << 2
/*
* used in the XTestFakeInput function
*/
#define XTestFAKE_ACK_NOT_NEEDED 0
#define XTestFAKE_ACK_REQUEST 1
/*
* used in the XTest extension initialization routine
*/
#define XTestEXTENSION_NAME "XTestExtension1"
#define XTestEVENT_COUNT 2
/*
* This is the definition for the format of the header byte
* in the input action structures.
*/
#define XTestACTION_TYPE_MASK 0x03 /* bits 0 and 1 */
#define XTestKEY_STATE_MASK 0x04 /* bit 2 (key action) */
#define XTestX_SIGN_BIT_MASK 0x04 /* bit 2 (motion action) */
#define XTestY_SIGN_BIT_MASK 0x08 /* bit 3 (motion action) */
#define XTestDEVICE_ID_MASK 0xf0 /* bits 4 through 7 */
#define XTestMAX_DEVICE_ID 0x0f
#define XTestPackDeviceID(x) (((x) & XTestMAX_DEVICE_ID) << 4)
#define XTestUnpackDeviceID(x) (((x) & XTestDEVICE_ID_MASK) >> 4)
/*
* These are the possible action types.
*/
#define XTestDELAY_ACTION 0
#define XTestKEY_ACTION 1
#define XTestMOTION_ACTION 2
#define XTestJUMP_ACTION 3
/*
* These are the definitions for key/button motion input actions.
*/
#define XTestKEY_UP 0x04
#define XTestKEY_DOWN 0x00
/*
* These are the definitions for pointer relative motion input
* actions.
*
* The sign bits for the x and y relative motions are contained
* in the header byte. The x and y relative motions are packed
* into one byte to make things fit in 32 bits. If the relative
* motion range is larger than +/-15, use the pointer jump action.
*/
#define XTestMOTION_MAX 15
#define XTestMOTION_MIN -15
#define XTestX_NEGATIVE 0x04
#define XTestY_NEGATIVE 0x08
#define XTestX_MOTION_MASK 0x0f
#define XTestY_MOTION_MASK 0xf0
#define XTestPackXMotionValue(x) ((x) & XTestX_MOTION_MASK)
#define XTestPackYMotionValue(x) (((x) << 4) & XTestY_MOTION_MASK)
#define XTestUnpackXMotionValue(x) ((x) & XTestX_MOTION_MASK)
#define XTestUnpackYMotionValue(x) (((x) & XTestY_MOTION_MASK) >> 4)
/*
* These are the definitions for a long delay input action. It is
* used when more than XTestSHORT_DELAY_TIME milliseconds of delay
* (approximately one minute) is needed.
*
* The device ID for a delay is always set to XTestDELAY_DEVICE_ID.
* This guarantees that a header byte with a value of 0 is not
* a valid header, so it can be used as a flag to indicate that
* there are no more input actions in an XTestInputAction event.
*/
#define XTestSHORT_DELAY_TIME 0xffff
#define XTestDELAY_DEVICE_ID 0x0f
#endif /* _XTESTEXT1CONST_H */

View File

@ -1,4 +1,3 @@
/* $Xorg: xtestext1.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
/*
* xtestext1.h
*
@ -6,8 +5,6 @@
*/
/*
Copyright 1986, 1987, 1988, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
@ -42,8 +39,8 @@ documentation, and that the name of Hewlett-Packard not be used in
advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
Hewlett-Packard makes no representations about the
suitability of this software for any purpose. It is provided
Hewlett-Packard makes no representations about the
suitability of this software for any purpose. It is provided
"as is" without express or implied warranty.
This software is not subject to any license of the American
@ -52,46 +49,17 @@ University of California.
*/
#ifndef _XTESTEXT1PROTO_H
#define _XTESTEXT1PROTO_H 1
#include <X11/extensions/xtestext1const.h>
/*
* the typedefs for CARD8, CARD16, and CARD32 are defined in Xmd.h
*/
/*
* used in the XTestPressButton and XTestPressKey functions
*/
#define XTestPRESS 1 << 0
#define XTestRELEASE 1 << 1
#define XTestSTROKE 1 << 2
/*
* When doing a key or button stroke, the number of milliseconds
* to delay between the press and the release of a key or button
* in the XTestPressButton and XTestPressKey functions.
*/
#define XTestSTROKE_DELAY_TIME 10
/*
* used in the XTestGetInput function
*/
#define XTestEXCLUSIVE 1 << 0
#define XTestPACKED_ACTIONS 1 << 1
#define XTestPACKED_MOTION 1 << 2
/*
* used in the XTestFakeInput function
*/
#define XTestFAKE_ACK_NOT_NEEDED 0
#define XTestFAKE_ACK_REQUEST 1
/*
* used in the XTest extension initialization routine
*/
#define XTestEXTENSION_NAME "XTestExtension1"
#define XTestEVENT_COUNT 2
/*
* XTest request type values
* XTest request type values
*
* used in the XTest extension protocol requests
*/
@ -107,7 +75,6 @@ University of California.
* 4 so that the entire xTestFakeInputReq structure size is a
* multiple of 4.
*/
#define XTestMAX_ACTION_LIST_SIZE 64
typedef struct {
CARD8 reqType; /* always XTestReqCode */
@ -171,8 +138,6 @@ typedef struct {
* more user input actions to report to the client. It must
* remain the same size as all other wire events (32 bytes).
*/
#define XTestACTIONS_SIZE 28
typedef struct {
CARD8 type; /* always XTestInputActionType */
CARD8 pad00;
@ -199,64 +164,9 @@ typedef struct {
CARD32 pad08 B32;
} xTestFakeAckEvent;
/*
* The server side of this extension does not (and should not) have
* definitions for Display and Window. The ifndef allows the server
* side of the extension to ignore the following typedefs.
*/
#ifndef XTestSERVER_SIDE
/*
* This is the definition for the input action host format event structure.
* This is the form that a client using this extension will see when
* it receives an input action event.
*/
typedef struct {
int type; /* always XTestInputActionType */
Display *display;
Window window;
CARD8 actions[XTestACTIONS_SIZE];
} XTestInputActionEvent;
/*
* This is the definition for the xTestFakeAck host format event structure.
* This is the form that a client using this extension will see when
* it receives an XTestFakeAck event.
*/
typedef struct {
int type; /* always XTestFakeAckType */
Display *display;
Window window;
} XTestFakeAckEvent;
#endif
/*
* This is the definition for the format of the header byte
* in the input action structures.
*/
#define XTestACTION_TYPE_MASK 0x03 /* bits 0 and 1 */
#define XTestKEY_STATE_MASK 0x04 /* bit 2 (key action) */
#define XTestX_SIGN_BIT_MASK 0x04 /* bit 2 (motion action) */
#define XTestY_SIGN_BIT_MASK 0x08 /* bit 3 (motion action) */
#define XTestDEVICE_ID_MASK 0xf0 /* bits 4 through 7 */
#define XTestMAX_DEVICE_ID 0x0f
#define XTestPackDeviceID(x) (((x) & XTestMAX_DEVICE_ID) << 4)
#define XTestUnpackDeviceID(x) (((x) & XTestDEVICE_ID_MASK) >> 4)
/*
* These are the possible action types.
*/
#define XTestDELAY_ACTION 0
#define XTestKEY_ACTION 1
#define XTestMOTION_ACTION 2
#define XTestJUMP_ACTION 3
/*
* These are the definitions for key/button motion input actions.
*/
#define XTestKEY_UP 0x04
#define XTestKEY_DOWN 0x00
typedef struct {
CARD8 header; /* which device, key up/down */
CARD8 keycode; /* which key/button to move */
@ -283,20 +193,6 @@ typedef struct {
* into one byte to make things fit in 32 bits. If the relative
* motion range is larger than +/-15, use the pointer jump action.
*/
#define XTestMOTION_MAX 15
#define XTestMOTION_MIN -15
#define XTestX_NEGATIVE 0x04
#define XTestY_NEGATIVE 0x08
#define XTestX_MOTION_MASK 0x0f
#define XTestY_MOTION_MASK 0xf0
#define XTestPackXMotionValue(x) ((x) & XTestX_MOTION_MASK)
#define XTestPackYMotionValue(x) (((x) << 4) & XTestY_MOTION_MASK)
#define XTestUnpackXMotionValue(x) ((x) & XTestX_MOTION_MASK)
#define XTestUnpackYMotionValue(x) (((x) & XTestY_MOTION_MASK) >> 4)
typedef struct {
CARD8 header; /* which pointer */
@ -305,7 +201,7 @@ typedef struct {
} XTestMotionInfo;
/*
* These are the definitions for a long delay input action. It is
* These are the definitions for a long delay input action. It is
* used when more than XTestSHORT_DELAY_TIME milliseconds of delay
* (approximately one minute) is needed.
*
@ -315,12 +211,11 @@ typedef struct {
* there are no more input actions in an XTestInputAction event.
*/
#define XTestSHORT_DELAY_TIME 0xffff
#define XTestDELAY_DEVICE_ID 0x0f
typedef struct {
CARD8 header; /* always XTestDELAY_DEVICE_ID */
CARD8 pad1; /* unused padding byte */
CARD16 pad2 B16; /* unused padding word */
CARD32 delay_time B32; /* how long to delay (in ms) */
} XTestDelayInfo;
#endif /* _XTESTEXT1PROTO_H */

View File

@ -1,4 +1,3 @@
/* $Xorg: xteststr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
/*
Copyright 1992, 1998 The Open Group
@ -25,14 +24,19 @@ in this Software without prior written authorization from The Open Group.
*/
#ifndef _XTESTSTR_H_
#define _XTESTSTR_H_
#ifndef _XTESTPROTO_H_
#define _XTESTPROTO_H_
#include <X11/extensions/xtestconst.h>
#define Window CARD32
#define Time CARD32
#define Cursor CARD32
#define XTestCurrentCursor ((Cursor)1)
#define X_XTestGetVersion 0
#define X_XTestCompareCursor 1
#define X_XTestFakeInput 2
#define X_XTestGrabControl 3
typedef struct {
CARD8 reqType; /* always XTestReqCode */
@ -117,4 +121,4 @@ typedef struct {
#undef Time
#undef Cursor
#endif /* _XTESTSTR_H_ */
#endif /* _XTESTPROTO_H_ */