-(deftype-method translate-from-alien
- event (type-spec location &optional weak-ref)
- (declare (ignore type-spec))
- `(let ((location ,location))
- (unless (null-pointer-p location)
- (ensure-proxy-instance (%type-of-event location) location ,weak-ref))))
-
-
-;;;; Metaclass for event classes
-
-(eval-when (:compile-toplevel :load-toplevel :execute)
- (defclass event-class (proxy-class)
- ((event-type :reader event-class-type)))
-
-
- (defmethod shared-initialize ((class event-class) names
- &rest initargs &key type)
- (declare (ignore initargs names))
- (call-next-method)
- (setf (slot-value class 'event-type) (first type))
- (setf (gethash (first type) *event-classes*) class))
-
-
- (defmethod validate-superclass
- ((class event-class) (super pcl::standard-class))
- (subtypep (class-name super) 'event)))
-
-
-;;;;