aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/documentation/lux/world/output
diff options
context:
space:
mode:
authorEduardo Julian2021-08-25 16:47:50 -0400
committerEduardo Julian2021-08-25 16:47:50 -0400
commitb216900093c905b3b20dd45c69e577b192e2f7a3 (patch)
tree4d6ac7d257752a8c54ca77dd58df9753ce357ab6 /stdlib/source/documentation/lux/world/output
parent36303d6cb2ce3ab9e36d045b9516c997bd461862 (diff)
Updates to the Lua compiler.
Diffstat (limited to 'stdlib/source/documentation/lux/world/output')
-rw-r--r--stdlib/source/documentation/lux/world/output/video/resolution.lux69
1 files changed, 69 insertions, 0 deletions
diff --git a/stdlib/source/documentation/lux/world/output/video/resolution.lux b/stdlib/source/documentation/lux/world/output/video/resolution.lux
new file mode 100644
index 000000000..6425902c8
--- /dev/null
+++ b/stdlib/source/documentation/lux/world/output/video/resolution.lux
@@ -0,0 +1,69 @@
+(.module:
+ [library
+ [lux #*
+ ["$" documentation (#+ documentation:)]
+ [control
+ ["<>" parser
+ ["<.>" code]]]
+ [data
+ ["." text (#+ \n)
+ ["%" format (#+ format)]]]
+ [macro
+ ["." template]]]]
+ [\\library
+ ["." /]])
+
+(documentation: /.Resolution
+ "A screen resolution.")
+
+(template [<name>]
+ [(documentation: <name>
+ (let [name (|> (template.text [<name>])
+ (text.replaced "/" " ")
+ (text.replaced "_" " ")
+ text.upper_cased)]
+ (format name " resolution: "
+ (%.nat (value@ #/.width <name>))
+ "x" (%.nat (value@ #/.height <name>))
+ ".")))]
+
+ [/.svga]
+ [/.wsvga]
+ [/.xga]
+ [/.xga+]
+ [/.wxga/16:9]
+ [/.wxga/5:3]
+ [/.wxga/16:10]
+ [/.sxga]
+ [/.wxga+]
+ [/.hd+]
+ [/.wsxga+]
+ [/.fhd]
+ [/.wuxga]
+ [/.wqhd]
+ [/.uhd_4k]
+ )
+
+(.def: .public documentation
+ (.List $.Module)
+ ($.module /._
+ ""
+ [..Resolution
+ ..svga
+ ..wsvga
+ ..xga
+ ..xga+
+ ..wxga/16:9
+ ..wxga/5:3
+ ..wxga/16:10
+ ..sxga
+ ..wxga+
+ ..hd+
+ ..wsxga+
+ ..fhd
+ ..wuxga
+ ..wqhd
+ ..uhd_4k
+ ($.default /.hash)
+ ($.default /.equivalence)]
+ []))