anchor.diff:                                                     'glop:map-in-event
                                                      'glop:map-out-event)))))
            (:wm-set-focus
  -          (format t "WM_SETFOCUS~%")
             (return-from window-proc 0)))
          ;; (:wm-sys-command
          ;;  (format t "WM_SYSCOMMAND~%")))
  
positive.code:   (logand (ash value -16) #xFFFF))
  
  (defun win32-lookup-key (w-param l-param)
    (let ((key (foreign-enum-keyword 'vkey-type w-param :errorp nil)))
      (or key
          (with-foreign-object (kbd-state :char 256)
            (when (get-keyboard-state kbd-state)
              (with-foreign-object (buffer :int16)
                (unless (/= (to-ascii w-param l-param kbd-state buffer 0) 1)
                  (code-char (mem-ref buffer :char)))))))))
  
  
  (let ((last-x 0)
  
negative.code:                                              :button 2))
            (return-from window-proc 0))
           (:wm-key-up
            (multiple-value-bind (keysym string) (win32-lookup-key w-param l-param)
              (setf %event% (glop::make-instance 'glop:key-release-event
                                                 :keycode  w-param
                                                 :keysym keysym
                                                 :string string)))
            (return-from window-proc 0))
           (:wm-key-down
            (multiple-value-bind (keysym string) (win32-lookup-key w-param l-param)
              (setf %event% (glop::make-instance 'glop:key-press-event
                                                 :keycode  w-param
                                                 :keysym keysym
                                                 :string string)))
            (return-from window-proc 0))
           (:wm-mouse-wheel
            (setf %event% (glop::make-instance 'glop:button-press-event
                                               :button (if (> w-param 0)
                                                           4 5)))
            (return-from window-proc 0))
           (:wm-size
            ;; XXX: other part of above ugly hack...
            ;; Not sure why but it looks WM_SIZE doesn't get out of window-proc
            ;; until mouse button is released...
  