Package: gobject

Function gobject:signal-handler-find

Lambda List

gobject:signal-handler-find (instance signal-id)

Arguments

instance -- a g:object instance owning the signal handler to be found
signal-id -- an unsigned integer with a signal ID the handler has to be connected to

Return Value

The unsigned integer with a valid non-0 signal handler ID for a successful match.

Details

Finds the first signal handler that matches the given signal-id. If no handler was found, 0 is returned.

Lisp implementation

In the Lisp implementation only the search for a signal ID is implemented.

Examples

(defvar action (make-instance 'g:simple-action)) => ACTION
;; Get the signal ID
(g:signal-lookup "activate" "GSimpleAction") => 139
;; No signal handler connected
(g:signal-handler-find action 139) => 0
;; Connect signal handler
(g:signal-connect action "activate"
                  (lambda (action param) action param))
=> 118534
(g:signal-handler-find action 139) => 118534
;; Disconnect signal handler
(g:signal-handler-disconnect action *)
(g:signal-handler-find action 139) => 0    
 

See also

2024-12-4