Anonymous user
Mouse position: Difference between revisions
→{{header|Standard ML}}: now wrt focus
(→{{header|Tcl}}: + standard ML) |
(→{{header|Standard ML}}: now wrt focus) |
||
Line 1,304:
<lang Standard ML>open XWindows ;
val dp = XOpenDisplay "" ;
val w = XCreateSimpleWindow (RootWindow dp) origin (Area {x=0,y=0,w=400,h=
XMapWindow w;
val (focus,_)=( Posix.Process.sleep (Time.fromReal 2.0); (* time to move from interpreter and activate window *)
XGetInputFocus dp
XQueryPointer w ;</lang>▼
) ;
result: relative to the root window and the window w:▼
val it =
(true, Drawable, Drawable, XPoint {x =
XPoint {x =
bool * Drawable * Drawable * XPoint * XPoint * Modifier list
=={{header|Tcl}}==
{{libheader|Tk}}
|