Nicolas Cannasse 14 years ago
parent
commit
1d2ee8e5e1

+ 3 - 1
std/flash9/ui/Mouse.hx

@@ -3,7 +3,9 @@ package flash.ui;
 extern class Mouse {
 	@:require(flash10) static var cursor : MouseCursor;
 	@:require(flash10_1) static var supportsCursor(default,null) : Bool;
+	@:require(flash11) static var supportsNativeCursor(default,null) : Bool;
 	static function hide() : Void;
-	@:require(flash10_2) static function registerCursor(cursor : flash.ui.MouseCursorData) : Void;
+	@:require(flash10_2) static function registerCursor(name : String, cursor : MouseCursorData) : Void;
 	static function show() : Void;
+	@:require(flash11) static function unregisterCursor(name : String) : Void;
 }

+ 6 - 6
std/flash9/ui/MouseCursor.hx

@@ -1,9 +1,9 @@
 package flash.ui;
 
-@:fakeEnum(String) extern enum MouseCursor {
-	ARROW;
-	AUTO;
-	BUTTON;
-	HAND;
-	IBEAM;
+extern class MouseCursor {
+	static var ARROW : String;
+	static var AUTO : String;
+	static var BUTTON : String;
+	static var HAND : String;
+	static var IBEAM : String;
 }

+ 1 - 2
std/flash9/ui/MouseCursorData.hx

@@ -4,6 +4,5 @@ package flash.ui;
 	var data : flash.Vector<flash.display.BitmapData>;
 	var frameRate : Float;
 	var hotSpot : flash.geom.Point;
-	var name : String;
-	function new(name : String) : Void;
+	function new() : Void;
 }

+ 8 - 0
std/flash9/utils/ByteArray.hx

@@ -8,7 +8,11 @@ extern class ByteArray implements IDataOutput, implements IDataInput, implements
 	var position : UInt;
 	function new() : Void;
 	@:require(flash10) function clear() : Void;
+	#if flash11
+	function compress(?algorithm : CompressionAlgorithm) : Void;
+	#else
 	function compress() : Void;
+	#end
 	@:require(flash10) function deflate() : Void;
 	@:require(flash10) function inflate() : Void;
 	function readBoolean() : Bool;
@@ -26,7 +30,11 @@ extern class ByteArray implements IDataOutput, implements IDataInput, implements
 	function readUnsignedInt() : UInt;
 	function readUnsignedShort() : UInt;
 	function toString() : String;
+	#if flash11
+	function uncompress(?algorithm : CompressionAlgorithm) : Void;
+	#else
 	function uncompress() : Void;
+	#end
 	function writeBoolean(value : Bool) : Void;
 	function writeByte(value : Int) : Void;
 	function writeBytes(bytes : ByteArray, offset : UInt = 0, length : UInt = 0) : Void;

+ 6 - 0
std/flash9/utils/CompressionAlgorithm.hx

@@ -0,0 +1,6 @@
+package flash.utils;
+
+@:fakeEnum(String) extern enum CompressionAlgorithm {
+	DEFLATE;
+	ZLIB;
+}

+ 8 - 32
std/flash9/utils/RegExp.hx

@@ -1,38 +1,14 @@
-/*
- * Copyright (c) 2005-2011, The haXe Project Contributors
- * All rights reserved.
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *   - Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *   - Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE HAXE PROJECT CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE HAXE PROJECT CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- */
 package flash.utils;
 
 @:native("RegExp") extern class RegExp implements Dynamic {
-	var dotall(default,never) : Bool;
-	var extended(default,never) : Bool;
-	var global(default,never) : Bool;
-	var ignoreCase(default,never) : Bool;
+	var dotall(default,null) : Bool;
+	var extended(default,null) : Bool;
+	var global(default,null) : Bool;
+	var ignoreCase(default,null) : Bool;
 	var lastIndex : Int;
-	var multiline(default,never) : Bool;
-	var source(default,never) : String;
+	var multiline(default,null) : Bool;
+	var source(default,null) : String;
 	function new(?pattern : Dynamic, ?options : Dynamic) : Void;
-	function exec(?s : String) : Dynamic;
-	function test(?s : String) : Bool;
+	@:ns("http://adobe.com/AS3/2006/builtin") function exec(?s : String) : Dynamic;
+	@:ns("http://adobe.com/AS3/2006/builtin") function test(?s : String) : Bool;
 }

+ 1 - 0
std/flash9/xml/XML.hx

@@ -38,6 +38,7 @@ package flash.xml;
 	function setNamespace(ns : Dynamic) : Void;
 	function setNotification(f : Dynamic) : Dynamic;
 	function text() : XMLList;
+	@:require(flash11) function toJSON(k : String) : Dynamic;
 	function toString() : String;
 	function toXMLString() : String;
 	function valueOf() : XML;

+ 1 - 0
std/flash9/xml/XMLList.hx

@@ -36,6 +36,7 @@ package flash.xml;
 	function setName(name : Dynamic) : Void;
 	function setNamespace(ns : Dynamic) : Void;
 	function text() : XMLList;
+	@:require(flash11) function toJSON(k : String) : Dynamic;
 	function toString() : String;
 	function toXMLString() : String;
 	function valueOf() : XMLList;