From strandh@cs.utexas.edu Tue Oct 27 13:28:23 1998
Subject: X protocol definition
Date: Tue, 26 Aug 1997 18:22:28 -0500
From: strandh@cs.utexas.edu
To: donovan@rscheme.org

Here is the complete (I hope) list of all requests, errors, and
events.  Still missing is the connection setup and the server reply.

Requests

CreateWindow
1	1				opcode
1	CARD8				depth
2	8+n				request length
4	WINDOW				wid
4	WINDOW				parent
2	INT16				x
2	INT16				y
2	CARD16				width
2	CARD16				height
2	CARD16				border-width
2					class
	0  CopyFromParent
	1  InputOutput
	2  InputOnly
2	VISUALID			visual
	0  CopyFromParent
4	BITMASK				value-mask (has n bits set to 1)
	#x00000001 background-pixmap
	#x00000002 background-pixel
	#x00000004 border-pixmap
	#x00000008 border-pixel
	#x00000010 bit-gravity
	#x00000020 win-gravity
	#x00000040 backing-store
	#x00000080 backing-planes
	#x00000100 backing-pixel
	#x00000200 override-redirect
	#x00000400 save-under
	#x00000800 event-mask
	#x00001000 do-not-propagate-mask
	#x00002000 colormap
	#x00004000 cursor
4n	LISTofVALUE			value-list


VALUEs
4	PIXMAP				background-pixmap
	0  None
	1  ParentRelative
4	CARD32				background-pixel
4	PIXMAP				border-pixmap
	0  CopyFromParent
4	CARD32				border-pixel
1	BITGRAVITY			bit-gravity
1	WINGRAVITY			win-gravity
1					backing-store
	0  NotUseful
	1  WhenMapped
	2  Always
4	CARD32				backing-planes
4	CARD32				backing-pixel
1	BOOL				override-redirect
1	BOOL				save-under
4	SETofEVENT			event-mask
4	SETofDEVICEEVENT		do-not-propagate-mask
4	COLORMAP			colormap
	0  CopyFromParent
4	CURSOR				cursor
	0  None


ChangeWindowAttributes
1	2				opcode
1					unused
2	3+n				request length
4	WINDOW				window
4	BITMASK				value-mask (has n bits set to 1)
	encodings are the same as for 
	CreateWindow
4n	LISTofVALUE			value-list
	encodings are the same as for 
	CreateWindow


GetWindowAttributes
1	3				opcode
1					unused
2	2				request-length
4	WINDOW				window
-->
1	1				Reply
1					backing-store
	0  NotUseful
	1  WhenMapped
	2  Always
2	CARD16				sequence number
4	3				reply length
4	VISUALID			visual
2					class
	1  InputOutput
	2  InputOnly
1	BITGRAVITY			bit-gravity
1	WINGRAVITY			win-gravity
4	CARD32				backing-planes
4	CARD32				backing-pixel
1	BOOL				save-under
1	BOOL				map-is-installed
1					map-state
	0  Unmapped
	1  Unviewable
	2  Viewable
1	BOOL				override-redirect
4	COLORMAP			colormap
	0  None
4	SETofEVENT			all-event-masks
4	SETofEVENT			your-event-mask
2	SETofDEVICEEVENT		do-not-propagate-mask
2					unused


DestroyWindow
1	4				opcode
1					unused
2	2				request length
4	WINDOW				window


DestroySubwindows
1	5				opcode
1					unused
2	2				request length
4	WINDOW				window


ChangeSaveSet
1	6				opcode
1					mode
	0  Insert
	1  Delete
2	2				request length
4	WINDOW				window


ReparentWindow
1	7				opcode
1					unused
2	4				request length
4	WINDOW				window
4	WINDOW				parent
2	INT16				x
2	INT16				y

MapWindow
1	8				opcode
1					unused
2	2				request length
4	WINDOW				window


MapSubwindows
1	9				opcode
1					unused
2	2				request length
4	WINDOW				window


UnmapWindow
1	10				opcode
1					unused
2	2				request length
4	WINDOW				window


UnmapSubwindows
1	11				opcode
1					unused
2	2				request length
4	WINDOW				window


ConfigureWindow
1	12				opcode
1					unused
2	3+n				request length
4	WINDOW				window
2	BITMASK				value-mask (has n bits set to 1)
	#x0001  x
	#x0002  y
	#x0004  width
	#x0008  height
	#x0010  border-width
	#x0020  sibling
	#x0040  stack-mode
2					unused
4n	LISTofVALUE

VALUEs
2	INT16				x
2	INT16				y
2	CARD16				width
2	CARD16				height
2	CARD16				border-width
4	WINDOW				sibling
1					stack-mode
	0  Above
	1  Below
	2  TopIf
	3  BottomIf
	4  Opposite


CirculateWindow
1	13				opcode
1					direction
	0  RaiseLowest
	1  LowerHighest
2	2				request length
4	WINDOW				window


GetGeometry
1	14				opcode
1					unused
2	2				request length
4	DRAWABLE			drawable
-->
1	1				Reply
1	CARD8				depth
2	CARD16				sequence number
4	0				reply length
4	WINDOW				root
2	INT16				x
2	INT16				y
2	CARD16				width
2	CARD16				height
2	CARD16				border-width
10					unused


QueryTree
1	15				opcode
1					unused
2	2				request length
4	WINDOW
-->
1	1				Reply
1					unused
2	CARD16				sequence number
4	n				reply length
4	WINDOW				root
4	WINDOW				parent
	0  None
2	n				number of WINDOWs in children
14					unused
4n	LISTofWINDOW			children

InternAtom
1	16				opcode
1	BOOL				only-if-exists
2	2+(n+p)/4			request length
2	n				length of name
2					unused
n	STRING8				name
p					unused, p=pad(n)
-->
1	1				Reply
1					unused
2	CARD16				sequence number
4	0				reply length
4	ATOM				atom
	0  None
20					unused

GetAtomName
1	17				opcode
1					unused
2	2				request length
4	ATOM				atom
-->
1	1				Reply
1					unused
2	CARD16				sequence number
4	(n+p)/4				reply length
2	n				length of name
22					unused
n	STRING8				name
p					unused, p=pad(n)

ChangeProperty
1	18				opcode
1					mode
	0  Replace
	1  Prepend
	2  Append
2	6+(n+p)/4			request length
4	WINDOW				window
4	ATOM				property
4	ATOM				type
1	CARD8				format
3					unused
4	CARD32				length of data in format units
					(= n for format = 8)
					(= n/2 for format = 16)
					(= n/4 for format = 32)
n	LISTofBYTE			data
					(n is multiple of 2 for
					 format = 16)
					(n is multiple of 4 for
					 format = 32)
p					unused, p=pad(n)

DeleteProperty
1	19				opcode
1					unused
2	3				request length
4	WINDOW				window
4	ATOM				property


GetProperty
1	20				opcode
1	BOOL				delete
2	6				request length
4	WINDOW				window
4	ATOM				property
4	ATOM				type
	0  AnyPropertyType
4	CARD32				long-offset
4	CARD32				long-length
-->
1	1				Reply
1	CARD8				format
2	CARD16				sequence number
4	(n+p)/4				reply length
4	ATOM				type
	0  None
4	CARD32				bytes-after
4	CARD32				length of value in format units
					(= 0 for format = 0)
					(= n for format = 8)
					(= n/2 for format = 16)
					(= n/4 for format = 32)
12					unused
n	LISTofBYTE			(n is zero for format = 0)
					(n is a multiple of 2 for
					 format = 16)
					(n is a multiple of 4 for
					 format = 32)
p					unused, p=pad(n)


ListProperties
1	21				opcode
1					unused
2	2				request length
4	WINDOW				window
-->
1	1				Reply
1					unused
2	CARD16				sequence number
4	n				reply length
2	n				number of ATOMs in atoms
22					unused
4n	LISTofATOM			atoms


SetSelectionOwner
1	22				opcode
1					unused
2	4				request length
4	WINDOW				owner
	0  None
4	ATOM				selection
4	TIMESTAMP			time
	0  CurrentTime

GetSelctionOwner
1	23				opcode
1					unused
2	2				request length
4	ATOM				selection
-->
1	1				Reply
1					unused
2	CARD16				sequence number
4	0				reply length
4	WINDOW				owner
	0  None
20					unused


ConvertSelection
1	24				opcode
1					unused
2	6				request length
4	WINDOW				requestor
4	ATOM				selection
4	ATOM				target
4	ATOM				property
	0  None
4	TIMESTAMP			time
	0  CurrentTime

SendEvent
1	25				opcode
1	BOOL				propagate
1	11				request length
4	WINDOW				destination
	0  PointerWindow
	1  InputFocus
4	SETofEVENT			event-mask
32					event
	standard event format


GrabPointer
1	26				opcode
1	BOOL				owner-events
2	6				request length
4	WINDOW				grab-window
2	SETofPOINTEREVENT		event-mask
1					pointer-mode
	0  Synchronous
	1  Asynchronous
1					keyboard-mode
	0  Synchronous
	1  Asynchronous
4	WINDOW				confine-to
	0  None
4	CURSOR				cursor
	0  None
4	TIMESTAMP			time
	0  CurrentTime
-->
1	1				Reply
1					status
	0  Success
	1  AlreadyGrabbed
	2  InvalidTime
	3  NotViewable
	4  Frozen
2	CARD16				sequence number
4	0				reply length
24					unused


UngrabPointer
1	27				opcode
1					unused
2	2				request length
4	TIMESTAMP			time
	0  CurrentTime

GrabButton
1	28				opcode
1	BOOL				owner-events
2	6				request length
4	WINDOW				grab-window
2	SETofPOINTEREVENT		event-mask
1					pointer-mode
	0  Synchronous
	1  Asynchronous
1					keyboard-mode
	0  Synchronous
	1  Asynchronous
4	WINDOW				confine-to
	0  None
4	CURSOR				cursor
	0  None
1	BUTTON				button
	0  AnyButton
1					unused
2	SETofKEYMASK			modifiers
	#x8000  AnyModifier


UngrabButton
1	29				opcode
1	BUTTON				button
	0  AnyButton
2	3				request length
4	WINDOW				grab-window
2	SETofKEYMASK			modifiers
	#x8000  AnyModifier
2					unused


ChangeActivePointerGrab
1	30				opcode
1					unused
2	4				request length
4	CURSOR				cursor
	0  None
4	TIMESTAMP			time
	0  CurrentTime
2	SETofPOINTEREVENT		event-mask
2					unused


GrabKeyboard
1	31				opcode
1	BOOL				owner-request
2	4				request length
4	WINDOW				grab-window
4	TIMESTAMP			time
	0  CurrentTime
1					pointer-mode
	0  Synchronous
	1  Asynchronous
1					keyboard-mode
	0  Synchronous
	1  Asynchronous
2					unused
-->
1	1				Reply
1					status
	0  Success
	1  AlreadyGrabbed
	2  InvalidTime
	3  NotViewable
	4  Frozen
2	CARD16				sequence number
4	0				reply length
24					unused


UngrabKeyboard
1	32				opcode
1					unused
2	2				request length
4	TIMESTAMP			time
	0  CurrentTime


GrabKey
1	33				opcode
1	BOOL				owner-events
2	4				request length
4	WINDOW				grab-window
2	SETofKEYMASK			modifiers
	#x8000  AnyModifier
1	KEYCODE				key
	0  AnyKey
1					pointer-mode
	0  Synchronous
	1  Asynchronous
1					keyboard-mode
	0  Synchronous
	1  Asynchronous
3					unused

UngrabKey
1	34				opcode
1	KEYCODE				key
	0  AnyKey
2	3				request length
4	WINDOW				grab-window
2	SETofKEYMASK			modifiers
	#x8000  AnyModifier
2					unused


AllowEvents
1	35				opcode
1					mode
	0  AsyncPointer
	1  SyncPointer
	2  ReplayPointer
	3  AsyncKeyboard
	4  SyncKeyboard
	5  ReplayKeyboard
	6  AsyncBoth
	7  SyncBoth
2	2				request length
4	TIMESTAMP			time
	0  CurrentTime

GrabServer
1	36				opcode
1					unused
2	1				request length


UngrabServer
1	37				opcode
1					unused
2	1				request length


QueryPointer
1	38				opcode
1					unused
2	2				request length
4	WINDOW				window
-->
1	1				Reply
1	BOOL				same-screen
2	CARD16				sequence number
4	0				reply length
4	WINDOW				root
4	WINDOW				child
	0  None
2	INT16				root-x
2	INT16				root-y
2	INT16				win-x
2	INT16				win-y
2	SETofKEYBUTMASK			mask
6					unused

GetMotionEvents
1	39				opcode
1					unused
2	4				request length
4	WINDOW				window
4	TIMESTAMP			start
	0  CurrentTime
4	TIMESTAMP			stop
	0  CurrentTime
-->
1	1				Reply
1					unused
2	CARD16				sequence number
4	2n				reply length
4	n				number of TIMECOORDs in events
20					unused
8n	LISTofTIMECOORD			events


TIMECOORD
4	TIMESTAMP			time
2	INT16				x
2	INT16				y


TranslateCoordinates
1	40				opcode
1					unused
2	4				request length
4	WINDOW				src-window
4	WINDOW				dst-window
2	INT16				src-x
2	INT16				src-y
-->
1	1				Reply
1	BOOL				same-screen
2	CARD16				sequence number
4	0				reply length
4	WINDOW				child
	0  None
2	INT16				dst-x
2	INT16				dst-y
16					unused


WarpPointer
1	41				opcode
1					unused
2	6				request length
4	WINDOW				src-window
	0  None
4	WINDOW				dst-window
	0  None
2	INT16				src-x
2	INT16				src-y
2	CARD16				src-width
2	CARD16				src-height
2	INT16				dst-x
2	INT16				dst-y


SetInputFocus
1	42				opcode
1					revert-to
	0  None
	1  PointerRoot
	2  Parent
2	3				request length
4	WINDOW				focus
	0  None
	1  PointerRoot
4	TIMESTAMP			time
	0  CurrentTime


GetInputFocus
1	43				opcode
1					unused
2	1				request length
-->
1	1				Reply
1					revert-to
	0  None
	1  PointerRoot
	2  Parent
2	CARD16				sequence number
4	0				reply length
4	WINDOW				focus
	0  None
	1  PointerRoot
20					unused


QueryKeymap
1	44				opcode
1					unused
2	1				request length
-->
1	1				Reply
1					unused
2	CARD16				sequence number
4	2				reply length
32	LISTofCARD8			keys


OpenFont
1	45				opcode
1					unused
2	3+(n+p)/4			request length
4	FONT				fid
2	n				length of name
2					unused
n	STRING8				name
p					unused, p=pad(n)


CloseFont
1	46				opcode
1					unused
2	2				request length
4	FONT				font


QueryFont
1	47				opcode
1					unused
2	2				request length
4	FONTABLE			font
-->
1	1				Reply
1					unused
2	CARD16				sequence number
4	7+2n+3m				reply length
12	CHARINFO			min-bounds
4					unused
12	CHARINFO			max-bounds
4					unused
2	CARD16				min-char-or-byte2
2	CARD16				max-char-or-byte2
2	CARD16				default-char
2	n				number of FONTPROPs in properties
1					draw-direction
	0  LeftToRight
	1  RightToLeft
1	CARD8				min-byte1
1	CARD8				max-byte1
1	BOOL				all-chars-exist
2	INT16				font-ascent
2	INT16				font-descent
4	m				number of CHARINFOs in char-infos
8n	LISTofFONTPROP			properties
12m	LISTofCHARINFO			char-infos

FONTPROP
4	ATOM				name
4	<32-bits>			value

CHARINFO
2	INT16				left-side-bearing
2	INT16				right-side-bearing
2	INT16				character-width
2	INT16				ascent
2	INT16				descent
2	CARD16				attributes

QueryTextExtents
1	48				opcode
1	BOOL				odd length, True if p = 2
2	2+(2n+p)/4			request length
4	FONTABLE			font
2n	STRING16			string
p					unused, p=pad(2n)
-->
1	1				Reply
1					drawdirection
	0  LeftToRight
	1  RightToLeft
2	CARD16				sequence number
4	0				reply length
2	INT16				font-ascent
2	INT16				font-descent
2	INT16				overall-ascent
2	INT16				overall-descent
4	INT32				overall-width
4	INT32				overall-left
4	INT32				overall-right
4					unused


ListFonts
1	49				opcode
1					unused
2	2+(n+p)/4			request length
2	CARD16				max-names
2	n				length of pattern
n	STRING8				pattern
p					unused, p=pad(n)
-->
1	1				Reply
1					unused
2	CARD16				sequence number
4	(n+p)/4				reply length
2	CARD16				number of STRs in names
22					unused
n	LISTofSTR			names
p					unused, p=pad(n)

ListFontsWithInfo
1	50				opcode
1					unused
2	2+(n+p)/4			request length
2	CARD16				max-names
2	n				length of pattern
n	STRING8				pattern
p					unused, p=pad(n)
--> (except for last in series)
1	1				Reply
1	n				length of name in byes
2	CARD16				sequence number
4	7+2m+(n+p)/4			reply length
12	CHARINFO			min-bounds
4					unused
12	CHARINFO			max-bounds
4					unused
2	CARD16				min-char-or-byte2
2	CARD16				max-char-or-byte2
2	CARD16				default-char
2	m				number of FONTPROPs in properties
1					draw-direction
	0  LeftToRight
	1  RightToLeft
1	CARD8				min-byte1
1	CARD8				max-byte1
1	BOOL				all-chars-exist
2	INT16				font-ascent
2	INT16				font-descent
4	CARD32				replies-hint
8m	LISTofFONTPROP			properties
n	STRING8				name
p					unused, p=pad(n)

FONTPROP
	encodings are the same as for QueryFont

CHARINFO
	encodings are the same as for QueryFont
--> (last in series)
1	1				Reply
1	0				last-reply indicator
2	CARD16				sequence number
4	7				reply length
52					unused


SetFontPath
1	51				opcode
1					unused
2	2+(n+p)/4			request length
2	CARD16				number of STRs in path
2					unused
n	LISTofSTR			path
p					unused, p=pad(n)

GetFontPath
1	52				opcode
1					unused
2	1				request length (man says "list"??)
--> 
1	1				Reply
1					unused
2	CARD16				sequence number
4	(n+p)/4				reply length
2	CARD16				number of STRs in path
22					unused
n	LISTofSTR			path
p					unused, p=pad(n)


CreatePixmap
1	53				opcode
1	CARD8				depth
2	4				request length
4	PIXMAP				pid
4	DRAWABLE			drawable
2	CARD16				width
2	CARD16				height


FreePixmap
1	54				opcode
1					unused
2	2				request length
4	PIXMAP				pixmap


CreateGC
1	55				opcode
1					unused
2	4+n				request length
4	GCONTEXT			cid
4	DRAWABLE			drawable
4	BITMASK				value-mask (has n bits set to 1)
	#x00000001  function
	#x00000002  plane-mask
	#x00000004  foreground
	#x00000008  background
	#x00000010  line-width
	#x00000020  line-style
	#x00000040  cap-style
	#x00000080  join-style
	#x00000100  fill-style
	#x00000200  fill-rule
	#x00000400  tile
	#x00000800  stipple
	#x00001000  tile-stiple-x-origin
	#x00002000  tile-stiple-y-origin
	#x00004000  font
	#x00008000  subwindow-mode
	#x00010000  graphics-exposures
	#x00020000  clip-x-origin
	#x00040000  clip-y-origin
	#x00080000  clip-maks
	#x00100000  dash-offset
	#x00200000  dashes
	#x00400000  arc-mode
4n	LISTofVALUE			value-list

VALUEs
1					function
	 0  Clear
	 1  And
	 2  AndReverse
	 3  Copy
	 4  AndInverted
	 5  NoOp
	 6  Xor
	 7  Or
	 8  Nor
	 9  Equiv
	10  Invert
	11  OrReverse
	12  CopyInverted
	13  OrInverted
	14  Nand
	15  Set
4	CARD32				plane-mask
4	CARD32				foreground
4	CARD32				background
2	CARD16				line-width
1					line-style
	0  Solid
	1  OnOffDash
	2  DoubleDash
1					cap-style
	0  NotLast
	1  Butt
	2  Round
	3  Projecting
1					join-style
	0  Miter
	1  Round
	2  Bevel
1					fill-style
	0  Solid
	1  Tiled
	2  Stippled
	3  OpaqueStippled
1					fill-rule
	0  EvenOdd
	1  Winding
4	PIXMAP				tile
4	PIXMAP				stipple
2	INT16				tile-stiple-x-origin
2	INT16				tile-stiple-y-origin
4	FONT				font
1					subwindow-mode
	0  ClipByChildren
	1  IncludeInferiors
1	BOOL				graphics-exposures
2	INT16				clip-x-origin
2	INT16				clip-y-origin
4	PIXMAP				clip-mask
	0  None
2	CARD16				dash-offset
1	CARD8				dashes
1					arc-mode
	0  Chord
	1  PieSlice

ChangeGC
1	56				opcode
1					unused
2	3+n				request length
4	GCONTEXT			gc
4	BITMASK				value-mask
	encodings are the same as for CreateGC
4n	LISTofVALUE
	encodings are the same as for CreateGC


CopyGC
1	57				opcode
1					unused
2	4				request length
4	GCONTEXT			src-gc
4	GCONTEXT			dst-gc
4	BITMASK				value-mask
	encodings are the same as for CreateGC

SetDashes
1	58				opcode
1					unused
2	3+(n+p)/4			request length
4	GCONTEXT			gc
2	CARD16				dash-offset
2	n				length of dashes
n	LISTofCARD8			dashes
p					unused, p=pad(n)


SetClipRectangles
1	59				opcode
1					ordering
	0  UnSorted
	1  YSorted
	2  YXSorted
	3  YXBanded
2	3+2n				request length
4	GCONTEXT			gc
2	INT16				clip-x-origin
2	INT16				clip-y-origin
8n	LISTofRECTANGLE			rectangles


FreeGC
1	60				opcode
1					unused
2	2				request length
4	GCONTEXT			gc


ClearArea
1	61				opcode
1	BOOL				exposures
2	4				request length
4	WINDOW				window
2	INT16				x
2	INT16				y
2	CARD16				width
2	CARD16				height

CopyArea
1	62				opcode
1					unused
2	7				request length
4	DRAWABLE			src-drawable	
4	DRAWABLE			dst-drawable
4	GCONTEXT			gc
2	INT16				src-x
2	INT16				src-y
2	INT16				dst-x
2	INT16				dst-y
2	CARD16				width
2	CARD16				height

CopyPlane
1	63				opcode	
1					unused
2	8				request length
4	DRAWABLE			src-drawable	
4	DRAWABLE			dst-drawable
4	GCONTEXT			gc
2	INT16				src-x
2	INT16				src-y
2	INT16				dst-x
2	INT16				dst-y
2	CARD16				width
2	CARD16				height
4	CARD32				bit-plane

PolyPoint
1	64				opcode
1					coordinate-mode
	0  Origin
	1  Previous
2	3+n				request length
4	DRAWABLE			drawable	
4	GCONTEXT			gc
4n	LISTofPOINT			points


PolyLine
1	65				opcode
1					coordinate-mode
	0  Origin
	1  Previous
2	3+n				request length
4	DRAWABLE			drawable	
4	GCONTEXT			gc
4n	LISTofPOINT			points


PolySegment
1	66				opcode
1					unused
2	3+2n				request length
4	DRAWABLE			drawable	
4	GCONTEXT			gc
4n	LISTofSEGMENT			segments

SEGMENT
2	INT16				x1
2	INT16				y1
2	INT16				x2
2	INT16				y2


PolyRectangle
1	67				opcode
1					unused
2	3+2n				request length
4	DRAWABLE			drawable
4	GCONTEXT			gc
8n	LISTofRECTANGLE			rectangles


PolyArc
1	68				opcode
1					unused
2	3+3n				request length
4	DRAWABLE			drawable
4	GCONTEXT			gc
12n	LISTofARC			arcs


FillPoly
1	69				opcode
1					unused
2	4+n				request length
4	DRAWABLE			drawable
4	GCONTEXT			gc
1					shape
	0  Complex
	1  Nonconvex
	2  Convex
1					coordinate-mode
	0  Origin
	1  Previous
2					unused
4n	LISTofPOINT


PolyFillRectangle
1	70				opcode
1					unused
2	3+2n				request length
4	DRAWABLE			drawable
4	GCONTEXT			gc
8n	LISTofRECTANGLE			rectangles


PolyFillArc
1	71				opcode
1					unused
2	3+3n				request length
4	DRAWABLE			drawable
4	GCONTEXT			gc
12n	LISTofARC			arcs


PutImage
1	72				opcode
1					format
	0  Bitmap
	1  XYPixmap
	2  ZPixmap
2	6+(n+p)/4			request length
4	DRAWABLE			drawable
4	GCONTEXT			gc
2	CARD16				width
2	CARD16				height
2	INT16				dst-x
2	INT16				dst-y
1	CARD8				left-pad
1	CARD8				depth
2					unused
n	LISTofBYTE			data
p					unused, p=pad(n)


GetImage
1	73				opcode
1					format
	1  XYPixmap
	2  ZPixmap
2	5				request length
4	DRAWABLE			drawable
2	INT16				x
2	INT16				y
2	CARD16				width
2	CARD16				height
4	CARD32				plane-mask
-->
1	1				Reply
1	CARD8				depth
2	CARD16				sequence number
4	(n+p)/4				request length
4	VISUALID			visual
	0  None
20					unused
n	LISTofBYTE			data
p					unused, p=pad(n)


PolyText8
1	74				opcode
1					unused
2	4+(n+p)/4			request length
4	DRAWABLE			drawable	
4	GCONTEXT			gc
2	INT16				x
2	INT16				y
n	LISTofTEXTITEM8			items
p					unused, p=pad(n) 
					(p is always 0 or 1)

TEXTITEM8
1	m				length of string (cannot be 255)
1	INT8				delta
m	STRING8				string
 or
1	255				font-shift indicator
1					font byte 3 (most significant)
1					font byte 2
1					font byte 1
1					font byte 0 (least significant)


PolyText16
1	75				opcode
1					unused
2	4+(n+p)/4			request length
4	DRAWABLE			drawable
4	GCONTEXT			gc
2	INT16				x
2	INT16				y
n	LISTofTEXTITEM16		items
p					unused, p=pad(n)
					(p must be 0 or 1)

TEXTITEM16
1	m				number of CHAR2Bs in string
					(cannot be 255)
1	INT8				delta
2m	STRING16			string
 or
1	255				font-shift indicator
1					font byte 3 (most significant)
1					font byte 2
1					font byte 1
1					font byte 0 (least significant)


ImageText8
1	76				opcode
1	n				length of string
2	4+(n+p)/4			request length
4	DRAWABLE			drawable
4	GCONTEXT			gc
2	INT16				x
2	INT16				y
n	STRING8				string
p					unused, p=pad(n)


ImageText16
1	77				opcode
1	n				length of string
2	4+(2n+p)/4			request length
4	DRAWABLE			drawable
4	GCONTEXT			gc
2	INT16				x
2	INT16				y
2n	STRING16			string
p					unused, p=pad(2n)


CreateColormap
1	78				opcode
1					alloc
	0  None
	1  All
2	4				request length
4	COLORMAP			mid
4	WINDOW				window	
4	VISUALID			visual


FreeColormap
1	79				opcode
1					unused
2	2				request length
4	COLORMAP			cmap


CopyColormapAndFree
1	80				opcode
1					unused
2	3				request length
4	COLORMAP			mid
4	COLORMAP			src-cmap


InstallColormap
1	81				opcode	
1					unused
2	2				request length
4	COLORMAP			cmap


UninstallColormap
1	82				opcode	
1					unused
2	2				request length
4	COLORMAP			cmap


ListInstalledColormaps
1	83				opcode
1					unused
2	2				request length
4	WINDOW				window
-->
1	1				Reply
1					unused
2	CARD16				sequence number
4	n				reply length
2	n				number of COLORMAPs in cmaps
22					unused
4n	LISTofCOLORMAP			cmaps


AllocColor
1	84				opcode
1					unused
2	4				request length
4	COLORMAP			cmap
2	CARD16				red
2	CARD16				green
2	CARD16				blue
2					unused
-->
1	1				Reply
1					unused
2	CARD16				sequence number
4	0				reply length
2	CARD16				red
2	CARD16				green
2	CARD16				blue
2					unused
4	CARD32				pixel
12					unused


AllocaNamedColor
1	85				opcode
1					unused
2	3+(n+p)/4			request length
4	COLORMAP			cmap
2	n				length of name
2					unused
n	STRING8				name
p					unused, p=pad(n)
-->
1	1				Reply
1					unused
2	CARD16				sequence number
4	0				reply length
4	CARD32				pixel
2	CARD16				exact-red
2	CARD16				exact-green
2	CARD16				exact-blue
2	CARD16				visual-red
2	CARD16				visual-green
2	CARD16				visual-blue
8					unused


AllocColorCells
1	86				opcode
1	BOOL				contiguous
2	3				request length
4	COLORMAP			cmap
2	CARD16				colors
2	CARD16				planes
-->
1	1				Reply
1					unused
2	CARD16				sequence number
4	n				reply length
2	n				number of CARD32s in pixels
2					unused
4	CARD32				red-mask
4	CARD32				green-mask
4	CARD32				blue-mask
8					unused
4n	LISTofCARD32			pixels


FreeColors
1	87				opcode
1					unused
2	3+n				request length
4	COLORMAP			cmap
4	CARD32				plane-mask
4n	LISTofCARD32			pixels


StoreColors
1	89				opcode
1					unused
2	2+3n				request length
4	COLORMAP			cmap
12n	LISTofCOLORITEM			items


COLORITEM
4	CARD32				pixel
2	CARD16				red
2	CARD16				green
2	CARD16				blue
1					do-red, do-green, do-blue
	#x01  do-red (1 is True, 0 is False)
	#x02  do-green (1 is True, 0 is False)
	#x04  do-blue (1 is True, 0 is False)
	#xF8  unused
1					unused


StoreNamedColor
1	90				opcode
1					do-red, do-green, do-blue
	#x01  do-red (1 is True, 0 is False)
	#x02  do-green (1 is True, 0 is False)
	#x04  do-blue (1 is True, 0 is False)
	#xF8  unused
2	4+(n+p)/4			request length
4	COLORMAP			cmap
4	CARD32				pixel
2	n				length of name
2i					unused
n	STRING8				name
p					unused, p=pad(n)

QueryColors
1	91				opcode
1					unused
2	2+n				request length
4	COLORMAP			cmap
4n	LISTofCARD32			pixels
-->
1	1				Reply
1					unused
2	CARD16				sequence number
4	2n				reply length
2	n				number of RGBsin colors
22					unused
8n	LISTofRGB			colors

RGB
2	CARD16				red
2	CARD16				green
2	CARD16				blue
2					unused


LookupColor
1	92				opcode
1					unused
2	3+(n+p)/4			request length
4	COLORMAP			cmap
2	n				length of name
2					unused
n	STRING8				name
p					unused, p=pad(n)
-->
1	1				Reply
1					unused
2	CARD16				sequence number
4	0				reply length
2	CARD16				exact-red
2	CARD16				exact-green
2	CARD16				exact-blue
2	CARD16				visual-red
2	CARD16				visual-green
2	CARD16				visual-blue
12					unused

CreateCursor
1	93				opcode
1					unused
2	8				request length
4	CURSOR				cid
4	PIXMAP				source
4	PIXMAP				mask
	0  None
2	CARD16				fore-red
2	CARD16				fore-green
2	CARD16				fore-blue
2	CARD16				back-red
2	CARD16				back-green
2	CARD16				back-blue
2	CARD16				x
2	CARD16				y

CreateGlyphCursor
1	94				opcode
1					unused
2	8				request length
4	CURSOR				cid
4	FONT				source-font
4	FONT				mask-font
	0  None
2	CARD16				source-char
2	CARD16				mask-char
2	CARD16				fore-red
2	CARD16				fore-green
2	CARD16				fore-blue
2	CARD16				back-red
2	CARD16				back-green
2	CARD16				back-blue


FreeCursor
1	95				opcode
1					unused
2	2				request length
4	CURSOR				cursor


RecolorCursor
1	96				opcode
1					unused
2	5				request length
4	CURSOR				cursor
2	CARD16				fore-red
2	CARD16				fore-green
2	CARD16				fore-blue
2	CARD16				back-red
2	CARD16				back-green
2	CARD16				back-blue


QueryBestSize
1	97				opcode
1					class
	0  Cursor
	1  Tile
	2  Stipple
2	3				request length
4	DRAWABLE			drawable	
2	CARD16				width
2	CARD16				height
-->
1	1				Reply
1					unused
2	CARD16				sequence number
4	0				reply length
2	CARD16				width
2	CARD16				height
20					unused


QueryExtension
1	98				op
1					unused
2	2+(n+p)/4			request length
2	n				length of name
2					unused
n	STRING8				name
p					unused, p=pad(n)
-->
1	1				Reply
1					unused
2	CARD16				sequence number
4	0				reply length
1	BOOL				present
1	CARD8				major-opcode
1	CARD8				first-event
1	CARD8				first-error
20					unused


ListExtensions
1	99				opcode
1					unused
2	1				request length
-->
1	1				Reply
1	CARD8				number of STRs in names
2	CARD16				sequence number
4	(n+p)/4				reply length
24					unused
n	LISTofSTR			names
p					unused, p=pad(n)


ChangeKeyboardMapping
1	100				opcode
1	n				keycode-count
2	2+nm				request length
1	KEYCODE				first-keycode
1	m				keysyms-per-keycode
2					unused
4nm	LISTofKEYSYM			keysyms


GetKeyboardMapping
1	101				opcode
1					unused
2	2				request length
1	KEYCODE				first-keycode
1	m				count
2					unused
-->
1	1				Reply
1	n				keysyms-per-keycode
2	CARD16				sequence number
4	nm				reply length
					(m = count field from the request)
24					unused
4nm	LISTofKEYSYM			keysyms


changeKeyboardControl
1	102				opcode
1					unused
2	2+n				request length
4	BITMASK				value-mask (has n bits set to 1)
	#x0001  key-click-percent
	#x0002  bell-percent
	#x0004  bell-pitch
	#x0008  bell-duration
	#x0010  led
	#x0020  led-mode
	#x0040  key
	#x0080  auto-repeat-mode
4n	LISTofVALUE			value-list


VALUEs
1	INT8				key-click-percent
1	INT8				bell-percent
2	INT16				bell-pitch
2	INT16				bell-pitch
1	CARD8				bell-duration
1					led-mode
	0  Off
	1  On
	2  Default
1	KEYCODE				key
1					auto-repeat-mode
	0  Off
	1  On
	2  Default

GetKeyboardControl
1	103				opcode
1					unused
2	1				request length
-->
1	1				Reply
1					global-auto-repeat
	0  Off
	1  On
2	CARD16				sequence number
4	5				reply length
4	CARD32				led-mask
1	CARD8				key-click-percent
1	CARD8				bell-percent
2	CARD16				bell-pitch
2	CARD16				bell-duration
2					unused
32	LISTofCARD8			auto-repeats


Bell
1	104				opcode
1	INT8				percent
2	1				request length


ChangePointerControl
1	105				opcode
1					unused
2	3				request length
2	INT16				acceleration-numerator
2	INT16				acceleration-denominator
2	INT16				threshold
1	BOOL				do-acceleration
1	BOOL				do-threshold

GetPointerControl
1	106				opcode
1					unused
2	1				request length
-->
1	1				Reply
1					unused
2	CARD16				sequence number
4	0				reply length
2	CARD16				acceleration-numerator
2	CARD16				acceleration-denominator
2	CARD16				threshold
18					unused


SetScreenSaver
1	107				opcode
1					unused
2	3				request length
2	INT16				timout
2	INT16				interval
1					prefer-blanking
	0  No
	1  Yes
	2  Default
1					allow-exposures
	0  No
	1  Yes
	2  Default
1					unused


GetScreenSaver
1	108				opcode
1					unused
2	1				request length
-->
1	1				Reply
1					unused
2	CARD16				sequence number
4	0				reply length
2	CARD16				timeout
2	CARD16				interval
1					prefer-blanking
	0  No
	1  Yes
1					allow-exposures
	0  No
	1  Yes
18					unused


ChangeHosts
1	109				opcode
1					mode
	0  Insert
	1  Delete
2	2+(n+p)/4			request length
1					family
	0  Interent
	1  DECnet
	2  Chaois
1					unused
2	n				length of address
n	LISTofCARD8			address
p					unused, p=pad(n)


ListHosts
1	110				opcode
1					unused
2	1				request length
-->
1	1				Reply
1					mode
	0  Disabled
	1  Enabled
2	CARD16				sequence number
4	n/4				reply length
2	CARD16				number of HOSTs in hosts
22					unused
n	LISTofHOST			hosts (n always a multiple of 4)


SetAccessControl
1	111				opcode
1					mode
	0  Disable
	1  Enable
2	1				request length


SetCloseDownMode
1	112				opcode
1					mode
	0  Destroy
	1  RetainPermanent
	2  RetainTemporary
2	1				request length


KillClient
1	113				opcode
1					unused
2	2				request length
4	CARD32				resource
	0  AllTemporary

RotateProperties
1	114				opcode
1					unused
2	3+n				request length
4	WINDOW				window	
2	n				number of properties
2	INT16				delta
4n	LISTofATOM			properties


ForceScreenSaver
1	115				opcode
1					mode
	0  Reset
	1  Activate
2	1				request length


SetPointMapping
1	116				opcode
1	n				length of map
2	1+(n+p)/4			request length
n	LISTofCARD8			map
p					unused, p=pad(n)
-->
1	1				Reply
1					status
	0  Success
	1  Busy
2	CARD16				sequence number
4	0				reply length
24					unused

SetModifierMapping
1	118				opcode
1	n				keycodes-per-modifier
2	1+2n				request length
8n	LISTofKEYCODE			keycodes
-->
1	1				Reply
1					status
	0  Success
	1  Busy
	2  Failed
2	CARD16				sequence number
4	0				reply length
24					unused


GetModifierMapping
1	119				opcode
1					unused
2	1				request length
-->
1	1				Reply
1	n				keycodes-per-modifier
2	CARD16				sequence number
4	2n				reply length
24					unused
8n	LISTofKEYCODES			keycodes


NoOperation
1	127				opcode
1					unused
2	1+n				request length
4n					unused




Errors

Request
1	0			Error
1	1			code
2	CARD16			sequence number
4				unused
2	CARD16			minor opcode
1	CARD8			major opcode
21				unused


Value
1	0			Error
1	2			code
2	CARD16			sequence number
4	<32-bits>		bad value
2	CARD16			minor opcode
1	CARD8			major opcode
21				unused


Window
1	0			Error
1	3			code
2	CARD16			sequence number
4	CARD32			bad resource id
2	CARD16			minor opcode
1	CARD8			major opcode
21				unused


Pixmap
1	0			Error
1	4			code
2	CARD16			sequence number
4	CARD32			bad resource id
2	CARD16			minor opcode
1	CARD8			major opcode
21				unused

Atom
1	0			Error
1	5			code
2	CARD16			sequence number
4	CARD32			bad atom id
2	CARD16			minor opcode
1	CARD8			major opcode
21				unused


Cursor
1	0			Error
1	6			code
2	CARD16			sequence number
4	CARD32			bad resource id
2	CARD16			minor opcode
1	CARD8			major opcode
21				unused


Font
1	0			Error
1	7			code
2	CARD16			sequence number
4	CARD32			bad resource id
2	CARD16			minor opcode
1	CARD8			major opcode
21				unused


Match
1	0			Error
1	8			code
2	CARD16			sequence number
4				unused 
2	CARD16			minor opcode
1	CARD8			major opcode
21				unused


Drawable
1	0			Error
1	9			code
2	CARD16			sequence number
4	CARD32			bad resource id
2	CARD16			minor opcode
1	CARD8			major opcode
21				unused


Access
1	0			Error
1	10			code
2	CARD16			sequence number
4				unused 
2	CARD16			minor opcode
1	CARD8			major opcode
21				unused


Alloc
1	0			Error
1	11			code
2	CARD16			sequence number
4				unused
2	CARD16			minor opcode
1	CARD8			major opcode
21				unused


Colormap
1	0			Error
1	12			code
2	CARD16			sequence number
4	CARD32			bad resource id
2	CARD16			minor opcode
1	CARD8			major opcode
21				unused


GContext
1	0			Error
1	13			code
2	CARD16			sequence number
4	CARD32			bad resource id
2	CARD16			minor opcode
1	CARD8			major opcode
21				unused


IDChoice
1	0			Error
1	14			code
2	CARD16			sequence number
4	CARD32			bad resource id
2	CARD16			minor opcode
1	CARD8			major opcode
21				unused


Name
1	0			Error
1	15			code
2	CARD16			sequence number
4				unused
2	CARD16			minor opcode
1	CARD8			major opcode
21				unused


Length
1	0			Error
1	16			code
2	CARD16			sequence number
4				unused
2	CARD16			minor opcode
1	CARD8			major opcode
21				unused


Implementation
1	0			Error
1	17			code
2	CARD16			sequence number
4				unused
2	CARD16			minor opcode
1	CARD8			major opcode
21				unused



Events

KeyPress
1	2			code
1	KEYCODE			detail
2	CARD16			sequence number
4	TIMESTAMP		time
4	WINDOW			root
4	WINDOW			event
4	WINDOW			child
	0  None
2	INT16			root-x
2	INT16			root-y
2	INT16			event-x
2	INT16			event-y
2	SETofKEYBUTMASK		state
1	BOOL			same-screen
1				unused


KeyRelease
1	3			code
1	KEYCODE			detail
2	CARD16			sequence number
4	TIMESTAMP		time
4	WINDOW			root
4	WINDOW			event
4	WINDOW			child
	0  None
2	INT16			root-x
2	INT16			root-y
2	INT16			event-x
2	INT16			event-y
2	SETofKEYBUTMASK		state
1	BOOL			same-screen
1				unused


ButtonPress
1	4			code
1	BUTTON			detail
2	CARD16			sequence number
4	TIMESTAMP		time
4	WINDOW			root
4	WINDOW			event
4	WINDOW			child
	0  None
2	INT16			root-x
2	INT16			root-y
2	INT16			event-x
2	INT16			event-y
2	SETofKEYBUTMASK		state
1	BOOL			same-screen
1				unused



ButtonRelease
1	5			code
1	BUTTON			detail
2	CARD16			sequence number
4	TIMESTAMP		time
4	WINDOW			root
4	WINDOW			event
4	WINDOW			child
	0  None
2	INT16			root-x
2	INT16			root-y
2	INT16			event-x
2	INT16			event-y
2	SETofKEYBUTMASK		state
1	BOOL			same-screen
1				unused


MotionNotify
1	6			code
1				detail
	0  Normal
	1  Hint
2	CARD16			sequence number
4	TIMESTAMP		time
4	WINDOW			root
4	WINDOW			event
4	WINDOW			child
	0  None
2	INT16			root-x
2	INT16			root-y
2	INT16			event-x
2	INT16			event-y
2	SETofKEYBUTMASK		state
1	BOOL			same-screen
1				unused


EnterNotify
1	7			code
1				detail
	0  Ancestor
	1  Virtual
	2  Inferior
	3  Nonlinear
	4  NonlinearVirtual
2	CARD16			sequence number
4	TIMESTAMP		time
4	WINDOW			root
4	WINDOW			event
4	WINDOW			child
	0  None
2	INT16			root-x
2	INT16			root-y
2	INT16			event-x
2	INT16			event-y
2	SETofKEYBUTMASK		state
1				mode
	0  Normal
	1  Grab
	2  Ungrab
1				same-screen, focus
	#x01  focus (1 is True, 0 is False)
	#x02  same-screen (1 is True, 0 is False)
	#xFC  unused


LeaveNotify
1	8			code
1				detail
	0  Ancestor
	1  Virtual
	2  Inferior
	3  Nonlinear
	4  NonlinearVirtual
2	CARD16			sequence number
4	TIMESTAMP		time
4	WINDOW			root
4	WINDOW			event
4	WINDOW			child
	0  None
2	INT16			root-x
2	INT16			root-y
2	INT16			event-x
2	INT16			event-y
2	SETofKEYBUTMASK		state
1				mode
	0  Normal
	1  Grab
	2  Ungrab
1				same-screen, focus
	#x01  focus (1 is True, 0 is False)
	#x02  same-screen (1 is True, 0 is False)
	#xFC  unused


FocusIn
1	9			code
1				detail
	0  Ancestor
	1  Virtual
	2  Inferior
	3  Nonlinear
	4  NonlinearVirtual
	5  Pointer
	6  PointerRoot
	7  None
2	CARD16			sequence number
4	WINDOW			event
1				mode
	0  Normal
	1  Grab
	2  Ungrab
	3  WhileGrabbed
23				unused


FocusOut
1	10			code
1				detail
	0  Ancestor
	1  Virtual
	2  Inferior
	3  Nonlinear
	4  NonlinearVirtual
	5  Pointer
	6  PointerRoot
	7  None
2	CARD16			sequence number
4	WINDOW			event
1				mode
	0  Normal
	1  Grab
	2  Ungrab
	3  WhileGrabbed
23				unused


KeymapNotify
1	11			code
31	LISTofCARD8		keys (byte for keycodes
				      0-7 omitted)

Expose
1	12			code
1				unused
2	CARD16			sequence number
4	WINDOW			window
2	CARD16			x
2	CARD16			y
2	CARD16			width
2	CARD16			height
2	CARD16			count
14				unused


GraphicsExposure
1	13			code
1				unused
2	CARD16			sequence number
4	DRAWABLE		drawable
2	CARD16			x
2	CARD16			y
2	CARD16			width
2	CARD16			height
2	CARD16			minor-opcode
2	CARD16			count
1	CARD8			major-opcode
11				unused


NoExposure
1	14			code
1				unused
2	CARD16			sequence number
4	DRAWABLE		drawable
2	CARD16			minor-opcode
1	CARD8			major-opcode
21				unused


VisibilityNotify
1	15			code
1				unused
2	CARD16			sequence number
4	WINDOW			window
1				state
	0  Unobscured
	1  PartiallyObscured
	2  FullyObscured
23				unused


CreateNotify
1	16			code
1				unused
2	CARD16			sequence number
4	WINDOW			parent
4	WINDOW			window
2	INT16			x
2	INT16			y
2	CARD16			width
2	CARD16			height
2	CARD16			border-width
1	BOOL			override-redirect
9				unused


DestroyNotify
1	17			code
1				unused
2	CARD16			sequence number
4	WINDOW			event
4	WINDOW			window
20				unused


UnmapNotify
1	18			code
1				unused
2	CARD16			sequence number
4	WINDOW			event
4	WINDOW			window
1	BOOL			from-configure
19				unused


MapNotify
1	19			code
1				unused
2	CARD16			sequence number
4	WINDOW			event
4	WINDOW			window
1	BOOL			override-redirect
19				unused


MapRequest
1	20			code
1				unused
2	CARD16			sequence number
4	WINDOW			parent
4	WINDOW			window
20				unused


ReparentNotify
1	21			code
1				unused
2	CARD16			sequence number
4	WINDOW			event
4	WINDOW			window
4	WINDOW			parent
2	INT16			x
2	INT16			y
1	BOOL			override-redirect
11				unused


ConfigureNotify
1	22			code
1				unused
2	CARD16			sequence number
4	WINDOW			event
4	WINDOW			window
4	WINDOW			above-sibling
	0  None
2	INT16			x
2	INT16			y
2	CARD16			width
2	CARD16			height
2	CARD16			border-width
1	BOOL			override-redirect
5				unused


ConfigureRequest
1	23			code
1	0  Above
	1  Below
	2  TopIf
	3  BottomIf
	4  Opposite
2	CARD16			sequence number
4	WINDOW			parent
4	WINDOW			window
4	WINDOW			sibling
2	INT16			x
2	INT16			y
2	CARD16			width
2	CARD16			height
2	CARD16			border-width
2	BITMASK			value-mask
	#x0001	x
	#x0002	y
	#x0004	width
	#x0008	height
	#x0010	border-width
	#x0020	sibling
	#x0040	stack-mode
4				unused

GravityNotify
1	24			code
1				unused
2	CARD16			sequence number
4	WINDOW			event
4	WINDOW			window
2	INT16			x
2	INT16			y
16				unused


ResizeRequest
1	25			code
1				unused
2	CARD16			sequence number
4	WINDOW			window
2	CARD16			width
2	CARD16			height
20				unused

CirculateNotify
1	26			code
1				unused
2	CARD16			sequence number
4	WINDOW			event
4	WINDOW			window
4	WINDOW			unused????
1				place
	0  Top
	1  Bottom
15				unused

CirculateRequest
1	27			code
1				unused
2	CARD16			sequence number
4	WINDOW			parent
4	WINDOW			window
4				unused
1				place
	0  Top
	1  Bottom
15				unused


PropertyNotify
1	28			code
1				unused
2	CARD16			sequence number
4	WINDOW			window
4	ATOM			atom
4	TIMESTAMP		time
1				state
	0  NewValue
	1  Deleted
15				unused


SelectionClear
1	29			code
1				unused
2	CARD16			sequence number
4	TIMESTAMP		time
4	WINDOW			owner
4	ATOM			atom
16				unused


SelectionRequest
1	30			code
1				unused
2	CARD16			sequence number
4	TIMESTAMP		time
	0  CurrentTime
4	WINDOW			owner
4	WINDOW			requestor
4	ATOM			selection
4	ATOM			target
4	ATOM			property
	0  None
4				unused


SelectionNotify
1	31			code
1				unused
2	CARD16			sequence number
4	TIMESTAMP		time
	0  CurrentTime
4	WINDOW			requestor
4	ATOM			selection
4	ATOM			target
4	ATOM			property
	0  None
8				unused

ColormapNotify
1	32			code
1				unused
2	CARD16			sequence number
4	WINDOW			window
4	COLORMAP		colormap
	0  None
1	BOOL			new
1				state
	0 Uninstalled
	1 Installed
18				unused


ClientMessage
1	33			code
1	CARD8			format
2	CARD16			sequence number
4	WINDOW			window
4	ATOM			type
20				data


MappingNotify
1	34			code
1				unused
2	CARD16			sequence number
1				request
	0  Modifier
	1  Keyboard
	2  Pointer
1	KEYCODE			first-keycode
1	CARD8			count
25				unused



-- 
Robert Strandh

---------------------------------------------------------------------
Greenspun's Tenth Rule of Programming: any sufficiently complicated C
or Fortran program contains an ad hoc informally-specified bug-ridden
slow implementation of half of Common Lisp.
---------------------------------------------------------------------
