]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/ui/backend/x11/x11.factor
Updating code to use with-out-parameters
[factor.git] / basis / ui / backend / x11 / x11.factor
index 6a7a8d147f10e1796913b1d3f904192714530dc4..ef0618dff339142c1c0b05b5cd2d89a5fa5e0b5a 100644 (file)
@@ -1,4 +1,4 @@
-! Copyright (C) 2005, 2009 Eduardo Cavazos and Slava Pestov
+! Copyright (C) 2005, 2010 Eduardo Cavazos and Slava Pestov
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors alien.c-types ascii assocs classes.struct combinators
 combinators.short-circuit command-line environment io.encodings.ascii
@@ -60,7 +60,7 @@ M: x11-ui-backend (pixel-format-attribute)
     [ handle>> ] [ >glx-visual ] bi*
     [ 2drop f ] [
         first
-        0 <int> [ glXGetConfig drop ] keep *int
+        { int } [ glXGetConfig drop ] with-out-parameters
     ] if-empty ;
 
 CONSTANT: modifiers
@@ -149,9 +149,9 @@ M: world button-up-event
         { 7 { 1 0 } }
     } at ;
 
-M: world wheel-event
+M: world scroll-event
     [ [ mouse-event>scroll-direction ] [ event-loc ] bi ] dip
-    send-wheel ;
+    send-scroll ;
 
 M: world enter-event motion-event ;
 
@@ -233,7 +233,7 @@ M: x11-ui-backend do-events
 
 M: x-clipboard copy-clipboard
     [ x-clipboard@ own-selection ] keep
-    (>>contents) ;
+    contents<< ;
 
 M: x-clipboard paste-clipboard
     [ find-world handle>> window>> ] dip atom>> convert-selection ;
@@ -332,7 +332,7 @@ M: x11-ui-backend beep ( -- )
     [ dup CHAR: ' = [ drop "'\\''" ] [ 1string ] if ] { } map-as concat ;
 
 : xmessage ( string -- )
-    escape-' "/usr/X11R6/bin/xmessage '" "'" surround system drop ;
+    escape-' "/usr/bin/env xmessage '" "'" surround system drop ;
 PRIVATE>
 
 M: x11-ui-backend system-alert