Initial support for AIR

This commit is contained in:
Joshua Granick
2017-08-24 12:50:13 -07:00
parent f2a8092834
commit 9991e99fee
186 changed files with 2590 additions and 68 deletions

View File

@@ -0,0 +1,7 @@
package flash.media;
@:fakeEnum(String) extern enum AudioPlaybackMode {
AMBIENT;
MEDIA;
VOICE;
}

View File

@@ -0,0 +1,7 @@
package flash.media;
@:fakeEnum(String) extern enum CameraPosition {
BACK;
FRONT;
UNKNOWN;
}

View File

@@ -0,0 +1,9 @@
package flash.media;
extern class CameraRoll extends flash.events.EventDispatcher {
function new() : Void;
function addBitmapData(bitmapData : flash.display.BitmapData) : Void;
function browseForImage(?value : CameraRollBrowseOptions) : Void;
static var supportsAddBitmapData(default,never) : Bool;
static var supportsBrowseForImage(default,never) : Bool;
}

View File

@@ -0,0 +1,8 @@
package flash.media;
extern class CameraRollBrowseOptions {
var height : Float;
var origin : flash.geom.Rectangle;
var width : Float;
function new() : Void;
}

View File

@@ -0,0 +1,7 @@
package flash.media;
extern class CameraUI extends flash.events.EventDispatcher {
function new() : Void;
function launch(requestedMediaType : String) : Void;
static var isSupported(default,never) : Bool;
}

View File

@@ -0,0 +1,12 @@
package flash.media;
extern interface IFilePromise {
//var file(default,never) : flash.filesystem.File;
var isAsync(default,never) : Bool;
//var mediaType(default,never) : String;
var relativePath(default,never) : String;
//function new() : Void;
function close() : Void;
function open() : flash.utils.IDataInput;
function reportError(e : flash.events.ErrorEvent) : Void;
}

View File

@@ -0,0 +1,24 @@
package flash.media;
extern interface IDataInput {
var bytesAvailable(default,never) : UInt;
var endian : String;
var objectEncoding : UInt;
//function new() : Void;
function close() : Dynamic;
function open() : Dynamic;
function readBoolean() : Bool;
function readByte() : Int;
function readBytes(bytes : flash.utils.ByteArray, ?offset : UInt, ?length : UInt) : Void;
function readDouble() : Float;
function readFloat() : Float;
function readInt() : Int;
function readMultiByte(length : UInt, charSet : String) : String;
function readObject() : Dynamic;
function readShort() : Int;
function readUTF() : String;
function readUTFBytes(length : UInt) : String;
function readUnsignedByte() : UInt;
function readUnsignedInt() : UInt;
function readUnsignedShort() : UInt;
}

View File

@@ -0,0 +1,12 @@
package flash.media;
extern class MediaPromise extends flash.events.EventDispatcher implements IFilePromise {
var file(default,never) : flash.filesystem.File;
var isAsync(default,never) : Bool;
var mediaType(default,never) : String;
var relativePath(default,never) : String;
function new() : Void;
function close() : Void;
function open() : flash.utils.IDataInput;
function reportError(e : flash.events.ErrorEvent) : Void;
}

View File

@@ -0,0 +1,6 @@
package flash.media;
@:fakeEnum(String) extern enum MediaType {
IMAGE;
VIDEO;
}

View File

@@ -0,0 +1,21 @@
package flash.media;
extern class StageWebView extends flash.events.EventDispatcher {
var isHistoryBackEnabled(default,never) : Bool;
var isHistoryForwardEnabled(default,never) : Bool;
var location(default,never) : String;
var stage : flash.display.Stage;
var title(default,never) : String;
var viewPort : flash.geom.Rectangle;
function new() : Void;
function assignFocus(direction : flash.display.FocusDirection=flash.display.FocusDirection.NONE) : Void;
function dispose() : Void;
function drawViewPortToBitmapData(bitmap : flash.display.BitmapData) : Void;
function historyBack() : Void;
function historyForward() : Void;
function loadString(text : String, ?mimeType : String) : Void;
function loadURL(url : String) : Void;
function reload() : Void;
function stop() : Void;
static var isSupported(default,never) : Bool;
}

View File

@@ -0,0 +1,5 @@
package flash.media;
extern class StageWebViewImpl extends flash.display.Sprite {
function new() : Void;
}