ui.*: lets rename ui-running to with-ui-running
Because it is really annoying with global variables having the same name as words.factor-shell
parent
78c31ada9e
commit
9f1935c7f1
|
@ -223,7 +223,7 @@ M: cocoa-ui-backend (with-ui)
|
|||
init-thread-timer
|
||||
reset-thread-timer
|
||||
NSApp -> run
|
||||
] ui-running
|
||||
] with-ui-running
|
||||
] with-cocoa ;
|
||||
|
||||
cocoa-ui-backend ui-backend set-global
|
||||
|
|
|
@ -511,7 +511,7 @@ M: gtk-ui-backend (with-ui)
|
|||
[
|
||||
[ [ gtk_main ] with-timer ] with-event-loop
|
||||
] with-destructors
|
||||
] ui-running ;
|
||||
] with-ui-running ;
|
||||
|
||||
M: gtk-ui-backend stop-event-loop
|
||||
gtk_main_quit ;
|
||||
|
|
|
@ -712,7 +712,7 @@ M: windows-ui-backend (with-ui)
|
|||
start-ui
|
||||
event-loop
|
||||
] [ cleanup-win32-ui ] [ ] cleanup
|
||||
] ui-running ;
|
||||
] with-ui-running ;
|
||||
|
||||
M: windows-ui-backend beep ( -- )
|
||||
0 MessageBeep drop ;
|
||||
|
|
|
@ -327,7 +327,7 @@ M: x11-ui-backend (with-ui) ( quot -- )
|
|||
event-loop
|
||||
] with-xim
|
||||
] with-x
|
||||
] ui-running ;
|
||||
] with-ui-running ;
|
||||
|
||||
M: x11-ui-backend beep ( -- )
|
||||
dpy get 100 XBell drop ;
|
||||
|
|
|
@ -132,9 +132,11 @@ M: world ungraft*
|
|||
redraw-worlds
|
||||
send-queued-gestures ;
|
||||
|
||||
: ui-running ( quot -- )
|
||||
t \ ui-running set-global
|
||||
[ f \ ui-running set-global ] [ ] cleanup ; inline
|
||||
SYMBOL: ui-running
|
||||
|
||||
: with-ui-running ( quot -- )
|
||||
t ui-running set-global
|
||||
[ f ui-running set-global ] [ ] cleanup ; inline
|
||||
|
||||
PRIVATE>
|
||||
|
||||
|
@ -144,7 +146,7 @@ PRIVATE>
|
|||
find-last nip ; inline
|
||||
|
||||
: ui-running? ( -- ? )
|
||||
\ ui-running get-global ;
|
||||
ui-running get-global ;
|
||||
|
||||
<PRIVATE
|
||||
|
||||
|
@ -205,7 +207,7 @@ M: object close-window
|
|||
find-world [ ungraft ] when* ;
|
||||
|
||||
[
|
||||
f \ ui-running set-global
|
||||
f ui-running set-global
|
||||
<flag> ui-notify-flag set-global
|
||||
] "ui" add-startup-hook
|
||||
|
||||
|
|
Loading…
Reference in New Issue