Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
22
Task/Window-creation-X11/Haskell/window-creation-x11.hs
Normal file
22
Task/Window-creation-X11/Haskell/window-creation-x11.hs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import Graphics.X11.Xlib
|
||||
import Control.Concurrent (threadDelay)
|
||||
|
||||
main = do
|
||||
display <- openDisplay ""
|
||||
let defScr = defaultScreen display
|
||||
rw <- rootWindow display defScr
|
||||
|
||||
xwin <- createSimpleWindow display rw
|
||||
0 0 400 200 1
|
||||
(blackPixel display defScr)
|
||||
(whitePixel display defScr)
|
||||
|
||||
setTextProperty display xwin "Rosetta Code: X11 simple window" wM_NAME
|
||||
|
||||
mapWindow display xwin
|
||||
|
||||
sync display False
|
||||
threadDelay (5000000)
|
||||
|
||||
destroyWindow display xwin
|
||||
closeDisplay display
|
||||
Loading…
Add table
Add a link
Reference in a new issue