Created
May 6, 2013 15:45
-
-
Save boxp/5525956 to your computer and use it in GitHub Desktop.
jcursesのexampleをclojureで写経したもの。結局jcursesをスタンドアロン出来ず、使わないので放置。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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