The function execute-with-interface
is a useful way of operating on an interface owned by another process. It takes a top-level interface, a function and some arguments and queues the function to be run by that process when it next enters its event loop (for an interface owned by the current process, it calls the function immediately).
execute-with-interface
applies
function
even if
interface
does not have a screen representation, for example when it is destroyed. To call
function
only if
interface
has a representation, use execute-with-interface-if-alive.execute-with-interface
is a useful utility in other circumstances.execute-with-interface
calls
function
on the current process if
interface
does not have a process.
(setq a (capi:display (make-instance 'capi:interface)))
(capi:execute-with-interface
a 'break
"Break inside the interface process")
(example-edit-file "capi/elements/progress-bar-from-background-thread")
apply-in-pane-process
apply-in-pane-process-if-alive
execute-with-interface-if-alive
The correct thread for CAPI operations
Programming with CAPI Windows
CAPI User Guide and Reference Manual (Macintosh version) - 3 Aug 2017