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
  
/* -*- C -*- */ 
class GTK2.TreeDragSource; 
//! 
mixin_for G.Object; 
 
int drag_data_delete(GTK2.TreePath path) 
//! Asks to delete the row at path, because it was moved somewhere else via 
//! drag-and-drop.  Returns false if the deletion fails because path no longer 
//! exists, or for some model-specific reason. 
{ 
  pgtk2_verify_inited(); 
  { 
    struct object *o1; 
    int res; 
    get_all_args(NULL,args,"%o",&o1); 
    res=gtk_tree_drag_source_drag_data_delete( 
                        GTK_TREE_DRAG_SOURCE(THIS->obj), 
                        (GtkTreePath *)get_pg2object(o1,pgtk2_tree_path_program)); 
    pgtk2_pop_n_elems(args); 
    PGTK_PUSH_INT(res); 
  } 
} 
 
+GTK2.SelectionData drag_data_get(GTK2.TreePath path) 
//! Asks to return a representation of the row at path. 
{ 
  pgtk2_verify_inited(); 
  { 
    GtkSelectionData *sel; 
    struct object *o1; 
    int res; 
    get_all_args(NULL,args,"%o",&o1); 
    sel=(GtkSelectionData *)g_malloc(sizeof(GtkSelectionData)); 
    if (sel==NULL) 
      SIMPLE_OUT_OF_MEMORY_ERROR("drag_data_get",sizeof(GtkSelectionData)); 
    res=gtk_tree_drag_source_drag_data_get(GTK_TREE_DRAG_SOURCE(THIS->obj), 
                        (GtkTreePath *)get_pg2object(o1,pgtk2_tree_path_program),sel); 
   
    pgtk2_pop_n_elems(args); 
    if (res) 
        push_pgdk2object(sel,pgtk2_selection_data_program,1); 
    else 
        push_int(0); 
  } 
} 
 
int row_draggable(GTK2.TreePath path) 
//! Asks the source whether a particular row can be used as the source of a 
//! DND operation.  If the source doesn't implement this interface, the row 
//! is assumed draggable. 
{ 
  pgtk2_verify_inited(); 
  { 
    struct object *o1; 
    int res; 
    get_all_args(NULL,args,"%o",&o1); 
    res=gtk_tree_drag_source_row_draggable( 
                        GTK_TREE_DRAG_SOURCE(THIS->obj), 
                        (GtkTreePath *)get_pg2object(o1,pgtk2_tree_path_program)); 
    pgtk2_pop_n_elems(args); 
    PGTK_PUSH_INT(res); 
  } 
}