Window creation/X11: Difference between revisions
Content added Content deleted
(→{{header|Tcl}}: + standard ML) |
|||
Line 1,761: | Line 1,761: | ||
XMapWindow w; |
XMapWindow w; |
||
XFlush dp ; |
XFlush dp ; |
||
XDrawString w (DefaultGC dp) (XPoint {x=10,y= |
XDrawString w (DefaultGC dp) (XPoint {x=10,y=50}) "Hello World!" ; |
||
XFlush dp ;</lang> |
XFlush dp ;</lang> |
||
=={{header|Tcl}}== |
=={{header|Tcl}}== |
||
Tcl does not come with a low-level connection to the X protocol, as it has long been distributed with [[Tk]] which offers a [[Simple Windowed Application|much higher-level interface]] (and which is portable to other platforms too). This means that the interface has to be crafted directly. This can be done with either [http://www.swig.org/ SWIG] or [[critcl]]. This example shows how to do it the latter way: |
Tcl does not come with a low-level connection to the X protocol, as it has long been distributed with [[Tk]] which offers a [[Simple Windowed Application|much higher-level interface]] (and which is portable to other platforms too). This means that the interface has to be crafted directly. This can be done with either [http://www.swig.org/ SWIG] or [[critcl]]. This example shows how to do it the latter way: |