Anonymous user
Window creation/X11: Difference between revisions
→Demonstration script: Add comments
(→Tcl: Added implementation in terms of low-level operations) |
(→Demonstration script: Add comments) |
||
Line 311:
package require x
# With a display connection open, create and map a window
x display {
set w [x window 10 10 100 100 KeyPress]
Line 317 ⟶ 318:
x eventloop e {
expose {
# Paint the window
x fillrect $w 20 20 10 10
x text $w 10 50 "Hello, World!"
}
key {
# Quit the event loop
break
}
}
}</lang>
|