push_composite_child
function push_composite_child():void { // Gjs wrapper for gtk_widget_push_composite_child() }
Makes all newly-created widgets as composite children until the corresponding pop_composite_child call.
A composite child is a child that's an implementation detail of the container it's inside and should not be visible to people using the container. Composite children aren't treated differently by GTK (but see Gtk.Container.prototype.foreach vs. Gtk.Container.prototype.forall), but e.g. GUI builders might want to treat them in a different way.
Here is a simple example: |[ gtk_widget_push_composite_child (); scrolled_window->hscrollbar = gtk_scrollbar_new (GTK_ORIENTATION_HORIZONTAL, hadjustment); gtk_widget_set_composite_name (scrolled_window->hscrollbar, "hscrollbar"); gtk_widget_pop_composite_child (); gtk_widget_set_parent (scrolled_window->hscrollbar, GTK_WIDGET (scrolled_window)); g_object_ref (scrolled_window->hscrollbar); ]|