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.TreeDragDestT; 26 27 public import gtk.SelectionData; 28 public import gtk.TreePath; 29 public import gtk.c.functions; 30 public import gtk.c.types; 31 public import gtkc.gtktypes; 32 33 34 /** */ 35 public template TreeDragDestT(TStruct) 36 { 37 /** Get the main Gtk struct */ 38 public GtkTreeDragDest* getTreeDragDestStruct(bool transferOwnership = false) 39 { 40 if (transferOwnership) 41 ownedRef = false; 42 return cast(GtkTreeDragDest*)getStruct(); 43 } 44 45 46 /** 47 * Asks the #GtkTreeDragDest to insert a row before the path @dest, 48 * deriving the contents of the row from @selection_data. If @dest is 49 * outside the tree so that inserting before it is impossible, %FALSE 50 * will be returned. Also, %FALSE may be returned if the new row is 51 * not created for some model-specific reason. Should robustly handle 52 * a @dest no longer found in the model! 53 * 54 * Params: 55 * dest = row to drop in front of 56 * selectionData = data to drop 57 * 58 * Returns: whether a new row was created before position @dest 59 */ 60 public bool dragDataReceived(TreePath dest, SelectionData selectionData) 61 { 62 return gtk_tree_drag_dest_drag_data_received(getTreeDragDestStruct(), (dest is null) ? null : dest.getTreePathStruct(), (selectionData is null) ? null : selectionData.getSelectionDataStruct()) != 0; 63 } 64 65 /** 66 * Determines whether a drop is possible before the given @dest_path, 67 * at the same depth as @dest_path. i.e., can we drop the data in 68 * @selection_data at that location. @dest_path does not have to 69 * exist; the return value will almost certainly be %FALSE if the 70 * parent of @dest_path doesn’t exist, though. 71 * 72 * Params: 73 * destPath = destination row 74 * selectionData = the data being dragged 75 * 76 * Returns: %TRUE if a drop is possible before @dest_path 77 */ 78 public bool rowDropPossible(TreePath destPath, SelectionData selectionData) 79 { 80 return gtk_tree_drag_dest_row_drop_possible(getTreeDragDestStruct(), (destPath is null) ? null : destPath.getTreePathStruct(), (selectionData is null) ? null : selectionData.getSelectionDataStruct()) != 0; 81 } 82 }