]> gitweb.factorcode.org Git - factor.git/commitdiff
check-world-pixel-format word that world subclasses can override to verify that the...
authorJoe Groff <arcata@gmail.com>
Sat, 2 May 2009 21:46:58 +0000 (16:46 -0500)
committerJoe Groff <arcata@gmail.com>
Sat, 2 May 2009 21:46:58 +0000 (16:46 -0500)
basis/ui/gadgets/worlds/worlds.factor

index c66e59b292bd1859ff0fba7bbc69e7007e5be933..885f4138ffccd886fb03a86605725a639ce33ef9 100644 (file)
@@ -152,10 +152,15 @@ M: world handle-gesture ( gesture gadget -- ? )
 
 GENERIC: world-pixel-format-attributes ( world -- attributes )
 
+GENERIC# check-world-pixel-format 1 ( world pixel-format -- )
+
 M: world world-pixel-format-attributes
     drop
     { windowed double-buffered T{ depth-bits { value 16 } } } ;
 
+M: world check-world-pixel-format
+    2drop ;
+
 : with-world-pixel-format ( world quot -- )
     [ dup dup world-pixel-format-attributes <pixel-format> ]
-    dip with-disposal ; inline
+    dip [ 2dup check-world-pixel-format ] prepose with-disposal ; inline