Add removing window decorations to FAQ.
[fvwm.git] / libs / FShape.h
blobb04ea06b2bcc57cd8d85ebc4f0ba29c9b0940c75
1 /* -*-c-*- */
3 /*
4 ** FShape.h: drop in replacements for the X shape library encapsulation
5 */
6 #ifndef FVWMLIB_FSHAPE_H
7 #define FVWMLIB_FSHAPE_H
9 #ifdef SHAPE
10 #include <X11/extensions/shape.h>
11 #define FShapeQueryExtension(dpy, evbase, errbase) \
12 XShapeQueryExtension(dpy, evbase, errbase)
13 #define FShapeQueryVersion(dpy, vmajor, vminor) \
14 XShapeQueryVersion(dpy, vmajor, vminor)
15 #define FShapeCombineRegion(dpy, dst, dst_kind, xoff, yoff, reg, op) \
16 XShapeCombineRegion(dpy, dst, dst_kind, xoff, yoff, reg, op)
17 #define FShapeCombineRectangles( \
18 dpy, dst, dst_kind, xoff, yoff, rect, n_rects, op, ordering) \
19 XShapeCombineRectangles( \
20 dpy, dst, dst_kind, xoff, yoff, rect, n_rects, op, ordering)
21 #define FShapeCombineMask(dpy, dst, dst_kind, xoff, yoff, src, op) \
22 XShapeCombineMask(dpy, dst, dst_kind, xoff, yoff, src, op)
23 #define FShapeCombineShape(dpy, dst, dst_kind, xoff, yoff, src, src_kind, op) \
24 XShapeCombineShape(dpy, dst, dst_kind, xoff, yoff, src, src_kind, op)
25 #define FShapeOffsetShape(dpy, dst, dst_kind, xoff, yoff) \
26 XShapeOffsetShape(dpy, dst, dst_kind, xoff, yoff)
27 #define FShapeQueryExtents( \
28 dpy, w, bounding_shaped, xb, yb, wb, hb, clip_shaped, \
29 xclip, yclip, wclip, hclip) \
30 XShapeQueryExtents( \
31 dpy, w, bounding_shaped, xb, yb, wb, hb, clip_shaped, \
32 xclip, yclip, wclip, hclip)
33 #define FShapeSelectInput(dpy, w, mask) \
34 XShapeSelectInput(dpy, w, mask)
35 #define FShapeInputSelected(dpy, w) \
36 XShapeInputSelected(dpy, w)
37 #define FShapeGetRectangles(dpy, w, kind, count, ordering) \
38 XShapeGetRectangles(dpy, w, kind, count, ordering)
40 extern int FShapeEventBase;
41 extern int FShapeErrorBase;
42 /* Shapes compiled in? */
43 extern Bool FShapesSupported;
44 /* Shapes supported by server? */
45 #define FHaveShapeExtension 1
46 void FShapeInit(Display *dpy);
48 #else
49 /* drop in replacements if shape support is not compiled in */
50 #define X_ShapeQueryVersion 0
51 #define X_ShapeRectangles 1
52 #define X_ShapeMask 2
53 #define X_ShapeCombine 3
54 #define X_ShapeOffset 4
55 #define X_ShapeQueryExtents 5
56 #define X_ShapeSelectInput 6
57 #define X_ShapeInputSelected 7
58 #define X_ShapeGetRectangles 8
59 #define ShapeSet 0
60 #define ShapeUnion 1
61 #define ShapeIntersect 2
62 #define ShapeSubtract 3
63 #define ShapeInvert 4
64 #define ShapeBounding 0
65 #define ShapeClip 1
66 #define ShapeNotifyMask (1L << 0)
67 #define ShapeNotify 0
68 #define ShapeNumberEvents (FShapeNotify + 1)
69 typedef struct
71 int type; /* of event */
72 unsigned long serial; /* # of last request processed by server */
73 Bool send_event; /* true if this came frome a SendEvent request */
74 Display *display; /* Display the event was read from */
75 Window window; /* window of event */
76 int kind; /* ShapeBounding or ShapeClip */
77 int x, y; /* extents of new region */
78 unsigned width, height;
79 Time time; /* server timestamp when region changed */
80 Bool shaped; /* true if the region exists */
81 } XShapeEvent;
82 #define FShapeQueryExtension(dpy, evbase, errbase) ((Bool)False)
83 #define FShapeQueryVersion(dpy, vmajor, vminor) ((Status)0)
84 #define FShapeCombineRegion(dpy, dst, dst_kind, xoff, yoff, reg, op)
85 #define FShapeCombineRectangles( \
86 dpy, dst, dst_kind, xoff, yoff, rect, n_rects, op, ordering)
87 #define FShapeCombineMask(dpy, dst, dst_kind, xoff, yoff, src, op)
88 #define FShapeCombineShape(dpy, dst, dst_kind, xoff, yoff, src, src_kind, op)
89 #define FShapeOffsetShape(dpy, dst, dst_kind, xoff, yoff)
90 #define FShapeQueryExtents( \
91 dpy, w, bounding_shaped, xb, yb, wb, hb, clip_shaped, \
92 xclip, yclip, wclip, hclip) ((Status)0)
93 #define FShapeSelectInput(dpy, w, mask)
94 #define FShapeInputSelected(dpy, w) ((unsinged long)0)
95 #define FShapeGetRectangles(dpy, w, kind, count, ordering) ((XRectangle *)0)
96 /* define empty dummies */
97 #define FShapeEventBase 0
98 #define FShapeErrorBase 0
99 /* Shapes supported by server? */
100 #define FShapesSupported 0
101 /* Shapes compiled in? */
102 #define FHaveShapeExtension 0
103 #define FShapeInit(dpy)
104 #endif
106 /* fvwm replacements for shape lib */
107 #define F_ShapeQueryVersion X_ShapeQueryVersion
108 #define F_ShapeRectangles X_ShapeRectangles
109 #define F_ShapeMask X_ShapeMask
110 #define F_ShapeCombine X_ShapeCombine
111 #define F_ShapeOffset X_ShapeOffset
112 #define F_ShapeQueryExtents X_ShapeQueryExtents
113 #define F_ShapeSelectInput X_ShapeSelectInput
114 #define F_ShapeInputSelected X_ShapeInputSelected
115 #define F_ShapeGetRectangles X_ShapeGetRectangles
116 #define FShapeSet ShapeSet
117 #define FShapeUnion ShapeUnion
118 #define FShapeIntersect ShapeIntersect
119 #define FShapeSubtract ShapeSubtract
120 #define FShapeInvert ShapeInvert
121 #define FShapeBounding ShapeBounding
122 #define FShapeClip ShapeClip
123 #define FShapeNotifyMask ShapeNotifyMask
124 #define FShapeNotify ShapeNotify
125 #define FShapeNumberEvents ShapeNumberEvents
126 typedef XShapeEvent FShapeEvent;
129 #endif /* FVWMLIB_FSHAPE_H */