From a7e2632faffedd4fb85b483fe0a6ab28731962f4 Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Sat, 2 May 2009 16:46:58 -0500 Subject: [PATCH] check-world-pixel-format word that world subclasses can override to verify that the chosen pixel format meets their needs --- basis/ui/gadgets/worlds/worlds.factor | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/basis/ui/gadgets/worlds/worlds.factor b/basis/ui/gadgets/worlds/worlds.factor index c66e59b292..885f4138ff 100644 --- a/basis/ui/gadgets/worlds/worlds.factor +++ b/basis/ui/gadgets/worlds/worlds.factor @@ -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 ] - dip with-disposal ; inline + dip [ 2dup check-world-pixel-format ] prepose with-disposal ; inline