From 5c95d90da3b95834a3a1a8b8eedd0437680c5d84 Mon Sep 17 00:00:00 2001 From: Joe Groff <arcata@gmail.com> Date: Sun, 27 Jun 2010 13:45:04 -0700 Subject: [PATCH] ui.images: load images.cocoa backend by default instead of images.png/images.tiff on macosx --- basis/ui/images/images.factor | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/basis/ui/images/images.factor b/basis/ui/images/images.factor index b97a5c14fe..e9c527a3a6 100644 --- a/basis/ui/images/images.factor +++ b/basis/ui/images/images.factor @@ -1,8 +1,8 @@ ! Copyright (C) 2009 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: namespaces cache images images.loader accessors assocs -kernel opengl opengl.gl opengl.textures ui.gadgets.worlds -memoize images.png images.tiff ; +USING: accessors assocs cache combinators images images.loader +kernel memoize namespaces opengl opengl.gl opengl.textures system +ui.gadgets.worlds vocabs.loader ; IN: ui.images TUPLE: image-name path ; @@ -30,3 +30,15 @@ PRIVATE> : image-dim ( image-name -- dim ) cached-image dim>> ; + +<< +{ + { [ os macosx? ] [ + "images.cocoa" require + ] } + [ + "images.png" require + "images.tiff" require + ] +} cond +>>