File: FShape.h

package info (click to toggle)
fvwm 1%3A2.6.8-1
  • links: PTS
  • area: main
  • in suites: bullseye, buster
  • size: 15,804 kB
  • sloc: ansic: 145,770; xml: 17,093; perl: 7,302; sh: 4,921; makefile: 1,094; yacc: 688; lex: 187; sed: 11
file content (129 lines) | stat: -rw-r--r-- 5,483 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
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
/* -*-c-*- */

/*
** FShape.h: drop in replacements for the X shape library encapsulation
*/
#ifndef FVWMLIB_FSHAPE_H
#define FVWMLIB_FSHAPE_H

#ifdef SHAPE
#include <X11/extensions/shape.h>
#define FShapeQueryExtension(dpy, evbase, errbase) \
	XShapeQueryExtension(dpy, evbase, errbase)
#define FShapeQueryVersion(dpy, vmajor, vminor) \
	XShapeQueryVersion(dpy, vmajor, vminor)
#define FShapeCombineRegion(dpy, dst, dst_kind, xoff, yoff, reg, op) \
	XShapeCombineRegion(dpy, dst, dst_kind, xoff, yoff, reg, op)
#define FShapeCombineRectangles( \
	dpy, dst, dst_kind, xoff, yoff, rect, n_rects, op, ordering) \
	XShapeCombineRectangles( \
		dpy, dst, dst_kind, xoff, yoff, rect, n_rects, op, ordering)
#define FShapeCombineMask(dpy, dst, dst_kind, xoff, yoff, src, op) \
	XShapeCombineMask(dpy, dst, dst_kind, xoff, yoff, src, op)
#define FShapeCombineShape(dpy, dst, dst_kind, xoff, yoff, src, src_kind, op) \
	XShapeCombineShape(dpy, dst, dst_kind, xoff, yoff, src, src_kind, op)
#define FShapeOffsetShape(dpy, dst, dst_kind, xoff, yoff) \
	XShapeOffsetShape(dpy, dst, dst_kind, xoff, yoff)
#define FShapeQueryExtents( \
	dpy, w, bounding_shaped, xb, yb, wb, hb, clip_shaped, \
	xclip, yclip, wclip, hclip) \
	XShapeQueryExtents( \
		dpy, w, bounding_shaped, xb, yb, wb, hb, clip_shaped, \
		xclip, yclip, wclip, hclip)
#define FShapeSelectInput(dpy, w, mask) \
	XShapeSelectInput(dpy, w, mask)
#define FShapeInputSelected(dpy, w) \
	XShapeInputSelected(dpy, w)
#define FShapeGetRectangles(dpy, w, kind, count, ordering) \
	XShapeGetRectangles(dpy, w, kind, count, ordering)

extern int FShapeEventBase;
extern int FShapeErrorBase;
/* Shapes compiled in? */
extern Bool FShapesSupported;
/* Shapes supported by server? */
#define FHaveShapeExtension 1
void FShapeInit(Display *dpy);

#else
/* drop in replacements if shape support is not compiled in */
#define X_ShapeQueryVersion             0
#define X_ShapeRectangles               1
#define X_ShapeMask                     2
#define X_ShapeCombine                  3
#define X_ShapeOffset                   4
#define X_ShapeQueryExtents             5
#define X_ShapeSelectInput              6
#define X_ShapeInputSelected            7
#define X_ShapeGetRectangles            8
#define ShapeSet                        0
#define ShapeUnion                      1
#define ShapeIntersect                  2
#define ShapeSubtract                   3
#define ShapeInvert                     4
#define ShapeBounding                   0
#define ShapeClip                       1
#define ShapeNotifyMask                 (1L << 0)
#define ShapeNotify                     0
#define ShapeNumberEvents               (FShapeNotify + 1)
typedef struct
{
	int   type;               /* of event */
	unsigned long serial;   /* # of last request processed by server */
	Bool send_event;          /* true if this came frome a SendEvent request */
	Display *display;         /* Display the event was read from */
	Window window;            /* window of event */
	int kind;                 /* ShapeBounding or ShapeClip */
	int x, y;                 /* extents of new region */
	unsigned width, height;
	Time time;                /* server timestamp when region changed */
	Bool shaped;      /* true if the region exists */
} XShapeEvent;
#define FShapeQueryExtension(dpy, evbase, errbase) ((Bool)False)
#define FShapeQueryVersion(dpy, vmajor, vminor) ((Status)0)
#define FShapeCombineRegion(dpy, dst, dst_kind, xoff, yoff, reg, op)
#define FShapeCombineRectangles( \
		dpy, dst, dst_kind, xoff, yoff, rect, n_rects, op, ordering)
#define FShapeCombineMask(dpy, dst, dst_kind, xoff, yoff, src, op)
#define FShapeCombineShape(dpy, dst, dst_kind, xoff, yoff, src, src_kind, op)
#define FShapeOffsetShape(dpy, dst, dst_kind, xoff, yoff)
#define FShapeQueryExtents( \
		dpy, w, bounding_shaped, xb, yb, wb, hb, clip_shaped, \
		xclip, yclip, wclip, hclip) ((Status)0)
#define FShapeSelectInput(dpy, w, mask)
#define FShapeInputSelected(dpy, w) ((unsinged long)0)
#define FShapeGetRectangles(dpy, w, kind, count, ordering) ((XRectangle *)0)
/* define empty dummies */
#define FShapeEventBase          0
#define FShapeErrorBase          0
/* Shapes supported by server? */
#define FShapesSupported         0
/* Shapes compiled in? */
#define FHaveShapeExtension      0
#define FShapeInit(dpy)
#endif

/* fvwm replacements for shape lib */
#define F_ShapeQueryVersion             X_ShapeQueryVersion
#define F_ShapeRectangles               X_ShapeRectangles
#define F_ShapeMask                     X_ShapeMask
#define F_ShapeCombine                  X_ShapeCombine
#define F_ShapeOffset                   X_ShapeOffset
#define F_ShapeQueryExtents             X_ShapeQueryExtents
#define F_ShapeSelectInput              X_ShapeSelectInput
#define F_ShapeInputSelected            X_ShapeInputSelected
#define F_ShapeGetRectangles            X_ShapeGetRectangles
#define FShapeSet                       ShapeSet
#define FShapeUnion                     ShapeUnion
#define FShapeIntersect                 ShapeIntersect
#define FShapeSubtract                  ShapeSubtract
#define FShapeInvert                    ShapeInvert
#define FShapeBounding                  ShapeBounding
#define FShapeClip                      ShapeClip
#define FShapeNotifyMask                ShapeNotifyMask
#define FShapeNotify                    ShapeNotify
#define FShapeNumberEvents              ShapeNumberEvents
typedef XShapeEvent FShapeEvent;


#endif /* FVWMLIB_FSHAPE_H */