doc | ||
src/swingbox_clj | ||
test/swingbox_clj | ||
.gitignore | ||
CHANGELOG.md | ||
LICENSE | ||
project.clj | ||
README.md |
swingbox-clj
A Clojure library designed to allow opening HTML windows from Clojure.
Rationale
It's pretty hard to visualise data or create desktop UI components for Clojure applications. This is part of an exploration to see whether an HTML component can help.
There is a supposedly open source Java wrapper for chromium, java-cef, but it doesn't build (for me, following the instructions, although it does appear to be under current development); There's another that's commercial, jxbrowser but it isn't useful when trying to develop open source components. SwingBox is pure Java and open source so I thought it worth playing with.
This is simple and within limitations works. The browser isn't live (at least not at this stage), clicking links does not work and does not reload pages. Also, JavaScript is not interpreted.
Usage
(show-in-window "From a string" "Hello")
(show-in-window "From the tinkerweb" "https://www.journeyman.cc/~simon/")
(show-in-window "From Hiccup" [:html [:head [:title "Test from Hiccup"]][:body [:h1 "Excuse me"] [:p "This is hiccup"]]])
(set-visible (set-content-markdown (create-window "From a Markdown file") "README.md"))
License
Copyright © 2019 FIXME
Distributed under the GNU Lesser General Public Licence 3.0 or (at your option) any later version, following the license of SwingBox.