[gtk-cffi-cvs] CVS gtk-cffi/gtk

CVS User rklochkov rklochkov at common-lisp.net
Fri Aug 24 19:27:54 UTC 2012


Update of /project/gtk-cffi/cvsroot/gtk-cffi/gtk
In directory tiger.common-lisp.net:/tmp/cvs-serv31128/gtk

Modified Files:
	gtk-cffi.asd text-buffer.lisp text-tag.lisp text-view.lisp 
	tree-model.lisp 
Log Message:
Fixed CFFI-OBJECTS:FREE-PTR generic usage (now specialized with EQL)


--- /project/gtk-cffi/cvsroot/gtk-cffi/gtk/gtk-cffi.asd	2012/08/22 19:00:13	1.27
+++ /project/gtk-cffi/cvsroot/gtk-cffi/gtk/gtk-cffi.asd	2012/08/24 19:27:54	1.28
@@ -319,7 +319,7 @@
 (defsystem gtk-cffi-text-view
   :description "Interface to GTK/Glib via CFFI"
   :author "Roman Klochkov <kalimehtar at mail.ru>"
-  :version "0.1"
+  :version "0.99"
   :license "LLGPL"
   :depends-on (gtk-cffi-text-buffer)
   :components
--- /project/gtk-cffi/cvsroot/gtk-cffi/gtk/text-buffer.lisp	2012/08/22 19:00:13	1.12
+++ /project/gtk-cffi/cvsroot/gtk-cffi/gtk/text-buffer.lisp	2012/08/24 19:27:54	1.13
@@ -14,7 +14,7 @@
                          &allow-other-keys)
   (gtk-text-tag-table-new))
 
-(defgtkfuns text-tag-table
+(deffuns text-tag-table
   (add :void (tag pobject))
   ((text-tag-table-remove . remove) :void (tag pobject))
   (lookup pobject (name :string))
@@ -38,10 +38,10 @@
   (u13 :int)
   (u14 :pointer))
 
-(defcfun gtk-text-iter-free :void (iter pobject))
+;(defcfun gtk-text-iter-free :void (iter pobject))
 
-(defmethod free-struct ((class (eql 'text-iter)) value)
-  (gtk-text-iter-free value))
+;(defmethod free-struct ((class (eql 'text-iter)) value)
+;  (gtk-text-iter-free value))
 
 (defslots text-iter
   line :int
--- /project/gtk-cffi/cvsroot/gtk-cffi/gtk/text-tag.lisp	2012/08/22 19:00:13	1.5
+++ /project/gtk-cffi/cvsroot/gtk-cffi/gtk/text-tag.lisp	2012/08/24 19:27:54	1.6
@@ -1,3 +1,9 @@
+;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
+;;;
+;;; text-tag.lisp --- GtkTextTag
+;;;
+;;; Copyright (C) 2012, Roman Klochkov <kalimehtar at mail.ru>
+;;;
 (in-package :gtk-cffi)
 
 (defclass text-tag (g-object)
--- /project/gtk-cffi/cvsroot/gtk-cffi/gtk/text-view.lisp	2012/08/22 19:00:13	1.6
+++ /project/gtk-cffi/cvsroot/gtk-cffi/gtk/text-view.lisp	2012/08/24 19:27:54	1.7
@@ -1,6 +1,6 @@
 ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
 ;;;
-;;; text-view.lisp --- GtkTextView
+;;; text-view.lisp --- GtkTextView, GtkTextChildAnchor
 ;;;
 ;;; Copyright (C) 2012, Roman Klochkov <kalimehtar at mail.ru>
 ;;;
--- /project/gtk-cffi/cvsroot/gtk-cffi/gtk/tree-model.lisp	2012/08/12 17:42:30	1.13
+++ /project/gtk-cffi/cvsroot/gtk-cffi/gtk/tree-model.lisp	2012/08/24 19:27:54	1.14
@@ -1,6 +1,13 @@
+;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
+;;;
+;;; tree-model.lisp --- GtkTreeModel, GtkTreePath, GtkTreeIter, 
+;;;                     GtkTreeRowReference
+;;;
+;;; Copyright (C) 2012, Roman Klochkov <kalimehtar at mail.ru>
+;;;
 (in-package #:gtk-cffi)
 
-;; I think, that tree-path as pointer is not useful on Lisp side
+;; I think, that tree-path as a pointer is not useful on Lisp side
 ;; so it will be represented as a lisp array
 
 (defcfun gtk-tree-path-new :pointer)
@@ -41,30 +48,30 @@
 (defmethod translate-to-foreign ((value string) (tree-path tree-path))
   (gtk-tree-path-new-from-string value))
 
-(defmethod free-ptr ((tree-path tree-path) ptr)
+(defmethod free-ptr ((tree-path (eql 'tree-path)) ptr)
   (gtk-tree-path-free ptr))
 
 
-(defclass tree-row (object)
+(defclass tree-row-reference (object)
   ())
 
-(defcfun "gtk_tree_row_reference_new"
-  :pointer (model pobject) (path pobject))
+(defcfun gtk-tree-row-reference-new :pointer (model pobject) (path tree-path))
 
-(defcfun "gtk_tree_row_reference_free"
-  :void (row pobject))
+(defcfun gtk-tree-row-reference-free :void (row pobject))
 
-(defmethod gconstructor ((tree-row tree-row)
+(defmethod gconstructor ((tree-row-reference tree-row-reference)
                          &key model path &allow-other-keys)
   (gtk-tree-row-reference-new model path))
 
-(defmethod free :before ((tree-row tree-row))
-  (gtk-tree-row-reference-free tree-row))
+(defmethod free-ptr ((class (eql 'tree-row-reference)) ptr)
+  (gtk-tree-row-reference-free ptr))
 
-(defcfun "gtk_tree_row_reference_copy" (object tree-row) (row pobject))
-
-(defmethod copy ((tree-row tree-row))
-  (gtk-tree-row-reference-copy tree-row))
+(deffuns tree-row-reference
+  (copy (object tree-row-reference))
+  (:get model pobject)
+  (:get path tree-path)
+  (valid :boolean))
+  
 
 (defcstruct* tree-iter
     "GtkTreeIter"
@@ -73,30 +80,6 @@
   (u2 :pointer)
   (u3 :pointer))
 
-;(defclass tree-iter (object)
-;  ())
-
-;(defmethod gconstructor ((tree-iter tree-iter)
-;                         &key &allow-other-keys)
-;  (foreign-alloc 'tree-iter-struct))
-
-;(defmethod copy ((tree-iter tree-iter))
-;  (let* ((res (make-instance 'tree-iter))
-;         (ptr (pointer tree-iter))
-;         (new-ptr (pointer res)))
-;    (mapc (lambda (x)
-;              (setf (foreign-slot-value new-ptr 'tree-iter-struct x)
-;                    (foreign-slot-value ptr 'tree-iter-struct x)))
-;            (foreign-slot-names 'tree-iter-struct))
-;    res))
-
-(defcfun "gtk_tree_iter_free" :void (iter pobject))
-
-;(defmethod free-struct ((class (eql 'tree-iter)) value)
-;  (gtk-tree-iter-free value))
-
-;(defmethod free :before ((tree-iter tree-iter))
-;  (gtk-tree-iter-free tree-iter))
 
 (defclass tree-model (object)
   ((columns :accessor columns :initarg :columns)





More information about the gtk-cffi-cvs mailing list