00001 #ifndef __GDK_DND_H__
00002 #define __GDK_DND_H__
00003
00004 #include <gdk/gdktypes.h>
00005
00006 #ifdef __cplusplus
00007 extern "C" {
00008 #endif
00009
00010 typedef struct _GdkDragContext GdkDragContext;
00011
00012 typedef enum {
00013 GDK_ACTION_DEFAULT = 1 << 0,
00014 GDK_ACTION_COPY = 1 << 1,
00015 GDK_ACTION_MOVE = 1 << 2,
00016 GDK_ACTION_LINK = 1 << 3,
00017 GDK_ACTION_PRIVATE = 1 << 4,
00018 GDK_ACTION_ASK = 1 << 5
00019 } GdkDragAction;
00020
00021 typedef enum {
00022 GDK_DRAG_PROTO_MOTIF,
00023 GDK_DRAG_PROTO_XDND,
00024 GDK_DRAG_PROTO_ROOTWIN,
00025
00026 GDK_DRAG_PROTO_NONE,
00027 GDK_DRAG_PROTO_WIN32_DROPFILES,
00028 GDK_DRAG_PROTO_OLE2,
00029 } GdkDragProtocol;
00030
00031
00032
00033
00034 struct _GdkDragContext {
00035 GdkDragProtocol protocol;
00036
00037 gboolean is_source;
00038
00039 GdkWindow *source_window;
00040 GdkWindow *dest_window;
00041
00042 GList *targets;
00043 GdkDragAction actions;
00044 GdkDragAction suggested_action;
00045 GdkDragAction action;
00046
00047 guint32 start_time;
00048 };
00049
00050
00051
00052 GdkDragContext *gdk_drag_context_new(void);
00053 void gdk_drag_context_ref(GdkDragContext * context);
00054 void gdk_drag_context_unref(GdkDragContext * context);
00055
00056
00057
00058 void gdk_drag_status(GdkDragContext * context,
00059 GdkDragAction action, guint32 time);
00060 void gdk_drop_reply(GdkDragContext * context,
00061 gboolean ok, guint32 time);
00062 void gdk_drop_finish(GdkDragContext * context,
00063 gboolean success, guint32 time);
00064 GdkAtom gdk_drag_get_selection(GdkDragContext * context);
00065
00066
00067
00068 GdkDragContext *gdk_drag_begin(GdkWindow * window, GList * targets);
00069 guint32 gdk_drag_get_protocol(guint32 xid, GdkDragProtocol * protocol);
00070 void gdk_drag_find_window(GdkDragContext * context,
00071 GdkWindow * drag_window,
00072 gint x_root,
00073 gint y_root,
00074 GdkWindow ** dest_window,
00075 GdkDragProtocol * protocol);
00076 gboolean gdk_drag_motion(GdkDragContext * context,
00077 GdkWindow * dest_window,
00078 GdkDragProtocol protocol,
00079 gint x_root,
00080 gint y_root,
00081 GdkDragAction suggested_action,
00082 GdkDragAction possible_actions, guint32 time);
00083 void gdk_drag_drop(GdkDragContext * context, guint32 time);
00084 void gdk_drag_abort(GdkDragContext * context, guint32 time);
00085
00086 #ifdef __cplusplus
00087 }
00088 #endif
00089 #endif