Ardour  9.0-pre0-582-g084a23a80d
gdkdnd.h
Go to the documentation of this file.
1 /* GDK - The GIMP Drawing Kit
2  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19 
20 /*
21  * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
22  * file for a list of people on the GTK+ Team. See the ChangeLog
23  * files for a list of changes. These files are distributed with
24  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
25  */
26 
27 #ifndef __GDK_DND_H__
28 #define __GDK_DND_H__
29 
30 #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
31 #error "Only <gdk/gdk.h> can be included directly."
32 #endif
33 
34 #include <gdk/gdktypes.h>
35 
36 G_BEGIN_DECLS
37 
38 typedef struct _GdkDragContext GdkDragContext;
39 
40 typedef enum
41 {
43  GDK_ACTION_COPY = 1 << 1,
44  GDK_ACTION_MOVE = 1 << 2,
45  GDK_ACTION_LINK = 1 << 3,
47  GDK_ACTION_ASK = 1 << 5
49 
50 typedef enum
51 {
54  GDK_DRAG_PROTO_ROOTWIN, /* A root window with nobody claiming
55  * drags */
56  GDK_DRAG_PROTO_NONE, /* Not a valid drag window */
57  GDK_DRAG_PROTO_WIN32_DROPFILES, /* The simple WM_DROPFILES dnd */
58  GDK_DRAG_PROTO_OLE2, /* The complex OLE2 dnd (not implemented) */
59  GDK_DRAG_PROTO_LOCAL /* Intra-app */
61 
62 /* Object that holds information about a drag in progress.
63  * this is used on both source and destination sides.
64  */
65 
67 
68 #define GDK_TYPE_DRAG_CONTEXT (gdk_drag_context_get_type ())
69 #define GDK_DRAG_CONTEXT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_DRAG_CONTEXT, GdkDragContext))
70 #define GDK_DRAG_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_DRAG_CONTEXT, GdkDragContextClass))
71 #define GDK_IS_DRAG_CONTEXT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_DRAG_CONTEXT))
72 #define GDK_IS_DRAG_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_DRAG_CONTEXT))
73 #define GDK_DRAG_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_DRAG_CONTEXT, GdkDragContextClass))
74 
76  GObject parent_instance;
77 
78  /*< public >*/
79 
80  GdkDragProtocol GSEAL (protocol);
81 
82  gboolean GSEAL (is_source);
83 
84  GdkWindow *GSEAL (source_window);
85  GdkWindow *GSEAL (dest_window);
86 
87  GList *GSEAL (targets);
88  GdkDragAction GSEAL (actions);
89  GdkDragAction GSEAL (suggested_action);
90  GdkDragAction GSEAL (action);
91 
92  guint32 GSEAL (start_time);
93 
94  /*< private >*/
95 
96  gpointer GSEAL (windowing_data);
97 };
98 
100  GObjectClass parent_class;
101 
102 };
103 
104 /* Drag and Drop */
105 
106 GType gdk_drag_context_get_type (void) G_GNUC_CONST;
107 #if !defined (GDK_DISABLE_DEPRECATED) || defined (GDK_COMPILATION)
109 #endif
110 
115 
119 
120 
121 #ifndef GDK_DISABLE_DEPRECATED
124 #endif
125 
126 /* Destination side */
127 
129  GdkDragAction action,
130  guint32 time_);
132  gboolean ok,
133  guint32 time_);
135  gboolean success,
136  guint32 time_);
138 
139 /* Source side */
140 
142  GList *targets);
143 
145  GdkNativeWindow xid,
146  GdkDragProtocol *protocol);
147 
149  GdkWindow *drag_window,
150  GdkScreen *screen,
151  gint x_root,
152  gint y_root,
153  GdkWindow **dest_window,
154  GdkDragProtocol *protocol);
155 
156 #ifndef GDK_MULTIHEAD_SAFE
157 #ifndef GDK_DISABLE_DEPRECATED
159  GdkDragProtocol *protocol);
160 
162  GdkWindow *drag_window,
163  gint x_root,
164  gint y_root,
165  GdkWindow **dest_window,
166  GdkDragProtocol *protocol);
167 #endif /* GDK_DISABLE_DEPRECATED */
168 #endif /* GDK_MULTIHEAD_SAFE */
169 
170 gboolean gdk_drag_motion (GdkDragContext *context,
171  GdkWindow *dest_window,
172  GdkDragProtocol protocol,
173  gint x_root,
174  gint y_root,
175  GdkDragAction suggested_action,
176  GdkDragAction possible_actions,
177  guint32 time_);
179  guint32 time_);
181  guint32 time_);
183 
184 G_END_DECLS
185 
186 #endif /* __GDK_DND_H__ */
void gdk_drag_find_window(GdkDragContext *context, GdkWindow *drag_window, gint x_root, gint y_root, GdkWindow **dest_window, GdkDragProtocol *protocol)
GdkDragProtocol
Definition: gdkdnd.h:51
@ GDK_DRAG_PROTO_MOTIF
Definition: gdkdnd.h:52
@ GDK_DRAG_PROTO_ROOTWIN
Definition: gdkdnd.h:54
@ GDK_DRAG_PROTO_WIN32_DROPFILES
Definition: gdkdnd.h:57
@ GDK_DRAG_PROTO_LOCAL
Definition: gdkdnd.h:59
@ GDK_DRAG_PROTO_OLE2
Definition: gdkdnd.h:58
@ GDK_DRAG_PROTO_XDND
Definition: gdkdnd.h:53
@ GDK_DRAG_PROTO_NONE
Definition: gdkdnd.h:56
GdkDragContext * gdk_drag_context_new(void)
GdkAtom gdk_drag_get_selection(GdkDragContext *context)
void gdk_drag_find_window_for_screen(GdkDragContext *context, GdkWindow *drag_window, GdkScreen *screen, gint x_root, gint y_root, GdkWindow **dest_window, GdkDragProtocol *protocol)
gboolean gdk_drag_motion(GdkDragContext *context, GdkWindow *dest_window, GdkDragProtocol protocol, gint x_root, gint y_root, GdkDragAction suggested_action, GdkDragAction possible_actions, guint32 time_)
GdkDragContext * gdk_drag_begin(GdkWindow *window, GList *targets)
GList * gdk_drag_context_list_targets(GdkDragContext *context)
GdkDragProtocol gdk_drag_context_get_protocol(GdkDragContext *context)
void gdk_drop_reply(GdkDragContext *context, gboolean ok, guint32 time_)
GdkWindow * gdk_drag_context_get_dest_window(GdkDragContext *context)
void gdk_drag_context_unref(GdkDragContext *context)
void gdk_drag_status(GdkDragContext *context, GdkDragAction action, guint32 time_)
GdkNativeWindow gdk_drag_get_protocol_for_display(GdkDisplay *display, GdkNativeWindow xid, GdkDragProtocol *protocol)
gboolean gdk_drag_drop_succeeded(GdkDragContext *context)
GType gdk_drag_context_get_type(void) G_GNUC_CONST
void gdk_drag_context_ref(GdkDragContext *context)
void gdk_drag_drop(GdkDragContext *context, guint32 time_)
GdkDragAction gdk_drag_context_get_selected_action(GdkDragContext *context)
void gdk_drop_finish(GdkDragContext *context, gboolean success, guint32 time_)
GdkDragAction gdk_drag_context_get_suggested_action(GdkDragContext *context)
GdkDragAction
Definition: gdkdnd.h:41
@ GDK_ACTION_COPY
Definition: gdkdnd.h:43
@ GDK_ACTION_ASK
Definition: gdkdnd.h:47
@ GDK_ACTION_PRIVATE
Definition: gdkdnd.h:46
@ GDK_ACTION_DEFAULT
Definition: gdkdnd.h:42
@ GDK_ACTION_MOVE
Definition: gdkdnd.h:44
@ GDK_ACTION_LINK
Definition: gdkdnd.h:45
GdkDragAction gdk_drag_context_get_actions(GdkDragContext *context)
GdkNativeWindow gdk_drag_get_protocol(GdkNativeWindow xid, GdkDragProtocol *protocol)
void gdk_drag_abort(GdkDragContext *context, guint32 time_)
GdkWindow * gdk_drag_context_get_source_window(GdkDragContext *context)
typedefG_BEGIN_DECLS struct _GdkDragContext GdkDragContext
Definition: gdkdnd.h:38
struct _GdkAtom * GdkAtom
Definition: gdktypes.h:80
guint32 GdkNativeWindow
Definition: gdktypes.h:97
GObjectClass parent_class
Definition: gdkdnd.h:100
guint32 GSEAL(start_time)
GList * GSEAL(targets)
GdkWindow * GSEAL(source_window)
GdkDragAction GSEAL(actions)
GdkWindow * GSEAL(dest_window)
gpointer GSEAL(windowing_data)
GdkDragProtocol GSEAL(protocol)
GObject parent_instance
Definition: gdkdnd.h:76
GdkDragAction GSEAL(action)
GdkDragAction GSEAL(suggested_action)
gboolean GSEAL(is_source)