factor/basis/game/input/dinput/keys-array/keys-array.factor

17 lines
386 B
Factor
Raw Normal View History

USING: sequences sequences.private math
accessors alien.c-types ;
IN: game.input.dinput.keys-array
2008-07-27 01:35:40 -04:00
TUPLE: keys-array
{ underlying sequence read-only }
{ length integer read-only } ;
2008-07-27 01:35:40 -04:00
C: <keys-array> keys-array
: >key ( byte -- ? )
2011-11-23 21:49:33 -05:00
0x80 bitand c-bool> ;
2008-07-27 01:35:40 -04:00
M: keys-array length length>> ;
2008-07-27 01:35:40 -04:00
M: keys-array nth-unsafe underlying>> nth-unsafe >key ;
INSTANCE: keys-array sequence