Dnd.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef _DnD_h
00015 #define _DnD_h
00016
00017
00018
00019
00020 #include <X11/Xlib.h>
00021 #include <X11/Xatom.h>
00022
00023 #define DndVersion 1
00024 #define DndRevision 0
00025 #define DndIncludeVersion (DndVersion * 10 + DndRevision)
00026
00027
00028
00029
00030 #define DND_DRAG_NONE 0
00031 #define DND_DRAG_DROP_ONLY 1
00032 #define DND_DRAG_DYNAMIC 5
00033
00034
00035 #define DND_TOP_LEVEL_ENTER 0
00036 #define DND_TOP_LEVEL_LEAVE 1
00037 #define DND_DRAG_MOTION 2
00038 #define DND_DROP_SITE_ENTER 3
00039 #define DND_DROP_SITE_LEAVE 4
00040 #define DND_DROP_START 5
00041 #define DND_OPERATION_CHANGED 8
00042
00043
00044 #define DND_NOOP 0L
00045 #define DND_MOVE (1L << 0)
00046 #define DND_COPY (1L << 1)
00047 #define DND_LINK (1L << 2)
00048
00049
00050 #define DND_NO_DROP_SITE 1
00051 #define DND_INVALID_DROP_SITE 2
00052 #define DND_VALID_DROP_SITE 3
00053
00054
00055 #define DND_DROP 0
00056 #define DND_DROP_HELP 1
00057 #define DND_DROP_CANCEL 2
00058
00059
00060
00061 typedef struct {
00062 unsigned char reason;
00063 Time time ;
00064 unsigned char operation;
00065 unsigned char operations;
00066 unsigned char status;
00067 unsigned char completion;
00068 short x ;
00069 short y ;
00070 Window src_window ;
00071 Atom property ;
00072 } DndData ;
00073
00074
00075
00076
00077
00078 extern void
00079 DndWriteSourceProperty(Display * dpy,
00080 Window window, Atom dnd_selection,
00081 Atom * targets, unsigned short num_targets);
00082
00083 extern void
00084 DndReadSourceProperty(Display * dpy,
00085 Window window, Atom dnd_selection,
00086 Atom ** targets, unsigned short * num_targets);
00087
00088 extern void
00089 DndWriteReceiverProperty(Display * dpy, Window window,
00090 unsigned char protocol_style);
00091
00092 extern void
00093 DndReadReceiverProperty(Display * dpy, Window window,
00094 unsigned char * protocol_style);
00095
00096 extern void
00097 DndFillClientMessage(Display * dpy, Window window,
00098 XClientMessageEvent *cm,
00099 DndData * dnd_data,
00100 char receiver);
00101
00102 extern Bool
00103 DndParseClientMessage(XClientMessageEvent *cm,
00104 DndData * dnd_data,
00105 char * receiver);
00106
00107 #endif