Gtk.WidgetPath.prototype.append_with_siblings
function append_with_siblings(siblings:Gtk.WidgetPath, sibling_index:Number):Number { // Gjs wrapper for gtk_widget_path_append_with_siblings() }
Appends a widget type with all its siblings to the widget hierarchy represented by path. Using this function instead of Gtk.WidgetPath.prototype.append_type will allow the CSS theming to use sibling matches in selectors and apply :nth-child() pseudo classes. In turn, it requires a lot more care in widget implementations as widgets need to make sure to call Gtk.Widget.prototype.reset_style on all involved widgets when the siblings path changes.
Since 3.2
- siblings
a widget path describing a list of siblings. This path may not contain any siblings itself and it must not be modified afterwards.
- sibling_index
index into siblings for where the added element is positioned.
- Returns
the position where the element was inserted.