;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-;; $Id: gtktree.lisp,v 1.27 2007-05-10 20:20:05 espen Exp $
+;; $Id: gtktree.lisp,v 1.30 2007-09-06 14:32:03 espen Exp $
(in-package "GTK")
(when data (setf (tree-model-row-data store iter) data))
iter)
-(defbinding %list-store-insert-after
- (list-store &optional sibling (tree-iter (make-instance 'tree-iter))) nil
+(defbinding %list-store-insert-after () nil
(list-store list-store)
(tree-iter tree-iter)
(sibling (or null tree-iter)))
location))
(defun %tree-path-to-vector (location)
- (let ((indices (%tree-path-get-indices location))
- (depth (%tree-path-get-depth location)))
- (if (null-pointer-p indices)
- #()
- (map-c-vector 'vector #'identity indices 'int depth))))
+ (unless (null-pointer-p location)
+ (let ((indices (%tree-path-get-indices location))
+ (depth (%tree-path-get-depth location)))
+ (if (null-pointer-p indices)
+ #()
+ (map-c-vector 'vector #'identity indices 'int depth)))))
(defmacro %with-tree-path ((var path) &body body)
(let* ((pointer-offset (adjust-offset (size-of 'int) 'pointer))
(coerce
(loop
with iter = (ensure-tree-iter model row)
- for index from 0 to (tree-model-n-columns model)
+ for index from 0 below (tree-model-n-columns model)
collect (tree-model-value model iter index))
'vector))
(column tree-view-column)
(base-column (or null tree-view-column)))
-;;(defbinding tree-view-set-column drag-function ...)
+(define-callback-setter tree-view-set-column-drag-function tree-view boolean
+ (column tree-view-column)
+ (prev tree-view-column)
+ (next tree-view-column))
(defbinding tree-view-scroll-to-point () nil
(tree-view tree-view)
(row-align single-float)
(col-align single-float))
-(defbinding tree-view-set-cursor () nil
- (tree-view tree-view)
- (path tree-path)
- (focus-column tree-view-column)
- (start-editing boolean))
-
-(defbinding tree-view-set-cursor-on-cell () nil
+(defbinding (tree-view-set-cursor "gtk_tree_view_set_cursor_on_cell")
+ (tree-view path &key focus-column focus-cell start-editing) nil
(tree-view tree-view)
(path tree-path)
(focus-column (or null tree-view-column))
(start-path tree-path :out)
(end-path tree-path :out))
-;; (defbinding icon-view-enable-model-drag-source () nil
-;; (icon-view icon-view)
-;; (start-button-mask gdk:modifier-type)
-;; (targets (vector target-entry))
-;; ((length targets) unsigned-int)
-;; (actions gdk:drag-action))
-
-;; (defbinding icon-view-enable-model-drag-dest () nil
-;; (icon-view icon-view)
-;; (targets (vector target-entry))
-;; ((length targets) unsigned-int)
-;; (actions gdk:drag-action))
+ (defbinding icon-view-enable-model-drag-source () nil
+ (icon-view icon-view)
+ (start-button-mask gdk:modifier-type)
+ (targets (vector (inlined target-entry)))
+ ((length targets) unsigned-int)
+ (actions gdk:drag-action))
+
+ (defbinding icon-view-enable-model-drag-dest () nil
+ (icon-view icon-view)
+ (targets (vector (inlined target-entry)))
+ ((length targets) unsigned-int)
+ (actions gdk:drag-action))
(defbinding icon-view-unset-model-drag-source () nil
(icon-view icon-view))