diff --git a/src/lime/system/Clipboard.hx b/src/lime/system/Clipboard.hx index 3bd98914b..cdd15d263 100644 --- a/src/lime/system/Clipboard.hx +++ b/src/lime/system/Clipboard.hx @@ -9,6 +9,9 @@ import flash.desktop.Clipboard as FlashClipboard; import lime._internal.backend.html5.HTML5Window; #end +/** + Reads and writes text on the system clipboard. +**/ #if !lime_debug @:fileXml('tags="haxe,release"') @:noDebug @@ -17,8 +20,16 @@ import lime._internal.backend.html5.HTML5Window; @:access(lime.ui.Window) class Clipboard { + /** + Dispatched when the clipboard text changes. + **/ public static var onUpdate = new EventVoid>(); + + /** + The text currently stored in the clipboard. + **/ public static var text(get, set):String; + private static var _text:String; @:noCompletion private static var __updated = false; diff --git a/src/lime/system/System.hx b/src/lime/system/System.hx index 005061521..69f805895 100644 --- a/src/lime/system/System.hx +++ b/src/lime/system/System.hx @@ -25,6 +25,9 @@ import js.Browser; import sys.io.Process; #end +/** + Access operating system level settings and operations. +**/ #if !lime_debug @:fileXml('tags="haxe,release"') @:noDebug @@ -44,21 +47,68 @@ extern "C" { #end class System { + /** + Determines if the screen saver is allowed to start or not. + **/ public static var allowScreenTimeout(get, set):Bool; + + /** + The path to the directory where the application is installed, along with + its supporting files. In many cases, this directory is read-only, and + attempts to write to files, create new files, or delete files in this + directory are likely fail. + **/ public static var applicationDirectory(get, never):String; + + /** + The application's dedicated storage directory, which unique to each + application and user. Useful for storing settings on a user-specific + and application-specific basis. + + This directory may or may not be removed when the application is + uninstalled, and it depends on the platform and installer technology + that is used. + **/ public static var applicationStorageDirectory(get, never):String; + + /** + The path to the directory containing the user's desktop. + **/ public static var desktopDirectory(get, never):String; + public static var deviceModel(get, never):String; public static var deviceVendor(get, never):String; public static var disableCFFI:Bool; + + /** + The path to the directory containing the user's documents. + **/ public static var documentsDirectory(get, never):String; + + /** + The platform's default endianness for bytes. + **/ public static var endianness(get, never):Endian; + + /** + The path to the directory where fonts are installed. + **/ public static var fontsDirectory(get, never):String; + + /** + The number of available video displays. + **/ public static var numDisplays(get, never):Int; + public static var platformLabel(get, never):String; public static var platformName(get, never):String; public static var platformVersion(get, never):String; + + /** + The path to the user's home directory. + **/ public static var userDirectory(get, never):String; + @:noCompletion private static var __applicationDirectory:String; @:noCompletion private static var __applicationEntryPoint:Map; @:noCompletion private static var __applicationStorageDirectory:String; @@ -139,6 +189,10 @@ class System #end #if (!lime_doc_gen || sys) + /** + Attempts to exit the application. Dispatches `onExit`, and will not + exit if the event is canceled. + **/ public static function exit(code:Int):Void { var currentApp = Application.current; @@ -167,6 +221,9 @@ class System } #end + /** + Returns information about the video display with the specified ID. + **/ public static function getDisplay(id:Int):Display { #if (lime_cffi && !macro) @@ -265,6 +322,9 @@ class System return null; } + /** + The number of milliseconds since the application was initialized. + **/ public static function getTimer():Int { #if flash @@ -293,6 +353,11 @@ class System } #end + /** + Opens a file with the suste, default application. + + In a web browser, opens a URL with target `_blank`. + **/ public static function openFile(path:String):Void { if (path != null) @@ -316,6 +381,9 @@ class System } } + /** + Opens a URL with the specified target web browser window. + **/ public static function openURL(url:String, target:String = "_blank"):Void { if (url != null)