home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 45 / cda45.iso / Linux / XFree86-4.0 / doc / shape.TXT < prev    next >
Encoding:
Text File  |  2000-03-09  |  22.1 KB  |  1,057 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.           X Nonrectangular Window
  17.  
  18.           Shape Extension Protocol
  19.  
  20.  
  21.  
  22.             Version 1.0
  23.            X Consortium Standard
  24.          X Version 11, Release 6.4
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.                Keith Packard
  32.               MIT X Consortium
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42. Copyright (C) 1989 X Consortium
  43.  
  44. Permission is hereby granted, free of charge, to any person
  45. obtaining a copy of this software and associated documenta-
  46. tion files (the ``Software''), to deal in the Software with-
  47. out restriction, including without limitation the rights to
  48. use, copy, modify, merge, publish, distribute, sublicense,
  49. and/or sell copies of the Software, and to permit persons to
  50. whom the Software is furnished to do so, subject to the fol-
  51. lowing conditions:
  52.  
  53. The above copyright notice and this permission notice shall
  54. be included in all copies or substantial portions of the
  55. Software.
  56.  
  57. THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY
  58. KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  59. WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PUR-
  60. POSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE X
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73. CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABIL-
  74. ITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  75. ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
  76. THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  77.  
  78. Except as contained in this notice, the name of the X Con-
  79. sortium shall not be used in advertising or otherwise to
  80. promote the sale, use or other dealings in this Software
  81. without prior written authorization from the X Consortium.
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139. 1.  Overview
  140.  
  141. This extension provides arbitrary window and border shapes
  142. within the X11 protocol.
  143.  
  144. The restriction of rectangular windows within the X protocol
  145. is a significant limitation in the implementation of many
  146. styles of user interface.  For example, many transient win-
  147. dows would like to display a ``drop shadow'' to give the
  148. illusion of 3 dimensions.  As another example, some user
  149. interface style guides call for buttons with rounded cor-
  150. ners; the full simulation of a nonrectangular shape, partic-
  151. ularly with respect to event distribution and cursor shape,
  152. is not possible within the core X protocol.  As a final
  153. example, round clocks and nonrectangular icons are desirable
  154. visual addition to the desktop.
  155.  
  156. This extension provides mechanisms for changing the visible
  157. shape of a window to an arbitrary, possibly disjoint, non-
  158. rectangular form.  The intent of the extension is to supple-
  159. ment the existing semantics, not replace them.    In particu-
  160. lar, it is desirable for clients that are unaware of the
  161. extension to still be able to cope reasonably with shaped
  162. windows.  For example, window managers should still be able
  163. to negotiate screen real estate in rectangular pieces.
  164. Toward this end, any shape specified for a window is clipped
  165. by the bounding rectangle for the window as specified by the
  166. window's geometry in the core protocol.  An expected conven-
  167. tion would be that client programs expand their shape to
  168. fill the area offered by the window manager.
  169.  
  170. 2.  Description
  171.  
  172. Each window (even with no shapes specified) is defined by
  173. two regions:  the bounding region and the clip region.    The
  174. bounding region is the area of the parent window that the
  175. window will occupy (including border). The clip region is
  176. the subset of the bounding region that is available for sub-
  177. windows and graphics.  The area between the bounding region
  178. and the clip region is defined to be the border of the win-
  179. dow.
  180.  
  181. A nonshaped window will have a bounding region that is a
  182. rectangle spanning the window, including its border; the
  183. clip region will be a rectangle filling the inside dimen-
  184. sions (not including the border).  In this document, these
  185. areas are referred to as the default bounding region and the
  186. default clip region.  For a window with inside size of width
  187. by height and border width bwidth, the default bounding and
  188. clip regions are the rectangles (relative to the window ori-
  189. gin):
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.                   1
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      X11 Nonrectangular Window Shape Extension Protocol
  203.  
  204. __
  205. |
  206. bounding.x = -bwidth
  207. bounding.y = -bwidth
  208. bounding.width = width + 2 * bwidth
  209. bounding.height = height + 2 * bwidth
  210.  
  211. clip.x = 0
  212. clip.y = 0
  213. clip.width = width
  214. clip.height = height
  215.  
  216. |__
  217.  
  218. This extension allows a client to modify either or both of
  219. the bounding or clip regions by specifying new regions that
  220. combine with the default regions.  These new regions are
  221. called the client bounding region and the client clip
  222. region.  They are specified relative to the origin of the
  223. window and are always defined by offsets relative to the
  224. window origin (that is, region adjustments are not required
  225. when the window is moved).  Three mechanisms for specifying
  226. regions are provided:  a list of rectangles, a bitmap, and
  227. an existing bounding or clip region from a window.  This is
  228. modeled on the specification of regions in graphics contexts
  229. in the core protocol and allows a variety of different uses
  230. of the extension.
  231.  
  232. When using an existing window shape as an operand in speci-
  233. fying a new shape, the client region is used, unless none
  234. has been set, in which case the default region is used
  235. instead.
  236.  
  237. The effective bounding region of a window is defined to be
  238. the intersection of the client bounding region with the
  239. default bounding region.  Any portion of the client bounding
  240. region that is not included in the default bounding region
  241. will not be included in the effective bounding region on the
  242. screen.  This means that window managers (or other geometry
  243. managers) used to dealing with rectangular client windows
  244. will be able to constrain the client to a rectangular area
  245. of the screen.
  246.  
  247. Construction of the effective bounding region is dynamic;
  248. the client bounding region is not mutated to obtain the
  249. effective bounding region.  If a client bounding region is
  250. specified that extends beyond the current default bounding
  251. region, and the window is later enlarged, the effective
  252. bounding region will be enlarged to include more of the
  253. client bounding region.
  254.  
  255. The effective clip region of a window is defined to be the
  256. intersection of the client clip region with both the default
  257. clip region and the client bounding region.  Any portion of
  258. the client clip region that is not included in both the
  259.  
  260.  
  261.  
  262.                   2
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      X11 Nonrectangular Window Shape Extension Protocol
  269.  
  270.  
  271. default clip region and the client bounding region will not
  272. be included in the effective clip region on the screen.
  273.  
  274. Construction of the effective clip region is dynamic; the
  275. client clip region is not mutated to obtain the effective
  276. clip region.  If a client clip region is specified that
  277. extends beyond the current default clip region and the win-
  278. dow or its bounding region is later enlarged, the effective
  279. clip region will be enlarged to include more of the client
  280. clip region if it is included in the effective bounding
  281. region.
  282.  
  283. The border of a window is defined to be the difference
  284. between the effective bounding region and the effective clip
  285. region.  If this region is empty, no border is displayed.
  286. If this region is nonempty, the border is filled using the
  287. border-tile or border-pixel of the window as specified in
  288. the core protocol.  Note that a window with a nonzero border
  289. width will never be able to draw beyond the default clip
  290. region of the window.  Also note that a zero border width
  291. does not prevent a window from having a border, since the
  292. clip shape can still be made smaller than the bounding
  293. shape.
  294.  
  295. All output to the window and visible regions of any subwin-
  296. dows will be clipped to the effective clip region.  The
  297. server must not retain window contents beyond the effective
  298. bounding region with backing store.  The window's origin
  299. (for graphics operations, background tiling, and subwindow
  300. placement) is not affected by the existence of a bounding
  301. region or clip region.
  302.  
  303. Areas that are inside the default bounding region but out-
  304. side the effective bounding region are not part of the win-
  305. dow; these areas of the screen will be occupied by other
  306. windows.  Input events that occur within the default bound-
  307. ing region but outside the effective bounding region will be
  308. delivered as if the window was not occluding the event posi-
  309. tion.  Events that occur in a nonrectangular border of a
  310. window will be delivered to that window, just as for events
  311. that occur in a normal rectangular border.
  312.  
  313. An InputOnly window can have its bounding region set, but it
  314. is a Match error to attempt to set a clip region on an Inpu-
  315. tOnly window or to specify its clip region as a source to a
  316. request in this extension.
  317.  
  318. The server must accept changes to the clip region of a root
  319. window, but the server is permitted to ignore requested
  320. changes to the bounding region of a root window.  If the
  321. server accepts bounding region changes, the contents of the
  322. screen outside the bounding region are implementation depen-
  323. dent.
  324.  
  325.  
  326.  
  327.  
  328.                   3
  329.  
  330.  
  331.  
  332.  
  333.  
  334.      X11 Nonrectangular Window Shape Extension Protocol
  335.  
  336.  
  337. 3.  Types
  338.  
  339. The following types are used in the request and event defi-
  340. nitions in subsequent sections.
  341.  
  342. SHAPE_KIND: {Bounding, Clip}
  343.  
  344. SHAPE_OP: {Set, Union, Intersect, Subtract, Invert}
  345.  
  346. Set indicates that the region specified as an explicit
  347. source in the request is stored unaltered as the new desti-
  348. nation client region.  Union indicates that the source and
  349. destination regions are unioned together to produce the new
  350. destination client region.  Intersect indicates that the
  351. source and destination regions are intersected together to
  352. produce the new destination client region.  Subtract indi-
  353. cates that the source region is subtracted from the destina-
  354. tion region to produce the new destination region.  Invert
  355. indicates that the destination region is subtracted from the
  356. source region to produce the new destination region.
  357.  
  358. 4.  Requests
  359.  
  360. __
  361. |    ShapeQueryVersion
  362.  
  363.    =>
  364.  
  365.      majorVersion: CARD16
  366.      minorVersion: CARD16
  367. |__
  368.  
  369. This request can be used to ensure that the server version
  370. of the SHAPE extension is usable by the client.  This docu-
  371. ment defines major version one (1), minor version zero (0).
  372.  
  373. __
  374. |    ShapeRectangles
  375.  
  376.      dest: WINDOW
  377.      destKind: SHAPE_KIND
  378.      op: SHAPE_OP
  379.      xOff, yOff: INT16
  380.      rectangles: LISTofRECTANGLES
  381.      ordering: {UnSorted, YSorted, YXSorted, YXBanded}
  382.  
  383.      Errors: Window, Length, Match, Value
  384. |__
  385.  
  386. This request specifies an array of rectangles, relative to
  387. the origin of the window plus the specified offset (xOff and
  388. yOff) that together define a region.  This region is com-
  389. bined (as specified by the operator op) with the existing
  390. client region (specified by destKind) of the destination
  391.  
  392.  
  393.  
  394.                   4
  395.  
  396.  
  397.  
  398.  
  399.  
  400.      X11 Nonrectangular Window Shape Extension Protocol
  401.  
  402.  
  403. window, and the result is stored as the specified client
  404. region of the destination window.  Note that the list of
  405. rectangles can be empty, specifying an empty region; this is
  406. not the same as passing None to ShapeMask.
  407.  
  408. If known by the client, ordering relations on the rectangles
  409. can be specified with the ordering argument.  This may pro-
  410. vide faster operation by the server.  The meanings of the
  411. ordering values are the same as in the core protocol Set-
  412. ClipRectangles request.  If an incorrect ordering is speci-
  413. fied, the server may generate a Match error, but it is not
  414. required to do so.  If no error is generated, the graphics
  415. results are undefined.    Except for UnSorted, the rectangles
  416. should be nonintersecting, or the resulting region will be
  417. undefined.  UnSorted means that the rectangles are in arbi-
  418. trary order.  YSorted means that the rectangles are nonde-
  419. creasing in their Y origin.  YXSorted additionally con-
  420. strains YSorted order in that all rectangles with an equal Y
  421. origin are nondecreasing in their X origin.  YXBanded addi-
  422. tionally constrains YXSorted by requiring that, for every
  423. possible Y scanline, all rectangles that include that scan-
  424. line have identical Y origins and Y extents.
  425.  
  426. __
  427. |    ShapeMask
  428.  
  429.      dest: WINDOW
  430.      destKind: SHAPE_KIND
  431.      op: SHAPE_OP
  432.      xOff, yOff: INT16
  433.      source: PIXMAP or None
  434.  
  435.      Errors: Window, Pixmap, Match, Value
  436. |__
  437.  
  438. The source in this request is a 1-bit deep pixmap, or None.
  439. If source is None, the specified client region is removed
  440. from the window, causing the effective region to revert to
  441. the default region.  The ShapeNotify event generated by this
  442. request and subsequent ShapeQueryExtents will report that a
  443. client shape has not been specified.  If a valid pixmap is
  444. specified, it is converted to a region, with bits set to one
  445. included in the region and bits set to zero excluded, and an
  446. offset from the window origin as specified by xOff and yOff.
  447. The resulting region is then combined (as specified by the
  448. operator op) with the existing client region (indicated by
  449. destKind) of the destination window, and the result is
  450. stored as the specified client region of the destination
  451. window.  The source pixmap and destination window must have
  452. been created on the same screen, or else a Match error
  453. results.
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.                   5
  461.  
  462.  
  463.  
  464.  
  465.  
  466.      X11 Nonrectangular Window Shape Extension Protocol
  467.  
  468. __
  469. |    ShapeCombine
  470.  
  471.      dest: WINDOW
  472.      destKind: SHAPE_KIND
  473.      op: SHAPE_OP
  474.      xOff, yOff: INT16
  475.      source: WINDOW
  476.      sourceKind: SHAPE_KIND
  477.  
  478.      Errors: Window, Match, Value
  479. |__
  480.  
  481. The client region, indicated by sourceKind, of the source
  482. window is offset from the window origin by xOff and yOff and
  483. combined with the client region, indicated by destKind, of
  484. the destination window.  The result is stored as the speci-
  485. fied client region of the destination window.  The source
  486. and destination windows must be on the same screen, or else
  487. a Match error results.
  488.  
  489. __
  490. |    ShapeOffset
  491.  
  492.      dest: WINDOW
  493.      destKind: SHAPE_KIND
  494.      xOff, yOff: INT16
  495.  
  496.      Errors: Window, Match, Value
  497. |__
  498.  
  499. The client region, indicated by destKind, is moved relative
  500. to its current position by the amounts xOff and yOff.
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.                   6
  527.  
  528.  
  529.  
  530.  
  531.  
  532.      X11 Nonrectangular Window Shape Extension Protocol
  533.  
  534. __
  535. |    ShapeQueryExtents
  536.  
  537.      dest: WINDOW
  538.  
  539.    =>
  540.  
  541.      boundingShaped: BOOL
  542.      clipShaped: BOOL
  543.      xBoundingShape: INT16
  544.      yBoundingShape: INT16
  545.      widthBoundingShape: CARD16
  546.      heightBoundingShape: CARD16
  547.      xClipShape: INT16
  548.      yClipShape: INT16
  549.      widthClipShape: CARD16
  550.      heightClipShape: CARD16
  551.  
  552.      Errors: Window
  553. |__
  554.  
  555. The boundingShaped and clipShaped results are True if the
  556. corresponding client regions have been specified, else they
  557. are False.  The x, y, width, and height values define the
  558. extents of the client regions, when a client region has not
  559. been specified, the extents of the corresponding default
  560. region are reported.
  561.  
  562. __
  563. |    ShapeSelectInput
  564.  
  565.      window: WINDOW
  566.      enable: BOOL
  567.  
  568.      Errors: Window, Value
  569. |__
  570.  
  571. Specifying enable as True causes the server to send the
  572. requesting client a ShapeNotify event whenever the bounding
  573. or clip region of the specified window is altered by any
  574. client.  Specifying enable as False causes the server to
  575. stop sending such events.
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.                   7
  593.  
  594.  
  595.  
  596.  
  597.  
  598.      X11 Nonrectangular Window Shape Extension Protocol
  599.  
  600. __
  601. |    ShapeInputSelected
  602.  
  603.      window: WINDOW
  604.  
  605.    =>
  606.  
  607.      enable: BOOL
  608.  
  609.      Errors: Window
  610. |__
  611.  
  612. If enable is True, then ShapeNotify events for the window
  613. are generated for this client.
  614.  
  615. __
  616. |    ShapeGetRectangles
  617.  
  618.      window: WINDOW
  619.      kind: SHAPE_KIND
  620.  
  621.    =>
  622.  
  623.      rectangles: LISTofRECTANGLE
  624.      ordering: {UnSorted, YSorted, YXSorted, YXBanded}
  625.  
  626.      Errors: Window, Match
  627. |__
  628.  
  629. A list of rectangles describing the region indicated by
  630. kind, and the ordering of those rectangles, is returned.
  631. The meaning of the ordering values is the same as in the
  632. ShapeRectangles request.
  633.  
  634. 5.  Events
  635.  
  636. __
  637. |    ShapeNotify
  638.  
  639.      window: WINDOW
  640.      kind: SHAPE_KIND
  641.      shaped: BOOL
  642.      x, y: INT16
  643.      width, height: CARD16
  644.      time: TIMESTAMP
  645. |__
  646.  
  647. Whenever the client bounding or clip shape of a window is
  648. modified, a ShapeNotify event is sent to each client that
  649. has used ShapeSelectInput to request it.
  650.  
  651. Kind indicates which client region (bounding or clip) has
  652. been modified; shaped is True when the window has a client
  653. shape of type kind, and is False when the window no longer
  654. has a client shape of this type.  The x, y, width, and
  655.  
  656.  
  657.  
  658.                   8
  659.  
  660.  
  661.  
  662.  
  663.  
  664.      X11 Nonrectangular Window Shape Extension Protocol
  665.  
  666.  
  667. height indicate the extents of the current shape.  When
  668. shaped is False these will indicate the extents of the
  669. default region.  The timestamp indicates the server time
  670. when the shape was changed.
  671.  
  672. 6.  Encoding
  673.  
  674. Please refer to the X11 Protocol Encoding document as this
  675. document uses conventions established there.
  676.  
  677. The name of this extension is ``SHAPE''.
  678.  
  679.  
  680. 6.1.  New Types
  681.  
  682.  
  683. SHAPE_KIND
  684.        0     Bounding
  685.        1     Clip
  686.  
  687.  
  688.  
  689. SHAPE_OP
  690.        0     Set
  691.        1     Union
  692.        2     Intersect
  693.        3     Subtract
  694.        4     Invert
  695.  
  696.  
  697. 6.2.  Requests
  698.  
  699.  
  700. ShapeQueryVersion
  701.   1  CARD8         opcode
  702.   1  0             shape opcode
  703.   2  1             request length
  704.  
  705.  
  706.  =>
  707.   1  1             Reply
  708.   1             unused
  709.   2  CARD16         sequence number
  710.   4  0             length
  711.   2  CARD16         major version
  712.   2  CARD16         minor version
  713.   20             unused
  714.  
  715.  
  716.  
  717. ShapeRectangles
  718.   1  CARD8         opcode
  719.   1  1             shape opcode
  720.   2  4+2n         request length
  721.  
  722.  
  723.  
  724.                   9
  725.  
  726.  
  727.  
  728.  
  729.  
  730.      X11 Nonrectangular Window Shape Extension Protocol
  731.  
  732.  
  733.   1  SHAPE_OP         operation
  734.   1  SHAPE_KIND      destination kind
  735.   1             ordering
  736.      0           UnSorted
  737.      1           YSorted
  738.      2           YXSorted
  739.      3           YXBanded
  740.   1             unused
  741.   4  WINDOW         destination window
  742.   2  INT16         x offset
  743.   2  INT16         y offset
  744.   8n LISTofRECTANGLE     rectangles
  745.  
  746.  
  747.  
  748. ShapeMask
  749.   1  CARD8         opcode
  750.   1  2             shape opcode
  751.   2  5             request length
  752.   1  SHAPE_OP         operation
  753.   1  SHAPE_KIND      destination kind
  754.   2             unused
  755.   4  WINDOW         destination window
  756.   2  INT16         x offset
  757.   2  INT16         y offset
  758.   4  PIXMAP         source bitmap
  759.      0           None
  760.  
  761.  
  762.  
  763. ShapeCombine
  764.   1  CARD8         opcode
  765.   1  3             shape opcode
  766.   2  5             request length
  767.   1  SHAPE_OP         operation
  768.   1  SHAPE_KIND      destination kind
  769.   1  SHAPE_KIND      source kind
  770.   1             unused
  771.   4  WINDOW         destination window
  772.   2  INT16         x offset
  773.   2  INT16         y offset
  774.   4  WINDOW         source window
  775.  
  776.  
  777.  
  778. ShapeOffset
  779.   1  CARD8         opcode
  780.   1  4             shape opcode
  781.   2  4             request length
  782.   1  SHAPE_KIND      destination kind
  783.   3             unused
  784.   4  WINDOW         destination window
  785.   2  INT16         x offset
  786.   2  INT16         y offset
  787.  
  788.  
  789.  
  790.                  10
  791.  
  792.  
  793.  
  794.  
  795.  
  796.      X11 Nonrectangular Window Shape Extension Protocol
  797.  
  798.  
  799. ShapeQueryExtents
  800.   1  CARD8         opcode
  801.   1  5             shape opcode
  802.   2  2             request length
  803.   4  WINDOW         destination window
  804.  
  805.  
  806.  =>
  807.   1  1             Reply
  808.   1             unused
  809.   2  CARD16         sequence number
  810.   4  0             reply length
  811.   1  BOOL         bounding shaped
  812.   1  BOOL         clip shaped
  813.   2             unused
  814.   2  INT16         bounding shape extents x
  815.   2  INT16         bounding shape extents y
  816.   2  CARD16         bounding shape extents width
  817.   2  CARD16         bounding shape extents height
  818.   2  INT16         clip shape extents x
  819.   2  INT16         clip shape extents y
  820.   2  CARD16         clip shape extents width
  821.   2  CARD16         clip shape extents height
  822.   4             unused
  823.  
  824.  
  825.  
  826. ShapeSelectInput
  827.   1  CARD8         opcode
  828.   1  6             shape opcode
  829.   2  3             request length
  830.   4  WINDOW         destination window
  831.   1  BOOL         enable
  832.   3             unused
  833.  
  834.  
  835.  
  836. ShapeInputSelected
  837.   1  CARD8         opcode
  838.   1  6             shape opcode
  839.   2  2             request length
  840.   4  WINDOW         destination window
  841.  
  842.  
  843.  =>
  844.   1  1             Reply
  845.   1  BOOL         enabled
  846.   2  CARD16         sequence number
  847.   4  0             reply length
  848.   24             unused
  849.  
  850.  
  851.  
  852. ShapeGetRectangles
  853.  
  854.  
  855.  
  856.                  11
  857.  
  858.  
  859.  
  860.  
  861.  
  862.      X11 Nonrectangular Window Shape Extension Protocol
  863.  
  864.  
  865.   1  CARD8         opcode
  866.   1  7             shape opcode
  867.   2  3             request length
  868.   4  WINDOW         window
  869.   1  SHAPE_KIND      source kind
  870.   3             unused
  871.  
  872.  
  873.  =>
  874.   1  1             Reply
  875.   1             ordering
  876.      0           UnSorted
  877.      1           YSorted
  878.      2           YXSorted
  879.      3           YXBanded
  880.   2  CARD16         sequence number
  881.   4  2n          reply length
  882.   4  CARD32         nrects
  883.   20             unused
  884.   8n LISTofRECTANGLE     rectangles
  885.  
  886.  
  887. 6.3.  Events
  888.  
  889.  
  890.  
  891. ShapeNotify
  892.   1  CARD8         type (0 + extension event base)
  893.   1  SHAPE_KIND      shape kind
  894.   2  CARD16         sequence number
  895.   4  WINDOW         affected window
  896.   2  INT16         x value of extents
  897.   2  INT16         y value of extents
  898.   2  CARD16         width of extents
  899.   2  CARD16         height of extents
  900.   4  TIMESTAMP         server time
  901.   1  BOOL         shaped
  902.   11             unused
  903.  
  904.  
  905. 7.  Glossary
  906.  
  907. bounding region
  908.  
  909.      The area of the parent window that this window will
  910.      occupy.  This area is divided into two parts:  the bor-
  911.      der and the interior.
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.                  12
  923.  
  924.  
  925.  
  926.  
  927.  
  928.      X11 Nonrectangular Window Shape Extension Protocol
  929.  
  930.  
  931. clip region
  932.  
  933.      The interior of the window, as a subset of the bounding
  934.      region.  This region describes the area that will be
  935.      painted with the window background when the window is
  936.      cleared, will contain all graphics output to the win-
  937.      dow, and will clip any subwindows.
  938.  
  939. default bounding region
  940.  
  941.      The rectangular area, as described by the core protocol
  942.      window size, that covers the interior of the window and
  943.      its border.
  944.  
  945. default clip region
  946.  
  947.      The rectangular area, as described by the core protocol
  948.      window size, that covers the interior of the window and
  949.      excludes the border.
  950.  
  951. client bounding region
  952.  
  953.      The region associated with a window that is directly
  954.      modified via this extension when specified by
  955.      ShapeBounding.  This region is used in conjunction with
  956.      the default bounding region to produce the effective
  957.      bounding region.
  958.  
  959. client clip region
  960.  
  961.      The region associated with a window that is directly
  962.      modified via this extension when specified by
  963.      ShapeClip.  This region is used in conjunction with the
  964.      default clip region and the client bounding region to
  965.      produce the effective clip region.
  966.  
  967. effective bounding region
  968.  
  969.      The actual shape of the window on the screen, including
  970.      border and interior (but excluding the effects of over-
  971.      lapping windows).    When a window has a client bounding
  972.      region, the effective bounding region is the intersec-
  973.      tion of the default bounding region and the client
  974.      bounding region.  Otherwise, the effective bounding
  975.      region is the same as the default bounding region.
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.                  13
  989.  
  990.  
  991.  
  992.  
  993.  
  994.      X11 Nonrectangular Window Shape Extension Protocol
  995.  
  996.  
  997. effective clip region
  998.  
  999.      The actual shape of the interior of the window on the
  1000.      screen (excluding the effects of overlapping windows).
  1001.      When a window has a client clip region or a client
  1002.      bounding region, the effective clip region is the
  1003.      intersection of the default clip region, the client
  1004.      clip region (if any) and the client bounding region (if
  1005.      any).  Otherwise, the effective clip region is the same
  1006.      as the default clip region.
  1007.  
  1008.  
  1009.  
  1010.  
  1011.  
  1012.  
  1013.  
  1014.  
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020.  
  1021.  
  1022.  
  1023.  
  1024.  
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.                  14
  1055.  
  1056.  
  1057.