4. Requests


ShapeQueryVersion
=>
majorVersion: CARD16
minorVersion: CARD16
This request can be used to ensure that the server version of the SHAPE extension is usable by the client. This document defines major version one (1), minor version zero (0).
ShapeRectangles
dest: WINDOW
destKind: SHAPE_KIND
op: SHAPE_OP
xOff, yOff: INT16
rectangles: LISTofRECTANGLES
ordering: {UnSorted, YSorted, YXSorted, YXBanded}
Errors: Window, Length, Match, Value
This request specifies an array of rectangles, relative to the origin of the window plus the specified offset (xOff and yOff) which together define a region. This region is combined (as specified by the operator op) with the existing client region (specified by destKind) of the destination window, and the result is stored as the specified client region of the destination window. Note that the list of rectangles can be empty, specifying an empty region; this is not the same as passing None to ShapeMask.
If known by the client, ordering relations on the rectangles can be specified with the ordering argument. This may provide faster operation by the server. The meanings of the ordering values are the same as in the core protocol SetClipRectangles request. If an incorrect ordering is specified, the server may generate a Match error, but it is not required to do so. If no error is generated, the graphics results are undefined. Except for UnSorted, the rectangles should be nonintersecting, or the resulting region will be undefined. UnSorted means that the rectangles are in arbitrary order. YSorted means that the rectangles are nondecreasing in their Y origin. YXSorted additionally constrains YSorted order in that all rectangles with an equal Y origin are nondecreasing in their X origin. YXBanded additionally constrains YXSorted by requiring that, for every possible Y scanline, all rectangles that include that scanline have identical Y origins and Y extents.
ShapeMask
dest: WINDOW
destKind: SHAPE_KIND
op: SHAPE_OP
xOff, yOff: INT16
source: PIXMAP or None
Errors: Window, Pixmap, Match, Value
The source in this request is a 1-bit deep pixmap, or None. If source is None, the specified client region is removed from the window causing the effective region to revert to the default region. The ShapeNotify event generated by this request and subsequent ShapeQueryExtents will report that a client shape has not been specified. If a valid pixmap is specified, it is converted to a region, with bits set to one included in the region and bits set to zero excluded, and an offset from the window origin as specified by xOff and yOff. The resulting region is then combined (as specified by the operator op) with the existing client region (indicated by destKind) of the destination window, and the result is stored as the specified client region of the destination window. The source pixmap and destination window must have been created on the same screen or else a Match error results.
ShapeCombine
dest: WINDOW
destKind: SHAPE_KIND
op: SHAPE_OP
xOff, yOff: INT16
source: WINDOW
sourceKind: SHAPE_KIND
Errors: Window, Match, Value
The client region, indicated by sourceKind, of the source window is offset from the window origin by xOff and yOff and combined with the client region, indicated by destKind, of the destination window.
The result is stored as the specified client region of the destination window. The source and destination windows must be on the same screen or else a Match error results.
SbapeOffset
dest: WINDOW
destKind: SHAPE_KIND
xOff, yOff: INT16
Errors: Window, Match, Value
The client region, indicated by destKind, is moved relative to its current position by the amounts xOff and yOff.
ShapeQueryExtents

=>
dest: WINDOW

boundingShaped: BOOL
clipShaped: BOOL
xBoundingShape: INT16
yBoundingShape: INT16
widthBoundingShape: CARD16
heightBoundingShape: CARD16
xClipShape: INT16
yClipShape: INT16
widthClipShape: CARD16
heightClipShape: CARD16
Errors: Window
The boundingShaped and clipShaped results are True if the corresponding client regions have been specified, else they are False. The x, y, width, and height values define the extents of the client regions, when a client region has not been specified, the extents of the corresponding default region are reported.
ShapeSelectInput
window: WINDOW
enable: BOOL
Errors: Window, Value
Specifying enable as True causes the server to send the requesting client a ShapeNotify event whenever the bounding or clip region of the specified window is altered by any client. Specifying enable as False causes the server to stop sending such events.
ShapeInputSelected

=>
window: WINDOW

enable: BOOL
Errors: Window
If enable is True then ShapeNotify events for the window are generated for this client.
ShapeGetRectangles


=>
window: WINDOW
kind: SHAPE_KIND

rectangles: LISTofRECTANGLE
ordering: {UnSorted, YSorted, YXSorted, YXBanded}
Errors: Window, Match
A list of rectangles describing the region indicated by kind, and the ordering of those rectangles, is returned. The meaning of the ordering values is the same as in the ShapeRectangles request.

Home

Contents Previous Chapter Next Chapter