;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-;; $Id: gobject.lisp,v 1.46 2006/02/09 22:29:01 espen Exp $
+;; $Id: gobject.lisp,v 1.49 2006/02/19 22:24:37 espen Exp $
(in-package "GLIB")
#+glib2.8
(progn
- (defcallback toggle-ref-callback (nil (data pointer) (location pointer) (last-ref-p boolean))
+ (define-callback toggle-ref-callback nil
+ ((data pointer) (location pointer) (last-ref-p boolean))
#+debug-ref-counting
(if last-ref-p
(format t "Object at 0x~8,'0X has no foreign references~%" (sap-int location))
(cache-instance (find-cached-instance location) t)
(cache-instance (find-cached-instance location) nil)))
- (defbinding %object-add-toggle-ref () pointer
+ (defbinding %object-add-toggle-ref (location) pointer
(location pointer)
- ((callback toggle-ref-callback) pointer)
+ (toggle-ref-callback callback)
(nil null))
- (defbinding %object-remove-toggle-ref () pointer
+ (defbinding %object-remove-toggle-ref (location) pointer
(location pointer)
- ((callback toggle-ref-callback) pointer)
+ (toggle-ref-callback callback)
(nil null)))
(defmethod reference-foreign ((class gobject-class) location)
#+debug-ref-counting
(progn
- (defcallback weak-ref-callback (nil (data pointer) (location pointer))
+ (define-callback weak-ref-callback nil ((data pointer) (location pointer))
(format t "Object at 0x~8,'0X being finalized~%" (sap-int location)))
- (defbinding %object-weak-ref () pointer
+ (defbinding %object-weak-ref (location) pointer
(location pointer)
- ((callback weak-ref-callback) pointer)
+ (weak-ref-callback callback)
(nil null)))
(t (call-next-method))))
(defmethod compute-effective-slot-definition-initargs ((class gobject-class) direct-slotds)
- (if (typep (first direct-slotds) 'direct-property-slot-definition)
+ (if (eq (slot-definition-allocation (first direct-slotds)) :property)
(nconc
(list :pname (signal-name-to-string
(most-specific-slot-value direct-slotds 'pname
(object gobject)
(id quark)
(data unsigned-long)
- (destroy-marshal pointer))
+ (destroy-marshal callback))
-(defcallback user-data-destroy-func (nil (id unsigned-int))
+(define-callback user-data-destroy-callback nil ((id unsigned-int))
(destroy-user-data id))
-(export 'user-data-destroy-func)
-
(defun (setf user-data) (data object key)
(%object-set-qdata-full object (quark-intern key)
- (register-user-data data) (callback user-data-destroy-func))
+ (register-user-data data) user-data-destroy-callback)
data)
;; deprecated