[gtk-cffi-cvs] CVS gtk-cffi/examples

CVS User rklochkov rklochkov at common-lisp.net
Tue Mar 6 01:25:25 UTC 2012


Update of /project/gtk-cffi/cvsroot/gtk-cffi/examples
In directory tiger.common-lisp.net:/tmp/cvs-serv16373/examples

Added Files:
	ex11.lisp 
Log Message:
added GtkAssistant and GtkBuilder



--- /project/gtk-cffi/cvsroot/gtk-cffi/examples/ex11.lisp	2012/03/06 01:25:25	NONE
+++ /project/gtk-cffi/cvsroot/gtk-cffi/examples/ex11.lisp	2012/03/06 01:25:25	1.1
(asdf:oos 'asdf:load-op :gtk-cffi)

(defpackage #:test-ex11
  (:use #:common-lisp #:gtk-cffi #:g-object-cffi))
(in-package #:test-ex11)

(gtk-init)
(defparameter *window*
  (gtk-model
   'window :width 80
           :title "Hello world!"
           :signals `(:destroy 
                      :gtk-main-quit
                      :enter-notify-event 
                      ,(lambda (widget event) 
                        (declare (ignore widget event))
                        (format t "Entered~%")))
   ('v-box 
    ('button :label "Hello!"
            :signals (list :clicked 
                           (let ((count 0)) 
                             (lambda (widget) 
                               (declare (ignore widget))
                               (format t "Pressed ~a times~%" 
                                       (incf count))))))
    ('button :label "About"
             :signals (list :clicked
                            (lambda (widget)
                              (declare (ignore widget))
                              (run (make-instance 'about-dialog
                                                  :authors 
                                                  '("Roman Klochkov")
                                                  :program-name "Test"
                                                  :licence-type :gpl-3-0))))))))
(show *window*)
(gtk-main)




More information about the gtk-cffi-cvs mailing list