Moved fullscreen docs into the ui vocab.
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 -- )
: 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 -- )
{ $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." }
{ $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." } ;
>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