/[gtk-cffi]/gtk-cffi/gtk/cell-layout.lisp
ViewVC logotype

Contents of /gtk-cffi/gtk/cell-layout.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations)
Sun Oct 7 12:02:11 2012 UTC (18 months, 1 week ago) by rklochkov
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +17 -49 lines
Fixed examples. Changed cell properties for tree-column to be set as :attributes
Fixed double init in g-value.
1 (in-package :gtk-cffi)
2
3 (defclass cell-layout (g-object)
4 ())
5
6 (defcfun gtk-cell-layout-pack-start :void
7 (cell-layout pobject) (renderer pobject) (expand :boolean))
8
9 (defcfun gtk-cell-layout-pack-end :void
10 (cell-layout pobject) (renderer pobject) (expand :boolean))
11
12 (defmethod pack ((cell-layout cell-layout)
13 (cell-renderer cell-renderer)
14 &key end expand)
15 (funcall (if end
16 #'gtk-cell-layout-pack-end
17 #'gtk-cell-layout-pack-start)
18 cell-layout cell-renderer expand)
19 (iter
20 (for (attr column) in (attributes cell-renderer))
21 (add-attribute cell-layout cell-renderer attr column)))
22
23 (deffuns cell-layout
24 (add-attribute :void (cell pobject) (attr cffi-keyword) (column :int))
25 (:get cells g-list-object)
26 (:get area pobject)
27 (reorder :void (cell pobject) (poisition :int))
28 (clear-attributes :void (cell-renderer pobject))
29 (clear :void))
30
31 (defcallback cb-cell-data-func :void
32 ((cell-layout pobject) (cell-renderer pobject)
33 (model pobject) (tree-iter (struct tree-iter)) (data pdata))
34 (funcall data cell-layout cell-renderer model tree-iter))
35
36 (defcfun gtk-cell-layout-set-cell-data-func :void
37 (cell-layout pobject) (renderer pobject) (func pfunction)
38 (data pdata) (notify :pointer))
39
40 (defmethod (setf cell-data-func) (func
41 (cell-layout cell-layout)
42 (cell-renderer cell-renderer)
43 &key data destroy-notify)
44 (set-callback cell-layout gtk-cell-layout-set-cell-data-func
45 cb-cell-data-func func data destroy-notify cell-renderer))
46

  ViewVC Help
Powered by ViewVC 1.1.5