Merge branch 'master' of git://onigirihouse.com/git/yuuki
commit
f2cb5d8f4d
|
@ -7,9 +7,9 @@ SYMBOL: ui-backend
|
|||
|
||||
HOOK: set-title ui-backend ( string world -- )
|
||||
|
||||
HOOK: set-fullscreen? ui-backend ( ? world -- )
|
||||
HOOK: set-fullscreen* ui-backend ( ? world -- )
|
||||
|
||||
HOOK: fullscreen? ui-backend ( world -- ? )
|
||||
HOOK: fullscreen* ui-backend ( world -- ? )
|
||||
|
||||
HOOK: (open-window) ui-backend ( world -- )
|
||||
|
||||
|
|
|
@ -59,10 +59,10 @@ M: cocoa-ui-backend set-title ( string world -- )
|
|||
: exit-fullscreen ( world -- )
|
||||
world-handle first f -> exitFullScreenModeWithOptions: ;
|
||||
|
||||
M: cocoa-ui-backend set-fullscreen? ( ? world -- )
|
||||
M: cocoa-ui-backend set-fullscreen* ( ? world -- )
|
||||
swap [ enter-fullscreen ] [ exit-fullscreen ] if ;
|
||||
|
||||
M: cocoa-ui-backend fullscreen? ( world -- ? )
|
||||
M: cocoa-ui-backend fullscreen* ( world -- ? )
|
||||
world-handle first -> isInFullScreenMode zero? not ;
|
||||
|
||||
: auto-position ( world -- )
|
||||
|
|
|
@ -13,15 +13,6 @@ HELP: set-title
|
|||
{ $description "Sets the title bar of the native window containing the world." }
|
||||
{ $notes "This word should not be called directly by user code. Instead, change the " { $link world-title } " model; see " { $link "models" } "." } ;
|
||||
|
||||
HELP: set-fullscreen?
|
||||
{ $values { "?" "a boolean" } { "world" world } }
|
||||
{ $description "Sets and unsets fullscreen mode for the world." }
|
||||
{ $notes "Find a world using " { $link find-world } "." } ;
|
||||
|
||||
HELP: fullscreen?
|
||||
{ $values { "world" world } { "?" "a boolean" } }
|
||||
{ $description "Queries the world to see if it is running in fullscreen mode." } ;
|
||||
|
||||
HELP: raise-window
|
||||
{ $values { "world" world } }
|
||||
{ $description "Makes the native window containing the given world the front-most window." }
|
||||
|
|
|
@ -14,6 +14,16 @@ HELP: open-window
|
|||
{ $values { "gadget" gadget } { "title" string } }
|
||||
{ $description "Opens a native window with the specified title." } ;
|
||||
|
||||
HELP: set-fullscreen?
|
||||
{ $values { "?" "a boolean" } { "gadget" gadget } }
|
||||
{ $description "Sets and unsets fullscreen mode for the gadget's world." } ;
|
||||
|
||||
HELP: fullscreen?
|
||||
{ $values { "gadget" gadget } { "?" "a boolean" } }
|
||||
{ $description "Queries the gadget's world to see if it is running in fullscreen mode." } ;
|
||||
|
||||
{ fullscreen? set-fullscreen? } related-words
|
||||
|
||||
HELP: find-window
|
||||
{ $values { "quot" "a quotation with stack effect " { $snippet "( world -- ? )" } } { "world" "a " { $link world } " or " { $link f } } }
|
||||
{ $description "Finds a native window whose world satisfies the quotation, outputting " { $link f } " if no such world could be found. The front-most native window is checked first." } ;
|
||||
|
|
|
@ -145,6 +145,12 @@ SYMBOL: ui-hook
|
|||
>r [ 1 track, ] { 0 1 } make-track r>
|
||||
f <world> open-world-window ;
|
||||
|
||||
: set-fullscreen? ( ? gadget -- )
|
||||
find-world set-fullscreen* ;
|
||||
|
||||
: fullscreen? ( gadget -- ? )
|
||||
find-world fullscreen* ;
|
||||
|
||||
HOOK: close-window ui-backend ( gadget -- )
|
||||
|
||||
M: object close-window
|
||||
|
|
Loading…
Reference in New Issue