chiark
/
gitweb
/
~mdw
/
clg
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
125ceb5
)
Added bindings to GObject ref/unref functions
author
espen
<espen>
Sun, 24 Mar 2002 12:50:30 +0000
(12:50 +0000)
committer
espen
<espen>
Sun, 24 Mar 2002 12:50:30 +0000
(12:50 +0000)
glib/gobject.lisp
patch
|
blob
|
blame
|
history
diff --git
a/glib/gobject.lisp
b/glib/gobject.lisp
index b42ee7ddb25c2eeca66dc6e7c823ee304ba4915d..a3f387d32945862750b999656829c21bb2b905ea 100644
(file)
--- a/
glib/gobject.lisp
+++ b/
glib/gobject.lisp
@@
-15,7
+15,7
@@
;; License along with this library; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
;; License along with this library; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-;; $Id: gobject.lisp,v 1.1
0 2002/01/20 14:09:52
espen Exp $
+;; $Id: gobject.lisp,v 1.1
1 2002/03/24 12:50:30
espen Exp $
(in-package "GLIB")
(in-package "GLIB")
@@
-25,24
+25,33
@@
(defclass gobject (ginstance)
()
(:metaclass ginstance-class)
(:alien-name "GObject")
()
(:metaclass ginstance-class)
(:alien-name "GObject")
- (:
ref "g_object_ref"
)
- (:
unref "g_object_unref"
)))
+ (:
copy %object-ref
)
+ (:
free %object-unref
)))
(defmethod initialize-instance ((object gobject) &rest initargs)
(declare (ignore initargs))
(defmethod initialize-instance ((object gobject) &rest initargs)
(declare (ignore initargs))
- (setf
- (slot-value object 'location)
- (%gobject-new (type-number-of object)))
-; (funcall (proxy-class-copy (class-of object)) nil (proxy-location object))
- (call-next-method)
-; (funcall (proxy-class-free (class-of object)) nil (proxy-location object))
- )
+ (setf (slot-value object 'location) (%gobject-new (type-number-of object)))
+ (call-next-method))
(defbinding (%gobject-new "g_object_new") () pointer
(type type-number)
(nil null))
(defbinding (%gobject-new "g_object_new") () pointer
(type type-number)
(nil null))
+(defbinding %object-ref (type location) pointer
+ (location pointer))
+
+(defbinding %object-unref (type location) nil
+ (location pointer))
+
+
+(defun object-ref (object)
+ (%object-ref nil (proxy-location object)))
+
+(defun object-unref (object)
+ (%object-unref nil (proxy-location object)))
+
+
;;;; Property stuff
;;;; Property stuff
@@
-113,6
+122,8
@@
(defclass effective-gobject-slot-definition
; (class pointer)
; (name string))
; (class pointer)
; (name string))
+(defun signal-name-to-string (name)
+ (substitute #\_ #\- (string-downcase (string name))))
(defmethod initialize-instance :after ((slotd direct-gobject-slot-definition)
&rest initargs &key pname)
(defmethod initialize-instance :after ((slotd direct-gobject-slot-definition)
&rest initargs &key pname)