All Manuals > CAPI User Guide and Reference Manual > 21 CAPI Reference Entries

destroy Generic Function

Summary

Closes a window and calls the destroy-callback.

Package

capi

Signature

destroy interface

Arguments
interface
Description

The generic function destroy closes the window associated with interface, and then calls the interface's destroy-callback if it has one.

There is a complementary function quit-interface which calls the interface's confirm-destroy-function to confirm that the destroy should be done, and it is advisable to always use this unless you want to make sure that the interface's confirm-destroy-function is ignored.

Notes

destroy must only be called in the process of interface. Menu callbacks on interface will be called in that process, but otherwise you probably need to use execute-with-interface or apply-in-pane-process.

Examples
(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:destroy interface)
See also

interface
quit-interface
*update-screen-interfaces-hooks*
7 Programming with CAPI Windows


CAPI User Guide and Reference Manual (Windows version) - 01 Dec 2021 19:33:57