1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19 
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 
25 module gtk.TreeDragSourceIF;
26 
27 private import gdk.ContentProvider;
28 private import gobject.ObjectG;
29 private import gtk.TreePath;
30 private import gtk.c.functions;
31 public  import gtk.c.types;
32 
33 
34 /**
35  * Interface for Drag-and-Drop destinations in `GtkTreeView`.
36  */
37 public interface TreeDragSourceIF{
38 	/** Get the main Gtk struct */
39 	public GtkTreeDragSource* getTreeDragSourceStruct(bool transferOwnership = false);
40 
41 	/** the main Gtk struct as a void* */
42 	protected void* getStruct();
43 
44 
45 	/** */
46 	public static GType getType()
47 	{
48 		return gtk_tree_drag_source_get_type();
49 	}
50 
51 	/**
52 	 * Asks the #GtkTreeDragSource to delete the row at @path, because
53 	 * it was moved somewhere else via drag-and-drop. Returns %FALSE
54 	 * if the deletion fails because @path no longer exists, or for
55 	 * some model-specific reason. Should robustly handle a @path no
56 	 * longer found in the model!
57 	 *
58 	 * Params:
59 	 *     path = row that was being dragged
60 	 *
61 	 * Returns: %TRUE if the row was successfully deleted
62 	 */
63 	public bool dragDataDelete(TreePath path);
64 
65 	/**
66 	 * Asks the #GtkTreeDragSource to return a #GdkContentProvider representing
67 	 * the row at @path. Should robustly handle a @path no
68 	 * longer found in the model!
69 	 *
70 	 * Params:
71 	 *     path = row that was dragged
72 	 *
73 	 * Returns: a #GdkContentProvider for the
74 	 *     given @path or %NULL if none exists
75 	 */
76 	public ContentProvider dragDataGet(TreePath path);
77 
78 	/**
79 	 * Asks the #GtkTreeDragSource whether a particular row can be used as
80 	 * the source of a DND operation. If the source doesn’t implement
81 	 * this interface, the row is assumed draggable.
82 	 *
83 	 * Params:
84 	 *     path = row on which user is initiating a drag
85 	 *
86 	 * Returns: %TRUE if the row can be dragged
87 	 */
88 	public bool rowDraggable(TreePath path);
89 }