1ea1d6981Smrg<?xml version="1.0" encoding="UTF-8" ?> 2ea1d6981Smrg<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" 3ea1d6981Smrg "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" 4ea1d6981Smrg[ 5ea1d6981Smrg<!ENTITY % defs SYSTEM "defs.ent"> %defs; 6ea1d6981Smrg]> 7ea1d6981Smrg 8ea1d6981Smrg 9ea1d6981Smrg<!-- lifted from troff+ms+XMan by doclifter --> 10ea1d6981Smrg<book id="shape"> 11ea1d6981Smrg 12ea1d6981Smrg<bookinfo> 13ea1d6981Smrg <title>X Nonrectangular Window Shape Extension Protocol</title> 14ea1d6981Smrg <subtitle>X.Org Standard</subtitle> 15ea1d6981Smrg <authorgroup> 16ea1d6981Smrg <author> 17ea1d6981Smrg <firstname>Keith</firstname><surname>Packard</surname> 18ea1d6981Smrg <affiliation><orgname>MIT X Consortium</orgname></affiliation> 19ea1d6981Smrg <affiliation><orgname>Intel Corporation</orgname></affiliation> 20ea1d6981Smrg </author> 21ea1d6981Smrg <othercredit> 22ea1d6981Smrg <firstname>Hideki</firstname><surname>Hiura</surname> 23ea1d6981Smrg <affiliation><orgname>SunSoft, Inc.</orgname></affiliation> 24ea1d6981Smrg </othercredit> 25ea1d6981Smrg </authorgroup> 26ea1d6981Smrg <releaseinfo>X Version 11, Release &fullrelvers;</releaseinfo> 27ea1d6981Smrg <releaseinfo>Version 1.1</releaseinfo> 28ea1d6981Smrg <copyright><year>1989</year><year>2004</year><holder>The Open Group</holder></copyright> 29ea1d6981Smrg <copyright><year>2006</year><holder>Keith Packard</holder></copyright> 30ea1d6981Smrg<legalnotice> 31ea1d6981Smrg 32ea1d6981Smrg<para> 33ea1d6981SmrgPermission is hereby granted, free of charge, to any person obtaining a copy 34ea1d6981Smrgof this software and associated documentation files (the "Software"), to deal 35ea1d6981Smrgin the Software without restriction, including without limitation the rights 36ea1d6981Smrgto use, copy, modify, merge, publish, distribute, sublicense, and/or sell 37ea1d6981Smrgcopies of the Software, and to permit persons to whom the Software is 38ea1d6981Smrgfurnished to do so, subject to the following conditions: 39ea1d6981Smrg</para> 40ea1d6981Smrg<para> 41ea1d6981SmrgThe above copyright notice and this permission notice shall be included in 42ea1d6981Smrgall copies or substantial portions of the Software. 43ea1d6981Smrg</para> 44ea1d6981Smrg<para> 45ea1d6981SmrgTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 46ea1d6981SmrgIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 47ea1d6981SmrgFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 48ea1d6981SmrgCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 49ea1d6981SmrgWHETHER IN 50ea1d6981SmrgAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 51ea1d6981SmrgCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 52ea1d6981Smrg</para> 53ea1d6981Smrg<para> 54ea1d6981SmrgExcept as contained in this notice, the name of the copyright holders 55ea1d6981Smrgshall not be 56ea1d6981Smrgused in advertising or otherwise to promote the sale, use or other dealings 57ea1d6981Smrgin this Software without prior written authorization from the 58ea1d6981Smrgcopyright holders. 59ea1d6981Smrg</para> 60ea1d6981Smrg</legalnotice> 61ea1d6981Smrg</bookinfo> 62ea1d6981Smrg 63ea1d6981Smrg<chapter id="Overview"> 64ea1d6981Smrg<title>Overview</title> 65ea1d6981Smrg<para> 66ea1d6981Smrg<!-- .LP --> 67ea1d6981SmrgThis extension provides arbitrary window and border shapes within the X11 68ea1d6981Smrgprotocol. 69ea1d6981Smrg</para> 70ea1d6981Smrg<para> 71ea1d6981Smrg<!-- .LP --> 72ea1d6981SmrgThe restriction of rectangular windows within the X protocol is a significant 73ea1d6981Smrglimitation in the implementation of many styles of user interface. For 74ea1d6981Smrgexample, many transient windows would like to display a "drop shadow'' to 75ea1d6981Smrggive the illusion of 3 dimensions. As another example, some user interface 76ea1d6981Smrgstyle guides call for buttons with rounded corners; the full simulation of a 77ea1d6981Smrgnonrectangular shape, particularly with respect to event distribution and 78ea1d6981Smrgcursor shape, is not possible within the core X protocol. As a final 79ea1d6981Smrgexample, round clocks and nonrectangular icons are desirable visual addition 80ea1d6981Smrgto the desktop. 81ea1d6981Smrg</para> 82ea1d6981Smrg<para> 83ea1d6981Smrg<!-- .LP --> 84ea1d6981SmrgThis extension provides mechanisms for changing both the visible and interactive shape of a 85ea1d6981Smrgwindow to arbitrary, possibly disjoint, nonrectangular forms. The intent 86ea1d6981Smrgof the extension is to supplement the existing semantics, not replace them. 87ea1d6981SmrgIn particular, it is desirable for clients that are unaware of the 88ea1d6981Smrgextension to still be able to cope reasonably with shaped windows. For 89ea1d6981Smrgexample, window managers should still be able to negotiate screen 90ea1d6981Smrgreal estate in rectangular pieces. Toward this end, any shape specified for 91ea1d6981Smrga window is clipped by the bounding rectangle for the window as specified by 92ea1d6981Smrgthe window's geometry in the core protocol. An expected convention would be 93ea1d6981Smrgthat client programs expand their shape to fill the area offered by the 94ea1d6981Smrgwindow manager. 95ea1d6981Smrg</para> 96ea1d6981Smrg</chapter> 97ea1d6981Smrg 98ea1d6981Smrg<chapter id="Description"> 99ea1d6981Smrg<title>Description</title> 100ea1d6981Smrg<para> 101ea1d6981SmrgEach window (even with no shapes specified) is defined by three regions: the 102ea1d6981Smrg<emphasis remap='I'>bounding region</emphasis>, the <emphasis remap='I'>clip 103ea1d6981Smrgregion</emphasis> and the <emphasis remap='I'>input region</emphasis>. The 104ea1d6981Smrgbounding region is the area of the 105ea1d6981Smrgparent window that the window will occupy (including border). The clip region 106ea1d6981Smrgis the subset of the bounding region that is available for subwindows and 107ea1d6981Smrggraphics. The area between the bounding region and the clip region is defined 108ea1d6981Smrgto be the border of the window. The input region is the subset of the 109ea1d6981Smrgbounding region that can "contain" the pointer. 110ea1d6981Smrg</para> 111ea1d6981Smrg 112ea1d6981Smrg<para> 113ea1d6981SmrgA nonshaped window will have a bounding region that is a rectangle 114ea1d6981Smrgspanning the window, including its border; the clip region will be a rectangle 115ea1d6981Smrgfilling the inside dimensions (not including the border); the input 116ea1d6981Smrgregion will match the bounding region. In this document, 117ea1d6981Smrgthese areas are referred to as the 118ea1d6981Smrg<emphasis remap='I'>default bounding region</emphasis>, the 119ea1d6981Smrg<emphasis remap='I'>default clip region</emphasis> and the 120ea1d6981Smrg<emphasis remap='I'>default input region</emphasis>. For a window with inside 121ea1d6981Smrgsize of <emphasis remap='I'>width</emphasis> by 122ea1d6981Smrg<emphasis remap='I'>height</emphasis> and border width 123ea1d6981Smrg<emphasis remap='I'>bwidth</emphasis>, the default bounding, clip 124ea1d6981Smrgand input regions are the rectangles (relative to the window origin): 125ea1d6981Smrg</para> 126ea1d6981Smrg 127ea1d6981Smrg<literallayout class="monospaced"> 128ea1d6981Smrgbounding.x = -<emphasis remap='I'>bwidth</emphasis> 129ea1d6981Smrgbounding.y = -<emphasis remap='I'>bwidth</emphasis> 130ea1d6981Smrgbounding.width = <emphasis remap='I'>width</emphasis> + 2 * <emphasis remap='I'>bwidth</emphasis> 131ea1d6981Smrgbounding.height = <emphasis remap='I'>height</emphasis> + 2 * <emphasis remap='I'>bwidth</emphasis> 132ea1d6981Smrg 133ea1d6981Smrgclip.x = 0 134ea1d6981Smrgclip.y = 0 135ea1d6981Smrgclip.width = <emphasis remap='I'>width</emphasis> 136ea1d6981Smrgclip.height = <emphasis remap='I'>height</emphasis> 137ea1d6981Smrg 138ea1d6981Smrginput.x = -<emphasis remap='I'>bwidth</emphasis> 139ea1d6981Smrginput.y = -<emphasis remap='I'>bwidth</emphasis> 140ea1d6981Smrginput.width = <emphasis remap='I'>width</emphasis> + 2 * <emphasis remap='I'>bwidth</emphasis> 141ea1d6981Smrginput.height = <emphasis remap='I'>height</emphasis> + 2 * <emphasis remap='I'>bwidth</emphasis> 142ea1d6981Smrg</literallayout> 143ea1d6981Smrg 144ea1d6981Smrg<para> 145ea1d6981SmrgThis extension allows a client to modify any combination of the bounding, 146ea1d6981Smrgclip or input regions by specifying new regions that combine with the default 147ea1d6981Smrgregions. These new regions are called the 148ea1d6981Smrg<emphasis remap='I'>client bounding region</emphasis>, 149ea1d6981Smrgthe <emphasis remap='I'>client clip region</emphasis> and the 150ea1d6981Smrg<emphasis remap='I'>client input region</emphasis>. They are specified 151ea1d6981Smrgrelative to the origin of 152ea1d6981Smrgthe window and are always defined by offsets relative to the window origin 153ea1d6981Smrg(that is, region adjustments are not required when the window is moved). 154ea1d6981SmrgThree mechanisms for specifying regions are provided: a list of rectangles, 155ea1d6981Smrga bitmap, and an existing bounding or clip region from a window. This is 156ea1d6981Smrgmodeled on the specification of regions in graphics contexts in the core 157ea1d6981Smrgprotocol and allows a variety of different uses of the extension. 158ea1d6981Smrg</para> 159ea1d6981Smrg 160ea1d6981Smrg<para> 161ea1d6981SmrgWhen using an existing window shape as an operand in specifying a new shape, 162ea1d6981Smrgthe client region is used, unless none has been set, in which case the 163ea1d6981Smrgdefault region is used instead. 164ea1d6981Smrg</para> 165ea1d6981Smrg 166ea1d6981Smrg<para> 167ea1d6981SmrgThe <emphasis remap='I'>effective bounding region</emphasis> of a window 168ea1d6981Smrgis defined to be the intersection of 169ea1d6981Smrgthe client bounding region with the default bounding region. Any portion of 170ea1d6981Smrgthe client bounding region that is not included in the default bounding 171ea1d6981Smrgregion will not be included in the effective bounding region on the screen. 172ea1d6981SmrgThis means that window managers (or other geometry managers) used to dealing 173ea1d6981Smrgwith rectangular client windows will be able to constrain the client to a 174ea1d6981Smrgrectangular area of the screen. 175ea1d6981Smrg</para> 176ea1d6981Smrg 177ea1d6981Smrg<para> 178ea1d6981SmrgConstruction of the effective bounding region is dynamic; the client bounding 179ea1d6981Smrgregion is not mutated to obtain the effective bounding region. If a client 180ea1d6981Smrgbounding region is specified that extends beyond the current default bounding 181ea1d6981Smrgregion, and the window is later enlarged, the effective bounding region will 182ea1d6981Smrgbe enlarged to include more of the client bounding region. 183ea1d6981Smrg</para> 184ea1d6981Smrg 185ea1d6981Smrg<para> 186ea1d6981SmrgThe <emphasis remap='I'>effective clip region</emphasis> of a window is defined to be the intersection of the 187ea1d6981Smrgclient clip region with both the default clip region and the client bounding 188ea1d6981Smrgregion. Any portion of the client clip region that is not included in both 189ea1d6981Smrgthe default clip region and the client bounding region will not be included in 190ea1d6981Smrgthe effective clip region on the screen. 191ea1d6981Smrg</para> 192ea1d6981Smrg 193ea1d6981Smrg<para> 194ea1d6981SmrgConstruction of the effective clip region is dynamic; the client clip region is 195ea1d6981Smrgnot mutated to obtain the effective clip region. If a client clip region is 196ea1d6981Smrgspecified that extends beyond the current default clip region and the 197ea1d6981Smrgwindow or its bounding region is later enlarged, the effective clip region will 198ea1d6981Smrgbe enlarged to include more of the client clip region if it is included in 199ea1d6981Smrgthe effective bounding region. 200ea1d6981Smrg</para> 201ea1d6981Smrg 202ea1d6981Smrg<para> 203ea1d6981SmrgThe border of a window is defined to be the difference between the effective 204ea1d6981Smrgbounding region and the effective clip region. If this region is empty, no 205ea1d6981Smrgborder is displayed. If this region is nonempty, the border is filled 206ea1d6981Smrgusing the border-tile or border-pixel of the window as specified in the core 207ea1d6981Smrgprotocol. Note that a window with a nonzero border width will never be able 208ea1d6981Smrgto draw beyond the default clip region of the window. Also note that a zero 209ea1d6981Smrgborder width does not prevent a window from having a border, since the clip 210ea1d6981Smrgshape can still be made smaller than the bounding shape. 211ea1d6981Smrg</para> 212ea1d6981Smrg 213ea1d6981Smrg<para> 214ea1d6981SmrgAll output to the window and visible regions of any subwindows will be 215ea1d6981Smrgclipped to the effective clip region. The server must not retain window 216ea1d6981Smrgcontents beyond the effective bounding region with backing store. The window's 217ea1d6981Smrgorigin (for graphics operations, background tiling, and subwindow placement) 218ea1d6981Smrgis not affected by the existence of a bounding region or clip region. 219ea1d6981Smrg</para> 220ea1d6981Smrg 221ea1d6981Smrg<para> 222ea1d6981SmrgThe <emphasis remap='I'>effective input region</emphasis> of a window is 223ea1d6981Smrgdefined to be the intersection of the 224ea1d6981Smrgclient input region with both the default input region and the client bounding 225ea1d6981Smrgregion. Any portion of the client input region that is not included in both 226ea1d6981Smrgthe default input region and the client bounding region will not be included in 227ea1d6981Smrgthe effective input region on the screen. 228ea1d6981Smrg</para> 229ea1d6981Smrg<para> 230ea1d6981Smrg<!-- .LP --> 231ea1d6981SmrgConstruction of the effective input region is dynamic; the client input region is 232ea1d6981Smrgnot mutated to obtain the effective input region. If a client input region is 233ea1d6981Smrgspecified that extends beyond the current default input region and the 234ea1d6981Smrgwindow or its bounding region is later enlarged, the effective input region will 235ea1d6981Smrgbe enlarged to include more of the client input region if it is included in 236ea1d6981Smrgthe effective bounding region. 237ea1d6981Smrg</para> 238ea1d6981Smrg<para> 239ea1d6981Smrg<!-- .LP --> 240ea1d6981SmrgAreas that are inside the default bounding region but outside the effective 241ea1d6981Smrgbounding region are not part of the window; these areas of the screen will 242ea1d6981Smrgbe occupied by other windows. Input events that occur within the default 243ea1d6981Smrgbounding region but outside the effective bounding region will be delivered as 244ea1d6981Smrgif the window was not occluding the event position. Events that occur in 245ea1d6981Smrga nonrectangular border of a window will be delivered to that window, just 246ea1d6981Smrgas for events that occur in a normal rectangular border. 247ea1d6981Smrg</para> 248ea1d6981Smrg<para> 249ea1d6981Smrg<!-- .LP --> 250ea1d6981SmrgAn 251ea1d6981Smrg<function>InputOnly</function> 252ea1d6981Smrgwindow can have its bounding or input region set, but it is a 253ea1d6981Smrg<function>Match</function> 254ea1d6981Smrgerror to attempt to set a clip region on an 255ea1d6981Smrg<function>InputOnly</function> 256ea1d6981Smrgwindow or to specify its clip region as a source to a request 257ea1d6981Smrgin this extension. 258ea1d6981Smrg</para> 259ea1d6981Smrg<para> 260ea1d6981Smrg<!-- .LP --> 261ea1d6981SmrgThe server must accept changes to the clip and input regions of a root window, but 262ea1d6981Smrgthe server is permitted to ignore requested changes to the bounding region 263ea1d6981Smrgof a root window. If the server accepts bounding region changes, the contents 264ea1d6981Smrgof the screen outside the bounding region are implementation dependent. 265ea1d6981Smrg</para> 266ea1d6981Smrg</chapter> 267ea1d6981Smrg 268ea1d6981Smrg<chapter id="Types"> 269ea1d6981Smrg<title>Types</title> 270ea1d6981Smrg<para> 271ea1d6981Smrg<!-- .LP --> 272ea1d6981SmrgThe following types are used in the request and event definitions in 273ea1d6981Smrgsubsequent sections. 274ea1d6981Smrg</para> 275ea1d6981Smrg 276ea1d6981Smrg<para> 277ea1d6981SmrgSHAPE_KIND: 278ea1d6981Smrg{ <function>Bounding</function>, 279ea1d6981Smrg<function>Clip</function>, 280ea1d6981Smrg<function>Input</function> } 281ea1d6981Smrg</para> 282ea1d6981Smrg 283ea1d6981Smrg<para> 284ea1d6981SmrgSHAPE_OP: 285ea1d6981Smrg{ <function>Set</function>, 286ea1d6981Smrg<function>Union</function>, 287ea1d6981Smrg<function>Intersect</function>, 288ea1d6981Smrg<function>Subtract</function>, 289ea1d6981Smrg<function>Invert</function> } 290ea1d6981Smrg</para> 291ea1d6981Smrg 292ea1d6981Smrg<para> 293ea1d6981Smrg<function>Set</function> 294ea1d6981Smrgindicates that the region specified as an explicit source in the request is 295ea1d6981Smrgstored unaltered as the new destination client region. 296ea1d6981Smrg<function>Union</function> 297ea1d6981Smrgindicates that the source and destination regions are unioned together to 298ea1d6981Smrgproduce the new destination client region. 299ea1d6981Smrg<function>Intersect</function> 300ea1d6981Smrgindicates that the source and destination regions are intersected together to 301ea1d6981Smrgproduce the new destination client region. 302ea1d6981Smrg<function>Subtract</function> 303ea1d6981Smrgindicates that the source region is subtracted from the destination region to 304ea1d6981Smrgproduce the new destination region. 305ea1d6981Smrg<function>Invert</function> 306ea1d6981Smrgindicates that the destination region is subtracted from the source region to 307ea1d6981Smrgproduce the new destination region. 308ea1d6981Smrg</para> 309ea1d6981Smrg</chapter> 310ea1d6981Smrg 311ea1d6981Smrg<chapter id="Requests"> 312ea1d6981Smrg<title>Requests</title> 313ea1d6981Smrg<para> 314ea1d6981Smrg<function>ShapeQueryVersion</function> 315ea1d6981Smrg</para> 316ea1d6981Smrg 317ea1d6981Smrg<para> 318ea1d6981Smrg => 319ea1d6981Smrg</para> 320ea1d6981Smrg 321ea1d6981Smrg<para> 322ea1d6981SmrgmajorVersion: CARD16 323ea1d6981Smrg</para> 324ea1d6981Smrg<para> 325ea1d6981SmrgminorVersion: CARD16 326ea1d6981Smrg</para> 327ea1d6981Smrg 328ea1d6981Smrg<para> 329ea1d6981SmrgThis request can be used to ensure that the server version of the SHAPE 330ea1d6981Smrgextension is usable by the client. This document defines major version one 331ea1d6981Smrg(1), minor version one (1). 332ea1d6981Smrg</para> 333ea1d6981Smrg 334ea1d6981Smrg<para> 335ea1d6981Smrg<function>ShapeRectangles</function> 336ea1d6981Smrg</para> 337ea1d6981Smrg 338ea1d6981Smrg<informaltable frame="none"> 339ea1d6981Smrg <?dbfo keep-together="always" ?> 340ea1d6981Smrg <tgroup cols='1' align='left' colsep='0' rowsep='0'> 341ea1d6981Smrg <colspec colname='c1' colwidth="1.0*"/> 342ea1d6981Smrg <tbody> 343ea1d6981Smrg <row> 344ea1d6981Smrg <entry><emphasis remap='I'>dest</emphasis>: WINDOW</entry> 345ea1d6981Smrg </row> 346ea1d6981Smrg <row> 347ea1d6981Smrg <entry><emphasis remap='I'>destKind</emphasis>: SHAPE_KIND</entry> 348ea1d6981Smrg </row> 349ea1d6981Smrg <row> 350ea1d6981Smrg <entry><emphasis remap='I'>op</emphasis>: SHAPE_OP</entry> 351ea1d6981Smrg </row> 352ea1d6981Smrg <row> 353ea1d6981Smrg <entry><emphasis remap='I'>xOff, yOff</emphasis>: INT16</entry> 354ea1d6981Smrg </row> 355ea1d6981Smrg <row> 356ea1d6981Smrg <entry><emphasis remap='I'>rectangles</emphasis>: LISTofRECTANGLES</entry> 357ea1d6981Smrg </row> 358ea1d6981Smrg <row> 359ea1d6981Smrg <entry><emphasis remap='I'>ordering</emphasis>: 360ea1d6981Smrg{ <function>UnSorted</function>, 361ea1d6981Smrg<function>YSorted</function>, 362ea1d6981Smrg<function>YXSorted</function>, 363ea1d6981Smrg<function>YXBanded</function> } 364ea1d6981Smrg </entry> 365ea1d6981Smrg </row> 366ea1d6981Smrg <row> 367ea1d6981Smrg <entry> 368ea1d6981SmrgErrors: 369ea1d6981Smrg<function>Window</function>, 370ea1d6981Smrg<function>Length</function>, 371ea1d6981Smrg<function>Match</function>, 372ea1d6981Smrg<function>Value</function> 373ea1d6981Smrg </entry> 374ea1d6981Smrg </row> 375ea1d6981Smrg </tbody> 376ea1d6981Smrg </tgroup> 377ea1d6981Smrg</informaltable> 378ea1d6981Smrg 379ea1d6981Smrg<para> 380ea1d6981SmrgThis request specifies an array of rectangles, relative to the origin of the 381ea1d6981Smrgwindow plus the specified offset (xOff and yOff) that together 382ea1d6981Smrgdefine a region. This region is combined (as specified by the operator 383ea1d6981Smrgop) with the existing client region (specified by destKind) of the 384ea1d6981Smrgdestination window, and the result is stored as the specified client region of 385ea1d6981Smrgthe destination window. Note that the list of rectangles can be empty, 386ea1d6981Smrgspecifying an empty region; this is not the same as passing 387ea1d6981Smrg<function>None</function> to 388ea1d6981Smrg<function>ShapeMask</function>, 389ea1d6981Smrg</para> 390ea1d6981Smrg 391ea1d6981Smrg<para> 392ea1d6981SmrgIf known by the client, 393ea1d6981Smrgordering relations on the rectangles can be specified with the ordering 394ea1d6981Smrgargument. 395ea1d6981SmrgThis may provide faster operation by the server. 396ea1d6981SmrgThe meanings of the ordering values are the same as in the core protocol 397ea1d6981Smrg<function>SetClipRectangles</function> 398ea1d6981Smrgrequest. 399ea1d6981SmrgIf an incorrect ordering is specified, 400ea1d6981Smrgthe server may generate a 401ea1d6981Smrg<function>Match </function> 402ea1d6981Smrgerror, but it is not required to do so. 403ea1d6981SmrgIf no error is generated, 404ea1d6981Smrgthe graphics results are undefined. 405ea1d6981SmrgExcept for 406ea1d6981Smrg<function>UnSorted ,</function> 407ea1d6981Smrgthe rectangles should be nonintersecting, or the resulting region will 408ea1d6981Smrgbe undefined. 409ea1d6981Smrg<function>UnSorted </function> 410ea1d6981Smrgmeans that the rectangles are in arbitrary order. 411ea1d6981Smrg<function>YSorted </function> 412ea1d6981Smrgmeans that the rectangles are nondecreasing in their Y origin. 413ea1d6981Smrg<function>YXSorted </function> 414ea1d6981Smrgadditionally constrains 415ea1d6981Smrg<function>YSorted </function> 416ea1d6981Smrgorder in that all rectangles with an equal Y origin are 417ea1d6981Smrgnondecreasing in their X origin. 418ea1d6981Smrg<function>YXBanded </function> 419ea1d6981Smrgadditionally constrains 420ea1d6981Smrg<function>YXSorted </function> 421ea1d6981Smrgby requiring that, for every possible Y scanline, 422ea1d6981Smrgall rectangles that include that scanline have identical Y origins and Y 423ea1d6981Smrgextents. 424ea1d6981Smrg</para> 425ea1d6981Smrg 426ea1d6981Smrg<para> 427ea1d6981Smrg<function>ShapeMask</function> 428ea1d6981Smrg</para> 429ea1d6981Smrg 430ea1d6981Smrg<informaltable frame="none"> 431ea1d6981Smrg <?dbfo keep-together="always" ?> 432ea1d6981Smrg <tgroup cols='1' align='left' colsep='0' rowsep='0'> 433ea1d6981Smrg <colspec colname='c1' colwidth="1.0*"/> 434ea1d6981Smrg <tbody> 435ea1d6981Smrg <row> 436ea1d6981Smrg <entry> 437ea1d6981Smrg<emphasis remap='I'>dest</emphasis>: WINDOW 438ea1d6981Smrg<emphasis remap='I'>destKind</emphasis>: SHAPE_KIND 439ea1d6981Smrg<emphasis remap='I'>op</emphasis>: SHAPE_OP 440ea1d6981Smrg<emphasis remap='I'>xOff, yOff</emphasis>: INT16 441ea1d6981Smrg<emphasis remap='I'>source</emphasis>: PIXMAP or 442ea1d6981Smrg<function>None</function> 443ea1d6981Smrg </entry> 444ea1d6981Smrg </row> 445ea1d6981Smrg <row> 446ea1d6981Smrg <entry> 447ea1d6981SmrgErrors: 448ea1d6981Smrg<function>Window</function>, 449ea1d6981Smrg<function>Pixmap</function>, 450ea1d6981Smrg<function>Match</function>, 451ea1d6981Smrg<function>Value</function> 452ea1d6981Smrg </entry> 453ea1d6981Smrg </row> 454ea1d6981Smrg </tbody> 455ea1d6981Smrg </tgroup> 456ea1d6981Smrg</informaltable> 457ea1d6981Smrg 458ea1d6981Smrg<para> 459ea1d6981SmrgThe source in this request is a 1-bit deep pixmap, or 460ea1d6981Smrg<function>None .</function> 461ea1d6981SmrgIf source is 462ea1d6981Smrg<function>None ,</function> 463ea1d6981Smrgthe specified client region is removed from the window, causing the effective 464ea1d6981Smrgregion to revert to the default region. The 465ea1d6981Smrg<function>ShapeNotify</function> 466ea1d6981Smrgevent generated by this request and subsequent 467ea1d6981Smrg<function>ShapeQueryExtents</function> 468ea1d6981Smrgwill report that a client shape has not been specified. 469ea1d6981SmrgIf a valid pixmap is specified, it is converted 470ea1d6981Smrgto a region, with bits set to one included in the region and bits set to 471ea1d6981Smrgzero excluded, and an offset from the window origin as specified by 472ea1d6981SmrgxOff and yOff. The resulting region is then combined (as 473ea1d6981Smrgspecified by the operator op) with the existing client region 474ea1d6981Smrg(indicated by destKind) of the destination window, and the result is 475ea1d6981Smrgstored as the specified client region of the destination window. The source 476ea1d6981Smrgpixmap and destination window must have been created on the same screen, 477ea1d6981Smrgor else a 478ea1d6981Smrg<function>Match</function> 479ea1d6981Smrgerror results. 480ea1d6981Smrg</para> 481ea1d6981Smrg 482ea1d6981Smrg<para> 483ea1d6981Smrg<function>ShapeCombine</function> 484ea1d6981Smrg</para> 485ea1d6981Smrg 486ea1d6981Smrg<informaltable frame="none"> 487ea1d6981Smrg <?dbfo keep-together="always" ?> 488ea1d6981Smrg <tgroup cols='1' align='left' colsep='0' rowsep='0'> 489ea1d6981Smrg <colspec colname='c1' colwidth="1.0*"/> 490ea1d6981Smrg <tbody> 491ea1d6981Smrg <row> 492ea1d6981Smrg <entry> 493ea1d6981Smrg<emphasis remap='I'>dest</emphasis>: WINDOW 494ea1d6981Smrg </entry> 495ea1d6981Smrg </row> 496ea1d6981Smrg <row> 497ea1d6981Smrg <entry> 498ea1d6981Smrg<emphasis remap='I'>destKind</emphasis>: SHAPE_KIND 499ea1d6981Smrg </entry> 500ea1d6981Smrg </row> 501ea1d6981Smrg <row> 502ea1d6981Smrg <entry> 503ea1d6981Smrg<emphasis remap='I'>op</emphasis>: SHAPE_OP 504ea1d6981Smrg </entry> 505ea1d6981Smrg </row> 506ea1d6981Smrg <row> 507ea1d6981Smrg <entry> 508ea1d6981Smrg<emphasis remap='I'>xOff, yOff</emphasis>: INT16 509ea1d6981Smrg </entry> 510ea1d6981Smrg </row> 511ea1d6981Smrg <row> 512ea1d6981Smrg <entry> 513ea1d6981Smrg<emphasis remap='I'>source</emphasis>: WINDOW 514ea1d6981Smrg </entry> 515ea1d6981Smrg </row> 516ea1d6981Smrg <row> 517ea1d6981Smrg <entry> 518ea1d6981Smrg<emphasis remap='I'>sourceKind</emphasis>: SHAPE_KIND 519ea1d6981Smrg </entry> 520ea1d6981Smrg </row> 521ea1d6981Smrg <row> 522ea1d6981Smrg <entry> 523ea1d6981SmrgErrors: 524ea1d6981Smrg<function>Window</function>, 525ea1d6981Smrg<function>Match</function>, 526ea1d6981Smrg<function>Value</function> 527ea1d6981Smrg </entry> 528ea1d6981Smrg </row> 529ea1d6981Smrg </tbody> 530ea1d6981Smrg </tgroup> 531ea1d6981Smrg</informaltable> 532ea1d6981Smrg 533ea1d6981Smrg<para> 534ea1d6981SmrgThe client region, indicated by sourceKind, of the source window is 535ea1d6981Smrgoffset from the window origin by xOff and yOff and combined with 536ea1d6981Smrgthe client region, indicated by destKind, of the destination window. 537ea1d6981SmrgThe result is stored as the specified client region of the destination 538ea1d6981Smrgwindow. 539ea1d6981SmrgThe source and destination windows must be on the same screen, or else a 540ea1d6981Smrg<function>Match</function> 541ea1d6981Smrgerror results. 542ea1d6981Smrg</para> 543ea1d6981Smrg 544ea1d6981Smrg<para> 545ea1d6981Smrg<function>ShapeOffset</function> 546ea1d6981Smrg</para> 547ea1d6981Smrg 548ea1d6981Smrg<informaltable frame="none"> 549ea1d6981Smrg <?dbfo keep-together="always" ?> 550ea1d6981Smrg <tgroup cols='1' align='left' colsep='0' rowsep='0'> 551ea1d6981Smrg <colspec colname='c1' colwidth="1.0*"/> 552ea1d6981Smrg <tbody> 553ea1d6981Smrg <row> 554ea1d6981Smrg <entry> 555ea1d6981Smrg<emphasis remap='I'>dest</emphasis>: WINDOW 556ea1d6981Smrg </entry> 557ea1d6981Smrg </row> 558ea1d6981Smrg <row> 559ea1d6981Smrg <entry> 560ea1d6981Smrg<emphasis remap='I'>destKind</emphasis>: SHAPE_KIND 561ea1d6981Smrg </entry> 562ea1d6981Smrg </row> 563ea1d6981Smrg <row> 564ea1d6981Smrg <entry> 565ea1d6981Smrg<emphasis remap='I'>xOff, yOff</emphasis>: INT16 566ea1d6981Smrg </entry> 567ea1d6981Smrg </row> 568ea1d6981Smrg <row> 569ea1d6981Smrg <entry> 570ea1d6981SmrgErrors: 571ea1d6981Smrg<function>Window</function>, 572ea1d6981Smrg<function>Match</function>, 573ea1d6981Smrg<function>Value</function> 574ea1d6981Smrg </entry> 575ea1d6981Smrg </row> 576ea1d6981Smrg </tbody> 577ea1d6981Smrg </tgroup> 578ea1d6981Smrg</informaltable> 579ea1d6981Smrg 580ea1d6981Smrg<para> 581ea1d6981SmrgThe client region, indicated by destKind, is moved relative to its 582ea1d6981Smrgcurrent position by the amounts xOff and yOff. 583ea1d6981Smrg</para> 584ea1d6981Smrg 585ea1d6981Smrg<para> 586ea1d6981Smrg<function>ShapeQueryExtents</function> 587ea1d6981Smrg</para> 588ea1d6981Smrg 589ea1d6981Smrg<informaltable frame="none"> 590ea1d6981Smrg <?dbfo keep-together="always" ?> 591ea1d6981Smrg <tgroup cols='1' align='left' colsep='0' rowsep='0'> 592ea1d6981Smrg <colspec colname='c1' colwidth="1.0*"/> 593ea1d6981Smrg <tbody> 594ea1d6981Smrg <row> 595ea1d6981Smrg <entry> 596ea1d6981Smrg<emphasis remap='I'>dest</emphasis>: WINDOW 597ea1d6981Smrg </entry> 598ea1d6981Smrg </row> 599ea1d6981Smrg </tbody> 600ea1d6981Smrg </tgroup> 601ea1d6981Smrg</informaltable> 602ea1d6981Smrg 603ea1d6981Smrg<para> 604ea1d6981Smrg => 605ea1d6981Smrg</para> 606ea1d6981Smrg 607ea1d6981Smrg<informaltable frame="none"> 608ea1d6981Smrg <?dbfo keep-together="always" ?> 609ea1d6981Smrg <tgroup cols='1' align='left' colsep='0' rowsep='0'> 610ea1d6981Smrg <colspec colname='c1' colwidth="1.0*"/> 611ea1d6981Smrg <tbody> 612ea1d6981Smrg <row> 613ea1d6981Smrg <entry> 614ea1d6981SmrgboundingShaped: BOOL 615ea1d6981Smrg </entry> 616ea1d6981Smrg </row> 617ea1d6981Smrg <row> 618ea1d6981Smrg <entry> 619ea1d6981SmrgclipShaped: BOOL 620ea1d6981Smrg </entry> 621ea1d6981Smrg </row> 622ea1d6981Smrg <row> 623ea1d6981Smrg <entry> 624ea1d6981SmrgxBoundingShape: INT16 625ea1d6981Smrg </entry> 626ea1d6981Smrg </row> 627ea1d6981Smrg <row> 628ea1d6981Smrg <entry> 629ea1d6981SmrgyBoundingShape: INT16 630ea1d6981Smrg </entry> 631ea1d6981Smrg </row> 632ea1d6981Smrg <row> 633ea1d6981Smrg <entry> 634ea1d6981SmrgwidthBoundingShape: CARD16 635ea1d6981Smrg </entry> 636ea1d6981Smrg </row> 637ea1d6981Smrg <row> 638ea1d6981Smrg <entry> 639ea1d6981SmrgheightBoundingShape: CARD16 640ea1d6981Smrg </entry> 641ea1d6981Smrg </row> 642ea1d6981Smrg <row> 643ea1d6981Smrg <entry> 644ea1d6981SmrgxClipShape: INT16 645ea1d6981Smrg </entry> 646ea1d6981Smrg </row> 647ea1d6981Smrg <row> 648ea1d6981Smrg <entry> 649ea1d6981SmrgyClipShape: INT16 650ea1d6981Smrg </entry> 651ea1d6981Smrg </row> 652ea1d6981Smrg <row> 653ea1d6981Smrg <entry> 654ea1d6981SmrgwidthClipShape: CARD16 655ea1d6981Smrg </entry> 656ea1d6981Smrg </row> 657ea1d6981Smrg <row> 658ea1d6981Smrg <entry> 659ea1d6981SmrgheightClipShape: CARD16 660ea1d6981Smrg </entry> 661ea1d6981Smrg </row> 662ea1d6981Smrg <row> 663ea1d6981Smrg <entry> 664ea1d6981SmrgErrors: 665ea1d6981Smrg<function>Window</function> 666ea1d6981Smrg </entry> 667ea1d6981Smrg </row> 668ea1d6981Smrg </tbody> 669ea1d6981Smrg </tgroup> 670ea1d6981Smrg</informaltable> 671ea1d6981Smrg 672ea1d6981Smrg<para> 673ea1d6981SmrgThe boundingShaped and clipShaped results are 674ea1d6981Smrg<function>True</function> 675ea1d6981Smrgif the corresponding client regions have been specified, else they are 676ea1d6981Smrg<function>False .</function> 677ea1d6981SmrgThe x, y, width, and height values define the extents of the client regions, 678ea1d6981Smrgwhen a client region has not been specified, the extents of the 679ea1d6981Smrgcorresponding default region are reported. 680ea1d6981Smrg</para> 681ea1d6981Smrg 682ea1d6981Smrg<para> 683ea1d6981Smrg<function>ShapeSelectInput</function> 684ea1d6981Smrg</para> 685ea1d6981Smrg 686ea1d6981Smrg<informaltable frame="none"> 687ea1d6981Smrg <?dbfo keep-together="always" ?> 688ea1d6981Smrg <tgroup cols='1' align='left' colsep='0' rowsep='0'> 689ea1d6981Smrg <colspec colname='c1' colwidth="1.0*"/> 690ea1d6981Smrg <tbody> 691ea1d6981Smrg <row> 692ea1d6981Smrg <entry> 693ea1d6981Smrg<emphasis remap='I'>window</emphasis>: WINDOW 694ea1d6981Smrg </entry> 695ea1d6981Smrg </row> 696ea1d6981Smrg <row> 697ea1d6981Smrg <entry> 698ea1d6981Smrg<emphasis remap='I'>enable</emphasis>: BOOL 699ea1d6981Smrg </entry> 700ea1d6981Smrg </row> 701ea1d6981Smrg <row> 702ea1d6981Smrg <entry> 703ea1d6981SmrgErrors: 704ea1d6981Smrg<function>Window</function>, 705ea1d6981Smrg<function>Value</function> 706ea1d6981Smrg </entry> 707ea1d6981Smrg </row> 708ea1d6981Smrg </tbody> 709ea1d6981Smrg </tgroup> 710ea1d6981Smrg</informaltable> 711ea1d6981Smrg 712ea1d6981Smrg<para> 713ea1d6981SmrgSpecifying enable as 714ea1d6981Smrg<function>True</function> 715ea1d6981Smrgcauses the server to send the requesting client a 716ea1d6981Smrg<function>ShapeNotify</function> 717ea1d6981Smrgevent whenever the bounding, clip or input region of the specified window is 718ea1d6981Smrgaltered by any client. 719ea1d6981SmrgSpecifying enable as 720ea1d6981Smrg<function>False</function> 721ea1d6981Smrgcauses the server to stop sending such events. 722ea1d6981Smrg</para> 723ea1d6981Smrg 724ea1d6981Smrg<para> 725ea1d6981Smrg<function>ShapeInputSelected</function> 726ea1d6981Smrg</para> 727ea1d6981Smrg 728ea1d6981Smrg<informaltable frame="none"> 729ea1d6981Smrg <?dbfo keep-together="always" ?> 730ea1d6981Smrg <tgroup cols='1' align='left' colsep='0' rowsep='0'> 731ea1d6981Smrg <colspec colname='c1' colwidth="1.0*"/> 732ea1d6981Smrg <tbody> 733ea1d6981Smrg <row> 734ea1d6981Smrg <entry> 735ea1d6981Smrg<emphasis remap='I'>window</emphasis>: WINDOW 736ea1d6981Smrg </entry> 737ea1d6981Smrg </row> 738ea1d6981Smrg <row> 739ea1d6981Smrg <entry> 740ea1d6981Smrg=> 741ea1d6981Smrgenable: BOOL 742ea1d6981Smrg </entry> 743ea1d6981Smrg </row> 744ea1d6981Smrg <row> 745ea1d6981Smrg <entry> 746ea1d6981SmrgErrors: 747ea1d6981Smrg<function>Window</function> 748ea1d6981Smrg </entry> 749ea1d6981Smrg </row> 750ea1d6981Smrg </tbody> 751ea1d6981Smrg </tgroup> 752ea1d6981Smrg</informaltable> 753ea1d6981Smrg 754ea1d6981Smrg<para> 755ea1d6981SmrgIf enable is 756ea1d6981Smrg<function>True</function>, then 757ea1d6981Smrg<function>ShapeNotify</function> 758ea1d6981Smrgevents for the window are generated for this client. 759ea1d6981Smrg</para> 760ea1d6981Smrg 761ea1d6981Smrg<para> 762ea1d6981Smrg<function>ShapeGetRectangles</function> 763ea1d6981Smrg</para> 764ea1d6981Smrg 765ea1d6981Smrg<informaltable frame="none"> 766ea1d6981Smrg <?dbfo keep-together="always" ?> 767ea1d6981Smrg <tgroup cols='1' align='left' colsep='0' rowsep='0'> 768ea1d6981Smrg <colspec colname='c1' colwidth="1.0*"/> 769ea1d6981Smrg <tbody> 770ea1d6981Smrg <row> 771ea1d6981Smrg <entry> 772ea1d6981Smrg<emphasis remap='I'>window</emphasis>: WINDOW 773ea1d6981Smrg </entry> 774ea1d6981Smrg </row> 775ea1d6981Smrg <row> 776ea1d6981Smrg <entry> 777ea1d6981Smrg<emphasis remap='I'>kind</emphasis>: SHAPE_KIND 778ea1d6981Smrg </entry> 779ea1d6981Smrg </row> 780ea1d6981Smrg <row> 781ea1d6981Smrg <entry> 782ea1d6981Smrg => 783ea1d6981Smrgrectangles: LISTofRECTANGLE 784ea1d6981Smrg </entry> 785ea1d6981Smrg </row> 786ea1d6981Smrg <row> 787ea1d6981Smrg <entry> 788ea1d6981Smrgordering: 789ea1d6981Smrg{ <function>UnSorted</function>, 790ea1d6981Smrg<function>YSorted</function>, 791ea1d6981Smrg<function>YXSorted</function>, 792ea1d6981Smrg<function>YXBanded</function> } 793ea1d6981Smrg </entry> 794ea1d6981Smrg </row> 795ea1d6981Smrg <row> 796ea1d6981Smrg <entry> 797ea1d6981SmrgErrors: 798ea1d6981Smrg<function>Window,</function> 799ea1d6981Smrg<function>Match</function> 800ea1d6981Smrg </entry> 801ea1d6981Smrg </row> 802ea1d6981Smrg </tbody> 803ea1d6981Smrg </tgroup> 804ea1d6981Smrg</informaltable> 805ea1d6981Smrg 806ea1d6981Smrg<para> 807ea1d6981SmrgA list of rectangles describing the region indicated by kind, and the 808ea1d6981Smrgordering of those rectangles, is returned. The meaning of the ordering 809ea1d6981Smrgvalues is the same as in the 810ea1d6981Smrg<function>ShapeRectangles</function> 811ea1d6981Smrgrequest. 812ea1d6981Smrg</para> 813ea1d6981Smrg</chapter> 814ea1d6981Smrg 815ea1d6981Smrg<chapter id="Events"> 816ea1d6981Smrg<title>Events</title> 817ea1d6981Smrg<para> 818ea1d6981Smrg<function>ShapeNotify</function> 819ea1d6981Smrg</para> 820ea1d6981Smrg 821ea1d6981Smrg<informaltable frame="none"> 822ea1d6981Smrg <?dbfo keep-together="always" ?> 823ea1d6981Smrg <tgroup cols='1' align='left' colsep='0' rowsep='0'> 824ea1d6981Smrg <colspec colname='c1' colwidth="1.0*"/> 825ea1d6981Smrg <tbody> 826ea1d6981Smrg <row> 827ea1d6981Smrg <entry> 828ea1d6981Smrg<emphasis remap='I'>window</emphasis>: WINDOW 829ea1d6981Smrg </entry> 830ea1d6981Smrg </row> 831ea1d6981Smrg <row> 832ea1d6981Smrg <entry> 833ea1d6981Smrg<emphasis remap='I'>kind</emphasis>: SHAPE_KIND 834ea1d6981Smrg </entry> 835ea1d6981Smrg </row> 836ea1d6981Smrg <row> 837ea1d6981Smrg <entry> 838ea1d6981Smrg<emphasis remap='I'>shaped</emphasis>: BOOL 839ea1d6981Smrg </entry> 840ea1d6981Smrg </row> 841ea1d6981Smrg <row> 842ea1d6981Smrg <entry> 843ea1d6981Smrg<emphasis remap='I'>x, y</emphasis>: INT16 844ea1d6981Smrg </entry> 845ea1d6981Smrg </row> 846ea1d6981Smrg <row> 847ea1d6981Smrg <entry> 848ea1d6981Smrg<emphasis remap='I'>width</emphasis>, 849ea1d6981Smrg<emphasis remap='I'>height</emphasis>: CARD16 850ea1d6981Smrg </entry> 851ea1d6981Smrg </row> 852ea1d6981Smrg <row> 853ea1d6981Smrg <entry> 854ea1d6981Smrg<emphasis remap='I'>time</emphasis>: TIMESTAMP 855ea1d6981Smrg </entry> 856ea1d6981Smrg </row> 857ea1d6981Smrg </tbody> 858ea1d6981Smrg </tgroup> 859ea1d6981Smrg</informaltable> 860ea1d6981Smrg 861ea1d6981Smrg<para> 862ea1d6981SmrgWhenever the client bounding, clip or input shape of a window is modified, a 863ea1d6981Smrg<function>ShapeNotify</function> 864ea1d6981Smrgevent is sent to each client that has used 865ea1d6981Smrg<function>ShapeSelectInput</function> 866ea1d6981Smrgto request it. 867ea1d6981Smrg</para> 868ea1d6981Smrg 869ea1d6981Smrg<para> 870ea1d6981SmrgKind indicates which client region (bounding or clip) has been modified; 871ea1d6981Smrgshaped is 872ea1d6981Smrg<function>True</function> 873ea1d6981Smrgwhen the window has a client shape of type kind, and is 874ea1d6981Smrg<function>False</function> 875ea1d6981Smrgwhen the window no longer has a client shape of this type. 876ea1d6981SmrgThe x, y, width, and height indicate the extents of the 877ea1d6981Smrgcurrent shape. When shaped is 878ea1d6981Smrg<function>False</function> 879ea1d6981Smrgthese will indicate the extents of the default region. The timestamp 880ea1d6981Smrgindicates the server time when the shape was changed. 881ea1d6981Smrg</para> 882ea1d6981Smrg</chapter> 883ea1d6981Smrg 884ea1d6981Smrg<chapter id="Encoding"> 885ea1d6981Smrg<title>Encoding</title> 886ea1d6981Smrg<para> 887ea1d6981SmrgPlease refer to the X11 Protocol Encoding document as this document uses 888ea1d6981Smrgconventions established there. 889ea1d6981Smrg</para> 890ea1d6981Smrg 891ea1d6981Smrg<para> 892ea1d6981SmrgThe name of this extension is "SHAPE". 893ea1d6981Smrg</para> 894ea1d6981Smrg 895ea1d6981Smrg<sect1 id="New_Types"> 896ea1d6981Smrg<title>New Types</title> 897ea1d6981Smrg 898ea1d6981Smrg<literallayout class="monospaced"> 899ea1d6981SmrgSHAPE_KIND 900ea1d6981Smrg 0 Bounding 901ea1d6981Smrg 1 Clip 902ea1d6981Smrg 2 Input 903ea1d6981Smrg</literallayout> 904ea1d6981Smrg 905ea1d6981Smrg<literallayout class="monospaced"> 906ea1d6981SmrgSHAPE_OP 907ea1d6981Smrg 0 Set 908ea1d6981Smrg 1 Union 909ea1d6981Smrg 2 Intersect 910ea1d6981Smrg 3 Subtract 911ea1d6981Smrg 4 Invert 912ea1d6981Smrg</literallayout> 913ea1d6981Smrg</sect1> 914ea1d6981Smrg 915ea1d6981Smrg<sect1 id="Requests_2"> 916ea1d6981Smrg<title>Requests</title> 917ea1d6981Smrg<literallayout class="monospaced"> 918ea1d6981Smrg<function>ShapeQueryVersion</function> 919ea1d6981Smrg 1 CARD8 opcode 920ea1d6981Smrg 1 0 shape opcode 921ea1d6981Smrg 2 1 request length 922ea1d6981Smrg 923ea1d6981Smrg=> 924ea1d6981Smrg 1 1 Reply 925ea1d6981Smrg 1 unused 926ea1d6981Smrg 2 CARD16 sequence number 927ea1d6981Smrg 4 0 length 928ea1d6981Smrg 2 CARD16 major version 929ea1d6981Smrg 2 CARD16 minor version 930ea1d6981Smrg 20 unused 931ea1d6981Smrg</literallayout> 932ea1d6981Smrg 933ea1d6981Smrg<literallayout class="monospaced"> 934ea1d6981Smrg<function>ShapeRectangles</function> 935ea1d6981Smrg 1 CARD8 opcode 936ea1d6981Smrg 1 1 shape opcode 937ea1d6981Smrg 2 4+2n request length 938ea1d6981Smrg 1 SHAPE_OP operation 939ea1d6981Smrg 1 SHAPE_KIND destination kind 940ea1d6981Smrg 1 ordering 941ea1d6981Smrg 0 UnSorted 942ea1d6981Smrg 1 YSorted 943ea1d6981Smrg 2 YXSorted 944ea1d6981Smrg 3 YXBanded 945ea1d6981Smrg 1 unused 946ea1d6981Smrg 4 WINDOW destination window 947ea1d6981Smrg 2 INT16 x offset 948ea1d6981Smrg 2 INT16 y offset 949ea1d6981Smrg 8n LISTofRECTANGLE rectangles 950ea1d6981Smrg</literallayout> 951ea1d6981Smrg 952ea1d6981Smrg 953ea1d6981Smrg<literallayout class="monospaced"> 954ea1d6981Smrg<function>ShapeMask</function> 955ea1d6981Smrg 1 CARD8 opcode 956ea1d6981Smrg 1 2 shape opcode 957ea1d6981Smrg 2 5 request length 958ea1d6981Smrg 1 SHAPE_OP operation 959ea1d6981Smrg 1 SHAPE_KIND destination kind 960ea1d6981Smrg 2 unused 961ea1d6981Smrg 4 WINDOW destination window 962ea1d6981Smrg 2 INT16 x offset 963ea1d6981Smrg 2 INT16 y offset 964ea1d6981Smrg 4 PIXMAP source bitmap 965ea1d6981Smrg 0 None 966ea1d6981Smrg</literallayout> 967ea1d6981Smrg 968ea1d6981Smrg 969ea1d6981Smrg<literallayout class="monospaced"> 970ea1d6981Smrg<function>ShapeCombine</function> 971ea1d6981Smrg 1 CARD8 opcode 972ea1d6981Smrg 1 3 shape opcode 973ea1d6981Smrg 2 5 request length 974ea1d6981Smrg 1 SHAPE_OP operation 975ea1d6981Smrg 1 SHAPE_KIND destination kind 976ea1d6981Smrg 1 SHAPE_KIND source kind 977ea1d6981Smrg 1 unused 978ea1d6981Smrg 4 WINDOW destination window 979ea1d6981Smrg 2 INT16 x offset 980ea1d6981Smrg 2 INT16 y offset 981ea1d6981Smrg 4 WINDOW source window 982ea1d6981Smrg</literallayout> 983ea1d6981Smrg 984ea1d6981Smrg<literallayout class="monospaced"> 985ea1d6981Smrg<function>ShapeOffset</function> 986ea1d6981Smrg 1 CARD8 opcode 987ea1d6981Smrg 1 4 shape opcode 988ea1d6981Smrg 2 4 request length 989ea1d6981Smrg 1 SHAPE_KIND destination kind 990ea1d6981Smrg 3 unused 991ea1d6981Smrg 4 WINDOW destination window 992ea1d6981Smrg 2 INT16 x offset 993ea1d6981Smrg 2 INT16 y offset 994ea1d6981Smrg</literallayout> 995ea1d6981Smrg 996ea1d6981Smrg<literallayout class="monospaced"> 997ea1d6981Smrg<function>ShapeQueryExtents</function> 998ea1d6981Smrg 1 CARD8 opcode 999ea1d6981Smrg 1 5 shape opcode 1000ea1d6981Smrg 2 2 request length 1001ea1d6981Smrg 4 WINDOW destination window 1002ea1d6981Smrg 1003ea1d6981Smrg => 1004ea1d6981Smrg 1 1 Reply 1005ea1d6981Smrg 1 unused 1006ea1d6981Smrg 2 CARD16 sequence number 1007ea1d6981Smrg 4 0 reply length 1008ea1d6981Smrg 1 BOOL bounding shaped 1009ea1d6981Smrg 1 BOOL clip shaped 1010ea1d6981Smrg 2 unused 1011ea1d6981Smrg 2 INT16 bounding shape extents x 1012ea1d6981Smrg 2 INT16 bounding shape extents y 1013ea1d6981Smrg 2 CARD16 bounding shape extents width 1014ea1d6981Smrg 2 CARD16 bounding shape extents height 1015ea1d6981Smrg 2 INT16 clip shape extents x 1016ea1d6981Smrg 2 INT16 clip shape extents y 1017ea1d6981Smrg 2 CARD16 clip shape extents width 1018ea1d6981Smrg 2 CARD16 clip shape extents height 1019ea1d6981Smrg 4 unused 1020ea1d6981Smrg</literallayout> 1021ea1d6981Smrg 1022ea1d6981Smrg<literallayout class="monospaced"> 1023ea1d6981Smrg<function>ShapeSelectInput</function> 1024ea1d6981Smrg 1 CARD8 opcode 1025ea1d6981Smrg 1 6 shape opcode 1026ea1d6981Smrg 2 3 request length 1027ea1d6981Smrg 4 WINDOW destination window 1028ea1d6981Smrg 1 BOOL enable 1029ea1d6981Smrg 3 unused 1030ea1d6981Smrg</literallayout> 1031ea1d6981Smrg 1032ea1d6981Smrg<literallayout class="monospaced"> 1033ea1d6981Smrg<function>ShapeInputSelected</function> 1034ea1d6981Smrg 1 CARD8 opcode 1035ea1d6981Smrg 1 7 shape opcode 1036ea1d6981Smrg 2 2 request length 1037ea1d6981Smrg 4 WINDOW destination window 1038ea1d6981Smrg => 1039ea1d6981Smrg 1 1 Reply 1040ea1d6981Smrg 1 BOOL enabled 1041ea1d6981Smrg 2 CARD16 sequence number 1042ea1d6981Smrg 4 0 reply length 1043ea1d6981Smrg 24 unused 1044ea1d6981Smrg</literallayout> 1045ea1d6981Smrg 1046ea1d6981Smrg<literallayout class="monospaced"> 1047ea1d6981Smrg<function>ShapeGetRectangles</function> 1048ea1d6981Smrg 1 CARD8 opcode 1049ea1d6981Smrg 1 8 shape opcode 1050ea1d6981Smrg 2 3 request length 1051ea1d6981Smrg 4 WINDOW window 1052ea1d6981Smrg 1 SHAPE_KIND source kind 1053ea1d6981Smrg 3 unused 1054ea1d6981Smrg => 1055ea1d6981Smrg 1 1 Reply 1056ea1d6981Smrg 1 ordering 1057ea1d6981Smrg 0 UnSorted 1058ea1d6981Smrg 1 YSorted 1059ea1d6981Smrg 2 YXSorted 1060ea1d6981Smrg 3 YXBanded 1061ea1d6981Smrg 2 CARD16 sequence number 1062ea1d6981Smrg 4 2n reply length 1063ea1d6981Smrg 4 CARD32 nrects 1064ea1d6981Smrg 20 unused 1065ea1d6981Smrg 8n LISTofRECTANGLE rectangles 1066ea1d6981Smrg</literallayout> 1067ea1d6981Smrg</sect1> 1068ea1d6981Smrg 1069ea1d6981Smrg<sect1 id="Events_2"> 1070ea1d6981Smrg<title>Events</title> 1071ea1d6981Smrg<literallayout class="monospaced"> 1072ea1d6981Smrg<function>ShapeNotify</function> 1073ea1d6981Smrg 1 CARD8 type (0 + extension event base) 1074ea1d6981Smrg 1 SHAPE_KIND shape kind 1075ea1d6981Smrg 2 CARD16 sequence number 1076ea1d6981Smrg 4 WINDOW affected window 1077ea1d6981Smrg 2 INT16 x value of extents 1078ea1d6981Smrg 2 INT16 y value of extents 1079ea1d6981Smrg 2 CARD16 width of extents 1080ea1d6981Smrg 2 CARD16 height of extents 1081ea1d6981Smrg 4 TIMESTAMP server time 1082ea1d6981Smrg 1 BOOL shaped 1083ea1d6981Smrg 11 unused 1084ea1d6981Smrg</literallayout> 1085ea1d6981Smrg</sect1> 1086ea1d6981Smrg</chapter> 1087ea1d6981Smrg 1088ea1d6981Smrg<glossary id="glossary"> 1089ea1d6981Smrg<title>Glossary</title> 1090ea1d6981Smrg<glossentry> 1091ea1d6981Smrg <glossterm>bounding region</glossterm> 1092ea1d6981Smrg <glossdef> 1093ea1d6981Smrg<para> 1094ea1d6981SmrgThe area of the parent window that this window will occupy. This area is 1095ea1d6981Smrgdivided into two parts: the border and the interior. 1096ea1d6981Smrg<!-- .KE --> 1097ea1d6981Smrg </para> 1098ea1d6981Smrg </glossdef> 1099ea1d6981Smrg</glossentry> 1100ea1d6981Smrg<glossentry> 1101ea1d6981Smrg <glossterm>clip region</glossterm> 1102ea1d6981Smrg <glossdef> 1103ea1d6981Smrg<para> 1104ea1d6981SmrgThe interior of the window, as a subset of the bounding region. This 1105ea1d6981Smrgregion describes the area that will be painted with the window background 1106ea1d6981Smrgwhen the window is cleared, will contain all graphics output to the window, 1107ea1d6981Smrgand will clip any subwindows. 1108ea1d6981Smrg<!-- .KE --> 1109ea1d6981Smrg </para> 1110ea1d6981Smrg </glossdef> 1111ea1d6981Smrg</glossentry> 1112ea1d6981Smrg<glossentry> 1113ea1d6981Smrg <glossterm>input region</glossterm> 1114ea1d6981Smrg <glossdef> 1115ea1d6981Smrg<para> 1116ea1d6981SmrgThe subset of the bounding region which can ``contain'' the 1117ea1d6981Smrgpointer. 1118ea1d6981Smrg<!-- .KE --> 1119ea1d6981Smrg </para> 1120ea1d6981Smrg </glossdef> 1121ea1d6981Smrg</glossentry> 1122ea1d6981Smrg<glossentry> 1123ea1d6981Smrg <glossterm>default bounding region</glossterm> 1124ea1d6981Smrg <glossdef> 1125ea1d6981Smrg<para> 1126ea1d6981SmrgThe rectangular area, as described by the core protocol window size, that 1127ea1d6981Smrgcovers the interior of the window and its border. 1128ea1d6981Smrg<!-- .KE --> 1129ea1d6981Smrg </para> 1130ea1d6981Smrg </glossdef> 1131ea1d6981Smrg</glossentry> 1132ea1d6981Smrg<glossentry> 1133ea1d6981Smrg <glossterm>default clip region</glossterm> 1134ea1d6981Smrg <glossdef> 1135ea1d6981Smrg<para> 1136ea1d6981SmrgThe rectangular area, as described by the core protocol window size, that 1137ea1d6981Smrgcovers the interior of the window and excludes the border. 1138ea1d6981Smrg<!-- .KE --> 1139ea1d6981Smrg </para> 1140ea1d6981Smrg </glossdef> 1141ea1d6981Smrg</glossentry> 1142ea1d6981Smrg<glossentry> 1143ea1d6981Smrg <glossterm>default input region</glossterm> 1144ea1d6981Smrg <glossdef> 1145ea1d6981Smrg<para> 1146ea1d6981SmrgThe rectangular area, as described by the core protocol window size, that 1147ea1d6981Smrgcovers the interior of the window and its border. 1148ea1d6981Smrg<!-- .KE --> 1149ea1d6981Smrg </para> 1150ea1d6981Smrg </glossdef> 1151ea1d6981Smrg</glossentry> 1152ea1d6981Smrg<glossentry> 1153ea1d6981Smrg <glossterm>client bounding region</glossterm> 1154ea1d6981Smrg <glossdef> 1155ea1d6981Smrg<para> 1156ea1d6981SmrgThe region associated with a window that is directly modified via this 1157ea1d6981Smrgextension when specified by 1158ea1d6981Smrg<function> ShapeBounding .</function> 1159ea1d6981SmrgThis region is used in conjunction with the default bounding region 1160ea1d6981Smrgto produce the effective bounding region. 1161ea1d6981Smrg<!-- .KE --> 1162ea1d6981Smrg </para> 1163ea1d6981Smrg </glossdef> 1164ea1d6981Smrg</glossentry> 1165ea1d6981Smrg<glossentry> 1166ea1d6981Smrg <glossterm>client clip region</glossterm> 1167ea1d6981Smrg <glossdef> 1168ea1d6981Smrg<para> 1169ea1d6981SmrgThe region associated with a window that is directly modified via this 1170ea1d6981Smrgextension when specified by 1171ea1d6981Smrg<function> ShapeClip . </function> 1172ea1d6981SmrgThis region is used in conjunction with the default clip region 1173ea1d6981Smrgand the client bounding region to produce the effective clip region. 1174ea1d6981Smrg<!-- .KE --> 1175ea1d6981Smrg </para> 1176ea1d6981Smrg </glossdef> 1177ea1d6981Smrg</glossentry> 1178ea1d6981Smrg<glossentry> 1179ea1d6981Smrg <glossterm>client input region</glossterm> 1180ea1d6981Smrg <glossdef> 1181ea1d6981Smrg<para> 1182ea1d6981SmrgThe region associated with a window that is directly modified via this 1183ea1d6981Smrgextension when specified by 1184ea1d6981Smrg<function> ShapeInput . </function> 1185ea1d6981SmrgThis region is used in conjunction with the default input region 1186ea1d6981Smrgand the client bounding region to produce the effective input region. 1187ea1d6981Smrg<!-- .KE --> 1188ea1d6981Smrg </para> 1189ea1d6981Smrg </glossdef> 1190ea1d6981Smrg</glossentry> 1191ea1d6981Smrg<glossentry> 1192ea1d6981Smrg <glossterm>effective bounding region</glossterm> 1193ea1d6981Smrg <glossdef> 1194ea1d6981Smrg<para> 1195ea1d6981SmrgThe actual shape of the window on the screen, including border and interior 1196ea1d6981Smrg(but excluding the effects of overlapping windows). When a window has a client 1197ea1d6981Smrgbounding region, the effective bounding region is the intersection of the 1198ea1d6981Smrgdefault bounding region and the client bounding region. Otherwise, the 1199ea1d6981Smrgeffective bounding region is the same as the default bounding region. 1200ea1d6981Smrg<!-- .KE --> 1201ea1d6981Smrg </para> 1202ea1d6981Smrg </glossdef> 1203ea1d6981Smrg</glossentry> 1204ea1d6981Smrg<glossentry> 1205ea1d6981Smrg <glossterm>effective clip region</glossterm> 1206ea1d6981Smrg <glossdef> 1207ea1d6981Smrg<para> 1208ea1d6981SmrgThe actual shape of the interior of the window on the screen (excluding the 1209ea1d6981Smrgeffects of overlapping windows). When a window has a client clip region or 1210ea1d6981Smrga client bounding region, the effective clip region is the intersection of 1211ea1d6981Smrgthe default clip region, the client clip region (if any) and the client 1212ea1d6981Smrgbounding region (if any). Otherwise, the effective clip region is the 1213ea1d6981Smrgsame as the default clip region. 1214ea1d6981Smrg<!-- .KE --> 1215ea1d6981Smrg </para> 1216ea1d6981Smrg </glossdef> 1217ea1d6981Smrg</glossentry> 1218ea1d6981Smrg<glossentry> 1219ea1d6981Smrg <glossterm>effective input region</glossterm> 1220ea1d6981Smrg <glossdef> 1221ea1d6981Smrg<para> 1222ea1d6981SmrgThe actual shape of the window on the screen (excluding the 1223ea1d6981Smrgeffects of overlapping windows) which can ``contain'' the pointer. 1224ea1d6981SmrgWhen a window has a client input region or 1225ea1d6981Smrga client bounding region, the effective input region is the intersection of 1226ea1d6981Smrgthe default input region, the client input region (if any) and the client 1227ea1d6981Smrgbounding region (if any). Otherwise, the effective input region is the 1228ea1d6981Smrgsame as the default input region. 1229ea1d6981Smrg<!-- .KE --> 1230ea1d6981Smrg </para> 1231ea1d6981Smrg </glossdef> 1232ea1d6981Smrg</glossentry> 1233ea1d6981Smrg<!-- 1234ea1d6981SmrgRevision History 1235ea1d6981Smrg.LP 1236ea1d6981Smrg1.0 - 1989 - Original Revision 1237ea1d6981Smrg.LP 1238ea1d6981Smrg1.0.1 - March 2004 - Corrected misnumbering of \fIShapeInputSelected 1239ea1d6981Smrgand \fIShapeGetRectangles requests in encoding section. 1240ea1d6981Smrg.LP 1241ea1d6981Smrg1.1 - February 2006 - Added Input regions. 1242ea1d6981Smrg--> 1243ea1d6981Smrg</glossary> 1244ea1d6981Smrg</book> 1245