Mouse position: Difference between revisions

→‎{{header|Tcl}}: + standard ML
(Rename Perl 6 -> Raku, alphabetize, minor clean-up)
(→‎{{header|Tcl}}: + standard ML)
Line 1,300:
</lang>
 
=={{header|Standard ML}}==
Works with PolyML
<lang Standard ML>open XWindows ;
val dp = XOpenDisplay "" ;
val w = XCreateSimpleWindow (RootWindow dp) origin (Area {x=0,y=0,w=400,h=200}) 3 0 0xffffff ;
XMapWindow w;
XFlush dp ;
XQueryPointer w ;</lang>
result: relative to the root window and the window w:
val it =
(true, Drawable, Drawable, XPoint {x = 1267, y = 327},
XPoint {x = 1133, y = 234}, []):
bool * Drawable * Drawable * XPoint * XPoint * Modifier list
There does not seem to be a function to query the window manager which window is active
=={{header|Tcl}}==
{{libheader|Tk}}
Anonymous user