Package: gobject
Function gobject:signal-stop-emission
Lambda Listgobject:signal-stop-emission (instance detailed) ArgumentsDetails
Stops a current emission of the signal.
This will prevent the default method from running, if the signal was :run-last and you connected normally, for example, without the :after flag for the g:signal-connect function. Prints a warning if used on a signal which is not being emitted. Examples
;; Handler for the "insert-text" signal
(setf handlerid
(g:signal-connect entry "insert-text"
(lambda (editable text length position)
(g:signal-handler-block editable handlerid)
(gtk:editable-insert-text editable
(string-upcase text)
(cffi:mem-ref position :intptr))
(g:signal-stop-emission editable "insert-text")
(g:signal-handler-unblock editable handlerid)))) | See also |
2024-6-19