X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/clg/blobdiff_plain/112ac1d33aa8f9b7f3d2f9542d15431f152b1d35..25d755bb92d7a70ce26cc4df27f6779dc24889e8:/gtk/gtkobject.lisp diff --git a/gtk/gtkobject.lisp b/gtk/gtkobject.lisp index 68c2db9..e88046c 100644 --- a/gtk/gtkobject.lisp +++ b/gtk/gtkobject.lisp @@ -20,22 +20,12 @@ ;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -;; $Id: gtkobject.lisp,v 1.27 2005-04-23 16:48:52 espen Exp $ +;; $Id: gtkobject.lisp,v 1.33 2006-02-28 16:34:37 espen Exp $ (in-package "GTK") -;;;; Misc utils - -; (defun name-to-string (name) -; (substitute #\_ #\- (string-downcase (string name)))) - -; (defun string-to-name (name &optional (package "KEYWORD")) -; (intern (substitute #\- #\_ (string-upcase name)) package)) - - - ;;;; Superclass for the gtk class hierarchy (eval-when (:compile-toplevel :load-toplevel :execute) @@ -52,13 +42,15 @@ (defclass %object (gobject) (defmethod initialize-instance ((object %object) &rest initargs &key signal) (declare (ignore signal)) (call-next-method) - (reference-foreign (class-of object) (proxy-location object)) (dolist (signal-definition (get-all initargs :signal)) (apply #'signal-connect object signal-definition))) (defmethod initialize-instance :around ((object %object) &rest initargs) (declare (ignore initargs)) (call-next-method) + ;; Add a temorary reference which will be removed when the object is + ;; sinked + (reference-foreign (class-of object) (foreign-location object)) (%object-sink object)) (defbinding %object-sink () nil @@ -123,18 +115,12 @@ (defmethod effective-slot-definition-class ((class child-class) &rest initargs) (t (call-next-method)))) (defmethod compute-effective-slot-definition-initargs ((class child-class) direct-slotds) - (if (eq (most-specific-slot-value direct-slotds 'allocation) :property) + (if (eq (slot-definition-allocation (first direct-slotds)) :property) (nconc (list :pname (most-specific-slot-value direct-slotds 'pname)) (call-next-method)) (call-next-method))) -(progn - #+cmu(declaim (optimize (inhibit-warnings 3))) - #+sbcl(declaim (muffle-conditions compiler-note)) - (defun %container-child-get-property (parent child pname gvalue)) - (defun %container-child-set-property (parent child pname gvalue))) - (defmethod initialize-internal-slot-functions ((slotd effective-child-slot-definition)) (let ((type (slot-definition-type slotd))