! See http://factorcode.org/license.txt for BSD license.
USING: accessors alien.c-types arrays kernel game.input
namespaces math classes bit-arrays system sequences vectors
-x11 x11.xlib assocs ;
+x11 x11.xlib assocs generalizations ;
IN: game.input.x11
SINGLETON: x11-game-input-backend
: query-pointer ( -- x y buttons )
dpy get dup XDefaultRootWindow
- 0 <int> 0 <int> 0 <int> 0 <int> 0 <int> 0 <int> 0 <int>
- [ XQueryPointer drop ] 3keep
- [ *int ] tri@ ;
+ { int int int int int int int }
+ [ XQueryPointer drop ] [ ] with-out-parameters
+ [ 4 ndrop ] 3dip ;
SYMBOL: mouse-reset?