]> gitweb.factorcode.org Git - factor.git/commitdiff
move XQueryKeymap binding to x11.xlib
authorJoe Groff <arcata@gmail.com>
Sat, 27 Feb 2010 02:21:37 +0000 (18:21 -0800)
committerJoe Groff <arcata@gmail.com>
Sat, 27 Feb 2010 02:21:37 +0000 (18:21 -0800)
basis/game/input/linux/linux.factor
basis/x11/xlib/xlib.factor

index a1b9c57defef04bbb2b06e9bd24df41049fef6d9..cd482ae60472a2789fefe48e210f30856a6ffbae 100644 (file)
@@ -42,49 +42,48 @@ M: linux-game-input-backend vibrate-controller
     3drop ;
 
 CONSTANT: x>hid-bit-order {
-
-0 0 0 0 0 0 0 0 
-0 41 30 31 32 33 34 35 
-36 37 38 39 45 46 42 43 
-20 26 8 21 23 28 24 12 
-18 19 47 48 40 224 4 22 
-7 9 10 11 13 14 15 51 
-52 53 225 49 29 27 6 25 
-5 17 16 54 55 56 229 85 
-226 44 57 58 59 60 61 62 
-63 64 65 66 67 83 71 95 
-96 97 86 92 93 94 87 91 
-90 89 98 99 0 0 0 68 
-69 0 0 0 0 0 0 0 
-88 228 84 70 0 0 74 82 
-75 80 79 77 81 78 73 76 
-127 129 128 102 103 0 72 0 
-0 0 0 227 231 0 0 0 
-0 0 0 0 0 0 0 0 
-0 0 0 0 0 0 0 0 
-0 0 0 0 0 0 0 0 
-0 0 0 0 0 0 0 0 
-0 0 0 0 0 0 0 0 
-0 0 0 0 0 0 0 0 
-0 0 0 0 0 0 0 0 
-0 0 0 0 0 0 0 0 
-0 0 0 0 0 0 0 0 
-0 0 0 0 0 0 0 0 
-0 0 0 0 0 0 0 0 
-0 0 0 0 0 0 0 0 
-0 0 0 0 0 0 0 0 
-0 0 0 0 0 0 0 0 
-0 0 0 0 0 0 0 0 
+    0 0 0 0 0 0 0 0 
+    0 41 30 31 32 33 34 35 
+    36 37 38 39 45 46 42 43 
+    20 26 8 21 23 28 24 12 
+    18 19 47 48 40 224 4 22 
+    7 9 10 11 13 14 15 51 
+    52 53 225 49 29 27 6 25 
+    5 17 16 54 55 56 229 85 
+    226 44 57 58 59 60 61 62 
+    63 64 65 66 67 83 71 95 
+    96 97 86 92 93 94 87 91 
+    90 89 98 99 0 0 0 68 
+    69 0 0 0 0 0 0 0 
+    88 228 84 70 0 0 74 82 
+    75 80 79 77 81 78 73 76 
+    127 129 128 102 103 0 72 0 
+    0 0 0 227 231 0 0 0 
+    0 0 0 0 0 0 0 0 
+    0 0 0 0 0 0 0 0 
+    0 0 0 0 0 0 0 0 
+    0 0 0 0 0 0 0 0 
+    0 0 0 0 0 0 0 0 
+    0 0 0 0 0 0 0 0 
+    0 0 0 0 0 0 0 0 
+    0 0 0 0 0 0 0 0 
+    0 0 0 0 0 0 0 0 
+    0 0 0 0 0 0 0 0 
+    0 0 0 0 0 0 0 0 
+    0 0 0 0 0 0 0 0 
+    0 0 0 0 0 0 0 0 
+    0 0 0 0 0 0 0 0 
+    0 0 0 0 0 0 0 0 
 }
      
 : x-bits>hid-bits ( bit-array -- bit-array )
-        256 iota [ 2array ] { } 2map-as [ first ] filter [ second ] map
-        x>hid-bit-order [ nth ] curry map
-        256 <bit-array> swap [ t swap pick set-nth ] each ;
+    256 iota [ 2array ] { } 2map-as [ first ] filter [ second ] map
+    x>hid-bit-order [ nth ] curry map
+    256 <bit-array> swap [ t swap pick set-nth ] each ;
         
 M: linux-game-input-backend read-keyboard
-        dpy get 256 <bit-array> [ XQueryKeymap drop ] keep
-        x-bits>hid-bits keyboard-state boa ;
+    dpy get 256 <bit-array> [ XQueryKeymap drop ] keep
+    x-bits>hid-bits keyboard-state boa ;
      
 M: linux-game-input-backend read-mouse
     0 0 0 0 2 <vector> mouse-state boa ;
index e86bb5e8c37932b0406f1b5bccc0e3f2d9417aa7..1c5ff2e3ef1571af3251c2d1ed8b7d3160e20adf 100644 (file)
@@ -1406,3 +1406,8 @@ X-FUNCTION: c-string setlocale ( int category, c-string name ) ;
 X-FUNCTION: Bool XSupportsLocale ( ) ;
 
 X-FUNCTION: c-string XSetLocaleModifiers ( c-string modifier_list ) ;
+
+! uncategorized xlib bindings
+
+X-FUNCTION: int XQueryKeymap ( Display* display, char[32] keys_return ) ;
+