Przeglądaj źródła

flash 11.3 beta api

Nicolas Cannasse 13 lat temu
rodzic
commit
69e6e22996

+ 1 - 1
doc/all.hxml

@@ -24,7 +24,7 @@
 -swf all9.swf
 --no-output
 -xml flash9.xml
--swf-version 11
+-swf-version 11.3
 --macro ImportAll.run()
 
 --next

+ 2 - 2
doc/extract.hxml

@@ -1,6 +1,6 @@
 -debug
--swf-lib library112.swf
+-swf-lib library113.swf
 -swf9 test.swf
--swf-version 11.2
+-swf-version 11.3
 --macro patchTypes("../doc/extract.patch")
 --gen-hx-classes

+ 32 - 1
doc/extract.patch

@@ -1099,7 +1099,7 @@ flash.ui.GameInputControl.hand : flash.ui.GameInputHand;
 flash.ui.GameInputControl.type : flash.ui.GameInputControlType;
 
 
-// 11.2 beta 2
+// 11.2
 
 @:require(flash11_2) flash.display3D.Context3D.setProgramConstantsFromByteArray
 @:require(flash11_2) flash.display.Stage.mouseLock;
@@ -1116,4 +1116,35 @@ flash.ui.GameInputControl.type : flash.ui.GameInputControlType;
 @:require(flash11_2) static flash.events.MouseEvent.RIGHT_MOUSE_UP;
 
 
+// 11.3
+
+@:require(flash11_3) flash.display3D.Context3D.createRectangleTexture
+@:require(flash11_3) flash.display.BitmapData.drawWithQuality
+
+flash.display.BitmapData.$quality : StageQuality;
+
+enum flash.display.BitmapEncodingColorSpace;
+
+flash.display.JPEGXREncoderOptions.$colorSpace : BitmapEncodingColorSpace;
+flash.display.JPEGXREncoderOptions.colorSpace : BitmapEncodingColorSpace;
+
+@:require(flash11_3) flash.display.BitmapData.encode
+@:require(flash11_3) flash.display.Stage.allowsFullScreenInteractive
+
+@:require(flash11_3) static flash.events.Event.FRAME_LABEL;
+@:require(flash11_3) static flash.events.Event.SUSPEND;
+
+@:require(flash11_3) static flash.events.FullScreenEvent.FULL_SCREEN_INTERACTIVE_ACCEPTED;
+@:require(flash11_3) flash.events.FullScreenEvent.interactive;
+
+@:require(flash11_3) static flash.events.MouseEvent.RELEASE_OUTSIDE;
+
+@:require(flash11_3) flash.net.NetStream.useJitterBuffer;
+
+@:require(flash11_3) flash.system.ApplicationDomain.getQualifiedDefinitionNames;
+
+@:require(flash11_3) flash.system.SecurityDomain.domainID;
 
+@:require(flash11_3) flash.system.ApplicationInstaller;
+@:require(flash11_3) flash.system.AuthorizedFeatures;
+@:require(flash11_3) flash.system.AuthorizedFeaturesLoader;

+ 2 - 0
std/flash/display/BitmapData.hx

@@ -14,6 +14,8 @@ extern class BitmapData implements IBitmapDrawable {
 	function copyPixels(sourceBitmapData : BitmapData, sourceRect : flash.geom.Rectangle, destPoint : flash.geom.Point, ?alphaBitmapData : BitmapData, ?alphaPoint : flash.geom.Point, mergeAlpha : Bool = false) : Void;
 	function dispose() : Void;
 	function draw(source : IBitmapDrawable, ?matrix : flash.geom.Matrix, ?colorTransform : flash.geom.ColorTransform, ?blendMode : BlendMode, ?clipRect : flash.geom.Rectangle, smoothing : Bool = false) : Void;
+	@:require(flash11_3) function drawWithQuality(source : IBitmapDrawable, ?matrix : flash.geom.Matrix, ?colorTransform : flash.geom.ColorTransform, ?blendMode : BlendMode, ?clipRect : flash.geom.Rectangle, smoothing : Bool = false, ?quality : StageQuality) : Void;
+	@:require(flash11_3) function encode(rect : flash.geom.Rectangle, compressor : Dynamic, ?byteArray : flash.utils.ByteArray) : flash.utils.ByteArray;
 	function fillRect(rect : flash.geom.Rectangle, color : UInt) : Void;
 	function floodFill(x : Int, y : Int, color : UInt) : Void;
 	function generateFilterRect(sourceRect : flash.geom.Rectangle, filter : flash.filters.BitmapFilter) : flash.geom.Rectangle;

+ 8 - 0
std/flash/display/BitmapEncodingColorSpace.hx

@@ -0,0 +1,8 @@
+package flash.display;
+
+@:fakeEnum(String) extern enum BitmapEncodingColorSpace {
+	COLORSPACE_4_2_0;
+	COLORSPACE_4_2_2;
+	COLORSPACE_4_4_4;
+	COLORSPACE_AUTO;
+}

+ 1 - 1
std/flash/display/FrameLabel.hx

@@ -1,6 +1,6 @@
 package flash.display;
 
-@:final extern class FrameLabel {
+@:final extern class FrameLabel extends flash.events.EventDispatcher {
 	var frame(default,null) : Int;
 	var name(default,null) : String;
 	function new(name : String, frame : Int) : Void;

+ 6 - 0
std/flash/display/JPEGEncoderOptions.hx

@@ -0,0 +1,6 @@
+package flash.display;
+
+@:final extern class JPEGEncoderOptions {
+	var quality : UInt;
+	function new(quality : UInt = 80) : Void;
+}

+ 8 - 0
std/flash/display/JPEGXREncoderOptions.hx

@@ -0,0 +1,8 @@
+package flash.display;
+
+@:final extern class JPEGXREncoderOptions {
+	var colorSpace : String;
+	var quantization : UInt;
+	var trimFlexBits : UInt;
+	function new(quantization : UInt = 20, ?colorSpace : String, trimFlexBits : UInt = 0) : Void;
+}

+ 5 - 0
std/flash/display/PNGEncoderOptions.hx

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

+ 1 - 0
std/flash/display/Stage.hx

@@ -3,6 +3,7 @@ package flash.display;
 extern class Stage extends DisplayObjectContainer {
 	var align : StageAlign;
 	@:require(flash11) var allowsFullScreen(default,null) : Bool;
+	@:require(flash11_3) var allowsFullScreenInteractive(default,null) : Bool;
 	@:require(flash10_2) var color : UInt;
 	@:require(flash10) var colorCorrection : ColorCorrection;
 	@:require(flash10) var colorCorrectionSupport(default,null) : ColorCorrectionSupport;

+ 1 - 1
std/flash/display/Stage3D.hx

@@ -5,5 +5,5 @@ package flash.display;
 	var visible : Bool;
 	var x : Float;
 	var y : Float;
-	function requestContext3D(?context3DRenderMode : String) : Void;
+	function requestContext3D(?context3DRenderMode : String, ?profile : String) : Void;
 }

+ 4 - 0
std/flash/display/StageQuality.hx

@@ -3,6 +3,10 @@ package flash.display;
 @:fakeEnum(String) extern enum StageQuality {
 	BEST;
 	HIGH;
+	HIGH_16X16;
+	HIGH_16X16_LINEAR;
+	HIGH_8X8;
+	HIGH_8X8_LINEAR;
 	LOW;
 	MEDIUM;
 }

+ 4 - 3
std/flash/display3D/Context3D.hx

@@ -5,10 +5,11 @@ package flash.display3D;
 	var enableErrorChecking : Bool;
 	function clear(red : Float = 0, green : Float = 0, blue : Float = 0, alpha : Float = 1, depth : Float = 1, stencil : UInt = 0, mask : UInt = 0xFFFFFFFF) : Void;
 	function configureBackBuffer(width : Int, height : Int, antiAlias : Int, enableDepthAndStencil : Bool = true) : Void;
-	function createCubeTexture(size : Int, format : Context3DTextureFormat, optimizeForRenderToTexture : Bool) : flash.display3D.textures.CubeTexture;
+	function createCubeTexture(size : Int, format : Context3DTextureFormat, optimizeForRenderToTexture : Bool, streamingLevels : Int = 0) : flash.display3D.textures.CubeTexture;
 	function createIndexBuffer(numIndices : Int) : IndexBuffer3D;
 	function createProgram() : Program3D;
-	function createTexture(width : Int, height : Int, format : Context3DTextureFormat, optimizeForRenderToTexture : Bool) : flash.display3D.textures.Texture;
+	@:require(flash11_3) function createRectangleTexture(width : Int, height : Int, format : Context3DTextureFormat, optimizeForRenderToTexture : Bool) : flash.display3D.textures.RectangleTexture;
+	function createTexture(width : Int, height : Int, format : Context3DTextureFormat, optimizeForRenderToTexture : Bool, streamingLevels : Int = 0) : flash.display3D.textures.Texture;
 	function createVertexBuffer(numVertices : Int, data32PerVertex : Int) : VertexBuffer3D;
 	function dispose() : Void;
 	function drawToBitmapData(destination : flash.display.BitmapData) : Void;
@@ -23,7 +24,7 @@ package flash.display3D;
 	function setProgramConstantsFromMatrix(programType : Context3DProgramType, firstRegister : Int, matrix : flash.geom.Matrix3D, transposedMatrix : Bool = false) : Void;
 	function setProgramConstantsFromVector(programType : Context3DProgramType, firstRegister : Int, data : flash.Vector<Float>, numRegisters : Int = -1) : Void;
 	function setRenderToBackBuffer() : Void;
-	function setRenderToTexture(texture : flash.display3D.textures.TextureBase, enableDepthAndStencil : Bool = false, antiAlias : Int = 0, surfaceSelector : Int = 0) : Void;
+	function setRenderToTexture(texture : flash.display3D.textures.TextureBase, enableDepthAndStencil : Bool = false, antiAlias : Int = 0, surfaceSelector : Int = 0, colorOutputIndex : Int = 0) : Void;
 	function setScissorRectangle(rectangle : flash.geom.Rectangle) : Void;
 	function setStencilActions(?triangleFace : Context3DTriangleFace, ?compareMode : Context3DCompareMode, ?actionOnBothPass : Context3DStencilAction, ?actionOnDepthFail : Context3DStencilAction, ?actionOnDepthPassStencilFail : Context3DStencilAction) : Void;
 	function setStencilReferenceValue(referenceValue : UInt, readMask : UInt = 255, writeMask : UInt = 255) : Void;

+ 7 - 0
std/flash/display3D/textures/RectangleTexture.hx

@@ -0,0 +1,7 @@
+package flash.display3D.textures;
+
+@:final extern class RectangleTexture extends TextureBase {
+	function new() : Void;
+	function uploadFromBitmapData(source : flash.display.BitmapData) : Void;
+	function uploadFromByteArray(data : flash.utils.ByteArray, byteArrayOffset : UInt) : Void;
+}

+ 2 - 0
std/flash/events/Event.hx

@@ -31,6 +31,7 @@ extern class Event {
 	static var ENTER_FRAME : String;
 	@:require(flash10) static var EXIT_FRAME : String;
 	@:require(flash10) static var FRAME_CONSTRUCTED : String;
+	@:require(flash11_3) static var FRAME_LABEL : String;
 	static var FULLSCREEN : String;
 	static var ID3 : String;
 	static var INIT : String;
@@ -45,6 +46,7 @@ extern class Event {
 	static var SELECT : String;
 	@:require(flash10) static var SELECT_ALL : String;
 	static var SOUND_COMPLETE : String;
+	@:require(flash11_3) static var SUSPEND : String;
 	static var TAB_CHILDREN_CHANGE : String;
 	static var TAB_ENABLED_CHANGE : String;
 	static var TAB_INDEX_CHANGE : String;

+ 3 - 1
std/flash/events/FullScreenEvent.hx

@@ -2,6 +2,8 @@ package flash.events;
 
 extern class FullScreenEvent extends ActivityEvent {
 	var fullScreen(default,null) : Bool;
-	function new(type : String, bubbles : Bool = false, cancelable : Bool = false, fullScreen : Bool = false) : Void;
+	@:require(flash11_3) var interactive(default,null) : Bool;
+	function new(type : String, bubbles : Bool = false, cancelable : Bool = false, fullScreen : Bool = false, interactive : Bool = false) : Void;
 	static var FULL_SCREEN : String;
+	@:require(flash11_3) static var FULL_SCREEN_INTERACTIVE_ACCEPTED : String;
 }

+ 1 - 0
std/flash/events/MouseEvent.hx

@@ -28,6 +28,7 @@ extern class MouseEvent extends Event {
 	static var MOUSE_OVER : String;
 	static var MOUSE_UP : String;
 	static var MOUSE_WHEEL : String;
+	@:require(flash11_3) static var RELEASE_OUTSIDE : String;
 	@:require(flash11_2) static var RIGHT_CLICK : String;
 	@:require(flash11_2) static var RIGHT_MOUSE_DOWN : String;
 	@:require(flash11_2) static var RIGHT_MOUSE_UP : String;

+ 1 - 0
std/flash/net/NetStream.hx

@@ -35,6 +35,7 @@ extern class NetStream extends flash.events.EventDispatcher {
 	var soundTransform : flash.media.SoundTransform;
 	var time(default,null) : Float;
 	@:require(flash11) var useHardwareDecoder : Bool;
+	@:require(flash11_3) var useJitterBuffer : Bool;
 	var videoCodec(default,null) : UInt;
 	@:require(flash10_1) var videoReliable : Bool;
 	@:require(flash10_1) var videoSampleAccess : Bool;

+ 1 - 0
std/flash/system/ApplicationDomain.hx

@@ -5,6 +5,7 @@ package flash.system;
 	var parentDomain(default,null) : ApplicationDomain;
 	function new(?parentDomain : ApplicationDomain) : Void;
 	function getDefinition(name : String) : Dynamic;
+	@:require(flash11_3) function getQualifiedDefinitionNames() : flash.Vector<String>;
 	function hasDefinition(name : String) : Bool;
 	@:require(flash10) static var MIN_DOMAIN_MEMORY_LENGTH(default,null) : UInt;
 	static var currentDomain(default,null) : ApplicationDomain;

+ 9 - 0
std/flash/system/ApplicationInstaller.hx

@@ -0,0 +1,9 @@
+package flash.system;
+
+@:require(flash11_3) @:final extern class ApplicationInstaller {
+	var isInstalled(default,null) : Bool;
+	function new() : Void;
+	function install(shortcutsOnly : Bool = false) : Void;
+	static function iconDigest(icon : flash.utils.ByteArray) : String;
+	static function stringsDigest(strings : flash.xml.XML) : String;
+}

+ 6 - 0
std/flash/system/AuthorizedFeatures.hx

@@ -0,0 +1,6 @@
+package flash.system;
+
+@:require(flash11_3) @:final extern class AuthorizedFeatures {
+	function new() : Void;
+	function createApplicationInstaller(strings : flash.xml.XML, icon : flash.utils.ByteArray) : ApplicationInstaller;
+}

+ 7 - 0
std/flash/system/AuthorizedFeaturesLoader.hx

@@ -0,0 +1,7 @@
+package flash.system;
+
+@:require(flash11_3) @:final extern class AuthorizedFeaturesLoader extends flash.events.EventDispatcher {
+	var authorizedFeatures(default,null) : AuthorizedFeatures;
+	function new() : Void;
+	function loadAuthorizedFeatures() : Void;
+}

+ 1 - 0
std/flash/system/SecurityDomain.hx

@@ -1,5 +1,6 @@
 package flash.system;
 
 extern class SecurityDomain {
+	@:require(flash11_3) var domainID(default,null) : String;
 	static var currentDomain(default,null) : SecurityDomain;
 }