Paste: xinput2 ffi; some refactoring left :)
Author: | ceninan |
Mode: | factor |
Date: | Thu, 20 May 2010 22:43:18 |
Plain Text |
:: XISetMask ( mask event -- )
event -3 shift :> index
1 event 7 bitand shift index mask nth bitor
index mask set-nth ; inline
:: XIClearMask ( mask event -- )
event -3 shift :> index
1 event 7 bitand shift bitnot index mask nth bitand
index mask set-nth ; inline
:: XIMaskIsSet ( mask event -- n )
event -3 shift :> index
1 event 7 bitand shift index mask nth bitand ;
: XIMaskLen ( event -- n ) 7 + -3 shift
New Annotation