Further Cocoa fixes
parent
60945fa05e
commit
40d2f9bb61
|
@ -25,17 +25,10 @@ objc-NSObject objc-NSView threads ;
|
|||
: do-events ( app -- )
|
||||
dup next-event [ dupd [sendEvent:] do-events ] [ drop ] if* ;
|
||||
|
||||
: (event-loop) ( -- )
|
||||
: event-loop ( -- )
|
||||
[
|
||||
NSApplication [sharedApplication] do-events world-step
|
||||
] with-autorelease-pool 10 sleep (event-loop) ;
|
||||
|
||||
: event-loop ( -- )
|
||||
\ NSApplication get expired? [
|
||||
NSApplication [sharedApplication]
|
||||
\ NSApplication set-global
|
||||
[ (event-loop) ] in-thread
|
||||
] when ;
|
||||
] with-autorelease-pool 10 sleep event-loop ;
|
||||
|
||||
IN: errors
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
! Copyright (C) 2006 Slava Pestov.
|
||||
! See http://factor.sf.net/license.txt for BSD license.
|
||||
USING: alien arrays cocoa freetype gadgets gadgets-layouts
|
||||
gadgets-listener kernel namespaces objc objc-NSApplication
|
||||
gadgets-listener io kernel namespaces objc objc-NSApplication
|
||||
objc-NSObject objc-NSOpenGLContext objc-NSOpenGLView objc-NSView
|
||||
objc-NSWindow opengl sequences threads walker ;
|
||||
objc-NSWindow opengl prettyprint sequences threads walker ;
|
||||
IN: gadgets-cocoa
|
||||
|
||||
! Cocoa backend for Factor UI
|
||||
|
@ -66,9 +66,11 @@ USE: objc-FactorView
|
|||
[
|
||||
[
|
||||
init-world
|
||||
listener-application
|
||||
|
||||
world get ui-title <FactorWindow> drop
|
||||
world get ui-title <FactorWindow>
|
||||
|
||||
[contentView] [openGLContext] [makeCurrentContext]
|
||||
listener-application
|
||||
|
||||
event-loop
|
||||
] with-cocoa
|
||||
|
|
Loading…
Reference in New Issue