]> gitweb.factorcode.org Git - factor.git/blob - basis/game/input/linux/linux.factor
continuations: add a throw-continue word for resumable errors, and change vocabs...
[factor.git] / basis / game / input / linux / linux.factor
1 ! Copyright (C) 2010 Erik Charlebois.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: kernel game.input namespaces classes bit-arrays vectors ;
4 IN: game.input.linux
5
6 SINGLETON: linux-game-input-backend
7
8 linux-game-input-backend game-input-backend set-global
9
10 M: linux-game-input-backend (open-game-input)
11     ;
12
13 M: linux-game-input-backend (close-game-input)
14     ;
15
16 M: linux-game-input-backend (reset-game-input)
17     ;
18
19 M: linux-game-input-backend get-controllers
20     { } ;
21
22 M: linux-game-input-backend product-string
23     drop "" ;
24      
25 M: linux-game-input-backend product-id
26     drop f ;
27      
28 M: linux-game-input-backend instance-id
29     drop f ;
30      
31 M: linux-game-input-backend read-controller
32     drop controller-state new ;
33      
34 M: linux-game-input-backend calibrate-controller
35     drop ;
36      
37 M: linux-game-input-backend vibrate-controller
38     3drop ;
39      
40 M: linux-game-input-backend read-keyboard
41     256 <bit-array> keyboard-state boa ;
42      
43 M: linux-game-input-backend read-mouse
44     0 0 0 0 2 <vector> mouse-state boa ;
45      
46 M: linux-game-input-backend reset-mouse
47     ;