Function

Gtktree_get_row_drag_data

Declaration [src]

gboolean
gtk_tree_get_row_drag_data (
  GtkSelectionData* selection_data,
  GtkTreeModel** tree_model,
  GtkTreePath** path
)

Description [src]

Obtains a tree_model and path from selection data of target type GTK_TREE_MODEL_ROW. Normally called from a drag_data_received handler. This function can only be used if selection_data originates from the same process that’s calling this function, because a pointer to the tree model is being passed around. If you aren’t in the same process, then you’ll get memory corruption. In the GtkTreeDragDest drag_data_received handler, you can assume that selection data of type GTK_TREE_MODEL_ROW is in from the current process. The returned path must be freed with gtk_tree_path_free().

Parameters

selection_data

Type: GtkSelectionData

A GtkSelectionData.

The data is owned by the caller of the function.
tree_model

Type: GtkTreeModel

A GtkTreeModel.

The argument will be set by the function.
The argument can be set to NULL by the function.
The argument can be NULL.
The returned data is owned by the function.
path

Type: GtkTreePath

Row in tree_model.

The argument will be set by the function.
The argument can be set to NULL by the function.
The argument can be NULL.
The caller of the function takes ownership of the returned data, and is responsible for freeing it.

Return value

Type: gboolean

TRUE if selection_data had target type GTK_TREE_MODEL_ROW and is otherwise valid.