Update old accessors from 'ui.cocoa'

db4
dharmatech 2008-09-01 19:02:44 -05:00
parent 03ab685d93
commit 36151938b3
1 changed files with 9 additions and 9 deletions

View File

@ -44,29 +44,29 @@ M: pasteboard set-clipboard-contents
dup install-window-delegate dup install-window-delegate
over -> release over -> release
<handle> <handle>
] keep set-world-handle ; ] keep (>>handle) ;
M: cocoa-ui-backend set-title ( string world -- ) M: cocoa-ui-backend set-title ( string world -- )
world-handle window>> swap <NSString> -> setTitle: ; handle>> window>> swap <NSString> -> setTitle: ;
: enter-fullscreen ( world -- ) : enter-fullscreen ( world -- )
world-handle view>> handle>> view>>
NSScreen -> mainScreen NSScreen -> mainScreen
f -> enterFullScreenMode:withOptions: f -> enterFullScreenMode:withOptions:
drop ; drop ;
: exit-fullscreen ( world -- ) : exit-fullscreen ( world -- )
world-handle view>> f -> exitFullScreenModeWithOptions: ; handle>> view>> f -> exitFullScreenModeWithOptions: ;
M: cocoa-ui-backend set-fullscreen* ( ? world -- ) M: cocoa-ui-backend set-fullscreen* ( ? world -- )
swap [ enter-fullscreen ] [ exit-fullscreen ] if ; swap [ enter-fullscreen ] [ exit-fullscreen ] if ;
M: cocoa-ui-backend fullscreen* ( world -- ? ) M: cocoa-ui-backend fullscreen* ( world -- ? )
world-handle view>> -> isInFullScreenMode zero? not ; handle>> view>> -> isInFullScreenMode zero? not ;
: auto-position ( world -- ) : auto-position ( world -- )
dup window-loc>> { 0 0 } = [ dup window-loc>> { 0 0 } = [
world-handle window>> -> center handle>> window>> -> center
] [ ] [
drop drop
] if ; ] if ;
@ -74,20 +74,20 @@ M: cocoa-ui-backend fullscreen* ( world -- ? )
M: cocoa-ui-backend (open-window) ( world -- ) M: cocoa-ui-backend (open-window) ( world -- )
dup gadget-window dup gadget-window
dup auto-position dup auto-position
world-handle window>> f -> makeKeyAndOrderFront: ; handle>> window>> f -> makeKeyAndOrderFront: ;
M: cocoa-ui-backend (close-window) ( handle -- ) M: cocoa-ui-backend (close-window) ( handle -- )
window>> -> release ; window>> -> release ;
M: cocoa-ui-backend close-window ( gadget -- ) M: cocoa-ui-backend close-window ( gadget -- )
find-world [ find-world [
world-handle [ handle>> [
window>> f -> performClose: window>> f -> performClose:
] when* ] when*
] when* ; ] when* ;
M: cocoa-ui-backend raise-window* ( world -- ) M: cocoa-ui-backend raise-window* ( world -- )
world-handle [ handle>> [
window>> dup f -> orderFront: -> makeKeyWindow window>> dup f -> orderFront: -> makeKeyWindow
NSApp 1 -> activateIgnoringOtherApps: NSApp 1 -> activateIgnoringOtherApps:
] when* ; ] when* ;