6. Encoding


Please refer to the X11 Protocol Encoding document as this document uses conventions established there. The name of this extension is "SHAPE".

New types

SHAPE_KIND
0
1
Bounding
Clip
SHAPE_OP
0
1
2
3
4
Set
Union
Intersect
Subtract
Invert

Requests

ShapeQueryVersion





=>
1
1
2


1
1
2
4
2
2
20
CARD8
0
1


1

CARD16
0
CARD16
CARD16
opcode
shape opcode
request length


Reply
unused
sequence number
length
major version
minor version
unused

ShapeRectangles

1
1
2
1
1
1




1
4
2
2
8n
CARD8
1
4+2n
SHAPE_OP
SHAPE_KIND

0
1
2
3

WINDOW
INT16
INT16
LISTofRECTANGLE






UnSorted
YSorted
YXSorted
YXBanded
opcode
shape opcode
request length
operation
destination kind
ordering




unused
destination window
x offset
y offset
rectangles

ShapeMask

1
1
2
1
1
2
4
2
2
4
CARD8
2
5
SHAPE_OP
SHAPE_KIND

WINDOW
INT16
INT16
PIXMAP
0










None
opcode
shape opcode
request length
operation
destination kind
unused
destination window
x offset
y offset
source bitmap

ShapeCombine

1
1
2
1
1
1
1
4
2
2
4
CARD8
3
5
SHAPE_OP
SHAPE_KIND
SHAPE_KIND

WINDOW
INT16
INT16
WINDOW
opcode
shape opcode
request length
operation
destination kind
source kind
unused
destination window
x offset
y offset
sourse window

ShapeOffset

1
1
2
1
3
4
2
2
CARD8
4
4
SHAPE_KIND

WINDOW
INT16
INT16
opcode
shape opcode
request length
destination kind
unused
destination window
x offset
y offset

ShapeQueryExtents






=>

1
1
2
4


1
1
2
4
1
1
2
2
2
2
2
2
2
2
2
4
CARD8
5
2
WINDOW


1

CARD16
0
BOOL
BOOL

INT16
INT16
CARD16
CARD16
INT16
INT16
CARD16
CARD16
cpcode
shape opcode
request length
destination window


Reply
unused
sequence number
reply length
bounding shaped
clip shaped
unused
bounding shape extents x
bounding shape extents y
bounding shape extents width
bounding shape extents height
clip shape extents x
clip shape extents y
clip shape extents width
clip shape extents height
unused

ShapeSelectInput

1
1
2
4
1
3
CARD8
6
3
WINDOW
BOOL
opcode
shape opcode
request length
destination window
enable
unused

ShapeInputSelected






=>
1
1
2
4


1
1
2
4
24
CARD8
6
2
WINDOW


1
BOOL
CARD16
0
opcode
shape opcode
request length
destination window


Reply
enabled
sequence number
reply length
unused

ShapeGetRectangles








=>
1
1
2
4
1
3


1
1




2
4
4
20
8n
CARD8
7
3
WINDOW
SHAPE_KIND



1

0
1
2
3
CARD16
2n
CARD32

LISTofRECTANGLE










UnSorted
YSorted
YXSorted
YXBanded
opcode
shape opcode
request length
window
source kind
unused


Reply
ordering




sequence number
reply length
nrects
unused
rectangles

Events

ShapeNotify

1
1
2
4
2
2
2
2
4
1
11
CARD8
SHAPE_KIND
CARD16
WINDOW
INT16
INT16
CARD16
CARD16
TIMESTAMP
BOOL
type (0 + extension event base)
shape kind
sequence number
affected window
x value of extents
y value of extents
width of extents
height of extents
server time
shaped
unused

Home

Contents Previous Chapter Next Chapter