check-world-pixel-format word that world subclasses can override to verify that the chosen pixel format meets their needs

db4
Joe Groff 2009-05-02 16:46:58 -05:00
parent 623b16d048
commit a7e2632faf
1 changed files with 6 additions and 1 deletions

View 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