Skip to content

Instantly share code, notes, and snippets.

@boxp
Created May 6, 2013 15:45
Show Gist options
  • Save boxp/5525956 to your computer and use it in GitHub Desktop.
Save boxp/5525956 to your computer and use it in GitHub Desktop.
jcursesのexampleをclojureで写経したもの。結局jcursesをスタンドアロン出来ず、使わないので放置。
(ns grimoire.jcurses
(:import (jcurses.system CharColor)
(jcurses.widgets DefaulLayoutManager)
(jcurses.widgets WidgetsConstants)
(jcurses.widgets Window)))
(def lbl
(doto
(Label.
"All gone to hell!"
(CharColor.
(.BLACK CharColor)
(.GREEN CharColor)))))
(def mgr
(doto
(DefaulLayoutManager.)
(.bindToContainer
(.getRootPanel w))
(.addWidget
(lbl 0 0 100 100 (.ALIGNMENT_CENTER WidgetsConstants) (.ALIGNMENT_CENTER WidgetsConstants)))))
(def w
(doto
(Window. 100 100 true "All gone to hell!")
(.show)))
(do
(.currentThread Thread)
(.sleep Thread 3000)
(.close w))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment