summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2003-10-19 20:18:28 +0000
committerKeith Packard <keithp@keithp.com>2003-10-19 20:18:28 +0000
commit01a3405bb1c4338a07586e0a9e009dd08b0c5263 (patch)
treee6776c28f50c9dd33e7fb21064aa1ca4cd7e8f86
parent0c9e4c7af3d366b99c98ba199bae92cf5873b388 (diff)
Update to version 2.0. Add dependency on xextensions package Add region requests and cursor namesxfixes_2_branch
-rw-r--r--ChangeLog12
-rw-r--r--configure.ac6
-rw-r--r--fixesext.pc.in6
-rw-r--r--protocol385
-rw-r--r--xfixesproto.h278
-rw-r--r--xfixeswire.h38
6 files changed, 666 insertions, 59 deletions
diff --git a/ChangeLog b/ChangeLog
index 64775a3..3f3eb2a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2003-10-19 Keith Packard <keithp@keithp.com>
+
+ * configure.ac:
+ * fixesext.pc.in:
+ * protocol:
+ * xfixesproto.h:
+ * xfixeswire.h:
+ Update to version 2.0.
+ Add dependency on xextensions package
+ Add region requests and cursor names
+
+
2003-09-16 Anders Carlsson <andersca@gnome.org>
* configure.ac:
diff --git a/configure.ac b/configure.ac
index aae3e8a..199c666 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
dnl
-dnl $Id: configure.ac,v 1.1 2003-10-09 01:48:22 keithp Exp $
+dnl $Id: configure.ac,v 1.1.2.1 2003-10-19 20:18:28 keithp Exp $
dnl
dnl Copyright © 2003 Keith Packard, Noah Levitt
dnl
@@ -24,10 +24,12 @@ dnl
dnl Process this file with autoconf to create configure.
AC_PREREQ([2.57])
-AC_INIT([fixesext], [1.0], [keithp@keithp.com], fixesext)
+AC_INIT([fixesext], [2.0], [keithp@keithp.com], fixesext)
AM_INIT_AUTOMAKE([dist-bzip2])
AM_MAINTAINER_MODE
+PKG_CHECK_MODULES(XEXTENSIONS, xextensions)
+
AC_OUTPUT([Makefile
fixesext.pc])
diff --git a/fixesext.pc.in b/fixesext.pc.in
index 5eab95c..a8c038d 100644
--- a/fixesext.pc.in
+++ b/fixesext.pc.in
@@ -3,7 +3,7 @@ exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
-Name: RandR
-Description: RandR extension headers
+Name: FixesExt
+Description: X Fixes extension headers
Version: @PACKAGE_VERSION@
-Cflags: -I${includedir}
+Cflags: -I${includedir} @XEXTENSIONS_CFLAGS@
diff --git a/protocol b/protocol
index 70fc146..3b6b234 100644
--- a/protocol
+++ b/protocol
@@ -1,8 +1,8 @@
The XFIXES Extension
- Version 1.0
- 2002-11-30
+ Version 2.0
+ 2003-10-15
Keith Packard
- keithp@xfree86.org
+ keithp@keithp.com
1. Introduction
@@ -24,6 +24,8 @@ developers, in particular,
+ Havoc Pennington
+ + Fredrik Höglund for cursor names
+
3. Basic Premise
Requests in this extension may seem to wander all over the map of X server
@@ -54,6 +56,8 @@ QueryVersion
the clients responsibility to ensure that the server supports
a version which is compatible with its expectations.
+************* XFIXES VERSION 1 OR BETTER ***********
+
5. Save Set processing changes
Embedding one application within another provides a way of unifying
@@ -82,19 +86,22 @@ Having embedded windows suddenly appear at the top level can confuse users,
so XFIXES also permits these windows to remain unmapped instead of being
remapped.
+5.1 Requests
+
ChangeSaveSet
- window: Window
- mode: { Insert, Delete }
- target: { Nearest, Root }
- map: { Map, Unmap }
+ window: Window
+ mode: { Insert, Delete }
+ target: { Nearest, Root }
+ map: { Map, Unmap }
-ChangeSaveSet is an extension of the core protocol ChangeSaveSet
-request. As in that request, mode specifies whether the indicated
-window is inserted or deleted from the save-set. Target specifies
-whether the window is reparented to the nearest non-client window as in the
-core protocol, or reparented to the root window. Map specifies
-whether the window is mapped as in the core protocol or unmapped.
+ ChangeSaveSet is an extension of the core protocol ChangeSaveSet
+ request. As in that request, mode specifies whether the indicated
+ window is inserted or deleted from the save-set. Target specifies
+ whether the window is reparented to the nearest non-client window as
+ in the core protocol, or reparented to the root window. Map
+ specifies whether the window is mapped as in the core protocol or
+ unmapped.
6. Selection Tracking
@@ -102,10 +109,14 @@ Applications wishing to monitor the contents of current selections must
poll for selection changes. XFIXES improves this by providing an event
delivered whenever the selection ownership changes.
+6.1 Types
+
SELECTIONEVENT { SetSelectionOwner,
SelectionWindowDestroy,
SelectionClientClose }
+6.1 Events
+
SelectionNotify
subtype: SELECTIONEVENT
@@ -115,17 +126,20 @@ SelectionNotify
timestamp: Timestamp
selection-timestamp: Timestamp
+6.2 Requests
+
SelectSelectionInput
- window: Window
- selection: Atom
- event-mask: SETofSELECTIONEVENT
+ window: Window
+ selection: Atom
+ event-mask: SETofSELECTIONEVENT
-Selects for events to be delivered to window when various causes of
-ownership of selection occur. Subtype indicates the cause of the selection
-ownership change. Owner is set to the current selection owner, or None.
-Timestamp indicates the time the event was generated while
-selection-timestamp indicates the timestamp used to own the selection.
+ Selects for events to be delivered to window when various causes of
+ ownership of selection occur. Subtype indicates the cause of the
+ selection ownership change. Owner is set to the current selection
+ owner, or None. Timestamp indicates the time the event was
+ generated while selection-timestamp indicates the timestamp used to
+ own the selection.
7. Cursor Image Monitoring
@@ -141,53 +155,326 @@ is no stable name available. Instead, XFIXES returns only the image of the
current cursor and provides a way to identify cursor images to avoid
refetching the image each time it changes to a previously seen cursor.
+7.1 Types
CURSOREVENT { DisplayCursor }
+7.2 Events
+
CursorNotify
subtype: CURSOREVENT
window: Window
cursor-serial: CARD32
timestamp: Timestamp
+ name: Atom (Version 2 only)
+
+7.3 Requests
SelectCursorInput
- window: Window
- event-mask: SETofCURSOREVENT
+ window: Window
+ event-mask: SETofCURSOREVENT
-This request directs cursor change events to the named window. Events will
-be delivered irrespective of the screen on which they occur. Subtype
-indicates the cause of the cursor image change (there is only one subtype at
-present). Cursor-serial is a number assigned to the cursor image which
-identifies the image. Cursors with different serial numbers may have
-different images. Timestamp is the time of the cursor change.
+ This request directs cursor change events to the named window.
+ Events will be delivered irrespective of the screen on which they
+ occur. Subtype indicates the cause of the cursor image change
+ (there is only one subtype at present). Cursor-serial is a number
+ assigned to the cursor image which identifies the image. Cursors
+ with different serial numbers may have different images. Timestamp
+ is the time of the cursor change.
GetCursorImage
- ->
+ ->
- x: INT16
- y: INT16
- width: CARD16
- height: CARD16
- x-hot: CARD16
- y-hot: CARD16
- cursor-serial: CARD32
- cursor-image: LISTofCARD32
+ x: INT16
+ y: INT16
+ width: CARD16
+ height: CARD16
+ x-hot: CARD16
+ y-hot: CARD16
+ cursor-serial: CARD32
+ cursor-image: LISTofCARD32
+
+ GetCursorImage returns the image of the current cursor. X and y are
+ the current cursor position. Width and height are the size of the
+ cursor image. X-hot and y-hot mark the hotspot within the cursor
+ image. Cursor-serial provides the number assigned to this cursor
+ image, this same serial number will be reported in a CursorNotify
+ event if this cursor image is redisplayed in the future.
+
+ The cursor image itself is returned as a single image at 32 bits per
+ pixel with 8 bits of alpha in the most significant 8 bits of the
+ pixel followed by 8 bits each of red, green and finally 8 bits of
+ blue in the least significant 8 bits. The color components are
+ pre-multiplied with the alpha component.
+
+************* XFIXES VERSION 2 OR BETTER ***********
+
+8. Region Objects
+
+The core protocol doesn't expose regions as a primitive object and this
+makes many operations more complicated than they really need to be. Adding
+region objects simplifies expose handling, the Shape extension and other
+operations. These operations are also designed to support a separate
+extension, the X Damage Extension.
+
+8.1 Types
+
+ Region: XID
+ WINDOW_REGION_KIND: { Bounding, Clip }
+
+8.2 Errors
+
+ Region The specified region is invalid
+
+8.3 Requests
+
+CreateRegion
+
+ region: REGION
+ rects: LISTofRECTANGLE
+
+ Creates a region initialized to the specified list of rectangles.
+ The rectangles may be specified in any order, their union becomes
+ the region. The core protocol allows applications to specify an
+ order for the rectangles, but it turns out to be just as hard to
+ verify the rectangles are actually in that order as it is to simply
+ ignore the ordering information and union them together. Hence,
+ this request dispenses with the ordering information.
+
+ Errors: IDChoice
+
+CreateRegionFromBitmap
+
+ region: REGION
+ bitmap: PIXMAP
+
+ Creates a region initialized to the set of 'one' pixels in bitmap
+ (which must be depth 1, else Match error).
+
+ Errors: Pixmap, IDChoice, Match
+
+CreateRegionFromWindow
+
+ window: Window
+ kind: WINDOW_REGION_KIND
+ region: Region
+
+ Creates a region initialized to the specified window region. See the
+ Shape extension for the definition of Bounding and Clip regions.
+
+ Errors: Window, IDChoice, Value
+
+CreateRegionFromGC
+
+ gc: GContext
+ region: Region
+
+ Creates a region initialized from the clip list of the specified
+ GContext.
+
+ Errors: GContext, IDChoice
+
+CreateRegionFromPicture
+
+ picture: Picture
+ region: Region
+
+
+ Creates a region initialized from the clip list of the specified
+ Picture.
+
+ Errors: Picture, IDChoice
+
+DestroyRegion
+
+ region: Region
+
+ Destroys the specified region.
+
+ Errors: Region
+
+SetRegion
+
+ region: Region
+ rects: LISTofRECTANGLE
+
+ This replaces the current contents of region with the region formed
+ by the union of rects.
+
+UnionRegion
+IntersectRegion
+SubtractRegion
+
+ source1: Region or None
+ xOff1, yOff1: INT16
+ source2: Region or None
+ xOff2, yOff2: INT16
+ destination: Region
+
+ Combines source1 and source2, placing the result in destination.
+ Destination may be the same as either source1 or source2. If
+ source1 or source2 are None, the operation behaves as if an empty
+ region was specified. xOff1, yOff1 are added to the coordinates of
+ source1 while xOff2 and yOff2 are added to the coordinates of
+ source2.
+
+ Errors: Region, Value
+
+InvertRegion
+
+ source: Region
+ xOff, yOff: INT16
+ bounds: RECTANGLE
+ destination: Region
+
+ The source region is offset by xOff, yOff and subtracted from the
+ region specified by bounds. The result is placed in destination,
+ replacing its contents.
+
+ Errors: Region
+
+RegionExtents
+
+ source: Region
+ destination: Region
+
+ The extents of the source region are placed in the destination
+
+FetchRegion
+
+ region: Region
+ ->
+ extents: RECTANGLE
+ rectangles: LISTofRECTANGLE
+
+ The region is returned as a list of rectangles in YX-banded order.
+
+ Errors: Region
+
+SetGCClipRegion
+
+ gc: GCONTEXT
+ clip-x-origin, clip-y-origin: INT16
+ region: Region or None
+
+ This request changes clip-mask in gc to the specified region and
+ sets the clp origin. Output will be clippped to remain contained
+ within the region. The clip origin is interpreted relative to the
+ origin of whatever destination drawable is specified in a graphics
+ request. The region is interpreted relative to the clip origin.
+ Future changes to region have no effect on the gc clip-mask.
+
+ Errors: GContext, Region
+
+SetWindowShapeRegion
+
+ dest: Window
+ destKind: SHAPE_KIND
+ xOff, yOff: INT16
+ region: Region or None
+
+ This request sets the specified (by destKind) Shape extension region
+ of the window to region, offset by xOff and yOff. Future changes to
+ region have no effect on the window shape.
+
+ Errors: Window, Value, Region
+
+SetPictureClipRegion
+
+ picture: Picture
+ clip-x-origin, clip-y-origin: INT16
+ region: Region or None
+
+ This request changes clip-mask in picture to the specified region
+ and sets the clip origin. Input and output will be clipped to
+ remain contained within the region. The clip origin is interpreted
+ relative to the origin of the drawable associated with picture. The
+ region is interpreted relative to the clip origin. Future changes
+ to region have no effect on the picture clip-mask.
+
+ Errors: Picture, Region
+
+9. Cursor Names
+
+Attaching names to cursors permits some abstract semantic content to be
+associated with specific cursor images. Reflecting those names back to
+applications allows that semantic content to be related to the user through
+non-visual means.
+
+9.1 Events
+
+CursorNotify
+
+ subtype: CURSOREVENT
+ window: Window
+ cursor-serial: CARD32
+ timestamp: Timestamp
+ name: Atom or None
+
+ In Version 2 of the XFIXES protocol, this event adds the atom
+ of any name associated with the current cursor (else None).
+
+9.2 Requests
+
+SetCursorName
+
+ cursor: CURSOR
+ name: LISTofCARD8
+
+ This request interns name as an atom and sets that atom as the name
+ of cursor.
+
+ Errors: Cursor
+
+GetCursorName
+
+ cursor: CURSOR
+ ->
+ atom: ATOM or None
+ name: LISTofCARD8
+
+ This request returns the name and atom of cursor. If no name is
+ set, atom is None and name is empty.
+
+ Errors: Cursor
+
+GetCursorImageAndName
+
+ ->
+
+ x: INT16
+ y: INT16
+ width: CARD16
+ height: CARD16
+ x-hot: CARD16
+ y-hot: CARD16
+ cursor-serial: CARD32
+ cursor-atom: ATOM
+ cursor-name: LISTofCARD8
+ cursor-image: LISTofCARD32
+
+ This is similar to GetCursorImage except for including both
+ the atom and name of the current cursor.
+
+ChangeCursor
+
+ source, destination: CURSOR
+
+ This request replaces all references to the destination with a
+ reference to source. Any existing uses of the destination cursor
+ object will now show the source cursor image.
-GetCursorImage returns the image of the current cursor. X and y are the
-current cursor position. Width and height are the size of the cursor image.
-X-hot and y-hot mark the hotspot within the cursor image. Cursor-serial
-provides the number assigned to this cursor image, this same serial number
-will be reported in a CursorNotify event if this cursor image is redisplayed
-in the future.
+ChangeCursorByName
-The cursor image itself is returned as a single image at 32 bits per pixel
-with 8 bits of alpha in the most significant 8 bits of the pixel followed by
-8 bits each of red, green and finally 8 bits of blue in the least significant
-8 bits. The color components are pre-multiplied with the alpha component.
+ src: CURSOR
+ name: LISTofCARD8
-8. Future compatibility
+ This request replaces the contents of all cursors with the specified
+ name with the src cursor.
+
+99. Future compatibility
This extension is not expected to remain fixed. Future changes will
strive to remain compatible if at all possible. The X server will always
diff --git a/xfixesproto.h b/xfixesproto.h
index 7de213b..8bdae6f 100644
--- a/xfixesproto.h
+++ b/xfixesproto.h
@@ -27,6 +27,9 @@
#include <X11/Xmd.h>
#include <X11/extensions/xfixeswire.h>
+#define _SHAPE_SERVER_
+#include <X11/extensions/shape.h>
+#undef _SHAPE_SERVER_
#define Window CARD32
#define Drawable CARD32
@@ -40,6 +43,15 @@
#define Time CARD32
#define KeyCode CARD8
#define KeySym CARD32
+#define Picture CARD32
+
+/*************** Version 1 ******************/
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+} xXFixesReq;
/*
* requests and replies
@@ -123,10 +135,10 @@ typedef struct {
Window window B32;
CARD32 cursorSerial B32;
Time timestamp;
+ Atom name B32; /* Version 2 */
CARD32 pad1 B32;
CARD32 pad2 B32;
CARD32 pad3 B32;
- CARD32 pad4 B32;
} xXFixesCursorNotifyEvent;
typedef struct {
@@ -155,6 +167,270 @@ typedef struct {
#define sz_xXFixesGetCursorImageReply 32
+/*************** Version 2 ******************/
+
+#define Region CARD32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region region B32;
+ /* LISTofRECTANGLE */
+} xXFixesCreateRegionReq;
+
+#define sz_xXFixesCreateRegionReq 8
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region region B32;
+ Pixmap bitmap B32;
+} xXFixesCreateRegionFromBitmapReq;
+
+#define sz_xXFixesCreateRegionFromBitmapReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region region B32;
+ Window window B32;
+ CARD8 kind;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+} xXFixesCreateRegionFromWindowReq;
+
+#define sz_xXFixesCreateRegionFromWindowReq 16
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region region B32;
+ GContext gc B32;
+} xXFixesCreateRegionFromGCReq;
+
+#define sz_xXFixesCreateRegionFromGCReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region region B32;
+ Picture picture B32;
+} xXFixesCreateRegionFromPictureReq;
+
+#define sz_xXFixesCreateRegionFromPictureReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region region B32;
+} xXFixesDestroyRegionReq;
+
+#define sz_xXFixesDestroyRegionReq 8
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region region B32;
+ /* LISTofRECTANGLE */
+} xXFixesSetRegionReq;
+
+#define sz_xXFixesSetRegionReq 8
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region source1 B32;
+ INT16 xOff1 B16, yOff1 B16;
+ Region source2 B32;
+ INT16 xOff2 B16, yOff2 B16;
+ Region destination B32;
+} xXFixesCombineRegionReq,
+ xXFixesUnionRegionReq,
+ xXFixesIntersectRegionReq,
+ xXFixesSubtractRegionReq;
+
+#define sz_xXFixesCombineRegionReq 24
+#define sz_xXFixesUnionRegionReq sz_xXFixesCombineRegionReq
+#define sz_xXFixesIntersectRegionReq sz_xXFixesCombineRegionReq
+#define sz_xXFixesSubtractRegionReq sz_xXFixesCombineRegionReq
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region source B32;
+ INT16 xOff B16, yOff B16;
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16;
+ Region destination B32;
+} xXFixesInvertRegionReq;
+
+#define sz_xXFixesInvertRegionReq 24
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region source B32;
+ Region destination B32;
+} xXFixesRegionExtentsReq;
+
+#define sz_xXFixesRegionExtentsReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Region region B32;
+} xXFixesFetchRegionReq;
+
+#define sz_xXFixesFetchRegionReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ INT16 x B16, y B16;
+ CARD16 width B16, height B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xXFixesFetchRegionReply;
+
+#define sz_xXFixesFetchRegionReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ GContext gc B32;
+ Region region B32;
+ INT16 xOrigin B16, yOrigin B16;
+} xXFixesSetGCClipRegionReq;
+
+#define sz_xXFixesSetGCClipRegionReq 16
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Window dest;
+ BYTE destKind;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+ INT16 xOff B16, yOff B16;
+ Region region;
+} xXFixesSetWindowShapeRegionReq;
+
+#define sz_xXFixesSetWindowShapeRegionReq 20
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Picture picture B32;
+ Region region B32;
+ INT16 xOrigin B16, yOrigin B16;
+} xXFixesSetPictureClipRegionReq;
+
+#define sz_xXFixesSetPictureClipRegionReq 16
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Cursor cursor B32;
+ CARD16 nbytes B16;
+ CARD16 pad B16;
+} xXFixesSetCursorNameReq;
+
+#define sz_xXFixesSetCursorNameReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Cursor cursor B32;
+} xXFixesGetCursorNameReq;
+
+#define sz_xXFixesGetCursorNameReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ Atom atom B32;
+ CARD16 nbytes B16;
+ CARD16 pad2 B16;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xXFixesGetCursorNameReply;
+
+#define sz_xXFixesGetCursorNameReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+} xXFixesGetCursorImageAndNameReq;
+
+#define sz_xXFixesGetCursorImageAndNameReq 4
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ INT16 x B16;
+ INT16 y B16;
+ CARD16 width B16;
+ CARD16 height B16;
+ CARD16 xhot B16;
+ CARD16 yhot B16;
+ CARD32 cursorSerial B32;
+ Atom cursorName B32;
+ CARD16 nbytes B16;
+ CARD16 pad B16;
+} xXFixesGetCursorImageAndNameReply;
+
+#define sz_xXFixesGetCursorImageAndNameReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Cursor source B32;
+ Cursor destination B32;
+} xXFixesChangeCursorReq;
+
+#define sz_xXFixesChangeCursorReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ Cursor source B32;
+ CARD16 nbytes;
+ CARD16 pad;
+} xXFixesChangeCursorByNameReq;
+
+#define sz_xXFixesChangeCursorByNameReq 12
+
+#undef Region
+#undef Picture
#undef Window
#undef Drawable
#undef Font
diff --git a/xfixeswire.h b/xfixeswire.h
index d6c907f..b0c8e19 100644
--- a/xfixeswire.h
+++ b/xfixeswire.h
@@ -27,16 +27,39 @@
#define _XFIXESWIRE_H_
#define XFIXES_NAME "XFIXES"
-#define XFIXES_MAJOR 1
+#define XFIXES_MAJOR 2
#define XFIXES_MINOR 0
+/*************** Version 1 ******************/
#define X_XFixesQueryVersion 0
#define X_XFixesChangeSaveSet 1
#define X_XFixesSelectSelectionInput 2
#define X_XFixesSelectCursorInput 3
#define X_XFixesGetCursorImage 4
-
-#define XFixesNumberRequests (X_XFixesGetCursorImage+1)
+/*************** Version 2 ******************/
+#define X_XFixesCreateRegion 5
+#define X_XFixesCreateRegionFromBitmap 6
+#define X_XFixesCreateRegionFromWindow 7
+#define X_XFixesCreateRegionFromGC 8
+#define X_XFixesCreateRegionFromPicture 9
+#define X_XFixesDestroyRegion 10
+#define X_XFixesSetRegion 11
+#define X_XFixesUnionRegion 12
+#define X_XFixesIntersectRegion 13
+#define X_XFixesSubtractRegion 14
+#define X_XFixesInvertRegion 15
+#define X_XFixesRegionExtents 16
+#define X_XFixesFetchRegion 17
+#define X_XFixesSetGCClipRegion 18
+#define X_XFixesSetWindowShapeRegion 19
+#define X_XFixesSetPictureClipRegion 20
+#define X_XFixesSetCursorName 21
+#define X_XFixesGetCursorName 22
+#define X_XFixesGetCursorImageAndName 23
+#define X_XFixesChangeCursor 24
+#define X_XFixesChangeCursorByName 25
+
+#define XFixesNumberRequests (X_XFixesChangeCursorByName+1)
/* Selection events share one event number */
#define XFixesSelectionNotify 0
@@ -59,7 +82,9 @@
#define XFixesNumberEvents (2)
-#define XFixesNumberErrors (0)
+/* errors */
+#define BadRegion 0
+#define XFixesNumberErrors (BadRegion+1)
#define SaveSetNearest 0
#define SaveSetRoot 1
@@ -67,4 +92,9 @@
#define SaveSetMap 0
#define SaveSetUnmap 1
+/*************** Version 2 ******************/
+
+#define WindowRegionBounding 0
+#define WindowRegionClip 1
+
#endif /* _XFIXESWIRE_H_ */