Method
GtkTextBufferadd_commit_notify
since: 4.16
Declaration [src]
guint
gtk_text_buffer_add_commit_notify (
GtkTextBuffer* buffer,
GtkTextBufferNotifyFlags flags,
GtkTextBufferCommitNotify commit_notify,
gpointer user_data,
GDestroyNotify destroy
)
Description [src]
Adds a GtkTextBufferCommitNotify to be called when a change
is to be made to the GtkTextBuffer.
Functions are explicitly forbidden from making changes to the
GtkTextBuffer from this callback. It is intended for tracking
changes to the buffer only.
It may be advantageous to use GtkTextBufferCommitNotify over
connecting to the GtkTextBuffer::insert-text or
GtkTextBuffer::delete-range signals to avoid ordering issues with
other signal handlers which may further modify the GtkTextBuffer.
Available since: 4.16
Parameters
flags-
Type:
GtkTextBufferNotifyFlagsWhich notifications should be dispatched to
callback. commit_notify-
Type:
GtkTextBufferCommitNotifyA
GtkTextBufferCommitNotifyto call for commit notifications. user_data-
Type:
gpointerClosure data for
commit_notify.The argument can be NULL.The data is owned by the caller of the method. destroy-
Type:
GDestroyNotifyA callback to free
user_datawhencommit_notifyis removed.
Return value
Type: guint
A handler id which may be used to remove the commit notify
callback using gtk_text_buffer_remove_commit_notify().