Copy purify.fvwm2rc to /tmp - add instructions in README.
[fvwm.git] / modules / FvwmDragWell / dragSource.h
blob882e3fc7dd6ed2544df1dcfa1bed43d491a02084
1 /* -*-c-*- */
2 #ifndef _DRAG_SOURCE_H
3 #define _DRAG_SOURCE_H
5 #include <X11/Xlib.h>
6 #include <X11/X.h>
7 #include "cursorStuff.h"
8 #include "commonStuff.h"
13 typedef struct DragSource_Struct {
14 FILE *mfsErr;
15 Display *display;
16 Window rootWindow; /*root window of screen*/
17 Window dropTargWin; /*the drop target window*/
18 Window dragSrcWin; /*the drag source window*/
19 int version;
20 XdndAtoms *atomSel; /*Atoms used for xdnd*/
21 float dragHalo; /*# of pixels the mouse has to move before a drag starts*/
22 XdndCursor *cursors;
23 unsigned int state; /*holds state of the drag*/
24 unsigned short cachexRoot, cacheyRoot;
25 unsigned short rx,ry,w,h; /*position of window in root*/
26 Atom dropTargProperty; /*holds the drop target property*/
27 } DragSource;
29 #define XDND_MIN(a,b) ((a<b) ? a :b)
31 /* These are the defines for the <state> bit of DragSource. When saving state,
32 the usual choice is between using many shorts and bit twiddling. Using
33 shorts is faster than bit twiddling, but uses more space. Since I can
34 envision many widgets each being DNDable(icons on desktop), we'll go with
35 twiddling. The format for the defines is groups of three, where the first
36 define is the bit position, and the second and third define what a 0 or 1
37 in that position means.
40 #define XDND_IN_AWAREWIN 0x0UL /*pointer in win. that is XdndAware*/
41 #define XDND_NOTAWARE 0x0UL
42 #define XDND_AWARE 0x1UL
44 #define XDND_WAIT_4_STATUS 0x1UL /*sent position, waiting for status event*/
45 #define XDND_NOTWAITING 0x0UL
46 #define XDND_WAITING 0x1UL
48 #define XDND_POS_CACHE 0x2UL /*cacheing the position*/
49 #define XDND_NOT_CACHED 0x0UL
50 #define XDND_CACHED 0x1UL
52 #define XDND_SEND_POS 0x3UL /*use a rectangle to determine when to send */
53 #define XDND_RECTSEND 0x0UL /*motion events to the drop target*/
54 #define XDND_ALWAYS_SEND 0x1UL
56 #define XDND_STATUS_RECVD_CNT 0x4UL /*keeps track of the number of status*/
57 #define XDND_GOT_ZERO 0X0UL /*messages received*/
58 #define XDND_GOTONE_OR_MORE 0x1UL
60 #define XDND_DROPPABLE 0x5UL /*can we drop over the current widget?*/
61 #define XDND_CANT_DROP 0X0UL
62 #define XDND_CAN_DROP 0x1UL
64 #define XDND_BUTRELEASE_CACHE 0x6UL /*cache a button release event*/
65 #define XDND_BUT_NOTCACHED 0x0UL
66 #define XDND_BUTCACHED 0x1UL
68 #endif