Package: gtk

Function gtk:widget-ancestor

Lambda List

gtk:widget-ancestor (widget gtype)

Arguments

widget -- a gtk:widget object
gtype -- an ancestor g:type-t type ID

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 "GtkBox") gets the first gtk:box widget that is an ancestor of the widget.

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

2025-2-13