]> gitweb.factorcode.org Git - factor.git/commitdiff
move ui.offscreen to unmaintained for now
authorJoe Groff <arcata@gmail.com>
Mon, 4 May 2009 03:04:25 +0000 (22:04 -0500)
committerJoe Groff <arcata@gmail.com>
Mon, 4 May 2009 03:04:25 +0000 (22:04 -0500)
extra/ui/offscreen/authors.txt [deleted file]
extra/ui/offscreen/offscreen-docs.factor [deleted file]
extra/ui/offscreen/offscreen.factor [deleted file]
extra/ui/offscreen/summary.txt [deleted file]
extra/ui/offscreen/tags.txt [deleted file]
unmaintained/ui/offscreen/authors.txt [new file with mode: 0644]
unmaintained/ui/offscreen/offscreen-docs.factor [new file with mode: 0644]
unmaintained/ui/offscreen/offscreen.factor [new file with mode: 0755]
unmaintained/ui/offscreen/summary.txt [new file with mode: 0644]
unmaintained/ui/offscreen/tags.txt [new file with mode: 0644]

diff --git a/extra/ui/offscreen/authors.txt b/extra/ui/offscreen/authors.txt
deleted file mode 100644 (file)
index f13c9c1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Joe Groff
diff --git a/extra/ui/offscreen/offscreen-docs.factor b/extra/ui/offscreen/offscreen-docs.factor
deleted file mode 100644 (file)
index b9d68ff..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-! Copyright (C) 2008 Joe Groff.
-! See http://factorcode.org/license.txt for BSD license.
-USING: help.markup help.syntax kernel quotations ui.gadgets
-images strings ui.gadgets.worlds ;
-IN: ui.offscreen
-
-HELP: <offscreen-world>
-{ $values
-     { "gadget" gadget } { "title" string } { "status" "a boolean" }
-     { "world" offscreen-world }
-}
-{ $description "Constructs an " { $link offscreen-world } " gadget with " { $snippet "gadget" } " as its only child. Generally you should use " { $link open-offscreen } " or " { $link do-offscreen } " instead of calling this word directly." } ;
-
-HELP: close-offscreen
-{ $values
-     { "world" offscreen-world }
-}
-{ $description "Releases the resources used by the rendering buffer for " { $snippet "world" } "." } ;
-
-HELP: do-offscreen
-{ $values
-     { "gadget" gadget } { "quot" quotation }
-}
-{ $description "Constructs an " { $link offscreen-world } " around " { $snippet "gadget" } " with " { $link open-offscreen } ", calls " { $snippet "quotation" } " with the world on the top of the stack, and cleans up the world with " { $link close-offscreen } " at the end of " { $snippet "quotation" } "." } ;
-
-HELP: gadget>bitmap
-{ $values
-     { "gadget" gadget }
-     { "image" image }
-}
-{ $description "Renders " { $snippet "gadget" } " to an " { $link offscreen-world } " and creates an " { $link image } " from its contents." } ;
-
-HELP: offscreen-world
-{ $class-description "The class of " { $link world } " objects that render to an offscreen buffer." } ;
-
-HELP: offscreen-world>bitmap
-{ $values
-     { "world" offscreen-world }
-     { "image" image }
-}
-{ $description "Saves a copy of the contents of " { $snippet "world" } " to a " { $link image } " object." } ;
-
-HELP: open-offscreen
-{ $values
-     { "gadget" gadget }
-     { "world" offscreen-world }
-}
-{ $description "Creates and sets up an " { $link offscreen-world } " with " { $snippet "gadget" } " as its only child." } ;
-
-{ offscreen-world open-offscreen close-offscreen do-offscreen } related-words
-
-ARTICLE: "ui.offscreen" "Offscreen UI rendering"
-"The " { $vocab-link "ui.offscreen" } " provides words for rendering gadgets to an offscreen buffer so that bitmaps can be made from their contents."
-{ $subsection offscreen-world }
-"Opening gadgets offscreen:"
-{ $subsection open-offscreen }
-{ $subsection close-offscreen }
-{ $subsection do-offscreen }
-"Creating bitmaps from offscreen buffers:"
-{ $subsection offscreen-world>bitmap }
-{ $subsection gadget>bitmap } ;
-
-ABOUT: "ui.offscreen"
diff --git a/extra/ui/offscreen/offscreen.factor b/extra/ui/offscreen/offscreen.factor
deleted file mode 100755 (executable)
index c6669eb..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-! (c) 2008 Joe Groff, see license for details
-USING: accessors alien.c-types continuations images kernel math
-sequences ui.gadgets ui.gadgets.private ui.gadgets.worlds
-ui.private ui ui.backend destructors locals ;
-IN: ui.offscreen
-
-TUPLE: offscreen-world < world ;
-
-M: offscreen-world world-pixel-format-attributes
-    { offscreen T{ depth-bits { value 16 } } } ;
-
-: <offscreen-world> ( gadget title status -- world )
-    offscreen-world new-world ;
-
-M: offscreen-world graft*
-    (open-offscreen-buffer) ;
-
-M: offscreen-world ungraft*
-    [ (ungraft-world) ]
-    [ handle>> (close-offscreen-buffer) ]
-    [ reset-world ] tri ;
-
-: open-offscreen ( gadget -- world )
-    "" f <offscreen-world>
-    [ open-world-window ] [ relayout-1 ] [ ] tri
-    notify-queued ;
-
-: close-offscreen ( world -- )
-    ungraft notify-queued ;
-
-:: bgrx>bitmap ( alien w h -- image )
-    <image>
-        { w h } >>dim
-        alien w h * 4 * memory>byte-array >>bitmap
-        BGRX >>component-order ;
-
-: offscreen-world>bitmap ( world -- image )
-    offscreen-pixels bgrx>bitmap ;
-
-: do-offscreen ( gadget quot: ( offscreen-world -- ) -- )
-    [ open-offscreen ] dip
-    over [ slip ] [ close-offscreen ] [ ] cleanup ; inline
-
-: gadget>bitmap ( gadget -- image )
-    [ offscreen-world>bitmap ] do-offscreen ;
diff --git a/extra/ui/offscreen/summary.txt b/extra/ui/offscreen/summary.txt
deleted file mode 100644 (file)
index 51ef124..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Offscreen world gadgets for rendering UI elements to bitmaps
diff --git a/extra/ui/offscreen/tags.txt b/extra/ui/offscreen/tags.txt
deleted file mode 100644 (file)
index 46f6dcd..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-ui
-graphics
diff --git a/unmaintained/ui/offscreen/authors.txt b/unmaintained/ui/offscreen/authors.txt
new file mode 100644 (file)
index 0000000..f13c9c1
--- /dev/null
@@ -0,0 +1 @@
+Joe Groff
diff --git a/unmaintained/ui/offscreen/offscreen-docs.factor b/unmaintained/ui/offscreen/offscreen-docs.factor
new file mode 100644 (file)
index 0000000..b9d68ff
--- /dev/null
@@ -0,0 +1,63 @@
+! Copyright (C) 2008 Joe Groff.
+! See http://factorcode.org/license.txt for BSD license.
+USING: help.markup help.syntax kernel quotations ui.gadgets
+images strings ui.gadgets.worlds ;
+IN: ui.offscreen
+
+HELP: <offscreen-world>
+{ $values
+     { "gadget" gadget } { "title" string } { "status" "a boolean" }
+     { "world" offscreen-world }
+}
+{ $description "Constructs an " { $link offscreen-world } " gadget with " { $snippet "gadget" } " as its only child. Generally you should use " { $link open-offscreen } " or " { $link do-offscreen } " instead of calling this word directly." } ;
+
+HELP: close-offscreen
+{ $values
+     { "world" offscreen-world }
+}
+{ $description "Releases the resources used by the rendering buffer for " { $snippet "world" } "." } ;
+
+HELP: do-offscreen
+{ $values
+     { "gadget" gadget } { "quot" quotation }
+}
+{ $description "Constructs an " { $link offscreen-world } " around " { $snippet "gadget" } " with " { $link open-offscreen } ", calls " { $snippet "quotation" } " with the world on the top of the stack, and cleans up the world with " { $link close-offscreen } " at the end of " { $snippet "quotation" } "." } ;
+
+HELP: gadget>bitmap
+{ $values
+     { "gadget" gadget }
+     { "image" image }
+}
+{ $description "Renders " { $snippet "gadget" } " to an " { $link offscreen-world } " and creates an " { $link image } " from its contents." } ;
+
+HELP: offscreen-world
+{ $class-description "The class of " { $link world } " objects that render to an offscreen buffer." } ;
+
+HELP: offscreen-world>bitmap
+{ $values
+     { "world" offscreen-world }
+     { "image" image }
+}
+{ $description "Saves a copy of the contents of " { $snippet "world" } " to a " { $link image } " object." } ;
+
+HELP: open-offscreen
+{ $values
+     { "gadget" gadget }
+     { "world" offscreen-world }
+}
+{ $description "Creates and sets up an " { $link offscreen-world } " with " { $snippet "gadget" } " as its only child." } ;
+
+{ offscreen-world open-offscreen close-offscreen do-offscreen } related-words
+
+ARTICLE: "ui.offscreen" "Offscreen UI rendering"
+"The " { $vocab-link "ui.offscreen" } " provides words for rendering gadgets to an offscreen buffer so that bitmaps can be made from their contents."
+{ $subsection offscreen-world }
+"Opening gadgets offscreen:"
+{ $subsection open-offscreen }
+{ $subsection close-offscreen }
+{ $subsection do-offscreen }
+"Creating bitmaps from offscreen buffers:"
+{ $subsection offscreen-world>bitmap }
+{ $subsection gadget>bitmap } ;
+
+ABOUT: "ui.offscreen"
diff --git a/unmaintained/ui/offscreen/offscreen.factor b/unmaintained/ui/offscreen/offscreen.factor
new file mode 100755 (executable)
index 0000000..c6669eb
--- /dev/null
@@ -0,0 +1,45 @@
+! (c) 2008 Joe Groff, see license for details
+USING: accessors alien.c-types continuations images kernel math
+sequences ui.gadgets ui.gadgets.private ui.gadgets.worlds
+ui.private ui ui.backend destructors locals ;
+IN: ui.offscreen
+
+TUPLE: offscreen-world < world ;
+
+M: offscreen-world world-pixel-format-attributes
+    { offscreen T{ depth-bits { value 16 } } } ;
+
+: <offscreen-world> ( gadget title status -- world )
+    offscreen-world new-world ;
+
+M: offscreen-world graft*
+    (open-offscreen-buffer) ;
+
+M: offscreen-world ungraft*
+    [ (ungraft-world) ]
+    [ handle>> (close-offscreen-buffer) ]
+    [ reset-world ] tri ;
+
+: open-offscreen ( gadget -- world )
+    "" f <offscreen-world>
+    [ open-world-window ] [ relayout-1 ] [ ] tri
+    notify-queued ;
+
+: close-offscreen ( world -- )
+    ungraft notify-queued ;
+
+:: bgrx>bitmap ( alien w h -- image )
+    <image>
+        { w h } >>dim
+        alien w h * 4 * memory>byte-array >>bitmap
+        BGRX >>component-order ;
+
+: offscreen-world>bitmap ( world -- image )
+    offscreen-pixels bgrx>bitmap ;
+
+: do-offscreen ( gadget quot: ( offscreen-world -- ) -- )
+    [ open-offscreen ] dip
+    over [ slip ] [ close-offscreen ] [ ] cleanup ; inline
+
+: gadget>bitmap ( gadget -- image )
+    [ offscreen-world>bitmap ] do-offscreen ;
diff --git a/unmaintained/ui/offscreen/summary.txt b/unmaintained/ui/offscreen/summary.txt
new file mode 100644 (file)
index 0000000..51ef124
--- /dev/null
@@ -0,0 +1 @@
+Offscreen world gadgets for rendering UI elements to bitmaps
diff --git a/unmaintained/ui/offscreen/tags.txt b/unmaintained/ui/offscreen/tags.txt
new file mode 100644 (file)
index 0000000..46f6dcd
--- /dev/null
@@ -0,0 +1,2 @@
+ui
+graphics