74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/* $XFree86: xc/include/extensions/shape.h,v 1.3 2001/12/14 19:53:29 dawes Exp $ */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/************************************************************
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncCopyright 1989, 1998 The Open Group
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncPermission to use, copy, modify, distribute, and sell this software and its
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncdocumentation for any purpose is hereby granted without fee, provided that
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncthe above copyright notice appear in all copies and that both that
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynccopyright notice and this permission notice appear in supporting
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncdocumentation.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncThe above copyright notice and this permission notice shall be included in
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncall copies or substantial portions of the Software.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncExcept as contained in this notice, the name of The Open Group shall not be
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncused in advertising or otherwise to promote the sale, use or other dealings
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncin this Software without prior written authorization from The Open Group.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync********************************************************/
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync/* $Xorg: shape.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#ifndef _SHAPE_H_
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define _SHAPE_H_
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#include <X11/Xfuncproto.h>
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define X_ShapeQueryVersion 0
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define X_ShapeRectangles 1
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define X_ShapeMask 2
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define X_ShapeCombine 3
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define X_ShapeOffset 4
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define X_ShapeQueryExtents 5
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define X_ShapeSelectInput 6
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define X_ShapeInputSelected 7
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define X_ShapeGetRectangles 8
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define ShapeSet 0
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define ShapeUnion 1
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define ShapeIntersect 2
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define ShapeSubtract 3
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define ShapeInvert 4
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define ShapeBounding 0
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define ShapeClip 1
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define ShapeNotifyMask (1L << 0)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define ShapeNotify 0
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#define ShapeNumberEvents (ShapeNotify + 1)
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#ifndef _SHAPE_SERVER_
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#include <X11/Xutil.h>
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsynctypedef struct {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int type; /* of event */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned long serial; /* # of last request processed by server */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Bool send_event; /* true if this came frome a SendEvent request */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display *display; /* Display the event was read from */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window window; /* window of event */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int kind; /* ShapeBounding or ShapeClip */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int x, y; /* extents of new region */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned width, height;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Time time; /* server timestamp when region changed */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Bool shaped; /* true if the region exists */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync} XShapeEvent;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync_XFUNCPROTOBEGIN
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern Bool XShapeQueryExtension (
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int* /* event_base */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int* /* error_base */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern Status XShapeQueryVersion (
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int* /* major_version */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int* /* minor_version */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern void XShapeCombineRegion (
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window /* dest */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* dest_kind */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* x_off */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* y_off */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Region /* region */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* op */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern void XShapeCombineRectangles (
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window /* dest */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* dest_kind */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* x_off */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* y_off */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync XRectangle* /* rectangles */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* n_rects */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* op */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* ordering */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern void XShapeCombineMask (
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window /* dest */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* dest_kind */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* x_off */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* y_off */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Pixmap /* src */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* op */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern void XShapeCombineShape (
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window /* dest */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* dest_kind */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* x_off */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* y_off */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window /* src */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* src_kind */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* op */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern void XShapeOffsetShape (
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window /* dest */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* dest_kind */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* x_off */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* y_off */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern Status XShapeQueryExtents (
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window /* window */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Bool* /* bounding_shaped */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int* /* x_bounding */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int* /* y_bounding */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned int* /* w_bounding */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned int* /* h_bounding */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Bool* /* clip_shaped */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int* /* x_clip */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int* /* y_clip */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned int* /* w_clip */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned int* /* h_clip */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern void XShapeSelectInput (
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window /* window */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync unsigned long /* mask */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern unsigned long XShapeInputSelected (
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window /* window */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsyncextern XRectangle *XShapeGetRectangles (
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#if NeedFunctionPrototypes
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Display* /* display */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync Window /* window */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int /* kind */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int* /* count */,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync int* /* ordering */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync);
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync_XFUNCPROTOEND
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif /* _SHAPE_SERVER_ */
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync#endif /* _SHAPE_H_ */