Package: gtk
Function gtk:application-add-window
Lambda Listgtk:application-add-window (application window) ArgumentsDetails
Adds a window to the application. This call is equivalent to setting the application property of window to application. Normally, the connection between the application and the window will remain until the window is destroyed, but you can explicitly remove it with the gtk:application-remove-window function. GTK will keep the application running as long as it has any windows. Examples(defun example-window-simple-demo (&optional application) (gtk:within-main-loop (let (;; Create a toplevel window. (window (gtk:window-new :toplevel))) ;; Add the window to the list of windows of the application (when application (gtk:application-add-window application window)) ... )This is equivalent to the following code ... ;; Add the window to the list of windows of the application (when application (setf (gtk:window-application window) application)) ... )Finally, we can add the window to the list of application windows in one step when we create the window. This is the preferred way to do this in a Lisp program. (defun example-window-simple-demo (&optional application) (gtk:within-main-loop (let (;; Create a toplevel window. (window (make-instance 'gtk:window :type :toplevel :application application))) ... ) | See also |
2024-3-15