You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by jo...@apache.org on 2021/03/16 21:07:29 UTC

[royale-compiler] 10/12: playerglobalc: Function missing APIs

This is an automated email from the ASF dual-hosted git repository.

joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git

commit e0e24b43f323ceacc5c451102816c6e5c8324566
Author: Josh Tynjala <jo...@apache.org>
AuthorDate: Tue Mar 16 13:20:27 2021 -0700

    playerglobalc: Function missing APIs
---
 .../main/java/org/apache/royale/compiler/clients/PLAYERGLOBALC.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/compiler-playerglobalc/src/main/java/org/apache/royale/compiler/clients/PLAYERGLOBALC.java b/compiler-playerglobalc/src/main/java/org/apache/royale/compiler/clients/PLAYERGLOBALC.java
index 2a692c1..925a4cc 100644
--- a/compiler-playerglobalc/src/main/java/org/apache/royale/compiler/clients/PLAYERGLOBALC.java
+++ b/compiler-playerglobalc/src/main/java/org/apache/royale/compiler/clients/PLAYERGLOBALC.java
@@ -112,12 +112,16 @@ class PLAYERGLOBALC implements FlexTool {
 	}
 	private static final Map<String, List<String>> EXTRA_MEMBERS = new HashMap<String, List<String>>();
 	{
-		EXTRA_MEMBERS.put("Function", Arrays.asList("public var prototype:Object"));
+		EXTRA_MEMBERS.put("Function", Arrays.asList("public native function get prototype():*",
+				"public native function set prototype(value:*):void", "public native function get length():int;"));
+		EXTRA_MEMBERS.put("String", Arrays.asList("AS3 native function toString():String"));
 		EXTRA_MEMBERS.put("flash.display.DisplayObjectContainer", Arrays
 				.asList("public native function removeChildren(beginIndex:int = 0, endIndex:int = 0x7fffffff):void"));
 		EXTRA_MEMBERS.put("flash.display.Graphics", Arrays.asList(
 				"public native function cubicCurveTo(controlX1:Number, controlY1:Number, controlX2:Number, controlY2:Number, anchorX:Number, anchorY:Number):void",
 				"public native function drawRoundRectComplex(x:Number, y:Number, width:Number, height:Number, topLeftRadius:Number, topRightRadius:Number, bottomLeftRadius:Number, bottomRightRadius:Number):void"));
+		EXTRA_MEMBERS.put("flash.display.MovieClip",
+				Arrays.asList("public native function addFrameScript(...args):void"));
 		EXTRA_MEMBERS.put("flash.events.EventDispatcher", Arrays.asList("public native function toString():String"));
 		EXTRA_MEMBERS.put("flash.media.Camera",
 				Arrays.asList("public native function copyToByteArray(rect:Rectangle, destination:ByteArray):void"));