1
/* The GIMP -- an image manipulation program
1
/* GIMP - The GNU Image Manipulation Program
2
2
* Copyright (C) 1995-1997 Spencer Kimball and Peter Mattis
4
4
* This program is free software; you can redistribute it and/or modify
29
29
#define GIMP_TARGET_NETSCAPE_URL \
30
30
{ "_NETSCAPE_URL", 0, GIMP_DND_TYPE_NETSCAPE_URL }
32
#define GIMP_TARGET_XDS \
33
{ "XdndDirectSave0", 0, GIMP_DND_TYPE_XDS }
32
35
#define GIMP_TARGET_COLOR \
33
36
{ "application/x-color", 0, GIMP_DND_TYPE_COLOR }
35
#define GIMP_TARGET_PNG \
36
{ "image/png", 0, GIMP_DND_TYPE_PNG }
38
38
#define GIMP_TARGET_SVG \
39
39
{ "image/svg", 0, GIMP_DND_TYPE_SVG }
41
41
#define GIMP_TARGET_SVG_XML \
42
42
{ "image/svg+xml", 0, GIMP_DND_TYPE_SVG_XML }
44
/* just here for documentation purposes, the actual list of targets
45
* is created dynamically from available GdkPixbuf loaders
47
#define GIMP_TARGET_PIXBUF \
48
{ NULL, 0, GIMP_DND_TYPE_PIXBUF }
44
50
#define GIMP_TARGET_IMAGE \
45
51
{ "application/x-gimp-image-id", GTK_TARGET_SAME_APP, GIMP_DND_TYPE_IMAGE }
53
#define GIMP_TARGET_COMPONENT \
54
{ "application/x-gimp-component", GTK_TARGET_SAME_APP, GIMP_DND_TYPE_COMPONENT }
47
56
#define GIMP_TARGET_LAYER \
48
57
{ "application/x-gimp-layer-id", GTK_TARGET_SAME_APP, GIMP_DND_TYPE_LAYER }
53
62
#define GIMP_TARGET_LAYER_MASK \
54
63
{ "application/x-gimp-layer-mask-id", GTK_TARGET_SAME_APP, GIMP_DND_TYPE_LAYER_MASK }
56
#define GIMP_TARGET_COMPONENT \
57
{ "application/x-gimp-component", GTK_TARGET_SAME_APP, GIMP_DND_TYPE_COMPONENT }
59
65
#define GIMP_TARGET_VECTORS \
60
66
{ "application/x-gimp-vectors-id", GTK_TARGET_SAME_APP, GIMP_DND_TYPE_VECTORS }
83
89
#define GIMP_TARGET_TEMPLATE \
84
90
{ "application/x-gimp-template-name", GTK_TARGET_SAME_APP, GIMP_DND_TYPE_TEMPLATE }
86
#define GIMP_TARGET_TOOL \
87
{ "application/x-gimp-tool-name", GTK_TARGET_SAME_APP, GIMP_DND_TYPE_TOOL }
92
#define GIMP_TARGET_TOOL_INFO \
93
{ "application/x-gimp-tool-info-name", GTK_TARGET_SAME_APP, GIMP_DND_TYPE_TOOL_INFO }
89
95
#define GIMP_TARGET_DIALOG \
90
96
{ "application/x-gimp-dialog", GTK_TARGET_SAME_APP, GIMP_DND_TYPE_DIALOG }
95
101
void gimp_dnd_init (Gimp *gimp);
98
/* uri list dnd functions */
104
/* uri list dnd functions */
100
106
typedef GList * (* GimpDndDragUriListFunc) (GtkWidget *widget,
102
108
typedef void (* GimpDndDropUriListFunc) (GtkWidget *widget,
117
125
/* color dnd functions */
119
127
typedef void (* GimpDndDragColorFunc) (GtkWidget *widget,
122
130
typedef void (* GimpDndDropColorFunc) (GtkWidget *widget,
123
const GimpRGB *color,
133
const GimpRGB *color,
126
136
void gimp_dnd_color_source_add (GtkWidget *widget,
127
GimpDndDragColorFunc get_color_func,
137
GimpDndDragColorFunc get_color_func,
129
139
void gimp_dnd_color_source_remove (GtkWidget *widget);
131
141
void gimp_dnd_color_dest_add (GtkWidget *widget,
132
GimpDndDropColorFunc set_color_func,
142
GimpDndDropColorFunc set_color_func,
134
144
void gimp_dnd_color_dest_remove (GtkWidget *widget);
155
167
void gimp_dnd_svg_dest_remove (GtkWidget *widget);
170
/* pixbuf dnd functions */
172
typedef GdkPixbuf * (* GimpDndDragPixbufFunc) (GtkWidget *widget,
174
typedef void (* GimpDndDropPixbufFunc) (GtkWidget *widget,
180
void gimp_dnd_pixbuf_source_add (GtkWidget *widget,
181
GimpDndDragPixbufFunc get_pixbuf_func,
183
void gimp_dnd_pixbuf_source_remove (GtkWidget *widget);
185
void gimp_dnd_pixbuf_dest_add (GtkWidget *widget,
186
GimpDndDropPixbufFunc set_pixbuf_func,
188
void gimp_dnd_pixbuf_dest_remove (GtkWidget *widget);
191
/* component dnd functions */
193
typedef GimpImage * (* GimpDndDragComponentFunc) (GtkWidget *widget,
194
GimpContext **context,
195
GimpChannelType *channel,
197
typedef void (* GimpDndDropComponentFunc) (GtkWidget *widget,
201
GimpChannelType channel,
204
void gimp_dnd_component_source_add (GtkWidget *widget,
205
GimpDndDragComponentFunc get_comp_func,
207
void gimp_dnd_component_source_remove (GtkWidget *widget);
209
void gimp_dnd_component_dest_add (GtkWidget *widget,
210
GimpDndDropComponentFunc set_comp_func,
212
void gimp_dnd_component_dest_remove (GtkWidget *widget);
158
215
/* GimpViewable (by GType) dnd functions */
160
217
typedef GimpViewable * (* GimpDndDragViewableFunc) (GtkWidget *widget,
218
GimpContext **context,
162
220
typedef void (* GimpDndDropViewableFunc) (GtkWidget *widget,
163
GimpViewable *viewable,
223
GimpViewable *viewable,
167
227
gboolean gimp_dnd_drag_source_set_by_type (GtkWidget *widget,
190
250
GimpViewable * gimp_dnd_get_drag_data (GtkWidget *widget);
253
/* Direct Save Protocol (XDS) */
255
void gimp_dnd_xds_source_add (GtkWidget *widget,
256
GimpDndDragViewableFunc get_image_func,
258
void gimp_dnd_xds_source_remove (GtkWidget *widget);
193
261
#endif /* __GIMP_DND_H__ */