File: GtkDnd.xs

package info (click to toggle)
libgtk2-perl 2:1.2499-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,668 kB
  • ctags: 594
  • sloc: perl: 22,100; ansic: 122; makefile: 17
file content (279 lines) | stat: -rw-r--r-- 8,353 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
/*
 * Copyright (c) 2003-2006 by the gtk2-perl team (see the file AUTHORS)
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the 
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 
 * Boston, MA  02111-1307  USA.
 *
 * $Id$
 */

#include "gtk2perl.h"

MODULE = Gtk2::Dnd	PACKAGE = Gtk2::Gdk::DragContext	PREFIX = gtk_drag_

##  void gtk_drag_finish (GdkDragContext *context, gboolean success, gboolean del, guint32 time_) 
void
gtk_drag_finish (context, success, del, time_)
	GdkDragContext *context
	gboolean success
	gboolean del
	guint32 time_

##  GtkWidget *gtk_drag_get_source_widget (GdkDragContext *context) 
GtkWidget *
gtk_drag_get_source_widget (context)
	GdkDragContext *context

##  void gtk_drag_set_icon_widget (GdkDragContext *context, GtkWidget *widget, gint hot_x, gint hot_y) 
void
gtk_drag_set_icon_widget (context, widget, hot_x, hot_y)
	GdkDragContext *context
	GtkWidget *widget
	gint hot_x
	gint hot_y

##  void gtk_drag_set_icon_pixmap (GdkDragContext *context, GdkColormap *colormap, GdkPixmap *pixmap, GdkBitmap *mask, gint hot_x, gint hot_y) 
void
gtk_drag_set_icon_pixmap (context, colormap, pixmap, mask, hot_x, hot_y)
	GdkDragContext *context
	GdkColormap *colormap
	GdkPixmap *pixmap
	GdkBitmap_ornull *mask
	gint hot_x
	gint hot_y

##  void gtk_drag_set_icon_pixbuf (GdkDragContext *context, GdkPixbuf *pixbuf, gint hot_x, gint hot_y) 
void
gtk_drag_set_icon_pixbuf (context, pixbuf, hot_x, hot_y)
	GdkDragContext *context
	GdkPixbuf *pixbuf
	gint hot_x
	gint hot_y

##  void gtk_drag_set_icon_stock (GdkDragContext *context, const gchar *stock_id, gint hot_x, gint hot_y) 
void
gtk_drag_set_icon_stock (context, stock_id, hot_x, hot_y)
	GdkDragContext *context
	const gchar *stock_id
	gint hot_x
	gint hot_y

#if GTK_CHECK_VERSION (2, 8, 0)

void gtk_drag_set_icon_name (GdkDragContext *context, const gchar *icon_name, gint hot_x, gint hot_y)

#endif

##  void gtk_drag_set_icon_default (GdkDragContext *context) 
void
gtk_drag_set_icon_default (context)
	GdkDragContext *context

MODULE = Gtk2::Dnd	PACKAGE = Gtk2::Drag	PREFIX = gtk_drag_

##  GdkDragContext *gtk_drag_begin (GtkWidget *widget, GtkTargetList *targets, GdkDragAction actions, gint button, GdkEvent *event) 
GdkDragContext_noinc *
gtk_drag_begin (class, widget, targets, actions, button, event)
	GtkWidget *widget
	GtkTargetList *targets
	GdkDragAction actions
	gint button
	GdkEvent *event
    C_ARGS:
	widget, targets, actions, button, event

MODULE = Gtk2::Dnd	PACKAGE = Gtk2::Widget	PREFIX = gtk_

##  GdkDragContext *gtk_drag_begin (GtkWidget *widget, GtkTargetList *targets, GdkDragAction actions, gint button, GdkEvent *event) 
GdkDragContext_noinc *
gtk_drag_begin (widget, targets, actions, button, event)
	GtkWidget *widget
	GtkTargetList *targets
	GdkDragAction actions
	gint button
	GdkEvent *event

##  void gtk_drag_get_data (GtkWidget *widget, GdkDragContext *context, GdkAtom target, guint32 time_) 
void
gtk_drag_get_data (widget, context, target, time_)
	GtkWidget *widget
	GdkDragContext *context
	GdkAtom target
	guint32 time_

##  void gtk_drag_highlight (GtkWidget *widget) 
void
gtk_drag_highlight (widget)
	GtkWidget *widget

##  void gtk_drag_unhighlight (GtkWidget *widget) 
void
gtk_drag_unhighlight (widget)
	GtkWidget *widget

####  void gtk_drag_dest_set (GtkWidget *widget, GtkDestDefaults flags, const GtkTargetEntry *targets, gint n_targets, GdkDragAction actions) 
=for apidoc
=for arg ... of Gtk2::TargetEntry's
=cut
void
gtk_drag_dest_set (widget, flags, actions, ...)
	GtkWidget *widget
	GtkDestDefaults flags
	GdkDragAction actions
    PREINIT:
	GtkTargetEntry * targets = NULL;
	gint n_targets, i;
    CODE:
#define FIRST_TARGET 3
	n_targets = items - FIRST_TARGET;
	targets = g_new (GtkTargetEntry, n_targets);
	for (i = 0 ; i < n_targets ; i++)
		gtk2perl_read_gtk_target_entry (ST (i+FIRST_TARGET), targets+i);
	gtk_drag_dest_set (widget, flags, targets, n_targets, actions);
#undef FIRST_TARGET
    CLEANUP:
	g_free (targets);

##  void gtk_drag_dest_set_proxy (GtkWidget *widget, GdkWindow *proxy_window, GdkDragProtocol protocol, gboolean use_coordinates) 
void
gtk_drag_dest_set_proxy (widget, proxy_window, protocol, use_coordinates)
	GtkWidget *widget
	GdkWindow *proxy_window
	GdkDragProtocol protocol
	gboolean use_coordinates

##  void gtk_drag_dest_unset (GtkWidget *widget) 
void
gtk_drag_dest_unset (widget)
	GtkWidget *widget

##  GdkAtom gtk_drag_dest_find_target (GtkWidget *widget, GdkDragContext *context, GtkTargetList *target_list) 
GdkAtom
gtk_drag_dest_find_target (widget, context, target_list)
	GtkWidget *widget
	GdkDragContext *context
	GtkTargetList_ornull *target_list

##  GtkTargetList* gtk_drag_dest_get_target_list (GtkWidget *widget) 
GtkTargetList_ornull*
gtk_drag_dest_get_target_list (widget)
	GtkWidget *widget

##  void gtk_drag_dest_set_target_list (GtkWidget *widget, GtkTargetList *target_list) 
void
gtk_drag_dest_set_target_list (widget, target_list)
	GtkWidget *widget
	GtkTargetList_ornull *target_list

####  void gtk_drag_source_set (GtkWidget *widget, GdkModifierType start_button_mask, const GtkTargetEntry *targets, gint n_targets, GdkDragAction actions) 
=for apidoc
=for arg ... of Gtk2::TargetEntry's
=cut
void
gtk_drag_source_set (widget, start_button_mask, actions, ...)
	GtkWidget *widget
	GdkModifierType start_button_mask
	GdkDragAction actions
    PREINIT:
	GtkTargetEntry * targets = NULL;
	gint n_targets, i;
    CODE:
#define FIRST_TARGET 3
	n_targets = items - FIRST_TARGET;
	targets = g_new (GtkTargetEntry, n_targets);
	for (i = 0 ; i < n_targets ; i++)
		gtk2perl_read_gtk_target_entry (ST (i+FIRST_TARGET), targets+i);
	gtk_drag_source_set (widget, start_button_mask,
	                     targets, n_targets, actions);
#undef FIRST_TARGET
    CLEANUP:
	g_free (targets);

##  void gtk_drag_source_unset (GtkWidget *widget) 
void
gtk_drag_source_unset (widget)
	GtkWidget *widget

##  void gtk_drag_source_set_icon (GtkWidget *widget, GdkColormap *colormap, GdkPixmap *pixmap, GdkBitmap *mask) 
void
gtk_drag_source_set_icon (widget, colormap, pixmap, mask)
	GtkWidget *widget
	GdkColormap_ornull *colormap
	GdkPixmap_ornull *pixmap
	GdkBitmap_ornull *mask

##  void gtk_drag_source_set_icon_pixbuf (GtkWidget *widget, GdkPixbuf *pixbuf) 
void
gtk_drag_source_set_icon_pixbuf (widget, pixbuf)
	GtkWidget *widget
	GdkPixbuf_ornull *pixbuf

##  void gtk_drag_source_set_icon_stock (GtkWidget *widget, const gchar *stock_id) 
void
gtk_drag_source_set_icon_stock (widget, stock_id)
	GtkWidget *widget
	const gchar *stock_id

##  gboolean gtk_drag_check_threshold (GtkWidget *widget, gint start_x, gint start_y, gint current_x, gint current_y) 
gboolean
gtk_drag_check_threshold (widget, start_x, start_y, current_x, current_y)
	GtkWidget *widget
	gint start_x
	gint start_y
	gint current_x
	gint current_y

#if GTK_CHECK_VERSION(2,4,0)

GtkTargetList_ornull *
gtk_drag_source_get_target_list (widget)
	GtkWidget *widget

void
gtk_drag_source_set_target_list (widget, target_list)
	GtkWidget *widget
	GtkTargetList_ornull *target_list

#endif

#if GTK_CHECK_VERSION(2,6,0)

void gtk_drag_dest_add_text_targets (GtkWidget *widget);

void gtk_drag_dest_add_image_targets (GtkWidget *widget);

void gtk_drag_dest_add_uri_targets (GtkWidget *widget);

void gtk_drag_source_add_text_targets (GtkWidget *widget);

void gtk_drag_source_add_image_targets (GtkWidget *widget);

void gtk_drag_source_add_uri_targets (GtkWidget *widget);

#endif

#if GTK_CHECK_VERSION(2,8,0)

void gtk_drag_source_set_icon_name (GtkWidget *widget, const gchar *icon_name);

#endif

#if GTK_CHECK_VERSION (2,10,0)

void gtk_drag_dest_set_track_motion (GtkWidget *widget, gboolean track_motion);

gboolean gtk_drag_dest_get_track_motion  (GtkWidget *widget);

#endif