x11.xinput2: xi2-available?

db4
Niklas.Waern 2010-05-22 00:11:00 +02:00
parent e06ba797ca
commit 35f7d049ae
1 changed files with 14 additions and 1 deletions

View File

@ -1,4 +1,17 @@
! Copyright (C) 2010 Niklas Waern.
! See http://factorcode.org/license.txt for BSD license.
USING: ;
USING: alien.c-types combinators kernel namespaces x11
x11.constants x11.xinput2.ffi ;
IN: x11.xinput2
: (xi2-available?) ( display -- ? )
2 0 [ <int> ] bi@
XIQueryVersion
{
{ BadRequest [ f ] }
{ Success [ t ] }
[ "Internal Xlib error." throw ]
} case ;
: xi2-available? ( -- ? ) dpy get (xi2-available?) ; inline