]> gitweb.factorcode.org Git - factor.git/commitdiff
Changed set-fullscreen? to take a gadget instead of a world, moved it into the ui...
authorMatthew Willis <matthew.willis@mac.com>
Mon, 11 Feb 2008 07:53:20 +0000 (23:53 -0800)
committerMatthew Willis <matthew.willis@mac.com>
Mon, 11 Feb 2008 07:53:20 +0000 (23:53 -0800)
Moved fullscreen docs into the ui vocab.

extra/ui/backend/backend.factor
extra/ui/cocoa/cocoa.factor
extra/ui/gadgets/worlds/worlds-docs.factor
extra/ui/ui-docs.factor
extra/ui/ui.factor

index cc1f5f7d0585d82ec0ae55de7f31b61654ed69d3..2334c7602ba7f8740d7dc214ccaa4fa028e96807 100755 (executable)
@@ -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 -- )
 
index 184e6fd856aa3d49503f5855b698eabea547da9d..06de1d81fbdc5a320304f544566870e0cfc288b6 100755 (executable)
@@ -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 -- )
index 8a647507511108e14f36156aafa290832d47c608..a47717329d4f3a1b9a2497c85263378c6ed13d3e 100755 (executable)
@@ -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." }
index 651a12c737b520b586c1ff8e755a41b57cef3c7f..5d87e40d94e4093522a7f0c0fc68586a71ca3772 100755 (executable)
@@ -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." } ;
index 774d84ff3d02dd27703ce30e03a6bd43093af022..c214eee8d58ad7c20ed7fe1370227cf5e3ae2456 100755 (executable)
@@ -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