get_path_at_pos


Description:

public bool get_path_at_pos (int x, int y, out TreePath? path, out unowned TreeViewColumn? column, out int cell_x, out int cell_y)

Finds the path at the point (x, y), relative to bin_window coordinates (please see get_bin_window).

That is, x and y are relative to an events coordinates. x and y must come from an event on the this only where `event->window == gtk_tree_view_get_bin_window ()`. It is primarily for things like popup menus. If path is non-null, then it will be filled with the TreePath at that point. This path should be freed with free. If column is non-null, then it will be filled with the column at that point. cell_x and cell_y return the coordinates relative to the cell background (i.e. the background_area passed to render) . This function is only meaningful if this is realized. Therefore this function will always return false if this is not realized or does not have a model.

For converting widget coordinates (eg. the ones you get from GtkWidget:GtkTreeView:query-tooltip), please see convert_widget_to_bin_window_coords.

Parameters:

this

A TreeView.

x

The x position to be identified (relative to bin_window).

y

The y position to be identified (relative to bin_window).

path

A pointer to a TreePath pointer to be filled in, or null

column

A pointer to a TreeViewColumn pointer to be filled in, or null

cell_x

A pointer where the X coordinate relative to the cell can be placed, or null

cell_y

A pointer where the Y coordinate relative to the cell can be placed, or null

Returns:

true if a row exists at that coordinate.