-; (defmethod initialize-instance ((event event) &rest initargs &key)
-; (declare (ignore initargs))
-; (call-next-method)
-; )
-
-(defun find-event-class (event-type)
- (find-class
- (ecase event-type
- (:delete 'delete-event)
- (:destroy 'destroy-event)
- (:expose 'expose-event)
- (:motion-notify 'motion-notify-event)
- (:button-press 'button-press-event)
- (:2button-press '2-button-press-event)
- (:3button-press '3-button-press-event)
- (:button-release 'button-release-event)
- (:key-press 'key-press-event)
- (:key-release 'key-release-event)
- (:enter-notify 'enter-notify-event)
- (:leave-notify 'leave-notify-event)
- (:focus-change 'focus-change-event)
- (:configure 'configure-event)
- (:map 'map-event)
- (:unmap 'unmap-event)
- (:property-notify 'property-notify-event)
- (:selection-clear 'selection-clear-event)
- (:selection-request 'selection-request-event)
- (:selection-notify 'selection-notify-event)
- (:proximity-in 'proximity-in-event)
- (:proximity-out 'proximity-out-event)
- (:drag-enter 'drag-enter-event)
- (:drag-leave 'drag-leave-event)
- (:drag-motion 'drag-motion-event)
- (:drag-status 'drag-status-event)
- (:drop-start 'drop-start-event)
- (:drop-finished 'drop-finished-event)
- (:client-event 'client-event-event)
- (:visibility-notify 'visibility-notify-event)
- (:no-expose 'no-expose-event)
- (:scroll 'scroll-event))))
-
-
-(deftype-method alien-copier event (type-spec)
- (declare (ignore type-spec))
- '%event-copy)
-
-(deftype-method alien-deallocator event (type-spec)
- (declare (ignore type-spec))
- '%event-free)
-
-(deftype-method translate-from-alien
- event (type-spec location &optional (alloc :reference))
- `(let ((location ,location))
- (unless (null-pointer-p location)
- (let ((event-class
- (find-event-class
- (funcall (get-reader-function 'event-type) location 0))))
- ,(ecase alloc
- (:copy '(ensure-alien-instance event-class location))
- (:static '(ensure-alien-instance event-class location :static t))
- (:reference '(ensure-alien-instance
- event-class (%event-copy location))))))))
-
-
-(define-foreign event-poll-fd () int)
-
-(define-foreign ("gdk_events_pending" events-pending-p) () boolean)
-
-(define-foreign event-get () event)
-
-(define-foreign event-peek () event)
-
-(define-foreign event-get-graphics-expose () event
- (window window))