                   (import com.apple.eawt.FullScreenAdapter))))
 
 (def fullscreen-windows (atom #{}))
+
+;; key binding
 
 (defn bind-key
   "Maps an input-key on a swing component to an action,

      (exit-full-screen! window)
      (full-screen! window))))

(defmacro new-mac-enable-full-screen [window]
  `(do (FullScreenUtilities/setWindowCanFullScreen ~window true)
       (FullScreenUtilities/addFullScreenListenerTo ~window
           (proxy [FullScreenAdapter] []
             (windowEnteringFullScreen [_#]
               (.setBounds ~window 100 100 400 400))
             (windowEnteredFullScreen [_#]
               (swap! fullscreen-windows conj ~window))
             (windowExitingFullScreen [_#]
               (println "exiting"))
             (windowExitedFullScreen [_#]
               (swap! fullscreen-windows disj ~window))))))    

(defmacro compile-when [test & body]
  (when test
    `(do @~body)))

(defn setup-fullscreen
  "Endows the given window with the ability to enter and exit full screen.
   Key commands are F for enter/exit and ESCAPE also for exit." 
  [window]
  (compile-when new-mac-full-screen
    (new-mac-enable-full-screen window))
  (bind-window-keys window ["F"] #(toggle-full-screen! window))
  (bind-window-keys window ["ESCAPE"] #(exit-full-screen! window)))


           (javax.swing AbstractAction JButton JCheckBox JFrame JComponent KeyStroke))
  (:require [slide-explorer.utils :as utils]))


(defn can-eval? [form]
  (try
