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
  
/* -*- C -*- */ 
class GDK2.DragContext; 
 
//! The drag context contains all information about the drag'n'drop 
//! connected to the signal to which it is an argument. 
//! <p> 
//! NOIMG 
//! </p> 
 
GTK2.Widget get_source_widget() 
//! Return the drag source widget. 
{ 
  pgtk2_pop_n_elems(args); 
  push_gobject(gtk_drag_get_source_widget((GdkDragContext *)THIS->obj)); 
} 
 
void drag_finish(int success, int del) 
//! If success is true, the drag succeded. 
//! If del is true, the source should be deleted. 
//! time is the current time. 
{ 
  INT_TYPE a,b,t; 
  get_all_args(NULL,args,"%i%i",&a,&b); 
  gtk_drag_finish((GdkDragContext *)THIS->obj,a,b,time(NULL)); 
  RETURN_THIS(); 
} 
 
void drag_status(int action) 
//! Setting action to -1 means use the suggested action 
{ 
  INT_TYPE o,t; 
  get_all_args(NULL,args,"%i",&o); 
  if (o==-1) 
    o=((GdkDragContext *)THIS->obj)->suggested_action; 
  gdk_drag_status((GdkDragContext *)THIS->obj,o,time(NULL)); 
  RETURN_THIS(); 
} 
 
void drag_drop(int time) 
//! Drag drop. 
{ 
  INT_TYPE t; 
  get_all_args(NULL,args,"%i",&t); 
  gdk_drag_drop((GdkDragContext *)THIS->obj,t); 
  RETURN_THIS(); 
} 
 
 
void drag_abort(int time) 
//! Abort the drag 
{ 
  INT_TYPE t; 
  get_all_args(NULL,args,"%i",&t); 
  gdk_drag_abort((GdkDragContext *)THIS->obj,t); 
  RETURN_THIS(); 
} 
 
void drop_reply(int ok) 
//! Drop reply. 
{ 
  INT_TYPE t,o; 
  get_all_args(NULL,args,"%i",&o); 
  gdk_drop_reply((GdkDragContext *)THIS->obj,o,time(NULL)); 
  RETURN_THIS(); 
} 
 
void drag_set_icon_widget(GTK2.Widget widget, int hot_x, int hot_y) 
//! Set the drag widget. This is a widget that will be shown, and then 
//! dragged around by the user during this drag. 
{ 
  struct object *_o; 
  INT_TYPE x,y; 
  get_all_args(NULL,args,"%o%i%i", 
                &_o,&x,&y); 
  gtk_drag_set_icon_widget((GdkDragContext *)THIS->obj, 
                           GTK_WIDGET(get_gobject(_o)), 
                           x,y); 
  RETURN_THIS(); 
} 
 
void drag_set_icon_default() 
//! Use the default drag icon associated with the source widget. 
{ 
  gtk_drag_set_icon_default((GdkDragContext *)THIS->obj); 
  RETURN_THIS(); 
} 
 
void drag_set_icon_pixmap(GDK2.Pixmap p, GDK2.Bitmap b, int hot_x, int hot_y ) 
//! Set the drag pixmap, and optionally mask.<br /> 
//! The hot_x and hot_y coordinates will be the location of the mouse pointer, 
//! relative to the upper left corner of the pixmap. 
{ 
  struct object *p=NULL,*m=NULL; 
  int x,y; 
  if (args!=4) 
    SIMPLE_WRONG_NUM_ARGS_ERROR("drag_set_icon_pixmap", 4); 
  if (TYPEOF(Pike_sp[-args]) == PIKE_T_OBJECT) 
    p=Pike_sp[-args].u.object; 
  if (TYPEOF(Pike_sp[-args+1]) == PIKE_T_OBJECT) 
    m=Pike_sp[-args+1].u.object; 
  x=Pike_sp[-args+2].u.integer; 
  y=Pike_sp[-args+3].u.integer; 
 
  gtk_drag_set_icon_pixmap((GdkDragContext *)THIS->obj, 
                           gdk_colormap_get_system(), 
                           get_gdkobject(p,pixmap), 
                           get_gdkobject(m,bitmap), 
                           x,y); 
  RETURN_THIS(); 
} 
 
member int suggested_action; 
//! One of CONST(GDK_ACTION); 
member int actions; 
//! A bitwise or of one or more of CONST(GDK_ACTION); 
member int action; 
//! One of CONST(GDK_ACTION); 
member int start_time; 
//! The start time of this drag, as a unix time_t (seconds since 0:00 1/1 1970) 
member int protocol; 
//! One of CONST(GDK_DRAG_PROTO) 
member int is_source; 
//! Is this application the source?