/[gtk-cffi]/gtk-cffi/examples/ex11.lisp
ViewVC logotype

Contents of /gtk-cffi/examples/ex11.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Tue Mar 6 01:25:25 2012 UTC (2 years, 1 month ago) by rklochkov
Branch: MAIN
CVS Tags: HEAD
added GtkAssistant and GtkBuilder
1 rklochkov 1.1 (asdf:oos 'asdf:load-op :gtk-cffi)
2    
3     (defpackage #:test-ex11
4     (:use #:common-lisp #:gtk-cffi #:g-object-cffi))
5     (in-package #:test-ex11)
6    
7     (gtk-init)
8     (defparameter *window*
9     (gtk-model
10     'window :width 80
11     :title "Hello world!"
12     :signals `(:destroy
13     :gtk-main-quit
14     :enter-notify-event
15     ,(lambda (widget event)
16     (declare (ignore widget event))
17     (format t "Entered~%")))
18     ('v-box
19     ('button :label "Hello!"
20     :signals (list :clicked
21     (let ((count 0))
22     (lambda (widget)
23     (declare (ignore widget))
24     (format t "Pressed ~a times~%"
25     (incf count))))))
26     ('button :label "About"
27     :signals (list :clicked
28     (lambda (widget)
29     (declare (ignore widget))
30     (run (make-instance 'about-dialog
31     :authors
32     '("Roman Klochkov")
33     :program-name "Test"
34     :licence-type :gpl-3-0))))))))
35     (show *window*)
36     (gtk-main)

  ViewVC Help
Powered by ViewVC 1.1.5