-; (defun clist-new (columns)
-; (if (atom columns)
-; (%clist-new columns)
-; (with-array (titles :initial-contents columns :free-contents t)
-; (%clist-new-with-titles (length columns) titles))))
-
-; (define-foreign ("gtk_clist_set_button_actions"
-; (setf clist-button-actions)) () nil
-; (clist clist)
-; (button unsigned-int)
-; (button-actions button-actions))
-
-; (define-foreign clist-freeze () nil
-; (clist clist))
-
-; (define-foreign clist-thaw () nil
-; (clist clist))
-
-; (define-foreign clist-column-titles-show () nil
-; (clist clist))
-
-; (define-foreign clist-column-titles-hide () nil
-; (clist clist))
-
-; (defun (setf clist-titles-visible-p) (visible clist)
-; (if visible
-; (clist-column-titles-hide clist)
-; (clist-column-titles-show clist)))
-
-; (define-foreign clist-column-title-active () nil
-; (clist clist)
-; (column int))
-
-; (define-foreign clist-column-title-passive () nil
-; (clist clist)
-; (column int))
-
-; (define-foreign clist-column-titles-active () nil
-; (clist clist))
-
-; (define-foreign clist-column-titles-passive () nil
-; (clist clist))
-
-; (define-foreign ("gtk_clist_set_column_title"
-; (setf clist-column-title)) () nil
-; (clist clist)
-; (column int)
-; (title string))
-
-; (define-foreign ("gtk_clist_get_column_title" clist-column-title) () string
-; (clist clist)
-; (column int))
-
-; (define-foreign ("gtk_clist_set_column_widget"
-; (setf clist-column-widget)) () nil
-; (clist clist)
-; (column int)
-; (widget widget))
-
-; (define-foreign ("gtk_clist_get_column_widget" clist-column-widget) () widget
-; (clist clist)
-; (column int))
-
-; (define-foreign ("gtk_clist_set_column_justification"
-; (setf clist-column-justification)) () nil
-; (clist clist)
-; (column int)
-; (justification justification))
-
-; (define-foreign clist-column-justification (clist column) justification
-; (clist clist)
-; ((progn
-; (assert (and (>= column 0) (< column (clist-n-columns clist))))
-; column)
-; int))
-
-; (define-foreign ("gtk_clist_set_column_visibility"
-; (setf clist-column-visible-p)) () nil
-; (clist clist)
-; (column int)
-; (visible boolean))
-
-; ;; cl-gtk.c
-; (define-foreign clist-column-visible-p (clist column) boolean
-; (clist clist)
-; ((progn
-; (assert (and (>= column 0) (< column (clist-n-columns clist))))
-; column)
-; int))
-
-; (define-foreign ("gtk_clist_set_column_resizeable"
-; (setf clist-column-resizeable-p)) () nil
-; (clist clist)
-; (column int)
-; (resizeable boolean))
-
-; ;; cl-gtk.c
-; (define-foreign clist-column-resizeable-p (clist column) boolean
-; (clist clist)
-; ((progn
-; (assert (and (>= column 0) (< column (clist-n-columns clist))))
-; column)
-; int))
-
-; (define-foreign ("gtk_clist_set_column_auto_resize"
-; (setf clist-column-auto-resize-p)) () nil
-; (clist clist)
-; (column int)
-; (auto-resize boolean))
-
-; ;; cl-gtk.c
-; (define-foreign clist-column-auto-resize-p (clist column) boolean
-; (clist clist)
-; ((progn
-; (assert (and (>= column 0) (< column (clist-n-columns clist))))
-; column)
-; int))
-
-; (define-foreign clist-columns-autosize () int
-; (clist clist))
-
-; (define-foreign clist-optimal-column-width () int
-; (clist clist)
-; (column int))
-
-; (define-foreign ("gtk_clist_set_column_width"
-; (setf clist-column-width)) () nil
-; (clist clist)
-; (column int)
-; (width int))
-
-; ;; cl-gtk.c
-; (define-foreign clist-column-width (clist column) int
-; (clist clist)
-; ((progn
-; (assert (and (>= column 0) (< column (clist-n-columns clist))))
-; column)
-; int))
-
-; (define-foreign ("gtk_clist_set_column_min_width"
-; (setf clist-column-min-width)) (min-width clist column) nil
-; (clist clist)
-; (column int)
-; ((or min-width -1) int))
-
-; (define-foreign ("gtk_clist_set_column_max_width"
-; (setf clist-column-max-width)) (max-width clist column) nil
-; (clist clist)
-; (column int)
-; ((or max-width -1) int))
-
-; (define-foreign clist-moveto () nil
-; (clist clist)
-; (row int)
-; (column int)
-; (row-align single-float)
-; (columnt-align single-float))
-
-; (define-foreign
-; ("gtk_clist_row_is_visible" clist-row-visiblie-p) () visibility
-; (clist clist)
-; (row int))
-
-; (define-foreign ("gtk_clist_get_cell_type" clist-cell-type) () cell-type
-; (clist clist)
-; (row int)
-; (column int))
-
-; (define-foreign ("gtk_clist_set_text" (setf clist-cell-text)) () nil
-; (clist clist)
-; (row int)
-; (column int)
-; (text string))
-
-; (define-foreign %clist-set-pixmap () nil
-; (clist clist)
-; (row int)
-; (column int)
-; (gdk:pixmap gdk:pixmap)
-; (mask (or null gdk:bitmap)))
-
-; (defun (setf clist-cell-pixmap) (pixmap clist row column)
-; (multiple-value-bind (gdk:pixmap mask)
-; (%pixmap-create pixmap)
-; (%clist-set-pixmap clist row column gdk:pixmap mask)
-; (values pixmap mask)))
-
-; (define-foreign %clist-set-pixtext () nil
-; (clist clist)
-; (row int)
-; (column int)
-; (text string)
-; (spacing uint8)
-; (pixmap gdk:pixmap)
-; (mask (or null gdk:bitmap)))
-
-; (defun clist-set-cell-pixtext (clist row column text spacing pixmap)
-; (multiple-value-bind (gdk:pixmap mask)
-; (%pixmap-create pixmap)
-; (%clist-set-pixtext clist row column text spacing gdk:pixmap mask)))
-
-; (define-foreign %clist-get-text () boolean
-; (clist clist)
-; (row int)
-; (column int)
-; (text string :out))
-
-; (defun clist-cell-text (clist row column)
-; (multiple-value-bind (success text)
-; (%clist-get-text clist row column)
-; (unless success
-; (error
-; "Cell at row ~D column ~D in ~A is not of type :text"
-; row column clist))
-; text))
-
-; (define-foreign ("gtk_clist_get_pixmap" %clist-get-pixmap) () boolean
-; (clist clist)
-; (row int)
-; (column int)
-; (pixmap gdk:pixmap :out)
-; (mask gdk:bitmap :out))
-
-; (defun clist-cell-pixmap (clist row column)
-; (multiple-value-bind (success pixmap mask)
-; (%clist-get-pixmap clist row column)
-; (unless success
-; (error
-; "Cell at row ~D column ~D in ~A is not of type :pixmap"
-; row column clist))
-; (values pixmap mask)))
-
-; (define-foreign %clist-get-pixtext () boolean
-; (clist clist)
-; (row int)
-; (column int)
-; (text string :out)
-; (spacing unsigned-int :out)
-; (pixmap gdk:pixmap :out)
-; (mask gdk:bitmap :out))
-
-; (defun clist-cell-pixtext (clist row column)
-; (multiple-value-bind (success text spacing pixmap mask)
-; (%clist-get-pixtext clist row column)
-; (unless success
-; (error
-; "Cell at row ~D column ~D in ~A is not of type :pixtext"
-; row column clist))
-; (values text spacing pixmap mask)))
-
-; (define-foreign %clist-set-foreground () nil
-; (clist clist)
-; (row int)
-; (color gdk:color))
-
-; (defun (setf clist-foreground) (color clist row)
-; (gdk:with-colors ((color color))
-; (%clist-set-foreground clist row color))
-; color)
-
-; (define-foreign %clist-set-background () nil
-; (clist clist)
-; (row int)
-; (color gdk:color))
-
-; (defun (setf clist-background) (color clist row)
-; (gdk:with-colors ((color color))
-; (%clist-set-background clist row color))
-; color)
-
-; (define-foreign ("gtk_clist_set_cell_style"
-; (setf clist-cell-style)) () nil
-; (clist clist)
-; (row int)
-; (column int)
-; (style style))
-
-; (define-foreign ("gtk_clist_get_cell_style" clist-cell-style) () style
-; (clist clist)
-; (row int)
-; (column int))
-
-; (define-foreign ("gtk_clist_set_row_style"
-; (setf clist-row-style)) () nil
-; (clist clist)
-; (row int)
-; (style style))
-
-; (define-foreign ("gtk_clist_get_row_style" clist-row-style) () style
-; (clist clist)
-; (row int))
-
-; (define-foreign clist-set-shift () nil
-; (clist clist)
-; (row int)
-; (column int)
-; (vertical int)
-; (horizontal int))
-
-; (define-foreign ("gtk_clist_set_selectable"
-; (setf clist-selectable-p)) () nil
-; (clist clist)
-; (row int)
-; (selectable boolean))
-
-; (define-foreign ("gtk_clist_get_selectable" clist-selectable-p) () boolean
-; (clist clist)
-; (row int))
-
-; (define-foreign ("gtk_clist_insert" %clist-insert) () int
-; (clist clist)
-; (row int)
-; (text pointer))
-
-; (defun clist-insert (clist row text)
-; (unless (= (length text) (clist-n-columns clist))
-; (error "Wrong number of elements in ~A" text))
-; (with-array (data :initial-contents text :free-contents t)
-; (%clist-insert clist row data)))
-
-; (defun clist-prepend (clist text)
-; (clist-insert clist 0 text))
-
-; (defun clist-append (clist text)
-; (clist-insert clist -1 text))
-
-; (define-foreign clist-remove () nil
-; (clist clist)
-; (row int))
-
-; (define-foreign ("gtk_clist_set_row_data_full" clist-set-row-data)
-; (clist row data &optional destroy-function) nil
-; (clist clist)
-; (row int)
-; ((register-user-data data destroy-function) unsigned-long)
-; (*destroy-marshal* pointer))
-
-; (defun (setf clist-row-data) (data clist row)
-; (clist-set-row-data clist row data)
-; data)
-
-; (define-foreign %clist-get-row-data () unsigned-long
-; (clist clist)
-; (row int))
-
-; (defun clist-row-data (clist row)
-; (find-user-data (%clist-get-row-data clist row)))
-
-; (define-foreign %clist-find-row-from-data () int
-; (clist clist)
-; (id unsigned-long))
-
-; (define-foreign clist-select-row (clist row &optional (column -1)) nil
-; (clist clist)
-; (row int)
-; (column int))
-
-; (define-foreign clist-unselect-row (clist row &optional (column -1)) nil
-; (clist clist)
-; (row int)
-; (column int))
-
-; (define-foreign clist-undo-selection () nil
-; (clist clist))
-
-; (define-foreign clist-clear () nil
-; (clist clist))
-
-; (define-foreign ("gtk_clist_get_selection_info" clist-selection-info) () int
-; (clist clist)
-; (x int)
-; (y int)
-; (row int :out)
-; (column int :out))
-
-; (define-foreign clist-select-all () nil
-; (clist clist))
-
-; (define-foreign clist-unselect-all () nil
-; (clist clist))
-
-; (define-foreign clist-swap-rows () nil
-; (clist clist)
-; (row1 int)
-; (row2 int))
-
-; (define-foreign ("gtk_clist_row_move" clist-move-row) () nil
-; (clist clist)
-; (source-row int)
-; (dest-row int))
-
-; ;(define-foreign clist-set-compare-func ...)
-
-; (define-foreign clist-sort () nil
-; (clist clist))
-
-; (define-foreign ("gtk_clist_set_auto_sort"
-; (setf clist-auto-sort-p)) () nil
-; (clist clist)
-; (auto-sort boolean))
-
-; ;; cl-gtk.c
-; (define-foreign clist-auto-sort-p () boolean
-; (clist clist))
-
-; (defun clist-focus-row (clist)
-; (let ((row (%clist-focus-row clist)))
-; (when (>= row 0)
-; row)))
-
-; ;; cl-gtk.c
-; (define-foreign clist-selection () (list int)
-; (clist clist))
-
-
-
-; ;;; CTree
-
-; (define-foreign %ctree-new () ctree
-; (columns int)
-; (tree-column int))
-
-; (define-foreign %ctree-new-with-titles () ctree
-; (columns int)
-; (tree-column int)
-; (titles pointer))
-
-; (defun ctree-new (columns &optional (tree-column 0))
-; (if (atom columns)
-; (%ctree-new columns tree-column)
-; (with-array (titles :initial-contents columns :free-contents t)
-; (%ctree-new-with-titles (length columns) tree-column titles))))
-
-; (define-foreign %ctree-insert-node () ctree-node
-; (ctree ctree)
-; (parent (or null ctree-node))
-; (sibling (or null ctree-node))
-; (text pointer)
-; (spacing uint8)
-; (pixmap-closed (or null gdk:pixmap))
-; (bitmap-closed (or null gdk:bitmap))
-; (pixmap-opened (or null gdk:pixmap))
-; (bitmap-opened (or null gdk:bitmap))
-; (leaf boolean)
-; (expaned boolean))
-
-; (defun ctree-insert-node (ctree parent sibling text spacing
-; &key pixmap closed opened leaf expanded)
-; (multiple-value-bind (pixmap-closed mask-closed)
-; (%pixmap-create (or closed pixmap))
-; (multiple-value-bind (pixmap-opened mask-opened)
-; (%pixmap-create (or opened (and (not leaf) pixmap)))
-; (with-array (data :clear t :initial-contents text :free-contents t)
-; (%ctree-insert-node
-; ctree parent sibling data spacing pixmap-closed mask-closed
-; pixmap-opened mask-opened leaf expanded)))))
-
-; (define-foreign ctree-remove-node () nil
-; (ctree ctree)
-; (node ctree-node))
-
-; (defun ctree-insert-from-list (ctree parent tree function)
-; (clist-freeze ctree)
-; (labels ((insert-node (node parent)
-; (let ((ctree-node
-; (ctree-insert-node
-; ctree parent nil
-; (make-list (clist-n-columns ctree) :initial-element "")
-; 0 :leaf (not (rest node)))))
-; (funcall function ctree-node (car node))
-; (dolist (child (rest node))
-; (insert-node child ctree-node)))))
-; (if parent
-; (insert-node tree parent)
-; (dolist (node tree)
-; (insert-node node nil))))
-; (clist-thaw ctree))
-
-; (defun ctree-map-to-list (ctree node function)
-; (labels ((map-children (child)
-; (when child
-; (let ((sibling (ctree-node-sibling child)))
-; (cons
-; (ctree-map-to-list ctree child function)
-; (map-children sibling))))))
-; (if node
-; (cons
-; (funcall function node)
-; (map-children (ctree-node-child node)))
-; (map-children (ctree-nth-node ctree 0)))))
-
-
-; (defun %ctree-apply-recursive (ctree node pre function depth)
-; (when (and pre node (or (not depth) (<= (ctree-node-level node) depth)))
-; (funcall function node))
-
-; (let ((first-child (if node
-; (ctree-node-child node)
-; (ctree-nth-node ctree 0))))
-; (when (and
-; first-child
-; (or (not depth) (<= (ctree-node-level first-child) depth)))
-; (labels ((foreach-child (child)
-; (when child
-; (let ((sibling (ctree-node-sibling child)))
-; (%ctree-apply-recursive ctree child pre function depth)
-; (foreach-child sibling)))))
-; (foreach-child first-child))))