WPrefs: add warning when renderTexture encounters some unknow settings
[wmaker-crm.git] / src / xdnd.h
blob1ee0e43bea5dc556d9f6a80d9a9ee1d56741782c
1 #ifndef _XDND_H_
2 #define _XDND_H_
4 void wXDNDInitializeAtoms();
5 Bool wXDNDProcessSelection(XEvent *event);
6 Bool wXDNDProcessClientMessage(XClientMessageEvent *event);
7 void wXDNDMakeAwareness(Window window);
9 /* header was ripped from xdnd's example on its page */
11 #define XDND_THREE 3
12 #define XDND_ENTER_SOURCE_WIN(e) ((e)->xclient.data.l[0])
13 #define XDND_ENTER_THREE_TYPES(e) (((e)->xclient.data.l[1] & 0x1UL) == 0)
14 #define XDND_ENTER_THREE_TYPES_SET(e,b) (e)->xclient.data.l[1] = ((e)->xclient.data.l[1] & ~0x1UL) | (((b) == 0) ? 0 : 0x1UL)
15 #define XDND_ENTER_VERSION(e) ((e)->xclient.data.l[1] >> 24)
16 #define XDND_ENTER_VERSION_SET(e,v) (e)->xclient.data.l[1] = ((e)->xclient.data.l[1] & ~(0xFF << 24)) | ((v) << 24)
17 #define XDND_ENTER_TYPE(e,i) ((e)->xclient.data.l[2 + i]) /* i => (0, 1, 2) */
19 /* XdndPosition */
20 #define XDND_POSITION_SOURCE_WIN(e) ((e)->xclient.data.l[0])
21 #define XDND_POSITION_ROOT_X(e) ((e)->xclient.data.l[2] >> 16)
22 #define XDND_POSITION_ROOT_Y(e) ((e)->xclient.data.l[2] & 0xFFFFUL)
23 #define XDND_POSITION_ROOT_SET(e,x,y) (e)->xclient.data.l[2] = ((x) << 16) | ((y) & 0xFFFFUL)
24 #define XDND_POSITION_TIME(e) ((e)->xclient.data.l[3])
25 #define XDND_POSITION_ACTION(e) ((e)->xclient.data.l[4])
27 /* XdndStatus */
28 #define XDND_STATUS_TARGET_WIN(e) ((e)->xclient.data.l[0])
29 #define XDND_STATUS_WILL_ACCEPT(e) ((e)->xclient.data.l[1] & 0x1L)
30 #define XDND_STATUS_WILL_ACCEPT_SET(e,b) (e)->xclient.data.l[1] = ((e)->xclient.data.l[1] & ~0x1UL) | (((b) == 0) ? 0 : 0x1UL)
31 #define XDND_STATUS_WANT_POSITION(e) ((e)->xclient.data.l[1] & 0x2UL)
32 #define XDND_STATUS_WANT_POSITION_SET(e,b) (e)->xclient.data.l[1] = ((e)->xclient.data.l[1] & ~0x2UL) | (((b) == 0) ? 0 : 0x2UL)
33 #define XDND_STATUS_RECT_X(e) ((e)->xclient.data.l[2] >> 16)
34 #define XDND_STATUS_RECT_Y(e) ((e)->xclient.data.l[2] & 0xFFFFL)
35 #define XDND_STATUS_RECT_WIDTH(e) ((e)->xclient.data.l[3] >> 16)
36 #define XDND_STATUS_RECT_HEIGHT(e) ((e)->xclient.data.l[3] & 0xFFFFL)
37 #define XDND_STATUS_RECT_SET(e,x,y,w,h) {(e)->xclient.data.l[2] = ((x) << 16) | ((y) & 0xFFFFUL); (e)->xclient.data.l[3] = ((w) << 16) | ((h) & 0xFFFFUL); }
38 #define XDND_STATUS_ACTION(e) ((e)->xclient.data.l[4])
40 /* XdndLeave */
41 #define XDND_LEAVE_SOURCE_WIN(e) ((e)->xclient.data.l[0])
43 /* XdndDrop */
44 #define XDND_DROP_SOURCE_WIN(e) ((e)->xclient.data.l[0])
45 #define XDND_DROP_TIME(e) ((e)->xclient.data.l[2])
47 /* XdndFinished */
48 #define XDND_FINISHED_TARGET_WIN(e) ((e)->xclient.data.l[0])
50 #endif