scratch-screen-share/gtk-playground.lisp

24 lines
694 B
Common Lisp

(load (sb-ext:posix-getenv "ASDF"))
(asdf:load-system 'cl-cffi-gtk)
(defpackage #:gtkStuff (:use #:cl))
(in-package #:gtkStuff)
(gtk:cl-cffi-gtk-build-info) ; yay, this works, cool
(defun example-window-simple ()
(gtk:within-main-loop
(let (;; Create a toplevel window.
(window (gtk:gtk-window-new :toplevel)))
;; Signal handler for the window to handle the signal "destroy".
(gobject:g-signal-connect window "destroy"
(lambda (widget)
(declare (ignore widget))
(gtk:leave-gtk-main)))
;; Show the window.
(gtk:gtk-widget-show-all window))))
;; yay, this works. good.