Переглянути джерело

added flash lite classes.

Nicolas Cannasse 18 роки тому
батько
коміт
6a4140ac11

+ 3 - 0
doc/CHANGES.txt

@@ -1,3 +1,6 @@
+2007-??-??: 1.12
+	added flash lite support with -D flash_lite
+
 2007-01-28: 1.11
 	changed StringBuf.add implementation
 	added haxe.Firebug

+ 9 - 0
std/Date.hx

@@ -101,6 +101,15 @@ extern class Date
 	**/
 	static function fromString( s : String ) : Date;
 
+	#if flash_lite
+	/** flash lite only **/
+	function getLocaleLongDate():String;
+	/** flash lite only **/
+	function getLocaleShortDate():String;
+	/** flash lite only **/
+	function getLocaleTime():String;
+	#end
+
 	private static function __init__() : Void untyped {
 	#if neko
 		Date = neko.NekoDate__;

+ 2 - 0
std/all.hxml

@@ -9,6 +9,7 @@ haxe.ImportAll
 -swf all.swf
 -xml flash.xml
 -D flash9doc
+-D flash_lite
 --override
 haxe.ImportAll
 
@@ -23,6 +24,7 @@ haxe.ImportAll
 
 -swf all_strict.swf
 -D flash_strict
+-D flash_lite
 -D flash9doc
 -xml flash_strict.xml
 --override

+ 28 - 0
std/flash/ExtendedKey.hx

@@ -0,0 +1,28 @@
+package flash;
+
+#if flash_lite
+
+/** flash lite only **/
+extern class ExtendedKey {
+
+	static var SOFT1 : String;
+	static var SOFT2 : String;
+	static var SOFT3 : String;
+	static var SOFT4 : String;
+	static var SOFT5 : String;
+	static var SOFT6 : String;
+	static var SOFT7 : String;
+	static var SOFT8 : String;
+	static var SOFT9 : String;
+	static var SOFT10 : String;
+	static var SOFT11 : String;
+	static var SOFT12 : String;
+
+	private static function __init__() : Void untyped {
+		flash.ExtendedKey = _global["ExtendedKey"];
+	}
+
+}
+
+#else error
+#end

+ 12 - 0
std/flash/SharedObject.hx

@@ -24,6 +24,18 @@ extern class SharedObject
 
 	function clear() : Void;
 
+
+	#if flash_lite
+	/** flash lite only **/
+	static function getMaxSize():Float;
+
+	/** flash lite only **/
+	static function addListener():Void;
+
+	/** flash lite only **/
+	static function removeListener(soName:String):Void;
+	#end
+
 	var data:Dynamic;
 
 	private static function __init__() : Void untyped {

+ 13 - 0
std/flash/Video.hx

@@ -10,6 +10,19 @@ extern class Video
 	function attachVideo( source : Dynamic ) : Void;
 	function clear() : Void;
 
+	#if flash_lite
+	/** flash lite only **/
+	function play():Bool;
+	/** flash lite only **/
+	function close():Void;
+	/** flash lite only **/
+	function stop():Void;
+	/** flash lite only **/
+	function pause():Void;
+	/** flash lite only **/
+	function resume():Void;
+	#end
+
 	private static function __init__() : Void untyped {
  		flash.Video = _global["Video"];
 	}

+ 24 - 0
std/flash/system/Capabilities.hx

@@ -30,6 +30,30 @@ extern class Capabilities
 	static var localFileReadDisable:Bool;
 	static var windowlessDisable:Bool;
 
+	#if flash_lite
+	static var hasCompoundSound:Bool;
+	static var hasEmail:Bool;
+	static var hasMMS:Bool;
+	static var hasSMS:Bool;
+	static var hasMFI:Bool;
+	static var hasMIDI:Bool;
+	static var hasSMAF:Bool;
+	static var hasDataLoading:Bool;
+	static var has4WayKeyAS:Bool;
+	static var hasMouse:Bool;
+	static var hasMappableSoftKeys:Bool;
+	static var hasCMIDI:Bool;
+	static var hasStylus:Bool;
+	static var screenOrientation:String;
+	static var hasSharedObjects:Bool;
+	static var hasQWERTYKeyboard:Bool;
+	static var softKeyCount:Float;
+	static var audioMIMETypes:Array<String>;
+	static var imageMIMETypes:Array<String>;
+	static var videoMIMETypes:Array<String>;
+	static var MIMETypes:String;
+	#end
+
 	private static function __init__() : Void untyped {
 		flash.system.Capabilities = _global["System"]["capabilities"];
 	}

+ 1 - 0
std/haxe/ImportAll.hx

@@ -267,6 +267,7 @@ import flash.Camera;
 import flash.Color;
 import flash.ContextMenu;
 import flash.ContextMenuItem;
+import flash.ExtendedKey;
 import flash.Key;
 import flash.LoadVars;
 import flash.LocalConnection;