Package: gtk

Function gtk:widget-pick

Lambda List

gtk:widget-pick (widget x y flags)

Arguments

widget -- a gtk:widget object
x -- a number coerced to a double float for the x coordinate to test, relative to the origin of the widget
y -- a number coerced to a double float for the y coordinate to test, relative to the origin of the widget
flags -- a gtk:pick-flags value to influence what is picked

Return Value

The descendant gtk:widget object at the given coordinate or nil if none.

Details

Finds the descendant of widget, including widget itself, 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 the content area of the widget.

Usually widgets will return nil if the given coordinate is not contained in widget checked via the gtk:widget-contains function. Otherwise they will recursively try to find a child that does not return nil. 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.
 

See also

#2025-2-15