Use call( so that with-ui infers
parent
56ffaf5cb1
commit
36d03dfa08
|
@ -8,7 +8,7 @@ ui.backend ui.clipboards ui.gadgets ui.gadgets.worlds
|
||||||
ui.backend.cocoa.views core-foundation core-foundation.run-loop
|
ui.backend.cocoa.views core-foundation core-foundation.run-loop
|
||||||
core-graphics.types threads math.rectangles fry libc
|
core-graphics.types threads math.rectangles fry libc
|
||||||
generalizations alien.c-types cocoa.views
|
generalizations alien.c-types cocoa.views
|
||||||
combinators io.thread locals ;
|
combinators io.thread locals call ;
|
||||||
IN: ui.backend.cocoa
|
IN: ui.backend.cocoa
|
||||||
|
|
||||||
TUPLE: handle ;
|
TUPLE: handle ;
|
||||||
|
@ -152,7 +152,7 @@ M: cocoa-ui-backend (with-ui)
|
||||||
"UI" assert.app [
|
"UI" assert.app [
|
||||||
[
|
[
|
||||||
init-clipboard
|
init-clipboard
|
||||||
cocoa-init-hook get call
|
cocoa-init-hook get call( -- )
|
||||||
start-ui
|
start-ui
|
||||||
f io-thread-running? set-global
|
f io-thread-running? set-global
|
||||||
init-thread-timer
|
init-thread-timer
|
||||||
|
|
|
@ -153,7 +153,7 @@ PRIVATE>
|
||||||
"UI update" spawn drop ;
|
"UI update" spawn drop ;
|
||||||
|
|
||||||
: start-ui ( quot -- )
|
: start-ui ( quot -- )
|
||||||
call notify-ui-thread start-ui-thread ;
|
call( -- ) notify-ui-thread start-ui-thread ;
|
||||||
|
|
||||||
: restore-windows ( -- )
|
: restore-windows ( -- )
|
||||||
[
|
[
|
||||||
|
@ -193,6 +193,6 @@ M: object close-window
|
||||||
] "ui" add-init-hook
|
] "ui" add-init-hook
|
||||||
|
|
||||||
: with-ui ( quot -- )
|
: with-ui ( quot -- )
|
||||||
ui-running? [ call ] [ '[ init-ui @ ] (with-ui) ] if ;
|
ui-running? [ call( -- ) ] [ '[ init-ui @ ] (with-ui) ] if ;
|
||||||
|
|
||||||
HOOK: beep ui-backend ( -- )
|
HOOK: beep ui-backend ( -- )
|
Loading…
Reference in New Issue