[gtk-cffi-cvs] CVS gtk-cffi/gtk
CVS User rklochkov
rklochkov at common-lisp.net
Sat Mar 23 13:14:23 UTC 2013
Update of /project/gtk-cffi/cvsroot/gtk-cffi/gtk
In directory tiger.common-lisp.net:/tmp/cvs-serv6738/gtk
Modified Files:
container.lisp generics.lisp loadlib.lisp package.lisp
range.lisp spin-button.lisp tree-view.lisp
Log Message:
1
--- /project/gtk-cffi/cvsroot/gtk-cffi/gtk/container.lisp 2012/12/24 16:32:05 1.7
+++ /project/gtk-cffi/cvsroot/gtk-cffi/gtk/container.lisp 2013/03/23 13:14:23 1.8
@@ -121,8 +121,9 @@
(defcfun gtk-container-remove :void (container pobject) (widget pobject))
-(defmethod container-remove ((container container) (widget widget))
- (gtk-container-remove container widget))
+(defgeneric container-remove (container widget)
+ (:method ((container container) (widget widget))
+ (gtk-container-remove container widget)))
(defcfun gtk-container-propagate-draw
:void (container pobject) (child pobject) (context :pointer))
--- /project/gtk-cffi/cvsroot/gtk-cffi/gtk/generics.lisp 2012/12/24 16:32:05 1.6
+++ /project/gtk-cffi/cvsroot/gtk-cffi/gtk/generics.lisp 2013/03/23 13:14:23 1.7
@@ -6,6 +6,8 @@
(defgeneric layout-offsets (object)) ;; entry, label, scale
(defgeneric (setf model) (model object)) ;; combo-box, list-store,
;; tree-model-filter
+(defgeneric (setf increments) (value object)) ;; spin-button, range
+(defgeneric (setf range) (value object)) ;; spin-button, range
--- /project/gtk-cffi/cvsroot/gtk-cffi/gtk/loadlib.lisp 2012/07/31 17:57:12 1.6
+++ /project/gtk-cffi/cvsroot/gtk-cffi/gtk/loadlib.lisp 2013/03/23 13:14:23 1.7
@@ -21,7 +21,7 @@
(unless (find :gtk *features*)
(push :gtk *features*)
(define-foreign-library :gtk
- (:unix "libgtk-3.so.0") ;libgtk-x11-2.0.so")
+ (:unix (:or "libgtk-3.so.0" "libgtk-3.so"))
(:windows "libgtk-win32-3-0.dll"))
(use-foreign-library :gtk)))
--- /project/gtk-cffi/cvsroot/gtk-cffi/gtk/package.lisp 2012/12/24 16:32:05 1.31
+++ /project/gtk-cffi/cvsroot/gtk-cffi/gtk/package.lisp 2013/03/23 13:14:23 1.32
@@ -11,7 +11,8 @@
(:use #:common-lisp #:alexandria #:iterate
#:cffi-objects #:g-object-cffi #:g-lib-cffi #:gdk-cffi
#:gtk-cffi-utils)
- (:shadow #:image #:window #:switch)
+ (:shadow #:image #:window #:switch) ; gdk
+ (:shadow #:maximize) ; iterate
(:export
;;;; common
#:gtk-init
@@ -610,7 +611,20 @@
#:rules-hint
#:headers-visible
#:hover-selection
+ #:search-equal-func #:tooltip-column
+ #:search-entry
+ #:row-sepearator-func
+ #:fixed-height-mode
+ #:search-position-func
+ #:enable-tree-lines
+ #:grid-lines
+ #:enable-search
;; tree-view methods
+ #:is-rubber-banding-active
+ #:create-row-drag-icon
+ #:unset-rows-drag-source
+ #:unset-rows-drag-dest
+ #:bin-window
#:append-column
#:insert-column
#:selection
@@ -618,7 +632,12 @@
#:column
#:cursor
#:remove-column
-
+ #:row-expanded #:expand-row
+ #:expand-to-path #:collapse-row
+ #:expand-all #:row-activated
+ #:scroll-to-point #:collapse-all
+ #:move-column-after
+
#:tree-view-column
;; slots
#:sort-column-id
--- /project/gtk-cffi/cvsroot/gtk-cffi/gtk/range.lisp 2012/05/07 09:02:04 1.1
+++ /project/gtk-cffi/cvsroot/gtk-cffi/gtk/range.lisp 2013/03/23 13:14:23 1.2
@@ -22,19 +22,17 @@
(defcfun gtk-range-set-increments :void
(range pobject) (step :double) (page :double))
-(defgeneric (setf increments) (increments range)
- (:method (increments (range range))
- (destructuring-bind (step page) increments
- (gtk-range-set-increments range step page))
- increments))
+(defmethod (setf increments) (increments (range range))
+ (destructuring-bind (step page) increments
+ (gtk-range-set-increments range step page))
+ increments)
(defcfun gtk-range-set-range :void
(range pobject) (min :double) (max :double))
-(defgeneric (setf range) (min-max range)
- (:method (min-max (range range))
- (destructuring-bind (min max) min-max
+(defmethod (setf range) (min-max (range range))
+ (destructuring-bind (min max) min-max
(gtk-range-set-increments range min max))
- min-max))
+ min-max)
(defcfun gtk-range-get-slider-range :void
(range pobject) (start :pointer) (end :pointer))
--- /project/gtk-cffi/cvsroot/gtk-cffi/gtk/spin-button.lisp 2012/08/21 19:48:02 1.1
+++ /project/gtk-cffi/cvsroot/gtk-cffi/gtk/spin-button.lisp 2013/03/23 13:14:23 1.2
@@ -58,10 +58,9 @@
(with-foreign-outs-list ((step :double) (page :double)) :ignore
(gtk-spin-button-get-increments spin-button step page))))
-(defgeneric (setf increments) (value spin-button)
- (:method (value (spin-button spin-button))
- (destructuring-bind (step page) value
- (gtk-spin-button-set-increments spin-button step page))))
+(defmethod (setf increments) (value (spin-button spin-button))
+ (destructuring-bind (step page) value
+ (gtk-spin-button-set-increments spin-button step page)))
(save-setter spin-button increments)
(defcfun gtk-spin-button-set-range :void (spin-button pobject)
@@ -74,10 +73,9 @@
(with-foreign-outs-list ((min :double) (max :double)) :ignore
(gtk-spin-button-get-range spin-button min max))))
-(defgeneric (setf range) (value spin-button)
- (:method (value (spin-button spin-button))
- (destructuring-bind (min max) value
- (gtk-spin-button-set-range spin-button min max))))
+(defmethod (setf range) (value (spin-button spin-button))
+ (destructuring-bind (min max) value
+ (gtk-spin-button-set-range spin-button min max)))
(save-setter spin-button range)
--- /project/gtk-cffi/cvsroot/gtk-cffi/gtk/tree-view.lisp 2012/12/31 13:33:38 1.7
+++ /project/gtk-cffi/cvsroot/gtk-cffi/gtk/tree-view.lisp 2013/03/23 13:14:23 1.8
@@ -19,10 +19,13 @@
(defmethod gconstructor ((tree-view tree-view)
&key model &allow-other-keys)
+ (initialize tree-view 'model)
(if model
(gtk-tree-view-new-with-model model)
(gtk-tree-view-new)))
+(defcenum tree-view-grid-lines :nobe :horizontal :vertical :both)
+
(defslots tree-view
level-indentation :int
show-expanders :boolean
@@ -37,8 +40,17 @@
rubber-banding :boolean
search-column :int
expander-column pobject
- reorderable :boolean)
+ reorderable :boolean
+ enable-search :boolean
+ search-entry pobject
+ fixed-height-mode :boolean
+ enable-tree-lines :boolean
+ grid-lines tree-view-grid-lines
+ tooltip-column :int)
+
+(defcenum tree-view-drop-position
+ :before :after :into-or-before :into-or-after)
(deffuns tree-view
(remove-column :int (column pobject))
@@ -57,13 +69,18 @@
(expand-row :void (path tree-path) (open-all :boolean))
(collapse-row :void (path tree-path))
(row-expanded :boolean (path tree-path))
- (:get bin-window pobject))
-
-
+ (:get bin-window pobject)
+ (unset-rows-drag-source :void)
+ (unset-rows-drag-dest :void)
+ (create-row-drag-icon :pointer (path tree-path))
+ (:get search-equal-func :pointer)
+ (:get search-position-func :pointer)
+ (:get row-separator-func :pointer)
+ (is-rubber-banding-active :boolean))
(defcfun gtk-tree-view-scroll-to-cell :void
- (tree-view pobject) (path ptree-path) (column pobject) (use-align :boolean)
+ (tree-view pobject) (path tree-path) (column pobject) (use-align :boolean)
(row-align :float) (col-align :float))
(defgeneric scroll-to-cell (tree-view path column &key row-align col-align)
@@ -93,8 +110,8 @@
(save-setter tree-view columns)
-(defcfun gtk-tree-view-get-cursor :void (view pobject)
- (path :pointer) (column :pointer))
+(defcfun gtk-tree-view-get-cursor :void
+ (view pobject) (path :pointer) (column :pointer))
(defgeneric cursor (tree-view)
(:method ((tree-view tree-view))
@@ -230,6 +247,118 @@
(tree-view pobject) (targets (carray (struct target-entry)))
(n-targets :int) (action drag-action))
+(defgeneric enable-model-drag-dest (tree-view targets action)
+ (:method ((tree-view tree-view) targets action)
+ (gtk-tree-view-enable-model-drag-dest tree-view targets
+ (length targets) action)))
+
+(defcfun gtk-tree-view-enable-model-drag-source :void
+ (tree-view pobject) (start-button-mask modifier-type)
+ (targets (carray (struct target-entry)))
+ (n-targets :int) (action drag-action))
+
+(defgeneric enable-model-drag-source (tree-view start-button-mask
+ targets action)
+ (:method ((tree-view tree-view) start-button-mask targets action)
+ (gtk-tree-view-enable-model-drag-source tree-view start-button-mask targets
+ (length targets) action)))
+
+(defcfun gtk-tree-view-get-drag-dest-row :void (tree-view pobject)
+ (tree-path :pointer) (pos :pointer))
+
+(defgeneric drag-dest-row (tree-view)
+ (:method ((tree-view tree-view))
+ (with-foreign-outs-list ((path 'tree-path) (pos 'tree-view-drop-position))
+ :ignore
+ (gtk-tree-view-get-drag-dest-row tree-view path pos))))
+
+(defcfun gtk-tree-view-set-drag-dest-row :void (tree-view pobject)
+ (tree-path tree-path) (pos tree-view-drop-position))
+
+(defgeneric (setf drag-dest-row) (value tree-view)
+ (:method (value (tree-view tree-view))
+ (destructuring-bind (path pos) value
+ (gtk-tree-view-set-drag-dest-row tree-view path pos))))
+
+(defcfun gtk-tree-view-get-dest-row-at-pos :void (tree-view pobject)
+ (x :int) (y :int)
+ (tree-path :pointer) (pos :pointer))
+
+(defgeneric dest-row-at-post (tree-view x y)
+ (:method ((tree-view tree-view) x y)
+ (with-foreign-outs-list ((path 'tree-path) (pos 'tree-view-drop-position))
+ :ignore
+ (gtk-tree-view-get-dest-row-at-pos tree-view x y path pos))))
+
+(defcfun gtk-tree-view-set-search-equal-func :int
+ (tree-view pobject)
+ (func pfunction) (data pdata) (destroy pfunction))
+
+(defcallback cb-search-equal-func :boolean
+ ((tree-view pobject) (column :int) (key :string)
+ (tree-iter (struct tree-iter)) (data pdata))
+ (funcall data tree-view column key tree-iter))
+
+(defgeneric (setf search-equal-func) (func tree-view &key data destroy-notify)
+ (:method (func (tree-view tree-view) &key data destroy-notify)
+ (set-callback tree-view gtk-tree-view-set-search-equal-func
+ cb-search-equal-func func data destroy-notify)))
+
+(defcfun gtk-tree-view-set-search-position-func :int
+ (tree-view pobject)
+ (func pfunction) (data pdata) (destroy pfunction))
+
+(defcallback cb-search-position-func :boolean
+ ((tree-view pobject) (search-dialog pobject) (data pdata))
+ (funcall data tree-view search-dialog))
+
+(defgeneric (setf search-position-func) (func tree-view &key data destroy-notify)
+ (:method (func (tree-view tree-view) &key data destroy-notify)
+ (set-callback tree-view gtk-tree-view-set-search-position-func
+ cb-search-position-func func data destroy-notify)))
+
+(defcfun gtk-tree-view-set-row-separator-func :int
+ (tree-view pobject)
+ (func pfunction) (data pdata) (destroy pfunction))
+
+(defcallback cb-row-separator-func :boolean
+ ((tree-view pobject) (tree-iter (struct tree-iter)) (data pdata))
+ (funcall data tree-view tree-iter))
+
+(defgeneric (setf row-separator-func) (func tree-view &key data destroy-notify)
+ (:method (func (tree-view tree-view) &key data destroy-notify)
+ (set-callback tree-view gtk-tree-view-set-row-separator-func
+ cb-row-separator-func func data destroy-notify)))
+
+(defcfun gtk-tree-view-set-tooltip-row :void
+ (tree-view pobject) (tooltip pobject) (tree-path tree-path))
+
+(defgeneric (setf tooltip-row) (value tree-view tooltip)
+ (:method (value (tree-view tree-view) tooltip)
+ (gtk-tree-view-set-tooltip-row tree-view tooltip value)))
+
+(defcfun gtk-tree-view-set-tooltip-cell :void
+ (tree-view pobject) (tooltip pobject) (tree-path tree-path) (column pobject)
+ (cell pobject))
+
+(defgeneric (setf tooltip-cell) (value tree-view tooltip)
+ (:method (value (tree-view tree-view) tooltip)
+ (destructuring-bind (path column cell) value
+ (gtk-tree-view-set-tooltip-cell tree-view tooltip path column cell))))
+
+(defcfun gtk-tree-view-get-tooltip-context :boolean
+ (tree-view pobject) (ptr-x :pointer) (ptr-y :pointer) (keyboard-tip :boolean)
+ (model :pointer) (path :pointer) (tree-iter (struct tree-iter :out t)))
+
+(defgeneric tooltip-context (tree-view ptr-x ptr-y keyboard-tip)
+ (:method ((tree-view tree-view) ptr-x ptr-y keyboard-tip)
+ (let ((tree-iter (make-instance 'tree-iter)))
+ (multiple-value-bind (res model path)
+ (with-foreign-outs ((model 'pobject) (path 'pobject)) :return
+ (gtk-tree-view-get-tooltip-context
+ tree-view ptr-x ptr-y keyboard-tip model path tree-iter))
+ (when res (list model path tree-iter))))))
+
(init-slots tree-view (on-select)
(when on-select
(setf (gsignal (selection tree-view) :changed)
More information about the gtk-cffi-cvs
mailing list