change ui backends to singletons

db4
Doug Coleman 2008-04-02 19:44:01 -05:00
parent de30882cb1
commit 83d9b936b2
3 changed files with 6 additions and 6 deletions

View File

@ -12,7 +12,7 @@ TUPLE: handle view window ;
C: <handle> handle C: <handle> handle
TUPLE: cocoa-ui-backend ; SINGLETON: cocoa-ui-backend
SYMBOL: stop-after-last-window? SYMBOL: stop-after-last-window?
@ -119,6 +119,6 @@ M: cocoa-ui-backend ui
] ui-running ] ui-running
] with-cocoa ; ] with-cocoa ;
T{ cocoa-ui-backend } ui-backend set-global cocoa-ui-backend ui-backend set-global
[ running.app? "ui" "listener" ? ] main-vocab-hook set-global [ running.app? "ui" "listener" ? ] main-vocab-hook set-global

View File

@ -10,7 +10,7 @@ shuffle opengl ui.render unicode.case ascii math.bitfields
locals symbols ; locals symbols ;
IN: ui.windows IN: ui.windows
TUPLE: windows-ui-backend ; SINGLETON: windows-ui-backend
: crlf>lf CHAR: \r swap remove ; : crlf>lf CHAR: \r swap remove ;
: lf>crlf [ [ dup CHAR: \n = [ CHAR: \r , ] when , ] each ] "" make ; : lf>crlf [ [ dup CHAR: \n = [ CHAR: \r , ] when , ] each ] "" make ;
@ -496,6 +496,6 @@ M: windows-ui-backend ui
] [ cleanup-win32-ui ] [ ] cleanup ] [ cleanup-win32-ui ] [ ] cleanup
] ui-running ; ] ui-running ;
T{ windows-ui-backend } ui-backend set-global windows-ui-backend ui-backend set-global
[ "ui" ] main-vocab-hook set-global [ "ui" ] main-vocab-hook set-global

View File

@ -8,7 +8,7 @@ io.encodings.utf8 combinators debugger system command-line
ui.render math.vectors classes.tuple opengl.gl threads ; ui.render math.vectors classes.tuple opengl.gl threads ;
IN: ui.x11 IN: ui.x11
TUPLE: x11-ui-backend ; SINGLETON: x11-ui-backend
: XA_NET_WM_NAME "_NET_WM_NAME" x-atom ; : XA_NET_WM_NAME "_NET_WM_NAME" x-atom ;
@ -259,7 +259,7 @@ M: x11-ui-backend ui ( -- )
] with-x ] with-x
] ui-running ; ] ui-running ;
T{ x11-ui-backend } ui-backend set-global x11-ui-backend ui-backend set-global
[ "DISPLAY" os-env "ui" "listener" ? ] [ "DISPLAY" os-env "ui" "listener" ? ]
main-vocab-hook set-global main-vocab-hook set-global