Jump to content

Window creation/X11: Difference between revisions

(→‎Tcl: Added implementation in terms of low-level operations)
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
}
}
 
x unmap $w
}</lang>
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.