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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations)
Sat Jan 21 18:35:00 2012 UTC (2 years, 2 months ago) by rklochkov
Branch: MAIN
Changes since 1.2: +4 -4 lines
Refactored defslots/def*funs
1 (asdf:oos 'asdf:load-op :gtk-cffi-ext)
2 ;(declaim (optimize speed))
3 (defpackage #:test
4 (:use #:common-lisp #:iter #:gtk-cffi #:gtk-cffi-ext #:g-object-cffi))
5 (in-package #:test)
6
7 (gtk-init)
8 (defparameter *model*
9 (make-instance 'lisp-model
10 :implementation
11 (make-instance 'lisp-model-array
12 :array #((1) (2) (3))
13 :columns '(:string :int))))
14 ;:array #(("ok" 1))
15 ;:columns '(:string :int))))
16
17 (defparameter *model0*
18 (make-instance 'list-store :columns '(:int)))
19
20 (append-values *model0* '(1))
21 (append-values *model0* '(2))
22 (append-values *model0* '(3))
23
24 (let ((arr (make-array 0 :adjustable t :fill-pointer 0)))
25 (iter (for i from 1 to 100000)
26 (vector-push-extend (list (format nil "str ~a" i) i) arr))
27 (setf (larray (implementation *model*)) arr))
28
29 (defparameter *window*
30 (gtk-model
31 'window :width 400
32 :height 400
33 :signals '(:destroy :gtk-main-quit)
34 ('scrolled-window
35 ('tree-view :model *model* :columns '("Test str" "Test int"))))); "Test int"))))
36
37 ;(show *window*)
38 (show #(1 2 3 4 5))
39
40 (gtk-main)

  ViewVC Help
Powered by ViewVC 1.1.5