Package: gtk

Function gtk-widget-ancestor

Lambda List

gtk-widget-ancestor (widget gtype)

Arguments

widget -- a gtk-widget object
gtype -- an ancestor g-type type

Return Value

The gtk-widget ancestor widget, or nil if not found.

Details

Gets the first ancestor of the widget with type gtype. For example, the call (gtk-widget-ancestor widget "GtkBbox") gets the first gtk-box widget that is an ancestor of the widget. See note about checking for a gtk-window toplevel in the docs for the gtk-widget-toplevel function.

Note that unlike the gtk-widget-is-ancestor function, the gtk-widget-ancestor function considers the widget to be an ancestor of itself.
 

See also

2021-9-16