4 #include <gdk/gdktypes.h>
8 #endif /* __cplusplus */
10 typedef struct _GdkDragContext GdkDragContext;
14 GDK_ACTION_DEFAULT = 1 << 0,
15 GDK_ACTION_COPY = 1 << 1,
16 GDK_ACTION_MOVE = 1 << 2,
17 GDK_ACTION_LINK = 1 << 3,
18 GDK_ACTION_PRIVATE = 1 << 4,
19 GDK_ACTION_ASK = 1 << 5
26 GDK_DRAG_PROTO_ROOTWIN, /* A root window with nobody claiming
28 GDK_DRAG_PROTO_NONE, /* Not a valid drag window */
29 GDK_DRAG_PROTO_WIN32_DROPFILES, /* The simple WM_DROPFILES dnd */
30 GDK_DRAG_PROTO_OLE2, /* The complex OLE2 dnd (not implemented) */
31 GDK_DRAG_PROTO_LOCAL /* Intra-app */
34 /* Object that holds information about a drag in progress.
35 * this is used on both source and destination sides.
38 typedef struct _GdkDragContextClass GdkDragContextClass;
40 #define GDK_TYPE_DRAG_CONTEXT (gdk_drag_context_get_type ())
41 #define GDK_DRAG_CONTEXT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_DRAG_CONTEXT, GdkDragContext))
42 #define GDK_DRAG_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_DRAG_CONTEXT, GdkDragContextClass))
43 #define GDK_IS_DRAG_CONTEXT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_DRAG_CONTEXT))
44 #define GDK_IS_DRAG_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_DRAG_CONTEXT))
45 #define GDK_DRAG_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_DRAG_CONTEXT, GdkDragContextClass))
47 struct _GdkDragContext {
48 GObject parent_instance;
52 GdkDragProtocol protocol;
56 GdkWindow *source_window;
57 GdkWindow *dest_window;
60 GdkDragAction actions;
61 GdkDragAction suggested_action;
68 gpointer windowing_data;
71 struct _GdkDragContextClass {
72 GObjectClass parent_class;
79 GType gdk_drag_context_get_type (void) G_GNUC_CONST;
80 GdkDragContext * gdk_drag_context_new (void);
82 #ifndef GDK_DISABLE_DEPRECATED
83 void gdk_drag_context_ref (GdkDragContext *context);
84 void gdk_drag_context_unref (GdkDragContext *context);
87 /* Destination side */
89 void gdk_drag_status (GdkDragContext *context,
92 void gdk_drop_reply (GdkDragContext *context,
95 void gdk_drop_finish (GdkDragContext *context,
98 GdkAtom gdk_drag_get_selection (GdkDragContext *context);
102 GdkDragContext * gdk_drag_begin (GdkWindow *window,
105 guint32 gdk_drag_get_protocol_for_display (GdkDisplay *display,
107 GdkDragProtocol *protocol);
108 void gdk_drag_find_window_for_screen (GdkDragContext *context,
109 GdkWindow *drag_window,
113 GdkWindow **dest_window,
114 GdkDragProtocol *protocol);
116 #ifndef GDK_MULTIHEAD_SAFE
117 guint32 gdk_drag_get_protocol (guint32 xid,
118 GdkDragProtocol *protocol);
119 void gdk_drag_find_window (GdkDragContext *context,
120 GdkWindow *drag_window,
123 GdkWindow **dest_window,
124 GdkDragProtocol *protocol);
125 #endif /* GDK_MULTIHEAD_SAFE */
127 gboolean gdk_drag_motion (GdkDragContext *context,
128 GdkWindow *dest_window,
129 GdkDragProtocol protocol,
132 GdkDragAction suggested_action,
133 GdkDragAction possible_actions,
135 void gdk_drag_drop (GdkDragContext *context,
137 void gdk_drag_abort (GdkDragContext *context,
139 gboolean gdk_drag_drop_succeeded (GdkDragContext *context);
143 #endif /* __cplusplus */
145 #endif /* __GDK_DND_H__ */