~ubuntu-branches/ubuntu/jaunty/gimp/jaunty-security

« back to all changes in this revision

Viewing changes to app/widgets/gimpdnd.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-05-02 16:33:03 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070502163303-bvzhjzbpw8qglc4y
Tags: 2.3.16-1ubuntu1
* Resynchronized with Debian, remaining Ubuntu changes:
  - debian/rules: i18n magic.
* debian/control.in:
  - Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
* debian/patches/02_help-message.patch,
  debian/patches/03_gimp.desktop.in.in.patch,
  debian/patches/10_dont_show_wizard.patch: updated.
* debian/patches/04_composite-signedness.patch,
  debian/patches/05_add-letter-spacing.patch: dropped, used upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
3
3
 *
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 }
31
31
 
 
32
#define GIMP_TARGET_XDS \
 
33
        { "XdndDirectSave0", 0, GIMP_DND_TYPE_XDS }
 
34
 
32
35
#define GIMP_TARGET_COLOR \
33
36
        { "application/x-color", 0, GIMP_DND_TYPE_COLOR }
34
37
 
35
 
#define GIMP_TARGET_PNG \
36
 
        { "image/png", 0, GIMP_DND_TYPE_PNG }
37
 
 
38
38
#define GIMP_TARGET_SVG \
39
39
        { "image/svg", 0, GIMP_DND_TYPE_SVG }
40
40
 
41
41
#define GIMP_TARGET_SVG_XML \
42
42
        { "image/svg+xml", 0, GIMP_DND_TYPE_SVG_XML }
43
43
 
 
44
/* just here for documentation purposes, the actual list of targets
 
45
 * is created dynamically from available GdkPixbuf loaders
 
46
 */
 
47
#define GIMP_TARGET_PIXBUF \
 
48
        { NULL, 0, GIMP_DND_TYPE_PIXBUF }
 
49
 
44
50
#define GIMP_TARGET_IMAGE \
45
51
        { "application/x-gimp-image-id", GTK_TARGET_SAME_APP, GIMP_DND_TYPE_IMAGE }
46
52
 
 
53
#define GIMP_TARGET_COMPONENT \
 
54
        { "application/x-gimp-component", GTK_TARGET_SAME_APP, GIMP_DND_TYPE_COMPONENT }
 
55
 
47
56
#define GIMP_TARGET_LAYER \
48
57
        { "application/x-gimp-layer-id", GTK_TARGET_SAME_APP, GIMP_DND_TYPE_LAYER }
49
58
 
53
62
#define GIMP_TARGET_LAYER_MASK \
54
63
        { "application/x-gimp-layer-mask-id", GTK_TARGET_SAME_APP, GIMP_DND_TYPE_LAYER_MASK }
55
64
 
56
 
#define GIMP_TARGET_COMPONENT \
57
 
        { "application/x-gimp-component", GTK_TARGET_SAME_APP, GIMP_DND_TYPE_COMPONENT }
58
 
 
59
65
#define GIMP_TARGET_VECTORS \
60
66
        { "application/x-gimp-vectors-id", GTK_TARGET_SAME_APP, GIMP_DND_TYPE_VECTORS }
61
67
 
83
89
#define GIMP_TARGET_TEMPLATE \
84
90
        { "application/x-gimp-template-name", GTK_TARGET_SAME_APP, GIMP_DND_TYPE_TEMPLATE }
85
91
 
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 }
88
94
 
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);
96
102
 
97
103
 
98
 
/*  uri list  dnd functions  */
 
104
/*  uri list dnd functions  */
99
105
 
100
106
typedef GList * (* GimpDndDragUriListFunc) (GtkWidget *widget,
101
107
                                            gpointer   data);
102
108
typedef void    (* GimpDndDropUriListFunc) (GtkWidget *widget,
 
109
                                            gint       x,
 
110
                                            gint       y,
103
111
                                            GList     *uri_list,
104
112
                                            gpointer   data);
105
113
 
117
125
/*  color dnd functions  */
118
126
 
119
127
typedef void (* GimpDndDragColorFunc) (GtkWidget     *widget,
120
 
                                       GimpRGB       *color,
121
 
                                       gpointer       data);
 
128
                                       GimpRGB       *color,
 
129
                                       gpointer       data);
122
130
typedef void (* GimpDndDropColorFunc) (GtkWidget     *widget,
123
 
                                       const GimpRGB *color,
124
 
                                       gpointer       data);
 
131
                                       gint           x,
 
132
                                       gint           y,
 
133
                                       const GimpRGB *color,
 
134
                                       gpointer       data);
125
135
 
126
136
void  gimp_dnd_color_source_add    (GtkWidget            *widget,
127
 
                                    GimpDndDragColorFunc  get_color_func,
128
 
                                    gpointer              data);
 
137
                                    GimpDndDragColorFunc  get_color_func,
 
138
                                    gpointer              data);
129
139
void  gimp_dnd_color_source_remove (GtkWidget            *widget);
130
140
 
131
141
void  gimp_dnd_color_dest_add      (GtkWidget            *widget,
132
 
                                    GimpDndDropColorFunc  set_color_func,
133
 
                                    gpointer              data);
 
142
                                    GimpDndDropColorFunc  set_color_func,
 
143
                                    gpointer              data);
134
144
void  gimp_dnd_color_dest_remove   (GtkWidget            *widget);
135
145
 
136
146
 
140
150
                                            gsize        *stream_len,
141
151
                                            gpointer      data);
142
152
typedef void     (* GimpDndDropStreamFunc) (GtkWidget    *widget,
 
153
                                            gint          x,
 
154
                                            gint          y,
143
155
                                            const guchar *stream,
144
156
                                            gsize         stream_len,
145
157
                                            gpointer      data);
155
167
void  gimp_dnd_svg_dest_remove   (GtkWidget              *widget);
156
168
 
157
169
 
 
170
/*  pixbuf dnd functions  */
 
171
 
 
172
typedef GdkPixbuf * (* GimpDndDragPixbufFunc) (GtkWidget    *widget,
 
173
                                               gpointer      data);
 
174
typedef void        (* GimpDndDropPixbufFunc) (GtkWidget    *widget,
 
175
                                               gint          x,
 
176
                                               gint          y,
 
177
                                               GdkPixbuf    *pixbuf,
 
178
                                               gpointer      data);
 
179
 
 
180
void  gimp_dnd_pixbuf_source_add    (GtkWidget              *widget,
 
181
                                     GimpDndDragPixbufFunc   get_pixbuf_func,
 
182
                                     gpointer                data);
 
183
void  gimp_dnd_pixbuf_source_remove (GtkWidget              *widget);
 
184
 
 
185
void  gimp_dnd_pixbuf_dest_add      (GtkWidget              *widget,
 
186
                                     GimpDndDropPixbufFunc   set_pixbuf_func,
 
187
                                     gpointer                data);
 
188
void  gimp_dnd_pixbuf_dest_remove   (GtkWidget              *widget);
 
189
 
 
190
 
 
191
/*  component dnd functions  */
 
192
 
 
193
typedef GimpImage * (* GimpDndDragComponentFunc) (GtkWidget       *widget,
 
194
                                                  GimpContext    **context,
 
195
                                                  GimpChannelType *channel,
 
196
                                                  gpointer         data);
 
197
typedef void        (* GimpDndDropComponentFunc) (GtkWidget       *widget,
 
198
                                                  gint             x,
 
199
                                                  gint             y,
 
200
                                                  GimpImage       *image,
 
201
                                                  GimpChannelType  channel,
 
202
                                                  gpointer         data);
 
203
 
 
204
void  gimp_dnd_component_source_add    (GtkWidget                 *widget,
 
205
                                        GimpDndDragComponentFunc   get_comp_func,
 
206
                                        gpointer                   data);
 
207
void  gimp_dnd_component_source_remove (GtkWidget                 *widget);
 
208
 
 
209
void  gimp_dnd_component_dest_add      (GtkWidget                 *widget,
 
210
                                        GimpDndDropComponentFunc   set_comp_func,
 
211
                                        gpointer                   data);
 
212
void  gimp_dnd_component_dest_remove   (GtkWidget                 *widget);
 
213
 
 
214
 
158
215
/*  GimpViewable (by GType) dnd functions  */
159
216
 
160
217
typedef GimpViewable * (* GimpDndDragViewableFunc) (GtkWidget     *widget,
161
 
                                                    gpointer       data);
 
218
                                                    GimpContext  **context,
 
219
                                                    gpointer       data);
162
220
typedef void           (* GimpDndDropViewableFunc) (GtkWidget     *widget,
163
 
                                                    GimpViewable  *viewable,
164
 
                                                    gpointer       data);
 
221
                                                    gint           x,
 
222
                                                    gint           y,
 
223
                                                    GimpViewable  *viewable,
 
224
                                                    gpointer       data);
165
225
 
166
226
 
167
227
gboolean gimp_dnd_drag_source_set_by_type (GtkWidget               *widget,
190
250
GimpViewable * gimp_dnd_get_drag_data     (GtkWidget               *widget);
191
251
 
192
252
 
 
253
/*  Direct Save Protocol (XDS)  */
 
254
 
 
255
void  gimp_dnd_xds_source_add    (GtkWidget               *widget,
 
256
                                  GimpDndDragViewableFunc  get_image_func,
 
257
                                  gpointer                 data);
 
258
void  gimp_dnd_xds_source_remove (GtkWidget               *widget);
 
259
 
 
260
 
193
261
#endif /* __GIMP_DND_H__ */