add_commit_notify
Description:
public uint add_commit_notify (TextBufferNotifyFlags flags, owned TextBufferCommitNotify commit_notify)
Adds a [callback@Gtk.
TextBufferCommitNotify] to be called when a change is to be made to the [type@Gtk.TextBuffer].
Functions are explicitly forbidden from making changes to the [type@Gtk.TextBuffer] from this callback. It is intended for tracking changes to the buffer only.
It may be advantageous to use [callback@Gtk.TextBufferCommitNotify] over connecting to the [signal@Gtk.TextBuffer:
GtkTextBuffer:insert-text
] or [signal@Gtk.TextBuffer:GtkTextBuffer:delete-range
] signals to avoid ordering issues with
other signal handlers which may further modify the [type@Gtk.TextBuffer].
Parameters:
this |
a [type@Gtk.TextBuffer] |
flags |
which notifications should be dispatched to |
commit_notify |
a [callback@Gtk.TextBufferCommitNotify] to call for commit notifications |
destroy |
a callback to free |
user_data |
closure data for |
Returns:
a handler id which may be used to remove the commit notify callback using [method@Gtk.TextBuffer.remove_commit_notify]. |