Method
Gtk.Widget.pick
Declaration [src]
GtkWidget*
gtk_widget_pick (
GtkWidget* widget,
double x,
double y,
GtkPickFlags flags
)
Description [src]
Finds the descendant of widget
closest
to the screen at the point (x
, y
).
The point must be given in widget coordinates, so (0, 0) is assumed
to be the top left of widget
‘s content area.
Usually widgets will return NULL
if the given coordinate is not
contained in widget
checked via gtk_widget_contains()
.
Otherwise they will recursively try to find a child that does
not return NULL
. Widgets are however free to customize their
picking algorithm.
This function is used on the toplevel to determine the widget below the mouse cursor for purposes of hover highlighting and delivering events.
Parameters
x |
double |
X coordinate to test, relative to |
|
y |
double |
Y coordinate to test, relative to |
|
flags |
GtkPickFlags |
Flags to influence what is picked |
Return value
Returns: GtkWidget |
|
The widget descendant at
the given coordinate or |
|
Ownership is not transferred to the caller | |
Can be NULL |