]> gitweb.factorcode.org Git - factor.git/blob - basis/game-input/dinput/keys-array/keys-array.factor
move some allocation words that don't really have much to do with c types out of...
[factor.git] / basis / game-input / dinput / keys-array / keys-array.factor
1 USING: sequences sequences.private math
2 accessors alien.data ;
3 IN: game-input.dinput.keys-array
4
5 TUPLE: keys-array
6     { underlying sequence read-only }
7     { length integer read-only } ;
8 C: <keys-array> keys-array
9
10 : >key ( byte -- ? )
11     HEX: 80 bitand c-bool> ;
12
13 M: keys-array length length>> ;
14 M: keys-array nth-unsafe underlying>> nth-unsafe >key ;
15
16 INSTANCE: keys-array sequence
17