Clean up Factor.app stuff
parent
12b7a927b0
commit
d87a0dffc2
|
@ -8,7 +8,6 @@
|
||||||
- x86 %box-struct
|
- x86 %box-struct
|
||||||
- x86 %write-barrier
|
- x86 %write-barrier
|
||||||
- OS X stuff:
|
- OS X stuff:
|
||||||
- look for image in bundle
|
|
||||||
- set resource path to bundle path
|
- set resource path to bundle path
|
||||||
- link in freetype statically
|
- link in freetype statically
|
||||||
|
|
||||||
|
@ -29,6 +28,9 @@
|
||||||
|
|
||||||
+ ui/help:
|
+ ui/help:
|
||||||
|
|
||||||
|
- add some padding to launchpad ui
|
||||||
|
- saving the image should save window configuration
|
||||||
|
- memory leaks
|
||||||
- menu drag retarget broken
|
- menu drag retarget broken
|
||||||
- hang when scrolling
|
- hang when scrolling
|
||||||
- hang with multiple windows
|
- hang with multiple windows
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
! Copyright (C) 2006 Slava Pestov
|
! Copyright (C) 2006 Slava Pestov
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
IN: cocoa
|
IN: cocoa
|
||||||
USING: alien arrays errors hashtables kernel math namespaces
|
USING: alien arrays errors hashtables kernel math memory
|
||||||
sequences ;
|
namespaces sequences ;
|
||||||
|
|
||||||
TYPEDEF: int CFIndex
|
TYPEDEF: int CFIndex
|
||||||
|
|
||||||
|
@ -28,12 +28,6 @@ FUNCTION: CFIndex CFStringGetLength ( void* string ) ;
|
||||||
|
|
||||||
FUNCTION: void* CFBundleCreate ( void* allocator, void* bundleURL ) ;
|
FUNCTION: void* CFBundleCreate ( void* allocator, void* bundleURL ) ;
|
||||||
|
|
||||||
FUNCTION: void* CFBundleGetMainBundle ( ) ;
|
|
||||||
|
|
||||||
FUNCTION: void* CFBundleCopyExecutableURL ( void* bundle ) ;
|
|
||||||
|
|
||||||
FUNCTION: void* CFBundleGetFunctionPointerForName ( void* bundle, void* functionName ) ;
|
|
||||||
|
|
||||||
FUNCTION: bool CFBundleLoadExecutable ( void* bundle ) ;
|
FUNCTION: bool CFBundleLoadExecutable ( void* bundle ) ;
|
||||||
|
|
||||||
FUNCTION: void CFRelease ( void* cf ) ;
|
FUNCTION: void CFRelease ( void* cf ) ;
|
||||||
|
@ -67,15 +61,9 @@ FUNCTION: void CFRelease ( void* cf ) ;
|
||||||
"Cannot load bundled named " swap append throw
|
"Cannot load bundled named " swap append throw
|
||||||
] ?if ;
|
] ?if ;
|
||||||
|
|
||||||
: executable ( -- path )
|
|
||||||
CFBundleGetMainBundle CFBundleCopyExecutableURL [
|
|
||||||
kCFURLPOSIXPathStyle CFURLCopyFileSystemPath
|
|
||||||
[ CF>string ] keep CFRelease
|
|
||||||
] keep CFRelease ;
|
|
||||||
|
|
||||||
: running.app? ( -- ? )
|
: running.app? ( -- ? )
|
||||||
#! Test if we're running Factor.app.
|
#! Test if we're running Factor.app.
|
||||||
executable "Contents/MacOS/Factor" tail? ;
|
"Contents/Resources" image subseq? ;
|
||||||
|
|
||||||
IN: kernel
|
IN: kernel
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
! Copyright (C) 2006 Slava Pestov.
|
! Copyright (C) 2006 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: arrays cocoa freetype gadgets gadgets-launchpad
|
USING: arrays cocoa errors freetype gadgets gadgets-launchpad
|
||||||
gadgets-layouts gadgets-listener gadgets-panes hashtables kernel
|
gadgets-layouts gadgets-listener gadgets-panes hashtables kernel
|
||||||
lists math namespaces objc objc-NSApplication objc-NSEvent
|
lists math namespaces objc objc-NSApplication objc-NSEvent
|
||||||
objc-NSObject objc-NSOpenGLView objc-NSView objc-NSWindow
|
objc-NSObject objc-NSOpenGLView objc-NSView objc-NSWindow
|
||||||
|
@ -159,6 +159,9 @@ IN: gadgets
|
||||||
IN: shells
|
IN: shells
|
||||||
|
|
||||||
: ui
|
: ui
|
||||||
|
running.app? [
|
||||||
|
"The Factor UI requires you to run the supplied Factor.app." throw
|
||||||
|
] unless
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
launchpad-window
|
launchpad-window
|
||||||
|
|
|
@ -43,6 +43,6 @@ const char *default_image_path(void)
|
||||||
{
|
{
|
||||||
NSBundle *bundle = [NSBundle mainBundle];
|
NSBundle *bundle = [NSBundle mainBundle];
|
||||||
NSString *path = [bundle bundlePath];
|
NSString *path = [bundle bundlePath];
|
||||||
NSString *image = [path stringByAppendingString:@"/Contents/factor.image"];
|
NSString *image = [path stringByAppendingString:@"/Contents/Resources/factor.image"];
|
||||||
return [image cString];
|
return [image cString];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue