externs: more Haxe 4.3 compatibility
This commit is contained in:
@@ -13,7 +13,7 @@ extern class KeyboardEvent extends Event
|
||||
var keyLocation:flash.ui.KeyLocation;
|
||||
var shiftKey:Bool;
|
||||
function new(type:String, bubbles:Bool = true, cancelable:Bool = false, charCodeValue:UInt = 0, keyCodeValue:UInt = 0,
|
||||
keyLocationValue:flash.ui.KeyLocation = 0, ctrlKeyValue:Bool = false, altKeyValue:Bool = false, shiftKeyValue:Bool = false):Void;
|
||||
keyLocationValue:flash.ui.KeyLocation = STANDARD, ctrlKeyValue:Bool = false, altKeyValue:Bool = false, shiftKeyValue:Bool = false):Void;
|
||||
function updateAfterEvent():Void;
|
||||
static var KEY_DOWN(default, never):String;
|
||||
static var KEY_UP(default, never):String;
|
||||
|
||||
@@ -2,20 +2,33 @@ package flash.net;
|
||||
|
||||
extern class Socket extends flash.events.EventDispatcher implements flash.utils.IDataOutput implements flash.utils.IDataInput
|
||||
{
|
||||
#if (haxe_ver < 4.3)
|
||||
var bytesAvailable(default, never):UInt;
|
||||
@:require(flash11) var bytesPending(default, never):UInt;
|
||||
var connected(default, never):Bool;
|
||||
var endian:flash.utils.Endian;
|
||||
var objectEncoding:UInt;
|
||||
@:require(flash10) var timeout:UInt;
|
||||
#if air
|
||||
var localAddress(default, never):String;
|
||||
var localPort(default, never):Int;
|
||||
#end
|
||||
var objectEncoding:#if openfl openfl.net.ObjectEncoding #else UInt #end;
|
||||
#if air
|
||||
var remoteAddress(default, never):String;
|
||||
var remotePort(default, never):Int;
|
||||
#end
|
||||
@:require(flash10) var timeout:UInt;
|
||||
#else
|
||||
@:flash.property var bytesAvailable(get, never):UInt;
|
||||
@:flash.property @:require(flash11) var bytesPending(get, never):UInt;
|
||||
@:flash.property var connected(get, never):Bool;
|
||||
@:flash.property var endian(get, set):flash.utils.Endian;
|
||||
@:flash.property var objectEncoding(get, set):UInt;
|
||||
@:flash.property @:require(flash10) var timeout(get, set):UInt;
|
||||
#if air
|
||||
@:flash.property var localAddress(get, never):String;
|
||||
@:flash.property var localPort(get, never):Int;
|
||||
@:flash.property var remoteAddress(get, never):String;
|
||||
@:flash.property var remotePort(get, never):Int;
|
||||
#end
|
||||
#end
|
||||
function new(?host:String, port:Int = 0):Void;
|
||||
function close():Void;
|
||||
function connect(host:String, port:Int):Void;
|
||||
@@ -46,4 +59,22 @@ extern class Socket extends flash.events.EventDispatcher implements flash.utils.
|
||||
function writeUTF(value:String):Void;
|
||||
function writeUTFBytes(value:String):Void;
|
||||
function writeUnsignedInt(value:UInt):Void;
|
||||
|
||||
#if (haxe_ver >= 4.3)
|
||||
private function get_bytesAvailable():UInt;
|
||||
private function get_bytesPending():UInt;
|
||||
private function get_connected():Bool;
|
||||
private function get_endian():flash.utils.Endian;
|
||||
private function get_objectEncoding():UInt;
|
||||
private function get_timeout():UInt;
|
||||
#if air
|
||||
private function get_localAddress():String;
|
||||
private function get_localPort():Int;
|
||||
private function get_remoteAddress():String;
|
||||
private function get_remotePort():Int;
|
||||
#end
|
||||
private function set_endian(value:flash.utils.Endian):flash.utils.Endian;
|
||||
private function set_objectEncoding(value:UInt):UInt;
|
||||
private function set_timeout(value:UInt):UInt;
|
||||
#end
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user