




The function 
quit-interface
 closes the top level interface containing 
pane
, but first it verifies that it is okay to do this by calling the interface's 
confirm-destroy-function
. If it is OK to close the interface, it then calls destroy to do so. If 
force
 is true, then neither the 
confirm-destroy-function
 or the 
destroy-callback
 are called, and the window is just closed immediately.
Note: 
quit-interface
 must only be called in the process of the top level interface of 
pane
. Menu callbacks on that interface will be called in that process, but otherwise you probably need to use execute-with-interface or apply-in-pane-process.
Here are two examples demonstrating the use of 
quit-interface
 with the 
destroy-callback
 and the 
confirm-destroy-function
. 
(setq interface (capi:display
(make-instance
'capi:interface
:title "Test Interface"
:destroy-callback
#'(lambda (interface)
(capi:display-message
"Quitting ~S" interface)))))
(capi:apply-in-pane-process
interface 'capi:quit-interface interface)
With this second example, the user is prompted as to whether or not to quit the interface.
(setq interface (capi:display
(make-instance
'capi:interface
:title "Test Interface"
:confirm-destroy-function
#'(lambda (interface)
(capi:confirm-yes-or-no
"Really quit ~S"
interface)))))
(capi:apply-in-pane-process
interface 'capi:quit-interface interface)