anchor.diff:  ;; 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: gdk.lisp,v 1.3 2000-09-04 22:12:45 espen Exp $
  +;; $Id: gdk.lisp,v 1.4 2000-10-01 17:24:05 espen Exp $
   
   
   (in-package "GDK")
  
positive.code: (defun find-event-class (event-type)
    (find-class
     (ecase event-type
       (:expose 'expose-event)
       (:delete 'delete-event))))
  
  (deftype-method alien-copier event (type-spec)
    (declare (ignore type-spec))
  
negative.code:     (float (truncate (* value 65535)))))
  
  (defmethod initialize-instance ((color color) &rest initargs
  				&key red green blue)
    (declare (ignore initargs))
    (call-next-method)
    (with-slots ((%red red) (%green green) (%blue blue)) color
      (setf
       %red (%scale-value red)
       %green (%scale-value green)
       %blue (%scale-value blue))))
  
  
  (defun ensure-color (color)
    (etypecase color
      (null nil)
      (color color)
      (vector
       (make-instance
        'color :red (svref color 0) :green (svref color 1)
        :blue (svref color 2)))))
         
  
    
  