From ca63a40da876477bda0abaaec8585b1b8ee3c75e Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Mon, 19 Jun 2017 12:42:33 -0700 Subject: [PATCH] Some doc improvements --- .gitignore | 1 + docs/build.hxml | 95 ++++++++++++++++++++++++----------------- lime/app/Application.hx | 42 ++++++++++++++++++ lime/app/Config.hx | 85 ++++++++++++++++++++++++++++++++++++ 4 files changed, 183 insertions(+), 40 deletions(-) diff --git a/.gitignore b/.gitignore index 21285c9ce..267829fdd 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ tools/*.n tools/*.exe haxedoc.xml docs/*.xml +docs/xml docs/pages* legacy/ndll/*/lime* legacy/ndll/*/liblime* diff --git a/docs/build.hxml b/docs/build.hxml index e7142cf92..c8446e787 100644 --- a/docs/build.hxml +++ b/docs/build.hxml @@ -1,78 +1,94 @@ # Generate platform-specific XML for documentation output --xml Flash.xml -#-swf obj/docs --cpp obj/docs +-xml xml/Flash.xml +-swf obj/docs +-swf-version 17.0 -D display --D lime-cffi +-D doc_gen ImportAll -lib lime -#-swf-version 11 --no-output --next --xml Windows.xml +-xml xml/Windows.xml -cpp obj/docs -D display -D native -D lime-cffi -D windows +-D doc_gen ImportAll -lib lime --no-output --next --xml Mac.xml +-xml xml/Mac.xml -cpp obj/docs -D display -D native -D lime-cffi -D mac +-D doc_gen ImportAll -lib lime --no-output --next --xml Linux.xml +-xml xml/Linux.xml -cpp obj/docs -D display -D native -D lime-cffi -D linux +-D doc_gen +ImportAll +-lib lime +--no-output + +--next + +-xml xml/Neko.xml +-neko obj/docs +-D display +-D native +-D lime-cffi +-D doc_gen +ImportAll +-lib lime +--no-output + +--next + +-xml xml/iOS.xml +-cpp obj/docs +-D display +-D native +-D lime-cffi +-D ios +-D doc_gen +ImportAll +-lib lime +--no-output + +--next + +-xml xml/Android.xml +-cpp obj/docs +-D display +-D native +-D lime-cffi +-D android +-D doc_gen ImportAll -lib lime --no-output #--next # -#-xml iOS.xml -#-cpp obj/docs -#-D display -#-D native -#-D lime-cffi -#-D ios -#ImportAll -#-lib openfl -#--no-output -# -#--next -# -#-xml Android.xml -#-cpp obj/docs -#-D display -#-D native -#-D lime-cffi -#-D android -#ImportAll -#-lib lime -#--no-output -# -#--next -# -#-xml BlackBerry.xml +#-xml xml/BlackBerry.xml #-cpp obj/docs #-D display #-D native @@ -84,7 +100,7 @@ ImportAll # #--next # -#-xml Tizen.xml +#-xml xml/Tizen.xml #-cpp obj/docs #-D display #-D native @@ -96,7 +112,7 @@ ImportAll # #--next # -#-xml Firefox OS.xml +#-xml xml/Firefox OS.xml #-cpp obj/docs #-D display #-D html5 @@ -107,16 +123,15 @@ ImportAll # --next --xml HTML5.xml -#-js obj/docs --cpp obj/docs +-xml xml/HTML5.xml +-js obj/docs -D display --D lime-cffi -D html5 +-D doc_gen ImportAll -lib lime --no-output --next --cmd haxelib run dox -i . -in lime --title "Lime Documentation" +-cmd haxelib run dox -i xml -in lime --title "Lime API Reference" -D website "http://www.openfl.org/lime" -D textColor 0x777777 diff --git a/lime/app/Application.hx b/lime/app/Application.hx index 25af8b651..261760970 100644 --- a/lime/app/Application.hx +++ b/lime/app/Application.hx @@ -29,11 +29,33 @@ import lime.ui.Window; class Application extends Module { + /** + * The current Application instance that is executing + **/ public static var current (default, null):Application; + + /** + * Configuration values for the application, such as window options or a package name + **/ public var config (default, null):Config; + + /** + * The current frame rate (measured in frames-per-second) of the application. + * + * On some platforms, a frame rate of 60 or greater may imply vsync, which will + * perform more quickly on displays with a higher refresh rate + **/ public var frameRate (get, set):Float; + + /** + * A list of currently attached Module instances + **/ public var modules (default, null):Array; + + /** + * The Preloader for the current Application + **/ public var preloader (get, null):Preloader; /** @@ -41,9 +63,26 @@ class Application extends Module { */ public var onUpdate = new EventVoid> (); + /** + * The Renderer associated with this Application, or the first Renderer + * if there are multiple Renderer instances + **/ public var renderer (get, null):Renderer; + + /** + * A list of Renderer instances associated with this Application + **/ public var renderers (get, null):Array; + + /** + * The Window associated with this Application, or the first Window + * if there are multiple Windows active + **/ public var window (get, null):Window; + + /** + * A list of active Window instances associated with this Application + **/ public var windows (get, null):Array; @:noCompletion private var backend:ApplicationBackend; @@ -57,6 +96,9 @@ class Application extends Module { } + /** + * Creates a new Application instance + **/ public function new () { super (); diff --git a/lime/app/Config.hx b/lime/app/Config.hx index 10781836c..925ed23cc 100644 --- a/lime/app/Config.hx +++ b/lime/app/Config.hx @@ -3,15 +3,100 @@ package lime.app; typedef Config = { + /** + * A build number + * + * The build number is a unique, integer-based value which increases + * upon each build or release of an application. This is distinct from + * the version number. + * + * In the default generated config for Lime applications, this is often + * updated automatically, or can be overriden in XML project files using + * the `` attribute + **/ @:optional var build:String; + + /** + * A company name + * + * In the default generated config for Lime applications, this value + * corresponds to the `` attribute in XML + **/ @:optional var company:String; + + /** + * An application file name, without a file extension + * + * In the default generated config for Lime applications, this value + * corresponds to the `` attribute in XML + **/ @:optional var file:String; + + /** + * A requested frame rate + * + * In the default generated config for Lime applications, the default value + * is 30 FPS on many platforms, or vsync for HTML5. It can be overriden in + * XML project files using the `` attribute + **/ @:optional var fps:Int; + + /** + * An application name, used as the default Window title + * + * In the default generated config for Lime applications, this value + * corresponds to the `` attribute in XML + **/ @:optional var name:String; + + /** + * An application orientation + * + * Expected values include "portrait", "landscape" or an empty string + * for all orientations. + * + * In the default generated config for Lime applications, this value + * corresponds to the `` attribute in XML + **/ @:optional var orientation:String; + + /** + * A package name, this usually corresponds to the unique ID used + * in application stores to identify the current application + * + * In the default generated config for Lime applications, this value + * corresponds to the `` attribute in XML + **/ @:optional var packageName:String; + + /** + * A root path for application assets + * + * The default value is an empty string, but this can be used when + * bundled application assets are located in a different directory. + * + * This value is not exposed in Lime project files, but is available + * using the `lime.embed` function in HTML5 project embeds, and may + * behave similarly to the Flash "base" embed parameter + **/ @:optional var rootPath:String; + + /** + * A version number + * + * The version number is what normally corresponds to the user-facing + * version for an application, such as "1.0.0" or "12.2.5". This is + * distinct from the build number. Many application stores expect the + * version number to include three segments. + * + * In the default generated config for Lime applications, this value + * corresponds to the `` attribute in XML + **/ @:optional var version:String; + + /** + * A set of configuration objects for each initial application Window + **/ @:optional var windows:Array; }