X-Git-Url: https://git.distorted.org.uk/~mdw/clg/blobdiff_plain/fb449127b0031d4178cf8dd456c7876a50521669..d0f6c9486b991eb45c3932c76623222c204ea9e5:/gtk/gtkobject.lisp diff --git a/gtk/gtkobject.lisp b/gtk/gtkobject.lisp index 32917ea..be879fa 100644 --- a/gtk/gtkobject.lisp +++ b/gtk/gtkobject.lisp @@ -1,5 +1,5 @@ ;; Common Lisp bindings for GTK+ v2.0 -;; Copyright (C) 1999-2001 Espen S. Johnsen +;; Copyright (C) 1999-2001 Espen S. Johnsen ;; ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public @@ -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 -;; $Id: gtkobject.lisp,v 1.10 2001/10/21 23:18:11 espen Exp $ +;; $Id: gtkobject.lisp,v 1.15 2002/04/02 15:07:33 espen Exp $ (in-package "GTK") @@ -34,8 +34,7 @@ ;;;; Superclass for the gtk class hierarchy (eval-when (:compile-toplevel :load-toplevel :execute) - (init-types-in-library - "/opt/gnome/lib/libgtk-x11-1.3.so" + (init-types-in-library "libgtk-x11-2.0.so" :ignore ("gtk_window_get_type_hint")) (defclass %object (gobject) @@ -48,7 +47,7 @@ &allow-other-keys) (declare (ignore names)) (call-next-method) - (funcall (proxy-class-copy (class-of object)) nil (proxy-location object)) ; inc ref count before sinking + (object-ref object) ; inc ref count before sinking (%object-sink object) (dolist (signal-definition (get-all initargs :signal)) (apply #'signal-connect object signal-definition))) @@ -136,20 +135,15 @@ (:property (find-class 'effective-child-slot-definition)) (t (call-next-method)))) -(defbinding %container-child-get-property () nil - (container container) - (child widget) - (property-name string) - (value gvalue)) - -(defbinding %container-child-set-property () nil - (container container) - (child widget) - (property-name string) - (value gvalue)) - +(progn + (declaim (optimize (ext:inhibit-warnings 3))) + (defun %container-child-get-property (parent child pname gvalue)) + (defun %container-child-set-property (parent child pname gvalue))) + + (defmethod compute-virtual-slot-accessors ((class child-class) (slotd effective-child-slot-definition) direct-slotds) + (with-slots (type) slotd (let ((pname (slot-definition-pname (first direct-slotds))) (type-number (find-type-number type))) @@ -241,8 +235,8 @@ (with-slots (name flags value-type documentation) param (let* ((slot-name (default-slot-name name)) (slot-type (type-from-number value-type #|t|#)) - (accessor - (default-slot-accessor class slot-name slot-type))) + (accessor (default-slot-accessor + child-class slot-name slot-type))) `(,slot-name :allocation :property :pname ,name