Interface

Gtk-4.0GtkListStoreSignalSignatures

interface SignalSignatures {
    notify: (pspec: GObject.ParamSpec) => void;
    "row-changed": (path: Gtk.TreePath, iter: Gtk.TreeIter) => void;
    "row-deleted": (path: Gtk.TreePath) => void;
    "row-has-child-toggled": (path: Gtk.TreePath, iter: Gtk.TreeIter) => void;
    "row-inserted": (path: Gtk.TreePath, iter: Gtk.TreeIter) => void;
    "rows-reordered": (
        path: Gtk.TreePath,
        iter: Gtk.TreeIter,
        new_order: null,
    ) => void;
    "sort-column-changed": () => void;
    [key: `notify::${string}`]: (pspec: GObject.ParamSpec) => void;
}

Hierarchy (View Summary)

Indexable

Index
notify: (pspec: GObject.ParamSpec) => void

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with GObject.ParamFlags.EXPLICIT_NOTIFY, then any call to g_object_set_property() results in ::notify being emitted, even if the new value is the same as the old. If they did pass GObject.ParamFlags.EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.

This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the g_signal_connect() call, like this:

g_signal_connect (text_view->buffer, "notify::paste-target-list",
G_CALLBACK (gtk_text_view_target_list_notify),
text_view)

It is important to note that you must use [canonical parameter names][class@GObject.ParamSpec#parameter-names] as detail strings for the notify signal.

"row-changed": (path: Gtk.TreePath, iter: Gtk.TreeIter) => void

This signal is emitted when a row in the model has changed.

"row-deleted": (path: Gtk.TreePath) => void

This signal is emitted when a row has been deleted.

Note that no iterator is passed to the signal handler, since the row is already deleted.

This should be called by models after a row has been removed. The location pointed to by path should be the location that the row previously was at. It may not be a valid location anymore.

"row-has-child-toggled": (path: Gtk.TreePath, iter: Gtk.TreeIter) => void

This signal is emitted when a row has gotten the first child row or lost its last child row.

"row-inserted": (path: Gtk.TreePath, iter: Gtk.TreeIter) => void

This signal is emitted when a new row has been inserted in the model.

Note that the row may still be empty at this point, since it is a common pattern to first insert an empty row, and then fill it with the desired values.

"rows-reordered": (
    path: Gtk.TreePath,
    iter: Gtk.TreeIter,
    new_order: null,
) => void

This signal is emitted when the children of a node in the Gtk.TreeModel have been reordered.

Note that this signal is not emitted when rows are reordered by DND, since this is implemented by removing and then reinserting the row.

"sort-column-changed": () => void

The ::sort-column-changed signal is emitted when the sort column or sort order of sortable is changed. The signal is emitted before the contents of sortable are resorted.