       (.enableLiveMode gui true))))
 
 (defn new-dll-name
+  "Get the name of the new dll file that will be created in the
+   MM application directory."
   [dll]
   (let [name (.getName dll)]
     (if (JavaUtils/isWindows)

(ns DLLAutoReloader.core
  (:use [clojure.java.io :only (file copy)]
        [clojure.data :only (diff)]
        [org.micromanager.mm :only (edt load-mm mmc core gui)]
        [clojure.pprint :only (pprint)])
  (:import (javax.swing JButton JFrame JLabel JWindow)
           (java.awt Color)
           (java.awt.event ActionListener)

      (.add path-button))
    frame))

(defn show-plugin
  "Show the plugin at a given location."
  [app]
  (load-mm app)
  (when-not @control-frame
    (reset! control-frame (startup)))
  (.show @control-frame))

(defn handle-exit
  "Runs when application exits."
  []
  (stop))

;; testing

(defn test-lib
  "Get the first module with loaded devices."
  []
  (first (keys (devices-in-each-module))))

(defn test-unload
  "Attemt to unload a the test library."
  []
  (core unloadLibrary (test-lib)))
