get_ancestor
Description:
Gets the first ancestor of the widget with type widget_type.
For example, `gtk_widget_get_ancestor (widget, GTK_TYPE_BOX)` gets the first `GtkBox` that’s an ancestor of this . No reference will be added to the returned widget; it should not be unreferenced.
Note that unlike [method@Gtk.Widget.is_ancestor], this function considers this to be an ancestor of itself.
Parameters:
| this |
a widget |
| widget_type |
ancestor type |
Returns:
|
the ancestor widget |