shapelib.xml revision a5602400
1e8a5466aSmrg<?xml version="1.0" encoding="UTF-8" ?> 2a5602400Smrg<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" 3a5602400Smrg "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"> 4e8a5466aSmrg 5e8a5466aSmrg<!-- lifted from troff+ms+XMan by doclifter --> 6e8a5466aSmrg<book id="shapelib"> 7e8a5466aSmrg 8e8a5466aSmrg<bookinfo> 9e8a5466aSmrg <title>X Nonrectangular Window Shape Extension Library</title> 10e8a5466aSmrg <subtitle>X Consortium Standard</subtitle> 11e8a5466aSmrg <releaseinfo>X Version 11, Release 6.4</releaseinfo> 12e8a5466aSmrg <authorgroup> 13e8a5466aSmrg <author> 14e8a5466aSmrg <firstname>Keith</firstname><surname>Packard</surname> 15e8a5466aSmrg </author> 16e8a5466aSmrg </authorgroup> 17e8a5466aSmrg <corpname>MIT X Consortium</corpname> 18e8a5466aSmrg <copyright><year>1989</year><holder>X Consortium</holder></copyright> 19e8a5466aSmrg <releaseinfo>Version 1.0</releaseinfo> 20e8a5466aSmrg <affiliation><orgname>MIT X Consortium</orgname></affiliation> 21e8a5466aSmrg <productnumber>X Version 11, Release 6.4</productnumber> 22e8a5466aSmrg 23e8a5466aSmrg<legalnotice> 24e8a5466aSmrg 25e8a5466aSmrg<para> 26e8a5466aSmrgPermission is hereby granted, free of charge, to any person obtaining a copy 27e8a5466aSmrgof this software and associated documentation files 28e8a5466aSmrg(the “Software”), to deal in the Software without restriction, 29e8a5466aSmrgincluding without limitation the rights to use, copy, modify, merge, 30e8a5466aSmrgpublish, distribute, sublicense, and/or sell copies of the Software, and 31e8a5466aSmrgto permit persons to whom the Software is furnished to do so, subject to 32e8a5466aSmrgthe following conditions: 33e8a5466aSmrg</para> 34e8a5466aSmrg 35e8a5466aSmrg<para> 36e8a5466aSmrgThe above copyright notice and this permission notice shall be included in 37e8a5466aSmrgall copies or substantial portions of the Software. 38e8a5466aSmrg</para> 39e8a5466aSmrg 40e8a5466aSmrg<para> 41e8a5466aSmrgTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY 42e8a5466aSmrgKIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 43e8a5466aSmrgOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 44e8a5466aSmrgIN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR 45e8a5466aSmrgOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 46e8a5466aSmrgARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 47e8a5466aSmrgOTHER DEALINGS IN THE SOFTWARE. 48e8a5466aSmrg</para> 49e8a5466aSmrg 50e8a5466aSmrg<para> 51e8a5466aSmrgExcept as contained in this notice, the name of the X Consortium shall not be 52e8a5466aSmrgused in advertising or otherwise to promote the sale, use or other dealings 53e8a5466aSmrgin this Software without prior written authorization from the X Consortium. 54e8a5466aSmrg</para> 55e8a5466aSmrg</legalnotice> 56e8a5466aSmrg</bookinfo> 57e8a5466aSmrg 58e8a5466aSmrg<chapter id='overview'> 59e8a5466aSmrg<title>Overview</title> 60e8a5466aSmrg 61e8a5466aSmrg<para>This extension provides arbitrary window and border shapes within 62e8a5466aSmrgthe X11 protocol. 63e8a5466aSmrg</para> 64e8a5466aSmrg 65e8a5466aSmrg<para> 66e8a5466aSmrgThe restriction of rectangular windows within the X protocol is a significant 67e8a5466aSmrglimitation in the implementation of many styles of user interface. For 68e8a5466aSmrgexample, many transient windows would like to display a 69e8a5466aSmrg“drop shadow” to give the illusion of 3 dimensions. As 70e8a5466aSmrganother example, some user interface style guides call for buttons with 71e8a5466aSmrgrounded corners; the full simulation of a nonrectangular shape, 72e8a5466aSmrgparticularly with respect to event distribution and cursor shape, is not 73e8a5466aSmrgpossible within the core X protocol. As a final example, round clocks 74e8a5466aSmrgand nonrectangular icons are desirable visual addition to the desktop. 75e8a5466aSmrg</para> 76e8a5466aSmrg 77e8a5466aSmrg<para> 78e8a5466aSmrgThis extension provides mechanisms for changing the visible shape of a 79e8a5466aSmrgwindow to an arbitrary, possibly disjoint, nonrectangular form. The intent 80e8a5466aSmrgof the extension is to supplement the existing semantics, not replace them. 81e8a5466aSmrgIn particular, it is desirable for clients that are unaware of the 82e8a5466aSmrgextension to still be able to cope reasonably with shaped windows. For 83e8a5466aSmrgexample, window managers should still be able to negotiate screen 84e8a5466aSmrgreal estate in rectangular pieces. Toward this end, any shape specified for 85e8a5466aSmrga window is clipped by the bounding rectangle for the window as specified by 86e8a5466aSmrgthe window's geometry in the core protocol. An expected convention would be 87e8a5466aSmrgthat client programs expand their shape to fill the area offered by the 88e8a5466aSmrgwindow manager. 89e8a5466aSmrg</para> 90e8a5466aSmrg</chapter> 91e8a5466aSmrg 92e8a5466aSmrg<chapter id='description'> 93e8a5466aSmrg<title>Description</title> 94e8a5466aSmrg 95e8a5466aSmrg<para> 96e8a5466aSmrgEach window (even with no shapes specified) is defined by two regions: the 97e8a5466aSmrg<emphasis remap='I'>bounding region</emphasis> and the 98e8a5466aSmrg<emphasis remap='I'>clip region</emphasis>. The bounding region is the 99e8a5466aSmrgarea of the parent window that the window will occupy (including border). 100e8a5466aSmrgThe clip region is the subset of the bounding region that is available for 101e8a5466aSmrgsubwindows and graphics. The area between the bounding region and the 102e8a5466aSmrgclip region is defined to be the border of the window. 103e8a5466aSmrg</para> 104e8a5466aSmrg 105e8a5466aSmrg<para> 106e8a5466aSmrgA nonshaped window will have a bounding region that is a rectangle spanning 107e8a5466aSmrgthe window, including its border; the clip region will be a rectangle 108e8a5466aSmrgfilling the inside dimensions (not including the border). In this document, 109e8a5466aSmrgthese areas are referred to as the 110e8a5466aSmrg<emphasis remap='I'>default bounding region</emphasis> and the 111e8a5466aSmrg<emphasis remap='I'>default clip region</emphasis>. For a window with 112e8a5466aSmrginside size of <emphasis remap='I'>width</emphasis> by 113e8a5466aSmrg<emphasis remap='I'>height</emphasis> and border width 114e8a5466aSmrg<emphasis remap='I'>bwidth</emphasis>, the default bounding and clip 115e8a5466aSmrgregions are the rectangles (relative to the window origin): 116e8a5466aSmrg</para> 117e8a5466aSmrg 118e8a5466aSmrg<literallayout remap='Ds'> 119e8a5466aSmrgbounding.x = -<emphasis remap='I'>bwidth</emphasis> 120e8a5466aSmrgbounding.y = -<emphasis remap='I'>bwidth</emphasis> 121e8a5466aSmrgbounding.width = <emphasis remap='I'>width</emphasis> + 2 * <emphasis remap='I'>bwidth</emphasis> 122e8a5466aSmrgbounding.height = <emphasis remap='I'>height</emphasis> + 2 * <emphasis remap='I'>bwidth</emphasis> 123e8a5466aSmrg 124e8a5466aSmrgclip.x = 0 125e8a5466aSmrgclip.y = 0 126e8a5466aSmrgclip.width = <emphasis remap='I'>width</emphasis> 127e8a5466aSmrgclip.height = <emphasis remap='I'>height</emphasis> 128e8a5466aSmrg</literallayout> 129e8a5466aSmrg 130e8a5466aSmrg<para> 131e8a5466aSmrgThis extension allows a client to modify either or both of the bounding or 132e8a5466aSmrgclip regions by specifying new regions that combine with the default 133e8a5466aSmrgregions. These new regions are called the 134e8a5466aSmrg<emphasis remap='I'>client bounding region</emphasis> and the 135e8a5466aSmrg<emphasis remap='I'>client clip region</emphasis>. They are specified 136e8a5466aSmrgrelative to the origin of the window and are always defined by offsets 137e8a5466aSmrgrelative to the window origin (that is, region adjustments are not 138e8a5466aSmrgrequired when the window is moved). Three mechanisms for specifying 139e8a5466aSmrgregions are provided: a list of rectangles, a bitmap, and an existing 140e8a5466aSmrgbounding or clip region from a window. This is modeled on the specification 141e8a5466aSmrgof regions in graphics contexts in the core protocol and allows a variety 142e8a5466aSmrgof different uses of the extension. 143e8a5466aSmrg</para> 144e8a5466aSmrg 145e8a5466aSmrg<para> 146e8a5466aSmrgWhen using an existing window shape as an operand in specifying a new shape, 147e8a5466aSmrgthe client region is used, unless none has been set, in which case the 148e8a5466aSmrgdefault region is used instead. 149e8a5466aSmrg</para> 150e8a5466aSmrg 151e8a5466aSmrg<para> 152e8a5466aSmrgThe <emphasis remap='I'>effective bounding region</emphasis> of a window is 153e8a5466aSmrgdefined to be the intersection of the client bounding region with the default 154e8a5466aSmrgbounding region. Any portion of the client bounding region that is not 155e8a5466aSmrgincluded in the default bounding region will not be included in the 156e8a5466aSmrgeffective bounding region on the screen. This means that window managers 157e8a5466aSmrg(or other geometry managers) used to dealing with rectangular client windows 158e8a5466aSmrgwill be able to constrain the client to a rectangular area of the screen. 159e8a5466aSmrg</para> 160e8a5466aSmrg 161e8a5466aSmrg<para> 162e8a5466aSmrgConstruction of the effective bounding region is dynamic; the client bounding 163e8a5466aSmrgregion is not mutated to obtain the effective bounding region. If a client 164e8a5466aSmrgbounding region is specified that extends beyond the current default bounding 165e8a5466aSmrgregion, and the window is later enlarged, the effective bounding region will 166e8a5466aSmrgbe enlarged to include more of the client bounding region. 167e8a5466aSmrg</para> 168e8a5466aSmrg 169e8a5466aSmrg<para> 170e8a5466aSmrgThe <emphasis remap='I'>effective clip region</emphasis> of a window is 171e8a5466aSmrgdefined to be the intersection of the client clip region with both the 172e8a5466aSmrgdefault clip region and the client bounding region. Any portion of the 173e8a5466aSmrgclient clip region that is not included in both the default clip region 174e8a5466aSmrgand the client bounding region will not be included in the effective clip 175e8a5466aSmrgregion on the screen. 176e8a5466aSmrg</para> 177e8a5466aSmrg 178e8a5466aSmrg<para> 179e8a5466aSmrgConstruction of the effective clip region is dynamic; the client clip region is 180e8a5466aSmrgnot mutated to obtain the effective clip region. If a client clip region is 181e8a5466aSmrgspecified that extends beyond the current default clip region and the 182e8a5466aSmrgwindow or its bounding region is later enlarged, the effective clip region will 183e8a5466aSmrgbe enlarged to include more of the client clip region if it is included in 184e8a5466aSmrgthe effective bounding region. 185e8a5466aSmrg</para> 186e8a5466aSmrg 187e8a5466aSmrg<para> 188e8a5466aSmrgThe border of a window is defined to be the difference between the effective 189e8a5466aSmrgbounding region and the effective clip region. If this region is empty, no 190e8a5466aSmrgborder is displayed. If this region is nonempty, the border is filled 191e8a5466aSmrgusing the border-tile or border-pixel of the window as specified in the core 192e8a5466aSmrgprotocol. Note that a window with a nonzero border width will never be able 193e8a5466aSmrgto draw beyond the default clip region of the window. Also note that a zero 194e8a5466aSmrgborder width does not prevent a window from having a border, since the clip 195e8a5466aSmrgshape can still be made smaller than the bounding shape. 196e8a5466aSmrg</para> 197e8a5466aSmrg 198e8a5466aSmrg<para> 199e8a5466aSmrgAll output to the window and visible regions of any subwindows will be 200e8a5466aSmrgclipped to the effective clip region. The server must not retain window 201e8a5466aSmrgcontents beyond the effective bounding region with backing store. The window's 202e8a5466aSmrgorigin (for graphics operations, background tiling, and subwindow placement) 203e8a5466aSmrgis not affected by the existence of a bounding region or clip region. 204e8a5466aSmrg</para> 205e8a5466aSmrg 206e8a5466aSmrg<para> 207e8a5466aSmrgAreas that are inside the default bounding region but outside the effective 208e8a5466aSmrgbounding region are not part of the window; these areas of the screen will 209e8a5466aSmrgbe occupied by other windows. Input events that occur within the default 210e8a5466aSmrgbounding region but outside the effective bounding region will be delivered as 211e8a5466aSmrgif the window was not occluding the event position. Events that occur in 212e8a5466aSmrga nonrectangular border of a window will be delivered to that window, just 213e8a5466aSmrgas for events that occur in a normal rectangular border. 214e8a5466aSmrg</para> 215e8a5466aSmrg 216e8a5466aSmrg<para>An 217e8a5466aSmrg<function>InputOnly</function> 218e8a5466aSmrgwindow can have its bounding region set, but it is a 219e8a5466aSmrg<function>Match</function> 220e8a5466aSmrgerror to attempt to set a clip region on an 221e8a5466aSmrg<function>InputOnly</function> 222e8a5466aSmrgwindow or to specify its clip region as a source to a request 223e8a5466aSmrgin this extension. 224e8a5466aSmrg</para> 225e8a5466aSmrg 226e8a5466aSmrg<para> 227e8a5466aSmrgThe server must accept changes to the clip region of a root window, but 228e8a5466aSmrgthe server is permitted to ignore requested changes to the bounding region 229e8a5466aSmrgof a root window. If the server accepts bounding region changes, the contents 230e8a5466aSmrgof the screen outside the bounding region are implementation dependent. 231e8a5466aSmrg</para> 232e8a5466aSmrg</chapter> 233e8a5466aSmrg 234e8a5466aSmrg<chapter id='c_language_binding'> 235e8a5466aSmrg<title>C Language Binding</title> 236e8a5466aSmrg 237e8a5466aSmrg<para> 238e8a5466aSmrgThe C functions provide direct access to the protocol and add no additional 239e8a5466aSmrgsemantics. 240e8a5466aSmrg</para> 241e8a5466aSmrg 242e8a5466aSmrg<para>The include file for this extension is 243e8a5466aSmrg<<symbol role='Pn'>X11/extensions/shape.h</symbol>>. 244e8a5466aSmrgThe defined shape kinds are 245e8a5466aSmrg<function>ShapeBounding</function> 246e8a5466aSmrgand 247e8a5466aSmrg<function>ShapeClip</function> 248e8a5466aSmrgThe defined region operations are 249e8a5466aSmrg<function>ShapeSet</function> 250e8a5466aSmrg<function>ShapeUnion</function> 251e8a5466aSmrg<function>ShapeIntersect</function> 252e8a5466aSmrg<function>ShapeSubtract</function> 253e8a5466aSmrgand 254e8a5466aSmrg<function>ShapeInvert</function>.</para> 255e8a5466aSmrg 256e8a5466aSmrg<funcsynopsis> 257e8a5466aSmrg<funcprototype> 258e8a5466aSmrg<funcdef>Bool<function> XShapeQueryExtension</function></funcdef> 259e8a5466aSmrg<paramdef>Display <parameter>*display</parameter></paramdef> 260e8a5466aSmrg<paramdef>int <parameter>*event_base</parameter></paramdef> 261e8a5466aSmrg<paramdef>int <parameter>*error_base</parameter></paramdef> 262e8a5466aSmrg</funcprototype> 263e8a5466aSmrg</funcsynopsis> 264e8a5466aSmrg 265e8a5466aSmrg<para> 266e8a5466aSmrg<function>XShapeQueryExtension</function> 267e8a5466aSmrgreturns 268e8a5466aSmrg<function>True</function> 269e8a5466aSmrgif the specified display supports the SHAPE extension else 270e8a5466aSmrg<function>False</function> 271e8a5466aSmrgIf the extension is supported, *event_base is set to the event number for 272e8a5466aSmrg<function>ShapeNotify</function> 273e8a5466aSmrgevents and *error_base would be set to the error number for the first error for 274e8a5466aSmrgthis extension. Because no errors are defined for this version of 275e8a5466aSmrgthe extension, the value returned here is not defined (nor useful). 276e8a5466aSmrg</para> 277e8a5466aSmrg 278e8a5466aSmrg<funcsynopsis> 279e8a5466aSmrg<funcprototype> 280e8a5466aSmrg<funcdef>Status<function> XShapeQueryVersion</function></funcdef> 281e8a5466aSmrg<paramdef>Display<parameter> *display</parameter></paramdef> 282e8a5466aSmrg<paramdef>int<parameter> *major_version</parameter></paramdef> 283e8a5466aSmrg<paramdef>int<parameter> *minor_version</parameter></paramdef> 284e8a5466aSmrg</funcprototype> 285e8a5466aSmrg</funcsynopsis> 286e8a5466aSmrg 287e8a5466aSmrg<para> 288e8a5466aSmrgIf the extension is supported, 289e8a5466aSmrg<function>XShapeQueryVersion</function> 290e8a5466aSmrgsets the major and minor version numbers of the 291e8a5466aSmrgextension supported by the display and returns a nonzero value. 292e8a5466aSmrgOtherwise, the arguments are not set and zero is returned. 293e8a5466aSmrg</para> 294e8a5466aSmrg 295e8a5466aSmrg<funcsynopsis> 296e8a5466aSmrg<funcprototype> 297e8a5466aSmrg<funcdef><function>XShapeCombineRegion</function></funcdef> 298e8a5466aSmrg<paramdef>Display<parameter> *display</parameter></paramdef> 299e8a5466aSmrg<paramdef>Window<parameter> dest</parameter></paramdef> 300e8a5466aSmrg<paramdef>int<parameter> dest_kind</parameter></paramdef> 301e8a5466aSmrg<paramdef>int<parameter> x_off</parameter></paramdef> 302e8a5466aSmrg<paramdef>int<parameter> y_off</parameter></paramdef> 303e8a5466aSmrg<paramdef>int<parameter> region</parameter></paramdef> 304e8a5466aSmrg<paramdef>int<parameter> op</parameter></paramdef> 305e8a5466aSmrg<paramdef>REGION<parameter> *region</parameter></paramdef> 306e8a5466aSmrg</funcprototype> 307e8a5466aSmrg</funcsynopsis> 308e8a5466aSmrg 309e8a5466aSmrg<para> 310e8a5466aSmrg<function>XShapeCombineRegion</function> 311e8a5466aSmrgconverts the specified region into a list of rectangles and calls 312e8a5466aSmrg<function>XShapeCombineRectangles</function> 313e8a5466aSmrg</para> 314e8a5466aSmrg 315e8a5466aSmrg<funcsynopsis> 316e8a5466aSmrg<funcprototype> 317e8a5466aSmrg<funcdef><function>XShapeCombineRectangles</function></funcdef> 318e8a5466aSmrg<paramdef>Display<parameter> *display</parameter></paramdef> 319e8a5466aSmrg<paramdef>Window<parameter> dest</parameter></paramdef> 320e8a5466aSmrg<paramdef>int<parameter> dest_kind</parameter></paramdef> 321e8a5466aSmrg<paramdef>int<parameter> x_off</parameter></paramdef> 322e8a5466aSmrg<paramdef>int<parameter> y_off</parameter></paramdef> 323e8a5466aSmrg<paramdef>XRectangle<parameter> *rectangles</parameter></paramdef> 324e8a5466aSmrg<paramdef>int<parameter> n_rects</parameter></paramdef> 325e8a5466aSmrg<paramdef>int<parameter> op</parameter></paramdef> 326e8a5466aSmrg<paramdef>int<parameter> ordering</parameter></paramdef> 327e8a5466aSmrg</funcprototype> 328e8a5466aSmrg</funcsynopsis> 329e8a5466aSmrg 330e8a5466aSmrg<para> 331e8a5466aSmrgIf the extension is supported, 332e8a5466aSmrg<function>XShapeCombineRectangles</function> 333e8a5466aSmrgperforms a 334e8a5466aSmrg<function>ShapeRectangles</function> 335e8a5466aSmrgoperation; otherwise, the request is ignored. 336e8a5466aSmrg</para> 337e8a5466aSmrg 338e8a5466aSmrg<funcsynopsis> 339e8a5466aSmrg<funcprototype> 340e8a5466aSmrg<funcdef><function>XShapeCombineMask</function></funcdef> 341e8a5466aSmrg<paramdef>Display<parameter> *display</parameter></paramdef> 342e8a5466aSmrg<paramdef>int<parameter> dest</parameter></paramdef> 343e8a5466aSmrg<paramdef>int<parameter> dest_kind</parameter></paramdef> 344e8a5466aSmrg<paramdef>int<parameter> x_off</parameter></paramdef> 345e8a5466aSmrg<paramdef>int<parameter> y_off</parameter></paramdef> 346e8a5466aSmrg<paramdef>Pixmap<parameter> src</parameter></paramdef> 347e8a5466aSmrg<paramdef>int<parameter> op</parameter></paramdef> 348e8a5466aSmrg</funcprototype> 349e8a5466aSmrg</funcsynopsis> 350e8a5466aSmrg 351e8a5466aSmrg<para> 352e8a5466aSmrgIf the extension is supported, 353e8a5466aSmrg<function>XShapeCombineMask</function> 354e8a5466aSmrgperforms a 355e8a5466aSmrg<function>ShapeMask</function> 356e8a5466aSmrgoperation; otherwise, the request is ignored. 357e8a5466aSmrg</para> 358e8a5466aSmrg 359e8a5466aSmrg<funcsynopsis> 360e8a5466aSmrg<funcprototype> 361e8a5466aSmrg<funcdef><function>XShapeCombineShape</function></funcdef> 362e8a5466aSmrg<paramdef>Display<parameter> *display</parameter></paramdef> 363e8a5466aSmrg<paramdef>Window<parameter> dest</parameter></paramdef> 364e8a5466aSmrg<paramdef>int<parameter> dest_kind</parameter></paramdef> 365e8a5466aSmrg<paramdef>int<parameter> x_off</parameter></paramdef> 366e8a5466aSmrg<paramdef>int<parameter> y_off</parameter></paramdef> 367e8a5466aSmrg<paramdef>Window<parameter> src</parameter></paramdef> 368e8a5466aSmrg<paramdef>int<parameter> src_kind</parameter></paramdef> 369e8a5466aSmrg<paramdef>int<parameter> op</parameter></paramdef> 370e8a5466aSmrg</funcprototype> 371e8a5466aSmrg</funcsynopsis> 372e8a5466aSmrg 373e8a5466aSmrg<para> 374e8a5466aSmrgIf the extension is supported, 375e8a5466aSmrg<function>XShapeCombineShape</function> 376e8a5466aSmrgperforms a 377e8a5466aSmrg<function>ShapeCombine</function> 378e8a5466aSmrgoperation; otherwise, the request is ignored. 379e8a5466aSmrg</para> 380e8a5466aSmrg 381e8a5466aSmrg<funcsynopsis> 382e8a5466aSmrg<funcprototype> 383e8a5466aSmrg<funcdef><function>XShapeOffsetShape</function></funcdef> 384e8a5466aSmrg<paramdef><parameter>display</parameter></paramdef> 385e8a5466aSmrg<paramdef><parameter>dest</parameter></paramdef> 386e8a5466aSmrg<paramdef><parameter>dest_kind</parameter></paramdef> 387e8a5466aSmrg<paramdef><parameter>x_off</parameter></paramdef> 388e8a5466aSmrg<paramdef><parameter>y_off</parameter></paramdef> 389e8a5466aSmrg</funcprototype> 390e8a5466aSmrg</funcsynopsis> 391e8a5466aSmrg 392e8a5466aSmrg<para> 393e8a5466aSmrgIf the extension is supported, 394e8a5466aSmrg<function>XShapeOffsetShape</function> 395e8a5466aSmrgperforms a 396e8a5466aSmrg<function>ShapeOffset</function> 397e8a5466aSmrgoperation; otherwise, the request is ignored. 398e8a5466aSmrg</para> 399e8a5466aSmrg 400e8a5466aSmrg<funcsynopsis> 401e8a5466aSmrg<funcprototype> 402e8a5466aSmrg<funcdef>Status <function>XShapeQueryExtents</function></funcdef> 403e8a5466aSmrg<paramdef>Display<parameter> *display</parameter></paramdef> 404e8a5466aSmrg<paramdef>Window<parameter> window</parameter></paramdef> 405e8a5466aSmrg<paramdef>Bool<parameter> *bounding_shaped</parameter></paramdef> 406e8a5466aSmrg<paramdef>int<parameter> *x_bounding</parameter></paramdef> 407e8a5466aSmrg<paramdef>int<parameter> *y_bounding</parameter></paramdef> 408e8a5466aSmrg<paramdef>unsigned int<parameter> *w_bounding</parameter></paramdef> 409e8a5466aSmrg<paramdef>unsigned int<parameter> *h_bounding</parameter></paramdef> 410e8a5466aSmrg<paramdef>Bool<parameter> *clip_shaped</parameter></paramdef> 411e8a5466aSmrg<paramdef>int<parameter> *x_clip</parameter></paramdef> 412e8a5466aSmrg<paramdef>int<parameter> *y_clip</parameter></paramdef> 413e8a5466aSmrg<paramdef>unsigned int<parameter> *w_clip</parameter></paramdef> 414e8a5466aSmrg<paramdef>unsigned int<parameter> *h_clip</parameter></paramdef> 415e8a5466aSmrg</funcprototype> 416e8a5466aSmrg</funcsynopsis> 417e8a5466aSmrg 418e8a5466aSmrg<para> 419e8a5466aSmrgIf the extension is supported, 420e8a5466aSmrg<function>XShapeQueryExtents</function> 421e8a5466aSmrgsets x_bounding, y_bounding, w_bounding, h_bounding to the extents of the 422e8a5466aSmrgbounding shape and sets x_clip, y_clip, w_clip, h_clip to the extents of 423e8a5466aSmrgthe clip shape. For unspecified client regions, the extents of the 424e8a5466aSmrgcorresponding default region are used. 425e8a5466aSmrg</para> 426e8a5466aSmrg 427e8a5466aSmrg<para> 428e8a5466aSmrgIf the extension is supported, a nonzero value is returned; otherwise, 429e8a5466aSmrgzero is returned. 430e8a5466aSmrg</para> 431e8a5466aSmrg 432e8a5466aSmrg<funcsynopsis> 433e8a5466aSmrg<funcprototype> 434e8a5466aSmrg<funcdef><function>XShapeSelectInput</function></funcdef> 435e8a5466aSmrg<paramdef>Display<parameter> *display</parameter></paramdef> 436e8a5466aSmrg<paramdef>Window<parameter> window</parameter></paramdef> 437e8a5466aSmrg<paramdef>unsigned long<parameter> mask</parameter></paramdef> 438e8a5466aSmrg</funcprototype> 439e8a5466aSmrg</funcsynopsis> 440e8a5466aSmrg 441e8a5466aSmrg<para> 442e8a5466aSmrgTo make this extension more compatible with other interfaces, although 443e8a5466aSmrgonly one event type can be selected via the extension, 444e8a5466aSmrg<function>XShapeSelectInput</function> 445e8a5466aSmrgprovides a general mechanism similar to the standard Xlib binding for 446e8a5466aSmrgwindow events. A mask value has been defined, 447e8a5466aSmrg<function>ShapeNotifyMask</function> 448e8a5466aSmrgthat is the only valid bit in mask that may be specified. 449e8a5466aSmrgThe structure for this event is defined as follows: 450e8a5466aSmrg</para> 451e8a5466aSmrg 452e8a5466aSmrg<literallayout remap='Ds'> 453e8a5466aSmrgtypedef struct { 454e8a5466aSmrg int type; /* of event */ 455e8a5466aSmrg unsigned long serial; /* # of last request processed by server */ 456e8a5466aSmrg Bool send_event; /* true if this came frome a SendEvent request */ 457e8a5466aSmrg Display *display; /* Display the event was read from */ 458e8a5466aSmrg Window window; /* window of event */ 459e8a5466aSmrg int kind; /* ShapeBounding or ShapeClip */ 460e8a5466aSmrg int x, y; /* extents of new region */ 461e8a5466aSmrg unsigned width, height; 462e8a5466aSmrg Time time; /* server timestamp when region changed */ 463e8a5466aSmrg Bool shaped; /* true if the region exists */ 464e8a5466aSmrg} XShapeEvent; 465e8a5466aSmrg</literallayout> 466e8a5466aSmrg 467e8a5466aSmrg<funcsynopsis> 468e8a5466aSmrg<funcprototype> 469e8a5466aSmrg<funcdef>unsigned long <function>XShapeInputSelected</function></funcdef> 470e8a5466aSmrg<paramdef>Display<parameter> *display</parameter></paramdef> 471e8a5466aSmrg<paramdef>Window<parameter> window</parameter></paramdef> 472e8a5466aSmrg</funcprototype> 473e8a5466aSmrg</funcsynopsis> 474e8a5466aSmrg 475e8a5466aSmrg<para> 476e8a5466aSmrg<function>XShapeInputSelected</function> 477e8a5466aSmrgreturns the current input mask for extension events on the specified 478e8a5466aSmrgwindow; the value returned if 479e8a5466aSmrg<function>ShapeNotify</function> 480e8a5466aSmrgis selected for is 481e8a5466aSmrg<function>ShapeNotifyMask</function> 482e8a5466aSmrgotherwise, it returns zero. 483e8a5466aSmrgIf the extension is not supported, it returns zero. 484e8a5466aSmrg</para> 485e8a5466aSmrg 486e8a5466aSmrg<funcsynopsis> 487e8a5466aSmrg<funcprototype> 488e8a5466aSmrg<funcdef>XRectangle<function> *XShapeGetRectangles</function></funcdef> 489e8a5466aSmrg<paramdef>Display<parameter> *display</parameter></paramdef> 490e8a5466aSmrg<paramdef>Window<parameter> window</parameter></paramdef> 491e8a5466aSmrg<paramdef>int<parameter> kind</parameter></paramdef> 492e8a5466aSmrg<paramdef>int<parameter> *count</parameter></paramdef> 493e8a5466aSmrg<paramdef>int<parameter> *ordering</parameter></paramdef> 494e8a5466aSmrg</funcprototype> 495e8a5466aSmrg</funcsynopsis> 496e8a5466aSmrg 497e8a5466aSmrg<para> 498e8a5466aSmrgIf the extension is not supported, 499e8a5466aSmrg<function>XShapeGetRectangles</function> 500e8a5466aSmrgreturns NULL. Otherwise, it returns a list of rectangles that describe the 501e8a5466aSmrgregion specified by kind. 502e8a5466aSmrg</para> 503e8a5466aSmrg</chapter> 504e8a5466aSmrg 505e8a5466aSmrg<glossary id='glossary'> 506e8a5466aSmrg 507e8a5466aSmrg<glossentry id='bounding_region'> 508e8a5466aSmrg <glossterm>bounding region</glossterm> 509e8a5466aSmrg <glossdef><para>The area of the parent window that this window will occupy. 510e8a5466aSmrgThis area is divided into two parts: the border and the interior.</para> 511e8a5466aSmrg </glossdef> 512e8a5466aSmrg</glossentry> 513e8a5466aSmrg 514e8a5466aSmrg<glossentry id='clip_region'> 515e8a5466aSmrg <glossterm>clip region</glossterm> 516e8a5466aSmrg <glossdef><para>The interior of the window, as a subset of the bounding 517e8a5466aSmrgregion. This region describes the area that will be painted with the 518e8a5466aSmrgwindow background when the window is cleared, will contain all graphics 519e8a5466aSmrgoutput to the window, and will clip any subwindows.</para></glossdef> 520e8a5466aSmrg</glossentry> 521e8a5466aSmrg 522e8a5466aSmrg<glossentry id='default_bounding_region'> 523e8a5466aSmrg <glossterm>default bounding region</glossterm> 524e8a5466aSmrg <glossdef><para>The rectangular area, as described by the core protocol 525e8a5466aSmrgwindow size, that covers the interior of the window and its border.</para> 526e8a5466aSmrg </glossdef> 527e8a5466aSmrg</glossentry> 528e8a5466aSmrg 529e8a5466aSmrg<glossentry id='default_clip_region'> 530e8a5466aSmrg <glossterm>default clip region</glossterm> 531e8a5466aSmrg <glossdef><para>The rectangular area, as described by the core protocol 532e8a5466aSmrgwindow size, that covers the interior of the window and excludes the border. 533e8a5466aSmrg </para></glossdef> 534e8a5466aSmrg</glossentry> 535e8a5466aSmrg 536e8a5466aSmrg<glossentry id='client_bounding_region'> 537e8a5466aSmrg <glossterm>client bounding region</glossterm> 538e8a5466aSmrg <glossdef><para>The region associated with a window that is directly 539e8a5466aSmrgmodified via this extension when specified by 540e8a5466aSmrg<function>ShapeBounding</function> 541e8a5466aSmrgThis region is used in conjunction with the default bounding region 542e8a5466aSmrgto produce the effective bounding region.</para></glossdef> 543e8a5466aSmrg</glossentry> 544e8a5466aSmrg 545e8a5466aSmrg<glossentry id='client_clip_region'> 546e8a5466aSmrg <glossterm>client clip region</glossterm> 547e8a5466aSmrg <glossdef><para>The region associated with a window that is directly 548e8a5466aSmrgmodified via this extension when specified by 549e8a5466aSmrg<function>ShapeClip</function> 550e8a5466aSmrgThis region is used in conjunction with the default clip region 551e8a5466aSmrgand the client bounding region to produce the effective clip region.</para> 552e8a5466aSmrg </glossdef> 553e8a5466aSmrg</glossentry> 554e8a5466aSmrg 555e8a5466aSmrg<glossentry id='effective_bounding_region'> 556e8a5466aSmrg <glossterm>effective bounding region</glossterm> 557e8a5466aSmrg <glossdef><para>The actual shape of the window on the screen, including 558e8a5466aSmrgborder and interior (but excluding the effects of overlapping windows). 559e8a5466aSmrgWhen a window has a client bounding region, the effective bounding region 560e8a5466aSmrgis the intersection of the default bounding region and the client bounding 561e8a5466aSmrgregion. Otherwise, the effective bounding region is the same as the 562e8a5466aSmrgdefault bounding region.</para> 563e8a5466aSmrg </glossdef> 564e8a5466aSmrg</glossentry> 565e8a5466aSmrg 566e8a5466aSmrg<glossentry id='effective_clip_region'> 567e8a5466aSmrg <glossterm>effective clip region</glossterm> 568e8a5466aSmrg <glossdef><para>The actual shape of the interior of the window on the 569e8a5466aSmrgscreen (excluding the effects of overlapping windows). When a window 570e8a5466aSmrghas a client clip region or a client bounding region, the effective 571e8a5466aSmrgclip region is the intersection of the default clip region, the client 572e8a5466aSmrgclip region (if any) and the client bounding region (if any). Otherwise, 573e8a5466aSmrgthe effective clip region is the same as the default clip region.</para> 574e8a5466aSmrg </glossdef> 575e8a5466aSmrg</glossentry> 576e8a5466aSmrg</glossary> 577e8a5466aSmrg</book> 578