1 ! Copyright (C) 2008 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: alien.c-types alien.syntax kernel sequences
4 core-foundation core-foundation.urls ;
5 IN: core-foundation.bundles
7 TYPEDEF: void* CFBundleRef
9 FUNCTION: CFBundleRef CFBundleCreate ( CFAllocatorRef allocator, CFURLRef bundleURL ) ;
11 FUNCTION: Boolean CFBundleLoadExecutable ( CFBundleRef bundle ) ;
13 : <CFBundle> ( string -- bundle )
18 : load-framework ( name -- )
20 CFBundleLoadExecutable drop
22 "Cannot load bundle named " prepend throw