[gtk-cffi-cvs] CVS gtk-cffi/g-object
CVS User rklochkov
rklochkov at common-lisp.net
Sat Aug 18 13:55:27 UTC 2012
Update of /project/gtk-cffi/cvsroot/gtk-cffi/g-object
In directory tiger.common-lisp.net:/tmp/cvs-serv14447/g-object
Modified Files:
g-object-class.lisp g-object.lisp g-value.lisp subclass.lisp
Log Message:
Added GtkSwitch GtkEntryCompletion GtkEntryBuffer
--- /project/gtk-cffi/cvsroot/gtk-cffi/g-object/g-object-class.lisp 2012/05/07 09:02:04 1.6
+++ /project/gtk-cffi/cvsroot/gtk-cffi/g-object/g-object-class.lisp 2012/08/18 13:55:27 1.7
@@ -11,7 +11,7 @@
((free-after :initform nil)))
(defcstruct g-object-class
- (type-class g-type-class)
+ (type-class (:struct g-type-class))
(construct-properties :pointer)
(constructor :pointer)
(set-property :pointer)
@@ -71,11 +71,11 @@
(owner-type :ulong))
(defmethod flags ((g-param-spec g-param-spec))
- (foreign-slot-value (pointer g-param-spec) 'g-param-spec 'flags))
+ (foreign-slot-value (pointer g-param-spec) '(:struct g-param-spec) 'flags))
(defmethod g-type ((g-param-spec g-param-spec) &key owner)
(foreign-slot-value (pointer g-param-spec)
- 'g-param-spec (if owner 'owner-type 'type)))
+ '(:struct g-param-spec) (if owner 'owner-type 'type)))
(defun show-properties (g-object)
(let ((gclass (make-instance 'g-object-class :object g-object)))
--- /project/gtk-cffi/cvsroot/gtk-cffi/g-object/g-object.lisp 2012/08/12 17:42:30 1.13
+++ /project/gtk-cffi/cvsroot/gtk-cffi/g-object/g-object.lisp 2012/08/18 13:55:27 1.14
@@ -16,7 +16,7 @@
(:documentation "Lisp wrapper for GObject"))
(defcstruct g-object
- (g-type-instance :pointer) ;; *g-type-instance = g-type
+ (g-type-instance (:pointer (:struct g-type-instance)))
(ref-count :uint)
(g-data :pointer))
@@ -144,7 +144,8 @@
(collect (value
(make-instance
'g-value
- :pointer (mem-aref params 'g-value-struct i))))))
+ :pointer (mem-aref
+ params '(:struct g-value-struct) i))))))
(lisp-return (make-instance 'g-value :pointer return)))
(let ((res (apply lisp-func lisp-params)))
(when (/= (g-type lisp-return) 0)
@@ -160,7 +161,8 @@
closure-ptr))
-(defcfun "g_signal_handler_disconnect" :void (instance g-object) (id :ulong))
+(defcfun "g_signal_handler_disconnect" :void
+ (instance (:pointer (:struct g-object))) (id :ulong))
(defmethod connect ((g-object g-object) c-handler
&key signal data after swapped)
--- /project/gtk-cffi/cvsroot/gtk-cffi/g-object/g-value.lisp 2012/05/07 09:02:04 1.5
+++ /project/gtk-cffi/cvsroot/gtk-cffi/g-object/g-value.lisp 2012/08/18 13:55:27 1.6
@@ -24,7 +24,7 @@
(defcstruct g-value-struct
"GValue struct"
(g-type :ulong)
- (data g-value-data :count 2))
+ (data (:union g-value-data) :count 2))
(defcfun "g_value_init" :pointer (g-value pobject) (type :int))
(defcfun "g_value_set_boolean" :void (g-value pobject) (val :boolean))
@@ -49,8 +49,8 @@
(defmethod gconstructor ((g-value g-value) &key
(value nil value-p) g-type &allow-other-keys)
- (let ((ptr (foreign-alloc 'g-value-struct)))
- (setf (foreign-slot-value ptr 'g-value-struct 'g-type) 0)
+ (let ((ptr (foreign-alloc '(:struct g-value-struct))))
+ (setf (foreign-slot-value ptr '(:struct g-value-struct) 'g-type) 0)
(init-g-value ptr g-type value value-p)
ptr))
@@ -95,7 +95,7 @@
Depends on implementation of GLib/GObject!
Returns integer GType."
(if (null-pointer-p value) 0
- (foreign-slot-value value 'g-value-struct 'g-type)))
+ (foreign-slot-value value '(:struct g-value-struct) 'g-type)))
(defmethod g-type ((g-value g-value) &rest rest)
(declare (ignore rest))
--- /project/gtk-cffi/cvsroot/gtk-cffi/g-object/subclass.lisp 2011/08/08 15:02:01 1.2
+++ /project/gtk-cffi/cvsroot/gtk-cffi/g-object/subclass.lisp 2012/08/18 13:55:27 1.3
@@ -27,8 +27,8 @@
(defcfun g-type-register-static g-type
- (parent-type g-type) (type-name :string) (info g-type-info)
- (flags g-type-flags))
+ (parent-type g-type) (type-name :string)
+ (info (:pointer (:struct g-type-info))) (flags g-type-flags))
(defcfun g-type-register-static-simple g-type
(parent-type g-type) (type-name :string) (class-size :uint)
@@ -42,7 +42,8 @@
(interface-data :pointer))
(defcfun g-type-add-interface-static :void
- (instance-type g-type) (interface-type g-type) (info g-interface-info))
+ (instance-type g-type) (interface-type g-type)
+ (info (:pointer (:struct g-interface-info))))
\ No newline at end of file
More information about the gtk-cffi-cvs
mailing list