Package: gtk
Callback gtk:text-buffer-commit-notify
SyntaxArgumentsDetails A notification callback used by the gtk:text-buffer-add-commit-notify
function. You may not modify the gtk:text-buffer object from a gtk:text-buffer-commit-notify callback function and that is enforced by the gtk:text-buffer API. The gtk:text-buffer-commit-notify callback function may be used to be notified about changes to the underlying text buffer right before or after the changes are committed to the underlying B-Tree. This is useful if you want to observe changes to the text buffer without other signal handlers potentially modifying state on the way to the default signal handler. When the flags argument is :before-insert, the pos argument is set to the offset in characters from the start of the text buffer where the insertion will occur. The len argument is set to the number of characters to be inserted. You may not yet retrieve the text until it has been inserted. You may access the text from :after-insert using the gtk:text-buffer-get-slice function. When the flags argument is :after-insert, the pos argument is set to offset in characters where the insertion occurred and len is set to the number of characters inserted. When the flags argument is :before-delete, the pos argument is set to offset in characters where the deletion will occur and len is set to the number of characters that will be removed. You may still retrieve the text from this handler using pos and len. When the flags argument is :after-delete, the len argument is set to zero to denote that the delete-range has already been committed to the underlying B-Tree. You may no longer retrieve the text that has been deleted from the text buffer. Since 4.16 | See also |
#2024-10-26