Update of /project/cells-gtk/cvsroot/root/gtk-ffi In directory common-lisp:/tmp/cvs-serv9014/root/gtk-ffi
Modified Files: gtk-list-tree.lisp Log Message: Now native CFFI
--- /project/cells-gtk/cvsroot/root/gtk-ffi/gtk-list-tree.lisp 2006/01/03 19:08:51 1.4 +++ /project/cells-gtk/cvsroot/root/gtk-ffi/gtk-list-tree.lisp 2006/02/16 18:05:04 1.5 @@ -19,158 +19,177 @@ (in-package :gtk-ffi)
(def-gtk-lib-functions :gtk - ;;list-store - (gtk-list-store-newv ((n-columns int) - (col-types c-pointer)) - c-pointer) - (gtk-list-store-set-valist ((store c-pointer) - (iter c-pointer) - (data c-pointer))) - (gtk-list-store-set-value ((store c-pointer) - (iter c-pointer) - (column int) - (value c-pointer))) - (gtk-list-store-append ((list-store c-pointer) - (iter c-pointer))) - (gtk-list-store-clear ((list-store c-pointer))) - - ;;tree-store - (gtk-tree-store-newv ((n-columns int) - (col-types c-pointer)) - c-pointer) - (gtk-tree-store-set-valist ((store c-pointer) - (iter c-pointer) - (data c-pointer))) - (gtk-tree-store-set-value ((store c-pointer) - (iter c-pointer) - (column int) - (value c-pointer))) - (gtk-tree-store-append ((list-store c-pointer) - (iter c-pointer) - (parent c-pointer))) - (gtk-tree-store-clear ((list-store c-pointer))) - - ;;tree-view - (gtk-tree-view-new () - c-pointer) - (gtk-tree-view-set-model ((tree-view c-pointer) - (model c-pointer))) - (gtk-tree-view-insert-column ((tree-view c-pointer) - (column c-pointer) - (pos int)) - int) - (gtk-tree-view-get-selection ((tree-view c-pointer)) - c-pointer) - (gtk-tree-view-get-path-at-pos ((tree-view c-pointer) - (x int) - (y int) - (path c-pointer) - (column c-pointer) - (cell-x c-pointer) - (cell-y c-pointer)) - boolean) - (gtk-tree-view-widget-to-tree-coords ((tree-view c-pointer) - (wx int) - (wy int) - (tx c-pointer) - (ty c-pointer))) - (gtk-tree-view-tree-to-widget-coords ((tree-view c-pointer) - (wx int) - (wy int) - (tx c-pointer) - (ty c-pointer))) - (gtk-tree-view-expand-all ((tree-view c-pointer))) - + ;;list-store + (gtk-list-store-newv :pointer + ((n-columns :int) + (col-types :pointer))) + (gtk-list-store-set-valist :void + ((store :pointer) + (iter :pointer) + (data :pointer))) + (gtk-list-store-set-value :void + ((store :pointer) + (iter :pointer) + (column :int) + (value :pointer))) + (gtk-list-store-append :void + ((list-store :pointer) + (iter :pointer))) + (gtk-list-store-clear :void + ((list-store :pointer))) + ;;tre-store + (gtk-tree-store-newv :pointer + ((n-columns :int) + (col-types :pointer))) + (gtk-tree-store-set-valist :void + ((store :pointer) + (iter :pointer) + (data :pointer))) + (gtk-tree-store-set-value :void + ((store :pointer) + (iter :pointer) + (column :int) + (value :pointer))) + (gtk-tree-store-append :void + ((list-store :pointer) + (iter :pointer) + (parent :pointer))) + (gtk-tree-store-clear :void + ((list-store :pointer))) + ;;tre-view + (gtk-tree-view-new :pointer ()) + (gtk-tree-view-set-model :void + ((tree-view :pointer) + (model :pointer))) + (gtk-tree-view-insert-column :int + ((tree-view + :pointer) + (column :pointer) + (pos :int))) + (gtk-tree-view-get-selection :pointer + ((tree-view + :pointer))) + (gtk-tree-view-get-path-at-pos :gtk-boolean + ((tree-view :pointer) + (x :int) + (y :int) + (path :pointer) + (column :pointer) + (cell-x :pointer) + (cell-y :pointer))) + (gtk-tree-view-widget-to-tree-coords :void + ((tree-view :pointer) + (wx :int) + (wy :int) + (tx :pointer) + (ty :pointer))) + (gtk-tree-view-tree-to-widget-coords :void + ((tree-view :pointer) + (wx :int) + (wy :int) + (tx :pointer) + (ty :pointer))) + (gtk-tree-view-expand-all :void + ((tree-view :pointer))) ;;tree-iter - (gtk-tree-iter-free ((iter c-pointer))) - + (gtk-tree-iter-free :void ((iter :pointer))) + (gtk-tree-model-get :void + ((tree-model :pointer) + (iter :pointer) + (column :int) + (data :pointer) + (eof :int))) ;;tree-model - (gtk-tree-model-get ((tree-model c-pointer) - (iter c-pointer) - (column int) - (data c-pointer) - (eof int))) - (gtk-tree-model-get-iter-from-string ((tree-model c-pointer) - (iter c-pointer) - (path c-string)) - boolean) - + (gtk-tree-model-get-iter-from-string :gtk-boolean + ((tree-model :pointer) + (iter :pointer) + (path :gtk-string))) ;;tree-path - (gtk-tree-path-new-from-string ((path c-string)) - c-pointer) - (gtk-tree-path-to-string ((path c-pointer)) - c-string) - (gtk-tree-path-free ((path c-pointer))) - + (gtk-tree-path-new-from-string :pointer + ((path :gtk-string))) + (gtk-tree-path-to-string :gtk-string + ((path :pointer))) + (gtk-tree-path-free :void ((path :pointer))) ;;tree-selection - (gtk-tree-selection-set-mode ((sel c-pointer) - (mode int))) - (gtk-tree-selection-get-mode ((sel c-pointer)) - int) - (gtk-tree-selection-select-path ((sel c-pointer) - (path c-pointer))) - (gtk-tree-selection-get-selected ((sel c-pointer) - (model c-pointer) - (iter c-pointer)) - boolean) - (gtk-tree-selection-selected-foreach ((sel c-pointer) - (callback-f #.(callback-function ((model c-pointer) - (path c-pointer) - (iter c-pointer) - (data c-pointer)))) - (data c-pointer))) - ;;tree-view-column - (gtk-tree-view-column-new () - c-pointer) - (gtk-tree-view-column-pack-start ((tree-column c-pointer) - (renderer c-pointer) - (expand boolean)) - nil nil nil) - (gtk-tree-view-column-add-attribute ((tree-column c-pointer) - (renderer c-pointer) - (attribute c-string) - (column int))) - (gtk-tree-view-column-set-spacing ((tree-column c-pointer) - (spacing int))) - (gtk-tree-view-column-set-visible ((tree-column c-pointer) - (spacing boolean)) - nil nil nil) - (gtk-tree-view-column-set-reorderable ((tree-column c-pointer) - (resizable boolean))) - (gtk-tree-view-column-set-sort-column-id ((tree-column c-pointer) - (col-id int))) - (gtk-tree-view-column-set-sort-indicator ((tree-column c-pointer) - (resizable boolean))) - (gtk-tree-view-column-set-resizable ((tree-column c-pointer) - (resizable boolean))) - (gtk-tree-view-column-set-fixed-width ((tree-column c-pointer) - (fixed-width int))) - (gtk-tree-view-column-set-min-width ((tree-column c-pointer) - (min-width int))) - (gtk-tree-view-column-set-max-width ((tree-column c-pointer) - (max-width int))) - (gtk-tree-view-column-set-title ((tree-column c-pointer) - (title c-string))) - (gtk-tree-view-column-set-expand ((tree-column c-pointer) - (expand boolean))) - (gtk-tree-view-column-set-clickable ((tree-column c-pointer) - (clickable boolean))) - (gtk-tree-view-column-set-cell-data-func ((tree-column c-pointer) - (cell-renderer c-pointer) - (func #.(callback-function ((tree-column c-pointer) - (cell-renderer c-pointer) - (tree-model c-pointer) - (iter c-pointer) - (data c-pointer)))) - (data c-pointer) - (destroy c-pointer))) - ;;cell-renderers - (gtk-cell-renderer-text-new () - c-pointer) - (gtk-cell-renderer-toggle-new () - c-pointer) - (gtk-cell-renderer-pixbuf-new () - c-pointer) - (gtk-cell-renderer-set-fixed-size ((cell c-pointer) - (width int) - (height int)))) + (gtk-tree-selection-set-mode :void + ((sel :pointer) + (mode :int))) + (gtk-tree-selection-get-mode :int + ((sel :pointer))) + (gtk-tree-selection-select-path :void + ((sel :pointer) + (path :pointer))) + (gtk-tree-selection-get-selected :gtk-boolean + ((sel :pointer) + (model :pointer) + (iter :pointer))) + (gtk-tree-selection-selected-foreach :void + ((sel :pointer) + (callback-f :pointer) + (data :pointer))) + ;;tre-view-column + (gtk-tree-view-column-new :pointer ()) + (gtk-tree-view-column-pack-start :void + ((tree-column :pointer) + (renderer :pointer) + (expand :gtk-boolean))) + (gtk-tree-view-column-add-attribute :void + ((tree-column :pointer) + (renderer :pointer) + (attribute :gtk-string) + (column :int))) + (gtk-tree-view-column-set-spacing :void + ((tree-column :pointer) + (spacing :int))) + (gtk-tree-view-column-set-visible :void + ((tree-column :pointer) + (spacing :gtk-boolean))) + (gtk-tree-view-column-set-reorderable :void + ((tree-column :pointer) + (resizable :gtk-boolean))) + (gtk-tree-view-column-set-sort-column-id :void + ((tree-column :pointer) + (col-id :int))) + (gtk-tree-view-column-set-sort-indicator :void + ((tree-column :pointer) + (resizable :gtk-boolean))) + (gtk-tree-view-column-set-resizable :void + ((tree-column :pointer) + (resizable :gtk-boolean))) + (gtk-tree-view-column-set-fixed-width :void + ((tree-column :pointer) + (fixed-width :int))) + (gtk-tree-view-column-set-min-width :void + ((tree-column :pointer) + (min-width :int))) + (gtk-tree-view-column-set-max-width :void + ((tree-column :pointer) + (max-width :int))) + (gtk-tree-view-column-set-title :void + ((tree-column :pointer) + (title :gtk-string))) + (gtk-tree-view-column-set-expand :void + ((tree-column :pointer) + (expand :gtk-boolean))) + (gtk-tree-view-column-set-clickable :void + ((tree-column + :pointer) + (clickable + :gtk-boolean))) + (gtk-tree-view-column-set-cell-data-func :void + ((tree-column :pointer) + (cell-renderer :pointer) + (func :pointer) + (data :pointer) + (destroy :pointer))) + ;;cell-renderer + (gtk-cell-renderer-text-new :pointer ()) + (gtk-cell-renderer-toggle-new :pointer ()) + (gtk-cell-renderer-pixbuf-new :pointer ()) + (gtk-cell-renderer-set-fixed-size :void + ((cell + :pointer) + (width :int) + (height + :int)))) +