Ardour  8.7-14-g57a6773833
gtkdnd.h
Go to the documentation of this file.
1 /* -*- Mode: C; c-file-style: "gnu"; tab-width: 8 -*- */
2 /* GTK - The GIMP Toolkit
3  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18  * Boston, MA 02111-1307, USA.
19  */
20 
21 /*
22  * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
23  * file for a list of people on the GTK+ Team. See the ChangeLog
24  * files for a list of changes. These files are distributed with
25  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
26  */
27 
28 #ifndef __GTK_DND_H__
29 #define __GTK_DND_H__
30 
31 
32 #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
33 #error "Only <gtk/gtk.h> can be included directly."
34 #endif
35 
36 #include <gtk/gtkwidget.h>
37 #include <gtk/gtkselection.h>
38 
39 
40 G_BEGIN_DECLS
41 
42 typedef enum {
43  GTK_DEST_DEFAULT_MOTION = 1 << 0, /* respond to "drag_motion" */
44  GTK_DEST_DEFAULT_HIGHLIGHT = 1 << 1, /* auto-highlight */
45  GTK_DEST_DEFAULT_DROP = 1 << 2, /* respond to "drag_drop" */
48 
49 /* Flags for the GtkTargetEntry on the destination side
50  */
51 typedef enum {
52  GTK_TARGET_SAME_APP = 1 << 0, /*< nick=same-app >*/
53  GTK_TARGET_SAME_WIDGET = 1 << 1, /*< nick=same-widget >*/
54  GTK_TARGET_OTHER_APP = 1 << 2, /*< nick=other-app >*/
55  GTK_TARGET_OTHER_WIDGET = 1 << 3 /*< nick=other-widget >*/
57 
58 /* Destination side */
59 
61  GdkDragContext *context,
62  GdkAtom target,
63  guint32 time_);
65  gboolean success,
66  gboolean del,
67  guint32 time_);
68 
70 
73 
75  GtkDestDefaults flags,
76  const GtkTargetEntry *targets,
77  gint n_targets,
78  GdkDragAction actions);
79 
81  GdkWindow *proxy_window,
82  GdkDragProtocol protocol,
83  gboolean use_coordinates);
84 
86 
88  GdkDragContext *context,
89  GtkTargetList *target_list);
92  GtkTargetList *target_list);
96 
98  gboolean track_motion);
100 
101 /* Source side */
102 
104  GdkModifierType start_button_mask,
105  const GtkTargetEntry *targets,
106  gint n_targets,
107  GdkDragAction actions);
108 
110 
113  GtkTargetList *target_list);
117 
119  GdkColormap *colormap,
120  GdkPixmap *pixmap,
121  GdkBitmap *mask);
123  GdkPixbuf *pixbuf);
125  const gchar *stock_id);
127  const gchar *icon_name);
128 
129 /* There probably should be functions for setting the targets
130  * as a GtkTargetList
131  */
132 
134  GtkTargetList *targets,
135  GdkDragAction actions,
136  gint button,
137  GdkEvent *event);
138 
139 /* Set the image being dragged around
140  */
142  GtkWidget *widget,
143  gint hot_x,
144  gint hot_y);
146  GdkColormap *colormap,
147  GdkPixmap *pixmap,
148  GdkBitmap *mask,
149  gint hot_x,
150  gint hot_y);
152  GdkPixbuf *pixbuf,
153  gint hot_x,
154  gint hot_y);
156  const gchar *stock_id,
157  gint hot_x,
158  gint hot_y);
160  const gchar *icon_name,
161  gint hot_x,
162  gint hot_y);
163 
165 
167  gint start_x,
168  gint start_y,
169  gint current_x,
170  gint current_y);
171 
172 /* Internal functions */
174  GdkEvent *event);
176  GdkEvent *event);
177 
178 #ifndef GTK_DISABLE_DEPRECATED
180  GdkPixmap *pixmap,
181  GdkBitmap *mask,
182  gint hot_x,
183  gint hot_y);
184 #endif /* !GTK_DISABLE_DEPRECATED */
185 
186 G_END_DECLS
187 
188 #endif /* __GTK_DND_H__ */
GdkDragProtocol
Definition: gdkdnd.h:51
GdkDragAction
Definition: gdkdnd.h:41
typedefG_BEGIN_DECLS struct _GdkDragContext GdkDragContext
Definition: gdkdnd.h:38
struct _GdkAtom * GdkAtom
Definition: gdktypes.h:80
GdkModifierType
Definition: gdktypes.h:127
GtkWidget * gtk_drag_get_source_widget(GdkDragContext *context)
void gtk_drag_dest_set_target_list(GtkWidget *widget, GtkTargetList *target_list)
void gtk_drag_source_add_image_targets(GtkWidget *widget)
void gtk_drag_highlight(GtkWidget *widget)
void gtk_drag_unhighlight(GtkWidget *widget)
void gtk_drag_dest_set(GtkWidget *widget, GtkDestDefaults flags, const GtkTargetEntry *targets, gint n_targets, GdkDragAction actions)
void gtk_drag_source_set_icon_stock(GtkWidget *widget, const gchar *stock_id)
GtkTargetList * gtk_drag_dest_get_target_list(GtkWidget *widget)
void gtk_drag_set_icon_pixbuf(GdkDragContext *context, GdkPixbuf *pixbuf, gint hot_x, gint hot_y)
void gtk_drag_set_icon_default(GdkDragContext *context)
void gtk_drag_source_set(GtkWidget *widget, GdkModifierType start_button_mask, const GtkTargetEntry *targets, gint n_targets, GdkDragAction actions)
gboolean gtk_drag_dest_get_track_motion(GtkWidget *widget)
void gtk_drag_dest_set_track_motion(GtkWidget *widget, gboolean track_motion)
void gtk_drag_get_data(GtkWidget *widget, GdkDragContext *context, GdkAtom target, guint32 time_)
GtkTargetList * gtk_drag_source_get_target_list(GtkWidget *widget)
void gtk_drag_dest_set_proxy(GtkWidget *widget, GdkWindow *proxy_window, GdkDragProtocol protocol, gboolean use_coordinates)
void gtk_drag_dest_add_image_targets(GtkWidget *widget)
void gtk_drag_source_set_icon(GtkWidget *widget, GdkColormap *colormap, GdkPixmap *pixmap, GdkBitmap *mask)
void gtk_drag_set_icon_pixmap(GdkDragContext *context, GdkColormap *colormap, GdkPixmap *pixmap, GdkBitmap *mask, gint hot_x, gint hot_y)
void gtk_drag_dest_unset(GtkWidget *widget)
void gtk_drag_set_icon_name(GdkDragContext *context, const gchar *icon_name, gint hot_x, gint hot_y)
void gtk_drag_source_set_target_list(GtkWidget *widget, GtkTargetList *target_list)
void gtk_drag_source_add_text_targets(GtkWidget *widget)
GtkTargetFlags
Definition: gtkdnd.h:51
@ GTK_TARGET_SAME_WIDGET
Definition: gtkdnd.h:53
@ GTK_TARGET_OTHER_APP
Definition: gtkdnd.h:54
@ GTK_TARGET_SAME_APP
Definition: gtkdnd.h:52
@ GTK_TARGET_OTHER_WIDGET
Definition: gtkdnd.h:55
void gtk_drag_source_set_icon_pixbuf(GtkWidget *widget, GdkPixbuf *pixbuf)
void _gtk_drag_source_handle_event(GtkWidget *widget, GdkEvent *event)
void gtk_drag_set_default_icon(GdkColormap *colormap, GdkPixmap *pixmap, GdkBitmap *mask, gint hot_x, gint hot_y)
void gtk_drag_finish(GdkDragContext *context, gboolean success, gboolean del, guint32 time_)
void gtk_drag_dest_add_uri_targets(GtkWidget *widget)
GtkDestDefaults
Definition: gtkdnd.h:42
@ GTK_DEST_DEFAULT_DROP
Definition: gtkdnd.h:45
@ GTK_DEST_DEFAULT_MOTION
Definition: gtkdnd.h:43
@ GTK_DEST_DEFAULT_HIGHLIGHT
Definition: gtkdnd.h:44
@ GTK_DEST_DEFAULT_ALL
Definition: gtkdnd.h:46
gboolean gtk_drag_check_threshold(GtkWidget *widget, gint start_x, gint start_y, gint current_x, gint current_y)
void gtk_drag_source_unset(GtkWidget *widget)
GdkAtom gtk_drag_dest_find_target(GtkWidget *widget, GdkDragContext *context, GtkTargetList *target_list)
void gtk_drag_set_icon_widget(GdkDragContext *context, GtkWidget *widget, gint hot_x, gint hot_y)
void gtk_drag_dest_add_text_targets(GtkWidget *widget)
void gtk_drag_source_add_uri_targets(GtkWidget *widget)
void gtk_drag_set_icon_stock(GdkDragContext *context, const gchar *stock_id, gint hot_x, gint hot_y)
void _gtk_drag_dest_handle_event(GtkWidget *toplevel, GdkEvent *event)
GdkDragContext * gtk_drag_begin(GtkWidget *widget, GtkTargetList *targets, GdkDragAction actions, gint button, GdkEvent *event)
void gtk_drag_source_set_icon_name(GtkWidget *widget, const gchar *icon_name)
GtkImagePixmapData pixmap
Definition: gtkimage.h:0
GtkImagePixbufData pixbuf
Definition: gtkimage.h:2
typedefG_BEGIN_DECLS struct _GtkTargetList GtkTargetList
Definition: gtkselection.h:41