diff --git a/core/src/avm2/globals/ArgumentError.as b/core/src/avm2/globals/ArgumentError.as index 07f22e1e20ab..4e1f53ddb6c9 100644 --- a/core/src/avm2/globals/ArgumentError.as +++ b/core/src/avm2/globals/ArgumentError.as @@ -1,10 +1,10 @@ package { public dynamic class ArgumentError extends Error { - ArgumentError.prototype.name = "ArgumentError" + ArgumentError.prototype.name = "ArgumentError"; public function ArgumentError(message:String = "", code:* = 0) { - super(message, code) - this.name = prototype.name + super(message, code); + this.name = prototype.name; } public static const length:int = 1; diff --git a/core/src/avm2/globals/Array.as b/core/src/avm2/globals/Array.as index 627d8b28a409..882662bac979 100644 --- a/core/src/avm2/globals/Array.as +++ b/core/src/avm2/globals/Array.as @@ -16,7 +16,7 @@ package { // Array-like object (for example, `Array.prototype.sort.call(myVector)` works), // but currently we only support calling them on real Arrays { - prototype.concat = function(... rest):Array { + prototype.concat = function(...rest):Array { var a:Array = this; return a.AS3::concat.apply(a, rest); }; @@ -61,7 +61,7 @@ package { return a.AS3::pop(); }; - prototype.push = function(... args):uint { + prototype.push = function(...args):uint { var a:Array = this; return a.AS3::push.apply(a, args); }; @@ -86,17 +86,17 @@ package { return a.AS3::some(callback, receiver); }; - prototype.sort = function(... rest):* { + prototype.sort = function(...rest):* { var a:Array = this; return a.AS3::sort.apply(a, rest); }; - prototype.sortOn = function(fieldNames:*, options:* = 0, ... rest):* { + prototype.sortOn = function(fieldNames:*, options:* = 0, ...rest):* { var a:Array = this; return a.AS3::sortOn(fieldNames, options); }; - prototype.splice = function(... rest):* { + prototype.splice = function(...rest):* { var a:Array = this; return a.AS3::splice.apply(a, rest); }; @@ -106,7 +106,7 @@ package { var result:String = ""; var arrayLength:uint = a.length; - for(var i:uint = 0; i < arrayLength; i ++) { + for (var i:uint = 0; i < arrayLength; i++) { if (a[i] === void 0 || a[i] === null) { result += a[i]; } else { @@ -126,7 +126,7 @@ package { return a.AS3::join(","); }; - prototype.unshift = function(... rest):uint { + prototype.unshift = function(...rest):uint { var a:Array = this; return a.AS3::unshift.apply(a, rest); }; @@ -154,10 +154,10 @@ package { } // Constructor (defined in Rust) - public native function Array(... rest); + public native function Array(...rest); // Instance methods - AS3 native function concat(... rest):Array; + AS3 native function concat(...rest):Array; AS3 native function every(callback:Function, receiver:* = null):Boolean; @@ -182,7 +182,7 @@ package { AS3 native function pop():*; - AS3 native function push(... rest):uint; + AS3 native function push(...rest):uint; [API("708")] AS3 native function removeAt(index:int):*; @@ -195,13 +195,13 @@ package { AS3 native function some(callback:Function, receiver:* = null):Boolean; - AS3 native function sort(... rest):*; + AS3 native function sort(...rest):*; - AS3 native function sortOn(fieldNames:*, options:* = 0, ... rest):*; + AS3 native function sortOn(fieldNames:*, options:* = 0, ...rest):*; - AS3 native function splice(... rest):*; + AS3 native function splice(...rest):*; - AS3 native function unshift(... rest):uint; + AS3 native function unshift(...rest):uint; public static const length:int = 1; } diff --git a/core/src/avm2/globals/Date.as b/core/src/avm2/globals/Date.as index 08d83e523d73..356c564c1af9 100644 --- a/core/src/avm2/globals/Date.as +++ b/core/src/avm2/globals/Date.as @@ -7,171 +7,211 @@ package { prototype.valueOf = function():* { var d:Date = this; return d.AS3::valueOf(); - } + }; prototype.toString = function():String { var d:Date = this; return d.AS3::toString(); - } + }; + prototype.toDateString = function():String { var d:Date = this; return d.AS3::toDateString(); - } + }; + prototype.toTimeString = function():String { var d:Date = this; return d.AS3::toTimeString(); - } + }; + prototype.toLocaleString = function():String { var d:Date = this; return d.AS3::toLocaleString(); - } + }; + prototype.toLocaleDateString = function():String { var d:Date = this; return d.AS3::toLocaleDateString(); - } + }; + prototype.toLocaleTimeString = function():String { var d:Date = this; return d.AS3::toLocaleTimeString(); - } + }; + prototype.toUTCString = function():String { var d:Date = this; return d.AS3::toUTCString(); - } + }; + prototype.toJSON = function(k:String):* { var d:Date = this; return d.AS3::toString(); - } + }; + prototype.getUTCFullYear = function():Number { var d:Date = this; return d.AS3::getUTCFullYear(); - } + }; + prototype.getUTCMonth = function():Number { var d:Date = this; return d.AS3::getUTCMonth(); - } + }; + prototype.getUTCDate = function():Number { var d:Date = this; return d.AS3::getUTCDate(); - } + }; + prototype.getUTCDay = function():Number { var d:Date = this; return d.AS3::getUTCDay(); - } + }; + prototype.getUTCHours = function():Number { var d:Date = this; return d.AS3::getUTCHours(); - } + }; + prototype.getUTCMinutes = function():Number { var d:Date = this; return d.AS3::getUTCMinutes(); - } + }; + prototype.getUTCSeconds = function():Number { var d:Date = this; return d.AS3::getUTCSeconds(); - } + }; + prototype.getUTCMilliseconds = function():Number { var d:Date = this; return d.AS3::getUTCMilliseconds(); - } + }; + prototype.getFullYear = function():Number { var d:Date = this; return d.AS3::getFullYear(); - } + }; + prototype.getMonth = function():Number { var d:Date = this; return d.AS3::getMonth(); - } + }; + prototype.getDate = function():Number { var d:Date = this; return d.AS3::getDate(); - } + }; + prototype.getDay = function():Number { var d:Date = this; return d.AS3::getDay(); - } + }; + prototype.getHours = function():Number { var d:Date = this; return d.AS3::getHours(); - } + }; + prototype.getMinutes = function():Number { var d:Date = this; return d.AS3::getMinutes(); - } + }; + prototype.getSeconds = function():Number { var d:Date = this; return d.AS3::getSeconds(); - } + }; + prototype.getMilliseconds = function():Number { var d:Date = this; return d.AS3::getMilliseconds(); - } + }; + prototype.getTimezoneOffset = function():Number { var d:Date = this; return d.AS3::getTimezoneOffset(); - } + }; + prototype.getTime = function():Number { var d:Date = this; return d.AS3::getTime(); - } + }; + prototype.setTime = function(t:* = undefined):Number { var d:Date = this; return d.AS3::setTime(t); - } + }; + prototype.setFullYear = function(year:* = undefined, month:* = undefined, day:* = undefined):Number { var d:Date = this; return d._setFullYear(arguments); - } + }; + prototype.setMonth = function(month:* = undefined, day:* = undefined):Number { var d:Date = this; return d._setMonth(arguments); - } + }; + prototype.setDate = function(day:* = undefined):Number { var d:Date = this; return d._setDate(day); - } + }; + prototype.setHours = function(hour:* = undefined, min:* = undefined, sec:* = undefined, ms:* = undefined):Number { var d:Date = this; return d._setHours(arguments); - } + }; + prototype.setMinutes = function(min:* = undefined, sec:* = undefined, ms:* = undefined):Number { var d:Date = this; return d._setMinutes(arguments); - } + }; + prototype.setSeconds = function(sec:* = undefined, ms:* = undefined):Number { var d:Date = this; return d._setSeconds(arguments); - } + }; + prototype.setMilliseconds = function(ms:* = undefined):Number { var d:Date = this; return d._setMilliseconds(arguments); - } + }; + prototype.setUTCFullYear = function(year:* = undefined, month:* = undefined, day:* = undefined):Number { var d:Date = this; return d._setUTCFullYear(arguments); - } + }; + prototype.setUTCMonth = function(month:* = undefined, day:* = undefined):Number { var d:Date = this; return d._setUTCMonth(arguments); - } + }; + prototype.setUTCDate = function(day:* = undefined):Number { var d:Date = this; return d._setUTCDate(arguments); - } + }; + prototype.setUTCHours = function(hour:* = undefined, min:* = undefined, sec:* = undefined, ms:* = undefined):Number { var d:Date = this; return d._setUTCHours(arguments); - } + }; + prototype.setUTCMinutes = function(min:* = undefined, sec:* = undefined, ms:* = undefined):Number { var d:Date = this; return d._setUTCMinutes(arguments); - } + }; + prototype.setUTCSeconds = function(sec:* = undefined, ms:* = undefined):Number { var d:Date = this; return d._setUTCSeconds(arguments); - } + }; + prototype.setUTCMilliseconds = function(ms:* = undefined):Number { var d:Date = this; return d._setUTCMilliseconds(arguments); - } + }; prototype.setPropertyIsEnumerable("valueOf", false); prototype.setPropertyIsEnumerable("toString", false); @@ -216,7 +256,6 @@ package { prototype.setPropertyIsEnumerable("setUTCSeconds", false); prototype.setPropertyIsEnumerable("setUTCMilliseconds", false); - public function Date(year:* = undefined, month:* = undefined, day:* = undefined, hours:* = undefined, minutes:* = undefined, seconds:* = undefined, ms:* = undefined) { this.init(arguments); } @@ -224,7 +263,7 @@ package { public static native function parse(date:*):Number; - public static native function UTC(year:*, month:*, date:* = 1, hour:* = 0, minute:* = 0, second:* = 0, millisecond:* = 0, ... rest):Number; + public static native function UTC(year:*, month:*, date:* = 1, hour:* = 0, minute:* = 0, second:* = 0, millisecond:* = 0, ...rest):Number; AS3 function valueOf():Number { return this.AS3::getTime(); @@ -339,7 +378,6 @@ package { return _setUTCMilliseconds(arguments); } - public function get fullYear():Number { return this.AS3::getFullYear(); } diff --git a/core/src/avm2/globals/DefinitionError.as b/core/src/avm2/globals/DefinitionError.as index 8e531d77cccd..80f855a7cc08 100644 --- a/core/src/avm2/globals/DefinitionError.as +++ b/core/src/avm2/globals/DefinitionError.as @@ -3,14 +3,11 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package -{ - public dynamic class DefinitionError extends Error - { +package { + public dynamic class DefinitionError extends Error { prototype.name = "DefinitionError"; - public function DefinitionError(message:String = "", id:int = 0) - { + public function DefinitionError(message:String = "", id:int = 0) { super(message, id); this.name = prototype.name; } @@ -18,4 +15,3 @@ package public static const length:int = 1; } } - diff --git a/core/src/avm2/globals/EvalError.as b/core/src/avm2/globals/EvalError.as index 28388a4b8756..932686ea701f 100644 --- a/core/src/avm2/globals/EvalError.as +++ b/core/src/avm2/globals/EvalError.as @@ -3,15 +3,12 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package -{ +package { - public dynamic class EvalError extends Error - { + public dynamic class EvalError extends Error { prototype.name = "EvalError"; - public function EvalError(message:String = "", id:int = 0) - { + public function EvalError(message:String = "", id:int = 0) { super(message, id); this.name = prototype.name; } diff --git a/core/src/avm2/globals/Function.as b/core/src/avm2/globals/Function.as index dcc25ed1fc02..77ce8d870e58 100644 --- a/core/src/avm2/globals/Function.as +++ b/core/src/avm2/globals/Function.as @@ -4,6 +4,27 @@ package { public final dynamic class Function { private static native function _initFunctionClass():void; + public function Function() { + // The Function constructor is implemented natively: + // this AS-defined method does nothing + } + + public native function get length():int; + + public native function get prototype():*; + public native function set prototype(proto:*):*; + + AS3 native function apply(receiver:* = void 0, args:* = void 0):*; + AS3 native function call(receiver:* = void 0, ...rest):*; + + [Ruffle(NativeCallable)] + private static function createDummyFunction():Function { + return function() { + }; + } + + public static const length:int = 1; + { _initFunctionClass(); @@ -33,25 +54,5 @@ package { prototype.setPropertyIsEnumerable("toString", false); prototype.setPropertyIsEnumerable("toLocaleString", false); } - - public function Function() { - // The Function constructor is implemented natively: - // this AS-defined method does nothing - } - - public native function get length() : int; - - public native function get prototype():*; - public native function set prototype(proto:*):*; - - AS3 native function apply(receiver:* = void 0, args:* = void 0):*; - AS3 native function call(receiver:* = void 0, ...rest):*; - - [Ruffle(NativeCallable)] - private static function createDummyFunction():Function { - return function() { }; - } - - public static const length:int = 1; } } diff --git a/core/src/avm2/globals/JSON.as b/core/src/avm2/globals/JSON.as index 327353365b1b..43085817d436 100644 --- a/core/src/avm2/globals/JSON.as +++ b/core/src/avm2/globals/JSON.as @@ -1,7 +1,7 @@ package { [API("674")] public final class JSON { - public static native function parse(text:String, reviver:Function = null): Object; - public static native function stringify(value:Object, replacer:* = null, space:* = null): String; + public static native function parse(text:String, reviver:Function = null):Object; + public static native function stringify(value:Object, replacer:* = null, space:* = null):String; } } diff --git a/core/src/avm2/globals/Math.as b/core/src/avm2/globals/Math.as index 0c065e6bc258..c997203b8b34 100644 --- a/core/src/avm2/globals/Math.as +++ b/core/src/avm2/globals/Math.as @@ -1,37 +1,37 @@ package { -[Ruffle(InstanceAllocator)] -[Ruffle(CallHandler)] + [Ruffle(InstanceAllocator)] + [Ruffle(CallHandler)] public final class Math { - public static const E: Number = 2.718281828459045; - public static const LN10: Number = 2.302585092994046; - public static const LN2: Number = 0.6931471805599453; - public static const LOG10E: Number = 0.4342944819032518; - public static const LOG2E: Number = 1.442695040888963387; - public static const PI: Number = 3.141592653589793; - public static const SQRT1_2: Number = 0.7071067811865476; - public static const SQRT2: Number = 1.4142135623730951; + public static const E:Number = 2.718281828459045; + public static const LN10:Number = 2.302585092994046; + public static const LN2:Number = 0.6931471805599453; + public static const LOG10E:Number = 0.4342944819032518; + public static const LOG2E:Number = 1.442695040888963387; + public static const PI:Number = 3.141592653589793; + public static const SQRT1_2:Number = 0.7071067811865476; + public static const SQRT2:Number = 1.4142135623730951; - public static native function abs(x: Number): Number; - public static native function acos(x: Number): Number; - public static native function asin(x: Number): Number; - public static native function atan(x: Number): Number; - public static native function ceil(x: Number): Number; - public static native function cos(x: Number): Number; - public static native function exp(x: Number): Number; - public static native function floor(x: Number): Number; - public static native function log(x: Number): Number; - public static native function round(x: Number): Number; - public static native function sin(x: Number): Number; - public static native function sqrt(x: Number): Number; - public static native function tan(x: Number): Number; - public static native function atan2(y: Number, x: Number): Number; - public static native function pow(x: Number, y: Number): Number; + public static native function abs(x:Number):Number; + public static native function acos(x:Number):Number; + public static native function asin(x:Number):Number; + public static native function atan(x:Number):Number; + public static native function ceil(x:Number):Number; + public static native function cos(x:Number):Number; + public static native function exp(x:Number):Number; + public static native function floor(x:Number):Number; + public static native function log(x:Number):Number; + public static native function round(x:Number):Number; + public static native function sin(x:Number):Number; + public static native function sqrt(x:Number):Number; + public static native function tan(x:Number):Number; + public static native function atan2(y:Number, x:Number):Number; + public static native function pow(x:Number, y:Number):Number; // This is a hacky way to specify `-Infinity` as a default value. - private static const NegInfinity: Number = -1 / 0; - public static native function max(x: Number = NegInfinity, y: Number = NegInfinity, ...rest): Number; - public static native function min(x: Number = Infinity, y: Number = Infinity, ...rest): Number; + private static const NegInfinity:Number = -1 / 0; + public static native function max(x:Number = NegInfinity, y:Number = NegInfinity, ...rest):Number; + public static native function min(x:Number = Infinity, y:Number = Infinity, ...rest):Number; - public static native function random(): Number; + public static native function random():Number; } } diff --git a/core/src/avm2/globals/Namespace.as b/core/src/avm2/globals/Namespace.as index 4a1b151ca0c0..d9f8d77b3eda 100644 --- a/core/src/avm2/globals/Namespace.as +++ b/core/src/avm2/globals/Namespace.as @@ -5,11 +5,11 @@ package { prototype.toString = function():String { var n:Namespace = this; return n.uri; - } + }; prototype.valueOf = function():String { var n:Namespace = this; return n.uri; - } + }; prototype.setPropertyIsEnumerable("toString", false); prototype.setPropertyIsEnumerable("valueOf", false); diff --git a/core/src/avm2/globals/Number.as b/core/src/avm2/globals/Number.as index ee7dbfa4a3f6..fdd62805b4af 100644 --- a/core/src/avm2/globals/Number.as +++ b/core/src/avm2/globals/Number.as @@ -110,4 +110,3 @@ package { public static const length:int = 1; } } - diff --git a/core/src/avm2/globals/Object.as b/core/src/avm2/globals/Object.as index ceb3747135bf..4af88681f948 100644 --- a/core/src/avm2/globals/Object.as +++ b/core/src/avm2/globals/Object.as @@ -12,7 +12,8 @@ package { // We reuse the undocumented `init` method for lazily initializing Object's // prototype (since we can only do so once the Function class is initialized) internal static function init():* { - if (_isPrototypeInitialized) return; + if (_isPrototypeInitialized) + return; _isPrototypeInitialized = true; prototype.isPrototypeOf = function(obj:* = void 0):Boolean { @@ -62,4 +63,3 @@ package { public static const length:int = 1; } } - diff --git a/core/src/avm2/globals/QName.as b/core/src/avm2/globals/QName.as index 7a4eb3a8bbe4..7cd56df6374e 100644 --- a/core/src/avm2/globals/QName.as +++ b/core/src/avm2/globals/QName.as @@ -20,7 +20,7 @@ package { prototype.toString = function():String { var self:QName = this; return self.AS3::toString(); - } + }; prototype.setPropertyIsEnumerable("toString", false); } diff --git a/core/src/avm2/globals/RangeError.as b/core/src/avm2/globals/RangeError.as index 1111d584144a..f6345d14ec23 100644 --- a/core/src/avm2/globals/RangeError.as +++ b/core/src/avm2/globals/RangeError.as @@ -1,6 +1,6 @@ package { public dynamic class RangeError extends Error { - RangeError.prototype.name = "RangeError" + RangeError.prototype.name = "RangeError"; public function RangeError(message:String = "", code:* = 0) { super(message, code); diff --git a/core/src/avm2/globals/ReferenceError.as b/core/src/avm2/globals/ReferenceError.as index a629adcd2718..cb140c195f01 100644 --- a/core/src/avm2/globals/ReferenceError.as +++ b/core/src/avm2/globals/ReferenceError.as @@ -1,7 +1,7 @@ package { public dynamic class ReferenceError extends Error { ReferenceError.prototype.name = "ReferenceError"; - + public function ReferenceError(message:String = "", code:* = 0) { super(message, code); this.name = prototype.name; diff --git a/core/src/avm2/globals/RegExp.as b/core/src/avm2/globals/RegExp.as index 8a5838cdd95f..860247dff433 100644 --- a/core/src/avm2/globals/RegExp.as +++ b/core/src/avm2/globals/RegExp.as @@ -3,7 +3,7 @@ package { [Ruffle(CallHandler)] public dynamic class RegExp { public function RegExp(re:* = undefined, flags:* = undefined) { - this.init(re, flags) + this.init(re, flags); } private native function init(re:*, flags:*):void; @@ -22,22 +22,24 @@ package { prototype.exec = function(str:String = ""):Object { return this.AS3::exec(str); - } + }; prototype.test = function(str:String = ""):Boolean { return this.AS3::test(str); - } + }; prototype.toString = function():String { // Note: This function is not generic and will throw for non-regexps. - var regexp: RegExp = this; + var regexp:RegExp = this; - // ECMA-262 Edition 5.1 - RegExp.prototype.toString(): - // Return the String value formed by concatenating the Strings "/", - // the String value of the source property of this RegExp object, and "/"; - // plus "g" if the global property is true, - // "i" if the ignoreCase property is true, - // and "m" if the multiline property is true. + /* + * ECMA-262 Edition 5.1 - RegExp.prototype.toString(): + * Return the String value formed by concatenating the Strings "/", + * the String value of the source property of this RegExp object, and "/"; + * plus "g" if the global property is true, + * "i" if the ignoreCase property is true, + * and "m" if the multiline property is true. + */ var string = "/" + regexp.source + "/"; if (regexp.global) { string += "g"; @@ -55,7 +57,7 @@ package { string += "x"; } return string; - } + }; prototype.setPropertyIsEnumerable("exec", false); prototype.setPropertyIsEnumerable("test", false); diff --git a/core/src/avm2/globals/SecurityError.as b/core/src/avm2/globals/SecurityError.as index d173e7cd8e0f..1e34bfa541d5 100644 --- a/core/src/avm2/globals/SecurityError.as +++ b/core/src/avm2/globals/SecurityError.as @@ -3,15 +3,12 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package -{ +package { - public dynamic class SecurityError extends Error - { + public dynamic class SecurityError extends Error { prototype.name = "SecurityError"; - public function SecurityError(message:String = "", id:int = 0) - { + public function SecurityError(message:String = "", id:int = 0) { super(message, id); this.name = prototype.name; } @@ -19,4 +16,3 @@ package public static const length:int = 1; } } - diff --git a/core/src/avm2/globals/String.as b/core/src/avm2/globals/String.as index 46910c560011..e2d098c6cf33 100644 --- a/core/src/avm2/globals/String.as +++ b/core/src/avm2/globals/String.as @@ -2,7 +2,7 @@ package { [Ruffle(CustomConstructor)] [Ruffle(CallHandler)] public final class String { - { + { prototype.charAt = function(index:Number = 0):String { var s:String = this; return s.AS3::charAt(index); @@ -13,7 +13,7 @@ package { return s.AS3::charCodeAt(index); }; - prototype.concat = function(... args):String { + prototype.concat = function(...args):String { var s:String = this; return s.AS3::concat.apply(s, args); }; @@ -60,7 +60,7 @@ package { prototype.substr = function(start:Number = 0, len:Number = 2147483647.0):String { var s:String = this; - return s.AS3::substr(start,len); + return s.AS3::substr(start, len); }; prototype.substring = function(start:Number = 0, end:Number = 2147483647.0):String { @@ -89,11 +89,11 @@ package { }; prototype.toString = function():String { - if(this === String.prototype) { + if (this === String.prototype) { return ""; } - if(!(this is String)) { + if (!(this is String)) { throw new TypeError("Error #1004: Method String.prototype.toString was invoked on an incompatible object.", 1004); } @@ -101,11 +101,11 @@ package { }; prototype.valueOf = function():* { - if(this === String.prototype) { + if (this === String.prototype) { return ""; } - if(!(this is String)) { + if (!(this is String)) { throw new TypeError("Error #1004: Method String.prototype.valueOf was invoked on an incompatible object.", 1004); } @@ -138,9 +138,9 @@ package { // this AS-defined method does nothing } - AS3 static native function fromCharCode(... rest):String; + AS3 static native function fromCharCode(...rest):String; - public static native function fromCharCode(... rest):String; + public static native function fromCharCode(...rest):String; // Instance methods public native function get length():int; @@ -149,7 +149,7 @@ package { AS3 native function charCodeAt(index:Number = 0):Number; - AS3 native function concat(... rest):String; + AS3 native function concat(...rest):String; AS3 native function indexOf(str:String = "undefined", index:Number = 0):int; @@ -176,23 +176,23 @@ package { AS3 native function substring(start:Number = 0, end:Number = 2147483647.0):String; - AS3 function toLocaleLowerCase() : String { + AS3 function toLocaleLowerCase():String { return this.toLowerCase(); } - AS3 function toLocaleUpperCase() : String { + AS3 function toLocaleUpperCase():String { return this.toUpperCase(); } - AS3 native function toLowerCase() : String; + AS3 native function toLowerCase():String; - AS3 native function toUpperCase() : String; + AS3 native function toUpperCase():String; - AS3 function toString() : String { + AS3 function toString():String { return this; } - AS3 function valueOf() : String { + AS3 function valueOf():String { return this; } diff --git a/core/src/avm2/globals/SyntaxError.as b/core/src/avm2/globals/SyntaxError.as index 9d2f83ae0b25..7ab7af8a6723 100644 --- a/core/src/avm2/globals/SyntaxError.as +++ b/core/src/avm2/globals/SyntaxError.as @@ -3,15 +3,12 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package -{ +package { - public dynamic class SyntaxError extends Error - { + public dynamic class SyntaxError extends Error { prototype.name = "SyntaxError"; - public function SyntaxError(message:String = "", id:int = 0) - { + public function SyntaxError(message:String = "", id:int = 0) { super(message, id); this.name = prototype.name; } @@ -19,4 +16,3 @@ package public static const length:int = 1; } } - diff --git a/core/src/avm2/globals/Toplevel.as b/core/src/avm2/globals/Toplevel.as index 91bcf912d550..01e0cf647b72 100644 --- a/core/src/avm2/globals/Toplevel.as +++ b/core/src/avm2/globals/Toplevel.as @@ -1,9 +1,9 @@ package { public namespace AS3 = "http://adobe.com/AS3/2006/builtin"; - public const NaN: Number = 0 / 0; + public const NaN:Number = 0 / 0; - public const Infinity: Number = 1 / 0; + public const Infinity:Number = 1 / 0; public const undefined = void 0; @@ -24,7 +24,7 @@ package { public native function parseFloat(number:String = "NaN"):Number; public native function parseInt(string:String = "NaN", base:int = 0):Number; - public native function trace(... rest):void; + public native function trace(...rest):void; } // These classes are required by other core code, so we put them here. Toplevel.as diff --git a/core/src/avm2/globals/TypeError.as b/core/src/avm2/globals/TypeError.as index f6a4ea6a2057..140b0b48dfea 100644 --- a/core/src/avm2/globals/TypeError.as +++ b/core/src/avm2/globals/TypeError.as @@ -1,10 +1,10 @@ package { public dynamic class TypeError extends Error { - TypeError.prototype.name = "TypeError" + TypeError.prototype.name = "TypeError"; public function TypeError(message:String = "", code:* = 0) { - super(message, code) - this.name = prototype.name + super(message, code); + this.name = prototype.name; } public static const length:int = 1; diff --git a/core/src/avm2/globals/URIError.as b/core/src/avm2/globals/URIError.as index a4ae1c8d6ece..c8bd2f265857 100644 --- a/core/src/avm2/globals/URIError.as +++ b/core/src/avm2/globals/URIError.as @@ -3,15 +3,12 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package -{ +package { - public dynamic class URIError extends Error - { + public dynamic class URIError extends Error { prototype.name = "URIError"; - public function URIError(message:String = "", id:int = 0) - { + public function URIError(message:String = "", id:int = 0) { super(message, id); this.name = prototype.name; } @@ -19,4 +16,3 @@ package public static const length:int = 1; } } - diff --git a/core/src/avm2/globals/UninitializedError.as b/core/src/avm2/globals/UninitializedError.as index 675f6a2d53d6..e7c40d6d2ac1 100644 --- a/core/src/avm2/globals/UninitializedError.as +++ b/core/src/avm2/globals/UninitializedError.as @@ -1,7 +1,7 @@ package { public dynamic class UninitializedError extends Error { UninitializedError.prototype.name = "UninitializedError"; - + public function UninitializedError(message:String = "", code:* = 0) { super(message, code); this.name = prototype.name; diff --git a/core/src/avm2/globals/VectorDouble.as b/core/src/avm2/globals/VectorDouble.as index d998627cc243..1e292a9b34bb 100644 --- a/core/src/avm2/globals/VectorDouble.as +++ b/core/src/avm2/globals/VectorDouble.as @@ -2,8 +2,8 @@ package __AS3__.vec { [Ruffle(CallHandler)] [Ruffle(InstanceAllocator)] internal final dynamic class Vector$double { - { - prototype.concat = function(... rest):* { + { + prototype.concat = function(...rest):* { var v:Vector$double = this; return v.AS3::concat.apply(v, rest); }; @@ -56,7 +56,7 @@ package __AS3__.vec { return v.AS3::pop(); }; - prototype.push = function(... rest):* { + prototype.push = function(...rest):* { var v:Vector$double = this; return v.AS3::push.apply(v, rest); }; @@ -93,7 +93,7 @@ package __AS3__.vec { return v.AS3::sort(func); }; - prototype.splice = function(start:*, deleteCount:*, ... items):* { + prototype.splice = function(start:*, deleteCount:*, ...items):* { var argsList:Array = [start, deleteCount]; argsList = argsList.AS3::concat(items); @@ -111,7 +111,7 @@ package __AS3__.vec { return v.AS3::join(","); }; - prototype.unshift = function(... rest):* { + prototype.unshift = function(...rest):* { var v:Vector$double = this; return v.AS3::unshift.apply(v, rest); }; @@ -149,7 +149,7 @@ package __AS3__.vec { public native function set length(length:uint):*; - AS3 native function concat(... rest):Vector$double; + AS3 native function concat(...rest):Vector$double; AS3 native function every(callback:Function, receiver:Object = null):Boolean; @@ -170,7 +170,7 @@ package __AS3__.vec { AS3 native function pop():Number; - AS3 native function push(... rest):uint; + AS3 native function push(...rest):uint; [API("708")] AS3 native function removeAt(index:int):Number; @@ -185,7 +185,7 @@ package __AS3__.vec { AS3 native function sort(func:*):Vector$double; - AS3 native function splice(start:Number, deleteLen:Number, ... rest):Vector$double; + AS3 native function splice(start:Number, deleteLen:Number, ...rest):Vector$double; AS3 function toLocaleString():String { return this.AS3::join(","); @@ -195,7 +195,6 @@ package __AS3__.vec { return this.AS3::join(","); } - AS3 native function unshift(... rest):uint; + AS3 native function unshift(...rest):uint; } } - diff --git a/core/src/avm2/globals/VectorInt.as b/core/src/avm2/globals/VectorInt.as index 188adb43d41c..da17ae646f34 100644 --- a/core/src/avm2/globals/VectorInt.as +++ b/core/src/avm2/globals/VectorInt.as @@ -2,8 +2,8 @@ package __AS3__.vec { [Ruffle(CallHandler)] [Ruffle(InstanceAllocator)] internal final dynamic class Vector$int { - { - prototype.concat = function(... rest):* { + { + prototype.concat = function(...rest):* { var v:Vector$int = this; return v.AS3::concat.apply(v, rest); }; @@ -56,7 +56,7 @@ package __AS3__.vec { return v.AS3::pop(); }; - prototype.push = function(... rest):* { + prototype.push = function(...rest):* { var v:Vector$int = this; return v.AS3::push.apply(v, rest); }; @@ -93,7 +93,7 @@ package __AS3__.vec { return v.AS3::sort(func); }; - prototype.splice = function(start:*, deleteCount:*, ... items):* { + prototype.splice = function(start:*, deleteCount:*, ...items):* { var argsList:Array = [start, deleteCount]; argsList = argsList.AS3::concat(items); @@ -111,7 +111,7 @@ package __AS3__.vec { return v.AS3::join(","); }; - prototype.unshift = function(... rest):* { + prototype.unshift = function(...rest):* { var v:Vector$int = this; return v.AS3::unshift.apply(v, rest); }; @@ -149,7 +149,7 @@ package __AS3__.vec { public native function set length(length:uint):*; - AS3 native function concat(... rest):Vector$int; + AS3 native function concat(...rest):Vector$int; AS3 native function every(callback:Function, receiver:Object = null):Boolean; @@ -170,7 +170,7 @@ package __AS3__.vec { AS3 native function pop():int; - AS3 native function push(... rest):uint; + AS3 native function push(...rest):uint; [API("708")] AS3 native function removeAt(index:int):int; @@ -185,7 +185,7 @@ package __AS3__.vec { AS3 native function sort(func:*):Vector$int; - AS3 native function splice(start:Number, deleteLen:Number, ... rest):Vector$int; + AS3 native function splice(start:Number, deleteLen:Number, ...rest):Vector$int; AS3 function toLocaleString():String { return this.AS3::join(","); @@ -195,7 +195,6 @@ package __AS3__.vec { return this.AS3::join(","); } - AS3 native function unshift(... rest):uint; + AS3 native function unshift(...rest):uint; } } - diff --git a/core/src/avm2/globals/VectorObject.as b/core/src/avm2/globals/VectorObject.as index bc7ca1e19e26..aa2672eede20 100644 --- a/core/src/avm2/globals/VectorObject.as +++ b/core/src/avm2/globals/VectorObject.as @@ -4,8 +4,8 @@ package __AS3__.vec { // FIXME: This class is supposed to be final, but then we can't create any // Vector. (since they all extend this class) internal dynamic class Vector$object { - { - prototype.concat = function(... rest):* { + { + prototype.concat = function(...rest):* { var v:Vector$object = this; return v.AS3::concat.apply(v, rest); }; @@ -58,7 +58,7 @@ package __AS3__.vec { return v.AS3::pop(); }; - prototype.push = function(... rest):* { + prototype.push = function(...rest):* { var v:Vector$object = this; return v.AS3::push.apply(v, rest); }; @@ -95,7 +95,7 @@ package __AS3__.vec { return v.AS3::sort(func); }; - prototype.splice = function(start:*, deleteCount:*, ... items):* { + prototype.splice = function(start:*, deleteCount:*, ...items):* { var argsList:Array = [start, deleteCount]; argsList = argsList.AS3::concat(items); @@ -113,7 +113,7 @@ package __AS3__.vec { return v.AS3::join(","); }; - prototype.unshift = function(... rest):* { + prototype.unshift = function(...rest):* { var v:Vector$object = this; return v.AS3::unshift.apply(v, rest); }; @@ -151,7 +151,7 @@ package __AS3__.vec { public native function set length(length:uint):*; - AS3 native function concat(... rest):Vector$object; + AS3 native function concat(...rest):Vector$object; AS3 native function every(callback:Function, receiver:Object = null):Boolean; @@ -172,7 +172,7 @@ package __AS3__.vec { AS3 native function pop():Object; - AS3 native function push(... rest):uint; + AS3 native function push(...rest):uint; [API("708")] AS3 native function removeAt(index:int):Object; @@ -187,13 +187,13 @@ package __AS3__.vec { AS3 native function sort(func:*):Vector$object; - AS3 native function splice(start:Number, deleteLen:Number, ... rest):Vector$object; + AS3 native function splice(start:Number, deleteLen:Number, ...rest):Vector$object; AS3 function toLocaleString():String { var result:String = ""; var vectorLength:uint = this.length; - for(var i:uint = 0; i < vectorLength; i ++) { + for (var i:uint = 0; i < vectorLength; i++) { var element = this[i]; if (element === undefined || element === null) { @@ -214,7 +214,6 @@ package __AS3__.vec { return this.AS3::join(","); } - AS3 native function unshift(... rest):uint; + AS3 native function unshift(...rest):uint; } } - diff --git a/core/src/avm2/globals/VectorUint.as b/core/src/avm2/globals/VectorUint.as index ec1492d2454d..29bd3b4d662c 100644 --- a/core/src/avm2/globals/VectorUint.as +++ b/core/src/avm2/globals/VectorUint.as @@ -2,8 +2,8 @@ package __AS3__.vec { [Ruffle(CallHandler)] [Ruffle(InstanceAllocator)] internal final dynamic class Vector$uint { - { - prototype.concat = function(... rest):* { + { + prototype.concat = function(...rest):* { var v:Vector$uint = this; return v.AS3::concat.apply(v, rest); }; @@ -56,7 +56,7 @@ package __AS3__.vec { return v.AS3::pop(); }; - prototype.push = function(... rest):* { + prototype.push = function(...rest):* { var v:Vector$uint = this; return v.AS3::push.apply(v, rest); }; @@ -93,7 +93,7 @@ package __AS3__.vec { return v.AS3::sort(func); }; - prototype.splice = function(start:*, deleteCount:*, ... items):* { + prototype.splice = function(start:*, deleteCount:*, ...items):* { var argsList:Array = [start, deleteCount]; argsList = argsList.AS3::concat(items); @@ -111,7 +111,7 @@ package __AS3__.vec { return v.AS3::join(","); }; - prototype.unshift = function(... rest):* { + prototype.unshift = function(...rest):* { var v:Vector$uint = this; return v.AS3::unshift.apply(v, rest); }; @@ -149,7 +149,7 @@ package __AS3__.vec { public native function set length(length:uint):*; - AS3 native function concat(... rest):Vector$uint; + AS3 native function concat(...rest):Vector$uint; AS3 native function every(callback:Function, receiver:Object = null):Boolean; @@ -170,7 +170,7 @@ package __AS3__.vec { AS3 native function pop():uint; - AS3 native function push(... rest):uint; + AS3 native function push(...rest):uint; [API("708")] // For some reason the parameter is a uint for Vector$uint specifically @@ -186,7 +186,7 @@ package __AS3__.vec { AS3 native function sort(func:*):Vector$uint; - AS3 native function splice(start:Number, deleteLen:Number, ... rest):Vector$uint; + AS3 native function splice(start:Number, deleteLen:Number, ...rest):Vector$uint; AS3 function toLocaleString():String { return this.AS3::join(","); @@ -196,7 +196,6 @@ package __AS3__.vec { return this.AS3::join(","); } - AS3 native function unshift(... rest):uint; + AS3 native function unshift(...rest):uint; } } - diff --git a/core/src/avm2/globals/VerifyError.as b/core/src/avm2/globals/VerifyError.as index a4ad258a5df2..4436c1f5ab0e 100644 --- a/core/src/avm2/globals/VerifyError.as +++ b/core/src/avm2/globals/VerifyError.as @@ -3,14 +3,11 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package -{ - public dynamic class VerifyError extends Error - { +package { + public dynamic class VerifyError extends Error { prototype.name = "VerifyError"; - public function VerifyError(message:String = "", id:int = 0) - { + public function VerifyError(message:String = "", id:int = 0) { super(message, id); this.name = prototype.name; } diff --git a/core/src/avm2/globals/XML.as b/core/src/avm2/globals/XML.as index 7da2d57cf5da..c9e310d203fa 100644 --- a/core/src/avm2/globals/XML.as +++ b/core/src/avm2/globals/XML.as @@ -2,7 +2,7 @@ package { [Ruffle(InstanceAllocator)] [Ruffle(CallHandler)] public final dynamic class XML { - AS3 static function setSettings(settings:Object = null): void { + AS3 static function setSettings(settings:Object = null):void { if (settings == null) { settings = XML.AS3::defaultSettings(); } @@ -25,22 +25,22 @@ package { AS3 static function settings():Object { return { - ignoreComments: XML.ignoreComments, - ignoreProcessingInstructions: XML.ignoreProcessingInstructions, - ignoreWhitespace: XML.ignoreWhitespace, - prettyIndent: XML.prettyIndent, - prettyPrinting: XML.prettyPrinting - }; + ignoreComments: XML.ignoreComments, + ignoreProcessingInstructions: XML.ignoreProcessingInstructions, + ignoreWhitespace: XML.ignoreWhitespace, + prettyIndent: XML.prettyIndent, + prettyPrinting: XML.prettyPrinting + }; } AS3 static function defaultSettings():Object { return { - ignoreComments: true, - ignoreProcessingInstructions: true, - ignoreWhitespace: true, - prettyIndent: 2, - prettyPrinting: true - }; + ignoreComments: true, + ignoreProcessingInstructions: true, + ignoreWhitespace: true, + prettyIndent: 2, + prettyPrinting: true + }; } public function XML(value:* = void 0) { @@ -61,7 +61,7 @@ package { AS3 native function copy():XML; AS3 native function descendants(name:Object = "*"):XMLList; AS3 native function length():int; - AS3 native function normalize(): XML; + AS3 native function normalize():XML; AS3 native function parent():*; AS3 native function text():XMLList; AS3 native function toString():String; @@ -76,7 +76,7 @@ package { return this; } - AS3 function toJSON(k:String) : * { + AS3 function toJSON(k:String):* { return this.toJSON(k); } @@ -107,7 +107,7 @@ package { private native function namespace_internal_impl(hasPrefix:Boolean, prefix:String = null):*; [Ruffle(NativeCallable)] - AS3 function namespace(prefix:* = null):* { + AS3 function namespace (prefix:* = null):* { return namespace_internal_impl(arguments.length > 0, prefix); } @@ -168,12 +168,12 @@ package { prototype.hasComplexContent = function():Boolean { var self:XML = this; return self.AS3::hasComplexContent(); - } + }; prototype.hasSimpleContent = function():Boolean { var self:XML = this; return self.AS3::hasSimpleContent(); - } + }; prototype.name = function():Object { var self:XML = this; @@ -191,7 +191,7 @@ package { prototype.namespace = function(prefix:* = null):* { var self:XML = this; - return self.AS3::namespace.apply(self, arguments); + return self.AS3::namespace .apply(self, arguments); }; prototype.addNamespace = function(ns:*):XML { @@ -252,7 +252,7 @@ package { prototype.copy = function():XML { var self:XML = this; return self.AS3::copy(); - } + }; prototype.parent = function():* { var self:XML = this; @@ -262,7 +262,7 @@ package { prototype.elements = function(name:* = "*"):XMLList { var self:XML = this; return self.AS3::elements(name); - } + }; prototype.toString = function():String { if (this === prototype) { @@ -315,7 +315,7 @@ package { prototype.length = function():int { var self:XML = this; return self.AS3::length(); - } + }; prototype.toJSON = function(k:String):* { return "XML"; @@ -324,37 +324,37 @@ package { prototype.comments = function():XMLList { var self:XML = this; return self.AS3::comments(); - } + }; prototype.processingInstructions = function(name:* = "*"):XMLList { var self:XML = this; return self.AS3::processingInstructions(name); - } + }; prototype.insertChildAfter = function(child1:*, child2:*):* { var self:XML = this; return self.AS3::insertChildAfter(child1, child2); - } + }; prototype.insertChildBefore = function(child1:*, child2:*):* { var self:XML = this; return self.AS3::insertChildBefore(child1, child2); - } + }; prototype.replace = function(propertyName:*, value:*):XML { var self:XML = this; return self.AS3::replace(propertyName, value); - } + }; prototype.setChildren = function(value:*):XML { var self:XML = this; return self.AS3::setChildren(value); - } + }; prototype.setLocalName = function(name:*):void { var self:XML = this; self.AS3::setLocalName(name); - } + }; prototype.setPropertyIsEnumerable("hasComplexContent", false); prototype.setPropertyIsEnumerable("hasSimpleContent", false); @@ -396,15 +396,16 @@ package { XML.settings = function() { return XML.AS3::settings(); - } + }; XML.setSettings = function(v:* = void 0) { - XML.AS3::setSettings(v) - } + XML.AS3::setSettings(v); + + }; XML.defaultSettings = function() { return XML.AS3::defaultSettings(); - } + }; public static const length:* = 1; } diff --git a/core/src/avm2/globals/XMLList.as b/core/src/avm2/globals/XMLList.as index ea277b166abf..c9d9cafd7754 100644 --- a/core/src/avm2/globals/XMLList.as +++ b/core/src/avm2/globals/XMLList.as @@ -7,7 +7,7 @@ package { this.init(value, XML.ignoreComments, XML.ignoreProcessingInstructions, XML.ignoreWhitespace); } - private native function init(value:*, ignoreComments:Boolean, ignoreProcessingInstructions:Boolean, ignoreWhitespace:Boolean): void; + private native function init(value:*, ignoreComments:Boolean, ignoreProcessingInstructions:Boolean, ignoreWhitespace:Boolean):void; AS3 native function hasComplexContent():Boolean; AS3 native function hasSimpleContent():Boolean; @@ -36,14 +36,14 @@ package { AS3 native function inScopeNamespaces():Array; AS3 native function insertChildAfter(child1:*, child2:*):*; AS3 native function insertChildBefore(child1:*, child2:*):*; - AS3 native function localName():Object - AS3 native function name(): Object; + AS3 native function localName():Object; + AS3 native function name():Object; private native function namespace_internal_impl(hasPrefix:Boolean, prefix:String = null):*; - AS3 function namespace(prefix:* = null):* { + AS3 function namespace (prefix:* = null):* { return namespace_internal_impl(arguments.length > 0, prefix); } AS3 native function namespaceDeclarations():Array; - AS3 native function nodeKind(): String; + AS3 native function nodeKind():String; AS3 native function prependChild(child:*):XML; AS3 native function removeNamespace(ns:*):XML; AS3 native function replace(propertyName:*, value:*):XML; @@ -52,7 +52,7 @@ package { AS3 native function setName(name:*):void; AS3 native function setNamespace(ns:*):void; - AS3 function toJSON(k:String) : * { + AS3 function toJSON(k:String):* { return this.toJSON(k); } @@ -63,7 +63,7 @@ package { prototype.hasComplexContent = function():Boolean { var self:XMLList = this; return self.AS3::hasComplexContent(); - } + }; prototype.hasSimpleContent = function():Boolean { var self:XMLList = this; @@ -72,12 +72,12 @@ package { // 'self.hasSimpleContent()' here, which leads to the prototype method invoking // itself, instead of the AS3 method. return self.AS3::hasSimpleContent(); - } + }; prototype.length = function():int { var self:XMLList = this; return self.AS3::length(); - } + }; prototype.child = function(name:Object):XMLList { var self:XMLList = this; @@ -87,147 +87,147 @@ package { prototype.children = function():XMLList { var self:XMLList = this; return self.AS3::children(); - } + }; prototype.contains = function(value:*):Boolean { var self:XMLList = this; return self.AS3::contains(value); - } + }; prototype.copy = function():XMLList { var self:XMLList = this; return self.AS3::copy(); - } + }; prototype.attribute = function(name:*):XMLList { var self:XMLList = this; return self.AS3::attribute(name); - } + }; prototype.attributes = function():XMLList { var self:XMLList = this; return self.AS3::attributes(); - } + }; prototype.toString = function():String { var self:XMLList = this; return self.AS3::toString(); - } + }; prototype.toXMLString = function():String { var self:XMLList = this; return self.AS3::toXMLString(); - } + }; prototype.addNamespace = function(ns:*):XML { var self:XMLList = this; return self.AS3::addNamespace(ns); - } + }; prototype.appendChild = function(child:*):XML { var self:XMLList = this; return self.AS3::appendChild(child); - } + }; prototype.childIndex = function():int { var self:XMLList = this; return self.AS3::childIndex(); - } + }; prototype.inScopeNamespaces = function():Array { var self:XMLList = this; return self.AS3::inScopeNamespaces(); - } + }; prototype.insertChildAfter = function(child1:*, child2:*):* { var self:XMLList = this; return self.AS3::insertChildAfter(child1, child2); - } + }; prototype.insertChildBefore = function(child1:*, child2:*):* { var self:XMLList = this; return self.AS3::insertChildBefore(child1, child2); - } + }; prototype.localName = function():Object { var self:XMLList = this; return self.AS3::localName(); - } + }; - prototype.name = function(): Object { + prototype.name = function():Object { var self:XMLList = this; return self.AS3::name(); - } + }; prototype.namespace = function(prefix:* = null):* { var self:XMLList = this; - return self.AS3::namespace.apply(self, arguments); - } + return self.AS3::namespace .apply(self, arguments); + }; prototype.namespaceDeclarations = function():Array { var self:XMLList = this; return self.AS3::namespaceDeclarations(); - } + }; prototype.nodeKind = function():String { var self:XMLList = this; return self.AS3::nodeKind(); - } + }; prototype.prependChild = function(child:*):XML { var self:XMLList = this; return self.AS3::prependChild(child); - } + }; prototype.removeNamespace = function(ns:*):XML { var self:XMLList = this; return self.AS3::removeNamespace(ns); - } + }; prototype.replace = function(propertyName:*, value:*):XML { var self:XMLList = this; return self.AS3::replace(propertyName, value); - } + }; prototype.setChildren = function(value:*):XML { var self:XMLList = this; return self.AS3::setChildren(value); - } + }; prototype.setLocalName = function(name:*):void { var self:XMLList = this; self.AS3::setLocalName(name); - } + }; prototype.setName = function(name:*):void { var self:XMLList = this; self.AS3::setName(name); - } + }; prototype.setNamespace = function(ns:*):void { var self:XMLList = this; self.AS3::setNamespace(ns); - } + }; prototype.descendants = function(name:* = "*"):XMLList { var self:XMLList = this; return self.AS3::descendants(name); - } + }; prototype.text = function():XMLList { var self:XMLList = this; return self.AS3::text(); - } + }; prototype.comments = function():XMLList { var self:XMLList = this; return self.AS3::comments(); - } + }; prototype.parent = function():* { var self:XMLList = this; return self.AS3::parent(); - } + }; prototype.toJSON = function(k:String):* { return "XMLList"; @@ -236,17 +236,17 @@ package { prototype.processingInstructions = function(name:* = "*"):XMLList { var self:XMLList = this; return self.AS3::processingInstructions(name); - } + }; prototype.elements = function(name:* = "*"):XMLList { var self:XMLList = this; return self.AS3::elements(name); - } + }; prototype.normalize = function():XMLList { var self:XMLList = this; return self.AS3::normalize(); - } + }; prototype.setPropertyIsEnumerable("hasComplexContent", false); prototype.setPropertyIsEnumerable("hasSimpleContent", false); diff --git a/core/src/avm2/globals/__ruffle__/stubs.as b/core/src/avm2/globals/__ruffle__/stubs.as index 2b9d078baf95..e85b5c570c56 100644 --- a/core/src/avm2/globals/__ruffle__/stubs.as +++ b/core/src/avm2/globals/__ruffle__/stubs.as @@ -1,12 +1,11 @@ package __ruffle__ { - public native function stub_method(... rest):void; + public native function stub_method(...rest):void; - public native function stub_getter(... rest):void; + public native function stub_getter(...rest):void; - public native function stub_setter(... rest):void; + public native function stub_setter(...rest):void; - public native function stub_constructor(... rest):void; + public native function stub_constructor(...rest):void; - - public native function log_warn(... rest):void; + public native function log_warn(...rest):void; } diff --git a/core/src/avm2/globals/asformat-config.xml b/core/src/avm2/globals/asformat-config.xml new file mode 100644 index 000000000000..ff8bbcb65212 --- /dev/null +++ b/core/src/avm2/globals/asformat-config.xml @@ -0,0 +1,7 @@ + + false + false + true + 4 + true + \ No newline at end of file diff --git a/core/src/avm2/globals/avmplus.as b/core/src/avm2/globals/avmplus.as index fae09c55a9af..d2d85bc98fc4 100644 --- a/core/src/avm2/globals/avmplus.as +++ b/core/src/avm2/globals/avmplus.as @@ -4,30 +4,30 @@ package avmplus { public native function getQualifiedClassName(value:*):String; internal native function describeTypeJSON(o:*, flags:uint):Object; - public const HIDE_NSURI_METHODS:uint = 0x0001; - public const INCLUDE_BASES:uint = 0x0002; - public const INCLUDE_INTERFACES:uint = 0x0004; - public const INCLUDE_VARIABLES:uint = 0x0008; - public const INCLUDE_ACCESSORS:uint = 0x0010; - public const INCLUDE_METHODS:uint = 0x0020; - public const INCLUDE_METADATA:uint = 0x0040; - public const INCLUDE_CONSTRUCTOR:uint = 0x0080; - public const INCLUDE_TRAITS:uint = 0x0100; - public const USE_ITRAITS:uint = 0x0200; - public const HIDE_OBJECT:uint = 0x0400; + public const HIDE_NSURI_METHODS:uint = 0x0001; + public const INCLUDE_BASES:uint = 0x0002; + public const INCLUDE_INTERFACES:uint = 0x0004; + public const INCLUDE_VARIABLES:uint = 0x0008; + public const INCLUDE_ACCESSORS:uint = 0x0010; + public const INCLUDE_METHODS:uint = 0x0020; + public const INCLUDE_METADATA:uint = 0x0040; + public const INCLUDE_CONSTRUCTOR:uint = 0x0080; + public const INCLUDE_TRAITS:uint = 0x0100; + public const USE_ITRAITS:uint = 0x0200; + public const HIDE_OBJECT:uint = 0x0400; - public const FLASH10_FLAGS:uint = INCLUDE_BASES | - INCLUDE_INTERFACES | - INCLUDE_VARIABLES | - INCLUDE_ACCESSORS | - INCLUDE_METHODS | - INCLUDE_METADATA | - INCLUDE_CONSTRUCTOR | - INCLUDE_TRAITS | - HIDE_NSURI_METHODS | - HIDE_OBJECT; + public const FLASH10_FLAGS:uint = INCLUDE_BASES | + INCLUDE_INTERFACES | + INCLUDE_VARIABLES | + INCLUDE_ACCESSORS | + INCLUDE_METHODS | + INCLUDE_METADATA | + INCLUDE_CONSTRUCTOR | + INCLUDE_TRAITS | + HIDE_NSURI_METHODS | + HIDE_OBJECT; - internal function copyParams(params: Object, xml: XML) { + internal function copyParams(params:Object, xml:XML) { for (var i in params) { var param = params[i]; var elem = ; @@ -38,7 +38,7 @@ package avmplus { } } - internal function copyMetadata(metadata: Array, xml: XML) { + internal function copyMetadata(metadata:Array, xml:XML) { for each (var md in metadata) { var data = ; data.@name = md.name; @@ -52,16 +52,16 @@ package avmplus { } } - internal function copyUriAndMetadata(data: Object, xml: XML) { + internal function copyUriAndMetadata(data:Object, xml:XML) { if (data.uri) { xml.@uri = data.uri; } if (data.metadata) { - copyMetadata(data.metadata, xml) + copyMetadata(data.metadata, xml); } } - internal function copyTraits(traits: Object, xml: XML) { + internal function copyTraits(traits:Object, xml:XML) { for each (var base in traits.bases) { var elem = ; elem.@type = base; @@ -75,11 +75,11 @@ package avmplus { if (traits.constructor) { var constructor = ; copyParams(traits.constructor, constructor); - xml.AS3::appendChild(constructor) + xml.AS3::appendChild(constructor); } for each (var variable in traits.variables) { - var variableXML = (variable.access == "readonly") ? : ; + var variableXML = (variable.access == "readonly") ? () : (); variableXML.@name = variable.name; variableXML.@type = variable.type; copyUriAndMetadata(variable, variableXML); @@ -110,7 +110,7 @@ package avmplus { copyMetadata(traits.metadata, xml); } - public function describeType(value: *, flags: uint):XML { + public function describeType(value:*, flags:uint):XML { var json = describeTypeJSON(value, flags); var xml = ; xml.@name = json.name; diff --git a/core/src/avm2/globals/flash/accessibility/Accessibility.as b/core/src/avm2/globals/flash/accessibility/Accessibility.as index 6613d0c8ff15..33a07b74aeca 100644 --- a/core/src/avm2/globals/flash/accessibility/Accessibility.as +++ b/core/src/avm2/globals/flash/accessibility/Accessibility.as @@ -3,30 +3,25 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.accessibility -{ +package flash.accessibility { import __ruffle__.stub_method; import flash.display.DisplayObject; - public final class Accessibility - { + public final class Accessibility { // Indicates whether a screen reader is active and the application is communicating with it. - private static var _active: Boolean; + private static var _active:Boolean; // Sends an event to the Microsoft Active Accessibility API. - public static function sendEvent(source:DisplayObject, childID:uint, eventType:uint, nonHTML:Boolean = false):void - { + public static function sendEvent(source:DisplayObject, childID:uint, eventType:uint, nonHTML:Boolean = false):void { stub_method("flash.accessibility.Accessibility", "sendEvent"); } // Tells Flash Player to apply any accessibility changes made by using the DisplayObject.accessibilityProperties property. - public static function updateProperties():void - { + public static function updateProperties():void { stub_method("flash.accessibility.Accessibility", "updateProperties"); } - public static function get active() : Boolean - { + public static function get active():Boolean { return _active; } diff --git a/core/src/avm2/globals/flash/accessibility/AccessibilityImplementation.as b/core/src/avm2/globals/flash/accessibility/AccessibilityImplementation.as index 7627683a78e8..c48ebcd31b27 100644 --- a/core/src/avm2/globals/flash/accessibility/AccessibilityImplementation.as +++ b/core/src/avm2/globals/flash/accessibility/AccessibilityImplementation.as @@ -2,21 +2,23 @@ package flash.accessibility { import flash.geom.Rectangle; public class AccessibilityImplementation { - public var errno: uint; - public var stub: Boolean; + public var errno:uint; + public var stub:Boolean; public function AccessibilityImplementation() { this.errno = 0; this.stub = false; } - public function accDoDefaultAction(childID:uint):void { } + public function accDoDefaultAction(childID:uint):void { + } public function accLocation(childID:uint):* { return null; } - public function accSelect(operation:uint, childID:uint):void { } + public function accSelect(operation:uint, childID:uint):void { + } public function get_accDefaultAction(childID:uint):String { return null; diff --git a/core/src/avm2/globals/flash/accessibility/AccessibilityProperties.as b/core/src/avm2/globals/flash/accessibility/AccessibilityProperties.as index ddfdedb1f6a9..21de8d348621 100644 --- a/core/src/avm2/globals/flash/accessibility/AccessibilityProperties.as +++ b/core/src/avm2/globals/flash/accessibility/AccessibilityProperties.as @@ -1,11 +1,11 @@ package flash.accessibility { public class AccessibilityProperties { - public var name: String; - public var description: String; - public var shortcut: String; - public var silent: Boolean; - public var forceSimple: Boolean; - public var noAutoLabeling: Boolean; + public var name:String; + public var description:String; + public var shortcut:String; + public var silent:Boolean; + public var forceSimple:Boolean; + public var noAutoLabeling:Boolean; public function AccessibilityProperties() { this.name = ""; diff --git a/core/src/avm2/globals/flash/concurrent/Condition.as b/core/src/avm2/globals/flash/concurrent/Condition.as index f3ffd59fddaf..20e497c45258 100644 --- a/core/src/avm2/globals/flash/concurrent/Condition.as +++ b/core/src/avm2/globals/flash/concurrent/Condition.as @@ -1,8 +1,9 @@ package flash.concurrent { [API("684")] public final class Condition { - public static const isSupported: Boolean = false; + public static const isSupported:Boolean = false; - public function Condition(mutex: Mutex) {} + public function Condition(mutex:Mutex) { + } } } \ No newline at end of file diff --git a/core/src/avm2/globals/flash/concurrent/Mutex.as b/core/src/avm2/globals/flash/concurrent/Mutex.as index 746c46474a1b..56529a0990d6 100644 --- a/core/src/avm2/globals/flash/concurrent/Mutex.as +++ b/core/src/avm2/globals/flash/concurrent/Mutex.as @@ -1,8 +1,8 @@ package flash.concurrent { [API("684")] public final class Mutex { - public static const isSupported: Boolean = false; - + public static const isSupported:Boolean = false; + public function Mutex() { throw new Error("Error #1520: Mutex cannot be initialized.", 1520); } diff --git a/core/src/avm2/globals/flash/desktop/Clipboard.as b/core/src/avm2/globals/flash/desktop/Clipboard.as index 43a2fa100b69..c8bdfed8fcbb 100644 --- a/core/src/avm2/globals/flash/desktop/Clipboard.as +++ b/core/src/avm2/globals/flash/desktop/Clipboard.as @@ -6,7 +6,7 @@ package flash.desktop { public class Clipboard { private static var _generalClipboard = new Clipboard(); - public static function get generalClipboard(): Clipboard { + public static function get generalClipboard():Clipboard { return Clipboard._generalClipboard; } @@ -14,30 +14,30 @@ package flash.desktop { // TODO: This should only be callable in AIR } - public function get formats(): Array { + public function get formats():Array { stub_getter("flash.desktop.Clipboard", "formats"); return new Array(); } - public function clear(): void { + public function clear():void { stub_method("flash.desktop.Clipboard", "clear"); } - public function clearData(format: String): void { + public function clearData(format:String):void { stub_method("flash.desktop.Clipboard", "clearData"); } - public function getData(format: String, transferMode: String = ClipboardTransferMode.ORIGINAL_PREFERRED): Object { + public function getData(format:String, transferMode:String = ClipboardTransferMode.ORIGINAL_PREFERRED):Object { stub_method("flash.desktop.Clipboard", "getData"); return null; } - public function hasFormat(format: String): Boolean { + public function hasFormat(format:String):Boolean { stub_method("flash.desktop.Clipboard", "hasFormat"); return false; } - public function setData(format: String, data: Object, serializable: Boolean = true): Boolean { + public function setData(format:String, data:Object, serializable:Boolean = true):Boolean { stub_method("flash.desktop.Clipboard", "setData"); if (format == ClipboardFormats.TEXT_FORMAT) { System.setClipboard(data); @@ -46,7 +46,7 @@ package flash.desktop { return false; } - public function setDataHandler(format: String, handler: Function, serializable: Boolean = true): Boolean { + public function setDataHandler(format:String, handler:Function, serializable:Boolean = true):Boolean { stub_method("flash.desktop.Clipboard", "setDataHandler"); return false; } diff --git a/core/src/avm2/globals/flash/desktop/ClipboardFormats.as b/core/src/avm2/globals/flash/desktop/ClipboardFormats.as index f927940186db..58c64e042236 100644 --- a/core/src/avm2/globals/flash/desktop/ClipboardFormats.as +++ b/core/src/avm2/globals/flash/desktop/ClipboardFormats.as @@ -3,14 +3,12 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.desktop -{ +package flash.desktop { // The AS3 docs specify various API versions for the different members, // as also indicated by their comments. The docs, however, are lying. [API("662")] - public class ClipboardFormats - { + public class ClipboardFormats { // Image data (AIR only). public static const BITMAP_FORMAT:String = "air:bitmap"; diff --git a/core/src/avm2/globals/flash/desktop/ClipboardTransferMode.as b/core/src/avm2/globals/flash/desktop/ClipboardTransferMode.as index c084251d4da3..9d7ec670e7f9 100644 --- a/core/src/avm2/globals/flash/desktop/ClipboardTransferMode.as +++ b/core/src/avm2/globals/flash/desktop/ClipboardTransferMode.as @@ -3,11 +3,9 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.desktop -{ +package flash.desktop { - public class ClipboardTransferMode - { + public class ClipboardTransferMode { // The Clipboard object should only return a copy. public static const CLONE_ONLY:String = "cloneOnly"; diff --git a/core/src/avm2/globals/flash/desktop/IFilePromise.as b/core/src/avm2/globals/flash/desktop/IFilePromise.as index 3350705fbec8..c749345231b0 100644 --- a/core/src/avm2/globals/flash/desktop/IFilePromise.as +++ b/core/src/avm2/globals/flash/desktop/IFilePromise.as @@ -2,13 +2,14 @@ package flash.desktop { import flash.utils.IDataInput; import flash.events.ErrorEvent; - [API("668")] // AIR 2.0 + [API("668")] + // AIR 2.0 public interface IFilePromise { function get isAsync():Boolean; function get relativePath():String; function close():void; function open():IDataInput; - function reportError(e:ErrorEvent):void + function reportError(e:ErrorEvent):void; } } \ No newline at end of file diff --git a/core/src/avm2/globals/flash/desktop/Icon.as b/core/src/avm2/globals/flash/desktop/Icon.as index de7fea84e4af..a21eb58c26d1 100644 --- a/core/src/avm2/globals/flash/desktop/Icon.as +++ b/core/src/avm2/globals/flash/desktop/Icon.as @@ -3,16 +3,15 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.desktop -{ - import flash.events.EventDispatcher; - [API("661")] - public class Icon extends EventDispatcher - { +package flash.desktop { + import flash.events.EventDispatcher; + [API("661")] + public class Icon extends EventDispatcher { - // The icon image as an array of BitmapData objects of different sizes. - public var bitmaps:Array; + // The icon image as an array of BitmapData objects of different sizes. + public var bitmaps:Array; - function Icon() {} - } + function Icon() { + } + } } diff --git a/core/src/avm2/globals/flash/desktop/InteractiveIcon.as b/core/src/avm2/globals/flash/desktop/InteractiveIcon.as index 5deb5cc3df82..27e7efa29165 100644 --- a/core/src/avm2/globals/flash/desktop/InteractiveIcon.as +++ b/core/src/avm2/globals/flash/desktop/InteractiveIcon.as @@ -3,23 +3,19 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.desktop -{ - import __ruffle__.stub_getter; +package flash.desktop { + import __ruffle__.stub_getter; - [API("661")] - public class InteractiveIcon extends Icon - { - public function get height():int - { - stub_getter("flash.desktop.InteractiveIcon", "height"); - return 64; - } + [API("661")] + public class InteractiveIcon extends Icon { + public function get height():int { + stub_getter("flash.desktop.InteractiveIcon", "height"); + return 64; + } - public function get width():int - { - stub_getter("flash.desktop.InteractiveIcon", "width"); - return 64; + public function get width():int { + stub_getter("flash.desktop.InteractiveIcon", "width"); + return 64; + } } - } } diff --git a/core/src/avm2/globals/flash/desktop/NativeApplication.as b/core/src/avm2/globals/flash/desktop/NativeApplication.as index 051c73108cd0..e8f73d215474 100644 --- a/core/src/avm2/globals/flash/desktop/NativeApplication.as +++ b/core/src/avm2/globals/flash/desktop/NativeApplication.as @@ -1,265 +1,223 @@ -package flash.desktop -{ - import flash.display.NativeWindow; - import flash.events.InvokeEvent; - import flash.events.Event; - import flash.events.TimerEvent; - import flash.events.EventDispatcher; - import flash.system.Security; - import flash.utils.Timer; - import flash.utils.setTimeout; - import __ruffle__.stub_method; - import __ruffle__.stub_getter; - import __ruffle__.stub_setter; - - [API("661")] - public final class NativeApplication extends EventDispatcher - { - private static var _instance:NativeApplication; - - private var _openedWindows:Array = []; - - private var _idleThreshold:int = 300; - - public function NativeApplication() - { - super(); - // TODO - setTimeout(function():void - { - dispatchEvent(new InvokeEvent(InvokeEvent.INVOKE, false, false, null, [])); - }, 500); +package flash.desktop { + import flash.display.NativeWindow; + import flash.events.InvokeEvent; + import flash.events.Event; + import flash.events.TimerEvent; + import flash.events.EventDispatcher; + import flash.system.Security; + import flash.utils.Timer; + import flash.utils.setTimeout; + import __ruffle__.stub_method; + import __ruffle__.stub_getter; + import __ruffle__.stub_setter; + + [API("661")] + public final class NativeApplication extends EventDispatcher { + private static var _instance:NativeApplication; + + private var _openedWindows:Array = []; + + private var _idleThreshold:int = 300; + + public function NativeApplication() { + super(); + // TODO + setTimeout(function():void { + dispatchEvent(new InvokeEvent(InvokeEvent.INVOKE, false, false, null, [])); + }, 500); + } + + public static function get nativeApplication():NativeApplication { + if (!_instance) + _instance = new NativeApplication(); + return _instance; + } + + public static function get supportsMenu():Boolean { + stub_getter("flash.desktop.NativeApplication", "supportsMenu"); + return false; + } + + public static function get supportsDockIcon():Boolean { + stub_getter("flash.desktop.NativeApplication", "supportsDockIcon"); + return false; + } + + public static function get supportsSystemTrayIcon():Boolean { + stub_getter("flash.desktop.NativeApplication", "supportsSystemTrayIcon"); + return false; + } + + [API("668")] + public static function get supportsDefaultApplication():Boolean { + stub_getter("flash.desktop.NativeApplication", "supportsDefaultApplication"); + return false; + } + + [API("668")] + public static function get supportsStartAtLogin():Boolean { + stub_getter("flash.desktop.NativeApplication", "supportsStartAtLogin"); + return false; + } + + public function exit(exitCode:int = 0):void { + stub_method("flash.desktop.NativeApplication", "exit"); + } + + public function get runtimeVersion():String { + stub_getter("flash.desktop.NativeApplication", "runtimeVersion"); + return "5.0.0"; + } + + public function get runtimePatchLevel():uint { + stub_getter("flash.desktop.NativeApplication", "runtimePatchLevel"); + return 0; + } + + public function get applicationID():String { + stub_getter("flash.desktop.NativeApplication", "applicationID"); + return ""; + } + + public function get publisherID():String { + stub_getter("flash.desktop.NativeApplication", "publisherID"); + return ""; + } + + public function get applicationDescriptor():XML { + stub_getter("flash.desktop.NativeApplication", "applicationDescriptor"); + return null; + } + + public function get autoExit():Boolean { + stub_getter("flash.desktop.NativeApplication", "autoExit"); + return false; + } + + public function set autoExit(param1:Boolean):void { + stub_setter("flash.desktop.NativeApplication", "autoExit"); + } + + public function get icon():InteractiveIcon { + stub_getter("flash.desktop.NativeApplication", "icon"); + return null; + } + + [API("668")] + public function get systemIdleMode():String { + stub_getter("flash.desktop.NativeApplication", "systemIdleMode"); + return "normal"; + } + + [API("668")] + public function set systemIdleMode(param1:String):void { + stub_setter("flash.desktop.NativeApplication", "systemIdleMode"); + } + + public function get startAtLogin():Boolean { + stub_getter("flash.desktop.NativeApplication", "startAtLogin"); + return false; + } + + public function set startAtLogin(param1:Boolean):void { + stub_setter("flash.desktop.NativeApplication", "startAtLogin"); + } + + public function activate(window:NativeWindow = null):void { + stub_method("flash.desktop.NativeApplication", "activate"); + } + + public function get activeWindow():NativeWindow { + stub_getter("flash.desktop.NativeApplication", "activeWindow"); + return _openedWindows[0]; + } + + public function get openedWindows():Array { + stub_getter("flash.desktop.NativeApplication", "openedWindows"); + return _openedWindows; + } + + public function get timeSinceLastUserInput():int { + stub_getter("flash.desktop.NativeApplication", "timeSinceLastUserInput"); + return 100; + } + + public function get idleThreshold():int { + stub_getter("flash.desktop.NativeApplication", "idleThreshold"); + return this._idleThreshold; + } + + public function set idleThreshold(value:int):void { + stub_setter("flash.desktop.NativeApplication", "idleThreshold"); + this._idleThreshold = value; + } + + public function copy():Boolean { + stub_method("flash.desktop.NativeApplication", "copy"); + return false; + } + + public function cut():Boolean { + stub_method("flash.desktop.NativeApplication", "cut"); + return false; + } + + public function paste():Boolean { + stub_method("flash.desktop.NativeApplication", "paste"); + return false; + } + + public function clear():Boolean { + stub_method("flash.desktop.NativeApplication", "clear"); + return false; + } + + public function selectAll():Boolean { + stub_method("flash.desktop.NativeApplication", "selectAll"); + return false; + } + + public function getDefaultApplication(extension:String):String { + stub_method("flash.desktop.NativeApplication", "getDefaultApplication"); + return null; + } + + public function isSetAsDefaultApplication(extension:String):Boolean { + stub_method("flash.desktop.NativeApplication", "isSetAsDefaultApplication"); + return true; + } + + public function setAsDefaultApplication(extension:String):void { + stub_method("flash.desktop.NativeApplication", "setAsDefaultApplication"); + } + + public function removeAsDefaultApplication(extension:String):void { + stub_method("flash.desktop.NativeApplication", "removeAsDefaultApplication"); + } + + [API("681")] + public function get executeInBackground():Boolean { + stub_getter("flash.desktop.NativeApplication", "executeInBackground"); + return false; + } + + [API("681")] + public function set executeInBackground(param1:Boolean):void { + stub_setter("flash.desktop.NativeApplication", "executeInBackground"); + } + + // [API("721")] Ruffle doesn't support this API Version + [API("681")] + public function get isCompiledAOT():Boolean { + stub_getter("flash.desktop.NativeApplication", "isCompiledAOT"); + return false; + } + + // [API("721")] Ruffle doesn't support this API Version + [API("681")] + public function get isActive():Boolean { + stub_getter("flash.desktop.NativeApplication", "isActive"); + return true; + } } - - public static function get nativeApplication():NativeApplication - { - if (!_instance) - _instance = new NativeApplication(); - return _instance; - } - - public static function get supportsMenu():Boolean - { - stub_getter("flash.desktop.NativeApplication", "supportsMenu"); - return false; - } - - public static function get supportsDockIcon():Boolean - { - stub_getter("flash.desktop.NativeApplication", "supportsDockIcon"); - return false; - } - - public static function get supportsSystemTrayIcon():Boolean - { - stub_getter("flash.desktop.NativeApplication", "supportsSystemTrayIcon"); - return false; - } - - [API("668")] - public static function get supportsDefaultApplication():Boolean - { - stub_getter("flash.desktop.NativeApplication", "supportsDefaultApplication"); - return false; - } - - [API("668")] - public static function get supportsStartAtLogin():Boolean - { - stub_getter("flash.desktop.NativeApplication", "supportsStartAtLogin"); - return false; - } - - public function exit(exitCode:int = 0):void - { - stub_method("flash.desktop.NativeApplication", "exit"); - } - - public function get runtimeVersion():String - { - stub_getter("flash.desktop.NativeApplication", "runtimeVersion"); - return "5.0.0"; - } - - public function get runtimePatchLevel():uint - { - stub_getter("flash.desktop.NativeApplication", "runtimePatchLevel"); - return 0; - } - - public function get applicationID():String - { - stub_getter("flash.desktop.NativeApplication", "applicationID"); - return ""; - } - - public function get publisherID():String - { - stub_getter("flash.desktop.NativeApplication", "publisherID"); - return ""; - } - - public function get applicationDescriptor():XML - { - stub_getter("flash.desktop.NativeApplication", "applicationDescriptor"); - return null; - } - - public function get autoExit():Boolean - { - stub_getter("flash.desktop.NativeApplication", "autoExit"); - return false; - } - - public function set autoExit(param1:Boolean):void - { - stub_setter("flash.desktop.NativeApplication", "autoExit"); - } - - public function get icon():InteractiveIcon - { - stub_getter("flash.desktop.NativeApplication", "icon"); - return null; - } - - [API("668")] - public function get systemIdleMode():String - { - stub_getter("flash.desktop.NativeApplication", "systemIdleMode"); - return "normal"; - } - - [API("668")] - public function set systemIdleMode(param1:String):void - { - stub_setter("flash.desktop.NativeApplication", "systemIdleMode"); - } - - public function get startAtLogin():Boolean - { - stub_getter("flash.desktop.NativeApplication", "startAtLogin"); - return false; - } - - public function set startAtLogin(param1:Boolean):void - { - stub_setter("flash.desktop.NativeApplication", "startAtLogin"); - } - - public function activate(window:NativeWindow = null):void - { - stub_method("flash.desktop.NativeApplication", "activate"); - } - - public function get activeWindow():NativeWindow - { - stub_getter("flash.desktop.NativeApplication", "activeWindow"); - return _openedWindows[0]; - } - - public function get openedWindows():Array - { - stub_getter("flash.desktop.NativeApplication", "openedWindows"); - return _openedWindows; - } - - public function get timeSinceLastUserInput():int - { - stub_getter("flash.desktop.NativeApplication", "timeSinceLastUserInput"); - return 100; - } - - public function get idleThreshold():int - { - stub_getter("flash.desktop.NativeApplication", "idleThreshold"); - return this._idleThreshold; - } - - public function set idleThreshold(value:int):void - { - stub_setter("flash.desktop.NativeApplication", "idleThreshold"); - this._idleThreshold = value; - } - - public function copy():Boolean - { - stub_method("flash.desktop.NativeApplication", "copy"); - return false; - } - - public function cut():Boolean - { - stub_method("flash.desktop.NativeApplication", "cut"); - return false; - } - - public function paste():Boolean - { - stub_method("flash.desktop.NativeApplication", "paste"); - return false; - } - - public function clear():Boolean - { - stub_method("flash.desktop.NativeApplication", "clear"); - return false; - } - - public function selectAll():Boolean - { - stub_method("flash.desktop.NativeApplication", "selectAll"); - return false; - } - - public function getDefaultApplication(extension:String):String - { - stub_method("flash.desktop.NativeApplication", "getDefaultApplication"); - return null; - } - - public function isSetAsDefaultApplication(extension:String):Boolean - { - stub_method("flash.desktop.NativeApplication", "isSetAsDefaultApplication"); - return true; - } - - public function setAsDefaultApplication(extension:String):void - { - stub_method("flash.desktop.NativeApplication", "setAsDefaultApplication"); - } - - public function removeAsDefaultApplication(extension:String):void - { - stub_method("flash.desktop.NativeApplication", "removeAsDefaultApplication"); - } - - [API("681")] - public function get executeInBackground():Boolean - { - stub_getter("flash.desktop.NativeApplication", "executeInBackground"); - return false; - } - - [API("681")] - public function set executeInBackground(param1:Boolean):void - { - stub_setter("flash.desktop.NativeApplication", "executeInBackground"); - } - - // [API("721")] Ruffle doesn't support this API Version - [API("681")] - public function get isCompiledAOT():Boolean - { - stub_getter("flash.desktop.NativeApplication", "isCompiledAOT"); - return false; - } - - // [API("721")] Ruffle doesn't support this API Version - [API("681")] - public function get isActive():Boolean - { - stub_getter("flash.desktop.NativeApplication", "isActive"); - return true; - } - } } diff --git a/core/src/avm2/globals/flash/display/AVM1Movie.as b/core/src/avm2/globals/flash/display/AVM1Movie.as index c116749cf030..78b6abd5ab6f 100644 --- a/core/src/avm2/globals/flash/display/AVM1Movie.as +++ b/core/src/avm2/globals/flash/display/AVM1Movie.as @@ -6,12 +6,12 @@ package flash.display { public function AVM1Movie() { // Should be inaccessible } - - public function call(functionName:String, ... rest):* { + + public function call(functionName:String, ...rest):* { stub_method("flash.display.AVM1Movie", "call"); return null; } - + public function addCallback(name:String, fn:Function):void { stub_method("flash.display.AVM1Movie", "addCallback"); } diff --git a/core/src/avm2/globals/flash/display/ActionScriptVersion.as b/core/src/avm2/globals/flash/display/ActionScriptVersion.as index 1397f8489b69..1869fdf8ef80 100644 --- a/core/src/avm2/globals/flash/display/ActionScriptVersion.as +++ b/core/src/avm2/globals/flash/display/ActionScriptVersion.as @@ -1,6 +1,6 @@ package flash.display { public final class ActionScriptVersion { - public static const ACTIONSCRIPT2: uint = 2; - public static const ACTIONSCRIPT3: uint = 3; + public static const ACTIONSCRIPT2:uint = 2; + public static const ACTIONSCRIPT3:uint = 3; } } diff --git a/core/src/avm2/globals/flash/display/BitmapData.as b/core/src/avm2/globals/flash/display/BitmapData.as index 89347a5a190f..8e784c2220f3 100644 --- a/core/src/avm2/globals/flash/display/BitmapData.as +++ b/core/src/avm2/globals/flash/display/BitmapData.as @@ -39,7 +39,7 @@ package flash.display { public native function scroll(x:int, y:int):void; public native function lock():void; public native function hitTest(firstPoint:Point, firstAlphaThreshold:uint, secondObject:Object, secondBitmapDataPoint:Point = null, secondAlphaThreshold:uint = 1):Boolean; - public function histogram(rect:Rectangle = null): Vector.> { + public function histogram(rect:Rectangle = null):Vector.> { if (!rect) { rect = this.rect; } @@ -65,37 +65,28 @@ package flash.display { return result; } public native function unlock(changeRect:Rectangle = null):void; - public native function copyPixels( - sourceBitmapData:BitmapData, sourceRect:Rectangle, destPoint:Point, alphaBitmapData:BitmapData = null, alphaPoint:Point = null, mergeAlpha:Boolean = false - ):void; - public native function draw( - source:IBitmapDrawable, matrix:Matrix = null, colorTransform:ColorTransform = null, blendMode:String = null, clipRect:Rectangle = null, smoothing:Boolean = false - ):void; + public native function copyPixels(sourceBitmapData:BitmapData, sourceRect:Rectangle, destPoint:Point, + alphaBitmapData:BitmapData = null, alphaPoint:Point = null, mergeAlpha:Boolean = false):void; + public native function draw(source:IBitmapDrawable, matrix:Matrix = null, colorTransform:ColorTransform = null, + blendMode:String = null, clipRect:Rectangle = null, smoothing:Boolean = false):void; [API("680")] - public native function drawWithQuality( - source:IBitmapDrawable, matrix:Matrix = null, colorTransform:ColorTransform = null, blendMode:String = null, clipRect:Rectangle = null, smoothing:Boolean = false, quality:String = null - ):void; + public native function drawWithQuality(source:IBitmapDrawable, matrix:Matrix = null, colorTransform:ColorTransform = null, + blendMode:String = null, clipRect:Rectangle = null, smoothing:Boolean = false, quality:String = null):void; public native function fillRect(rect:Rectangle, color:uint):void; public native function dispose():void; public native function applyFilter(sourceBitmapData:BitmapData, sourceRect:Rectangle, destPoint:Point, filter:BitmapFilter):void; public native function clone():BitmapData; - public native function paletteMap( - sourceBitmapData:BitmapData, sourceRect:Rectangle, destPoint:Point, redArray:Array = null, greenArray:Array = null, blueArray:Array = null, alphaArray:Array = null - ):void; - public native function perlinNoise( - baseX:Number, baseY:Number, numOctaves:uint, randomSeed:int, stitch:Boolean, fractalNoise:Boolean, channelOptions:uint = 7, grayScale:Boolean = false, offsets:Array = null - ):void; - public native function threshold( - sourceBitmapData:BitmapData, sourceRect:Rectangle, destPoint:Point, operation:String, threshold:uint, color:uint = 0, mask:uint = 0xFFFFFFFF, copySource:Boolean = false - ):uint; + public native function paletteMap(sourceBitmapData:BitmapData, sourceRect:Rectangle, destPoint:Point, + redArray:Array = null, greenArray:Array = null, blueArray:Array = null, alphaArray:Array = null):void; + public native function perlinNoise(baseX:Number, baseY:Number, numOctaves:uint, randomSeed:int, stitch:Boolean, + fractalNoise:Boolean, channelOptions:uint = 7, grayScale:Boolean = false, offsets:Array = null):void; + public native function threshold(sourceBitmapData:BitmapData, sourceRect:Rectangle, destPoint:Point, operation:String, + threshold:uint, color:uint = 0, mask:uint = 0xFFFFFFFF, copySource:Boolean = false):uint; public native function compare(otherBitmapData:BitmapData):Object; - public native function pixelDissolve( - sourceBitmapData:BitmapData, sourceRect:Rectangle, destPoint:Point, randomSeed:int = 0, numPixels:int = 0, - fillColor:uint = 0 - ):int; - public native function merge( - sourceBitmapData:BitmapData, sourceRect:Rectangle, destPoint:Point, redMultiplier:uint, greenMultiplier:uint, blueMultiplier:uint, alphaMultiplier:uint - ):void; + public native function pixelDissolve(sourceBitmapData:BitmapData, sourceRect:Rectangle, destPoint:Point, + randomSeed:int = 0, numPixels:int = 0, fillColor:uint = 0):int; + public native function merge(sourceBitmapData:BitmapData, sourceRect:Rectangle, destPoint:Point, redMultiplier:uint, + greenMultiplier:uint, blueMultiplier:uint, alphaMultiplier:uint):void; public function generateFilterRect(sourceRect:Rectangle, filter:BitmapFilter):Rectangle { // Flash always reports that a ShaderFilter affects the entire BitmapData, ignoring sourceRect. if (filter is ShaderFilter) { diff --git a/core/src/avm2/globals/flash/display/BitmapDataChannel.as b/core/src/avm2/globals/flash/display/BitmapDataChannel.as index de9aa571e647..4873e8aea161 100644 --- a/core/src/avm2/globals/flash/display/BitmapDataChannel.as +++ b/core/src/avm2/globals/flash/display/BitmapDataChannel.as @@ -1,8 +1,8 @@ package flash.display { public final class BitmapDataChannel { - public static const RED: uint = 1; - public static const GREEN: uint = 2; - public static const BLUE: uint = 4; - public static const ALPHA: uint = 8; + public static const RED:uint = 1; + public static const GREEN:uint = 2; + public static const BLUE:uint = 4; + public static const ALPHA:uint = 8; } } diff --git a/core/src/avm2/globals/flash/display/BitmapEncodingColorSpace.as b/core/src/avm2/globals/flash/display/BitmapEncodingColorSpace.as index 8ca25749871b..04e3b57f585f 100644 --- a/core/src/avm2/globals/flash/display/BitmapEncodingColorSpace.as +++ b/core/src/avm2/globals/flash/display/BitmapEncodingColorSpace.as @@ -1,9 +1,9 @@ package flash.display { [API("680")] public final class BitmapEncodingColorSpace { - public static const COLORSPACE_AUTO: String = "auto"; - public static const COLORSPACE_4_4_4: String = "4:4:4"; - public static const COLORSPACE_4_2_2: String = "4:2:2"; - public static const COLORSPACE_4_2_0: String = "4:2:0"; + public static const COLORSPACE_AUTO:String = "auto"; + public static const COLORSPACE_4_4_4:String = "4:4:4"; + public static const COLORSPACE_4_2_2:String = "4:2:2"; + public static const COLORSPACE_4_2_0:String = "4:2:0"; } } diff --git a/core/src/avm2/globals/flash/display/BlendMode.as b/core/src/avm2/globals/flash/display/BlendMode.as index 52aa35e685bf..839bb71d6f67 100644 --- a/core/src/avm2/globals/flash/display/BlendMode.as +++ b/core/src/avm2/globals/flash/display/BlendMode.as @@ -1,19 +1,19 @@ package flash.display { public final class BlendMode { - public static const NORMAL: String = "normal"; - public static const LAYER: String = "layer"; - public static const MULTIPLY: String = "multiply"; - public static const SCREEN: String = "screen"; - public static const LIGHTEN: String = "lighten"; - public static const DARKEN: String = "darken"; - public static const ADD: String = "add"; - public static const SUBTRACT: String = "subtract"; - public static const DIFFERENCE: String = "difference"; - public static const INVERT: String = "invert"; - public static const OVERLAY: String = "overlay"; - public static const HARDLIGHT: String = "hardlight"; - public static const ALPHA: String = "alpha"; - public static const ERASE: String = "erase"; - public static const SHADER: String = "shader"; + public static const NORMAL:String = "normal"; + public static const LAYER:String = "layer"; + public static const MULTIPLY:String = "multiply"; + public static const SCREEN:String = "screen"; + public static const LIGHTEN:String = "lighten"; + public static const DARKEN:String = "darken"; + public static const ADD:String = "add"; + public static const SUBTRACT:String = "subtract"; + public static const DIFFERENCE:String = "difference"; + public static const INVERT:String = "invert"; + public static const OVERLAY:String = "overlay"; + public static const HARDLIGHT:String = "hardlight"; + public static const ALPHA:String = "alpha"; + public static const ERASE:String = "erase"; + public static const SHADER:String = "shader"; } } diff --git a/core/src/avm2/globals/flash/display/CapsStyle.as b/core/src/avm2/globals/flash/display/CapsStyle.as index 46c46c7ba80c..06a9624e979d 100644 --- a/core/src/avm2/globals/flash/display/CapsStyle.as +++ b/core/src/avm2/globals/flash/display/CapsStyle.as @@ -1,7 +1,7 @@ package flash.display { public final class CapsStyle { - public static const ROUND: String = "round"; - public static const NONE: String = "none"; - public static const SQUARE: String = "square"; + public static const ROUND:String = "round"; + public static const NONE:String = "none"; + public static const SQUARE:String = "square"; } } diff --git a/core/src/avm2/globals/flash/display/ColorCorrection.as b/core/src/avm2/globals/flash/display/ColorCorrection.as index 444c6e221e1d..eed69adcb3a7 100644 --- a/core/src/avm2/globals/flash/display/ColorCorrection.as +++ b/core/src/avm2/globals/flash/display/ColorCorrection.as @@ -1,7 +1,7 @@ package flash.display { public final class ColorCorrection { - public static const DEFAULT: String = "default"; - public static const ON: String = "on"; - public static const OFF: String = "off"; + public static const DEFAULT:String = "default"; + public static const ON:String = "on"; + public static const OFF:String = "off"; } } diff --git a/core/src/avm2/globals/flash/display/ColorCorrectionSupport.as b/core/src/avm2/globals/flash/display/ColorCorrectionSupport.as index 966a8da26d54..dd318ca809f0 100644 --- a/core/src/avm2/globals/flash/display/ColorCorrectionSupport.as +++ b/core/src/avm2/globals/flash/display/ColorCorrectionSupport.as @@ -1,7 +1,7 @@ package flash.display { public final class ColorCorrectionSupport { - public static const UNSUPPORTED: String = "unsupported"; - public static const DEFAULT_ON: String = "defaultOn"; - public static const DEFAULT_OFF: String = "defaultOff"; + public static const UNSUPPORTED:String = "unsupported"; + public static const DEFAULT_ON:String = "defaultOn"; + public static const DEFAULT_OFF:String = "defaultOff"; } } diff --git a/core/src/avm2/globals/flash/display/DisplayObjectContainer.as b/core/src/avm2/globals/flash/display/DisplayObjectContainer.as index 898ab09219ec..6b02cc80d330 100644 --- a/core/src/avm2/globals/flash/display/DisplayObjectContainer.as +++ b/core/src/avm2/globals/flash/display/DisplayObjectContainer.as @@ -26,21 +26,23 @@ package flash.display { public native function removeChild(child:DisplayObject):DisplayObject; public native function removeChildAt(index:int):DisplayObject; - [API("674")] // AIR 3.0, FP 11, SWF 13 + [API("674")] + // AIR 3.0, FP 11, SWF 13 public native function removeChildren(beginIndex:int = 0, endIndex:int = 0x7fffffff):void; public native function setChildIndex(child:DisplayObject, index:int):void; public native function swapChildren(child1:DisplayObject, child2:DisplayObject):void; public native function swapChildrenAt(index1:int, index2:int):void; - [API("690")] // AIR 3.8, FP 11.8, SWF 21 + [API("690")] + // AIR 3.8, FP 11.8, SWF 21 public native function stopAllMovieClips():void; public native function getObjectsUnderPoint(point:Point):Array; public native function areInaccessibleObjectsUnderPoint(point:Point):Boolean; public function get textSnapshot():TextSnapshot { - stub_getter("flash.display.DisplayObjectContainer", "textSnapshot") + stub_getter("flash.display.DisplayObjectContainer", "textSnapshot"); return new TextSnapshot(); } } diff --git a/core/src/avm2/globals/flash/display/FrameLabel.as b/core/src/avm2/globals/flash/display/FrameLabel.as index ae83befe3d42..141ac5993d89 100644 --- a/core/src/avm2/globals/flash/display/FrameLabel.as +++ b/core/src/avm2/globals/flash/display/FrameLabel.as @@ -2,19 +2,19 @@ package flash.display { import flash.events.EventDispatcher; public final class FrameLabel extends EventDispatcher { - private var _name: String; - private var _frame: int; + private var _name:String; + private var _frame:int; public function FrameLabel(name:String, frame:int) { this._name = name; this._frame = frame; } - public function get name(): String { + public function get name():String { return this._name; } - public function get frame(): int { + public function get frame():int { return this._frame; } } diff --git a/core/src/avm2/globals/flash/display/GradientType.as b/core/src/avm2/globals/flash/display/GradientType.as index e3bb4d9b600d..5cff5a8e812a 100644 --- a/core/src/avm2/globals/flash/display/GradientType.as +++ b/core/src/avm2/globals/flash/display/GradientType.as @@ -1,6 +1,6 @@ package flash.display { public final class GradientType { - public static const LINEAR: String = "linear"; - public static const RADIAL: String = "radial"; + public static const LINEAR:String = "linear"; + public static const RADIAL:String = "radial"; } } diff --git a/core/src/avm2/globals/flash/display/Graphics.as b/core/src/avm2/globals/flash/display/Graphics.as index 7d64edc2c522..33e7a39ddd7e 100644 --- a/core/src/avm2/globals/flash/display/Graphics.as +++ b/core/src/avm2/globals/flash/display/Graphics.as @@ -1,50 +1,47 @@ -package flash.display -{ +package flash.display { import flash.geom.Matrix; import __ruffle__.stub_method; // note: no need for an allocator, as it's never constructed from AS - public final class Graphics - { - public function Graphics() - { + public final class Graphics { + public function Graphics() { throw new Error("You cannot construct Graphics directly."); } public native function beginBitmapFill(bitmap:BitmapData, matrix:Matrix = null, repeat:Boolean = true, smooth:Boolean = false):void; public native function beginFill(color:uint, alpha:Number = 1.0):void; public native function beginGradientFill( - type:String, colors:Array, alphas:Array, ratios:Array, matrix:Matrix = null, spreadMethod:String = "pad", interpolationMethod:String = "rgb", focalPointRatio:Number = 0 - ): void; + type:String, colors:Array, alphas:Array, ratios:Array, matrix:Matrix = null, spreadMethod:String = "pad", interpolationMethod:String = "rgb", focalPointRatio:Number = 0 + ):void; public function beginShaderFill(shader:Shader, matrix:Matrix = null):void { stub_method("flash.display.Graphics", "beginShaderFill"); } - public native function clear(): void; - public native function curveTo(controlX:Number, controlY:Number, anchorX:Number, anchorY:Number): void; - public native function drawCircle(x:Number, y:Number, radius:Number): void; - public native function drawEllipse(x:Number, y:Number, width:Number, height:Number): void; - public native function drawRect(x:Number, y:Number, width:Number, height:Number): void; - public native function drawRoundRect(x:Number, y:Number, width:Number, height:Number, ellipseWidth:Number, ellipseHeight:Number = NaN): void; - public native function endFill(): void; + public native function clear():void; + public native function curveTo(controlX:Number, controlY:Number, anchorX:Number, anchorY:Number):void; + public native function drawCircle(x:Number, y:Number, radius:Number):void; + public native function drawEllipse(x:Number, y:Number, width:Number, height:Number):void; + public native function drawRect(x:Number, y:Number, width:Number, height:Number):void; + public native function drawRoundRect(x:Number, y:Number, width:Number, height:Number, ellipseWidth:Number, ellipseHeight:Number = NaN):void; + public native function endFill():void; public native function lineStyle( - thickness:Number = NaN, color:uint = 0, alpha:Number = 1.0, pixelHinting:Boolean = false, scaleMode:String = "normal", caps:String = null, joints:String = null, miterLimit:Number = 3 - ): void; - public native function lineTo(x:Number, y:Number): void; - public native function moveTo(x:Number, y:Number): void; - //public native function beginShaderFill(shader:Shader, matrix:Matrix = null):void; + thickness:Number = NaN, color:uint = 0, alpha:Number = 1.0, pixelHinting:Boolean = false, scaleMode:String = "normal", caps:String = null, joints:String = null, miterLimit:Number = 3 + ):void; + public native function lineTo(x:Number, y:Number):void; + public native function moveTo(x:Number, y:Number):void; + // public native function beginShaderFill(shader:Shader, matrix:Matrix = null):void; public native function lineGradientStyle( - type:String, colors:Array, alphas:Array, ratios:Array, matrix:Matrix = null, spreadMethod:String = "pad", interpolationMethod:String = "rgb", focalPointRatio:Number = 0 - ):void; + type:String, colors:Array, alphas:Array, ratios:Array, matrix:Matrix = null, spreadMethod:String = "pad", interpolationMethod:String = "rgb", focalPointRatio:Number = 0 + ):void; [API("674")] public native function cubicCurveTo(controlX1:Number, controlY1:Number, controlX2:Number, controlY2:Number, anchorX:Number, anchorY:Number):void; public native function copyFrom(sourceGraphics:Graphics):void; public native function drawPath(commands:Vector., data:Vector., winding:String = "evenOdd"):void; public native function drawRoundRectComplex( - x:Number, y:Number, width:Number, height:Number, topLeftRadius:Number, topRightRadius:Number, bottomLeftRadius:Number, bottomRightRadius:Number - ):void; + x:Number, y:Number, width:Number, height:Number, topLeftRadius:Number, topRightRadius:Number, bottomLeftRadius:Number, bottomRightRadius:Number + ):void; public native function drawTriangles(vertices:Vector., indices:Vector. = null, uvtData:Vector. = null, culling:String = "none"):void; public native function drawGraphicsData(graphicsData:Vector.):void; - //public native function lineShaderStyle(shader:Shader, matrix:Matrix = null):void; + // public native function lineShaderStyle(shader:Shader, matrix:Matrix = null):void; public native function lineBitmapStyle(bitmap:BitmapData, matrix:Matrix = null, repeat:Boolean = true, smooth:Boolean = false):void; [API("686")] public native function readGraphicsData(recurse:Boolean = true):Vector.; diff --git a/core/src/avm2/globals/flash/display/GraphicsBitmapFill.as b/core/src/avm2/globals/flash/display/GraphicsBitmapFill.as index 2dbadef5d1b3..934812aab5d0 100644 --- a/core/src/avm2/globals/flash/display/GraphicsBitmapFill.as +++ b/core/src/avm2/globals/flash/display/GraphicsBitmapFill.as @@ -1,19 +1,19 @@ package flash.display { -import flash.geom.Matrix; + import flash.geom.Matrix; public final class GraphicsBitmapFill implements IGraphicsFill, IGraphicsData { [Ruffle(NativeAccessible)] - public var bitmapData : BitmapData; + public var bitmapData:BitmapData; [Ruffle(NativeAccessible)] - public var matrix : Matrix; + public var matrix:Matrix; [Ruffle(NativeAccessible)] - public var repeat : Boolean; + public var repeat:Boolean; [Ruffle(NativeAccessible)] - public var smooth : Boolean; + public var smooth:Boolean; public function GraphicsBitmapFill(bitmapData:BitmapData = null, matrix:Matrix = null, repeat:Boolean = true, smooth:Boolean = false) { this.bitmapData = bitmapData; diff --git a/core/src/avm2/globals/flash/display/GraphicsGradientFill.as b/core/src/avm2/globals/flash/display/GraphicsGradientFill.as index fc278fe4d873..1819dbab5ab1 100644 --- a/core/src/avm2/globals/flash/display/GraphicsGradientFill.as +++ b/core/src/avm2/globals/flash/display/GraphicsGradientFill.as @@ -1,42 +1,42 @@ package flash.display { -import flash.geom.Matrix; + import flash.geom.Matrix; public final class GraphicsGradientFill implements IGraphicsFill, IGraphicsData { [Ruffle(NativeAccessible)] - public var alphas : Array; + public var alphas:Array; [Ruffle(NativeAccessible)] - public var colors : Array; + public var colors:Array; [Ruffle(NativeAccessible)] - public var focalPointRatio : Number; + public var focalPointRatio:Number; [Ruffle(NativeAccessible)] - public var interpolationMethod : String; + public var interpolationMethod:String; [Ruffle(NativeAccessible)] - public var matrix : Matrix; + public var matrix:Matrix; [Ruffle(NativeAccessible)] - public var ratios : Array; + public var ratios:Array; [Ruffle(NativeAccessible)] - public var spreadMethod : String; + public var spreadMethod:String; [Ruffle(NativeAccessible)] - public var type : String; + public var type:String; public function GraphicsGradientFill( - type:String = "linear", - colors:Array = null, - alphas:Array = null, - ratios:Array = null, - matrix:Matrix = null, - spreadMethod:String = SpreadMethod.PAD, - interpolationMethod:String = InterpolationMethod.RGB, - focalPointRatio:Number = 0.0 - ) { + type:String = "linear", + colors:Array = null, + alphas:Array = null, + ratios:Array = null, + matrix:Matrix = null, + spreadMethod:String = SpreadMethod.PAD, + interpolationMethod:String = InterpolationMethod.RGB, + focalPointRatio:Number = 0.0 + ) { this.alphas = alphas; this.colors = colors; this.focalPointRatio = focalPointRatio; diff --git a/core/src/avm2/globals/flash/display/GraphicsPath.as b/core/src/avm2/globals/flash/display/GraphicsPath.as index bf534eed875e..f43ffc877097 100644 --- a/core/src/avm2/globals/flash/display/GraphicsPath.as +++ b/core/src/avm2/globals/flash/display/GraphicsPath.as @@ -2,13 +2,13 @@ package flash.display { public final class GraphicsPath implements IGraphicsPath, IGraphicsData { [Ruffle(NativeAccessible)] - public var commands : Vector.; + public var commands:Vector.; [Ruffle(NativeAccessible)] - public var data : Vector.; + public var data:Vector.; [Ruffle(NativeAccessible)] - private var _winding : String; + private var _winding:String; public function GraphicsPath(commands:Vector. = null, data:Vector. = null, winding:String = "evenOdd") { this.commands = commands; @@ -28,7 +28,8 @@ package flash.display { } } - [API("674")] // The online docs say 694, but that's a lie. This is the correct number from playerglobal.swc. + [API("674")] + // The online docs say 694, but that's a lie. This is the correct number from playerglobal.swc. public function cubicCurveTo(controlX1:Number, controlY1:Number, controlX2:Number, controlY2:Number, anchorX:Number, anchorY:Number):void { if (commands == null) { commands = new Vector.(); diff --git a/core/src/avm2/globals/flash/display/GraphicsPathCommand.as b/core/src/avm2/globals/flash/display/GraphicsPathCommand.as index d92a29d3a3e9..d8200a12ac91 100644 --- a/core/src/avm2/globals/flash/display/GraphicsPathCommand.as +++ b/core/src/avm2/globals/flash/display/GraphicsPathCommand.as @@ -1,11 +1,11 @@ package flash.display { public final class GraphicsPathCommand { - public static const NO_OP: int = 0; - public static const MOVE_TO: int = 1; - public static const LINE_TO: int = 2; - public static const CURVE_TO: int = 3; - public static const WIDE_MOVE_TO: int = 4; - public static const WIDE_LINE_TO: int = 5; - public static const CUBIC_CURVE_TO: int = 6; + public static const NO_OP:int = 0; + public static const MOVE_TO:int = 1; + public static const LINE_TO:int = 2; + public static const CURVE_TO:int = 3; + public static const WIDE_MOVE_TO:int = 4; + public static const WIDE_LINE_TO:int = 5; + public static const CUBIC_CURVE_TO:int = 6; } } diff --git a/core/src/avm2/globals/flash/display/GraphicsPathWinding.as b/core/src/avm2/globals/flash/display/GraphicsPathWinding.as index 174891bbc759..bddf3dc38eae 100644 --- a/core/src/avm2/globals/flash/display/GraphicsPathWinding.as +++ b/core/src/avm2/globals/flash/display/GraphicsPathWinding.as @@ -1,6 +1,6 @@ package flash.display { public final class GraphicsPathWinding { - public static const EVEN_ODD: String = "evenOdd"; - public static const NON_ZERO: String = "nonZero"; + public static const EVEN_ODD:String = "evenOdd"; + public static const NON_ZERO:String = "nonZero"; } } diff --git a/core/src/avm2/globals/flash/display/GraphicsShaderFill.as b/core/src/avm2/globals/flash/display/GraphicsShaderFill.as index 88b6c809ae32..bff848d3e29c 100644 --- a/core/src/avm2/globals/flash/display/GraphicsShaderFill.as +++ b/core/src/avm2/globals/flash/display/GraphicsShaderFill.as @@ -1,15 +1,14 @@ package flash.display { import flash.geom.Matrix; - + public final class GraphicsShaderFill implements IGraphicsFill, IGraphicsData { public var shader:Shader; - + public var matrix:Matrix; - + public function GraphicsShaderFill(shader:Shader = null, matrix:Matrix = null) { this.shader = shader; this.matrix = matrix; } } } - diff --git a/core/src/avm2/globals/flash/display/GraphicsSolidFill.as b/core/src/avm2/globals/flash/display/GraphicsSolidFill.as index 7c76edbb1c6a..ed577cfc301a 100644 --- a/core/src/avm2/globals/flash/display/GraphicsSolidFill.as +++ b/core/src/avm2/globals/flash/display/GraphicsSolidFill.as @@ -2,10 +2,10 @@ package flash.display { public final class GraphicsSolidFill implements IGraphicsFill, IGraphicsData { [Ruffle(NativeAccessible)] - public var alpha : Number = 1.0; + public var alpha:Number = 1.0; [Ruffle(NativeAccessible)] - public var color : uint = 0; + public var color:uint = 0; public function GraphicsSolidFill(color:uint = 0, alpha:Number = 1.0) { this.alpha = alpha; diff --git a/core/src/avm2/globals/flash/display/GraphicsStroke.as b/core/src/avm2/globals/flash/display/GraphicsStroke.as index 3f7927e7d8a0..89832a36d86e 100644 --- a/core/src/avm2/globals/flash/display/GraphicsStroke.as +++ b/core/src/avm2/globals/flash/display/GraphicsStroke.as @@ -2,35 +2,35 @@ package flash.display { public final class GraphicsStroke implements IGraphicsStroke, IGraphicsData { [Ruffle(NativeAccessible)] - public var caps : String; + public var caps:String; [Ruffle(NativeAccessible)] - public var fill : IGraphicsFill; + public var fill:IGraphicsFill; [Ruffle(NativeAccessible)] - public var joints : String; + public var joints:String; [Ruffle(NativeAccessible)] - public var miterLimit : Number; + public var miterLimit:Number; [Ruffle(NativeAccessible)] - public var pixelHinting : Boolean; + public var pixelHinting:Boolean; [Ruffle(NativeAccessible)] - public var scaleMode : String; + public var scaleMode:String; [Ruffle(NativeAccessible)] - public var thickness : Number; + public var thickness:Number; public function GraphicsStroke( - thickness:Number = NaN, - pixelHinting:Boolean = false, - scaleMode:String = "normal", - caps:String = "none", - joints:String = "round", - miterLimit:Number = 3.0, - fill:IGraphicsFill = null - ) { + thickness:Number = NaN, + pixelHinting:Boolean = false, + scaleMode:String = "normal", + caps:String = "none", + joints:String = "round", + miterLimit:Number = 3.0, + fill:IGraphicsFill = null + ) { this.thickness = thickness; this.pixelHinting = pixelHinting; this.scaleMode = scaleMode; diff --git a/core/src/avm2/globals/flash/display/GraphicsTrianglePath.as b/core/src/avm2/globals/flash/display/GraphicsTrianglePath.as index 2d5ea4d65418..7668c8177e6b 100644 --- a/core/src/avm2/globals/flash/display/GraphicsTrianglePath.as +++ b/core/src/avm2/globals/flash/display/GraphicsTrianglePath.as @@ -2,16 +2,16 @@ package flash.display { public final class GraphicsTrianglePath implements IGraphicsPath, IGraphicsData { [Ruffle(NativeAccessible)] - public var culling : String; + public var culling:String; [Ruffle(NativeAccessible)] - public var indices : Vector.; + public var indices:Vector.; [Ruffle(NativeAccessible)] - public var uvtData : Vector.; + public var uvtData:Vector.; [Ruffle(NativeAccessible)] - public var vertices : Vector.; + public var vertices:Vector.; public function GraphicsTrianglePath(vertices:Vector. = null, indices:Vector. = null, uvtData:Vector. = null, culling:String = "none") { this.culling = culling; diff --git a/core/src/avm2/globals/flash/display/IBitmapDrawable.as b/core/src/avm2/globals/flash/display/IBitmapDrawable.as index 893bbd6a0cb2..2e76e01cd2fe 100644 --- a/core/src/avm2/globals/flash/display/IBitmapDrawable.as +++ b/core/src/avm2/globals/flash/display/IBitmapDrawable.as @@ -1,3 +1,4 @@ package flash.display { - public interface IBitmapDrawable {} + public interface IBitmapDrawable { + } } \ No newline at end of file diff --git a/core/src/avm2/globals/flash/display/InterpolationMethod.as b/core/src/avm2/globals/flash/display/InterpolationMethod.as index aa34ebd02866..5830678a3706 100644 --- a/core/src/avm2/globals/flash/display/InterpolationMethod.as +++ b/core/src/avm2/globals/flash/display/InterpolationMethod.as @@ -1,6 +1,6 @@ package flash.display { public final class InterpolationMethod { - public static const RGB: String = "rgb"; - public static const LINEAR_RGB: String = "linearRGB"; + public static const RGB:String = "rgb"; + public static const LINEAR_RGB:String = "linearRGB"; } } diff --git a/core/src/avm2/globals/flash/display/JPEGEncoderOptions.as b/core/src/avm2/globals/flash/display/JPEGEncoderOptions.as index f62c13111c43..f5ec053b0503 100644 --- a/core/src/avm2/globals/flash/display/JPEGEncoderOptions.as +++ b/core/src/avm2/globals/flash/display/JPEGEncoderOptions.as @@ -1,9 +1,9 @@ package flash.display { [API("680")] public final class JPEGEncoderOptions { - public var quality: uint; + public var quality:uint; - public function JPEGEncoderOptions(quality: uint = 80) { + public function JPEGEncoderOptions(quality:uint = 80) { this.quality = quality; } } diff --git a/core/src/avm2/globals/flash/display/JPEGXREncoderOptions.as b/core/src/avm2/globals/flash/display/JPEGXREncoderOptions.as index 774640f4889c..e82f1dfc6980 100644 --- a/core/src/avm2/globals/flash/display/JPEGXREncoderOptions.as +++ b/core/src/avm2/globals/flash/display/JPEGXREncoderOptions.as @@ -1,11 +1,11 @@ package flash.display { [API("680")] public final class JPEGXREncoderOptions { - public var quantization: uint; - public var colorSpace: String; - public var trimFlexBits: uint; + public var quantization:uint; + public var colorSpace:String; + public var trimFlexBits:uint; - public function JPEGXREncoderOptions(quantization: uint = 20, colorSpace: String = "auto", trimFlexBits: uint = 0) { + public function JPEGXREncoderOptions(quantization:uint = 20, colorSpace:String = "auto", trimFlexBits:uint = 0) { this.quantization = quantization; this.colorSpace = colorSpace; this.trimFlexBits = trimFlexBits; diff --git a/core/src/avm2/globals/flash/display/JointStyle.as b/core/src/avm2/globals/flash/display/JointStyle.as index 0b86e129650c..a7e26ae5f4f7 100644 --- a/core/src/avm2/globals/flash/display/JointStyle.as +++ b/core/src/avm2/globals/flash/display/JointStyle.as @@ -1,7 +1,7 @@ package flash.display { public final class JointStyle { - public static const ROUND: String = "round"; - public static const BEVEL: String = "bevel"; - public static const MITER: String = "miter"; + public static const ROUND:String = "round"; + public static const BEVEL:String = "bevel"; + public static const MITER:String = "miter"; } } diff --git a/core/src/avm2/globals/flash/display/LineScaleMode.as b/core/src/avm2/globals/flash/display/LineScaleMode.as index 5b9df5c81f9d..ab4782e86239 100644 --- a/core/src/avm2/globals/flash/display/LineScaleMode.as +++ b/core/src/avm2/globals/flash/display/LineScaleMode.as @@ -1,8 +1,8 @@ package flash.display { public final class LineScaleMode { - public static const NORMAL: String = "normal"; - public static const VERTICAL: String = "vertical"; - public static const HORIZONTAL: String = "horizontal"; - public static const NONE: String = "none"; + public static const NORMAL:String = "normal"; + public static const VERTICAL:String = "vertical"; + public static const HORIZONTAL:String = "horizontal"; + public static const NONE:String = "none"; } } diff --git a/core/src/avm2/globals/flash/display/Loader.as b/core/src/avm2/globals/flash/display/Loader.as index c01b4613adc1..5817a2db8563 100644 --- a/core/src/avm2/globals/flash/display/Loader.as +++ b/core/src/avm2/globals/flash/display/Loader.as @@ -12,7 +12,7 @@ package flash.display { public class Loader extends DisplayObjectContainer { [Ruffle(NativeAccessible)] - private var _contentLoaderInfo: LoaderInfo; + private var _contentLoaderInfo:LoaderInfo; public function get contentLoaderInfo():LoaderInfo { return this._contentLoaderInfo; @@ -22,9 +22,9 @@ package flash.display { return this._contentLoaderInfo.content; } - public native function load(request: URLRequest, context: LoaderContext = null):void; + public native function load(request:URLRequest, context:LoaderContext = null):void; - public native function loadBytes(data: ByteArray, context: LoaderContext = null):void; + public native function loadBytes(data:ByteArray, context:LoaderContext = null):void; public native function unload():void; diff --git a/core/src/avm2/globals/flash/display/MovieClip.as b/core/src/avm2/globals/flash/display/MovieClip.as index 762929d8a55e..68d9bb90dcfb 100644 --- a/core/src/avm2/globals/flash/display/MovieClip.as +++ b/core/src/avm2/globals/flash/display/MovieClip.as @@ -1,6 +1,7 @@ package flash.display { public dynamic class MovieClip extends Sprite { - public function MovieClip() {} + public function MovieClip() { + } public native function get currentFrame():int; public native function get currentFrameLabel():String; diff --git a/core/src/avm2/globals/flash/display/NativeMenu.as b/core/src/avm2/globals/flash/display/NativeMenu.as index 329cfdb644d5..acefe16ae403 100644 --- a/core/src/avm2/globals/flash/display/NativeMenu.as +++ b/core/src/avm2/globals/flash/display/NativeMenu.as @@ -1,15 +1,13 @@ -package flash.display -{ +package flash.display { import flash.events.EventDispatcher; import __ruffle__.stub_method; import __ruffle__.stub_getter; - + // According to the documentation, it should be [API("661")] // but airglobal.swc disagrees with that: [API("667")] - public class NativeMenu extends EventDispatcher - { + public class NativeMenu extends EventDispatcher { // Indicates whether any form of native menu is supported on the client system. private var _isSupported:Boolean; @@ -20,123 +18,105 @@ package flash.display // The parent menu. private var _parent:NativeMenu; - public function NativeMenu() - { + public function NativeMenu() { } // Adds a menu item at the bottom of the menu. - public function addItem(item:NativeMenuItem):NativeMenuItem - { + public function addItem(item:NativeMenuItem):NativeMenuItem { stub_method("flash.display.NativeMenu", "addItem"); this.items.push(item); return item; } // Inserts a menu item at the specified position. - public function addItemAt(item:NativeMenuItem, index:int):NativeMenuItem - { + public function addItemAt(item:NativeMenuItem, index:int):NativeMenuItem { stub_method("flash.display.NativeMenu", "addItemAt"); this.items[index] = item; return item; } // Adds a submenu to the menu by inserting a new menu item. - public function addSubmenu(submenu:NativeMenu, label:String):NativeMenuItem - { + public function addSubmenu(submenu:NativeMenu, label:String):NativeMenuItem { stub_method("flash.display.NativeMenu", "addSubmenu"); return null; } // Adds a submenu to the menu by inserting a new menu item at the specified position. - public function addSubmenuAt(submenu:NativeMenu, index:int, label:String):NativeMenuItem - { + public function addSubmenuAt(submenu:NativeMenu, index:int, label:String):NativeMenuItem { stub_method("flash.display.NativeMenu", "addSubmenuAt"); return null; } // Creates a copy of the menu and all items. - public function clone():NativeMenu - { + public function clone():NativeMenu { stub_method("flash.display.NativeMenu", "clone"); return null; } // Reports whether this menu contains the specified menu item. - public function containsItem(item:NativeMenuItem):Boolean - { + public function containsItem(item:NativeMenuItem):Boolean { stub_method("flash.display.NativeMenu", "containsItem"); return false; } // Pops up this menu at the specified location. - public function display(stage:Stage, stageX:Number, stageY:Number):void - { + public function display(stage:Stage, stageX:Number, stageY:Number):void { stub_method("flash.display.NativeMenu", "display"); } // Gets the menu item at the specified index. - public function getItemAt(index:int):NativeMenuItem - { + public function getItemAt(index:int):NativeMenuItem { stub_method("flash.display.NativeMenu", "getItemAt"); return null; } // Gets the menu item with the specified name. - public function getItemByName(name:String):NativeMenuItem - { + public function getItemByName(name:String):NativeMenuItem { stub_method("flash.display.NativeMenu", "getItemByName"); return null; } // Gets the position of the specified item. - public function getItemIndex(item:NativeMenuItem):int - { + public function getItemIndex(item:NativeMenuItem):int { stub_method("flash.display.NativeMenu", "getItemIndex"); return -1; } // Removes all items from the menu. - public function removeAllItems():void - { + public function removeAllItems():void { stub_method("flash.display.NativeMenu", "removeAllItems"); this.items = []; } // Removes the specified menu item. - public function removeItem(item:NativeMenuItem):NativeMenuItem - { + public function removeItem(item:NativeMenuItem):NativeMenuItem { stub_method("flash.display.NativeMenu", "removeItem"); return null; } // Removes and returns the menu item at the specified index. - public function removeItemAt(index:int):NativeMenuItem - { + public function removeItemAt(index:int):NativeMenuItem { stub_method("flash.display.NativeMenu", "removeItemAt"); return null; } // Moves a menu item to the specified position. - public function setItemIndex(item:NativeMenuItem, index:int):void - { + public function setItemIndex(item:NativeMenuItem, index:int):void { stub_method("flash.display.NativeMenu", "setItemIndex"); } // According to the documentation, it should be [API("668")] // but there is no version gate in airglobal.swc - public function get isSupported():Boolean - { + public function get isSupported():Boolean { return this._isSupported; } - public function get numItems():int - { + public function get numItems():int { return this.items.length; } - public function get parent():NativeMenu - { + public function get parent():NativeMenu { return this._parent; } diff --git a/core/src/avm2/globals/flash/display/NativeMenuItem.as b/core/src/avm2/globals/flash/display/NativeMenuItem.as index 4444a492ee2f..1418a453f22a 100644 --- a/core/src/avm2/globals/flash/display/NativeMenuItem.as +++ b/core/src/avm2/globals/flash/display/NativeMenuItem.as @@ -7,27 +7,25 @@ package flash.display { [API("667")] public class NativeMenuItem extends EventDispatcher { [Ruffle(NativeAccessible)] - public var enabled: Boolean = false; + public var enabled:Boolean = false; - public var checked: Boolean = false; - public var data: Object; - public var isSeparator: Boolean; - public var keyEquivalent: String = "k"; - public var keyEquivalentModifiers: Array = []; - public var label: String; - public var mnemonicIndex: int = 0; - public var name: String = ""; - public var submenu: NativeMenu = new NativeMenu(); + public var checked:Boolean = false; + public var data:Object; + public var isSeparator:Boolean; + public var keyEquivalent:String = "k"; + public var keyEquivalentModifiers:Array = []; + public var label:String; + public var mnemonicIndex:int = 0; + public var name:String = ""; + public var submenu:NativeMenu = new NativeMenu(); - public function NativeMenuItem(label:String = "", isSeparator:Boolean = false) - { + public function NativeMenuItem(label:String = "", isSeparator:Boolean = false) { stub_constructor("flash.display.NativeMenuItem"); this.label = label; this.isSeparator = isSeparator; } - public function get menu():NativeMenu - { + public function get menu():NativeMenu { stub_getter("flash.display.NativeMenuItem", "menu"); return new NativeMenu(); } diff --git a/core/src/avm2/globals/flash/display/NativeWindow.as b/core/src/avm2/globals/flash/display/NativeWindow.as index b43ffe08a2e7..e58ea013b16c 100644 --- a/core/src/avm2/globals/flash/display/NativeWindow.as +++ b/core/src/avm2/globals/flash/display/NativeWindow.as @@ -1,312 +1,266 @@ -package flash.display -{ - import flash.geom.Point; - import flash.geom.Rectangle; - import flash.events.NativeWindowBoundsEvent; - import flash.events.Event; - import flash.events.EventDispatcher; - import flash.desktop.NativeApplication; - import __ruffle__.stub_method; - import __ruffle__.stub_getter; - import __ruffle__.stub_setter; - import __ruffle__.stub_constructor; - - [API("661")] - public class NativeWindow extends EventDispatcher - { - public const systemMaxSize:Point = new Point(2880, 2880); - public const systemMinSize:Point = new Point(1, 1); - public var minSize:Point = systemMinSize; - public var maxSize:Point = systemMaxSize; - public var title:String; - public var alwaysInFront:Boolean = true; - public var visible:Boolean = true; - - private var _bounds:Rectangle; - private var _maximizable:Boolean; - private var _minimizable:Boolean; - private var _resizable:Boolean; - private var _systemChrome:String; - private var _transparent:Boolean; - private var _type:String; - private var _closed:Boolean = false; - private var _stage:Stage; - - public function NativeWindow(initOptions:NativeWindowInitOptions, _stage:Stage = null) - { - stub_constructor("flash.display.NativeWindow"); - NativeApplication.nativeApplication.openedWindows.push(this); - if (_stage) - { - this._stage = _stage; - _stage.addEventListener(Event.RESIZE, function(e:Event):void - { - dispatchEvent(new NativeWindowBoundsEvent(NativeWindowBoundsEvent.RESIZE, false, false, _bounds, _bounds = new Rectangle(x, y, width, height))); - }); - } - - _maximizable = initOptions.maximizable; - _minimizable = initOptions.minimizable; - _resizable = initOptions.resizable; - _systemChrome = initOptions.systemChrome; - _transparent = initOptions.transparent; - _type = initOptions.type; +package flash.display { + import flash.geom.Point; + import flash.geom.Rectangle; + import flash.events.NativeWindowBoundsEvent; + import flash.events.Event; + import flash.events.EventDispatcher; + import flash.desktop.NativeApplication; + import __ruffle__.stub_method; + import __ruffle__.stub_getter; + import __ruffle__.stub_setter; + import __ruffle__.stub_constructor; + + [API("661")] + public class NativeWindow extends EventDispatcher { + public const systemMaxSize:Point = new Point(2880, 2880); + public const systemMinSize:Point = new Point(1, 1); + public var minSize:Point = systemMinSize; + public var maxSize:Point = systemMaxSize; + public var title:String; + public var alwaysInFront:Boolean = true; + public var visible:Boolean = true; + + private var _bounds:Rectangle; + private var _maximizable:Boolean; + private var _minimizable:Boolean; + private var _resizable:Boolean; + private var _systemChrome:String; + private var _transparent:Boolean; + private var _type:String; + private var _closed:Boolean = false; + private var _stage:Stage; + + public function NativeWindow(initOptions:NativeWindowInitOptions, _stage:Stage = null) { + stub_constructor("flash.display.NativeWindow"); + NativeApplication.nativeApplication.openedWindows.push(this); + if (_stage) { + this._stage = _stage; + _stage.addEventListener(Event.RESIZE, function(e:Event):void { + dispatchEvent(new NativeWindowBoundsEvent(NativeWindowBoundsEvent.RESIZE, false, false, _bounds, _bounds = new Rectangle(x, y, width, height))); + }); + } + + _maximizable = initOptions.maximizable; + _minimizable = initOptions.minimizable; + _resizable = initOptions.resizable; + _systemChrome = initOptions.systemChrome; + _transparent = initOptions.transparent; + _type = initOptions.type; + } + + public function get width():Number { + stub_getter("flash.display.NativeWindow", "width"); + return _stage.stageWidth; + } + + public function set width(value:Number):void { + stub_setter("flash.display.NativeWindow", "width"); + _stage.stageWidth = value; + } + + public function get height():Number { + stub_getter("flash.display.NativeWindow", "height"); + return _stage.stageHeight; + } + + public function set height(value:Number):void { + stub_setter("flash.display.NativeWindow", "height"); + _stage.stageHeight = value; + } + + public function get x():Number { + stub_getter("flash.display.NativeWindow", "x"); + return _stage.x; + } + + public function set x(value:Number):void { + stub_setter("flash.display.NativeWindow", "x"); + } + + public function get y():Number { + stub_getter("flash.display.NativeWindow", "y"); + return _stage.y; + } + + public function set y(value:Number):void { + stub_setter("flash.display.NativeWindow", "y"); + } + + public function get bounds():Rectangle { + stub_getter("flash.display.NativeWindow", "bounds"); + return _bounds; + } + + public function set bounds(value:Rectangle):void { + stub_setter("flash.display.NativeWindow", "bounds"); + _bounds = value; + } + + public function get maximizable():Boolean { + stub_getter("flash.display.NativeWindow", "maximizable"); + return _maximizable; + } + + public function get minimizable():Boolean { + stub_getter("flash.display.NativeWindow", "minimizable"); + return _minimizable; + } + + public function get resizable():Boolean { + stub_getter("flash.display.NativeWindow", "resizable"); + return _resizable; + } + + public function get systemChrome():String { + stub_getter("flash.display.NativeWindow", "systemChrome"); + return _systemChrome; + } + + public function get transparent():Boolean { + stub_getter("flash.display.NativeWindow", "transparent"); + return _transparent; + } + + public function get type():String { + stub_getter("flash.display.NativeWindow", "type"); + return _type; + } + + public function get stage():Stage { + return _stage; + } + + // Activates this window. + public function activate():void { + stub_method("flash.display.NativeWindow", "activate"); + dispatchEvent(new Event(Event.ACTIVATE)); + } + + // Closes this window. + public function close():void { + stub_method("flash.display.NativeWindow", "close"); + if (dispatchEvent(new Event(Event.CLOSING, false, true))) { + _closed = true; + dispatchEvent(new Event(Event.CLOSE)); + dispatchEvent(new Event(Event.DEACTIVATE)); + } + + } + + // Converts a point in pixel coordinates relative to the origin of the window stage (a global point in terms of the display list), to a point on the virtual desktop. + public function globalToScreen(globalPoint:Point):Point { + stub_method("flash.display.NativeWindow", "globalToScreen"); + return null; + } + + // Returns a list of the NativeWindow objects that are owned by this window. + [API("671")] + public function listOwnedWindows():Vector. { + stub_method("flash.display.NativeWindow", "listOwnedWindows"); + return new Vector.(); + } + + // Maximizes this window. + public function maximize():void { + stub_method("flash.display.NativeWindow", "maximize"); + } + + // Minimizes this window. + public function minimize():void { + stub_method("flash.display.NativeWindow", "minimize"); + } + + // Triggers a visual cue through the operating system that an event of interest has occurred. + public function notifyUser(type:String):void { + stub_method("flash.display.NativeWindow", "notifyUser"); + } + + // Sends this window directly behind the specified window. + public function orderInBackOf(window:NativeWindow):Boolean { + stub_method("flash.display.NativeWindow", "orderInBackOf"); + return false; + } + + // Brings this window directly in front of the specified window. + public function orderInFrontOf(window:NativeWindow):Boolean { + stub_method("flash.display.NativeWindow", "orderInFrontOf"); + return false; + } + + // Sends this window behind any other visible windows. + public function orderToBack():Boolean { + stub_method("flash.display.NativeWindow", "orderToBack"); + return false; + } + + // Brings this window in front of any other visible windows. + public function orderToFront():Boolean { + stub_method("flash.display.NativeWindow", "orderToFront"); + return false; + } + + // Restores this window from either a minimized or a maximized state. + public function restore():void { + stub_method("flash.display.NativeWindow", "restore"); + } + + // Starts a system-controlled move of this window. + public function startMove():Boolean { + stub_method("flash.display.NativeWindow", "startMove"); + return false; + } + + // Starts a system-controlled resize operation of this window. + public function startResize(edgeOrCorner:String = "BR"):Boolean { + stub_method("flash.display.NativeWindow", "startResize"); + return false; + } + + public function get active():Boolean { + stub_getter("flash.display.NativeWindow", "active"); + return true; + } + + public function get closed():Boolean { + return this._closed; + } + + public function get displayState():String { + stub_getter("flash.display.NativeWindow", "displayState"); + return "normal"; + } + + [API("668")] + public function get isSupported():Boolean { + stub_getter("flash.display.NativeWindow", "isSupported"); + return false; + } + + [API("671")] + public function get owner():NativeWindow { + stub_getter("flash.display.NativeWindow", "owner"); + return this; + } + + [API("675")] + public function get renderMode():String { + stub_getter("flash.display.NativeWindow", "renderMode"); + return "auto"; + } + + public function get supportsMenu():Boolean { + stub_getter("flash.display.NativeWindow", "supportsMenu"); + return false; + } + + public function get supportsNotification():Boolean { + stub_getter("flash.display.NativeWindow", "supportsNotification"); + return false; + } + + public function get supportsTransparency():Boolean { + stub_getter("flash.display.NativeWindow", "supportsTransparency"); + return false; + } } - - public function get width():Number - { - stub_getter("flash.display.NativeWindow", "width"); - return _stage.stageWidth; - } - - public function set width(value:Number):void - { - stub_setter("flash.display.NativeWindow", "width"); - _stage.stageWidth = value; - } - - public function get height():Number - { - stub_getter("flash.display.NativeWindow", "height"); - return _stage.stageHeight; - } - - public function set height(value:Number):void - { - stub_setter("flash.display.NativeWindow", "height"); - _stage.stageHeight = value; - } - - public function get x():Number - { - stub_getter("flash.display.NativeWindow", "x"); - return _stage.x; - } - - public function set x(value:Number):void - { - stub_setter("flash.display.NativeWindow", "x"); - } - - public function get y():Number - { - stub_getter("flash.display.NativeWindow", "y"); - return _stage.y; - } - - public function set y(value:Number):void - { - stub_setter("flash.display.NativeWindow", "y"); - } - - public function get bounds():Rectangle - { - stub_getter("flash.display.NativeWindow", "bounds"); - return _bounds; - } - - public function set bounds(value:Rectangle):void - { - stub_setter("flash.display.NativeWindow", "bounds"); - _bounds = value; - } - - public function get maximizable():Boolean - { - stub_getter("flash.display.NativeWindow", "maximizable"); - return _maximizable; - } - - public function get minimizable():Boolean - { - stub_getter("flash.display.NativeWindow", "minimizable"); - return _minimizable; - } - - public function get resizable():Boolean - { - stub_getter("flash.display.NativeWindow", "resizable"); - return _resizable; - } - - public function get systemChrome():String - { - stub_getter("flash.display.NativeWindow", "systemChrome"); - return _systemChrome; - } - - public function get transparent():Boolean - { - stub_getter("flash.display.NativeWindow", "transparent"); - return _transparent; - } - - public function get type():String - { - stub_getter("flash.display.NativeWindow", "type"); - return _type; - } - - public function get stage():Stage - { - return _stage; - } - - // Activates this window. - public function activate():void - { - stub_method("flash.display.NativeWindow", "activate"); - dispatchEvent(new Event(Event.ACTIVATE)); - } - - // Closes this window. - public function close():void - { - stub_method("flash.display.NativeWindow", "close"); - if (dispatchEvent(new Event(Event.CLOSING, false, true))) - { - _closed = true; - dispatchEvent(new Event(Event.CLOSE)); - dispatchEvent(new Event(Event.DEACTIVATE)); - } - - } - - // Converts a point in pixel coordinates relative to the origin of the window stage (a global point in terms of the display list), to a point on the virtual desktop. - public function globalToScreen(globalPoint:Point):Point - { - stub_method("flash.display.NativeWindow", "globalToScreen"); - return null; - } - - // Returns a list of the NativeWindow objects that are owned by this window. - [API("671")] - public function listOwnedWindows():Vector. - { - stub_method("flash.display.NativeWindow", "listOwnedWindows"); - return new Vector.(); - } - - // Maximizes this window. - public function maximize():void - { - stub_method("flash.display.NativeWindow", "maximize"); - } - - // Minimizes this window. - public function minimize():void - { - stub_method("flash.display.NativeWindow", "minimize"); - } - - // Triggers a visual cue through the operating system that an event of interest has occurred. - public function notifyUser(type:String):void - { - stub_method("flash.display.NativeWindow", "notifyUser"); - } - - // Sends this window directly behind the specified window. - public function orderInBackOf(window:NativeWindow):Boolean - { - stub_method("flash.display.NativeWindow", "orderInBackOf"); - return false; - } - - // Brings this window directly in front of the specified window. - public function orderInFrontOf(window:NativeWindow):Boolean - { - stub_method("flash.display.NativeWindow", "orderInFrontOf"); - return false; - } - - // Sends this window behind any other visible windows. - public function orderToBack():Boolean - { - stub_method("flash.display.NativeWindow", "orderToBack"); - return false; - } - - // Brings this window in front of any other visible windows. - public function orderToFront():Boolean - { - stub_method("flash.display.NativeWindow", "orderToFront"); - return false; - } - - // Restores this window from either a minimized or a maximized state. - public function restore():void - { - stub_method("flash.display.NativeWindow", "restore"); - } - - // Starts a system-controlled move of this window. - public function startMove():Boolean - { - stub_method("flash.display.NativeWindow", "startMove"); - return false; - } - - // Starts a system-controlled resize operation of this window. - public function startResize(edgeOrCorner:String = "BR"):Boolean - { - stub_method("flash.display.NativeWindow", "startResize"); - return false; - } - - public function get active():Boolean - { - stub_getter("flash.display.NativeWindow", "active"); - return true; - } - - public function get closed():Boolean - { - return this._closed; - } - - public function get displayState():String - { - stub_getter("flash.display.NativeWindow", "displayState"); - return "normal"; - } - - [API("668")] - public function get isSupported():Boolean - { - stub_getter("flash.display.NativeWindow", "isSupported"); - return false; - } - - [API("671")] - public function get owner():NativeWindow - { - stub_getter("flash.display.NativeWindow", "owner"); - return this; - } - - [API("675")] - public function get renderMode():String - { - stub_getter("flash.display.NativeWindow", "renderMode"); - return "auto"; - } - - public function get supportsMenu():Boolean - { - stub_getter("flash.display.NativeWindow", "supportsMenu"); - return false; - } - - public function get supportsNotification():Boolean - { - stub_getter("flash.display.NativeWindow", "supportsNotification"); - return false; - } - - public function get supportsTransparency():Boolean - { - stub_getter("flash.display.NativeWindow", "supportsTransparency"); - return false; - } - } } diff --git a/core/src/avm2/globals/flash/display/NativeWindowDisplayState.as b/core/src/avm2/globals/flash/display/NativeWindowDisplayState.as index b405843c769b..b1c88a9b26ea 100644 --- a/core/src/avm2/globals/flash/display/NativeWindowDisplayState.as +++ b/core/src/avm2/globals/flash/display/NativeWindowDisplayState.as @@ -1,10 +1,8 @@ -package flash.display -{ - [API("661")] - public final class NativeWindowDisplayState - { - public static const MAXIMIZED:String = "maximized"; - public static const MINIMIZED:String = "minimized"; - public static const NORMAL:String = "normal"; - } +package flash.display { + [API("661")] + public final class NativeWindowDisplayState { + public static const MAXIMIZED:String = "maximized"; + public static const MINIMIZED:String = "minimized"; + public static const NORMAL:String = "normal"; + } } diff --git a/core/src/avm2/globals/flash/display/NativeWindowInitOptions.as b/core/src/avm2/globals/flash/display/NativeWindowInitOptions.as index af546213eda7..f7583d5ea159 100644 --- a/core/src/avm2/globals/flash/display/NativeWindowInitOptions.as +++ b/core/src/avm2/globals/flash/display/NativeWindowInitOptions.as @@ -3,48 +3,45 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.display -{ - [API("661")] - public class NativeWindowInitOptions - { - - // Specifies whether the window can be maximized by the user. - public var maximizable:Boolean; - - // Specifies whether the window can be minimized by the user. - public var minimizable:Boolean; - - // Specifies the NativeWindow object that should own any windows created with this NativeWindowInitOptions. - [API("671")] - public var owner:NativeWindow; - - // Specifies the render mode of the NativeWindow object created with this NativeWindowInitOptions. - [API("675")] - public var renderMode:String; - - // Specifies whether the window can be resized by the user. - public var resizable:Boolean; - - // Specifies whether system chrome is provided for the window. - public var systemChrome:String; - - // Specifies whether the window supports transparency and alpha blending against the desktop. - public var transparent:Boolean; - - // Specifies the type of the window to be created. - public var type:String; - - public function NativeWindowInitOptions() - { - systemChrome = NativeWindowSystemChrome.STANDARD; - type = NativeWindowType.NORMAL; - transparent = false; - owner = null; - resizable = true; - maximizable = true; - minimizable = true; - } +package flash.display { + [API("661")] + public class NativeWindowInitOptions { + + // Specifies whether the window can be maximized by the user. + public var maximizable:Boolean; + + // Specifies whether the window can be minimized by the user. + public var minimizable:Boolean; + + // Specifies the NativeWindow object that should own any windows created with this NativeWindowInitOptions. + [API("671")] + public var owner:NativeWindow; + + // Specifies the render mode of the NativeWindow object created with this NativeWindowInitOptions. + [API("675")] + public var renderMode:String; + + // Specifies whether the window can be resized by the user. + public var resizable:Boolean; - } + // Specifies whether system chrome is provided for the window. + public var systemChrome:String; + + // Specifies whether the window supports transparency and alpha blending against the desktop. + public var transparent:Boolean; + + // Specifies the type of the window to be created. + public var type:String; + + public function NativeWindowInitOptions() { + systemChrome = NativeWindowSystemChrome.STANDARD; + type = NativeWindowType.NORMAL; + transparent = false; + owner = null; + resizable = true; + maximizable = true; + minimizable = true; + } + + } } diff --git a/core/src/avm2/globals/flash/display/NativeWindowSystemChrome.as b/core/src/avm2/globals/flash/display/NativeWindowSystemChrome.as index bb0f17322ccf..a901da411743 100644 --- a/core/src/avm2/globals/flash/display/NativeWindowSystemChrome.as +++ b/core/src/avm2/globals/flash/display/NativeWindowSystemChrome.as @@ -1,10 +1,8 @@ -package flash.display -{ - [API("661")] - public final class NativeWindowSystemChrome - { - public static const ALTERNATE:String = "alternate"; - public static const NONE:String = "none"; - public static const STANDARD:String = "standard"; - } +package flash.display { + [API("661")] + public final class NativeWindowSystemChrome { + public static const ALTERNATE:String = "alternate"; + public static const NONE:String = "none"; + public static const STANDARD:String = "standard"; + } } diff --git a/core/src/avm2/globals/flash/display/NativeWindowType.as b/core/src/avm2/globals/flash/display/NativeWindowType.as index d2345581bb05..8229c3490659 100644 --- a/core/src/avm2/globals/flash/display/NativeWindowType.as +++ b/core/src/avm2/globals/flash/display/NativeWindowType.as @@ -1,8 +1,6 @@ -package flash.display -{ +package flash.display { [API("661")] - public final class NativeWindowType - { + public final class NativeWindowType { public static const LIGHTWEIGHT:String = "lightweight"; public static const NORMAL:String = "normal"; public static const UTILITY:String = "utility"; diff --git a/core/src/avm2/globals/flash/display/PNGEncoderOptions.as b/core/src/avm2/globals/flash/display/PNGEncoderOptions.as index ecea95ffc179..3dbfd151ea20 100644 --- a/core/src/avm2/globals/flash/display/PNGEncoderOptions.as +++ b/core/src/avm2/globals/flash/display/PNGEncoderOptions.as @@ -3,7 +3,7 @@ package flash.display { public final class PNGEncoderOptions { public var fastCompression:Boolean; - public function PNGEncoderOptions(fastCompression: Boolean = false) { + public function PNGEncoderOptions(fastCompression:Boolean = false) { this.fastCompression = fastCompression; } } diff --git a/core/src/avm2/globals/flash/display/PixelSnapping.as b/core/src/avm2/globals/flash/display/PixelSnapping.as index 7997b2b7a0e2..4063a6aa68de 100644 --- a/core/src/avm2/globals/flash/display/PixelSnapping.as +++ b/core/src/avm2/globals/flash/display/PixelSnapping.as @@ -1,7 +1,7 @@ package flash.display { public final class PixelSnapping { - public static const NEVER: String = "never"; - public static const ALWAYS: String = "always"; - public static const AUTO: String = "auto"; + public static const NEVER:String = "never"; + public static const ALWAYS:String = "always"; + public static const AUTO:String = "auto"; } } diff --git a/core/src/avm2/globals/flash/display/SWFVersion.as b/core/src/avm2/globals/flash/display/SWFVersion.as index f0793e5e3963..f7277f366437 100644 --- a/core/src/avm2/globals/flash/display/SWFVersion.as +++ b/core/src/avm2/globals/flash/display/SWFVersion.as @@ -1,16 +1,16 @@ package flash.display { public final class SWFVersion { - public static const FLASH1: uint = 1; - public static const FLASH2: uint = 2; - public static const FLASH3: uint = 3; - public static const FLASH4: uint = 4; - public static const FLASH5: uint = 5; - public static const FLASH6: uint = 6; - public static const FLASH7: uint = 7; - public static const FLASH8: uint = 8; - public static const FLASH9: uint = 9; - public static const FLASH10: uint = 10; - public static const FLASH11: uint = 11; - public static const FLASH12: uint = 12; + public static const FLASH1:uint = 1; + public static const FLASH2:uint = 2; + public static const FLASH3:uint = 3; + public static const FLASH4:uint = 4; + public static const FLASH5:uint = 5; + public static const FLASH6:uint = 6; + public static const FLASH7:uint = 7; + public static const FLASH8:uint = 8; + public static const FLASH9:uint = 9; + public static const FLASH10:uint = 10; + public static const FLASH11:uint = 11; + public static const FLASH12:uint = 12; } } diff --git a/core/src/avm2/globals/flash/display/Scene.as b/core/src/avm2/globals/flash/display/Scene.as index 6d5bb470d718..9425dad6f2ba 100644 --- a/core/src/avm2/globals/flash/display/Scene.as +++ b/core/src/avm2/globals/flash/display/Scene.as @@ -1,24 +1,24 @@ package flash.display { public final class Scene { - private var _name: String; - private var _labels: Array; - private var _numFrames: int; + private var _name:String; + private var _labels:Array; + private var _numFrames:int; - public function Scene(name: String, labels: Array, numFrames: int) { + public function Scene(name:String, labels:Array, numFrames:int) { this._name = name; this._labels = labels; this._numFrames = numFrames; } - public function get name(): String { + public function get name():String { return this._name; } - public function get labels(): Array { + public function get labels():Array { return this._labels; } - public function get numFrames(): int { + public function get numFrames():int { return this._numFrames; } } diff --git a/core/src/avm2/globals/flash/display/Shader.as b/core/src/avm2/globals/flash/display/Shader.as index 9bc3d5dbf93a..d58436006e9a 100644 --- a/core/src/avm2/globals/flash/display/Shader.as +++ b/core/src/avm2/globals/flash/display/Shader.as @@ -38,4 +38,3 @@ package flash.display { } } } - diff --git a/core/src/avm2/globals/flash/display/ShaderData.as b/core/src/avm2/globals/flash/display/ShaderData.as index ddf019f39f40..a1a8c06b1d2e 100644 --- a/core/src/avm2/globals/flash/display/ShaderData.as +++ b/core/src/avm2/globals/flash/display/ShaderData.as @@ -1,6 +1,6 @@ package flash.display { import flash.utils.ByteArray; - + [Ruffle(InstanceAllocator)] public final dynamic class ShaderData { public function ShaderData(bytecode:ByteArray) { @@ -10,4 +10,3 @@ package flash.display { private native function init(bytecode:ByteArray); } } - diff --git a/core/src/avm2/globals/flash/display/ShaderInput.as b/core/src/avm2/globals/flash/display/ShaderInput.as index 2fa8f9f55dbd..de941ef88a21 100644 --- a/core/src/avm2/globals/flash/display/ShaderInput.as +++ b/core/src/avm2/globals/flash/display/ShaderInput.as @@ -1,19 +1,19 @@ package flash.display { public final dynamic class ShaderInput { [Ruffle(NativeAccessible)] - private var _channels: int; + private var _channels:int; [Ruffle(NativeAccessible)] - private var _height: int; + private var _height:int; [Ruffle(NativeAccessible)] - private var _index: int; + private var _index:int; [Ruffle(NativeAccessible)] - private var _input: Object; + private var _input:Object; [Ruffle(NativeAccessible)] - private var _width: int; + private var _width:int; public function get channels():int { return _channels; diff --git a/core/src/avm2/globals/flash/display/ShaderJob.as b/core/src/avm2/globals/flash/display/ShaderJob.as index b3b103236648..e37f3c3a75b5 100644 --- a/core/src/avm2/globals/flash/display/ShaderJob.as +++ b/core/src/avm2/globals/flash/display/ShaderJob.as @@ -16,7 +16,7 @@ package flash.display { [Ruffle(NativeAccessible)] private var _height:int; - + public function ShaderJob(shader:Shader = null, target:Object = null, width:int = 0, height:int = 0) { this._shader = shader; this._target = target; @@ -26,7 +26,7 @@ package flash.display { } public function cancel():void { - stub_method("flash.display.ShaderJob", "cancel") + stub_method("flash.display.ShaderJob", "cancel"); } public native function start(waitForCompletion:Boolean = false):void; @@ -48,7 +48,7 @@ package flash.display { } public function get progress():Number { - stub_getter("flash.display.ShaderJob", "progress") + stub_getter("flash.display.ShaderJob", "progress"); return 0; } diff --git a/core/src/avm2/globals/flash/display/ShaderParameterType.as b/core/src/avm2/globals/flash/display/ShaderParameterType.as index 37dec61174ba..f23aaf94bb5a 100644 --- a/core/src/avm2/globals/flash/display/ShaderParameterType.as +++ b/core/src/avm2/globals/flash/display/ShaderParameterType.as @@ -1,19 +1,19 @@ package flash.display { public final class ShaderParameterType { - public static const FLOAT: String = "float"; - public static const FLOAT2: String = "float2"; - public static const FLOAT3: String = "float3"; - public static const FLOAT4: String = "float4"; - public static const INT: String = "int"; - public static const INT2: String = "int2"; - public static const INT3: String = "int3"; - public static const INT4: String = "int4"; - public static const BOOL: String = "bool"; - public static const BOOL2: String = "bool2"; - public static const BOOL3: String = "bool3"; - public static const BOOL4: String = "bool4"; - public static const MATRIX2X2: String = "matrix2x2"; - public static const MATRIX3X3: String = "matrix3x3"; - public static const MATRIX4X4: String = "matrix4x4"; + public static const FLOAT:String = "float"; + public static const FLOAT2:String = "float2"; + public static const FLOAT3:String = "float3"; + public static const FLOAT4:String = "float4"; + public static const INT:String = "int"; + public static const INT2:String = "int2"; + public static const INT3:String = "int3"; + public static const INT4:String = "int4"; + public static const BOOL:String = "bool"; + public static const BOOL2:String = "bool2"; + public static const BOOL3:String = "bool3"; + public static const BOOL4:String = "bool4"; + public static const MATRIX2X2:String = "matrix2x2"; + public static const MATRIX3X3:String = "matrix3x3"; + public static const MATRIX4X4:String = "matrix4x4"; } } diff --git a/core/src/avm2/globals/flash/display/ShaderPrecision.as b/core/src/avm2/globals/flash/display/ShaderPrecision.as index 3dc3ee51452b..3c19467ce80f 100644 --- a/core/src/avm2/globals/flash/display/ShaderPrecision.as +++ b/core/src/avm2/globals/flash/display/ShaderPrecision.as @@ -1,6 +1,6 @@ package flash.display { public final class ShaderPrecision { - public static const FULL: String = "full"; - public static const FAST: String = "fast"; + public static const FULL:String = "full"; + public static const FAST:String = "fast"; } } diff --git a/core/src/avm2/globals/flash/display/SimpleButton.as b/core/src/avm2/globals/flash/display/SimpleButton.as index b3215655dcc9..6df55d545430 100644 --- a/core/src/avm2/globals/flash/display/SimpleButton.as +++ b/core/src/avm2/globals/flash/display/SimpleButton.as @@ -5,11 +5,11 @@ package flash.display { import flash.geom.Matrix; import flash.display.DisplayObject; import flash.media.SoundTransform; - + [Ruffle(InstanceAllocator)] public class SimpleButton extends InteractiveObject { public function SimpleButton(upState:DisplayObject = null, overState:DisplayObject = null, downState:DisplayObject = null, hitTestState:DisplayObject = null) { - this.init(upState, overState, downState, hitTestState) + this.init(upState, overState, downState, hitTestState); } private native function init(upState:DisplayObject, overState:DisplayObject, downState:DisplayObject, hitTestState:DisplayObject):void; diff --git a/core/src/avm2/globals/flash/display/SpreadMethod.as b/core/src/avm2/globals/flash/display/SpreadMethod.as index eb42a46fd1df..8f74d4704457 100644 --- a/core/src/avm2/globals/flash/display/SpreadMethod.as +++ b/core/src/avm2/globals/flash/display/SpreadMethod.as @@ -1,7 +1,7 @@ package flash.display { public final class SpreadMethod { - public static const PAD: String = "pad"; - public static const REFLECT: String = "reflect"; - public static const REPEAT: String = "repeat"; + public static const PAD:String = "pad"; + public static const REFLECT:String = "reflect"; + public static const REPEAT:String = "repeat"; } } diff --git a/core/src/avm2/globals/flash/display/Stage.as b/core/src/avm2/globals/flash/display/Stage.as index 43cd1231bb58..571264051d24 100644 --- a/core/src/avm2/globals/flash/display/Stage.as +++ b/core/src/avm2/globals/flash/display/Stage.as @@ -157,7 +157,7 @@ package flash.display { throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071); } - override public function set transform(value: Transform):void { + override public function set transform(value:Transform):void { throw new IllegalOperationError("Error #2071: The Stage class does not implement this property or method.", 2071); } @@ -217,7 +217,7 @@ package flash.display { return this._fullScreenSourceRect; } - public function set fullScreenSourceRect(rect: Rectangle):void { + public function set fullScreenSourceRect(rect:Rectangle):void { stub_setter("flash.display.Stage", "fullScreenSourceRect"); this._fullScreenSourceRect = rect; } @@ -240,7 +240,7 @@ package flash.display { public native function set stageFocusRect(value:Boolean):void; [API("670")] - public function get softKeyboardRect() : Rectangle { + public function get softKeyboardRect():Rectangle { stub_getter("flash.display.Stage", "softKeyboardRect"); // This is technically a valid implementation most of the time, // as 0x0 Rect is the expected value with no soft keyboard. @@ -266,7 +266,8 @@ package flash.display { } public function set colorCorrection(value:String):void { stub_setter("flash.display.Stage", "colorCorrection"); - if (value == null) throw new TypeError("Error #2007: Parameter colorCorrection must be non-null.", 2007); + if (value == null) + throw new TypeError("Error #2007: Parameter colorCorrection must be non-null.", 2007); this._colorCorrection = value; } diff --git a/core/src/avm2/globals/flash/display/StageAlign.as b/core/src/avm2/globals/flash/display/StageAlign.as index b4285132f966..5d1391bb6631 100644 --- a/core/src/avm2/globals/flash/display/StageAlign.as +++ b/core/src/avm2/globals/flash/display/StageAlign.as @@ -1,12 +1,12 @@ package flash.display { public final class StageAlign { - public static const TOP: String = "T"; - public static const LEFT: String = "L"; - public static const BOTTOM: String = "B"; - public static const RIGHT: String = "R"; - public static const TOP_LEFT: String = "TL"; - public static const TOP_RIGHT: String = "TR"; - public static const BOTTOM_LEFT: String = "BL"; - public static const BOTTOM_RIGHT: String = "BR"; + public static const TOP:String = "T"; + public static const LEFT:String = "L"; + public static const BOTTOM:String = "B"; + public static const RIGHT:String = "R"; + public static const TOP_LEFT:String = "TL"; + public static const TOP_RIGHT:String = "TR"; + public static const BOTTOM_LEFT:String = "BL"; + public static const BOTTOM_RIGHT:String = "BR"; } } diff --git a/core/src/avm2/globals/flash/display/StageAspectRatio.as b/core/src/avm2/globals/flash/display/StageAspectRatio.as index d4c61ef1c12c..ff506aced0aa 100644 --- a/core/src/avm2/globals/flash/display/StageAspectRatio.as +++ b/core/src/avm2/globals/flash/display/StageAspectRatio.as @@ -1,8 +1,6 @@ -package flash.display -{ +package flash.display { [API("668")] - public final class StageAspectRatio - { + public final class StageAspectRatio { [API("681")] public static const ANY:String = "any"; public static const LANDSCAPE:String = "landscape"; diff --git a/core/src/avm2/globals/flash/display/StageDisplayState.as b/core/src/avm2/globals/flash/display/StageDisplayState.as index 69ac1ceb08a6..1779648632bd 100644 --- a/core/src/avm2/globals/flash/display/StageDisplayState.as +++ b/core/src/avm2/globals/flash/display/StageDisplayState.as @@ -1,7 +1,7 @@ package flash.display { public final class StageDisplayState { - public static const FULL_SCREEN: String = "fullScreen"; - public static const FULL_SCREEN_INTERACTIVE: String = "fullScreenInteractive"; - public static const NORMAL: String = "normal"; + public static const FULL_SCREEN:String = "fullScreen"; + public static const FULL_SCREEN_INTERACTIVE:String = "fullScreenInteractive"; + public static const NORMAL:String = "normal"; } } diff --git a/core/src/avm2/globals/flash/display/StageOrientation.as b/core/src/avm2/globals/flash/display/StageOrientation.as index 730759b938db..f6a96accad6a 100644 --- a/core/src/avm2/globals/flash/display/StageOrientation.as +++ b/core/src/avm2/globals/flash/display/StageOrientation.as @@ -1,8 +1,6 @@ -package flash.display -{ +package flash.display { [API("668")] - public final class StageOrientation - { + public final class StageOrientation { public static const DEFAULT:String = "default"; public static const ROTATED_LEFT:String = "rotatedLeft"; public static const ROTATED_RIGHT:String = "rotatedRight"; diff --git a/core/src/avm2/globals/flash/display/StageQuality.as b/core/src/avm2/globals/flash/display/StageQuality.as index 3e4057e1e686..c5c632e365c3 100644 --- a/core/src/avm2/globals/flash/display/StageQuality.as +++ b/core/src/avm2/globals/flash/display/StageQuality.as @@ -1,12 +1,12 @@ package flash.display { public final class StageQuality { - public static const LOW: String = "low"; - public static const MEDIUM: String = "medium"; - public static const HIGH: String = "high"; - public static const BEST: String = "best"; - public static const HIGH_8X8: String = "8x8"; - public static const HIGH_8X8_LINEAR: String = "8x8linear"; - public static const HIGH_16X16: String = "16x16"; - public static const HIGH_16X16_LINEAR: String = "16x16linear"; + public static const LOW:String = "low"; + public static const MEDIUM:String = "medium"; + public static const HIGH:String = "high"; + public static const BEST:String = "best"; + public static const HIGH_8X8:String = "8x8"; + public static const HIGH_8X8_LINEAR:String = "8x8linear"; + public static const HIGH_16X16:String = "16x16"; + public static const HIGH_16X16_LINEAR:String = "16x16linear"; } } diff --git a/core/src/avm2/globals/flash/display/StageScaleMode.as b/core/src/avm2/globals/flash/display/StageScaleMode.as index 2b338e77d421..71f51f2272e0 100644 --- a/core/src/avm2/globals/flash/display/StageScaleMode.as +++ b/core/src/avm2/globals/flash/display/StageScaleMode.as @@ -1,8 +1,8 @@ package flash.display { public final class StageScaleMode { - public static const SHOW_ALL: String = "showAll"; - public static const EXACT_FIT: String = "exactFit"; - public static const NO_BORDER: String = "noBorder"; - public static const NO_SCALE: String = "noScale"; + public static const SHOW_ALL:String = "showAll"; + public static const EXACT_FIT:String = "exactFit"; + public static const NO_BORDER:String = "noBorder"; + public static const NO_SCALE:String = "noScale"; } } diff --git a/core/src/avm2/globals/flash/display/TriangleCulling.as b/core/src/avm2/globals/flash/display/TriangleCulling.as index 932a427410d3..cf2bf63f56bb 100644 --- a/core/src/avm2/globals/flash/display/TriangleCulling.as +++ b/core/src/avm2/globals/flash/display/TriangleCulling.as @@ -1,7 +1,7 @@ package flash.display { public final class TriangleCulling { - public static const NONE: String = "none"; - public static const POSITIVE: String = "positive"; - public static const NEGATIVE: String = "negative"; + public static const NONE:String = "none"; + public static const POSITIVE:String = "positive"; + public static const NEGATIVE:String = "negative"; } } diff --git a/core/src/avm2/globals/flash/display3D/Context3D.as b/core/src/avm2/globals/flash/display3D/Context3D.as index 2c21072e8c15..f26b0b561e2c 100644 --- a/core/src/avm2/globals/flash/display3D/Context3D.as +++ b/core/src/avm2/globals/flash/display3D/Context3D.as @@ -16,7 +16,7 @@ package flash.display3D { public native function createIndexBuffer(numIndices:int, bufferUsage:String = "staticDraw"):IndexBuffer3D; public native function createVertexBuffer(numVertices:int, data32PerVertex:int, bufferUsage:String = "staticDraw"):VertexBuffer3D; public native function configureBackBuffer( - width:int, height:int, antiAlias:int, enableDepthAndStencil:Boolean = true, wantsBestResolution:Boolean = false, wantsBestResolutionOnBrowserZoom:Boolean = false + width:int, height:int, antiAlias:int, enableDepthAndStencil:Boolean = true, wantsBestResolution:Boolean = false, wantsBestResolutionOnBrowserZoom:Boolean = false ):void; public native function setVertexBufferAt(index:int, buffer:VertexBuffer3D, bufferOffset:int = 0, format:String = "float4"):void; public native function createProgram():Program3D; @@ -71,12 +71,12 @@ package flash.display3D { public native function setRenderToTexture(texture:TextureBase, enableDepthAndStencil:Boolean = false, antiAlias:int = 0, surfaceSelector:int = 0, colorOutputIndex:int = 0):void; public function setStencilActions( - triangleFace:String = "frontAndBack", - compareMode:String = "always", - actionOnBothPass:String = "keep", - actionOnDepthFail:String = "keep", - actionOnDepthPassStencilFail:String = "keep" - ):void { + triangleFace:String = "frontAndBack", + compareMode:String = "always", + actionOnBothPass:String = "keep", + actionOnDepthFail:String = "keep", + actionOnDepthPassStencilFail:String = "keep" + ):void { stub_method("flash.display3D.Context3D", "setStencilActions"); } diff --git a/core/src/avm2/globals/flash/display3D/Context3DBlendFactor.as b/core/src/avm2/globals/flash/display3D/Context3DBlendFactor.as index 09b4e271e261..466816378825 100644 --- a/core/src/avm2/globals/flash/display3D/Context3DBlendFactor.as +++ b/core/src/avm2/globals/flash/display3D/Context3DBlendFactor.as @@ -3,42 +3,38 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.display3D -{ - - - public final class Context3DBlendFactor - { +package flash.display3D { + + public final class Context3DBlendFactor { // The blend factor is (Da,Da,Da,Da), where Da is the alpha component of the fragment color computed by the pixel program. public static const DESTINATION_ALPHA:String = "destinationAlpha"; - + // The blend factor is (Dr,Dg,Db,Da), where Dr/g/b/a is the corresponding component of the current color in the color buffer. public static const DESTINATION_COLOR:String = "destinationColor"; - + // The blend factor is (1,1,1,1). public static const ONE:String = "one"; - + // The blend factor is (1-Da,1-Da,1-Da,1-Da), where Da is the alpha component of the current color in the color buffer. public static const ONE_MINUS_DESTINATION_ALPHA:String = "oneMinusDestinationAlpha"; - + // The blend factor is (1-Dr,1-Dg,1-Db,1-Da), where Dr/g/b/a is the corresponding component of the current color in the color buffer. public static const ONE_MINUS_DESTINATION_COLOR:String = "oneMinusDestinationColor"; - + // The blend factor is (1-Sa,1-Sa,1-Sa,1-Sa), where Sa is the alpha component of the fragment color computed by the pixel program. public static const ONE_MINUS_SOURCE_ALPHA:String = "oneMinusSourceAlpha"; - + // The blend factor is (1-Sr,1-Sg,1-Sb,1-Sa), where Sr/g/b/a is the corresponding component of the fragment color computed by the pixel program. public static const ONE_MINUS_SOURCE_COLOR:String = "oneMinusSourceColor"; - + // The blend factor is (Sa,Sa,Sa,Sa), where Sa is the alpha component of the fragment color computed by the pixel program. public static const SOURCE_ALPHA:String = "sourceAlpha"; - + // The blend factor is (Sr,Sg,Sb,Sa), where Sr/g/b/a is the corresponding component of the fragment color computed by the pixel program. public static const SOURCE_COLOR:String = "sourceColor"; - + // The blend factor is (0,0,0,0). public static const ZERO:String = "zero"; - - + } } diff --git a/core/src/avm2/globals/flash/display3D/Context3DBufferUsage.as b/core/src/avm2/globals/flash/display3D/Context3DBufferUsage.as index 1b2a327c2000..287119313aa6 100644 --- a/core/src/avm2/globals/flash/display3D/Context3DBufferUsage.as +++ b/core/src/avm2/globals/flash/display3D/Context3DBufferUsage.as @@ -3,12 +3,11 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.display3D -{ +package flash.display3D { - [API("692")] // the docs say 694, that's wrong - public final class Context3DBufferUsage - { + [API("692")] + // the docs say 694, that's wrong + public final class Context3DBufferUsage { // Indicates the buffer will be used for drawing and be updated frequently public static const DYNAMIC_DRAW:String = "dynamicDraw"; diff --git a/core/src/avm2/globals/flash/display3D/Context3DClearMask.as b/core/src/avm2/globals/flash/display3D/Context3DClearMask.as index 15df915d330b..19b1d41ef9df 100644 --- a/core/src/avm2/globals/flash/display3D/Context3DClearMask.as +++ b/core/src/avm2/globals/flash/display3D/Context3DClearMask.as @@ -3,19 +3,17 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.display3D -{ +package flash.display3D { - public final class Context3DClearMask - { + public final class Context3DClearMask { // Clear all buffers. public static const ALL:int = COLOR | DEPTH | STENCIL; // Clear only the color buffer. - public static const COLOR:int = 1 << 0; + public static const COLOR:int = 1 << 0; // Clear only the depth buffer. - public static const DEPTH:int = 1 << 1; + public static const DEPTH:int = 1 << 1; // Clear only the stencil buffer. public static const STENCIL:int = 1 << 2; diff --git a/core/src/avm2/globals/flash/display3D/Context3DCompareMode.as b/core/src/avm2/globals/flash/display3D/Context3DCompareMode.as index d9126d85dc63..013fe7782c1b 100644 --- a/core/src/avm2/globals/flash/display3D/Context3DCompareMode.as +++ b/core/src/avm2/globals/flash/display3D/Context3DCompareMode.as @@ -3,11 +3,9 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.display3D -{ +package flash.display3D { - public final class Context3DCompareMode - { + public final class Context3DCompareMode { // The comparison always evaluates as true. public static const ALWAYS:String = "always"; diff --git a/core/src/avm2/globals/flash/display3D/Context3DMipFilter.as b/core/src/avm2/globals/flash/display3D/Context3DMipFilter.as index 80b022328ae8..905c4089de39 100644 --- a/core/src/avm2/globals/flash/display3D/Context3DMipFilter.as +++ b/core/src/avm2/globals/flash/display3D/Context3DMipFilter.as @@ -3,12 +3,10 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.display3D -{ +package flash.display3D { [API("686")] - public final class Context3DMipFilter - { + public final class Context3DMipFilter { // Select the two closest MIP levels and linearly blend between them (the highest quality mode, but has some performance cost). public static const MIPLINEAR:String = "miplinear"; diff --git a/core/src/avm2/globals/flash/display3D/Context3DProfile.as b/core/src/avm2/globals/flash/display3D/Context3DProfile.as index 837dcb3a0cec..867fdee227ec 100644 --- a/core/src/avm2/globals/flash/display3D/Context3DProfile.as +++ b/core/src/avm2/globals/flash/display3D/Context3DProfile.as @@ -3,12 +3,10 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.display3D -{ +package flash.display3D { [API("682")] - public final class Context3DProfile - { + public final class Context3DProfile { // Use the default feature support profile. public static const BASELINE:String = "baseline"; @@ -28,7 +26,8 @@ package flash.display3D public static const STANDARD_CONSTRAINED:String = "standardConstrained"; // Use standard extended profile to target GPUs which support AGAL3 and instanced drawing feature. - [API("704")] // the docs say 706, that's wrong + [API("704")] + // the docs say 706, that's wrong public static const STANDARD_EXTENDED:String = "standardExtended"; } diff --git a/core/src/avm2/globals/flash/display3D/Context3DProgramType.as b/core/src/avm2/globals/flash/display3D/Context3DProgramType.as index 3a935e078f07..81b53b7e5d6f 100644 --- a/core/src/avm2/globals/flash/display3D/Context3DProgramType.as +++ b/core/src/avm2/globals/flash/display3D/Context3DProgramType.as @@ -3,18 +3,15 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.display3D -{ - +package flash.display3D { + [API("674")] - public final class Context3DProgramType - { + public final class Context3DProgramType { // A fragment (or pixel) program. public static const FRAGMENT:String = "fragment"; - + // A vertex program. public static const VERTEX:String = "vertex"; - - + } } diff --git a/core/src/avm2/globals/flash/display3D/Context3DRenderMode.as b/core/src/avm2/globals/flash/display3D/Context3DRenderMode.as index d4cadb834ca4..f96ba744418c 100644 --- a/core/src/avm2/globals/flash/display3D/Context3DRenderMode.as +++ b/core/src/avm2/globals/flash/display3D/Context3DRenderMode.as @@ -3,12 +3,10 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.display3D -{ +package flash.display3D { [API("674")] - public final class Context3DRenderMode - { + public final class Context3DRenderMode { // Automatically choose rendering engine. public static const AUTO:String = "auto"; diff --git a/core/src/avm2/globals/flash/display3D/Context3DStencilAction.as b/core/src/avm2/globals/flash/display3D/Context3DStencilAction.as index aca2ed6460b4..e86b63f91b0a 100644 --- a/core/src/avm2/globals/flash/display3D/Context3DStencilAction.as +++ b/core/src/avm2/globals/flash/display3D/Context3DStencilAction.as @@ -3,12 +3,10 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.display3D -{ +package flash.display3D { [API("674")] - public final class Context3DStencilAction - { + public final class Context3DStencilAction { // Decrement the stencil buffer value, clamping at 0, the minimum value. public static const DECREMENT_SATURATE:String = "decrementSaturate"; diff --git a/core/src/avm2/globals/flash/display3D/Context3DTextureFilter.as b/core/src/avm2/globals/flash/display3D/Context3DTextureFilter.as index 5ab8a7435770..2fb70d5262eb 100644 --- a/core/src/avm2/globals/flash/display3D/Context3DTextureFilter.as +++ b/core/src/avm2/globals/flash/display3D/Context3DTextureFilter.as @@ -3,12 +3,10 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.display3D -{ +package flash.display3D { [API("686")] - public final class Context3DTextureFilter - { + public final class Context3DTextureFilter { // Use anisotropic filter with radio 16 when upsampling textures [API("698")] public static const ANISOTROPIC16X:String = "anisotropic16x"; diff --git a/core/src/avm2/globals/flash/display3D/Context3DTextureFormat.as b/core/src/avm2/globals/flash/display3D/Context3DTextureFormat.as index 46e3eb6db138..6c3a4eeb5a73 100644 --- a/core/src/avm2/globals/flash/display3D/Context3DTextureFormat.as +++ b/core/src/avm2/globals/flash/display3D/Context3DTextureFormat.as @@ -3,12 +3,10 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.display3D -{ +package flash.display3D { [API("674")] - public final class Context3DTextureFormat - { + public final class Context3DTextureFormat { public static const BGRA:String = "bgra"; // 16 bit, bgra packed as 4:4:4:4 diff --git a/core/src/avm2/globals/flash/display3D/Context3DTriangleFace.as b/core/src/avm2/globals/flash/display3D/Context3DTriangleFace.as index cd6e5d7a1dc1..60de0c867af2 100644 --- a/core/src/avm2/globals/flash/display3D/Context3DTriangleFace.as +++ b/core/src/avm2/globals/flash/display3D/Context3DTriangleFace.as @@ -3,12 +3,10 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.display3D -{ +package flash.display3D { [API("674")] - public final class Context3DTriangleFace - { + public final class Context3DTriangleFace { public static const BACK:String = "back"; public static const FRONT:String = "front"; diff --git a/core/src/avm2/globals/flash/display3D/Context3DVertexBufferFormat.as b/core/src/avm2/globals/flash/display3D/Context3DVertexBufferFormat.as index e541834dd9d8..e1fce46e05d2 100644 --- a/core/src/avm2/globals/flash/display3D/Context3DVertexBufferFormat.as +++ b/core/src/avm2/globals/flash/display3D/Context3DVertexBufferFormat.as @@ -3,12 +3,10 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.display3D -{ +package flash.display3D { [API("674")] - public final class Context3DVertexBufferFormat - { + public final class Context3DVertexBufferFormat { public static const BYTES_4:String = "bytes4"; public static const FLOAT_1:String = "float1"; diff --git a/core/src/avm2/globals/flash/display3D/Context3DWrapMode.as b/core/src/avm2/globals/flash/display3D/Context3DWrapMode.as index 0481eba7774e..c85154751f71 100644 --- a/core/src/avm2/globals/flash/display3D/Context3DWrapMode.as +++ b/core/src/avm2/globals/flash/display3D/Context3DWrapMode.as @@ -3,24 +3,24 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.display3D -{ +package flash.display3D { [API("686")] - public final class Context3DWrapMode - { + public final class Context3DWrapMode { // Clamp texture coordinates outside the 0..1 range. public static const CLAMP:String = "clamp"; // Clamp in U axis but Repeat in V axis. - [API("696")] // the docs don't mention it, but this is correct + [API("696")] + // the docs don't mention it, but this is correct public static const CLAMP_U_REPEAT_V:String = "clamp_u_repeat_v"; // Repeat (tile) texture coordinates outside the 0..1 range. public static const REPEAT:String = "repeat"; // Repeat in U axis but Clamp in V axis. - [API("696")] // the docs don't mention it, but this is correct + [API("696")] + // the docs don't mention it, but this is correct public static const REPEAT_U_CLAMP_V:String = "repeat_u_clamp_v"; } diff --git a/core/src/avm2/globals/flash/display3D/IndexBuffer3D.as b/core/src/avm2/globals/flash/display3D/IndexBuffer3D.as index ffc310552f0d..733a995b8e89 100644 --- a/core/src/avm2/globals/flash/display3D/IndexBuffer3D.as +++ b/core/src/avm2/globals/flash/display3D/IndexBuffer3D.as @@ -1,7 +1,7 @@ package flash.display3D { import __ruffle__.stub_method; import flash.utils.ByteArray; - + [Ruffle(InstanceAllocator)] [API("674")] public final class IndexBuffer3D { diff --git a/core/src/avm2/globals/flash/display3D/VertexBuffer3D.as b/core/src/avm2/globals/flash/display3D/VertexBuffer3D.as index 5ead5826de97..34cb0679f6e4 100644 --- a/core/src/avm2/globals/flash/display3D/VertexBuffer3D.as +++ b/core/src/avm2/globals/flash/display3D/VertexBuffer3D.as @@ -1,12 +1,12 @@ package flash.display3D { import __ruffle__.stub_method; import flash.utils.ByteArray; - + [Ruffle(InstanceAllocator)] [API("674")] public final class VertexBuffer3D { - public native function uploadFromByteArray(data:ByteArray, byteArrayOffset:int, startVertex:int, numVertices:int):void - public native function uploadFromVector(data:Vector., startVertex:int, numVertices:int):void + public native function uploadFromByteArray(data:ByteArray, byteArrayOffset:int, startVertex:int, numVertices:int):void; + public native function uploadFromVector(data:Vector., startVertex:int, numVertices:int):void; public function dispose():void { stub_method("flash.display3D.VertexBuffer3D", "dispose"); diff --git a/core/src/avm2/globals/flash/display3D/textures/CubeTexture.as b/core/src/avm2/globals/flash/display3D/textures/CubeTexture.as index 5a77b027e390..9866e7c120f6 100644 --- a/core/src/avm2/globals/flash/display3D/textures/CubeTexture.as +++ b/core/src/avm2/globals/flash/display3D/textures/CubeTexture.as @@ -2,7 +2,7 @@ package flash.display3D.textures { import flash.display.BitmapData; import flash.utils.ByteArray; import __ruffle__.stub_method; - + public final class CubeTexture extends TextureBase { [API("674")] public native function uploadFromBitmapData(source:BitmapData, side:uint, miplevel:uint = 0):void; diff --git a/core/src/avm2/globals/flash/display3D/textures/RectangleTexture.as b/core/src/avm2/globals/flash/display3D/textures/RectangleTexture.as index acc47cf55eaa..7ab9fdc015c9 100644 --- a/core/src/avm2/globals/flash/display3D/textures/RectangleTexture.as +++ b/core/src/avm2/globals/flash/display3D/textures/RectangleTexture.as @@ -1,7 +1,7 @@ -package flash.display3D.textures { +package flash.display3D.textures { import flash.display.BitmapData; import flash.utils.ByteArray; - + public final class RectangleTexture extends TextureBase { [API("690")] public native function uploadFromBitmapData(source:BitmapData):void; diff --git a/core/src/avm2/globals/flash/display3D/textures/Texture.as b/core/src/avm2/globals/flash/display3D/textures/Texture.as index 1af2f0e21a96..cb1356746760 100644 --- a/core/src/avm2/globals/flash/display3D/textures/Texture.as +++ b/core/src/avm2/globals/flash/display3D/textures/Texture.as @@ -21,8 +21,7 @@ package flash.display3D.textures { self.uploadCompressedTextureFromByteArrayInternal(copiedData, byteArrayOffset); self.dispatchEvent(new Event("textureReady")); }, 0); - } - else { + } else { this.uploadCompressedTextureFromByteArrayInternal(data, byteArrayOffset); } } diff --git a/core/src/avm2/globals/flash/errors/EOFError.as b/core/src/avm2/globals/flash/errors/EOFError.as index 188f61513c66..6e4fc9384fc0 100644 --- a/core/src/avm2/globals/flash/errors/EOFError.as +++ b/core/src/avm2/globals/flash/errors/EOFError.as @@ -3,18 +3,14 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.errors -{ +package flash.errors { - public dynamic class EOFError extends IOError - { + public dynamic class EOFError extends IOError { prototype.name = "EOFError"; - public function EOFError(message:String = "", id:int = 0) - { + public function EOFError(message:String = "", id:int = 0) { super(message, id); } } } - diff --git a/core/src/avm2/globals/flash/errors/IOError.as b/core/src/avm2/globals/flash/errors/IOError.as index 04641a856c50..b231f5b08517 100644 --- a/core/src/avm2/globals/flash/errors/IOError.as +++ b/core/src/avm2/globals/flash/errors/IOError.as @@ -3,18 +3,14 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.errors -{ +package flash.errors { - public dynamic class IOError extends Error - { + public dynamic class IOError extends Error { prototype.name = "IOError"; - public function IOError(message:String = "", id:int = 0) - { + public function IOError(message:String = "", id:int = 0) { super(message, id); } } } - diff --git a/core/src/avm2/globals/flash/errors/IllegalOperationError.as b/core/src/avm2/globals/flash/errors/IllegalOperationError.as index 89bf4c060236..887e4cd1631a 100644 --- a/core/src/avm2/globals/flash/errors/IllegalOperationError.as +++ b/core/src/avm2/globals/flash/errors/IllegalOperationError.as @@ -1,13 +1,13 @@ package flash.errors { - public dynamic class IllegalOperationError extends Error { - IllegalOperationError.prototype.name = "IllegalOperationError" + public dynamic class IllegalOperationError extends Error { + IllegalOperationError.prototype.name = "IllegalOperationError"; - // Despite what the documentation claims, user code can pass in an 'id' - // parameter (which defaults to 0) - public function IllegalOperationError(message:String = "", id:int = 0) { - super(message, id); - // Note that we do *not* set 'this.name' here (unlike in other error classes) - // to match the Flash behavior - } - } + // Despite what the documentation claims, user code can pass in an 'id' + // parameter (which defaults to 0) + public function IllegalOperationError(message:String = "", id:int = 0) { + super(message, id); + // Note that we do *not* set 'this.name' here (unlike in other error classes) + // to match the Flash behavior + } + } } diff --git a/core/src/avm2/globals/flash/errors/InvalidSWFError.as b/core/src/avm2/globals/flash/errors/InvalidSWFError.as index 4ac7641ea38e..c0f9ada20f79 100644 --- a/core/src/avm2/globals/flash/errors/InvalidSWFError.as +++ b/core/src/avm2/globals/flash/errors/InvalidSWFError.as @@ -3,18 +3,14 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.errors -{ +package flash.errors { - public dynamic class InvalidSWFError extends Error - { + public dynamic class InvalidSWFError extends Error { prototype.name = "InvalidSWFError"; - public function InvalidSWFError(message:String = "", id:int = 0) - { + public function InvalidSWFError(message:String = "", id:int = 0) { super(message, id); } } } - diff --git a/core/src/avm2/globals/flash/errors/MemoryError.as b/core/src/avm2/globals/flash/errors/MemoryError.as index 43bf2676aef5..9d058e770d9a 100644 --- a/core/src/avm2/globals/flash/errors/MemoryError.as +++ b/core/src/avm2/globals/flash/errors/MemoryError.as @@ -3,18 +3,14 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.errors -{ +package flash.errors { - public dynamic class MemoryError extends Error - { + public dynamic class MemoryError extends Error { prototype.name = "MemoryError"; - public function MemoryError(message:String = "", id:int = 0) - { + public function MemoryError(message:String = "", id:int = 0) { super(message, id); } } } - diff --git a/core/src/avm2/globals/flash/errors/ScriptTimeoutError.as b/core/src/avm2/globals/flash/errors/ScriptTimeoutError.as index 0bffc4124236..178a3ecf174d 100644 --- a/core/src/avm2/globals/flash/errors/ScriptTimeoutError.as +++ b/core/src/avm2/globals/flash/errors/ScriptTimeoutError.as @@ -3,18 +3,14 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.errors -{ +package flash.errors { - public dynamic class ScriptTimeoutError extends Error - { + public dynamic class ScriptTimeoutError extends Error { prototype.name = "ScriptTimeoutError"; - public function ScriptTimeoutError(message:String = "", id:int = 0) - { + public function ScriptTimeoutError(message:String = "", id:int = 0) { super(message, id); } } } - diff --git a/core/src/avm2/globals/flash/errors/StackOverflowError.as b/core/src/avm2/globals/flash/errors/StackOverflowError.as index ed03fadd0dcf..6468e22a08a8 100644 --- a/core/src/avm2/globals/flash/errors/StackOverflowError.as +++ b/core/src/avm2/globals/flash/errors/StackOverflowError.as @@ -3,18 +3,14 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.errors -{ +package flash.errors { - public dynamic class StackOverflowError extends Error - { + public dynamic class StackOverflowError extends Error { prototype.name = "StackOverflowError"; - public function StackOverflowError(message:String = "", id:int = 0) - { + public function StackOverflowError(message:String = "", id:int = 0) { super(message, id); } } } - diff --git a/core/src/avm2/globals/flash/events/AVDictionaryDataEvent.as b/core/src/avm2/globals/flash/events/AVDictionaryDataEvent.as index 6d61d10c7831..e31c393147f2 100644 --- a/core/src/avm2/globals/flash/events/AVDictionaryDataEvent.as +++ b/core/src/avm2/globals/flash/events/AVDictionaryDataEvent.as @@ -1,38 +1,30 @@ -// The initial version of this file was autogenerated from the official AS3 reference at +// The initial version of this file was autogenerated from the official AS3 reference at // https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/AVDictionaryDataEvent.html // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.events -{ - +package flash.events { + import flash.utils.Dictionary; - public class AVDictionaryDataEvent extends Event - { + public class AVDictionaryDataEvent extends Event { public static const AV_DICTIONARY_DATA:String = "avDictionaryData"; - private var _dictionary: Dictionary; // Contains a dictionary of keys and values for the ID3 tags. - private var _time: Number; // The timestamp for the ID3 tag. + private var _dictionary:Dictionary; // Contains a dictionary of keys and values for the ID3 tags. + private var _time:Number; // The timestamp for the ID3 tag. - public function AVDictionaryDataEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, init_dictionary:Dictionary = null, init_dataTime:Number = 0) - { - super(type,bubbles,cancelable); + public function AVDictionaryDataEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, init_dictionary:Dictionary = null, init_dataTime:Number = 0) { + super(type, bubbles, cancelable); this._dictionary = init_dictionary; this._time = init_dataTime; } - - public function get dictionary() : Dictionary - { + public function get dictionary():Dictionary { return this._dictionary; } - - public function get time() : Number - { + public function get time():Number { return this._time; } - + } } - diff --git a/core/src/avm2/globals/flash/events/AVHTTPStatusEvent.as b/core/src/avm2/globals/flash/events/AVHTTPStatusEvent.as index e605cc922f81..3b5f10eb7f94 100644 --- a/core/src/avm2/globals/flash/events/AVHTTPStatusEvent.as +++ b/core/src/avm2/globals/flash/events/AVHTTPStatusEvent.as @@ -1,44 +1,36 @@ -// The initial version of this file was autogenerated from the official AS3 reference at +// The initial version of this file was autogenerated from the official AS3 reference at // https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/AVHTTPStatusEvent.html // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.events -{ - - public class AVHTTPStatusEvent extends Event - { +package flash.events { + + public class AVHTTPStatusEvent extends Event { public static const AV_HTTP_RESPONSE_STATUS:String = "avHttpResponseStatus"; // Unlike the httpStatus event, the httpResponseStatus event is delivered before any response data. - private var _status: int; // The HTTP status code returned by the server. - public var responseURL: String; // The URL that the response was returned from. - public var responseHeaders: Array; // The response headers that the response returned, as an array of URLRequestHeader objects. + private var _status:int; // The HTTP status code returned by the server. + public var responseURL:String; // The URL that the response was returned from. + public var responseHeaders:Array; // The response headers that the response returned, as an array of URLRequestHeader objects. - public function AVHTTPStatusEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, status:int = 0, responseUrl:String = null, responseHeaders:Array = null) - { - super(type,bubbles,cancelable); + public function AVHTTPStatusEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, status:int = 0, responseUrl:String = null, responseHeaders:Array = null) { + super(type, bubbles, cancelable); this._status = status; this.responseURL = responseUrl; this.responseHeaders = responseHeaders; } - - // Creates a copy of the AVHTTPStatusEvent object and sets the value of each property to match that of the original. - override public function clone():Event - { + // Creates a copy of the AVHTTPStatusEvent object and sets the value of each property to match that of the original. + override public function clone():Event { return new AVHTTPStatusEvent(this.type, this.bubbles, this.cancelable, this.status, this.responseURL, this.responseHeaders); } - // Returns a string that contains all the properties of the AVHTTPStatusEvent object. - override public function toString():String - { - return this.formatToString("AVHTTPStatusEvent","type","bubbles","cancelable","eventPhase","status"); + // Returns a string that contains all the properties of the AVHTTPStatusEvent object. + override public function toString():String { + return this.formatToString("AVHTTPStatusEvent", "type", "bubbles", "cancelable", "eventPhase", "status"); } - public function get status() : int - { + public function get status():int { return this._status; } - + } } - diff --git a/core/src/avm2/globals/flash/events/AVPauseAtPeriodEndEvent.as b/core/src/avm2/globals/flash/events/AVPauseAtPeriodEndEvent.as index 8a903bed0c04..199dc8bf6a20 100644 --- a/core/src/avm2/globals/flash/events/AVPauseAtPeriodEndEvent.as +++ b/core/src/avm2/globals/flash/events/AVPauseAtPeriodEndEvent.as @@ -1,28 +1,22 @@ -// The initial version of this file was autogenerated from the official AS3 reference at +// The initial version of this file was autogenerated from the official AS3 reference at // https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/AVPauseAtPeriodEndEvent.html // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.events -{ - - public class AVPauseAtPeriodEndEvent extends Event - { +package flash.events { + + public class AVPauseAtPeriodEndEvent extends Event { public static const AV_PAUSE_AT_PERIOD_END:String = "avPauseAtPeriodEnd"; - private var _userData: int; + private var _userData:int; - public function AVPauseAtPeriodEndEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, userData:int = 0) - { - super(type,bubbles,cancelable); + public function AVPauseAtPeriodEndEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, userData:int = 0) { + super(type, bubbles, cancelable); this._userData = userData; } - - public function get userData() : int - { + public function get userData():int { return this._userData; } - + } } - diff --git a/core/src/avm2/globals/flash/events/AccelerometerEvent.as b/core/src/avm2/globals/flash/events/AccelerometerEvent.as index 318fa91c8f56..0895123d6ee2 100644 --- a/core/src/avm2/globals/flash/events/AccelerometerEvent.as +++ b/core/src/avm2/globals/flash/events/AccelerometerEvent.as @@ -2,11 +2,9 @@ // https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/AccelerometerEvent.html // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.events -{ +package flash.events { - public class AccelerometerEvent extends Event - { + public class AccelerometerEvent extends Event { // Defines the value of the type property of a AccelerometerEvent event object. public static const UPDATE:String = "update"; @@ -18,13 +16,12 @@ package flash.events // Acceleration along the y-axis, measured in Gs. public var accelerationY:Number; - + // Acceleration along the z-axis, measured in Gs. public var accelerationZ:Number; public function AccelerometerEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, timestamp:Number = 0, - accelerationX:Number = 0, accelerationY:Number = 0, accelerationZ:Number = 0) - { + accelerationX:Number = 0, accelerationY:Number = 0, accelerationZ:Number = 0) { super(type, bubbles, cancelable); this.timestamp = timestamp; this.accelerationX = accelerationX; @@ -33,18 +30,13 @@ package flash.events } // Creates a copy of an AccelerometerEvent object and sets the value of each property to match that of the original. - override public function clone():Event - { + override public function clone():Event { return new AccelerometerEvent(this.type, this.bubbles, this.cancelable, this.timestamp, this.accelerationX, this.accelerationY, this.accelerationZ); } // Returns a string that contains all the properties of the AccelerometerEvent object. - override public function toString():String - { + override public function toString():String { return this.formatToString("AccelerometerEvent", "type", "bubbles", "cancelable", "eventPhase", "timestamp", "accelerationX", "accelerationY", "accelerationZ"); } } } - - - diff --git a/core/src/avm2/globals/flash/events/ActivityEvent.as b/core/src/avm2/globals/flash/events/ActivityEvent.as index c21b5fcda38c..13082e8c4b11 100644 --- a/core/src/avm2/globals/flash/events/ActivityEvent.as +++ b/core/src/avm2/globals/flash/events/ActivityEvent.as @@ -1,21 +1,21 @@ package flash.events { - public class ActivityEvent extends Event { + public class ActivityEvent extends Event { - public static const ACTIVITY:String = "activity"; + public static const ACTIVITY:String = "activity"; - public var activating:Boolean; + public var activating:Boolean; - public function ActivityEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, activating:Boolean = false) { - super(type, bubbles, cancelable); - this.activating = activating; - } + public function ActivityEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, activating:Boolean = false) { + super(type, bubbles, cancelable); + this.activating = activating; + } - override public function clone() : Event { - return new ActivityEvent(this.type, this.bubbles, this.cancelable, this.activating); - } + override public function clone():Event { + return new ActivityEvent(this.type, this.bubbles, this.cancelable, this.activating); + } - override public function toString(): String { - return formatToString("ActivityEvent","type","bubbles","cancelable","eventPhase","activating"); - } - } + override public function toString():String { + return formatToString("ActivityEvent", "type", "bubbles", "cancelable", "eventPhase", "activating"); + } + } } diff --git a/core/src/avm2/globals/flash/events/AsyncErrorEvent.as b/core/src/avm2/globals/flash/events/AsyncErrorEvent.as index c056eff6c670..7c217a16632d 100644 --- a/core/src/avm2/globals/flash/events/AsyncErrorEvent.as +++ b/core/src/avm2/globals/flash/events/AsyncErrorEvent.as @@ -1,33 +1,26 @@ -// The initial version of this file was autogenerated from the official AS3 reference at +// The initial version of this file was autogenerated from the official AS3 reference at // https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/AsyncErrorEvent.html // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.events -{ - public class AsyncErrorEvent extends ErrorEvent - { +package flash.events { + public class AsyncErrorEvent extends ErrorEvent { public static const ASYNC_ERROR:String = "asyncError"; // The AsyncErrorEvent.ASYNC_ERROR constant defines the value of the type property of an asyncError event object. - public var error: Error; // The exception that was thrown. + public var error:Error; // The exception that was thrown. - public function AsyncErrorEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, text:String = "", error:Error = null) - { - super(type,bubbles,cancelable,text); + public function AsyncErrorEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, text:String = "", error:Error = null) { + super(type, bubbles, cancelable, text); this.error = error; } - - // Creates a copy of the AsyncErrorEvent object and sets the value of each property to match that of the original. - override public function clone():Event - { + // Creates a copy of the AsyncErrorEvent object and sets the value of each property to match that of the original. + override public function clone():Event { return new AsyncErrorEvent(this.type, this.bubbles, this.cancelable, this.text, this.error); } - // Returns a string that contains all the properties of the AsyncErrorEvent object. - override public function toString():String - { - return this.formatToString("AsyncErrorEvent","type","bubbles","cancelable","eventPhase","text","error"); + // Returns a string that contains all the properties of the AsyncErrorEvent object. + override public function toString():String { + return this.formatToString("AsyncErrorEvent", "type", "bubbles", "cancelable", "eventPhase", "text", "error"); } } } - diff --git a/core/src/avm2/globals/flash/events/AudioOutputChangeEvent.as b/core/src/avm2/globals/flash/events/AudioOutputChangeEvent.as index 9e937f9f04ea..bf855004f571 100644 --- a/core/src/avm2/globals/flash/events/AudioOutputChangeEvent.as +++ b/core/src/avm2/globals/flash/events/AudioOutputChangeEvent.as @@ -1,28 +1,22 @@ -// The initial version of this file was autogenerated from the official AS3 reference at +// The initial version of this file was autogenerated from the official AS3 reference at // https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/AudioOutputChangeEvent.html // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.events -{ +package flash.events { // TODO: [API("724")] - public class AudioOutputChangeEvent extends Event - { + public class AudioOutputChangeEvent extends Event { public static const AUDIO_OUTPUT_CHANGE:String = "audioOutputChange"; // Defines the value of the type property of a AudioOutputChangeEvent event object. - private var _reason: String; // Reports the reason that triggers this AudioOutputChangeEvent. + private var _reason:String; // Reports the reason that triggers this AudioOutputChangeEvent. - public function AudioOutputChangeEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, reason:String = null) - { - super(type,bubbles,cancelable); + public function AudioOutputChangeEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, reason:String = null) { + super(type, bubbles, cancelable); this._reason = reason; } - - public function get reason() : String - { + public function get reason():String { return this._reason; } - + } } - diff --git a/core/src/avm2/globals/flash/events/ContextMenuEvent.as b/core/src/avm2/globals/flash/events/ContextMenuEvent.as index ef051eeadcc9..1ff1b8d7649b 100644 --- a/core/src/avm2/globals/flash/events/ContextMenuEvent.as +++ b/core/src/avm2/globals/flash/events/ContextMenuEvent.as @@ -1,49 +1,49 @@ package flash.events { - import flash.display.InteractiveObject; - public class ContextMenuEvent extends Event { - public static const MENU_ITEM_SELECT:String = "menuItemSelect"; - public static const MENU_SELECT:String = "menuSelect"; - - private var _mouseTarget:InteractiveObject; - private var _contextMenuOwner:InteractiveObject; - private var _isMouseTargetInaccessible:Boolean; - - public function ContextMenuEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, mouseTarget:InteractiveObject = null, contextMenuOwner:InteractiveObject = null) { - super(type,bubbles,cancelable); - this._mouseTarget = mouseTarget; - this._contextMenuOwner = contextMenuOwner; - } - - override public function clone() : Event { - return new ContextMenuEvent(this.type, this.bubbles, this.cancelable, this._mouseTarget, this._contextMenuOwner); - } - - override public function toString() : String { - return this.formatToString("ContextMenuEvent","type","bubbles","cancelable","eventPhase","mouseTarget","contextMenuOwner"); - } - - public function get mouseTarget() : InteractiveObject { - return this._mouseTarget; - } - - public function set mouseTarget(value:InteractiveObject) : void { - this._mouseTarget = value; - } - - public function get contextMenuOwner() : InteractiveObject { - return this._contextMenuOwner; - } - - public function set contextMenuOwner(value:InteractiveObject) : void { - this._contextMenuOwner = value; - } - - public function get isMouseTargetInaccessible() : Boolean { - return this._isMouseTargetInaccessible; - } - - public function set isMouseTargetInaccessible(value:Boolean) : void { - this._isMouseTargetInaccessible = value; - } - } + import flash.display.InteractiveObject; + public class ContextMenuEvent extends Event { + public static const MENU_ITEM_SELECT:String = "menuItemSelect"; + public static const MENU_SELECT:String = "menuSelect"; + + private var _mouseTarget:InteractiveObject; + private var _contextMenuOwner:InteractiveObject; + private var _isMouseTargetInaccessible:Boolean; + + public function ContextMenuEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, mouseTarget:InteractiveObject = null, contextMenuOwner:InteractiveObject = null) { + super(type, bubbles, cancelable); + this._mouseTarget = mouseTarget; + this._contextMenuOwner = contextMenuOwner; + } + + override public function clone():Event { + return new ContextMenuEvent(this.type, this.bubbles, this.cancelable, this._mouseTarget, this._contextMenuOwner); + } + + override public function toString():String { + return this.formatToString("ContextMenuEvent", "type", "bubbles", "cancelable", "eventPhase", "mouseTarget", "contextMenuOwner"); + } + + public function get mouseTarget():InteractiveObject { + return this._mouseTarget; + } + + public function set mouseTarget(value:InteractiveObject):void { + this._mouseTarget = value; + } + + public function get contextMenuOwner():InteractiveObject { + return this._contextMenuOwner; + } + + public function set contextMenuOwner(value:InteractiveObject):void { + this._contextMenuOwner = value; + } + + public function get isMouseTargetInaccessible():Boolean { + return this._isMouseTargetInaccessible; + } + + public function set isMouseTargetInaccessible(value:Boolean):void { + this._isMouseTargetInaccessible = value; + } + } } diff --git a/core/src/avm2/globals/flash/events/DRMAuthenticationCompleteEvent.as b/core/src/avm2/globals/flash/events/DRMAuthenticationCompleteEvent.as index 38ad6abbd7dd..d73f6276d81c 100644 --- a/core/src/avm2/globals/flash/events/DRMAuthenticationCompleteEvent.as +++ b/core/src/avm2/globals/flash/events/DRMAuthenticationCompleteEvent.as @@ -1,36 +1,30 @@ -// The initial version of this file was autogenerated from the official AS3 reference at +// The initial version of this file was autogenerated from the official AS3 reference at // https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/DRMAuthenticationCompleteEvent.html // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.events -{ - +package flash.events { + import flash.utils.ByteArray; - + [API("667")] - public class DRMAuthenticationCompleteEvent extends Event - { + public class DRMAuthenticationCompleteEvent extends Event { // The string constant to use for the authentication complete event in the type parameter when adding and removing event listeners. public static const AUTHENTICATION_COMPLETE:String = "authenticationComplete"; - public var serverURL: String; // The URL of the media rights server. - public var domain: String; // The content domain of the media rights server. - public var token: ByteArray; // The authentication token. + public var serverURL:String; // The URL of the media rights server. + public var domain:String; // The content domain of the media rights server. + public var token:ByteArray; // The authentication token. - public function DRMAuthenticationCompleteEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, inServerURL:String = null, inDomain:String = null, inToken:ByteArray = null) - { - super(type,bubbles,cancelable); + public function DRMAuthenticationCompleteEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, inServerURL:String = null, inDomain:String = null, inToken:ByteArray = null) { + super(type, bubbles, cancelable); this.serverURL = inServerURL; this.domain = inDomain; this.token = inToken; } - - // Duplicates an instance of an Event subclass. - override public function clone():Event - { + // Duplicates an instance of an Event subclass. + override public function clone():Event { return new DRMAuthenticationCompleteEvent(this.type, this.bubbles, this.cancelable, this.serverURL, this.domain, this.token); } } } - diff --git a/core/src/avm2/globals/flash/events/DRMAuthenticationErrorEvent.as b/core/src/avm2/globals/flash/events/DRMAuthenticationErrorEvent.as index 2021829a212b..170f392bcacb 100644 --- a/core/src/avm2/globals/flash/events/DRMAuthenticationErrorEvent.as +++ b/core/src/avm2/globals/flash/events/DRMAuthenticationErrorEvent.as @@ -1,39 +1,34 @@ -// The initial version of this file was autogenerated from the official AS3 reference at +// The initial version of this file was autogenerated from the official AS3 reference at // https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/DRMAuthenticationErrorEvent.html // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.events -{ - +package flash.events { + [API("667")] - public class DRMAuthenticationErrorEvent extends ErrorEvent - { + public class DRMAuthenticationErrorEvent extends ErrorEvent { // The string constant to use for the authentication error event in the type parameter when adding and removing event listeners. public static const AUTHENTICATION_ERROR:String = "authenticationError"; // A more detailed error code. - public var subErrorID: int; + public var subErrorID:int; // The URL of the media rights server that rejected the authentication attempt. - public var serverURL: String; + public var serverURL:String; // The content domain of the media rights server. - public var domain: String; + public var domain:String; public function DRMAuthenticationErrorEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, inDetail:String = "", - inErrorID:int = 0, inSubErrorID:int = 0, inServerURL:String = null, inDomain:String = null) - { - super(type,bubbles,cancelable,inDetail,inErrorID); + inErrorID:int = 0, inSubErrorID:int = 0, inServerURL:String = null, inDomain:String = null) { + super(type, bubbles, cancelable, inDetail, inErrorID); this.subErrorID = inSubErrorID; this.serverURL = inServerURL; this.domain = inDomain; } - + // Creates a copy of the ErrorEvent object and sets the value of each property to match that of the original. - override public function clone():Event - { + override public function clone():Event { return new DRMAuthenticationErrorEvent(this.type, this.bubbles, this.cancelable, this.text, this.errorID, this.subErrorID, this.serverURL, this.domain); } } } - diff --git a/core/src/avm2/globals/flash/events/DRMLicenseRequestEvent.as b/core/src/avm2/globals/flash/events/DRMLicenseRequestEvent.as index af080373f3b3..a6e367e194b7 100644 --- a/core/src/avm2/globals/flash/events/DRMLicenseRequestEvent.as +++ b/core/src/avm2/globals/flash/events/DRMLicenseRequestEvent.as @@ -1,28 +1,22 @@ -// The initial version of this file was autogenerated from the official AS3 reference at +// The initial version of this file was autogenerated from the official AS3 reference at // https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/DRMLicenseRequestEvent.html // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.events -{ - - public class DRMLicenseRequestEvent extends Event - { +package flash.events { + + public class DRMLicenseRequestEvent extends Event { public static const LICENSE_REQUEST:String = "licenseRequest"; // The string constant to use for the license request event in the type parameter when adding and removing event listeners. - public var serverURL: String; // The URL which will be used to communicate with the license server + public var serverURL:String; // The URL which will be used to communicate with the license server - public function DRMLicenseRequestEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, inServerURL:String = null) - { - super(type,bubbles,cancelable); + public function DRMLicenseRequestEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, inServerURL:String = null) { + super(type, bubbles, cancelable); this.serverURL = inServerURL; } - - // Duplicates an instance of an Event subclass. - override public function clone():Event - { + // Duplicates an instance of an Event subclass. + override public function clone():Event { return new DRMLicenseRequestEvent(this.type, this.bubbles, this.cancelable, this.serverURL); } } } - diff --git a/core/src/avm2/globals/flash/events/DRMReturnVoucherCompleteEvent.as b/core/src/avm2/globals/flash/events/DRMReturnVoucherCompleteEvent.as index d17f071d8be4..dc31d4326831 100644 --- a/core/src/avm2/globals/flash/events/DRMReturnVoucherCompleteEvent.as +++ b/core/src/avm2/globals/flash/events/DRMReturnVoucherCompleteEvent.as @@ -1,44 +1,38 @@ -// The initial version of this file was autogenerated from the official AS3 reference at +// The initial version of this file was autogenerated from the official AS3 reference at // https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/DRMReturnVoucherCompleteEvent.html // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.events -{ - +package flash.events { + [API("690")] - public class DRMReturnVoucherCompleteEvent extends Event - { + public class DRMReturnVoucherCompleteEvent extends Event { // The string constant to use for the return voucher complete event in the type parameter when adding and removing event listeners. public static const RETURN_VOUCHER_COMPLETE:String = "returnVoucherComplete"; // The URL of the media rights server. - public var serverURL: String; + public var serverURL:String; // The license ID that was passed into the DRMManager.returnVoucher() call. - public var licenseID: String; + public var licenseID:String; // The policyID that was passed into the DRMManager.returnVoucher() call. - public var policyID: String; + public var policyID:String; // The number of vouchers that matches the criterion passed into DRMManager.returnVoucher() and subsequently returned. - public var numberOfVouchersReturned: int; + public var numberOfVouchersReturned:int; public function DRMReturnVoucherCompleteEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, inServerURL:String = null, - inLicenseID:String = null, inPolicyID:String = null, inNumberOfVouchersReturned:int = 0) - { - super(type,bubbles,cancelable); + inLicenseID:String = null, inPolicyID:String = null, inNumberOfVouchersReturned:int = 0) { + super(type, bubbles, cancelable); this.serverURL = inServerURL; this.licenseID = inLicenseID; this.policyID = inPolicyID; this.numberOfVouchersReturned = inNumberOfVouchersReturned; } - // Duplicates an instance of an Event subclass. - override public function clone():Event - { + override public function clone():Event { return new DRMReturnVoucherCompleteEvent(this.type, this.bubbles, this.cancelable, this.serverURL, this.licenseID, this.policyID, this.numberOfVouchersReturned); } } } - diff --git a/core/src/avm2/globals/flash/events/DRMReturnVoucherErrorEvent.as b/core/src/avm2/globals/flash/events/DRMReturnVoucherErrorEvent.as index 9e4c9572ce63..883f32f37709 100644 --- a/core/src/avm2/globals/flash/events/DRMReturnVoucherErrorEvent.as +++ b/core/src/avm2/globals/flash/events/DRMReturnVoucherErrorEvent.as @@ -1,43 +1,37 @@ -// The initial version of this file was autogenerated from the official AS3 reference at +// The initial version of this file was autogenerated from the official AS3 reference at // https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/DRMReturnVoucherErrorEvent.html // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.events -{ - - public class DRMReturnVoucherErrorEvent extends ErrorEvent - { +package flash.events { + + public class DRMReturnVoucherErrorEvent extends ErrorEvent { // The string constant to use for the return voucher error event in the type parameter when adding and removing event listeners. public static const RETURN_VOUCHER_ERROR:String = "returnVoucherError"; // A more detailed error code. - public var subErrorID: int; + public var subErrorID:int; - // The URL of the media rights server for this return Voucher attempt. - public var serverURL: String; + // The URL of the media rights server for this return Voucher attempt. + public var serverURL:String; // The license ID that was passed into the returnVoucher() call that resulted in this error. - public var licenseID: String; + public var licenseID:String; // The policy ID that was passed into the returnVoucher() call that resulted in this error. - public var policyID: String; + public var policyID:String; public function DRMReturnVoucherErrorEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, inDetail:String = "", - inErrorID:int = 0, inSubErrorID:int = 0, inServerURL:String = null, inLicenseID:String = null, inPolicyID:String = null) - { - super(type,bubbles,cancelable,inDetail,inErrorID); + inErrorID:int = 0, inSubErrorID:int = 0, inServerURL:String = null, inLicenseID:String = null, inPolicyID:String = null) { + super(type, bubbles, cancelable, inDetail, inErrorID); this.subErrorID = inSubErrorID; this.serverURL = inServerURL; this.licenseID = inLicenseID; this.policyID = inPolicyID; } - // Creates a copy of the ErrorEvent object and sets the value of each property to match that of the original. - override public function clone():Event - { + override public function clone():Event { return new DRMReturnVoucherErrorEvent(this.type, this.bubbles, this.cancelable, this.text, this.errorID, this.subErrorID, this.serverURL, this.licenseID, this.policyID); } } } - diff --git a/core/src/avm2/globals/flash/events/DataEvent.as b/core/src/avm2/globals/flash/events/DataEvent.as index df5535156664..d8b0d9bc0ade 100644 --- a/core/src/avm2/globals/flash/events/DataEvent.as +++ b/core/src/avm2/globals/flash/events/DataEvent.as @@ -1,4 +1,4 @@ -// The initial version of this file was autogenerated from the official AS3 reference at +// The initial version of this file was autogenerated from the official AS3 reference at // https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/DataEvent.html // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix @@ -11,7 +11,6 @@ package flash.events { super(type, bubbles, cancelable, data); } - // `DataEvent.data` seems to delegate to the superclass's (TextEvent's) `TextEvent.text`. public function get data():String { return super.text; @@ -21,15 +20,14 @@ package flash.events { super.text = value; } - - // Creates a copy of the DataEvent object and sets the value of each property to match that of the original. + // Creates a copy of the DataEvent object and sets the value of each property to match that of the original. override public function clone():Event { return new DataEvent(this.type, this.bubbles, this.cancelable, this.data); } - // Returns a string that contains all the properties of the DataEvent object. + // Returns a string that contains all the properties of the DataEvent object. override public function toString():String { - return this.formatToString("DataEvent","type","bubbles","cancelable","eventPhase","data"); + return this.formatToString("DataEvent", "type", "bubbles", "cancelable", "eventPhase", "data"); } } } diff --git a/core/src/avm2/globals/flash/events/ErrorEvent.as b/core/src/avm2/globals/flash/events/ErrorEvent.as index 8f1cf9a2150b..1fe37be76539 100644 --- a/core/src/avm2/globals/flash/events/ErrorEvent.as +++ b/core/src/avm2/globals/flash/events/ErrorEvent.as @@ -5,25 +5,21 @@ package flash.events { private var _errorID:int; - public function ErrorEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, text:String = "", id:int = 0) - { - super(type,bubbles,cancelable,text); + public function ErrorEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, text:String = "", id:int = 0) { + super(type, bubbles, cancelable, text); this._errorID = id; } - public function get errorID() : int - { + public function get errorID():int { return this._errorID; } - override public function clone() : Event - { - return new ErrorEvent(this.type,this.bubbles,this.cancelable,this.text,this._errorID); + override public function clone():Event { + return new ErrorEvent(this.type, this.bubbles, this.cancelable, this.text, this._errorID); } - override public function toString() : String - { - return this.formatToString("ErrorEvent","type","bubbles","cancelable","eventPhase","text"); + override public function toString():String { + return this.formatToString("ErrorEvent", "type", "bubbles", "cancelable", "eventPhase", "text"); } } } diff --git a/core/src/avm2/globals/flash/events/Event.as b/core/src/avm2/globals/flash/events/Event.as index 77bbd7150537..1e3e7f2385d4 100644 --- a/core/src/avm2/globals/flash/events/Event.as +++ b/core/src/avm2/globals/flash/events/Event.as @@ -1,142 +1,142 @@ package flash.events { - [Ruffle(InstanceAllocator)] - public class Event { - public static const ACTIVATE:String = "activate"; - - public static const ADDED:String = "added"; + [Ruffle(InstanceAllocator)] + public class Event { + public static const ACTIVATE:String = "activate"; - public static const ADDED_TO_STAGE:String = "addedToStage"; + public static const ADDED:String = "added"; - public static const BROWSER_ZOOM_CHANGE:String = "browserZoomChange"; + public static const ADDED_TO_STAGE:String = "addedToStage"; - public static const CANCEL:String = "cancel"; + public static const BROWSER_ZOOM_CHANGE:String = "browserZoomChange"; - public static const CHANGE:String = "change"; + public static const CANCEL:String = "cancel"; - public static const CLEAR:String = "clear"; + public static const CHANGE:String = "change"; - public static const CLOSE:String = "close"; + public static const CLEAR:String = "clear"; - [API("661")] - public static const CLOSING:String = "closing"; + public static const CLOSE:String = "close"; - public static const COMPLETE:String = "complete"; + [API("661")] + public static const CLOSING:String = "closing"; - public static const CONNECT:String = "connect"; + public static const COMPLETE:String = "complete"; - public static const COPY:String = "copy"; + public static const CONNECT:String = "connect"; - public static const CUT:String = "cut"; + public static const COPY:String = "copy"; - public static const DEACTIVATE:String = "deactivate"; + public static const CUT:String = "cut"; - public static const ENTER_FRAME:String = "enterFrame"; + public static const DEACTIVATE:String = "deactivate"; - public static const FRAME_CONSTRUCTED:String = "frameConstructed"; + public static const ENTER_FRAME:String = "enterFrame"; - [API("661")] - public static const EXITING:String = "exiting"; + public static const FRAME_CONSTRUCTED:String = "frameConstructed"; - public static const EXIT_FRAME:String = "exitFrame"; + [API("661")] + public static const EXITING:String = "exiting"; - public static const FRAME_LABEL:String = "frameLabel"; + public static const EXIT_FRAME:String = "exitFrame"; - public static const ID3:String = "id3"; + public static const FRAME_LABEL:String = "frameLabel"; - public static const INIT:String = "init"; + public static const ID3:String = "id3"; - public static const MOUSE_LEAVE:String = "mouseLeave"; + public static const INIT:String = "init"; - public static const OPEN:String = "open"; + public static const MOUSE_LEAVE:String = "mouseLeave"; - public static const PASTE:String = "paste"; + public static const OPEN:String = "open"; - public static const REMOVED:String = "removed"; + public static const PASTE:String = "paste"; - public static const REMOVED_FROM_STAGE:String = "removedFromStage"; + public static const REMOVED:String = "removed"; - public static const RENDER:String = "render"; + public static const REMOVED_FROM_STAGE:String = "removedFromStage"; - public static const RESIZE:String = "resize"; + public static const RENDER:String = "render"; - public static const SCROLL:String = "scroll"; + public static const RESIZE:String = "resize"; - public static const TEXT_INTERACTION_MODE_CHANGE:String = "textInteractionModeChange"; + public static const SCROLL:String = "scroll"; - public static const SELECT:String = "select"; + public static const TEXT_INTERACTION_MODE_CHANGE:String = "textInteractionModeChange"; - public static const SELECT_ALL:String = "selectAll"; + public static const SELECT:String = "select"; - public static const SOUND_COMPLETE:String = "soundComplete"; + public static const SELECT_ALL:String = "selectAll"; - public static const TAB_CHILDREN_CHANGE:String = "tabChildrenChange"; + public static const SOUND_COMPLETE:String = "soundComplete"; - public static const TAB_ENABLED_CHANGE:String = "tabEnabledChange"; + public static const TAB_CHILDREN_CHANGE:String = "tabChildrenChange"; - public static const TAB_INDEX_CHANGE:String = "tabIndexChange"; + public static const TAB_ENABLED_CHANGE:String = "tabEnabledChange"; - public static const UNLOAD:String = "unload"; + public static const TAB_INDEX_CHANGE:String = "tabIndexChange"; - public static const FULLSCREEN:String = "fullScreen"; + public static const UNLOAD:String = "unload"; - [API("667")] - public static const CONTEXT3D_CREATE:String = "context3DCreate"; + public static const FULLSCREEN:String = "fullScreen"; - [API("667")] - public static const TEXTURE_READY:String = "textureReady"; + [API("667")] + public static const CONTEXT3D_CREATE:String = "context3DCreate"; - [API("682")] - public static const VIDEO_FRAME:String = "videoFrame"; + [API("667")] + public static const TEXTURE_READY:String = "textureReady"; - [API("681")] - public static const SUSPEND:String = "suspend"; + [API("682")] + public static const VIDEO_FRAME:String = "videoFrame"; - [API("682")] - public static const CHANNEL_MESSAGE:String = "channelMessage"; + [API("681")] + public static const SUSPEND:String = "suspend"; - [API("682")] - public static const CHANNEL_STATE:String = "channelState"; + [API("682")] + public static const CHANNEL_MESSAGE:String = "channelMessage"; - [API("682")] - public static const WORKER_STATE:String = "workerState"; + [API("682")] + public static const CHANNEL_STATE:String = "channelState"; - public function Event(type:String, bubbles:Boolean = false, cancelable:Boolean = false) { - this.init(type, bubbles, cancelable); - } + [API("682")] + public static const WORKER_STATE:String = "workerState"; - private native function init(type:String, bubbles:Boolean = false, cancelable:Boolean = false):void; + public function Event(type:String, bubbles:Boolean = false, cancelable:Boolean = false) { + this.init(type, bubbles, cancelable); + } - public native function get bubbles():Boolean; - public native function get cancelable():Boolean; - public native function get currentTarget():Object; - public native function get eventPhase():uint; - public native function get target():Object; - public native function get type():String; + private native function init(type:String, bubbles:Boolean = false, cancelable:Boolean = false):void; - public function clone():Event { - return new Event(this.type, this.bubbles, this.cancelable); - } + public native function get bubbles():Boolean; + public native function get cancelable():Boolean; + public native function get currentTarget():Object; + public native function get eventPhase():uint; + public native function get target():Object; + public native function get type():String; - public function toString(): String { - return this.formatToString("Event","type","bubbles","cancelable","eventPhase"); - } + public function clone():Event { + return new Event(this.type, this.bubbles, this.cancelable); + } - public function formatToString(className:String, ... arguments):String { - var fmt = "[" + className; - for each (var key: String in arguments) { - var val = this[key]; - if(val is String) { - fmt += " " + key + "=\"" + val + "\""; - } else { - fmt += " " + key + "=" + val; - } - } - return fmt += "]"; - } + public function toString():String { + return this.formatToString("Event", "type", "bubbles", "cancelable", "eventPhase"); + } - public native function isDefaultPrevented(): Boolean; - public native function preventDefault():void; - public native function stopPropagation():void; - public native function stopImmediatePropagation():void; - } + public function formatToString(className:String, ...arguments):String { + var fmt = "[" + className; + for each (var key:String in arguments) { + var val = this[key]; + if (val is String) { + fmt += " " + key + "=\"" + val + "\""; + } else { + fmt += " " + key + "=" + val; + } + } + return fmt += "]"; + } + + public native function isDefaultPrevented():Boolean; + public native function preventDefault():void; + public native function stopPropagation():void; + public native function stopImmediatePropagation():void; + } } diff --git a/core/src/avm2/globals/flash/events/FocusEvent.as b/core/src/avm2/globals/flash/events/FocusEvent.as index bdb51555680a..a8cf056560bf 100644 --- a/core/src/avm2/globals/flash/events/FocusEvent.as +++ b/core/src/avm2/globals/flash/events/FocusEvent.as @@ -1,14 +1,12 @@ -// The initial version of this file was autogenerated from the official AS3 reference at +// The initial version of this file was autogenerated from the official AS3 reference at // https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/FocusEvent.html // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.events -{ - +package flash.events { + import flash.display.InteractiveObject; - - public class FocusEvent extends Event - { + + public class FocusEvent extends Event { // Defines the value of the type property of a focusIn event object. public static const FOCUS_IN:String = "focusIn"; @@ -22,44 +20,39 @@ package flash.events public static const MOUSE_FOCUS_CHANGE:String = "mouseFocusChange"; // A reference to the complementary InteractiveObject instance that is affected by the change in focus. - public var relatedObject: InteractiveObject; + public var relatedObject:InteractiveObject; // Indicates whether the Shift key modifier is activated, in which case the value is true. - public var shiftKey: Boolean; + public var shiftKey:Boolean; // The key code value of the key pressed to trigger a keyFocusChange event. - public var keyCode: uint; + public var keyCode:uint; // Specifies direction of focus for a focusIn event. [API("661")] - public var direction: String; + public var direction:String; // If true, the relatedObject property is set to null for reasons related to security sandboxes. - public var isRelatedObjectInaccessible: Boolean; + public var isRelatedObjectInaccessible:Boolean; public function FocusEvent(type:String, bubbles:Boolean = true, cancelable:Boolean = false, relatedObject:InteractiveObject = null, - shiftKey:Boolean = false, keyCode:uint = 0, direction:String = "none") - { - super(type,bubbles,cancelable); + shiftKey:Boolean = false, keyCode:uint = 0, direction:String = "none") { + super(type, bubbles, cancelable); this.relatedObject = relatedObject; this.shiftKey = shiftKey; this.keyCode = keyCode; this.direction = direction; this.isRelatedObjectInaccessible = false; // Unimplemented } - - // Creates a copy of the FocusEvent object and sets the value of each property to match that of the original. - override public function clone():Event - { + // Creates a copy of the FocusEvent object and sets the value of each property to match that of the original. + override public function clone():Event { return new FocusEvent(this.type, this.bubbles, this.cancelable, this.relatedObject, this.shiftKey, this.keyCode, this.direction); } - // Returns a string that contains all the properties of the FocusEvent object. - override public function toString():String - { - return this.formatToString("FocusEvent","type","bubbles","cancelable","eventPhase","relatedObject","shiftKey","keyCode"); + // Returns a string that contains all the properties of the FocusEvent object. + override public function toString():String { + return this.formatToString("FocusEvent", "type", "bubbles", "cancelable", "eventPhase", "relatedObject", "shiftKey", "keyCode"); } } } - diff --git a/core/src/avm2/globals/flash/events/FullScreenEvent.as b/core/src/avm2/globals/flash/events/FullScreenEvent.as index 1ad59b1a61db..78447b091eb4 100644 --- a/core/src/avm2/globals/flash/events/FullScreenEvent.as +++ b/core/src/avm2/globals/flash/events/FullScreenEvent.as @@ -4,35 +4,29 @@ package flash.events { public static const FULL_SCREEN:String = "fullScreen"; public static const FULL_SCREEN_INTERACTIVE_ACCEPTED:String = "fullScreenInteractiveAccepted"; - private var _fullScreen:Boolean; private var _interactive:Boolean; - public function FullScreenEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, fullScreen:Boolean = false, interactive:Boolean = false) - { - super(type,bubbles,cancelable); + public function FullScreenEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, fullScreen:Boolean = false, interactive:Boolean = false) { + super(type, bubbles, cancelable); this._fullScreen = fullScreen; this._interactive = interactive; } - override public function clone() : Event - { - return new FullScreenEvent(this.type,this.bubbles,this.cancelable,this.fullScreen,this.interactive); + override public function clone():Event { + return new FullScreenEvent(this.type, this.bubbles, this.cancelable, this.fullScreen, this.interactive); } - override public function toString() : String - { - return this.formatToString("FullScreenEvent","type","bubbles","cancelable","eventPhase","fullScreen","interactive"); + override public function toString():String { + return this.formatToString("FullScreenEvent", "type", "bubbles", "cancelable", "eventPhase", "fullScreen", "interactive"); } - public function get fullScreen() : Boolean - { + public function get fullScreen():Boolean { return this._fullScreen; } [API("680")] - public function get interactive() : Boolean - { + public function get interactive():Boolean { return this._interactive; } } diff --git a/core/src/avm2/globals/flash/events/GameInputEvent.as b/core/src/avm2/globals/flash/events/GameInputEvent.as index 21eb62a07f51..f7f4deeceb5a 100644 --- a/core/src/avm2/globals/flash/events/GameInputEvent.as +++ b/core/src/avm2/globals/flash/events/GameInputEvent.as @@ -1,5 +1,6 @@ package flash.events { - [API("688")] // the docs say 689 (AIR-only), that's wrong + [API("688")] + // the docs say 689 (AIR-only), that's wrong public final class GameInputEvent extends Event { public static const DEVICE_ADDED:String = "deviceAdded"; public static const DEVICE_REMOVED:String = "deviceRemoved"; diff --git a/core/src/avm2/globals/flash/events/GestureEvent.as b/core/src/avm2/globals/flash/events/GestureEvent.as index d6bd9906c23c..3bef49eb9bb2 100644 --- a/core/src/avm2/globals/flash/events/GestureEvent.as +++ b/core/src/avm2/globals/flash/events/GestureEvent.as @@ -1,41 +1,38 @@ -// The initial version of this file was autogenerated from the official AS3 reference at +// The initial version of this file was autogenerated from the official AS3 reference at // https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/GestureEvent.html // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.events -{ - - public class GestureEvent extends Event - { +package flash.events { + + public class GestureEvent extends Event { public static const GESTURE_TWO_FINGER_TAP:String = "gestureTwoFingerTap"; // Defines the value of the type property of a GESTURE_TWO_FINGER_TAP gesture event object. // A value from the GesturePhase class indicating the progress of the touch gesture. - public var phase: String; + public var phase:String; // The horizontal coordinate at which the event occurred relative to the containing sprite. [Ruffle(NativeAccessible)] - public var localX: Number; + public var localX:Number; // The vertical coordinate at which the event occurred relative to the containing sprite. [Ruffle(NativeAccessible)] - public var localY: Number; + public var localY:Number; // On Windows or Linux, indicates whether the Ctrl key is active (true) or inactive (false). - public var ctrlKey: Boolean; + public var ctrlKey:Boolean; // Indicates whether the Alt key is active (true) or inactive (false). - public var altKey: Boolean; + public var altKey:Boolean; // Indicates whether the Shift key is active (true) or inactive (false). - public var shiftKey: Boolean; + public var shiftKey:Boolean; // Indicates whether the Control key is activated on Mac and whether the Ctrl key is activated on Windows or Linux. - public var controlKey: Boolean; + public var controlKey:Boolean; public function GestureEvent(type:String, bubbles:Boolean = true, cancelable:Boolean = false, phase:String = null, localX:Number = 0, - localY:Number = 0, ctrlKey:Boolean = false, altKey:Boolean = false, shiftKey:Boolean = false, controlKey:Boolean = false) - { - super(type,bubbles,cancelable); + localY:Number = 0, ctrlKey:Boolean = false, altKey:Boolean = false, shiftKey:Boolean = false, controlKey:Boolean = false) { + super(type, bubbles, cancelable); this.phase = phase; this.localX = localX; this.localY = localY; @@ -44,25 +41,21 @@ package flash.events this.shiftKey = shiftKey; this.controlKey = controlKey; } - // Creates a copy of the GestureEvent object and sets the value of each property to match that of the original. - override public function clone():Event - { + override public function clone():Event { return new GestureEvent(this.type, this.bubbles, this.cancelable, this.phase, this.localX, this.localY, this.ctrlKey, this.altKey, this.shiftKey, this.commandKey, this.controlKey); } // Returns a string that contains all the properties of the GestureEvent object. - override public function toString():String - { - return this.formatToString("GestureEvent","type","bubbles","cancelable","eventPhase","phase","localX","localY","ctrlKey","altKey","shiftKey","commandKey","controlKey","stageX","stageY"); + override public function toString():String { + return this.formatToString("GestureEvent", "type", "bubbles", "cancelable", "eventPhase", "phase", "localX", "localY", "ctrlKey", "altKey", "shiftKey", "commandKey", "controlKey", "stageX", "stageY"); } // The horizontal coordinate at which the event occurred in global Stage coordinates. - public native function get stageX() : Number; + public native function get stageX():Number; // The vertical coordinate at which the event occurred in global Stage coordinates. - public native function get stageY() : Number; + public native function get stageY():Number; } } - diff --git a/core/src/avm2/globals/flash/events/GesturePhase.as b/core/src/avm2/globals/flash/events/GesturePhase.as index ae67b427dcd1..ea74309e9a18 100644 --- a/core/src/avm2/globals/flash/events/GesturePhase.as +++ b/core/src/avm2/globals/flash/events/GesturePhase.as @@ -1,8 +1,6 @@ -package flash.events -{ +package flash.events { - public class GesturePhase - { + public class GesturePhase { // A single value that encompasses all phases of simple gestures like two-finger-tap or swipe. public static const ALL:String = "all"; diff --git a/core/src/avm2/globals/flash/events/HTTPStatusEvent.as b/core/src/avm2/globals/flash/events/HTTPStatusEvent.as index f33440e408c3..806d4d80af65 100644 --- a/core/src/avm2/globals/flash/events/HTTPStatusEvent.as +++ b/core/src/avm2/globals/flash/events/HTTPStatusEvent.as @@ -1,50 +1,42 @@ -// The initial version of this file was autogenerated from the official AS3 reference at +// The initial version of this file was autogenerated from the official AS3 reference at // https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/HTTPStatusEvent.html // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.events -{ - - public class HTTPStatusEvent extends Event - { +package flash.events { + + public class HTTPStatusEvent extends Event { [API("661")] public static const HTTP_RESPONSE_STATUS:String = "httpResponseStatus"; // Unlike the httpStatus event, the httpResponseStatus event is delivered before any response data. public static const HTTP_STATUS:String = "httpStatus"; // The HTTPStatusEvent.HTTP_STATUS constant defines the value of the type property of a httpStatus event object. - private var _status: int; // The HTTP status code returned by the server. + private var _status:int; // The HTTP status code returned by the server. [API("690")] - public var redirected: Boolean; // Indicates whether the request was redirected. + public var redirected:Boolean; // Indicates whether the request was redirected. [API("661")] - public var responseHeaders: Array; // The response headers that the response returned, as an array of URLRequestHeader objects. + public var responseHeaders:Array; // The response headers that the response returned, as an array of URLRequestHeader objects. [API("661")] - public var responseURL: String; // The URL that the response was returned from. + public var responseURL:String; // The URL that the response was returned from. - public function HTTPStatusEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, status:int = 0, redirected:Boolean = false) - { - super(type,bubbles,cancelable); + public function HTTPStatusEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, status:int = 0, redirected:Boolean = false) { + super(type, bubbles, cancelable); this._status = status; this.redirected = redirected; } - - // Creates a copy of the HTTPStatusEvent object and sets the value of each property to match that of the original. - override public function clone():Event - { + // Creates a copy of the HTTPStatusEvent object and sets the value of each property to match that of the original. + override public function clone():Event { return new HTTPStatusEvent(this.type, this.bubbles, this.cancelable, this.status, this.redirected); } - // Returns a string that contains all the properties of the HTTPStatusEvent object. - override public function toString():String - { - return this.formatToString("HTTPStatusEvent","type","bubbles","cancelable","eventPhase","status","redirected","responseURL"); + // Returns a string that contains all the properties of the HTTPStatusEvent object. + override public function toString():String { + return this.formatToString("HTTPStatusEvent", "type", "bubbles", "cancelable", "eventPhase", "status", "redirected", "responseURL"); } - public function get status() : int - { + public function get status():int { return this._status; } - + } } - diff --git a/core/src/avm2/globals/flash/events/IOErrorEvent.as b/core/src/avm2/globals/flash/events/IOErrorEvent.as index 072cb579b85a..a015a86a6f03 100644 --- a/core/src/avm2/globals/flash/events/IOErrorEvent.as +++ b/core/src/avm2/globals/flash/events/IOErrorEvent.as @@ -18,25 +18,21 @@ package flash.events { [API("668")] public static const STANDARD_INPUT_IO_ERROR:String = "standardInputIoError"; - //The standardOutputIoError event is dispatched when an error occurs while + // The standardOutputIoError event is dispatched when an error occurs while // reading data from the standardOutput stream of a NativeProcess object. [API("668")] public static const STANDARD_OUTPUT_IO_ERROR:String = "standardOutputIoError"; - - public function IOErrorEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, text:String = "", id:int = 0) - { - super(type,bubbles,cancelable,text,id); + public function IOErrorEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, text:String = "", id:int = 0) { + super(type, bubbles, cancelable, text, id); } - override public function clone() : Event - { - return new IOErrorEvent(this.type,this.bubbles,this.cancelable,this.text,this.errorID); + override public function clone():Event { + return new IOErrorEvent(this.type, this.bubbles, this.cancelable, this.text, this.errorID); } - override public function toString() : String - { - return this.formatToString("IOErrorEvent","type","bubbles","cancelable","eventPhase","text"); + override public function toString():String { + return this.formatToString("IOErrorEvent", "type", "bubbles", "cancelable", "eventPhase", "text"); } } } diff --git a/core/src/avm2/globals/flash/events/InvokeEvent.as b/core/src/avm2/globals/flash/events/InvokeEvent.as index b82a616b70b7..61dde526939c 100644 --- a/core/src/avm2/globals/flash/events/InvokeEvent.as +++ b/core/src/avm2/globals/flash/events/InvokeEvent.as @@ -3,53 +3,46 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.events -{ +package flash.events { - import flash.filesystem.File; + import flash.filesystem.File; - [API("661")] - public class InvokeEvent extends Event - { - public static const INVOKE:String = "invoke"; + [API("661")] + public class InvokeEvent extends Event { + public static const INVOKE:String = "invoke"; - // The array of string arguments passed during this invocation. - private var _arguments:Array; + // The array of string arguments passed during this invocation. + private var _arguments:Array; - // The reason for this InvokeEvent. - private var _reason:String; + // The reason for this InvokeEvent. + private var _reason:String; - // The directory that should be used to resolve any relative paths in the arguments array. - private var _currentDirectory:File; + // The directory that should be used to resolve any relative paths in the arguments array. + private var _currentDirectory:File; - public function InvokeEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, dir:File = null, argv:Array = null, reason:String = "standard") - { - super(type, bubbles, cancelable); - this._currentDirectory = dir; - this._arguments = argv; - this._reason = reason; - } + public function InvokeEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, dir:File = null, argv:Array = null, reason:String = "standard") { + super(type, bubbles, cancelable); + this._currentDirectory = dir; + this._arguments = argv; + this._reason = reason; + } - // [override] Creates a new copy of this event. - override public function clone():Event - { - return new InvokeEvent(this.type, this.bubbles, this.cancelable, this.arguments, this.reason); - } + // [override] Creates a new copy of this event. + override public function clone():Event { + return new InvokeEvent(this.type, this.bubbles, this.cancelable, this.arguments, this.reason); + } - public function get arguments():Array - { - return this._arguments; - } + public function get arguments():Array { + return this._arguments; + } - [API("664")] - public function get reason():String - { - return this._reason; - } + [API("664")] + public function get reason():String { + return this._reason; + } - public function get currentDirectory():File - { - return this._currentDirectory; + public function get currentDirectory():File { + return this._currentDirectory; + } } - } } diff --git a/core/src/avm2/globals/flash/events/KeyboardEvent.as b/core/src/avm2/globals/flash/events/KeyboardEvent.as index 28abadf18bfd..7c0238219c1f 100644 --- a/core/src/avm2/globals/flash/events/KeyboardEvent.as +++ b/core/src/avm2/globals/flash/events/KeyboardEvent.as @@ -1,7 +1,5 @@ -package flash.events -{ - public class KeyboardEvent extends Event - { +package flash.events { + public class KeyboardEvent extends Event { public static const KEY_DOWN:String = "keyDown"; public static const KEY_UP:String = "keyUp"; private var _charCode:uint; @@ -13,19 +11,18 @@ package flash.events private var _controlKey:Boolean; private var _commandKey:Boolean; - public function KeyboardEvent(type:String, - bubbles:Boolean = true, - cancelable:Boolean = false, - charCodeValue:uint = 0, - keyCodeValue:uint = 0, - keyLocationValue:uint = 0, - ctrlKeyValue:Boolean = false, - altKeyValue:Boolean = false, - shiftKeyValue:Boolean = false, - controlKeyValue:Boolean = false, - commandKeyValue:Boolean = false) - { - super(type,bubbles,cancelable); + public function KeyboardEvent(type:String, + bubbles:Boolean = true, + cancelable:Boolean = false, + charCodeValue:uint = 0, + keyCodeValue:uint = 0, + keyLocationValue:uint = 0, + ctrlKeyValue:Boolean = false, + altKeyValue:Boolean = false, + shiftKeyValue:Boolean = false, + controlKeyValue:Boolean = false, + commandKeyValue:Boolean = false) { + super(type, bubbles, cancelable); this._charCode = charCodeValue; this._keyCode = keyCodeValue; this._keyLocation = keyLocationValue; @@ -92,12 +89,11 @@ package flash.events this._commandKey = val; } - override public function clone() : Event - { - return new KeyboardEvent(this.type,this.bubbles,this.cancelable,this._charCode,this._keyCode,this._keyLocation,this._ctrlKey,this._altKey,this._shiftKey,this._controlKey,this._commandKey); + override public function clone():Event { + return new KeyboardEvent(this.type, this.bubbles, this.cancelable, this._charCode, this._keyCode, this._keyLocation, this._ctrlKey, this._altKey, this._shiftKey, this._controlKey, this._commandKey); } - override public function toString(): String { + override public function toString():String { return this.formatToString("KeyboardEvent", "type", "bubbles", "cancelable", "eventPhase", "charCode", "keyCode", "keyLocation", "ctrlKey", "altKey", "shiftKey"); } diff --git a/core/src/avm2/globals/flash/events/MouseEvent.as b/core/src/avm2/globals/flash/events/MouseEvent.as index 185765d9635f..7cfa423909d8 100644 --- a/core/src/avm2/globals/flash/events/MouseEvent.as +++ b/core/src/avm2/globals/flash/events/MouseEvent.as @@ -1,10 +1,7 @@ - -package flash.events -{ +package flash.events { import flash.display.InteractiveObject; - public class MouseEvent extends Event - { + public class MouseEvent extends Event { public static const CLICK:String = "click"; public static const DOUBLE_CLICK:String = "doubleClick"; public static const MOUSE_DOWN:String = "mouseDown"; @@ -31,39 +28,38 @@ package flash.events [API("678")] public static const CONTEXT_MENU:String = "contextMenu"; - public var relatedObject: InteractiveObject; + public var relatedObject:InteractiveObject; [Ruffle(NativeAccessible)] - public var localX: Number; + public var localX:Number; [Ruffle(NativeAccessible)] - public var localY: Number; + public var localY:Number; - public var ctrlKey: Boolean; - public var altKey: Boolean; - public var shiftKey: Boolean; - public var buttonDown: Boolean; - public var delta: int; - private var _isRelatedObjectInaccessible: Boolean; + public var ctrlKey:Boolean; + public var altKey:Boolean; + public var shiftKey:Boolean; + public var buttonDown:Boolean; + public var delta:int; + private var _isRelatedObjectInaccessible:Boolean; [API("678")] - public var movementX: Number; + public var movementX:Number; [API("678")] - public var movementY: Number; + public var movementY:Number; - public function MouseEvent(type:String, - bubbles:Boolean = true, - cancelable:Boolean = false, - localX:Number = 0/0, - localY:Number = 0/0, - relatedObject:InteractiveObject = null, - ctrlKey:Boolean = false, - altKey:Boolean = false, - shiftKey:Boolean = false, - buttonDown:Boolean = false, - delta:int = 0) - { - super(type,bubbles,cancelable); + public function MouseEvent(type:String, + bubbles:Boolean = true, + cancelable:Boolean = false, + localX:Number = 0 / 0, + localY:Number = 0 / 0, + relatedObject:InteractiveObject = null, + ctrlKey:Boolean = false, + altKey:Boolean = false, + shiftKey:Boolean = false, + buttonDown:Boolean = false, + delta:int = 0) { + super(type, bubbles, cancelable); this.localX = localX; this.localY = localY; this.relatedObject = relatedObject; @@ -77,15 +73,13 @@ package flash.events this.movementY = 0.0; // unimplemented } - override public function clone() : Event - { + override public function clone():Event { // note: movementX/Y not cloned - return new MouseEvent(this.type,this.bubbles,this.cancelable,this.localX,this.localY,this.relatedObject,this.ctrlKey,this.altKey,this.shiftKey,this.buttonDown,this.delta); + return new MouseEvent(this.type, this.bubbles, this.cancelable, this.localX, this.localY, this.relatedObject, this.ctrlKey, this.altKey, this.shiftKey, this.buttonDown, this.delta); } - override public function toString() : String - { - return this.formatToString("MouseEvent","type","bubbles","cancelable","eventPhase","localX","localY","stageX","stageY","relatedObject","ctrlKey","altKey","shiftKey","buttonDown","delta"); + override public function toString():String { + return this.formatToString("MouseEvent", "type", "bubbles", "cancelable", "eventPhase", "localX", "localY", "stageX", "stageY", "relatedObject", "ctrlKey", "altKey", "shiftKey", "buttonDown", "delta"); } public function get isRelatedObjectInaccessible():Boolean { @@ -98,7 +92,7 @@ package flash.events public native function updateAfterEvent():void; - public native function get stageX() : Number; - public native function get stageY() : Number; + public native function get stageX():Number; + public native function get stageY():Number; } } diff --git a/core/src/avm2/globals/flash/events/NativeWindowBoundsEvent.as b/core/src/avm2/globals/flash/events/NativeWindowBoundsEvent.as index 3fadc03840eb..b03f5f7eb26d 100644 --- a/core/src/avm2/globals/flash/events/NativeWindowBoundsEvent.as +++ b/core/src/avm2/globals/flash/events/NativeWindowBoundsEvent.as @@ -3,57 +3,50 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.events -{ - - import flash.geom.Rectangle; - - [API("661")] - public class NativeWindowBoundsEvent extends Event - { - public static const MOVING:String = "moving"; - public static const MOVE:String = "move"; - public static const RESIZING:String = "resizing"; - public static const RESIZE:String = "resize"; - - // The bounds of the window before the change. - private var _beforeBounds:Rectangle; - - // The bounds of the window after the change. - private var _afterBounds:Rectangle; - - public function NativeWindowBoundsEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, beforeBounds:Rectangle = null, afterBounds:Rectangle = null) - { - super(type, bubbles, cancelable); - this._beforeBounds = beforeBounds; - this._afterBounds = afterBounds; - } - - // [override] Creates a copy of the NativeWindowBoundsEvent object and sets the value of each property to match that of the original. - override public function clone():Event - { - return new NativeWindowBoundsEvent(this.type, this.bubbles, this.cancelable, this.beforeBounds, this.afterBounds); - } - - // [override] Returns a string that contains all the properties of the NativeWindowBoundsEvent object. - override public function toString():String - { - // According to the documentation, the format should be: - // [NativeWindowBoundsEvent type=value bubbles=value cancelable=value previousDisplayState=value currentDisplayState=value] - // but it seems that previousDisplayState and currentDisplayState doesn't exist. - // It's likely a mistake in the documentation. - return this.formatToString("NativeWindowBoundsEvent", "type", "bubbles", "cancelable", "beforeBounds", "afterBounds"); - } - - public function get beforeBounds():Rectangle - { - return this._beforeBounds; - } +package flash.events { + + import flash.geom.Rectangle; + + [API("661")] + public class NativeWindowBoundsEvent extends Event { + public static const MOVING:String = "moving"; + public static const MOVE:String = "move"; + public static const RESIZING:String = "resizing"; + public static const RESIZE:String = "resize"; + + // The bounds of the window before the change. + private var _beforeBounds:Rectangle; + + // The bounds of the window after the change. + private var _afterBounds:Rectangle; + + public function NativeWindowBoundsEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, beforeBounds:Rectangle = null, afterBounds:Rectangle = null) { + super(type, bubbles, cancelable); + this._beforeBounds = beforeBounds; + this._afterBounds = afterBounds; + } + + // [override] Creates a copy of the NativeWindowBoundsEvent object and sets the value of each property to match that of the original. + override public function clone():Event { + return new NativeWindowBoundsEvent(this.type, this.bubbles, this.cancelable, this.beforeBounds, this.afterBounds); + } + + // [override] Returns a string that contains all the properties of the NativeWindowBoundsEvent object. + override public function toString():String { + // According to the documentation, the format should be: + // [NativeWindowBoundsEvent type=value bubbles=value cancelable=value previousDisplayState=value currentDisplayState=value] + // but it seems that previousDisplayState and currentDisplayState doesn't exist. + // It's likely a mistake in the documentation. + return this.formatToString("NativeWindowBoundsEvent", "type", "bubbles", "cancelable", "beforeBounds", "afterBounds"); + } + + public function get beforeBounds():Rectangle { + return this._beforeBounds; + } + + public function get afterBounds():Rectangle { + return this._afterBounds; + } - public function get afterBounds():Rectangle - { - return this._afterBounds; } - - } } diff --git a/core/src/avm2/globals/flash/events/NativeWindowDisplayStateEvent.as b/core/src/avm2/globals/flash/events/NativeWindowDisplayStateEvent.as index 0bcdeb15b680..5694ca8a037e 100644 --- a/core/src/avm2/globals/flash/events/NativeWindowDisplayStateEvent.as +++ b/core/src/avm2/globals/flash/events/NativeWindowDisplayStateEvent.as @@ -3,48 +3,41 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.events -{ - [API("661")] - public class NativeWindowDisplayStateEvent extends Event - { - public static const DISPLAY_STATE_CHANGING:String = "displayStateChanging"; - public static const DISPLAY_STATE_CHANGE:String = "displayStateChange"; - - // The display state of the NativeWindow before the change. - private var _beforeDisplayState:String; - - // The display state of the NativeWindow after the change. - private var _afterDisplayState:String; - - public function NativeWindowDisplayStateEvent(type:String, bubbles:Boolean = true, cancelable:Boolean = false, beforeDisplayState:String = "", afterDisplayState:String = "") - { - super(type, bubbles, cancelable); - this._beforeDisplayState = beforeDisplayState; - this._afterDisplayState = afterDisplayState; - } - - // [override] Creates a copy of the NativeWindowDisplayStateEvent object and sets the value of each property to match that of the original. - override public function clone():Event - { - return new NativeWindowDisplayStateEvent(this.type, this.bubbles, this.cancelable, this.beforeDisplayState, this.afterDisplayState); - } - - // [override] Returns a string that contains all the properties of the NativeWindowDisplayStateEvent object. - override public function toString():String - { - return this.formatToString("NativeWindowDisplayStateEvent", "type", "bubbles", "cancelable", "beforeDisplayState", "afterDisplayState"); - } - - public function get beforeDisplayState():String - { - return this._beforeDisplayState; - } +package flash.events { + [API("661")] + public class NativeWindowDisplayStateEvent extends Event { + public static const DISPLAY_STATE_CHANGING:String = "displayStateChanging"; + public static const DISPLAY_STATE_CHANGE:String = "displayStateChange"; + + // The display state of the NativeWindow before the change. + private var _beforeDisplayState:String; + + // The display state of the NativeWindow after the change. + private var _afterDisplayState:String; + + public function NativeWindowDisplayStateEvent(type:String, bubbles:Boolean = true, cancelable:Boolean = false, beforeDisplayState:String = "", afterDisplayState:String = "") { + super(type, bubbles, cancelable); + this._beforeDisplayState = beforeDisplayState; + this._afterDisplayState = afterDisplayState; + } + + // [override] Creates a copy of the NativeWindowDisplayStateEvent object and sets the value of each property to match that of the original. + override public function clone():Event { + return new NativeWindowDisplayStateEvent(this.type, this.bubbles, this.cancelable, this.beforeDisplayState, this.afterDisplayState); + } + + // [override] Returns a string that contains all the properties of the NativeWindowDisplayStateEvent object. + override public function toString():String { + return this.formatToString("NativeWindowDisplayStateEvent", "type", "bubbles", "cancelable", "beforeDisplayState", "afterDisplayState"); + } + + public function get beforeDisplayState():String { + return this._beforeDisplayState; + } + + public function get afterDisplayState():String { + return this._afterDisplayState; + } - public function get afterDisplayState():String - { - return this._afterDisplayState; } - - } } diff --git a/core/src/avm2/globals/flash/events/NetDataEvent.as b/core/src/avm2/globals/flash/events/NetDataEvent.as index cd941ea60c2e..42baf1491eb9 100644 --- a/core/src/avm2/globals/flash/events/NetDataEvent.as +++ b/core/src/avm2/globals/flash/events/NetDataEvent.as @@ -1,53 +1,43 @@ -// The initial version of this file was autogenerated from the official AS3 reference at +// The initial version of this file was autogenerated from the official AS3 reference at // https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/NetDataEvent.html // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.events -{ - - public class NetDataEvent extends Event - { +package flash.events { + + public class NetDataEvent extends Event { // The NetDataEvent.MEDIA_TYPE_DATA constant defines the value of the type property of the NetDataEvent object // dispatched when a data message in the media stream is encountered by the NetStream object. public static const MEDIA_TYPE_DATA:String = "mediaTypeData"; // The timestamp of the data message in the media stream. - private var _timestamp: Number; + private var _timestamp:Number; // A data object describing the message. - private var _info: Object; + private var _info:Object; - public function NetDataEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, timestamp:Number = 0, info:Object = null) - { - super(type,bubbles,cancelable); + public function NetDataEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, timestamp:Number = 0, info:Object = null) { + super(type, bubbles, cancelable); this._timestamp = timestamp; this._info = info; } - // Creates a copy of an NetDataEvent object and sets the value of each property to match that of the original. - override public function clone():Event - { + override public function clone():Event { return new NetDataEvent(this.type, this.bubbles, this.cancelable, this.timestamp, this.info); } // Returns a string that contains all the properties of the NetDataEvent object. - override public function toString():String - { - return this.formatToString("NetDataEvent","type","bubbles","cancelable","eventPhase","timestamp"); + override public function toString():String { + return this.formatToString("NetDataEvent", "type", "bubbles", "cancelable", "eventPhase", "timestamp"); } - public function get timestamp() : Number - { + public function get timestamp():Number { return this._timestamp; } - - public function get info() : Object - { + public function get info():Object { return this._info; } - + } } - diff --git a/core/src/avm2/globals/flash/events/NetFilterEvent.as b/core/src/avm2/globals/flash/events/NetFilterEvent.as index 850c0e96c4c5..f189cfc9e1ad 100644 --- a/core/src/avm2/globals/flash/events/NetFilterEvent.as +++ b/core/src/avm2/globals/flash/events/NetFilterEvent.as @@ -2,22 +2,21 @@ package flash.events { import flash.utils.ByteArray; public class NetFilterEvent extends Event { - public var header: ByteArray; - public var data: ByteArray; + public var header:ByteArray; + public var data:ByteArray; - public function NetFilterEvent(type: String, bubbles: Boolean = false, cancelable: Boolean = false, header: ByteArray = null, data: ByteArray = null) { + public function NetFilterEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, header:ByteArray = null, data:ByteArray = null) { super(type, bubbles, cancelable); this.header = header; this.data = data; } - override public function clone(): Event { + override public function clone():Event { return new NetFilterEvent(this.type, this.bubbles, this.cancelable, this.header, this.data); } - override public function toString(): String { + override public function toString():String { return this.formatToString("NetTransformEvent", "type", "bubbles", "cancelable", "eventPhase", "header", "data"); } } } - diff --git a/core/src/avm2/globals/flash/events/NetStatusEvent.as b/core/src/avm2/globals/flash/events/NetStatusEvent.as index 8ea322aaf0fb..3479ca244a5d 100644 --- a/core/src/avm2/globals/flash/events/NetStatusEvent.as +++ b/core/src/avm2/globals/flash/events/NetStatusEvent.as @@ -1,34 +1,27 @@ -// The initial version of this file was autogenerated from the official AS3 reference at +// The initial version of this file was autogenerated from the official AS3 reference at // https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/NetStatusEvent.html // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.events -{ - - public class NetStatusEvent extends Event - { +package flash.events { + + public class NetStatusEvent extends Event { public static const NET_STATUS:String = "netStatus"; // Defines the value of the type property of a netStatus event object. - public var info: Object; // An object with properties that describe the object's status or error condition. + public var info:Object; // An object with properties that describe the object's status or error condition. - public function NetStatusEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, info:Object = null) - { - super(type,bubbles,cancelable); + public function NetStatusEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, info:Object = null) { + super(type, bubbles, cancelable); this.info = info; } - - // Creates a copy of the NetStatusEvent object and sets the value of each property to match that of the original. - override public function clone():Event - { + // Creates a copy of the NetStatusEvent object and sets the value of each property to match that of the original. + override public function clone():Event { return new NetStatusEvent(this.type, this.bubbles, this.cancelable, this.info); } - // Returns a string that contains all the properties of the NetStatusEvent object. - override public function toString():String - { - return this.formatToString("NetStatusEvent","type","bubbles","cancelable","eventPhase","info"); + // Returns a string that contains all the properties of the NetStatusEvent object. + override public function toString():String { + return this.formatToString("NetStatusEvent", "type", "bubbles", "cancelable", "eventPhase", "info"); } } } - diff --git a/core/src/avm2/globals/flash/events/PressAndTapGestureEvent.as b/core/src/avm2/globals/flash/events/PressAndTapGestureEvent.as index 3cb58bbd181d..e929db313360 100644 --- a/core/src/avm2/globals/flash/events/PressAndTapGestureEvent.as +++ b/core/src/avm2/globals/flash/events/PressAndTapGestureEvent.as @@ -1,20 +1,18 @@ -package flash.events -{ +package flash.events { [API("667")] - public class PressAndTapGestureEvent extends GestureEvent - { - public static const GESTURE_PRESS_AND_TAP : String = "gesturePressAndTap"; + public class PressAndTapGestureEvent extends GestureEvent { + public static const GESTURE_PRESS_AND_TAP:String = "gesturePressAndTap"; [Ruffle(NativeAccessible)] - private var _tapLocalX: Number; + private var _tapLocalX:Number; [Ruffle(NativeAccessible)] - private var _tapLocalY: Number; + private var _tapLocalY:Number; public function PressAndTapGestureEvent(type:String, bubbles:Boolean = true, cancelable:Boolean = false, phase:String = null, - localX:Number = 0, localY:Number = 0, tapLocalX:Number = 0, tapLocalY:Number = 0, - ctrlKey:Boolean = false, altKey:Boolean = false, shiftKey:Boolean = false, - controlKey:Boolean = false) { + localX:Number = 0, localY:Number = 0, tapLocalX:Number = 0, tapLocalY:Number = 0, + ctrlKey:Boolean = false, altKey:Boolean = false, shiftKey:Boolean = false, + controlKey:Boolean = false) { super(type, bubbles, cancelable, phase, localX, localY, ctrlKey, altKey, shiftKey, controlKey); this._tapLocalX = tapLocalX; this._tapLocalY = tapLocalY; @@ -22,28 +20,27 @@ package flash.events override public function clone():Event { return new PressAndTapGestureEvent(this.type, this.bubbles, this.cancelable, this.phase, this.localX, this.localY, - this.tapLocalX, this.tapLocalY, this.ctrlKey, this.altKey, this.shiftKey, this.controlKey); + this.tapLocalX, this.tapLocalY, this.ctrlKey, this.altKey, this.shiftKey, this.controlKey); } - override public function toString():String - { + override public function toString():String { // should fail on FP too, see discussion https://github.com/ruffle-rs/ruffle/pull/12330 - return this.formatToString("GestureEvent","type","bubbles","cancelable","args"); + return this.formatToString("GestureEvent", "type", "bubbles", "cancelable", "args"); } - public function get tapLocalX(): Number { + public function get tapLocalX():Number { return this._tapLocalX; } - public function set tapLocalX(value: Number): void { + public function set tapLocalX(value:Number):void { this._tapLocalX = value; } - public function get tapLocalY(): Number { + public function get tapLocalY():Number { return this._tapLocalY; } - public function set tapLocalY(value: Number): void { + public function set tapLocalY(value:Number):void { this._tapLocalY = value; } diff --git a/core/src/avm2/globals/flash/events/ProgressEvent.as b/core/src/avm2/globals/flash/events/ProgressEvent.as index 4ba034ba99fb..270b374fa1e0 100644 --- a/core/src/avm2/globals/flash/events/ProgressEvent.as +++ b/core/src/avm2/globals/flash/events/ProgressEvent.as @@ -6,21 +6,18 @@ package flash.events { public var bytesLoaded:Number; public var bytesTotal:Number; - public function ProgressEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, bytesLoaded:Number = 0, bytesTotal:Number = 0) - { - super(type,bubbles,cancelable); + public function ProgressEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, bytesLoaded:Number = 0, bytesTotal:Number = 0) { + super(type, bubbles, cancelable); this.bytesLoaded = bytesLoaded; this.bytesTotal = bytesTotal; } - override public function clone() : Event - { - return new ProgressEvent(this.type,this.bubbles,this.cancelable,this.bytesLoaded,this.bytesTotal); + override public function clone():Event { + return new ProgressEvent(this.type, this.bubbles, this.cancelable, this.bytesLoaded, this.bytesTotal); } - override public function toString() : String - { - return this.formatToString("ProgressEvent","type","bubbles","cancelable","eventPhase","bytesLoaded","bytesTotal"); + override public function toString():String { + return this.formatToString("ProgressEvent", "type", "bubbles", "cancelable", "eventPhase", "bytesLoaded", "bytesTotal"); } } } diff --git a/core/src/avm2/globals/flash/events/SampleDataEvent.as b/core/src/avm2/globals/flash/events/SampleDataEvent.as index c4f27e853f13..4fb3e2a494f6 100644 --- a/core/src/avm2/globals/flash/events/SampleDataEvent.as +++ b/core/src/avm2/globals/flash/events/SampleDataEvent.as @@ -1,38 +1,31 @@ -// The initial version of this file was autogenerated from the official AS3 reference at +// The initial version of this file was autogenerated from the official AS3 reference at // https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/SampleDataEvent.html // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.events -{ - +package flash.events { + import flash.utils.ByteArray; - - public class SampleDataEvent extends Event - { + + public class SampleDataEvent extends Event { public static const SAMPLE_DATA:String = "sampleData"; // Defines the value of the type property of a SampleDataEvent event object. - public var position: Number; // The position of the data in the audio stream. - public var data: ByteArray; // The data in the audio stream. + public var position:Number; // The position of the data in the audio stream. + public var data:ByteArray; // The data in the audio stream. - public function SampleDataEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, theposition:Number = 0, thedata:ByteArray = null) - { - super(type,bubbles,cancelable); + public function SampleDataEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, theposition:Number = 0, thedata:ByteArray = null) { + super(type, bubbles, cancelable); this.position = theposition; this.data = thedata; } - - // Creates a copy of the SampleDataEvent object and sets each property's value to match that of the original. - override public function clone():Event - { + // Creates a copy of the SampleDataEvent object and sets each property's value to match that of the original. + override public function clone():Event { return new SampleDataEvent(this.type, this.bubbles, this.cancelable, this.position, this.data); } - // Returns a string that contains all the properties of the SampleDataEvent object. - override public function toString():String - { - return this.formatToString("SampleDataEvent","type","bubbles","cancelable","eventPhase"); + // Returns a string that contains all the properties of the SampleDataEvent object. + override public function toString():String { + return this.formatToString("SampleDataEvent", "type", "bubbles", "cancelable", "eventPhase"); } } } - diff --git a/core/src/avm2/globals/flash/events/SecurityErrorEvent.as b/core/src/avm2/globals/flash/events/SecurityErrorEvent.as index b29f14436eae..df661f315b65 100644 --- a/core/src/avm2/globals/flash/events/SecurityErrorEvent.as +++ b/core/src/avm2/globals/flash/events/SecurityErrorEvent.as @@ -3,19 +3,16 @@ package flash.events { public static const SECURITY_ERROR:String = "securityError"; - public function SecurityErrorEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, text:String = "", id:int = 0) - { - super(type,bubbles,cancelable,text,id); + public function SecurityErrorEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, text:String = "", id:int = 0) { + super(type, bubbles, cancelable, text, id); } - override public function clone() : Event - { - return new SecurityErrorEvent(this.type,this.bubbles,this.cancelable,this.text,this.errorID); + override public function clone():Event { + return new SecurityErrorEvent(this.type, this.bubbles, this.cancelable, this.text, this.errorID); } - override public function toString() : String - { - return this.formatToString("SecurityErrorEvent","type","bubbles","cancelable","eventPhase","text"); + override public function toString():String { + return this.formatToString("SecurityErrorEvent", "type", "bubbles", "cancelable", "eventPhase", "text"); } } } diff --git a/core/src/avm2/globals/flash/events/ShaderEvent.as b/core/src/avm2/globals/flash/events/ShaderEvent.as index 25ca1f2b0489..e91ae419bb48 100644 --- a/core/src/avm2/globals/flash/events/ShaderEvent.as +++ b/core/src/avm2/globals/flash/events/ShaderEvent.as @@ -1,41 +1,34 @@ -// The initial version of this file was autogenerated from the official AS3 reference at +// The initial version of this file was autogenerated from the official AS3 reference at // https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/ShaderEvent.html // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.events -{ - +package flash.events { + import flash.display.BitmapData; import flash.utils.ByteArray; - - public class ShaderEvent extends Event - { + + public class ShaderEvent extends Event { public static const COMPLETE:String = "complete"; // Defines the value of the type property of a complete event object. - public var vector: Vector.; // The Vector. object that was passed to the ShaderJob.start() method. - public var bitmapData: BitmapData; // The BitmapData object that was passed to the ShaderJob.start() method. - public var byteArray: ByteArray; // The ByteArray object that was passed to the ShaderJob.start() method. + public var vector:Vector.; // The Vector. object that was passed to the ShaderJob.start() method. + public var bitmapData:BitmapData; // The BitmapData object that was passed to the ShaderJob.start() method. + public var byteArray:ByteArray; // The ByteArray object that was passed to the ShaderJob.start() method. - public function ShaderEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, bitmap:BitmapData = null, array:ByteArray = null, vector:Vector. = null) - { - super(type,bubbles,cancelable); + public function ShaderEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, bitmap:BitmapData = null, array:ByteArray = null, vector:Vector. = null) { + super(type, bubbles, cancelable); this.bitmapData = bitmap; this.byteArray = array; this.vector = vector; } - - // Creates a copy of the ShaderEvent object and sets the value of each property to match that of the original. - override public function clone():Event - { + // Creates a copy of the ShaderEvent object and sets the value of each property to match that of the original. + override public function clone():Event { return new ShaderEvent(this.type, this.bubbles, this.cancelable, this.vector); } - // Returns a string that contains all the properties of the ShaderEvent object. - override public function toString():String - { - return this.formatToString("ShaderEvent","type","bubbles","cancelable","eventPhase","bitmapData","byteArray","vector"); + // Returns a string that contains all the properties of the ShaderEvent object. + override public function toString():String { + return this.formatToString("ShaderEvent", "type", "bubbles", "cancelable", "eventPhase", "bitmapData", "byteArray", "vector"); } } } - diff --git a/core/src/avm2/globals/flash/events/SoftKeyboardEvent.as b/core/src/avm2/globals/flash/events/SoftKeyboardEvent.as index 78b6b302bc81..0b666438336b 100644 --- a/core/src/avm2/globals/flash/events/SoftKeyboardEvent.as +++ b/core/src/avm2/globals/flash/events/SoftKeyboardEvent.as @@ -1,14 +1,12 @@ -// The initial version of this file was autogenerated from the official AS3 reference at +// The initial version of this file was autogenerated from the official AS3 reference at // https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/SoftKeyboardEvent.html // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.events -{ - +package flash.events { + import flash.display.InteractiveObject; - - public class SoftKeyboardEvent extends Event - { + + public class SoftKeyboardEvent extends Event { // The SoftKeyboardEvent.SOFT_KEYBOARD_ACTIVATE constant defines the value of the type property SoftKeyboardEvent object when a soft keyboard is displayed. public static const SOFT_KEYBOARD_ACTIVATE:String = "softKeyboardActivate"; @@ -19,35 +17,30 @@ package flash.events public static const SOFT_KEYBOARD_DEACTIVATE:String = "softKeyboardDeactivate"; // A reference to a display list object that is related to the event. - public var relatedObject: InteractiveObject; + public var relatedObject:InteractiveObject; // Indicates whether the change in keyboard status has been triggered by an application (such as programmatic use of requestSoftKeyboard()) or by the user (such as selecting a text field). - private var _triggerType: String; + private var _triggerType:String; - public function SoftKeyboardEvent(type:String, bubbles:Boolean, cancelable:Boolean, relatedObjectVal:InteractiveObject, triggerTypeVal:String) - { - super(type,bubbles,cancelable); + public function SoftKeyboardEvent(type:String, bubbles:Boolean, cancelable:Boolean, relatedObjectVal:InteractiveObject, triggerTypeVal:String) { + super(type, bubbles, cancelable); this.relatedObject = relatedObjectVal; this._triggerType = triggerTypeVal; } // Creates a copy of a SoftKeyboardEvent object and sets the value of each property to match that of the original. - override public function clone():Event - { + override public function clone():Event { return new SoftKeyboardEvent(this.type, this.bubbles, this.cancelable, this.relatedObject, this.triggerType); } // Returns a string that contains all the properties of the SoftKeyboardEvent object. - override public function toString():String - { - return this.formatToString("SoftKeyboardEvent","type","bubbles","cancelable","eventPhase","relatedObjectVal","triggerTypeVal", "activating"); + override public function toString():String { + return this.formatToString("SoftKeyboardEvent", "type", "bubbles", "cancelable", "eventPhase", "relatedObjectVal", "triggerTypeVal", "activating"); } - public function get triggerType() : String - { + public function get triggerType():String { return this._triggerType; } - + } } - diff --git a/core/src/avm2/globals/flash/events/SoftKeyboardTrigger.as b/core/src/avm2/globals/flash/events/SoftKeyboardTrigger.as index 5e6c4415af08..6a42692e6de0 100644 --- a/core/src/avm2/globals/flash/events/SoftKeyboardTrigger.as +++ b/core/src/avm2/globals/flash/events/SoftKeyboardTrigger.as @@ -1,8 +1,6 @@ -package flash.events -{ +package flash.events { - public class SoftKeyboardTrigger - { + public class SoftKeyboardTrigger { // Indicates that ActionScript invoked the event. public static const CONTENT_TRIGGERED:String = "contentTriggered"; diff --git a/core/src/avm2/globals/flash/events/StageVideoAvailabilityEvent.as b/core/src/avm2/globals/flash/events/StageVideoAvailabilityEvent.as index be01fbfe0204..e4fcb06a9e2a 100644 --- a/core/src/avm2/globals/flash/events/StageVideoAvailabilityEvent.as +++ b/core/src/avm2/globals/flash/events/StageVideoAvailabilityEvent.as @@ -1,30 +1,24 @@ -// The initial version of this file was autogenerated from the official AS3 reference at +// The initial version of this file was autogenerated from the official AS3 reference at // https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/StageVideoAvailabilityEvent.html // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.events -{ - - public class StageVideoAvailabilityEvent extends Event - { - public const driver:String; - public const reason:String; +package flash.events { + + public class StageVideoAvailabilityEvent extends Event { + public const driver:String; + public const reason:String; public static const STAGE_VIDEO_AVAILABILITY:String = "stageVideoAvailability"; // Defines the value of the type property of a stageVideoAvailability event object. - private var _availability: String; // Reports the current availability of stage video using a constant of the flash.media.StageVideoAvailability class. + private var _availability:String; // Reports the current availability of stage video using a constant of the flash.media.StageVideoAvailability class. - public function StageVideoAvailabilityEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, availability:String = null) - { - super(type,bubbles,cancelable); + public function StageVideoAvailabilityEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, availability:String = null) { + super(type, bubbles, cancelable); this._availability = availability; } - - public function get availability() : String - { + public function get availability():String { return this._availability; } - + } } - diff --git a/core/src/avm2/globals/flash/events/StageVideoEvent.as b/core/src/avm2/globals/flash/events/StageVideoEvent.as index 96360607d483..7d59aed59023 100644 --- a/core/src/avm2/globals/flash/events/StageVideoEvent.as +++ b/core/src/avm2/globals/flash/events/StageVideoEvent.as @@ -1,55 +1,46 @@ -// The initial version of this file was autogenerated from the official AS3 reference at +// The initial version of this file was autogenerated from the official AS3 reference at // https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/StageVideoEvent.html // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.events -{ - +package flash.events { + // According to the AS3 docs, this class is only available starting with Flash Player 10.2, // and some members of it are AIR-only. This is yet another case of misdocumentation. [API("667")] - public class StageVideoEvent extends Event - { + public class StageVideoEvent extends Event { // The StageVideoEvent.RENDER_STATE constant defines the value of the type property of a renderState event object. public static const RENDER_STATE:String = "renderState"; // Indicates that hardware is decoding and displaying the video. // Deprecated since Flash Player 10.2, AIR 3: Please Use flash.media.VideoStatus.ACCELERATED - public static const RENDER_STATUS_ACCELERATED : String = "accelerated"; + public static const RENDER_STATUS_ACCELERATED:String = "accelerated"; // Indicates that software is decoding and displaying the video. // Deprecated since Flash Player 10.2, AIR 3: Please Use flash.media.VideoStatus.SOFTWARE - public static const RENDER_STATUS_SOFTWARE : String = "software"; + public static const RENDER_STATUS_SOFTWARE:String = "software"; // Indicates that displaying the video using the StageVideo object is not possible. // Deprecated since Flash Player 10.2, AIR 3: Please Use flash.media.VideoStatus.UNAVAILABLE - public static const RENDER_STATUS_UNAVAILABLE : String = "unavailable"; - + public static const RENDER_STATUS_UNAVAILABLE:String = "unavailable"; public const codecInfo:String; - private var _status: String; // The status of the StageVideo object. - private var _colorSpace: String; // The color space used by the video being displayed in the StageVideo object. + private var _status:String; // The status of the StageVideo object. + private var _colorSpace:String; // The color space used by the video being displayed in the StageVideo object. - public function StageVideoEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, status:String = null, colorSpace:String = null) - { - super(type,bubbles,cancelable); + public function StageVideoEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, status:String = null, colorSpace:String = null) { + super(type, bubbles, cancelable); this._status = status; this._colorSpace = colorSpace; } - - public function get status() : String - { + public function get status():String { return this._status; } - - public function get colorSpace() : String - { + public function get colorSpace():String { return this._colorSpace; } - + } } - diff --git a/core/src/avm2/globals/flash/events/StatusEvent.as b/core/src/avm2/globals/flash/events/StatusEvent.as index ce0bba13a440..95282c0adeaa 100644 --- a/core/src/avm2/globals/flash/events/StatusEvent.as +++ b/core/src/avm2/globals/flash/events/StatusEvent.as @@ -1,36 +1,29 @@ -// The initial version of this file was autogenerated from the official AS3 reference at +// The initial version of this file was autogenerated from the official AS3 reference at // https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/StatusEvent.html // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.events -{ - - public class StatusEvent extends Event - { +package flash.events { + + public class StatusEvent extends Event { public static const STATUS:String = "status"; // Defines the value of the type property of a status event object. - public var code: String; // A description of the object's status. - public var level: String; // The category of the message, such as "status", "warning" or "error". + public var code:String; // A description of the object's status. + public var level:String; // The category of the message, such as "status", "warning" or "error". - public function StatusEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, code:String = "", level:String = "") - { - super(type,bubbles,cancelable); + public function StatusEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, code:String = "", level:String = "") { + super(type, bubbles, cancelable); this.code = code; this.level = level; } - - // Creates a copy of the StatusEvent object and sets the value of each property to match that of the original. - override public function clone():Event - { + // Creates a copy of the StatusEvent object and sets the value of each property to match that of the original. + override public function clone():Event { return new StatusEvent(this.type, this.bubbles, this.cancelable, this.code, this.level); } - // Returns a string that contains all the properties of the StatusEvent object. - override public function toString():String - { - return this.formatToString("StatusEvent","type","bubbles","cancelable","eventPhase","code","level"); + // Returns a string that contains all the properties of the StatusEvent object. + override public function toString():String { + return this.formatToString("StatusEvent", "type", "bubbles", "cancelable", "eventPhase", "code", "level"); } } } - diff --git a/core/src/avm2/globals/flash/events/SyncEvent.as b/core/src/avm2/globals/flash/events/SyncEvent.as index 06b888b1c124..782866e7ca30 100644 --- a/core/src/avm2/globals/flash/events/SyncEvent.as +++ b/core/src/avm2/globals/flash/events/SyncEvent.as @@ -1,34 +1,27 @@ -// The initial version of this file was autogenerated from the official AS3 reference at +// The initial version of this file was autogenerated from the official AS3 reference at // https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/SyncEvent.html // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.events -{ - - public class SyncEvent extends Event - { +package flash.events { + + public class SyncEvent extends Event { public static const SYNC:String = "sync"; // Defines the value of the type property of a sync event object. - public var changeList: Array; // An array of objects; each object contains properties that describe the changed members of a remote shared object. + public var changeList:Array; // An array of objects; each object contains properties that describe the changed members of a remote shared object. - public function SyncEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, changeList:Array = null) - { - super(type,bubbles,cancelable); + public function SyncEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, changeList:Array = null) { + super(type, bubbles, cancelable); this.changeList = changeList; } - - // Creates a copy of the SyncEvent object and sets the value of each property to match that of the original. - override public function clone():Event - { + // Creates a copy of the SyncEvent object and sets the value of each property to match that of the original. + override public function clone():Event { return new SyncEvent(this.type, this.bubbles, this.cancelable, this.changeList); } - // Returns a string that contains all the properties of the SyncEvent object. - override public function toString():String - { - return this.formatToString("SyncEvent","type","bubbles","cancelable","eventPhase", "changeList"); + // Returns a string that contains all the properties of the SyncEvent object. + override public function toString():String { + return this.formatToString("SyncEvent", "type", "bubbles", "cancelable", "eventPhase", "changeList"); } } } - diff --git a/core/src/avm2/globals/flash/events/TextEvent.as b/core/src/avm2/globals/flash/events/TextEvent.as index 23f824f59ce7..4ef4d1422eaf 100644 --- a/core/src/avm2/globals/flash/events/TextEvent.as +++ b/core/src/avm2/globals/flash/events/TextEvent.as @@ -6,20 +6,17 @@ package flash.events { public var text:String; - public function TextEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, text:String = "") - { - super(type,bubbles,cancelable); + public function TextEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, text:String = "") { + super(type, bubbles, cancelable); this.text = text; } - override public function clone() : Event - { - return new TextEvent(this.type,this.bubbles,this.cancelable,this.text); + override public function clone():Event { + return new TextEvent(this.type, this.bubbles, this.cancelable, this.text); } - override public function toString() : String - { - return this.formatToString("TextEvent","type","bubbles","cancelable","eventPhase","text"); + override public function toString():String { + return this.formatToString("TextEvent", "type", "bubbles", "cancelable", "eventPhase", "text"); } } } diff --git a/core/src/avm2/globals/flash/events/ThrottleEvent.as b/core/src/avm2/globals/flash/events/ThrottleEvent.as index 797213fe2d4f..099aabedf14f 100644 --- a/core/src/avm2/globals/flash/events/ThrottleEvent.as +++ b/core/src/avm2/globals/flash/events/ThrottleEvent.as @@ -1,49 +1,40 @@ -// The initial version of this file was autogenerated from the official AS3 reference at +// The initial version of this file was autogenerated from the official AS3 reference at // https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/ThrottleEvent.html // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.events -{ - - [API("676")] // the docs say 674, that's wrong - public class ThrottleEvent extends Event - { +package flash.events { + + [API("676")] + // the docs say 674, that's wrong + public class ThrottleEvent extends Event { public static const THROTTLE:String = "throttle"; // Defines the value of the type property of a ThrottleEvent event object. - private var _state: String; // Describes the state that the player is entering: ThrottleType.THROTTLE, ThrottleType.PAUSE, or ThrottleType.RESUME. - private var _targetFrameRate: Number; // The frame rate that Flash Player or AIR targets after the ThrottleEvent is dispatched. + private var _state:String; // Describes the state that the player is entering: ThrottleType.THROTTLE, ThrottleType.PAUSE, or ThrottleType.RESUME. + private var _targetFrameRate:Number; // The frame rate that Flash Player or AIR targets after the ThrottleEvent is dispatched. - public function ThrottleEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, state:String = null, targetFrameRate:Number = 0) - { - super(type,bubbles,cancelable); + public function ThrottleEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, state:String = null, targetFrameRate:Number = 0) { + super(type, bubbles, cancelable); this._state = state; this._targetFrameRate = targetFrameRate; } - - // Creates a copy of the ThrottleEvent object and sets the value of each property to match that of the original. - override public function clone():Event - { + // Creates a copy of the ThrottleEvent object and sets the value of each property to match that of the original. + override public function clone():Event { return new ThrottleEvent(this.type, this.bubbles, this.cancelable, this.state, this.targetFrameRate); } - // Returns a string that contains all the properties of the ThrottleEvent object. - override public function toString():String - { - return this.formatToString("ThrottleEvent","type","bubbles","cancelable","eventPhase","state","targetFrameRate"); + // Returns a string that contains all the properties of the ThrottleEvent object. + override public function toString():String { + return this.formatToString("ThrottleEvent", "type", "bubbles", "cancelable", "eventPhase", "state", "targetFrameRate"); } - public function get state() : String - { + public function get state():String { return this._state; } - - public function get targetFrameRate() : Number - { + public function get targetFrameRate():Number { return this._targetFrameRate; } - + } } - diff --git a/core/src/avm2/globals/flash/events/ThrottleType.as b/core/src/avm2/globals/flash/events/ThrottleType.as index 365af3dd01e9..44769ad612bb 100644 --- a/core/src/avm2/globals/flash/events/ThrottleType.as +++ b/core/src/avm2/globals/flash/events/ThrottleType.as @@ -1,9 +1,8 @@ -package flash.events -{ +package flash.events { - [API("676")] // the docs say 674, that's wrong - public class ThrottleType - { + [API("676")] + // the docs say 674, that's wrong + public class ThrottleType { // This constant is used for the status property in the ThrottleEvent class. public static const PAUSE:String = "pause"; diff --git a/core/src/avm2/globals/flash/events/TimerEvent.as b/core/src/avm2/globals/flash/events/TimerEvent.as index f068931768ec..501f329a90dd 100644 --- a/core/src/avm2/globals/flash/events/TimerEvent.as +++ b/core/src/avm2/globals/flash/events/TimerEvent.as @@ -1,22 +1,22 @@ package flash.events { - import __ruffle__.stub_method; - public class TimerEvent extends Event{ - public static const TIMER:String = "timer"; - public static const TIMER_COMPLETE:String = "timerComplete"; + import __ruffle__.stub_method; + public class TimerEvent extends Event { + public static const TIMER:String = "timer"; + public static const TIMER_COMPLETE:String = "timerComplete"; - public function TimerEvent(type:String, bubbles:Boolean = false, cancelable:Boolean= false) { - super(type, bubbles, cancelable); - } - - override public function clone() : Event { - return new TimerEvent(this.type,this.bubbles,this.cancelable); - } + public function TimerEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false) { + super(type, bubbles, cancelable); + } - // Returns a string that contains all the properties of the TimerEvent object. - override public function toString():String { - return this.formatToString("TimerEvent","type","bubbles","cancelable", "eventPhase"); - } + override public function clone():Event { + return new TimerEvent(this.type, this.bubbles, this.cancelable); + } - public native function updateAfterEvent():void; - } + // Returns a string that contains all the properties of the TimerEvent object. + override public function toString():String { + return this.formatToString("TimerEvent", "type", "bubbles", "cancelable", "eventPhase"); + } + + public native function updateAfterEvent():void; + } } diff --git a/core/src/avm2/globals/flash/events/TouchEvent.as b/core/src/avm2/globals/flash/events/TouchEvent.as index adbcb849bfcc..358f6173d019 100644 --- a/core/src/avm2/globals/flash/events/TouchEvent.as +++ b/core/src/avm2/globals/flash/events/TouchEvent.as @@ -4,99 +4,98 @@ // It won't be regenerated in the future, so feel free to edit and/or fix package flash.events { -import flash.utils.ByteArray; -import flash.display.InteractiveObject; -import __ruffle__.stub_method; + import flash.utils.ByteArray; + import flash.display.InteractiveObject; + import __ruffle__.stub_method; -public class TouchEvent extends Event { - public static const PROXIMITY_BEGIN: String = "proximityBegin"; // [static] Defines the value of the type property of a PROXIMITY_BEGIN touch event object. - public static const PROXIMITY_END: String = "proximityEnd"; // [static] Defines the value of the type property of a PROXIMITY_END touch event object. - public static const PROXIMITY_MOVE: String = "proximityMove"; // [static] Defines the value of the type property of a PROXIMITY_MOVE touch event object. - public static const PROXIMITY_OUT: String = "proximityOut"; // [static] Defines the value of the type property of a PROXIMITY_OUT touch event object. - public static const PROXIMITY_OVER: String = "proximityOver"; // [static] Defines the value of the type property of a PROXIMITY_OVER touch event object. - public static const PROXIMITY_ROLL_OUT: String = "proximityRollOut"; // [static] Defines the value of the type property of a PROXIMITY_ROLL_OUT touch event object. - public static const PROXIMITY_ROLL_OVER: String = "proximityRollOver"; // [static] Defines the value of the type property of a PROXIMITY_ROLL_OVER touch event object. - public static const TOUCH_BEGIN: String = "touchBegin"; // [static] Defines the value of the type property of a TOUCH_BEGIN touch event object. - public static const TOUCH_END: String = "touchEnd"; // [static] Defines the value of the type property of a TOUCH_END touch event object. - public static const TOUCH_MOVE: String = "touchMove"; // [static] Defines the value of the type property of a TOUCH_MOVE touch event object. - public static const TOUCH_OUT: String = "touchOut"; // [static] Defines the value of the type property of a TOUCH_OUT touch event object. - public static const TOUCH_OVER: String = "touchOver"; // [static] Defines the value of the type property of a TOUCH_OVER touch event object. - public static const TOUCH_ROLL_OUT: String = "touchRollOut"; // [static] Defines the value of the type property of a TOUCH_ROLL_OUT touch event object. - public static const TOUCH_ROLL_OVER: String = "touchRollOver"; // [static] Defines the value of the type property of a TOUCH_ROLL_OVER touch event object. - public static const TOUCH_TAP: String = "touchTap"; // [static] Defines the value of the type property of a TOUCH_TAP touch event object. + public class TouchEvent extends Event { + public static const PROXIMITY_BEGIN:String = "proximityBegin"; // [static] Defines the value of the type property of a PROXIMITY_BEGIN touch event object. + public static const PROXIMITY_END:String = "proximityEnd"; // [static] Defines the value of the type property of a PROXIMITY_END touch event object. + public static const PROXIMITY_MOVE:String = "proximityMove"; // [static] Defines the value of the type property of a PROXIMITY_MOVE touch event object. + public static const PROXIMITY_OUT:String = "proximityOut"; // [static] Defines the value of the type property of a PROXIMITY_OUT touch event object. + public static const PROXIMITY_OVER:String = "proximityOver"; // [static] Defines the value of the type property of a PROXIMITY_OVER touch event object. + public static const PROXIMITY_ROLL_OUT:String = "proximityRollOut"; // [static] Defines the value of the type property of a PROXIMITY_ROLL_OUT touch event object. + public static const PROXIMITY_ROLL_OVER:String = "proximityRollOver"; // [static] Defines the value of the type property of a PROXIMITY_ROLL_OVER touch event object. + public static const TOUCH_BEGIN:String = "touchBegin"; // [static] Defines the value of the type property of a TOUCH_BEGIN touch event object. + public static const TOUCH_END:String = "touchEnd"; // [static] Defines the value of the type property of a TOUCH_END touch event object. + public static const TOUCH_MOVE:String = "touchMove"; // [static] Defines the value of the type property of a TOUCH_MOVE touch event object. + public static const TOUCH_OUT:String = "touchOut"; // [static] Defines the value of the type property of a TOUCH_OUT touch event object. + public static const TOUCH_OVER:String = "touchOver"; // [static] Defines the value of the type property of a TOUCH_OVER touch event object. + public static const TOUCH_ROLL_OUT:String = "touchRollOut"; // [static] Defines the value of the type property of a TOUCH_ROLL_OUT touch event object. + public static const TOUCH_ROLL_OVER:String = "touchRollOver"; // [static] Defines the value of the type property of a TOUCH_ROLL_OVER touch event object. + public static const TOUCH_TAP:String = "touchTap"; // [static] Defines the value of the type property of a TOUCH_TAP touch event object. - public var touchPointID: int; // A unique identification number (as an int) assigned to the touch point. - public var isPrimaryTouchPoint: Boolean; // Indicates whether the first point of contact is mapped to mouse events. - public var localX: Number; // The horizontal coordinate at which the event occurred relative to the containing sprite. - public var localY: Number; // The vertical coordinate at which the event occurred relative to the containing sprite. - public var sizeX: Number; // Width of the contact area. - public var sizeY: Number; // Height of the contact area. - public var pressure: Number; // A value between 0.0 and 1.0 indicating force of the contact with the device. - public var relatedObject: InteractiveObject; // A reference to a display list object that is related to the event. - public var ctrlKey: Boolean; // On Windows or Linux, indicates whether the Ctrl key is active (true) or inactive (false). - public var altKey: Boolean; // Indicates whether the Alt key is active (true) or inactive (false). - public var shiftKey: Boolean; // Indicates whether the Shift key is active (true) or inactive (false). - public var isRelatedObjectInaccessible: Boolean; // If true, the relatedObject property is set to null for reasons related to security sandboxes. - private var _stageX: Number; // [read-only] The horizontal coordinate at which the event occurred in global Stage coordinates. - private var _stageY: Number; // [read-only] The vertical coordinate at which the event occurred in global Stage coordinates. - - public function TouchEvent(type: String, bubbles: Boolean = true, cancelable: Boolean = false, touchPointID: int = 0, - isPrimaryTouchPoint: Boolean = false, localX: Number = NaN, localY: Number = NaN, - sizeX: Number = NaN, sizeY: Number = NaN, pressure: Number = NaN, - relatedObject: InteractiveObject = null, ctrlKey: Boolean = false, - altKey: Boolean = false, shiftKey: Boolean = false) { - super(type, bubbles, cancelable); - this.touchPointID = touchPointID; - this.isPrimaryTouchPoint = isPrimaryTouchPoint; - this.localX = localX; - this.localY = localY; - this.sizeX = sizeX; - this.sizeY = sizeY; - this.pressure = pressure; - this.relatedObject = relatedObject; - this.ctrlKey = ctrlKey; - this.altKey = altKey; - this.shiftKey = shiftKey; - } + public var touchPointID:int; // A unique identification number (as an int) assigned to the touch point. + public var isPrimaryTouchPoint:Boolean; // Indicates whether the first point of contact is mapped to mouse events. + public var localX:Number; // The horizontal coordinate at which the event occurred relative to the containing sprite. + public var localY:Number; // The vertical coordinate at which the event occurred relative to the containing sprite. + public var sizeX:Number; // Width of the contact area. + public var sizeY:Number; // Height of the contact area. + public var pressure:Number; // A value between 0.0 and 1.0 indicating force of the contact with the device. + public var relatedObject:InteractiveObject; // A reference to a display list object that is related to the event. + public var ctrlKey:Boolean; // On Windows or Linux, indicates whether the Ctrl key is active (true) or inactive (false). + public var altKey:Boolean; // Indicates whether the Alt key is active (true) or inactive (false). + public var shiftKey:Boolean; // Indicates whether the Shift key is active (true) or inactive (false). + public var isRelatedObjectInaccessible:Boolean; // If true, the relatedObject property is set to null for reasons related to security sandboxes. + private var _stageX:Number; // [read-only] The horizontal coordinate at which the event occurred in global Stage coordinates. + private var _stageY:Number; // [read-only] The vertical coordinate at which the event occurred in global Stage coordinates. + public function TouchEvent(type:String, bubbles:Boolean = true, cancelable:Boolean = false, touchPointID:int = 0, + isPrimaryTouchPoint:Boolean = false, localX:Number = NaN, localY:Number = NaN, + sizeX:Number = NaN, sizeY:Number = NaN, pressure:Number = NaN, + relatedObject:InteractiveObject = null, ctrlKey:Boolean = false, + altKey:Boolean = false, shiftKey:Boolean = false) { + super(type, bubbles, cancelable); + this.touchPointID = touchPointID; + this.isPrimaryTouchPoint = isPrimaryTouchPoint; + this.localX = localX; + this.localY = localY; + this.sizeX = sizeX; + this.sizeY = sizeY; + this.pressure = pressure; + this.relatedObject = relatedObject; + this.ctrlKey = ctrlKey; + this.altKey = altKey; + this.shiftKey = shiftKey; + } - // [override] Creates a copy of the TouchEvent object and sets the value of each property to match that of the original. - override public function clone(): Event { - return new TouchEvent(this.type, this.bubbles, this.cancelable, this.touchPointID, this.isPrimaryTouchPoint, - this.localX, this.localY, this.sizeX, this.sizeY, this.pressure, this.relatedObject, this.ctrlKey, - this.altKey, this.shiftKey); - } + // [override] Creates a copy of the TouchEvent object and sets the value of each property to match that of the original. + override public function clone():Event { + return new TouchEvent(this.type, this.bubbles, this.cancelable, this.touchPointID, this.isPrimaryTouchPoint, + this.localX, this.localY, this.sizeX, this.sizeY, this.pressure, this.relatedObject, this.ctrlKey, + this.altKey, this.shiftKey); + } - // Updates the specified ByteArray object with the high-frequency data points for a multi-point touch event. - [API("675")] - public function getSamples(buffer: ByteArray, append: Boolean = false): uint { - stub_method("flash.events.TouchEvent", "getSamples"); - return 0; - } + // Updates the specified ByteArray object with the high-frequency data points for a multi-point touch event. + [API("675")] + public function getSamples(buffer:ByteArray, append:Boolean = false):uint { + stub_method("flash.events.TouchEvent", "getSamples"); + return 0; + } - // Reports that the hardware button at the specified index is pressed. - [API("675")] - public function isToolButtonDown(index: int): Boolean { - stub_method("flash.events.TouchEvent", "isToolButtonDown"); - return false; - } + // Reports that the hardware button at the specified index is pressed. + [API("675")] + public function isToolButtonDown(index:int):Boolean { + stub_method("flash.events.TouchEvent", "isToolButtonDown"); + return false; + } - // [override] Returns a string that contains all the properties of the TouchEvent object. - override public function toString(): String { - return this.formatToString("TouchEvent", "type", "bubbles", "cancelable", "eventPhase", "touchPointID", - "isPrimaryTouchPoint", "localX", "localY", "sizeX", "sizeY", "pressure", "relatedObject", "ctrlKey", - "altKey", "shiftKey", "isRelatedObjectInaccessible", "stageX", "stageY"); - } + // [override] Returns a string that contains all the properties of the TouchEvent object. + override public function toString():String { + return this.formatToString("TouchEvent", "type", "bubbles", "cancelable", "eventPhase", "touchPointID", + "isPrimaryTouchPoint", "localX", "localY", "sizeX", "sizeY", "pressure", "relatedObject", "ctrlKey", + "altKey", "shiftKey", "isRelatedObjectInaccessible", "stageX", "stageY"); + } - // Instructs Flash Player or Adobe AIR to render after processing of this event completes, if the display list has been modified. - public native function updateAfterEvent(): void; + // Instructs Flash Player or Adobe AIR to render after processing of this event completes, if the display list has been modified. + public native function updateAfterEvent():void; - public function get stageX(): Number { - return this._stageX; - } + public function get stageX():Number { + return this._stageX; + } - public function get stageY(): Number { - return this._stageY; + public function get stageY():Number { + return this._stageY; + } } } -} diff --git a/core/src/avm2/globals/flash/events/TransformGestureEvent.as b/core/src/avm2/globals/flash/events/TransformGestureEvent.as index 18a2c8d03d36..e7a9af68c592 100644 --- a/core/src/avm2/globals/flash/events/TransformGestureEvent.as +++ b/core/src/avm2/globals/flash/events/TransformGestureEvent.as @@ -1,93 +1,90 @@ -package flash.events -{ - public class TransformGestureEvent extends GestureEvent - { - public static const GESTURE_PAN : String = "gesturePan"; - public static const GESTURE_ROTATE : String = "gestureRotate"; - public static const GESTURE_SWIPE : String = "gestureSwipe"; - public static const GESTURE_ZOOM : String = "gestureZoom"; - - private var _offsetX: Number; - private var _offsetY: Number; - private var _rotation: Number; - private var _scaleX: Number; - private var _scaleY: Number; - private var _velocity: Number; - +package flash.events { + public class TransformGestureEvent extends GestureEvent { + public static const GESTURE_PAN:String = "gesturePan"; + public static const GESTURE_ROTATE:String = "gestureRotate"; + public static const GESTURE_SWIPE:String = "gestureSwipe"; + public static const GESTURE_ZOOM:String = "gestureZoom"; + + private var _offsetX:Number; + private var _offsetY:Number; + private var _rotation:Number; + private var _scaleX:Number; + private var _scaleY:Number; + private var _velocity:Number; public function TransformGestureEvent(type:String, bubbles:Boolean = true, cancelable:Boolean = false, - phase:String = null, localX:Number = 0, localY:Number = 0, - scaleX:Number = 1.0, scaleY:Number = 1.0, - rotation:Number = 0, offsetX:Number = 0, offsetY:Number = 0, - ctrlKey:Boolean = false, altKey:Boolean = false, shiftKey:Boolean = false, - controlKey:Boolean = false, velocity:Number = 0) { + phase:String = null, localX:Number = 0, localY:Number = 0, + scaleX:Number = 1.0, scaleY:Number = 1.0, + rotation:Number = 0, offsetX:Number = 0, offsetY:Number = 0, + ctrlKey:Boolean = false, altKey:Boolean = false, shiftKey:Boolean = false, + controlKey:Boolean = false, velocity:Number = 0) { super(type, bubbles, cancelable, phase, localX, localY, ctrlKey, altKey, shiftKey, controlKey); - this._offsetX = offsetX - this._offsetY = offsetY - this._rotation = rotation - this._scaleX = scaleX - this._scaleY = scaleY - this._velocity = velocity + this._offsetX = offsetX; + this._offsetY = offsetY; + this._rotation = rotation; + this._scaleX = scaleX; + this._scaleY = scaleY; + this._velocity = velocity; + } override public function clone():Event { return new TransformGestureEvent(this.type, this.bubbles, this.cancelable, this.phase, - this.localX, this.localY, this.scaleX, this.scaleY, this.rotation, - this.offsetX, this.offsetY, this.ctrlKey, this.altKey, this.shiftKey, - this.controlKey, this.velocity); + this.localX, this.localY, this.scaleX, this.scaleY, this.rotation, + this.offsetX, this.offsetY, this.ctrlKey, this.altKey, this.shiftKey, + this.controlKey, this.velocity); } - override public function toString():String - { + override public function toString():String { // should fail on FP too, see discussion https://github.com/ruffle-rs/ruffle/pull/12330 - return this.formatToString("TransformGestureEvent","type","bubbles","cancelable","args"); + return this.formatToString("TransformGestureEvent", "type", "bubbles", "cancelable", "args"); } - public function get offsetX(): Number { + public function get offsetX():Number { return this._offsetX; } - public function set offsetX(value: Number): void { + public function set offsetX(value:Number):void { this._offsetX = value; } - public function get offsetY(): Number { + public function get offsetY():Number { return this._offsetY; } - public function set offsetY(value: Number): void { + public function set offsetY(value:Number):void { this._offsetY = value; } - public function get rotation(): Number { + public function get rotation():Number { return this._rotation; } - public function set rotation(value: Number): void { + public function set rotation(value:Number):void { this._rotation = value; } - public function get scaleX(): Number { + public function get scaleX():Number { return this._scaleX; } - public function set scaleX(value: Number): void { + public function set scaleX(value:Number):void { this._scaleX = value; } - public function get scaleY(): Number { + public function get scaleY():Number { return this._scaleY; } - public function set scaleY(value: Number): void { + public function set scaleY(value:Number):void { this._scaleY = value; } - public function get velocity(): Number { + public function get velocity():Number { return this._velocity; } - public function set velocity(value: Number): void { + public function set velocity(value:Number):void { this._velocity = value; } } diff --git a/core/src/avm2/globals/flash/events/UncaughtErrorEvent.as b/core/src/avm2/globals/flash/events/UncaughtErrorEvent.as index 901181c1f50f..ccde6a3e9b96 100644 --- a/core/src/avm2/globals/flash/events/UncaughtErrorEvent.as +++ b/core/src/avm2/globals/flash/events/UncaughtErrorEvent.as @@ -1,39 +1,31 @@ -// The initial version of this file was autogenerated from the official AS3 reference at +// The initial version of this file was autogenerated from the official AS3 reference at // https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/UncaughtErrorEvent.html // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.events -{ - public class UncaughtErrorEvent extends ErrorEvent - { +package flash.events { + public class UncaughtErrorEvent extends ErrorEvent { public static const UNCAUGHT_ERROR:String = "uncaughtError"; // Defines the value of the type property of an uncaughtError event object. - private var _error: *; // The error object associated with the uncaught error. + private var _error:*; // The error object associated with the uncaught error. - public function UncaughtErrorEvent(type:String, bubbles:Boolean = true, cancelable:Boolean = true, error_in:* = null) - { - super(type,bubbles,cancelable); + public function UncaughtErrorEvent(type:String, bubbles:Boolean = true, cancelable:Boolean = true, error_in:* = null) { + super(type, bubbles, cancelable); this._error = error_in; } - - // Creates a copy of the UncaughtErrorEvent object and sets the value of each property to match that of the original. - override public function clone():Event - { + // Creates a copy of the UncaughtErrorEvent object and sets the value of each property to match that of the original. + override public function clone():Event { return new UncaughtErrorEvent(this.type, this.bubbles, this.cancelable, this.error); } - // Returns a string that contains all the properties of the UncaughtErrorEvent object. - override public function toString():String - { - return this.formatToString("UncaughtErrorEvent","type","bubbles","cancelable","eventPhase","error"); + // Returns a string that contains all the properties of the UncaughtErrorEvent object. + override public function toString():String { + return this.formatToString("UncaughtErrorEvent", "type", "bubbles", "cancelable", "eventPhase", "error"); } - public function get error() : * - { + public function get error():* { return this._error; } - + } } - diff --git a/core/src/avm2/globals/flash/events/UncaughtErrorEvents.as b/core/src/avm2/globals/flash/events/UncaughtErrorEvents.as index bdaa9e9b30bc..1f16a6eee0b4 100644 --- a/core/src/avm2/globals/flash/events/UncaughtErrorEvents.as +++ b/core/src/avm2/globals/flash/events/UncaughtErrorEvents.as @@ -3,5 +3,5 @@ package flash.events { public function UncaughtErrorEvents() { } - } + } } \ No newline at end of file diff --git a/core/src/avm2/globals/flash/events/VideoEvent.as b/core/src/avm2/globals/flash/events/VideoEvent.as index 5c5204d72159..e66f9ff2b73d 100644 --- a/core/src/avm2/globals/flash/events/VideoEvent.as +++ b/core/src/avm2/globals/flash/events/VideoEvent.as @@ -1,32 +1,26 @@ -// The initial version of this file was autogenerated from the official AS3 reference at +// The initial version of this file was autogenerated from the official AS3 reference at // https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/VideoEvent.html // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.events -{ - - public class VideoEvent extends Event - { - public const codecInfo:String; +package flash.events { + + public class VideoEvent extends Event { + public const codecInfo:String; public static const RENDER_STATE:String = "renderState"; // Defines the value of the type property of a renderState event object. public static const RENDER_STATUS_ACCELERATED:String = "accelerated"; // For internal use only. public static const RENDER_STATUS_SOFTWARE:String = "software"; // For internal use only. public static const RENDER_STATUS_UNAVAILABLE:String = "unavailable"; // For internal use only. - private var _status: String; // Returns the rendering status of the VideoEvent object. + private var _status:String; // Returns the rendering status of the VideoEvent object. - public function VideoEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, status:String = null) - { - super(type,bubbles,cancelable); + public function VideoEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, status:String = null) { + super(type, bubbles, cancelable); this._status = status; } - - public function get status() : String - { + public function get status():String { return this._status; } - + } } - diff --git a/core/src/avm2/globals/flash/events/VideoTextureEvent.as b/core/src/avm2/globals/flash/events/VideoTextureEvent.as index 07325473f4c4..ee38d578c555 100644 --- a/core/src/avm2/globals/flash/events/VideoTextureEvent.as +++ b/core/src/avm2/globals/flash/events/VideoTextureEvent.as @@ -1,37 +1,31 @@ -// The initial version of this file was autogenerated from the official AS3 reference at +// The initial version of this file was autogenerated from the official AS3 reference at // https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/VideoTextureEvent.html // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.events -{ - - public class VideoTextureEvent extends Event - { +package flash.events { + + public class VideoTextureEvent extends Event { [API("706")] public static const RENDER_STATE:String = "renderState"; // The VideoTextureEvent.RENDER_STATE constant defines the value of the type property of a renderState event object. - private var _status: String; // The status of the VideoTexture object. - private var _colorSpace: String; // The color space used by the video being displayed in the VideoTexture object. + private var _status:String; // The status of the VideoTexture object. + private var _colorSpace:String; // The color space used by the video being displayed in the VideoTexture object. - public function VideoTextureEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, status:String = null, colorSpace:String = null) - { - super(type,bubbles,cancelable); + public function VideoTextureEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, status:String = null, colorSpace:String = null) { + super(type, bubbles, cancelable); this._status = status; this._colorSpace = colorSpace; - } + } [API("706")] - public function get status() : String - { + public function get status():String { return this._status; } - + [API("706")] - public function get colorSpace() : String - { + public function get colorSpace():String { return this._colorSpace; } - + } } - diff --git a/core/src/avm2/globals/flash/external/ExternalInterface.as b/core/src/avm2/globals/flash/external/ExternalInterface.as index f427ad821553..a27a2f777576 100644 --- a/core/src/avm2/globals/flash/external/ExternalInterface.as +++ b/core/src/avm2/globals/flash/external/ExternalInterface.as @@ -1,15 +1,13 @@ -package flash.external -{ - import __ruffle__.stub_getter; - - public final class ExternalInterface - { - public static native function get available(): Boolean; - - public static native function addCallback(functionName: String, closure: Function) : void; - - public static native function call(functionName: String, ... arguments) : *; - - public static native function get objectID():String; - } +package flash.external { + import __ruffle__.stub_getter; + + public final class ExternalInterface { + public static native function get available():Boolean; + + public static native function addCallback(functionName:String, closure:Function):void; + + public static native function call(functionName:String, ...arguments):*; + + public static native function get objectID():String; + } } diff --git a/core/src/avm2/globals/flash/filters/BevelFilter.as b/core/src/avm2/globals/flash/filters/BevelFilter.as index 3abbeb931cb8..e82cdbe1f886 100644 --- a/core/src/avm2/globals/flash/filters/BevelFilter.as +++ b/core/src/avm2/globals/flash/filters/BevelFilter.as @@ -1,57 +1,57 @@ -package flash.filters { +package flash.filters { public final class BevelFilter extends BitmapFilter { // FIXME these should all be getters/setters to match Flash [Ruffle(NativeAccessible)] - public var angle : Number; + public var angle:Number; [Ruffle(NativeAccessible)] - public var blurX : Number; + public var blurX:Number; [Ruffle(NativeAccessible)] - public var blurY : Number; + public var blurY:Number; [Ruffle(NativeAccessible)] - public var distance : Number; + public var distance:Number; [Ruffle(NativeAccessible)] - public var highlightAlpha : Number; + public var highlightAlpha:Number; [Ruffle(NativeAccessible)] - public var highlightColor : uint; + public var highlightColor:uint; [Ruffle(NativeAccessible)] - public var knockout : Boolean; + public var knockout:Boolean; [Ruffle(NativeAccessible)] - public var quality : int; + public var quality:int; [Ruffle(NativeAccessible)] - public var shadowAlpha : Number; + public var shadowAlpha:Number; [Ruffle(NativeAccessible)] - public var shadowColor : uint; + public var shadowColor:uint; [Ruffle(NativeAccessible)] - public var strength : Number; + public var strength:Number; [Ruffle(NativeAccessible)] - public var type : String; + public var type:String; public function BevelFilter( - distance:Number = 4.0, - angle:Number = 45, - highlightColor:uint = 0xFFFFFF, - highlightAlpha:Number = 1.0, - shadowColor:uint = 0x000000, - shadowAlpha:Number = 1.0, - blurX:Number = 4.0, - blurY:Number = 4.0, - strength:Number = 1, - quality:int = 1, - type:String = "inner", - knockout:Boolean = false - ) { + distance:Number = 4.0, + angle:Number = 45, + highlightColor:uint = 0xFFFFFF, + highlightAlpha:Number = 1.0, + shadowColor:uint = 0x000000, + shadowAlpha:Number = 1.0, + blurX:Number = 4.0, + blurY:Number = 4.0, + strength:Number = 1, + quality:int = 1, + type:String = "inner", + knockout:Boolean = false + ) { this.angle = angle; this.blurX = blurX; this.blurY = blurY; @@ -66,21 +66,21 @@ this.type = type; } - override public function clone(): BitmapFilter { + override public function clone():BitmapFilter { return new BevelFilter( - this.distance, - this.angle, - this.highlightColor, - this.highlightAlpha, - this.shadowColor, - this.shadowAlpha, - this.blurX, - this.blurY, - this.strength, - this.quality, - this.type, - this.knockout - ); + this.distance, + this.angle, + this.highlightColor, + this.highlightAlpha, + this.shadowColor, + this.shadowAlpha, + this.blurX, + this.blurY, + this.strength, + this.quality, + this.type, + this.knockout + ); } } } diff --git a/core/src/avm2/globals/flash/filters/BitmapFilter.as b/core/src/avm2/globals/flash/filters/BitmapFilter.as index 7b09a8f9a575..6f1c503cb394 100644 --- a/core/src/avm2/globals/flash/filters/BitmapFilter.as +++ b/core/src/avm2/globals/flash/filters/BitmapFilter.as @@ -1,6 +1,6 @@ -package flash.filters { +package flash.filters { public class BitmapFilter { - public function clone(): BitmapFilter { + public function clone():BitmapFilter { return null; } } diff --git a/core/src/avm2/globals/flash/filters/BitmapFilterQuality.as b/core/src/avm2/globals/flash/filters/BitmapFilterQuality.as index 3c54242ede20..7c894624a7f2 100644 --- a/core/src/avm2/globals/flash/filters/BitmapFilterQuality.as +++ b/core/src/avm2/globals/flash/filters/BitmapFilterQuality.as @@ -1,7 +1,7 @@ package flash.filters { public final class BitmapFilterQuality { - public static const LOW: int = 1; - public static const MEDIUM: int = 2; - public static const HIGH: int = 3; + public static const LOW:int = 1; + public static const MEDIUM:int = 2; + public static const HIGH:int = 3; } } diff --git a/core/src/avm2/globals/flash/filters/BitmapFilterType.as b/core/src/avm2/globals/flash/filters/BitmapFilterType.as index 6b19cf284fb2..63ff94160c68 100644 --- a/core/src/avm2/globals/flash/filters/BitmapFilterType.as +++ b/core/src/avm2/globals/flash/filters/BitmapFilterType.as @@ -1,7 +1,7 @@ package flash.filters { public final class BitmapFilterType { - public static const INNER: String = "inner"; - public static const OUTER: String = "outer"; - public static const FULL: String = "full"; + public static const INNER:String = "inner"; + public static const OUTER:String = "outer"; + public static const FULL:String = "full"; } } diff --git a/core/src/avm2/globals/flash/filters/BlurFilter.as b/core/src/avm2/globals/flash/filters/BlurFilter.as index 29583e5cc325..110cb6143fe7 100644 --- a/core/src/avm2/globals/flash/filters/BlurFilter.as +++ b/core/src/avm2/globals/flash/filters/BlurFilter.as @@ -1,21 +1,21 @@ -package flash.filters { +package flash.filters { public final class BlurFilter extends BitmapFilter { [Ruffle(NativeAccessible)] - public var blurX: Number; + public var blurX:Number; [Ruffle(NativeAccessible)] - public var blurY: Number; + public var blurY:Number; [Ruffle(NativeAccessible)] - public var quality: int; + public var quality:int; - public function BlurFilter(blurX: Number = 4.0, blurY: Number = 4.0, quality: int = 1) { + public function BlurFilter(blurX:Number = 4.0, blurY:Number = 4.0, quality:int = 1) { this.blurX = blurX; this.blurY = blurY; this.quality = quality; } - override public function clone(): BitmapFilter { + override public function clone():BitmapFilter { return new BlurFilter(this.blurX, this.blurY, this.quality); } } diff --git a/core/src/avm2/globals/flash/filters/ColorMatrixFilter.as b/core/src/avm2/globals/flash/filters/ColorMatrixFilter.as index f7ea513d72e2..36e2c9a3b425 100644 --- a/core/src/avm2/globals/flash/filters/ColorMatrixFilter.as +++ b/core/src/avm2/globals/flash/filters/ColorMatrixFilter.as @@ -1,16 +1,16 @@ -package flash.filters { +package flash.filters { public final class ColorMatrixFilter extends BitmapFilter { [Ruffle(NativeAccessible)] - private var _matrix: Array; + private var _matrix:Array; - public function ColorMatrixFilter(matrix: Array = null) { + public function ColorMatrixFilter(matrix:Array = null) { if (matrix == null) { matrix = [ - 1, 0, 0, 0, 0, - 0, 1, 0, 0, 0, - 0, 0, 1, 0, 0, - 0, 0, 0, 1, 0 - ]; + 1, 0, 0, 0, 0, + 0, 1, 0, 0, 0, + 0, 0, 1, 0, 0, + 0, 0, 0, 1, 0 + ]; } this.matrix = matrix; } @@ -21,7 +21,7 @@ // extend `Array` and declare a *public* 'concat' method with a // different signature. - public function get matrix(): Array { + public function get matrix():Array { return this._matrix.AS3::concat(); } @@ -29,7 +29,7 @@ this._matrix = matrix.AS3::concat(); } - override public function clone(): BitmapFilter { + override public function clone():BitmapFilter { return new ColorMatrixFilter(this.matrix.AS3::concat()); } } diff --git a/core/src/avm2/globals/flash/filters/ConvolutionFilter.as b/core/src/avm2/globals/flash/filters/ConvolutionFilter.as index f4e9990f1aae..cd43f8fa8079 100644 --- a/core/src/avm2/globals/flash/filters/ConvolutionFilter.as +++ b/core/src/avm2/globals/flash/filters/ConvolutionFilter.as @@ -1,43 +1,43 @@ -package flash.filters { +package flash.filters { public final class ConvolutionFilter extends BitmapFilter { [Ruffle(NativeAccessible)] - public var alpha : Number; + public var alpha:Number; [Ruffle(NativeAccessible)] - public var bias : Number; + public var bias:Number; [Ruffle(NativeAccessible)] - public var clamp : Boolean; + public var clamp:Boolean; [Ruffle(NativeAccessible)] - public var color : uint; + public var color:uint; [Ruffle(NativeAccessible)] - public var divisor : Number; + public var divisor:Number; [Ruffle(NativeAccessible)] - public var matrix : Array; + public var matrix:Array; [Ruffle(NativeAccessible)] - public var matrixX : Number; + public var matrixX:Number; [Ruffle(NativeAccessible)] - public var matrixY : Number; + public var matrixY:Number; [Ruffle(NativeAccessible)] - public var preserveAlpha : Boolean; + public var preserveAlpha:Boolean; public function ConvolutionFilter( - matrixX:Number = 0, - matrixY:Number = 0, - matrix:Array = null, - divisor:Number = 1.0, - bias:Number = 0.0, - preserveAlpha:Boolean = true, - clamp:Boolean = true, - color:uint = 0, - alpha:Number = 0.0 - ) { + matrixX:Number = 0, + matrixY:Number = 0, + matrix:Array = null, + divisor:Number = 1.0, + bias:Number = 0.0, + preserveAlpha:Boolean = true, + clamp:Boolean = true, + color:uint = 0, + alpha:Number = 0.0 + ) { this.alpha = alpha; this.bias = bias; this.clamp = clamp; @@ -49,7 +49,7 @@ this.preserveAlpha = preserveAlpha; } - override public function clone(): BitmapFilter { + override public function clone():BitmapFilter { return new ConvolutionFilter(this.matrixX, this.matrixY, this.matrixull, this.divisor, this.bias, this.preserveAlpharue, this.clamprue, this.color, this.alpha); } } diff --git a/core/src/avm2/globals/flash/filters/DisplacementMapFilter.as b/core/src/avm2/globals/flash/filters/DisplacementMapFilter.as index 23994a24edbe..691a09c51506 100644 --- a/core/src/avm2/globals/flash/filters/DisplacementMapFilter.as +++ b/core/src/avm2/globals/flash/filters/DisplacementMapFilter.as @@ -1,4 +1,4 @@ -package flash.filters { +package flash.filters { import flash.display.BitmapData; import flash.geom.Point; @@ -6,41 +6,41 @@ // FIXME these should all be getters/setters to match Flash [Ruffle(NativeAccessible)] - public var alpha: Number; + public var alpha:Number; [Ruffle(NativeAccessible)] - public var color: uint; + public var color:uint; [Ruffle(NativeAccessible)] - public var componentX: uint; + public var componentX:uint; [Ruffle(NativeAccessible)] - public var componentY: uint; + public var componentY:uint; [Ruffle(NativeAccessible)] - public var mapBitmap: BitmapData; + public var mapBitmap:BitmapData; [Ruffle(NativeAccessible)] - public var mapPoint: Point; + public var mapPoint:Point; [Ruffle(NativeAccessible)] - public var mode: String; + public var mode:String; [Ruffle(NativeAccessible)] - public var scaleX: Number; + public var scaleX:Number; [Ruffle(NativeAccessible)] - public var scaleY: Number; + public var scaleY:Number; public function DisplacementMapFilter(mapBitmap:BitmapData = null, - mapPoint:Point = null, - componentX:uint = 0, - componentY:uint = 0, - scaleX:Number = 0.0, - scaleY:Number = 0.0, - mode:String = "wrap", - color:uint = 0, - alpha:Number = 0.0) { + mapPoint:Point = null, + componentX:uint = 0, + componentY:uint = 0, + scaleX:Number = 0.0, + scaleY:Number = 0.0, + mode:String = "wrap", + color:uint = 0, + alpha:Number = 0.0) { this.mapBitmap = mapBitmap; this.mapPoint = mapPoint; this.componentX = componentX; @@ -52,7 +52,7 @@ this.alpha = alpha; } - override public function clone(): BitmapFilter { + override public function clone():BitmapFilter { return new DisplacementMapFilter(this.mapBitmap.clone(), this.mapPoint.clone(), this.componentX, this.componentY, this.scaleX, this.scaleY, this.mode, this.color, this.alpha); } } diff --git a/core/src/avm2/globals/flash/filters/DisplacementMapFilterMode.as b/core/src/avm2/globals/flash/filters/DisplacementMapFilterMode.as index 7dfe3db64890..c255f992d51c 100644 --- a/core/src/avm2/globals/flash/filters/DisplacementMapFilterMode.as +++ b/core/src/avm2/globals/flash/filters/DisplacementMapFilterMode.as @@ -1,8 +1,8 @@ package flash.filters { public final class DisplacementMapFilterMode { - public static const WRAP: String = "wrap"; - public static const CLAMP: String = "clamp"; - public static const IGNORE: String = "ignore"; - public static const COLOR: String = "color"; + public static const WRAP:String = "wrap"; + public static const CLAMP:String = "clamp"; + public static const IGNORE:String = "ignore"; + public static const COLOR:String = "color"; } } diff --git a/core/src/avm2/globals/flash/filters/DropShadowFilter.as b/core/src/avm2/globals/flash/filters/DropShadowFilter.as index 31f0ea3fe1c5..e4409b9085d6 100644 --- a/core/src/avm2/globals/flash/filters/DropShadowFilter.as +++ b/core/src/avm2/globals/flash/filters/DropShadowFilter.as @@ -1,50 +1,49 @@ package flash.filters { public final class DropShadowFilter extends BitmapFilter { [Ruffle(NativeAccessible)] - public var alpha: Number; + public var alpha:Number; [Ruffle(NativeAccessible)] - public var angle: Number; + public var angle:Number; [Ruffle(NativeAccessible)] - public var blurX: Number; + public var blurX:Number; [Ruffle(NativeAccessible)] - public var blurY: Number; + public var blurY:Number; [Ruffle(NativeAccessible)] - public var color: uint; + public var color:uint; [Ruffle(NativeAccessible)] - public var distance: Number; + public var distance:Number; [Ruffle(NativeAccessible)] - public var hideObject: Boolean; + public var hideObject:Boolean; [Ruffle(NativeAccessible)] - public var inner: Boolean; + public var inner:Boolean; [Ruffle(NativeAccessible)] - public var knockout: Boolean; + public var knockout:Boolean; [Ruffle(NativeAccessible)] - public var quality: int; + public var quality:int; [Ruffle(NativeAccessible)] - public var strength: Number; + public var strength:Number; public function DropShadowFilter(distance:Number = 4.0, - angle:Number = 45, - color:uint = 0, - alpha:Number = 1.0, - blurX:Number = 4.0, - blurY:Number = 4.0, - strength:Number = 1.0, - quality:int = 1, - inner:Boolean = false, - knockout:Boolean = false, - hideObject:Boolean = false) - { + angle:Number = 45, + color:uint = 0, + alpha:Number = 1.0, + blurX:Number = 4.0, + blurY:Number = 4.0, + strength:Number = 1.0, + quality:int = 1, + inner:Boolean = false, + knockout:Boolean = false, + hideObject:Boolean = false) { this.alpha = alpha; this.angle = angle; this.blurX = blurX; @@ -58,18 +57,18 @@ package flash.filters { this.strength = strength; } - override public function clone(): BitmapFilter { + override public function clone():BitmapFilter { return new DropShadowFilter(this.distance, - this.angle, - this.color, - this.alpha, - this.blurX, - this.blurY, - this.strength, - this.quality, - this.inner, - this.knockout, - this.hideObject); + this.angle, + this.color, + this.alpha, + this.blurX, + this.blurY, + this.strength, + this.quality, + this.inner, + this.knockout, + this.hideObject); } } } diff --git a/core/src/avm2/globals/flash/filters/GlowFilter.as b/core/src/avm2/globals/flash/filters/GlowFilter.as index 78c214cb3171..2856d883a97d 100644 --- a/core/src/avm2/globals/flash/filters/GlowFilter.as +++ b/core/src/avm2/globals/flash/filters/GlowFilter.as @@ -1,38 +1,37 @@ -package flash.filters { +package flash.filters { public final class GlowFilter extends BitmapFilter { [Ruffle(NativeAccessible)] - public var alpha: Number; + public var alpha:Number; [Ruffle(NativeAccessible)] - public var blurX: Number; + public var blurX:Number; [Ruffle(NativeAccessible)] - public var blurY: Number; + public var blurY:Number; [Ruffle(NativeAccessible)] - public var color: uint; + public var color:uint; [Ruffle(NativeAccessible)] - public var inner: Boolean; + public var inner:Boolean; [Ruffle(NativeAccessible)] - public var knockout: Boolean; + public var knockout:Boolean; [Ruffle(NativeAccessible)] - public var quality: int; + public var quality:int; [Ruffle(NativeAccessible)] - public var strength: Number; + public var strength:Number; - public function GlowFilter(color: uint = 0xFF0000, - alpha: Number = 1.0, - blurX: Number = 6.0, - blurY: Number = 6.0, - strength: Number = 2, - quality: int = 1, - inner: Boolean = false, - knockout: Boolean = false) - { + public function GlowFilter(color:uint = 0xFF0000, + alpha:Number = 1.0, + blurX:Number = 6.0, + blurY:Number = 6.0, + strength:Number = 2, + quality:int = 1, + inner:Boolean = false, + knockout:Boolean = false) { this.alpha = alpha; this.blurX = blurX; this.blurY = blurY; @@ -43,7 +42,7 @@ this.strength = strength; } - override public function clone(): BitmapFilter { + override public function clone():BitmapFilter { return new GlowFilter(this.color, this.alpha, this.blurX, this.blurY, this.strength, this.quality, this.inner, this.knockout); } } diff --git a/core/src/avm2/globals/flash/filters/GradientBevelFilter.as b/core/src/avm2/globals/flash/filters/GradientBevelFilter.as index 12964ef9cb72..980b5e0d48e0 100644 --- a/core/src/avm2/globals/flash/filters/GradientBevelFilter.as +++ b/core/src/avm2/globals/flash/filters/GradientBevelFilter.as @@ -1,55 +1,55 @@ -package flash.filters { +package flash.filters { public final class GradientBevelFilter extends BitmapFilter { // NOTE if reordering these fields, make sure to use the same order in // GradientGlowFilter; filter code assumes the slot layouts are identical // FIXME these should all be getters/setters to match Flash [Ruffle(NativeAccessible)] - public var alphas : Array; + public var alphas:Array; [Ruffle(NativeAccessible)] - public var angle : Number; + public var angle:Number; [Ruffle(NativeAccessible)] - public var blurX : Number; + public var blurX:Number; [Ruffle(NativeAccessible)] - public var blurY : Number; + public var blurY:Number; [Ruffle(NativeAccessible)] - public var colors : Array; + public var colors:Array; [Ruffle(NativeAccessible)] - public var distance : Number; + public var distance:Number; [Ruffle(NativeAccessible)] - public var knockout : Boolean; + public var knockout:Boolean; [Ruffle(NativeAccessible)] - public var quality : int; + public var quality:int; [Ruffle(NativeAccessible)] - public var ratios : Array; + public var ratios:Array; [Ruffle(NativeAccessible)] - public var strength : Number; + public var strength:Number; [Ruffle(NativeAccessible)] - public var type : String; + public var type:String; public function GradientBevelFilter( - distance:Number = 4.0, - angle:Number = 45, - colors:Array = null, - alphas:Array = null, - ratios:Array = null, - blurX:Number = 4.0, - blurY:Number = 4.0, - strength:Number = 1, - quality:int = 1, - type:String = "inner", - knockout:Boolean = false - ) { + distance:Number = 4.0, + angle:Number = 45, + colors:Array = null, + alphas:Array = null, + ratios:Array = null, + blurX:Number = 4.0, + blurY:Number = 4.0, + strength:Number = 1, + quality:int = 1, + type:String = "inner", + knockout:Boolean = false + ) { this.distance = distance; this.angle = angle; this.colors = colors; @@ -63,20 +63,20 @@ this.knockout = knockout; } - override public function clone(): BitmapFilter { + override public function clone():BitmapFilter { return new GradientBevelFilter( - this.distance, - this.angle, - this.colors, - this.alphas, - this.ratios, - this.blurX, - this.blurY, - this.strength, - this.quality, - this.type, - this.knockout - ); + this.distance, + this.angle, + this.colors, + this.alphas, + this.ratios, + this.blurX, + this.blurY, + this.strength, + this.quality, + this.type, + this.knockout + ); } } } diff --git a/core/src/avm2/globals/flash/filters/GradientGlowFilter.as b/core/src/avm2/globals/flash/filters/GradientGlowFilter.as index e453c00e6965..6709e6e77e96 100644 --- a/core/src/avm2/globals/flash/filters/GradientGlowFilter.as +++ b/core/src/avm2/globals/flash/filters/GradientGlowFilter.as @@ -1,4 +1,4 @@ -package flash.filters { +package flash.filters { public final class GradientGlowFilter extends BitmapFilter { // NOTE if reordering these fields, make sure to use the same order in // GradientBevelFilter; filter code assumes the slot layouts are identical @@ -8,52 +8,51 @@ // FIXME these should all be getters/setters to match Flash [Ruffle(NativeAccessible)] - public var alphas : Array; + public var alphas:Array; [Ruffle(NativeAccessible)] - public var angle : Number; + public var angle:Number; [Ruffle(NativeAccessible)] - public var blurX : Number; + public var blurX:Number; [Ruffle(NativeAccessible)] - public var blurY : Number; + public var blurY:Number; [Ruffle(NativeAccessible)] - public var colors : Array; + public var colors:Array; [Ruffle(NativeAccessible)] - public var distance : Number; + public var distance:Number; [Ruffle(NativeAccessible)] - public var knockout : Boolean; + public var knockout:Boolean; [Ruffle(NativeAccessible)] - public var quality : int; + public var quality:int; [Ruffle(NativeAccessible)] - public var ratios : Array; + public var ratios:Array; [Ruffle(NativeAccessible)] - public var strength : Number; + public var strength:Number; [Ruffle(NativeAccessible)] - public var type : String; + public var type:String; public function GradientGlowFilter( - distance:Number = 4.0, - angle:Number = 45, - colors:Array = null, - alphas:Array = null, - ratios:Array = null, - blurX:Number = 4.0, - blurY:Number = 4.0, - strength:Number = 1, - quality:int = 1, - type:String = "inner", - knockout:Boolean = false - ) - { + distance:Number = 4.0, + angle:Number = 45, + colors:Array = null, + alphas:Array = null, + ratios:Array = null, + blurX:Number = 4.0, + blurY:Number = 4.0, + strength:Number = 1, + quality:int = 1, + type:String = "inner", + knockout:Boolean = false + ) { this.distance = distance; this.angle = angle; this.colors = colors; @@ -67,7 +66,7 @@ this.knockout = knockout; } - override public function clone(): BitmapFilter { + override public function clone():BitmapFilter { return new GradientGlowFilter(this.distance, this.angle, this.colors, this.alphas, this.ratios, this.blurX, this.blurY, this.strength, this.quality, this.type, this.knockout); } } diff --git a/core/src/avm2/globals/flash/geom/ColorTransform.as b/core/src/avm2/globals/flash/geom/ColorTransform.as index 20f2c1a39821..8d6b21a8fead 100644 --- a/core/src/avm2/globals/flash/geom/ColorTransform.as +++ b/core/src/avm2/globals/flash/geom/ColorTransform.as @@ -1,38 +1,37 @@ package flash.geom { public class ColorTransform { [Ruffle(NativeAccessible)] - public var redMultiplier: Number; + public var redMultiplier:Number; [Ruffle(NativeAccessible)] - public var greenMultiplier: Number; + public var greenMultiplier:Number; [Ruffle(NativeAccessible)] - public var blueMultiplier: Number; + public var blueMultiplier:Number; [Ruffle(NativeAccessible)] - public var alphaMultiplier: Number; + public var alphaMultiplier:Number; [Ruffle(NativeAccessible)] - public var redOffset: Number; + public var redOffset:Number; [Ruffle(NativeAccessible)] - public var greenOffset: Number; + public var greenOffset:Number; [Ruffle(NativeAccessible)] - public var blueOffset: Number; + public var blueOffset:Number; [Ruffle(NativeAccessible)] - public var alphaOffset: Number; + public var alphaOffset:Number; - public function ColorTransform(redMultiplier: Number = 1, - greenMultiplier: Number = 1, - blueMultiplier: Number = 1, - alphaMultiplier: Number = 1, - redOffset: Number = 0, - greenOffset: Number = 0, - blueOffset: Number = 0, - alphaOffset: Number = 0) - { + public function ColorTransform(redMultiplier:Number = 1, + greenMultiplier:Number = 1, + blueMultiplier:Number = 1, + alphaMultiplier:Number = 1, + redOffset:Number = 0, + greenOffset:Number = 0, + blueOffset:Number = 0, + alphaOffset:Number = 0) { this.redMultiplier = redMultiplier; this.greenMultiplier = greenMultiplier; this.blueMultiplier = blueMultiplier; @@ -43,11 +42,11 @@ package flash.geom { this.alphaOffset = alphaOffset; } - public function get color(): uint { + public function get color():uint { return (this.redOffset << 16) | (this.greenOffset << 8) | this.blueOffset; } - public function set color(newColor: uint): void { + public function set color(newColor:uint):void { this.redMultiplier = 0; this.greenMultiplier = 0; this.blueMultiplier = 0; @@ -56,7 +55,7 @@ package flash.geom { this.blueOffset = newColor & 0xFF; } - public function concat(second: ColorTransform): void { + public function concat(second:ColorTransform):void { this.alphaOffset += this.alphaMultiplier * second.alphaOffset; this.alphaMultiplier *= second.alphaMultiplier; this.redOffset += this.redMultiplier * second.redOffset; @@ -67,24 +66,24 @@ package flash.geom { this.blueMultiplier *= second.blueMultiplier; } - public function toString(): String { - return "(redMultiplier=" - + this.redMultiplier - + ", greenMultiplier=" - + this.greenMultiplier - + ", blueMultiplier=" - + this.blueMultiplier - + ", alphaMultiplier=" - + this.alphaMultiplier - + ", redOffset=" - + this.redOffset - + ", greenOffset=" - + this.greenOffset - + ", blueOffset=" - + this.blueOffset - + ", alphaOffset=" - + this.alphaOffset - + ")"; + public function toString():String { + return "(redMultiplier=" + + this.redMultiplier + + ", greenMultiplier=" + + this.greenMultiplier + + ", blueMultiplier=" + + this.blueMultiplier + + ", alphaMultiplier=" + + this.alphaMultiplier + + ", redOffset=" + + this.redOffset + + ", greenOffset=" + + this.greenOffset + + ", blueOffset=" + + this.blueOffset + + ", alphaOffset=" + + this.alphaOffset + + ")"; } } } diff --git a/core/src/avm2/globals/flash/geom/Matrix.as b/core/src/avm2/globals/flash/geom/Matrix.as index 28531ff6a0b4..02050da66147 100644 --- a/core/src/avm2/globals/flash/geom/Matrix.as +++ b/core/src/avm2/globals/flash/geom/Matrix.as @@ -28,7 +28,7 @@ package flash.geom { } public function clone():Matrix { - return new Matrix(this.a,this.b,this.c,this.d,this.tx,this.ty); + return new Matrix(this.a, this.b, this.c, this.d, this.tx, this.ty); } public function concat(m:Matrix):void { @@ -55,17 +55,15 @@ package flash.geom { [API("674")] public function copyColumnTo(column:uint, vector3D:Vector3D):void { - if(column == 0) { + if (column == 0) { vector3D.x = this.a; vector3D.y = this.b; vector3D.z = 0; - } - else if (column == 1) { + } else if (column == 1) { vector3D.x = this.c; vector3D.y = this.d; vector3D.z = 0; - } - else if (column == 2) { + } else if (column == 2) { vector3D.x = this.tx; vector3D.y = this.ty; vector3D.z = 1; @@ -73,7 +71,7 @@ package flash.geom { } [API("674")] - public function copyFrom(sourceMatrix: Matrix): void { + public function copyFrom(sourceMatrix:Matrix):void { this.a = sourceMatrix.a; this.b = sourceMatrix.b; this.c = sourceMatrix.c; @@ -83,12 +81,12 @@ package flash.geom { } [API("674")] - public function copyRowFrom(row: uint, vector3D: Vector3D): void { + public function copyRowFrom(row:uint, vector3D:Vector3D):void { if (row == 0) { this.a = vector3D.x; this.c = vector3D.y; this.tx = vector3D.z; - } else if(row == 1) { + } else if (row == 1) { this.b = vector3D.x; this.d = vector3D.y; this.ty = vector3D.z; @@ -97,17 +95,15 @@ package flash.geom { [API("674")] public function copyRowTo(row:uint, vector3D:Vector3D):void { - if(row == 0) { + if (row == 0) { vector3D.x = this.a; vector3D.y = this.c; vector3D.z = this.tx; - } - else if (row == 1) { + } else if (row == 1) { vector3D.x = this.b; vector3D.y = this.d; vector3D.z = this.ty; - } - else if (row == 2) { + } else if (row == 2) { vector3D.x = 0; vector3D.y = 0; vector3D.z = 1; @@ -121,7 +117,7 @@ package flash.geom { this.translate(tx, ty); } - public function createGradientBox(width: Number, height: Number, rotation: Number = 0, tx: Number = 0, ty: Number = 0): void { + public function createGradientBox(width:Number, height:Number, rotation:Number = 0, tx:Number = 0, ty:Number = 0):void { this.createBox(width / 1638.4, height / 1638.4, rotation, tx + width / 2, ty + height / 2); } diff --git a/core/src/avm2/globals/flash/geom/Matrix3D.as b/core/src/avm2/globals/flash/geom/Matrix3D.as index 94a40d69f942..e5f0eefce199 100644 --- a/core/src/avm2/globals/flash/geom/Matrix3D.as +++ b/core/src/avm2/globals/flash/geom/Matrix3D.as @@ -30,11 +30,11 @@ package flash.geom { public function identity():void { // Note that every 4 elements is a *column*, not a row this._rawData = new [ - 1, 0, 0, 0, - 0, 1, 0, 0, - 0, 0, 1, 0, - 0, 0, 0, 1 - ]; + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1 + ]; } public function appendTranslation(x:Number, y:Number, z:Number):void { @@ -198,14 +198,14 @@ package flash.geom { public function transformVectors(vin:Vector., vout:Vector.):void { if (vin == null) { throw new TypeError("Error #2007: Parameter vin must be non-null.", 2007); -} + } if (vout == null) { throw new TypeError("Error #2007: Parameter vout must be non-null.", 2007); } var resultVecsLength:Number = Math.floor(vin.length / 3) * 3; if (resultVecsLength > vout.length && vout.fixed) { - throw new RangeError("Error #1126: Cannot change the length of a fixed Vector.") + throw new RangeError("Error #1126: Cannot change the length of a fixed Vector."); } var result3D:Vector3D; @@ -297,8 +297,8 @@ package flash.geom { // Based on https://github.com/openfl/openfl/blob/971a4c9e43b5472fd84d73920a2b7c1b3d8d9257/src/openfl/geom/Matrix3D.hx#L307 public function appendScale(xScale:Number, yScale:Number, zScale:Number):void { this.append(new Matrix3D(Vector.([ - xScale, 0.0, 0.0, 0.0, 0.0, yScale, 0.0, 0.0, 0.0, 0.0, zScale, 0.0, 0.0, 0.0, 0.0, 1.0 - ]))); + xScale, 0.0, 0.0, 0.0, 0.0, yScale, 0.0, 0.0, 0.0, 0.0, zScale, 0.0, 0.0, 0.0, 0.0, 1.0 + ]))); } public function prependTranslation(x:Number, y:Number, z:Number):void { @@ -628,8 +628,7 @@ package flash.geom { rot.x = (mr[6] - mr[9]) / len; rot.y = (mr[8] - mr[2]) / len; rot.z = (mr[1] - mr[4]) / len; - } - else { + } else { rot.x = rot.y = rot.z = 0; } break; @@ -643,22 +642,19 @@ package flash.geom { rot.x = (mr[6] - mr[9]) / (4 * rot.w); rot.y = (mr[8] - mr[2]) / (4 * rot.w); rot.z = (mr[1] - mr[4]) / (4 * rot.w); - } - else if ((mr[0] > mr[5]) && (mr[0] > mr[10])) { + } else if ((mr[0] > mr[5]) && (mr[0] > mr[10])) { rot.x = Math.sqrt(1 + mr[0] - mr[5] - mr[10]) / 2; rot.w = (mr[6] - mr[9]) / (4 * rot.x); rot.y = (mr[1] + mr[4]) / (4 * rot.x); rot.z = (mr[8] + mr[2]) / (4 * rot.x); - } - else if (mr[5] > mr[10]) { + } else if (mr[5] > mr[10]) { rot.y = Math.sqrt(1 + mr[5] - mr[0] - mr[10]) / 2; rot.x = (mr[1] + mr[4]) / (4 * rot.y); rot.w = (mr[8] - mr[2]) / (4 * rot.y); rot.z = (mr[6] + mr[9]) / (4 * rot.y); - } - else { + } else { rot.z = Math.sqrt(1 + mr[10] - mr[0] - mr[5]) / 2; rot.x = (mr[8] + mr[2]) / (4 * rot.z); @@ -673,8 +669,7 @@ package flash.geom { if (mr[2] != 1 && mr[2] != -1) { rot.x = Math.atan2(mr[6], mr[10]); rot.z = Math.atan2(mr[1], mr[0]); - } - else { + } else { rot.z = 0; rot.x = Math.atan2(mr[4], mr[5]); } @@ -735,11 +730,11 @@ package flash.geom { public function get determinant():Number { return 1 * ((_rawData[0] * _rawData[5] - _rawData[4] * _rawData[1]) * (_rawData[10] * _rawData[15] - _rawData[14] * _rawData[11]) - - (_rawData[0] * _rawData[9] - _rawData[8] * _rawData[1]) * (_rawData[6] * _rawData[15] - _rawData[14] * _rawData[7]) - + (_rawData[0] * _rawData[13] - _rawData[12] * _rawData[1]) * (_rawData[6] * _rawData[11] - _rawData[10] * _rawData[7]) - + (_rawData[4] * _rawData[9] - _rawData[8] * _rawData[5]) * (_rawData[2] * _rawData[15] - _rawData[14] * _rawData[3]) - - (_rawData[4] * _rawData[13] - _rawData[12] * _rawData[5]) * (_rawData[2] * _rawData[11] - _rawData[10] * _rawData[3]) - + (_rawData[8] * _rawData[13] - _rawData[12] * _rawData[9]) * (_rawData[2] * _rawData[7] - _rawData[6] * _rawData[3])); + - (_rawData[0] * _rawData[9] - _rawData[8] * _rawData[1]) * (_rawData[6] * _rawData[15] - _rawData[14] * _rawData[7]) + + (_rawData[0] * _rawData[13] - _rawData[12] * _rawData[1]) * (_rawData[6] * _rawData[11] - _rawData[10] * _rawData[7]) + + (_rawData[4] * _rawData[9] - _rawData[8] * _rawData[5]) * (_rawData[2] * _rawData[15] - _rawData[14] * _rawData[3]) + - (_rawData[4] * _rawData[13] - _rawData[12] * _rawData[5]) * (_rawData[2] * _rawData[11] - _rawData[10] * _rawData[3]) + + (_rawData[8] * _rawData[13] - _rawData[12] * _rawData[9]) * (_rawData[2] * _rawData[7] - _rawData[6] * _rawData[3])); } } diff --git a/core/src/avm2/globals/flash/geom/Orientation3D.as b/core/src/avm2/globals/flash/geom/Orientation3D.as index 79ad1b0f6478..f2a31aa41542 100644 --- a/core/src/avm2/globals/flash/geom/Orientation3D.as +++ b/core/src/avm2/globals/flash/geom/Orientation3D.as @@ -1,7 +1,7 @@ package flash.geom { public final class Orientation3D { - public static const EULER_ANGLES: String = "eulerAngles"; - public static const AXIS_ANGLE: String = "axisAngle"; - public static const QUATERNION: String = "quaternion"; + public static const EULER_ANGLES:String = "eulerAngles"; + public static const AXIS_ANGLE:String = "axisAngle"; + public static const QUATERNION:String = "quaternion"; } } diff --git a/core/src/avm2/globals/flash/geom/PerspectiveProjection.as b/core/src/avm2/globals/flash/geom/PerspectiveProjection.as index d53bba723339..38f9e8989057 100644 --- a/core/src/avm2/globals/flash/geom/PerspectiveProjection.as +++ b/core/src/avm2/globals/flash/geom/PerspectiveProjection.as @@ -8,13 +8,13 @@ package flash.geom { public class PerspectiveProjection { [Ruffle(NativeAccessible)] - private var displayObject: DisplayObject = null; + private var displayObject:DisplayObject = null; [Ruffle(NativeAccessible)] - private var fov: Number = 55.0; + private var fov:Number = 55.0; [Ruffle(NativeAccessible)] - private var center: Point = new Point(250, 250); + private var center:Point = new Point(250, 250); public function PerspectiveProjection() { } @@ -50,13 +50,13 @@ package flash.geom { } public function toMatrix3D():Matrix3D { - var fl: Number = this.focalLength; + var fl:Number = this.focalLength; return new Matrix3D(new [ - fl, 0, 0, 0, - 0, fl, 0, 0, - 0, 0, 1, 1, - 0, 0, 0, 0 - ]); + fl, 0, 0, 0, + 0, fl, 0, 0, + 0, 0, 1, 1, + 0, 0, 0, 0 + ]); } } } diff --git a/core/src/avm2/globals/flash/geom/Point.as b/core/src/avm2/globals/flash/geom/Point.as index 5c5ed5317460..91b507f5b057 100644 --- a/core/src/avm2/globals/flash/geom/Point.as +++ b/core/src/avm2/globals/flash/geom/Point.as @@ -70,7 +70,7 @@ package flash.geom { } public static function polar(len:Number, angle:Number):Point { - return new Point(len* Math.cos(angle), len * Math.sin(angle)); + return new Point(len * Math.cos(angle), len * Math.sin(angle)); } } } diff --git a/core/src/avm2/globals/flash/geom/Rectangle.as b/core/src/avm2/globals/flash/geom/Rectangle.as index b63aed52897b..007ebadf3a8c 100644 --- a/core/src/avm2/globals/flash/geom/Rectangle.as +++ b/core/src/avm2/globals/flash/geom/Rectangle.as @@ -1,135 +1,135 @@ package flash.geom { public class Rectangle { [Ruffle(NativeAccessible)] - public var x: Number; + public var x:Number; [Ruffle(NativeAccessible)] - public var y: Number; + public var y:Number; [Ruffle(NativeAccessible)] - public var width: Number; + public var width:Number; [Ruffle(NativeAccessible)] - public var height: Number; + public var height:Number; - public function Rectangle(x: Number = 0, y: Number = 0, width: Number = 0, height: Number = 0) { + public function Rectangle(x:Number = 0, y:Number = 0, width:Number = 0, height:Number = 0) { this.x = x; this.y = y; this.width = width; this.height = height; } - public function get left(): Number { + public function get left():Number { return this.x; } - public function set left(value: Number): void { + public function set left(value:Number):void { this.width += this.x - value; this.x = value; } - public function get right(): Number { + public function get right():Number { return this.x + this.width; } - public function set right(value: Number): void { + public function set right(value:Number):void { this.width = value - this.x; } - public function get top(): Number { + public function get top():Number { return this.y; } - public function set top(value: Number): void { + public function set top(value:Number):void { this.height += this.y - value; this.y = value; } - public function get bottom(): Number { + public function get bottom():Number { return this.y + this.height; } - public function set bottom(value: Number): void { + public function set bottom(value:Number):void { this.height = value - this.y; } - public function get topLeft(): Point { + public function get topLeft():Point { return new Point(this.x, this.y); } - public function set topLeft(value: Point): void { + public function set topLeft(value:Point):void { this.width += this.x - value.x; this.height += this.y - value.y; this.x = value.x; this.y = value.y; } - public function get bottomRight(): Point { + public function get bottomRight():Point { return new Point(this.right, this.bottom); } - public function set bottomRight(value: Point): void { + public function set bottomRight(value:Point):void { this.width = value.x - this.x; this.height = value.y - this.y; } - public function get size(): Point { + public function get size():Point { return new Point(this.width, this.height); } - public function set size(value: Point): void { + public function set size(value:Point):void { this.width = value.x; this.height = value.y; } - public function clone(): Rectangle { + public function clone():Rectangle { return new Rectangle(this.x, this.y, this.width, this.height); } - public function isEmpty(): Boolean { + public function isEmpty():Boolean { return this.width <= 0 || this.height <= 0; } - public function setEmpty(): void { + public function setEmpty():void { this.x = 0; this.y = 0; this.width = 0; this.height = 0; } - public function inflate(dx: Number, dy: Number): void { + public function inflate(dx:Number, dy:Number):void { this.x -= dx; this.width += 2 * dx; this.y -= dy; this.height += 2 * dy; } - public function inflatePoint(point: Point): void { + public function inflatePoint(point:Point):void { this.x -= point.x; this.width += 2 * point.x; this.y -= point.y; this.height += 2 * point.y; } - public function offset(dx: Number, dy: Number): void { + public function offset(dx:Number, dy:Number):void { this.x += dx; this.y += dy; } - public function offsetPoint(point: Point): void { + public function offsetPoint(point:Point):void { this.x += point.x; this.y += point.y; } - public function contains(x: Number, y: Number): Boolean { + public function contains(x:Number, y:Number):Boolean { return x >= this.x && x < this.x + this.width && y >= this.y && y < this.y + this.height; } - public function containsPoint(point: Point): Boolean { + public function containsPoint(point:Point):Boolean { return point.x >= this.x && point.x < this.x + this.width && point.y >= this.y && point.y < this.y + this.height; } - public function containsRect(rect: Rectangle): Boolean { + public function containsRect(rect:Rectangle):Boolean { var r1 = rect.x + rect.width; var b1 = rect.y + rect.height; var r2 = this.x + this.width; @@ -137,7 +137,7 @@ package flash.geom { return rect.x >= this.x && rect.x < r2 && rect.y >= this.y && rect.y < b2 && r1 > this.x && r1 <= r2 && b1 > this.y && b1 <= b2; } - public function intersection(toIntersect: Rectangle): Rectangle { + public function intersection(toIntersect:Rectangle):Rectangle { var result = new Rectangle(); if (this.isEmpty() || toIntersect.isEmpty()) { result.setEmpty(); @@ -153,7 +153,7 @@ package flash.geom { return result; } - public function intersects(toIntersect: Rectangle): Boolean { + public function intersects(toIntersect:Rectangle):Boolean { if (this.isEmpty() || toIntersect.isEmpty()) { return false; } @@ -167,7 +167,7 @@ package flash.geom { return true; } - public function union(toUnion: Rectangle): Rectangle { + public function union(toUnion:Rectangle):Rectangle { if (this.isEmpty()) { return toUnion.clone(); } @@ -182,16 +182,16 @@ package flash.geom { return r; } - public function equals(toCompare: Rectangle): Boolean { + public function equals(toCompare:Rectangle):Boolean { return toCompare.x == this.x && toCompare.y == this.y && toCompare.width == this.width && toCompare.height == this.height; } - public function toString(): String { + public function toString():String { return "(x=" + this.x + ", y=" + this.y + ", w=" + this.width + ", h=" + this.height + ")"; } [API("674")] - public function copyFrom(sourceRect: Rectangle): void { + public function copyFrom(sourceRect:Rectangle):void { this.x = sourceRect.x; this.y = sourceRect.y; this.width = sourceRect.width; @@ -199,7 +199,7 @@ package flash.geom { } [API("674")] - public function setTo(xa: Number, ya: Number, widtha: Number, heighta: Number): void { + public function setTo(xa:Number, ya:Number, widtha:Number, heighta:Number):void { this.x = xa; this.y = ya; this.width = widtha; diff --git a/core/src/avm2/globals/flash/geom/Transform.as b/core/src/avm2/globals/flash/geom/Transform.as index a92c918c0e5b..4f695c4e8bcb 100644 --- a/core/src/avm2/globals/flash/geom/Transform.as +++ b/core/src/avm2/globals/flash/geom/Transform.as @@ -31,7 +31,7 @@ package flash.geom { public native function set matrix3D(m:Matrix3D):void; public native function get perspectiveProjection():PerspectiveProjection; - public native function set perspectiveProjection(val: PerspectiveProjection):void; + public native function set perspectiveProjection(val:PerspectiveProjection):void; public function getRelativeMatrix3D(relativeTo:DisplayObject):Matrix3D { stub_method("flash.geom.Transform", "getRelativeMatrix3D"); diff --git a/core/src/avm2/globals/flash/geom/Vector3D.as b/core/src/avm2/globals/flash/geom/Vector3D.as index e9c5ec352a40..593a908f4098 100644 --- a/core/src/avm2/globals/flash/geom/Vector3D.as +++ b/core/src/avm2/globals/flash/geom/Vector3D.as @@ -2,9 +2,9 @@ package flash.geom { public class Vector3D { // `describeType` returns these in this weird order - public static const Z_AXIS : Vector3D = new Vector3D(0, 0, 1); - public static const X_AXIS : Vector3D = new Vector3D(1, 0, 0); - public static const Y_AXIS : Vector3D = new Vector3D(0, 1, 0); + public static const Z_AXIS:Vector3D = new Vector3D(0, 0, 1); + public static const X_AXIS:Vector3D = new Vector3D(1, 0, 0); + public static const Y_AXIS:Vector3D = new Vector3D(0, 1, 0); public static function angleBetween(a:Vector3D, b:Vector3D):Number { return Math.acos(a.dotProduct(b) / (a.length * b.length)); @@ -89,7 +89,7 @@ package flash.geom { } [API("674")] - public function setTo(xa:Number, ya:Number, za: Number):void { + public function setTo(xa:Number, ya:Number, za:Number):void { this.x = xa; this.y = ya; this.z = za; @@ -118,19 +118,18 @@ package flash.geom { } public function normalize():Number { - var len : Number = this.length; + var len:Number = this.length; if (len == 0) { this.x = 0; this.y = 0; this.z = 0; - } - else if (len > 0) { + } else if (len > 0) { this.x /= len; this.y /= len; this.z /= len; - } - else { // if len (so any of the components) is NaN or undefined + } else { + // if len (so any of the components) is NaN or undefined this.x = NaN; this.y = NaN; this.z = NaN; @@ -145,10 +144,10 @@ package flash.geom { public function crossProduct(a:Vector3D):Vector3D { return new Vector3D( - this.y * a.z - this.z * a.y, - this.z * a.x - this.x * a.z, - this.x * a.y - this.y * a.x, - 1); // for whatever reason w is always set to 1 + this.y * a.z - this.z * a.y, + this.z * a.x - this.x * a.z, + this.x * a.y - this.y * a.x, + 1); // for whatever reason w is always set to 1 } } } diff --git a/core/src/avm2/globals/flash/globalization/DateTimeFormatter.as b/core/src/avm2/globals/flash/globalization/DateTimeFormatter.as index e08ab4e5a337..7227212eb248 100644 --- a/core/src/avm2/globals/flash/globalization/DateTimeFormatter.as +++ b/core/src/avm2/globals/flash/globalization/DateTimeFormatter.as @@ -10,13 +10,14 @@ package flash.globalization { private var _localeIDName:String; private var _timeStyle:String; - private static function throwNonNull(name: String) { + private static function throwNonNull(name:String) { throw new TypeError("Error #2007: Parameter " + name + " must be non-null.", 2007); } public function DateTimeFormatter(requestedLocaleIDName:String, dateStyle:String = "long", timeStyle:String = "long") { stub_constructor("flash.globalization.DateTimeFormatter"); - if (requestedLocaleIDName == null) throwNonNull("requestedLocaleIDName"); + if (requestedLocaleIDName == null) + throwNonNull("requestedLocaleIDName"); this._localeIDName = requestedLocaleIDName; this._dateTimePattern = "EEEE, MMMM d, yyyy h:mm:ss a"; this.setDateTimeStyles(dateStyle, timeStyle); @@ -38,13 +39,15 @@ package flash.globalization { public function format(dateTime:Date):String { stub_method("flash.globalization.DateTimeFormatter", "format"); - if (dateTime == null) throwNonNull("dateTime"); + if (dateTime == null) + throwNonNull("dateTime"); return dateTime.toString(); } public function formatUTC(dateTime:Date):String { stub_method("flash.globalization.DateTimeFormatter", "formatUTC"); - if (dateTime == null) throwNonNull("dateTime"); + if (dateTime == null) + throwNonNull("dateTime"); return dateTime.toUTCString(); } @@ -68,8 +71,10 @@ package flash.globalization { public function getMonthNames(nameStyle:String = "full", context:String = "standalone"):Vector. { stub_method("flash.globalization.DateTimeFormatter", "getMonthNames"); - if (nameStyle == null) throwNonNull("nameStyle"); - if (context == null) throwNonNull("context"); + if (nameStyle == null) + throwNonNull("nameStyle"); + if (context == null) + throwNonNull("context"); return new ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; } @@ -79,21 +84,26 @@ package flash.globalization { public function getWeekdayNames(nameStyle:String = "full", context:String = "standalone"):Vector. { stub_method("flash.globalization.DateTimeFormatter", "getWeekdayNames"); - if (nameStyle == null) throwNonNull("nameStyle"); - if (context == null) throwNonNull("context"); + if (nameStyle == null) + throwNonNull("nameStyle"); + if (context == null) + throwNonNull("context"); return new ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]; } public function setDateTimePattern(pattern:String):void { stub_method("flash.globalization.DateTimeFormatter", "setDateTimePattern"); - if (pattern == null) throwNonNull("pattern"); + if (pattern == null) + throwNonNull("pattern"); this._dateTimePattern = pattern; } public function setDateTimeStyles(dateStyle:String, timeStyle:String):void { stub_method("flash.globalization.DateTimeFormatter", "setDateTimeStyles"); - if (dateStyle == null) throwNonNull("dateStyle"); - if (timeStyle == null) throwNonNull("timeStyle"); + if (dateStyle == null) + throwNonNull("dateStyle"); + if (timeStyle == null) + throwNonNull("timeStyle"); this._dateStyle = dateStyle; this._timeStyle = timeStyle; } diff --git a/core/src/avm2/globals/flash/media/AVNetworkingParams.as b/core/src/avm2/globals/flash/media/AVNetworkingParams.as index 550f6ad98fd2..16c97e920643 100644 --- a/core/src/avm2/globals/flash/media/AVNetworkingParams.as +++ b/core/src/avm2/globals/flash/media/AVNetworkingParams.as @@ -3,77 +3,64 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.media -{ - public class AVNetworkingParams - { - private var _forceNativeNetworking: Boolean; +package flash.media { + public class AVNetworkingParams { + private var _forceNativeNetworking:Boolean; - private var _readSetCookieHeader: Boolean; + private var _readSetCookieHeader:Boolean; - private var _useCookieHeaderForAllRequests: Boolean; + private var _useCookieHeaderForAllRequests:Boolean; - private var _networkDownVerificationUrl: String; + private var _networkDownVerificationUrl:String; - private var _appendRandomQueryParameter: String; + private var _appendRandomQueryParameter:String; public function AVNetworkingParams( - init_forceNativeNetworking:Boolean = false, - init_readSetCookieHeader:Boolean = true, - init_useCookieHeaderForAllRequests:Boolean = false, - init_networkDownVerificationUrl:String = "") - { + init_forceNativeNetworking:Boolean = false, + init_readSetCookieHeader:Boolean = true, + init_useCookieHeaderForAllRequests:Boolean = false, + init_networkDownVerificationUrl:String = "") { this._forceNativeNetworking = init_forceNativeNetworking; this._readSetCookieHeader = init_readSetCookieHeader; this._useCookieHeaderForAllRequests = init_useCookieHeaderForAllRequests; this._networkDownVerificationUrl = init_networkDownVerificationUrl; } - public function get appendRandomQueryParameter():String - { + public function get appendRandomQueryParameter():String { return this._appendRandomQueryParameter; } - public function set appendRandomQueryParameter(value:String):void - { + public function set appendRandomQueryParameter(value:String):void { this._appendRandomQueryParameter = value; } - public function get forceNativeNetworking():Boolean - { + public function get forceNativeNetworking():Boolean { return this._forceNativeNetworking; } - public function set forceNativeNetworking(value:Boolean):void - { + public function set forceNativeNetworking(value:Boolean):void { this._forceNativeNetworking = value; } - public function get networkDownVerificationUrl():String - { + public function get networkDownVerificationUrl():String { return this._networkDownVerificationUrl; } - public function set networkDownVerificationUrl(value:String):void - { + public function set networkDownVerificationUrl(value:String):void { this._networkDownVerificationUrl = value; } - public function get readSetCookieHeader():Boolean - { + public function get readSetCookieHeader():Boolean { return this._readSetCookieHeader; } - public function set readSetCookieHeader(value:Boolean):void - { + public function set readSetCookieHeader(value:Boolean):void { this._readSetCookieHeader = value; } - public function get useCookieHeaderForAllRequests():Boolean - { + public function get useCookieHeaderForAllRequests():Boolean { return this._useCookieHeaderForAllRequests; } - public function set useCookieHeaderForAllRequests(value:Boolean):void - { + public function set useCookieHeaderForAllRequests(value:Boolean):void { this._useCookieHeaderForAllRequests = value; } } diff --git a/core/src/avm2/globals/flash/media/AVTagData.as b/core/src/avm2/globals/flash/media/AVTagData.as index 5514cbe548f5..788eed395195 100644 --- a/core/src/avm2/globals/flash/media/AVTagData.as +++ b/core/src/avm2/globals/flash/media/AVTagData.as @@ -3,31 +3,26 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.media -{ - public class AVTagData - { +package flash.media { + public class AVTagData { // Data in the tag. - private var _data: String; + private var _data:String; // The timestamp of the tag data - private var _localTime: Number; + private var _localTime:Number; public function AVTagData( - init_data:String, - init_localTime:Number) - { + init_data:String, + init_localTime:Number) { _data = init_data; _localTime = init_localTime; } - public function get data() : String - { + public function get data():String { return this._data; } - public function get localTime() : Number - { + public function get localTime():Number { return this._localTime; } } diff --git a/core/src/avm2/globals/flash/media/AudioDecoder.as b/core/src/avm2/globals/flash/media/AudioDecoder.as index d9a1de9168cb..c9f97a65940a 100644 --- a/core/src/avm2/globals/flash/media/AudioDecoder.as +++ b/core/src/avm2/globals/flash/media/AudioDecoder.as @@ -3,12 +3,10 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.media -{ +package flash.media { [API("674")] - public final class AudioDecoder - { + public final class AudioDecoder { // Dolby Digital Audio, which is also known as AC-3. public static const DOLBY_DIGITAL:String = "DolbyDigital"; diff --git a/core/src/avm2/globals/flash/media/AudioOutputChangeReason.as b/core/src/avm2/globals/flash/media/AudioOutputChangeReason.as index fbe41ecde55f..372295c02884 100644 --- a/core/src/avm2/globals/flash/media/AudioOutputChangeReason.as +++ b/core/src/avm2/globals/flash/media/AudioOutputChangeReason.as @@ -3,12 +3,10 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.media -{ +package flash.media { // TODO: [API("724")] - public final class AudioOutputChangeReason - { + public final class AudioOutputChangeReason { // Audio Output is changed because system device has been added or removed. public static const DEVICE_CHANGE:String = "deviceChange"; diff --git a/core/src/avm2/globals/flash/media/Camera.as b/core/src/avm2/globals/flash/media/Camera.as index 3aa22dc9e2f3..46319ccea878 100644 --- a/core/src/avm2/globals/flash/media/Camera.as +++ b/core/src/avm2/globals/flash/media/Camera.as @@ -20,7 +20,7 @@ package flash.media { __ruffle__.stub_method("flash.media.Camera", "drawToBitmapData"); } - public static function getCamera(name: String = null):Camera { + public static function getCamera(name:String = null):Camera { __ruffle__.stub_method("flash.media.Camera", "getCamera"); return null; } @@ -45,82 +45,82 @@ package flash.media { __ruffle__.stub_method("flash.media.Camera", "setQuality"); } - public function get activityLevel(): Number { + public function get activityLevel():Number { __ruffle__.stub_getter("flash.media.Camera", "activityLevel"); return 0; } - public function get bandwidth(): int { + public function get bandwidth():int { __ruffle__.stub_getter("flash.media.Camera", "bandwidth"); return 0; } - public function get currentFPS(): Number { + public function get currentFPS():Number { __ruffle__.stub_getter("flash.media.Camera", "currentFPS"); return 0; } - public function get fps(): Number { + public function get fps():Number { __ruffle__.stub_getter("flash.media.Camera", "fps"); return 0; } - public function get height(): int { + public function get height():int { __ruffle__.stub_getter("flash.media.Camera", "height"); return 0; } - public function get index(): int { + public function get index():int { __ruffle__.stub_getter("flash.media.Camera", "index"); return 0; } - public static function get isSupported(): Boolean { + public static function get isSupported():Boolean { __ruffle__.stub_getter("flash.media.Camera", "isSupported"); return false; } - public function get keyFrameInterval(): int { + public function get keyFrameInterval():int { __ruffle__.stub_getter("flash.media.Camera", "keyFrameInterval"); return 0; } - public function get loopback(): Boolean { + public function get loopback():Boolean { __ruffle__.stub_getter("flash.media.Camera", "loopback"); return false; } - public function get motionLevel(): int { + public function get motionLevel():int { __ruffle__.stub_getter("flash.media.Camera", "motionLevel"); return 0; } - public function get motionTimeout(): int { + public function get motionTimeout():int { __ruffle__.stub_getter("flash.media.Camera", "motionTimeout"); return 0; } - public function get muted(): Boolean { + public function get muted():Boolean { __ruffle__.stub_getter("flash.media.Camera", "muted"); return true; } - public function get name(): String { + public function get name():String { __ruffle__.stub_getter("flash.media.Camera", "name"); return ""; } - public static function get names(): Array { + public static function get names():Array { __ruffle__.stub_getter("flash.media.Camera", "names"); return []; } - - public function get quality(): int { + + public function get quality():int { __ruffle__.stub_getter("flash.media.Camera", "quality"); return 0; } - - public function get width(): int { + + public function get width():int { __ruffle__.stub_getter("flash.media.Camera", "width"); return 0; } diff --git a/core/src/avm2/globals/flash/media/H264Level.as b/core/src/avm2/globals/flash/media/H264Level.as index f850994081e7..b88a4a19b4d1 100644 --- a/core/src/avm2/globals/flash/media/H264Level.as +++ b/core/src/avm2/globals/flash/media/H264Level.as @@ -3,12 +3,10 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.media -{ +package flash.media { [API("674")] - public final class H264Level - { + public final class H264Level { // Constant for H.264 level 1. public static const LEVEL_1:String = "1"; diff --git a/core/src/avm2/globals/flash/media/H264Profile.as b/core/src/avm2/globals/flash/media/H264Profile.as index 7bdbdecdfb45..ba89153c91d1 100644 --- a/core/src/avm2/globals/flash/media/H264Profile.as +++ b/core/src/avm2/globals/flash/media/H264Profile.as @@ -3,12 +3,10 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.media -{ +package flash.media { [API("674")] - public final class H264Profile - { + public final class H264Profile { // Constant for H.264/AVC baseline profile. public static const BASELINE:String = "baseline"; diff --git a/core/src/avm2/globals/flash/media/Microphone.as b/core/src/avm2/globals/flash/media/Microphone.as index dda4051161e7..1c8430f51bdb 100644 --- a/core/src/avm2/globals/flash/media/Microphone.as +++ b/core/src/avm2/globals/flash/media/Microphone.as @@ -2,7 +2,7 @@ package flash.media { import flash.events.EventDispatcher; public final class Microphone extends EventDispatcher { - + [API("672")] public static function getEnhancedMicrophone(index:int = -1):Microphone { __ruffle__.stub_method("flash.media.Microphone", "getEnhancedMicrophone"); @@ -14,7 +14,7 @@ package flash.media { return new Microphone(); } - public function setLoopBack(isLooped:Boolean=true) { + public function setLoopBack(isLooped:Boolean = true) { __ruffle__.stub_method("flash.media.Microphone", "setLoopBack"); } diff --git a/core/src/avm2/globals/flash/media/MicrophoneEnhancedMode.as b/core/src/avm2/globals/flash/media/MicrophoneEnhancedMode.as index 8f23c8460bcb..fd6a3c0479b8 100644 --- a/core/src/avm2/globals/flash/media/MicrophoneEnhancedMode.as +++ b/core/src/avm2/globals/flash/media/MicrophoneEnhancedMode.as @@ -3,12 +3,10 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.media -{ +package flash.media { [API("672")] - public final class MicrophoneEnhancedMode - { + public final class MicrophoneEnhancedMode { // Use this mode to allow both parties to talk at the same time. public static const FULL_DUPLEX:String = "fullDuplex"; diff --git a/core/src/avm2/globals/flash/media/MicrophoneEnhancedOptions.as b/core/src/avm2/globals/flash/media/MicrophoneEnhancedOptions.as index cef60dc7116b..14d1f852a5f2 100644 --- a/core/src/avm2/globals/flash/media/MicrophoneEnhancedOptions.as +++ b/core/src/avm2/globals/flash/media/MicrophoneEnhancedOptions.as @@ -1,9 +1,9 @@ package flash.media { [API("672")] public final class MicrophoneEnhancedOptions { - public var echoPath: int; - public var isVoiceDetected: int; - public var mode: String; - public var nonLinearProcessing: Boolean; + public var echoPath:int; + public var isVoiceDetected:int; + public var mode:String; + public var nonLinearProcessing:Boolean; } } \ No newline at end of file diff --git a/core/src/avm2/globals/flash/media/Sound.as b/core/src/avm2/globals/flash/media/Sound.as index e29d46957a37..d0dcfdac0eea 100644 --- a/core/src/avm2/globals/flash/media/Sound.as +++ b/core/src/avm2/globals/flash/media/Sound.as @@ -2,15 +2,14 @@ package flash.media { import flash.events.EventDispatcher; import flash.utils.ByteArray; import flash.net.URLRequest; - + [Ruffle(InstanceAllocator)] public class Sound extends EventDispatcher { public function Sound(stream:URLRequest = null, context:SoundLoaderContext = null) { - this.init(stream, context) + this.init(stream, context); } private native function init(stream:URLRequest, context:SoundLoaderContext); - public native function get bytesLoaded():uint; public native function get bytesTotal():int; public native function get isBuffering():Boolean; @@ -28,6 +27,6 @@ package flash.media { [API("674")] public native function loadCompressedDataFromByteArray(bytes:ByteArray, bytesLength:uint):void; [API("674")] - public native function loadPCMFromByteArray(bytes:ByteArray, samples:uint, format:String = "float", stereo:Boolean = true, sampleRate:Number = 44100.0):void + public native function loadPCMFromByteArray(bytes:ByteArray, samples:uint, format:String = "float", stereo:Boolean = true, sampleRate:Number = 44100.0):void; } } diff --git a/core/src/avm2/globals/flash/media/SoundChannel.as b/core/src/avm2/globals/flash/media/SoundChannel.as index ab9b41ee9109..de630f84117f 100644 --- a/core/src/avm2/globals/flash/media/SoundChannel.as +++ b/core/src/avm2/globals/flash/media/SoundChannel.as @@ -1,6 +1,6 @@ package flash.media { import flash.events.EventDispatcher; - + [Ruffle(InstanceAllocator)] public final class SoundChannel extends EventDispatcher { public native function get leftPeak():Number; diff --git a/core/src/avm2/globals/flash/media/SoundCodec.as b/core/src/avm2/globals/flash/media/SoundCodec.as index 17e582bc8ea3..4e6c3da974b7 100644 --- a/core/src/avm2/globals/flash/media/SoundCodec.as +++ b/core/src/avm2/globals/flash/media/SoundCodec.as @@ -3,11 +3,9 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.media -{ +package flash.media { - public final class SoundCodec - { + public final class SoundCodec { // Specifies that the Nellymoser codec be used for compressing audio. public static const NELLYMOSER:String = "NellyMoser"; diff --git a/core/src/avm2/globals/flash/media/SoundMixer.as b/core/src/avm2/globals/flash/media/SoundMixer.as index 70cc4c1a4066..a8a4f1fcca61 100644 --- a/core/src/avm2/globals/flash/media/SoundMixer.as +++ b/core/src/avm2/globals/flash/media/SoundMixer.as @@ -1,6 +1,6 @@ package flash.media { import flash.utils.ByteArray; - + public final class SoundMixer { public static native function get soundTransform():SoundTransform; @@ -10,7 +10,7 @@ package flash.media { public static native function set bufferTime(value:int):void; public static native function stopAll():void; - public static native function areSoundsInaccessible():Boolean + public static native function areSoundsInaccessible():Boolean; public static native function computeSpectrum(outputArray:ByteArray, FFTMode:Boolean = false, stretchFactor:int = 0):void; } } \ No newline at end of file diff --git a/core/src/avm2/globals/flash/media/StageVideoAvailability.as b/core/src/avm2/globals/flash/media/StageVideoAvailability.as index c9c0cebb3978..c4e9a999dd61 100644 --- a/core/src/avm2/globals/flash/media/StageVideoAvailability.as +++ b/core/src/avm2/globals/flash/media/StageVideoAvailability.as @@ -3,12 +3,10 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.media -{ +package flash.media { [API("670")] - public final class StageVideoAvailability - { + public final class StageVideoAvailability { // Stage video is currently available. public static const AVAILABLE:String = "available"; diff --git a/core/src/avm2/globals/flash/media/StageVideoAvailabilityReason.as b/core/src/avm2/globals/flash/media/StageVideoAvailabilityReason.as index 249621b2a31e..c69f43ee607b 100644 --- a/core/src/avm2/globals/flash/media/StageVideoAvailabilityReason.as +++ b/core/src/avm2/globals/flash/media/StageVideoAvailabilityReason.as @@ -3,12 +3,11 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.media -{ +package flash.media { - [API("688")] // the docs say 670, that's wrong - public final class StageVideoAvailabilityReason - { + [API("688")] + // the docs say 670, that's wrong + public final class StageVideoAvailabilityReason { // Stage video is not currently available, the driver is too old or black listed public static const DRIVER_TOO_OLD:String = "driverTooOld"; diff --git a/core/src/avm2/globals/flash/media/Video.as b/core/src/avm2/globals/flash/media/Video.as index b64553f2a535..167645dabec4 100644 --- a/core/src/avm2/globals/flash/media/Video.as +++ b/core/src/avm2/globals/flash/media/Video.as @@ -1,19 +1,17 @@ -package flash.media -{ +package flash.media { import __ruffle__.stub_method; - import flash.display.DisplayObject - import flash.net.NetStream - + import flash.display.DisplayObject; + import flash.net.NetStream; + [Ruffle(InstanceAllocator)] - public class Video extends DisplayObject - { - private var _deblocking: int; - private var _smoothing: Boolean; - private var _videoWidth: int; - private var _videoHeight: int; - - public function Video(width: int = 320, height: int = 240) { + public class Video extends DisplayObject { + private var _deblocking:int; + private var _smoothing:Boolean; + private var _videoWidth:int; + private var _videoHeight:int; + + public function Video(width:int = 320, height:int = 240) { if (width < 0 || height < 0) { throw new RangeError("Error #2006: The supplied index is out of bounds.", 2006); } @@ -22,7 +20,7 @@ package flash.media this.init(width, height); } - private native function init(width: int, height: int); + private native function init(width:int, height:int); public function get deblocking():int { return this._deblocking; @@ -48,7 +46,7 @@ package flash.media return this._videoHeight; } - public native function attachNetStream(netStream: NetStream); + public native function attachNetStream(netStream:NetStream); public function clear():void { stub_method("flash.media.Video", "clear"); diff --git a/core/src/avm2/globals/flash/media/VideoCodec.as b/core/src/avm2/globals/flash/media/VideoCodec.as index 98158ed9a582..5708820636d6 100644 --- a/core/src/avm2/globals/flash/media/VideoCodec.as +++ b/core/src/avm2/globals/flash/media/VideoCodec.as @@ -3,12 +3,10 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.media -{ +package flash.media { [API("674")] - public final class VideoCodec - { + public final class VideoCodec { // Constant value indicating that H.264/AVC codec is used for compressing video. public static const H264AVC:String = "H264Avc"; diff --git a/core/src/avm2/globals/flash/media/VideoStatus.as b/core/src/avm2/globals/flash/media/VideoStatus.as index 715333e61c9c..183701e2114a 100644 --- a/core/src/avm2/globals/flash/media/VideoStatus.as +++ b/core/src/avm2/globals/flash/media/VideoStatus.as @@ -3,12 +3,10 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.media -{ +package flash.media { [API("670")] - public final class VideoStatus - { + public final class VideoStatus { // Indicates hardware-accelerated (GPU) video decoding. public static const ACCELERATED:String = "accelerated"; diff --git a/core/src/avm2/globals/flash/media/VideoStreamSettings.as b/core/src/avm2/globals/flash/media/VideoStreamSettings.as index 4c536b61aba7..9a42d74344b0 100644 --- a/core/src/avm2/globals/flash/media/VideoStreamSettings.as +++ b/core/src/avm2/globals/flash/media/VideoStreamSettings.as @@ -3,85 +3,73 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.media -{ +package flash.media { import __ruffle__.stub_method; [API("674")] - public class VideoStreamSettings - { + public class VideoStreamSettings { // Retrieve the maximum amount of bandwidth that the current outgoing video feed can use, in bytes per second. - private var _bandwidth: int; + private var _bandwidth:int; // Video codec used for compression. - private var _codec: String; + private var _codec:String; // The maximum frame rate at which the video frames are encoded, in frames per second. - private var _fps: Number; + private var _fps:Number; // The current encoded height, in pixels. - private var _height: int; + private var _height:int; // The number of video frames transmitted in full (called keyframes or IDR frames) instead of being interpolated by the video compression algorithm. - private var _keyFrameInterval: int; + private var _keyFrameInterval:int; // The required level of picture quality, as determined by the amount of compression being applied to each video frame. - private var _quality: int; + private var _quality:int; // The current encoded width, in pixels. - private var _width: int; + private var _width:int; // The number of video frames transmitted in full (called keyframes or Instantaneous Decoding Refresh (IDR) frames) instead of being interpolated by the video compression algorithm. - public function setKeyFrameInterval(keyFrameInterval:int = 15):void - { + public function setKeyFrameInterval(keyFrameInterval:int = 15):void { stub_method("flash.media.VideoStreamSettings", "setKeyFrameInterval"); } // Sets the resolution and frame rate used for video encoding. - public function setMode(width:int = -1, height:int = -1, fps:Number = -1):void - { + public function setMode(width:int = -1, height:int = -1, fps:Number = -1):void { stub_method("flash.media.VideoStreamSettings", "setMode"); } // Sets maximum amount of bandwidth per second or the required picture quality that the current outgoing video feed can use. - public function setQuality(bandwidth:int = 16384, quality:int = 0):void - { + public function setQuality(bandwidth:int = 16384, quality:int = 0):void { stub_method("flash.media.VideoStreamSettings", "setQuality"); } - public function get bandwidth() : int - { + public function get bandwidth():int { return this._bandwidth; } - public function get codec() : String - { + public function get codec():String { return this._codec; } - public function get fps() : Number - { + public function get fps():Number { return this._fps; } - public function get height() : int - { + public function get height():int { return this._height; } - public function get keyFrameInterval() : int - { + public function get keyFrameInterval():int { return this._keyFrameInterval; } - public function get quality() : int - { + public function get quality():int { stub_getter("flash.media.VideoStreamSettings", "quality"); return this._quality; } - public function get width() : int - { + public function get width():int { return this._width; } } diff --git a/core/src/avm2/globals/flash/net/DatagramSocket.as b/core/src/avm2/globals/flash/net/DatagramSocket.as index 215101cbac6b..66935f455f3e 100644 --- a/core/src/avm2/globals/flash/net/DatagramSocket.as +++ b/core/src/avm2/globals/flash/net/DatagramSocket.as @@ -1,5 +1,6 @@ package flash.net { - [API("668")] // AIR 2.0 + [API("668")] + // AIR 2.0 public class DatagramSocket { } diff --git a/core/src/avm2/globals/flash/net/FileFilter.as b/core/src/avm2/globals/flash/net/FileFilter.as index ee56b54ca9ab..763d73930c8a 100644 --- a/core/src/avm2/globals/flash/net/FileFilter.as +++ b/core/src/avm2/globals/flash/net/FileFilter.as @@ -8,36 +8,36 @@ package flash.net { [Ruffle(NativeAccessible)] private var _macType:String; - + public function FileFilter(description:String, extension:String, macType:String = null) { this._description = description; this._extension = extension; this._macType = macType; } - public function get description(): String { + public function get description():String { return this._description; } - public function set description(val: String): void { + public function set description(val:String):void { this._description = val; } - public function get extension(): String { + public function get extension():String { return this._extension; } - public function set extension(val: String): void { + public function set extension(val:String):void { this._extension = val; } - public function get macType(): String { + public function get macType():String { return this._macType; } - public function set macType(val: String): void { + public function set macType(val:String):void { this._macType = val; } - + } } diff --git a/core/src/avm2/globals/flash/net/FileReference.as b/core/src/avm2/globals/flash/net/FileReference.as index 38e2c714b1f8..a75d459e3a3e 100644 --- a/core/src/avm2/globals/flash/net/FileReference.as +++ b/core/src/avm2/globals/flash/net/FileReference.as @@ -1,41 +1,39 @@ -package flash.net -{ +package flash.net { import flash.events.EventDispatcher; import flash.utils.ByteArray; import __ruffle__.stub_method; [Ruffle(InstanceAllocator)] - public class FileReference extends EventDispatcher - { + public class FileReference extends EventDispatcher { public function FileReference() { } - public native function get creationDate(): Date; + public native function get creationDate():Date; - public function get creator(): String { + public function get creator():String { // This was macOS (pre OS X) only. (Deprecated) return null; } - public native function get data(): ByteArray; + public native function get data():ByteArray; // AIR 1.0 [API("661")] - public function get extension(): String { + public function get extension():String { // The file extension, excluding the dot. return this.type ? this.type.slice(1) : null; } - public native function get modificationDate(): Date; + public native function get modificationDate():Date; - public native function get name(): String; + public native function get name():String; - public native function get size(): Number; + public native function get size():Number; // File extension, including the dot. (Deprecated) - public native function get type(): String; + public native function get type():String; - public native function browse(typeFilter:Array = null): Boolean; + public native function browse(typeFilter:Array = null):Boolean; public function cancel():void { stub_method("flash.net.FileReference", "cancel"); diff --git a/core/src/avm2/globals/flash/net/FileReferenceList.as b/core/src/avm2/globals/flash/net/FileReferenceList.as index d7ea0b340b6c..3e3f1c941d97 100644 --- a/core/src/avm2/globals/flash/net/FileReferenceList.as +++ b/core/src/avm2/globals/flash/net/FileReferenceList.as @@ -1,32 +1,30 @@ -package flash.net -{ +package flash.net { import flash.events.Event; import flash.events.EventDispatcher; import __ruffle__.stub_method; - public class FileReferenceList extends EventDispatcher - { - private var _fileList: Array; - private var _file: FileReference; + public class FileReferenceList extends EventDispatcher { + private var _fileList:Array; + private var _file:FileReference; public function FileReferenceList() { var self = this; this._file = new FileReference(); - this._file.addEventListener(Event.SELECT, function(e:*): void { - self._fileList[0] = self._file; - self.dispatchEvent(new Event(Event.SELECT)); - }); - this._file.addEventListener(Event.CANCEL, function(e:*): void { - self.dispatchEvent(new Event(Event.CANCEL)); - }); + this._file.addEventListener(Event.SELECT, function(e:*):void { + self._fileList[0] = self._file; + self.dispatchEvent(new Event(Event.SELECT)); + }); + this._file.addEventListener(Event.CANCEL, function(e:*):void { + self.dispatchEvent(new Event(Event.CANCEL)); + }); } - public function get fileList(): Array { + public function get fileList():Array { return this._fileList; } - public function browse(typeFilter: Array = null): Boolean { + public function browse(typeFilter:Array = null):Boolean { stub_method("flash.net.FileReferenceList", "browse"); this._fileList = []; diff --git a/core/src/avm2/globals/flash/net/IDynamicPropertyOutput.as b/core/src/avm2/globals/flash/net/IDynamicPropertyOutput.as index ea807a8296d8..6dc41407e77f 100644 --- a/core/src/avm2/globals/flash/net/IDynamicPropertyOutput.as +++ b/core/src/avm2/globals/flash/net/IDynamicPropertyOutput.as @@ -1,5 +1,5 @@ package flash.net { public interface IDynamicPropertyOutput { - function writeDynamicProperty(name: String, value: *): void; + function writeDynamicProperty(name:String, value:*):void; } } diff --git a/core/src/avm2/globals/flash/net/IDynamicPropertyWriter.as b/core/src/avm2/globals/flash/net/IDynamicPropertyWriter.as index 34c0042f6684..9694fad75423 100644 --- a/core/src/avm2/globals/flash/net/IDynamicPropertyWriter.as +++ b/core/src/avm2/globals/flash/net/IDynamicPropertyWriter.as @@ -1,5 +1,5 @@ package flash.net { public interface IDynamicPropertyWriter { - function writeDynamicProperties(obj: Object, output: IDynamicPropertyOutput): void; + function writeDynamicProperties(obj:Object, output:IDynamicPropertyOutput):void; } } diff --git a/core/src/avm2/globals/flash/net/LocalConnection.as b/core/src/avm2/globals/flash/net/LocalConnection.as index b73f22b8b31e..7d2c772e75a7 100644 --- a/core/src/avm2/globals/flash/net/LocalConnection.as +++ b/core/src/avm2/globals/flash/net/LocalConnection.as @@ -22,16 +22,16 @@ package flash.net { public native function connect(connectionName:String):void; - public native function send(connectionName: String, methodName: String, ... arguments):void; + public native function send(connectionName:String, methodName:String, ...arguments):void; public native function get client():Object; public native function set client(client:Object):void; - public function allowDomain(... domains): void { + public function allowDomain(...domains):void { stub_method("flash.net.LocalConnection", "allowDomain"); } - public function allowInsecureDomain(... domains): void { + public function allowInsecureDomain(...domains):void { stub_method("flash.net.LocalConnection", "allowInsecureDomain"); } } diff --git a/core/src/avm2/globals/flash/net/NetConnection.as b/core/src/avm2/globals/flash/net/NetConnection.as index 79e260e33b18..cb6e0be59d3a 100644 --- a/core/src/avm2/globals/flash/net/NetConnection.as +++ b/core/src/avm2/globals/flash/net/NetConnection.as @@ -13,13 +13,12 @@ package flash.net { public var maxPeerConnections:uint = 8; public var proxyType:String = "none"; - - public native function connect(command:String, ... arguments):void; + public native function connect(command:String, ...arguments):void; public native function addHeader(operation:String, mustUnderstand:Boolean = false, param:Object = null):void; - public native function call(command:String, responder:Responder, ... arguments):void; - + public native function call(command:String, responder:Responder, ...arguments):void; + public native function close():void; public native function get connected():Boolean; diff --git a/core/src/avm2/globals/flash/net/NetGroupReceiveMode.as b/core/src/avm2/globals/flash/net/NetGroupReceiveMode.as index 5fb890ecc19d..78f8102d958e 100644 --- a/core/src/avm2/globals/flash/net/NetGroupReceiveMode.as +++ b/core/src/avm2/globals/flash/net/NetGroupReceiveMode.as @@ -3,11 +3,9 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.net -{ +package flash.net { - public final class NetGroupReceiveMode - { + public final class NetGroupReceiveMode { // Specifies that this node accepts local messages from neighbors only if the address the neighbor uses matches this node's address exactly. public static const EXACT:String = "exact"; diff --git a/core/src/avm2/globals/flash/net/NetGroupReplicationStrategy.as b/core/src/avm2/globals/flash/net/NetGroupReplicationStrategy.as index 617a6cbd7758..c1c24cea3f0f 100644 --- a/core/src/avm2/globals/flash/net/NetGroupReplicationStrategy.as +++ b/core/src/avm2/globals/flash/net/NetGroupReplicationStrategy.as @@ -3,11 +3,9 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.net -{ +package flash.net { - public final class NetGroupReplicationStrategy - { + public final class NetGroupReplicationStrategy { // Specifies that when fetching objects from a neighbor to satisfy a want, the objects with the lowest index numbers are requested first. public static const LOWEST_FIRST:String = "lowestFirst"; diff --git a/core/src/avm2/globals/flash/net/NetGroupSendMode.as b/core/src/avm2/globals/flash/net/NetGroupSendMode.as index fbaaa2385963..a25cd3c59117 100644 --- a/core/src/avm2/globals/flash/net/NetGroupSendMode.as +++ b/core/src/avm2/globals/flash/net/NetGroupSendMode.as @@ -3,11 +3,9 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.net -{ +package flash.net { - public final class NetGroupSendMode - { + public final class NetGroupSendMode { // Specifies the neighbor with the nearest group address in the decreasing direction. public static const NEXT_DECREASING:String = "nextDecreasing"; diff --git a/core/src/avm2/globals/flash/net/NetGroupSendResult.as b/core/src/avm2/globals/flash/net/NetGroupSendResult.as index 98d27fe0dc1c..720177638b90 100644 --- a/core/src/avm2/globals/flash/net/NetGroupSendResult.as +++ b/core/src/avm2/globals/flash/net/NetGroupSendResult.as @@ -3,11 +3,9 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.net -{ +package flash.net { - public final class NetGroupSendResult - { + public final class NetGroupSendResult { // Indicates an error occurred (such as no permission) when using a Directed Routing method. public static const ERROR:String = "error"; diff --git a/core/src/avm2/globals/flash/net/NetStream.as b/core/src/avm2/globals/flash/net/NetStream.as index 18598c723e7c..6cf7573802bd 100644 --- a/core/src/avm2/globals/flash/net/NetStream.as +++ b/core/src/avm2/globals/flash/net/NetStream.as @@ -14,8 +14,8 @@ package flash.net { [Ruffle(InstanceAllocator)] public class NetStream extends EventDispatcher { - public static const CONNECT_TO_FMS: String = "connectToFMS"; - public static const DIRECT_CONNECTIONS: String = "directConnections"; + public static const CONNECT_TO_FMS:String = "connectToFMS"; + public static const DIRECT_CONNECTIONS:String = "directConnections"; public function NetStream(connection:NetConnection, peer:String = CONNECT_TO_FMS) { @@ -51,9 +51,9 @@ package flash.net { } public native function pause(); - + public native function play(...args); - + public function play2(param:NetStreamPlayOptions) { stub_method("flash.net.NetStream", "play2"); } @@ -63,7 +63,7 @@ package flash.net { stub_method("flash.net.NetStream", "preloadEmbeddedData"); } - public function publish(name:String=null, type:String=null) { + public function publish(name:String = null, type:String = null) { stub_method("flash.net.NetStream", "publish"); } @@ -213,14 +213,13 @@ package flash.net { return new NetStreamInfo(); } - - public function get liveDelay(): Number { + public function get liveDelay():Number { stub_getter("flash.net.NetStream", "liveDelay"); return 0; }; - public function get maxPauseBufferTime(): Number { + public function get maxPauseBufferTime():Number { stub_getter("flash.net.NetStream", "maxPauseBufferTime"); return 0; }; @@ -238,7 +237,7 @@ package flash.net { stub_setter("flash.net.NetStream", "multicastAvailabilitySendToAll"); }; - public function get multicastAvailabilityUpdatePeriod(): Number { + public function get multicastAvailabilityUpdatePeriod():Number { stub_getter("flash.net.NetStream", "multicastAvailabilityUpdatePeriod"); return 0; }; @@ -256,12 +255,12 @@ package flash.net { stub_setter("flash.net.NetStream", "multicastFetchPeriod"); }; - public function get multicastInfo() : NetStreamMulticastInfo { + public function get multicastInfo():NetStreamMulticastInfo { stub_getter("flash.net.NetStream", "multicastInfo"); return new NetStreamMulticastInfo(); }; - public function get multicastPushNeighborLimit() : Number { + public function get multicastPushNeighborLimit():Number { stub_getter("flash.net.NetStream", "multicastPushNeighborLimit"); return 0; }; @@ -270,16 +269,16 @@ package flash.net { stub_setter("flash.net.NetStream", "multicastPushNeighborLimit"); }; - public function get multicastRelayMarginDuration() : Number { + public function get multicastRelayMarginDuration():Number { stub_getter("flash.net.NetStream", "multicastRelayMarginDuration"); return 0; }; - public function set multicastRelayMarginDuration(dur: Number) { + public function set multicastRelayMarginDuration(dur:Number) { stub_setter("flash.net.NetStream", "multicastRelayMarginDuration"); }; - public function get multicastWindowDuration() : Number { + public function get multicastWindowDuration():Number { stub_getter("flash.net.NetStream", "multicastWindowDuration"); return 0; @@ -289,22 +288,22 @@ package flash.net { stub_setter("flash.net.NetStream", "multicastWindowDuration"); }; - public function get nearNonce(): String { + public function get nearNonce():String { stub_getter("flash.net.NetStream", "nearNonce"); return ""; }; - public function get objectEncoding(): uint { + public function get objectEncoding():uint { stub_getter("flash.net.NetStream", "objectEncoding"); return 0; }; - public function get peerStreams(): Array { + public function get peerStreams():Array { stub_getter("flash.net.NetStream", "peerStreams"); return []; }; - public function get soundTransform(): flash.media.SoundTransform { + public function get soundTransform():flash.media.SoundTransform { stub_getter("flash.net.NetStream", "soundTransform"); return new flash.media.SoundTransform(); }; @@ -313,9 +312,9 @@ package flash.net { stub_setter("flash.net.NetStream", "soundTransform"); }; - public native function get time(): Number; + public native function get time():Number; - public function get useHardwareDecoder(): Boolean { + public function get useHardwareDecoder():Boolean { stub_getter("flash.net.NetStream", "useHardwareDecoder"); return true; }; @@ -325,7 +324,7 @@ package flash.net { }; [API("680")] - public function get useJitterBuffer(): Boolean { + public function get useJitterBuffer():Boolean { stub_getter("flash.net.NetStream", "useJitterBuffer"); return false; }; @@ -335,7 +334,7 @@ package flash.net { stub_setter("flash.net.NetStream", "useJitterBuffer"); }; - public function get videoReliable(): Boolean { + public function get videoReliable():Boolean { stub_getter("flash.net.NetStream", "videoReliable"); return false; }; @@ -354,13 +353,13 @@ package flash.net { }; [API("674")] - public function get videoStreamSettings(): VideoStreamSettings { + public function get videoStreamSettings():VideoStreamSettings { stub_getter("flash.net.NetStream", "videoStreamSettings"); return null; }; [API("674")] - public function set videoStreamSettings(settings: VideoStreamSettings) { + public function set videoStreamSettings(settings:VideoStreamSettings) { stub_setter("flash.net.NetStream", "videoStreamSettings"); }; } diff --git a/core/src/avm2/globals/flash/net/NetStreamAppendBytesAction.as b/core/src/avm2/globals/flash/net/NetStreamAppendBytesAction.as index 8d148a84a7af..f8ef2e551d12 100644 --- a/core/src/avm2/globals/flash/net/NetStreamAppendBytesAction.as +++ b/core/src/avm2/globals/flash/net/NetStreamAppendBytesAction.as @@ -1,10 +1,8 @@ -package flash.net -{ - [API("667")] - public final class NetStreamAppendBytesAction - { - public static const END_SEQUENCE:String = "endSequence"; - public static const RESET_BEGIN:String = "resetBegin"; - public static const RESET_SEEK:String = "resetSeek"; - } +package flash.net { + [API("667")] + public final class NetStreamAppendBytesAction { + public static const END_SEQUENCE:String = "endSequence"; + public static const RESET_BEGIN:String = "resetBegin"; + public static const RESET_SEEK:String = "resetSeek"; + } } diff --git a/core/src/avm2/globals/flash/net/NetStreamInfo.as b/core/src/avm2/globals/flash/net/NetStreamInfo.as index fb3951ab6aa9..bc416621245c 100644 --- a/core/src/avm2/globals/flash/net/NetStreamInfo.as +++ b/core/src/avm2/globals/flash/net/NetStreamInfo.as @@ -1,109 +1,109 @@ package flash.net { public final class NetStreamInfo { - private var _audioBufferByteLength: Number; - private var _audioBufferLength: Number; - private var _audioByteCount: Number; - private var _audioBytesPerSecond: Number; - private var _audioLossRate: Number; - private var _byteCount: Number; - private var _currentBytesPerSecond: Number; - private var _dataBufferByteLength: Number; - private var _dataBufferLength: Number; - private var _dataByteCount: Number; - private var _dataBytesPerSecond: Number; - private var _droppedFrames: Number; - private var _isLive: Boolean; - private var _maxBytesPerSecond: Number; - private var _metaData: Object; - private var _playbackBytesPerSecond: Number; - private var _resourceName: String; - private var _SRTT: Number; - private var _uri: String; - private var _videoBufferByteLength: Number; - private var _videoBufferLength: Number; - private var _videoByteCount: Number; - private var _videoBytesPerSecond: Number; - private var _videoLossRate: Number; - private var _xmpData: Object; + private var _audioBufferByteLength:Number; + private var _audioBufferLength:Number; + private var _audioByteCount:Number; + private var _audioBytesPerSecond:Number; + private var _audioLossRate:Number; + private var _byteCount:Number; + private var _currentBytesPerSecond:Number; + private var _dataBufferByteLength:Number; + private var _dataBufferLength:Number; + private var _dataByteCount:Number; + private var _dataBytesPerSecond:Number; + private var _droppedFrames:Number; + private var _isLive:Boolean; + private var _maxBytesPerSecond:Number; + private var _metaData:Object; + private var _playbackBytesPerSecond:Number; + private var _resourceName:String; + private var _SRTT:Number; + private var _uri:String; + private var _videoBufferByteLength:Number; + private var _videoBufferLength:Number; + private var _videoByteCount:Number; + private var _videoBytesPerSecond:Number; + private var _videoLossRate:Number; + private var _xmpData:Object; public function toString():String { - __ruffle__.stub_method("flash.net.NetStreamInfo", "toString") + __ruffle__.stub_method("flash.net.NetStreamInfo", "toString"); return super.toString(); } - public function get audioBufferByteLength(): Number { + public function get audioBufferByteLength():Number { return this._audioBufferByteLength; }; - public function get audioBufferLength(): Number { + public function get audioBufferLength():Number { return this._audioBufferLength; }; - public function get audioByteCount(): Number { + public function get audioByteCount():Number { return this._audioByteCount; }; - public function get audioBytesPerSecond(): Number { + public function get audioBytesPerSecond():Number { return this._audioBytesPerSecond; }; - public function get audioLossRate(): Number { + public function get audioLossRate():Number { return this._audioLossRate; }; - public function get byteCount(): Number { + public function get byteCount():Number { return this._byteCount; }; - public function get currentBytesPerSecond(): Number { + public function get currentBytesPerSecond():Number { return this._currentBytesPerSecond; }; - public function get dataBufferByteLength(): Number { + public function get dataBufferByteLength():Number { return this._dataBufferByteLength; }; - public function get dataBufferLength(): Number { + public function get dataBufferLength():Number { return this._dataBufferLength; }; - public function get dataByteCount(): Number { + public function get dataByteCount():Number { return this._dataByteCount; }; - public function get dataBytesPerSecond(): Number { + public function get dataBytesPerSecond():Number { return this._dataBytesPerSecond; }; - public function get droppedFrames(): Number { + public function get droppedFrames():Number { return this._droppedFrames; }; public function get isLive():Boolean { return this._isLive; }; - public function get maxBytesPerSecond(): Number { + public function get maxBytesPerSecond():Number { return this._maxBytesPerSecond; }; - public function get metaData(): Object { + public function get metaData():Object { return this._metaData; }; - public function get playbackBytesPerSecond(): Number { + public function get playbackBytesPerSecond():Number { return this._playbackBytesPerSecond; }; - public function get resourceName(): String { + public function get resourceName():String { return this._resourceName; }; - public function get SRTT(): Number { + public function get SRTT():Number { return this._SRTT; }; - public function get uri(): String { + public function get uri():String { return this._uri; }; - public function get videoBufferByteLength(): Number { + public function get videoBufferByteLength():Number { return this._videoBufferByteLength; }; - public function get videoBufferLength(): Number { + public function get videoBufferLength():Number { return this._videoBufferLength; }; - public function get videoByteCount(): Number { + public function get videoByteCount():Number { return this._videoByteCount; }; - public function get videoBytesPerSecond(): Number { + public function get videoBytesPerSecond():Number { return this._videoBytesPerSecond; }; - public function get videoLossRate(): Number { + public function get videoLossRate():Number { return this._videoLossRate; }; - public function get xmpData(): Object { + public function get xmpData():Object { return this._xmpData; }; } diff --git a/core/src/avm2/globals/flash/net/NetStreamMulticastInfo.as b/core/src/avm2/globals/flash/net/NetStreamMulticastInfo.as index 0a1aba15f9b8..cf2d40417bd5 100644 --- a/core/src/avm2/globals/flash/net/NetStreamMulticastInfo.as +++ b/core/src/avm2/globals/flash/net/NetStreamMulticastInfo.as @@ -1,24 +1,24 @@ package flash.net { public final class NetStreamMulticastInfo { - private var _bytesPushedFromPeers : Number; - private var _bytesPushedToPeers : Number; - private var _bytesReceivedFromIPMulticast : Number; - private var _bytesReceivedFromServer : Number; - private var _bytesRequestedByPeers : Number; - private var _bytesRequestedFromPeers : Number; - private var _fragmentsPushedFromPeers : Number; - private var _fragmentsPushedToPeers : Number; - private var _fragmentsReceivedFromIPMulticast : Number; - private var _fragmentsReceivedFromServer : Number; - private var _fragmentsRequestedByPeers : Number; - private var _fragmentsRequestedFromPeers : Number; - private var _receiveControlBytesPerSecond : Number; - private var _receiveDataBytesPerSecond : Number; - private var _receiveDataBytesPerSecondFromIPMulticast : Number; - private var _receiveDataBytesPerSecondFromServer : Number; - private var _sendControlBytesPerSecond : Number; - private var _sendControlBytesPerSecondToServer : Number; - private var _sendDataBytesPerSecond : Number; + private var _bytesPushedFromPeers:Number; + private var _bytesPushedToPeers:Number; + private var _bytesReceivedFromIPMulticast:Number; + private var _bytesReceivedFromServer:Number; + private var _bytesRequestedByPeers:Number; + private var _bytesRequestedFromPeers:Number; + private var _fragmentsPushedFromPeers:Number; + private var _fragmentsPushedToPeers:Number; + private var _fragmentsReceivedFromIPMulticast:Number; + private var _fragmentsReceivedFromServer:Number; + private var _fragmentsRequestedByPeers:Number; + private var _fragmentsRequestedFromPeers:Number; + private var _receiveControlBytesPerSecond:Number; + private var _receiveDataBytesPerSecond:Number; + private var _receiveDataBytesPerSecondFromIPMulticast:Number; + private var _receiveDataBytesPerSecondFromServer:Number; + private var _sendControlBytesPerSecond:Number; + private var _sendControlBytesPerSecondToServer:Number; + private var _sendDataBytesPerSecond:Number; public function toString():String { __ruffle__.stub_method("flash.net.NetStreamMulticastInfo", "toString"); @@ -26,79 +26,79 @@ package flash.net { return ""; } - public function get bytesPushedFromPeers() : Number { + public function get bytesPushedFromPeers():Number { return this._bytesPushedFromPeers; }; - public function get bytesPushedToPeers() : Number { + public function get bytesPushedToPeers():Number { return this._bytesPushedToPeers; }; - public function get bytesReceivedFromIPMulticast() : Number { + public function get bytesReceivedFromIPMulticast():Number { return this._bytesReceivedFromIPMulticast; }; - public function get bytesReceivedFromServer() : Number { + public function get bytesReceivedFromServer():Number { return this._bytesReceivedFromServer; }; - public function get bytesRequestedByPeers() : Number { + public function get bytesRequestedByPeers():Number { return this._bytesRequestedByPeers; }; - public function get bytesRequestedFromPeers() : Number { + public function get bytesRequestedFromPeers():Number { return this._bytesRequestedFromPeers; }; - public function get fragmentsPushedFromPeers() : Number { + public function get fragmentsPushedFromPeers():Number { return this._fragmentsPushedFromPeers; }; - public function get fragmentsPushedToPeers() : Number { + public function get fragmentsPushedToPeers():Number { return this._fragmentsPushedToPeers; }; - public function get fragmentsReceivedFromIPMulticast() : Number { + public function get fragmentsReceivedFromIPMulticast():Number { return this._fragmentsReceivedFromIPMulticast; }; - public function get fragmentsReceivedFromServer() : Number { + public function get fragmentsReceivedFromServer():Number { return this._fragmentsReceivedFromServer; }; - public function get fragmentsRequestedByPeers() : Number { + public function get fragmentsRequestedByPeers():Number { return this._fragmentsRequestedByPeers; }; - public function get fragmentsRequestedFromPeers() : Number { + public function get fragmentsRequestedFromPeers():Number { return this._fragmentsRequestedFromPeers; }; - public function get receiveControlBytesPerSecond() : Number { + public function get receiveControlBytesPerSecond():Number { return this._receiveControlBytesPerSecond; }; - public function get receiveDataBytesPerSecond() : Number { + public function get receiveDataBytesPerSecond():Number { return this._receiveDataBytesPerSecond; }; - public function get receiveDataBytesPerSecondFromIPMulticast() : Number { + public function get receiveDataBytesPerSecondFromIPMulticast():Number { return this._receiveDataBytesPerSecondFromIPMulticast; }; - public function get receiveDataBytesPerSecondFromServer() : Number { + public function get receiveDataBytesPerSecondFromServer():Number { return this._receiveDataBytesPerSecondFromServer; }; - public function get sendControlBytesPerSecond() : Number { + public function get sendControlBytesPerSecond():Number { return this._sendControlBytesPerSecond; }; - public function get sendControlBytesPerSecondToServer() : Number { + public function get sendControlBytesPerSecondToServer():Number { return this._sendControlBytesPerSecondToServer; }; - public function get sendDataBytesPerSecond() : Number { + public function get sendDataBytesPerSecond():Number { return this._sendDataBytesPerSecond; }; diff --git a/core/src/avm2/globals/flash/net/NetStreamPlayOptions.as b/core/src/avm2/globals/flash/net/NetStreamPlayOptions.as index 88e2a787e902..fd08196a0066 100644 --- a/core/src/avm2/globals/flash/net/NetStreamPlayOptions.as +++ b/core/src/avm2/globals/flash/net/NetStreamPlayOptions.as @@ -3,28 +3,26 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.net -{ +package flash.net { import flash.events.EventDispatcher; - public dynamic class NetStreamPlayOptions extends EventDispatcher - { + public dynamic class NetStreamPlayOptions extends EventDispatcher { // The duration of playback, in seconds, for the stream specified in streamName. - public var len: Number = -1; + public var len:Number = -1; // The absolute stream time at which the server switches between streams of different bitrates for Flash Media Server dynamic streaming. - public var offset: Number = -1; + public var offset:Number = -1; // The name of the old stream or the stream to transition from. - public var oldStreamName: String; + public var oldStreamName:String; // The start time, in seconds, for streamName. - public var start: Number = -2; + public var start:Number = -2; // The name of the new stream to transition to or to play. - public var streamName: String; + public var streamName:String; // The mode in which streamName is played or transitioned to. - public var transition: String; + public var transition:String; } } diff --git a/core/src/avm2/globals/flash/net/NetStreamPlayTransitions.as b/core/src/avm2/globals/flash/net/NetStreamPlayTransitions.as index 641500eacc22..00a7672ba9a0 100644 --- a/core/src/avm2/globals/flash/net/NetStreamPlayTransitions.as +++ b/core/src/avm2/globals/flash/net/NetStreamPlayTransitions.as @@ -1,18 +1,16 @@ -package flash.net -{ - [API("662")] - public class NetStreamPlayTransitions - { - public static const APPEND:String = "append"; +package flash.net { + [API("662")] + public class NetStreamPlayTransitions { + public static const APPEND:String = "append"; - [API("667")] - public static const APPEND_AND_WAIT:String = "appendAndWait"; - [API("667")] - public static const RESUME:String = "resume"; + [API("667")] + public static const APPEND_AND_WAIT:String = "appendAndWait"; + [API("667")] + public static const RESUME:String = "resume"; - public static const RESET:String = "reset"; - public static const STOP:String = "stop"; - public static const SWAP:String = "swap"; - public static const SWITCH:String = "switch"; - } + public static const RESET:String = "reset"; + public static const STOP:String = "stop"; + public static const SWAP:String = "swap"; + public static const SWITCH:String = "switch"; + } } diff --git a/core/src/avm2/globals/flash/net/ObjectEncoding.as b/core/src/avm2/globals/flash/net/ObjectEncoding.as index 9d6ac2b12d9b..0a23a54a2e2e 100644 --- a/core/src/avm2/globals/flash/net/ObjectEncoding.as +++ b/core/src/avm2/globals/flash/net/ObjectEncoding.as @@ -1,13 +1,13 @@ package flash.net { public final class ObjectEncoding { - public static const AMF0: uint = 0; + public static const AMF0:uint = 0; - public static const AMF3: uint = 3; + public static const AMF3:uint = 3; - public static const DEFAULT: uint = 3; + public static const DEFAULT:uint = 3; - public static native function get dynamicPropertyWriter(): IDynamicPropertyWriter; + public static native function get dynamicPropertyWriter():IDynamicPropertyWriter; - public static native function set dynamicPropertyWriter(value: IDynamicPropertyWriter): void; + public static native function set dynamicPropertyWriter(value:IDynamicPropertyWriter):void; } } diff --git a/core/src/avm2/globals/flash/net/Responder.as b/core/src/avm2/globals/flash/net/Responder.as index b956d705ec73..5b3df912a99a 100644 --- a/core/src/avm2/globals/flash/net/Responder.as +++ b/core/src/avm2/globals/flash/net/Responder.as @@ -1,5 +1,5 @@ package flash.net { -[Ruffle(InstanceAllocator)] + [Ruffle(InstanceAllocator)] public class Responder { public function Responder(result:Function, status:Function = null) { init(result, status); diff --git a/core/src/avm2/globals/flash/net/SharedObject.as b/core/src/avm2/globals/flash/net/SharedObject.as index 0f8450c9b945..4b9f8c460c65 100644 --- a/core/src/avm2/globals/flash/net/SharedObject.as +++ b/core/src/avm2/globals/flash/net/SharedObject.as @@ -7,7 +7,7 @@ package flash.net { [Ruffle(InstanceAllocator)] public class SharedObject extends EventDispatcher { public function SharedObject() { - // Unreachable; the allocator always throws + // Unreachable; the allocator always throws } // NOTE: We currently always use AMF3 serialization. @@ -15,15 +15,15 @@ package flash.net { // you will need to adjust the serialization and deserialization code // to work with AMF0. - public static native function getLocal(name:String, localPath:String = null, secure:Boolean = false): SharedObject; + public static native function getLocal(name:String, localPath:String = null, secure:Boolean = false):SharedObject; - public native function get size() : uint; - public native function get objectEncoding() : uint; - public native function set objectEncoding(value:uint) : void; + public native function get size():uint; + public native function get objectEncoding():uint; + public native function set objectEncoding(value:uint):void; - public native function flush(minDiskSpace:int = 0) : String; - public native function close() : void; - public native function clear() : void; + public native function flush(minDiskSpace:int = 0):String; + public native function close():void; + public native function clear():void; public function setProperty(propertyName:String, value:Object = null):void { this.data[propertyName] = value; diff --git a/core/src/avm2/globals/flash/net/SharedObjectFlushStatus.as b/core/src/avm2/globals/flash/net/SharedObjectFlushStatus.as index 2285ec9d1b01..13e6e4e7fe9d 100644 --- a/core/src/avm2/globals/flash/net/SharedObjectFlushStatus.as +++ b/core/src/avm2/globals/flash/net/SharedObjectFlushStatus.as @@ -1,6 +1,6 @@ package flash.net { public final class SharedObjectFlushStatus { - public static const FLUSHED: String = "flushed"; - public static const PENDING: String = "pending"; + public static const FLUSHED:String = "flushed"; + public static const PENDING:String = "pending"; } } diff --git a/core/src/avm2/globals/flash/net/Socket.as b/core/src/avm2/globals/flash/net/Socket.as index 6e8a9337119e..b116dd46c32e 100644 --- a/core/src/avm2/globals/flash/net/Socket.as +++ b/core/src/avm2/globals/flash/net/Socket.as @@ -17,7 +17,7 @@ package flash.net { } } - public native function connect(host: String, port: int):void; + public native function connect(host:String, port:int):void; [API("662")] public native function get timeout():uint; diff --git a/core/src/avm2/globals/flash/net/URLLoader.as b/core/src/avm2/globals/flash/net/URLLoader.as index 56cf573e9baa..e47faf2259a1 100644 --- a/core/src/avm2/globals/flash/net/URLLoader.as +++ b/core/src/avm2/globals/flash/net/URLLoader.as @@ -5,10 +5,10 @@ package flash.net { public class URLLoader extends EventDispatcher { [Ruffle(NativeAccessible)] - public var data: *; + public var data:*; [Ruffle(NativeAccessible)] - public var dataFormat: String = "text"; + public var dataFormat:String = "text"; public function URLLoader(request:URLRequest = null) { if (request != null) { @@ -27,7 +27,7 @@ package flash.net { // FIXME - this should be a normal property for consistency with Flash public function get bytesLoaded():uint { // TODO - update this as the download progresses - return this.bytesTotal + return this.bytesTotal; } public native function load(request:URLRequest):void; diff --git a/core/src/avm2/globals/flash/net/URLLoaderDataFormat.as b/core/src/avm2/globals/flash/net/URLLoaderDataFormat.as index 7fdf67cd7c1b..bfebf5bf0057 100644 --- a/core/src/avm2/globals/flash/net/URLLoaderDataFormat.as +++ b/core/src/avm2/globals/flash/net/URLLoaderDataFormat.as @@ -1,7 +1,7 @@ package flash.net { public final class URLLoaderDataFormat { - public static const TEXT: String = "text"; - public static const BINARY: String = "binary"; - public static const VARIABLES: String = "variables"; + public static const TEXT:String = "text"; + public static const BINARY:String = "binary"; + public static const VARIABLES:String = "variables"; } } diff --git a/core/src/avm2/globals/flash/net/URLRequest.as b/core/src/avm2/globals/flash/net/URLRequest.as index a14ab7891e8c..e84a6c62ebb1 100644 --- a/core/src/avm2/globals/flash/net/URLRequest.as +++ b/core/src/avm2/globals/flash/net/URLRequest.as @@ -10,10 +10,10 @@ package flash.net { private var _url:String; [Ruffle(NativeAccessible)] - private var _contentType: String = "application/x-www-form-urlencoded"; // ignored + private var _contentType:String = "application/x-www-form-urlencoded"; // ignored [Ruffle(NativeAccessible)] - private var _requestHeaders: Array = []; + private var _requestHeaders:Array = []; private var _digest:String; @@ -39,7 +39,7 @@ package flash.net { return this._method; } - public function set method(value: String):void { + public function set method(value:String):void { // The method can apparently either be all upper or lower case, but not mixed. if (value !== "GET" && value !== "get" && value !== "POST" && value !== "post") { throw new ArgumentError("Error #2008: Parameter method must be one of the accepted values.", 2008); diff --git a/core/src/avm2/globals/flash/net/URLRequestDefaults.as b/core/src/avm2/globals/flash/net/URLRequestDefaults.as index 32945bec3239..a39f0017c346 100644 --- a/core/src/avm2/globals/flash/net/URLRequestDefaults.as +++ b/core/src/avm2/globals/flash/net/URLRequestDefaults.as @@ -3,110 +3,93 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.net -{ +package flash.net { import __ruffle__.stub_method; import __ruffle__.stub_getter; import __ruffle__.stub_setter; [API("661")] - public class URLRequestDefaults - { + public class URLRequestDefaults { // The default setting for the authenticate property of URLRequest objects. - public static var _authenticate: Boolean = true; + public static var _authenticate:Boolean = true; // The default setting for the cacheResponse property of URLRequest objects. - public static var _cacheResponse: Boolean = true; + public static var _cacheResponse:Boolean = true; // The default setting for the followRedirects property of URLRequest objects. - public static var _followRedirects: Boolean = true; + public static var _followRedirects:Boolean = true; // The default setting for the idleTimeout property of URLRequest objects and HTMLLoader objects. - public static var _idleTimeout: Number = 0; + public static var _idleTimeout:Number = 0; // The default setting for the manageCookies property of URLRequest objects. - public static var _manageCookies: Boolean = true; + public static var _manageCookies:Boolean = true; // The default setting for the useCache property of URLRequest objects. - public static var _useCache: Boolean = true; + public static var _useCache:Boolean = true; // The default setting for the userAgent property of URLRequest objects. - public static var _userAgent: String; + public static var _userAgent:String; // Sets default user and password credentials for a selected host. - public static function setLoginCredentialsForHost(hostname:String, user:String, password:String):* - { + public static function setLoginCredentialsForHost(hostname:String, user:String, password:String):* { stub_method("flash.media.URLRequestDefaults", "setLoginCredentialsForHost"); } - public static function get authenticate():Boolean - { + public static function get authenticate():Boolean { return _authenticate; } - public static function set authenticate(value:Boolean):void - { + public static function set authenticate(value:Boolean):void { _authenticate = value; } - public static function get cacheResponse():Boolean - { + public static function get cacheResponse():Boolean { return _cacheResponse; } - public static function set cacheResponse(value:Boolean):void - { + public static function set cacheResponse(value:Boolean):void { _cacheResponse = value; } - public static function get followRedirects():Boolean - { + public static function get followRedirects():Boolean { return _followRedirects; } - public static function set followRedirects(value:Boolean):void - { + public static function set followRedirects(value:Boolean):void { _followRedirects = value; } - public static function get idleTimeout():Number - { + public static function get idleTimeout():Number { return _idleTimeout; } - public static function set idleTimeout(value:Number):void - { + public static function set idleTimeout(value:Number):void { _idleTimeout = value; } - public static function get manageCookies():Boolean - { + public static function get manageCookies():Boolean { return _manageCookies; } - public static function set manageCookies(value:Boolean):void - { + public static function set manageCookies(value:Boolean):void { _manageCookies = value; } - public static function get useCache():Boolean - { + public static function get useCache():Boolean { return _useCache; } - public static function set useCache(value:Boolean):void - { + public static function set useCache(value:Boolean):void { _useCache = value; } - public static function get userAgent():String - { + public static function get userAgent():String { stub_getter("flash.net.URLRequestDefaults", "userAgent"); return _userAgent; } - public static function set userAgent(value:String):void - { + public static function set userAgent(value:String):void { stub_setter("flash.net.URLRequestDefaults", "userAgent"); _userAgent = value; } diff --git a/core/src/avm2/globals/flash/net/URLRequestHeader.as b/core/src/avm2/globals/flash/net/URLRequestHeader.as index f8f90f6cf7a2..d5d172704b6a 100644 --- a/core/src/avm2/globals/flash/net/URLRequestHeader.as +++ b/core/src/avm2/globals/flash/net/URLRequestHeader.as @@ -1,12 +1,12 @@ package flash.net { public final class URLRequestHeader { [Ruffle(NativeAccessible)] - public var name: String; + public var name:String; [Ruffle(NativeAccessible)] - public var value: String; + public var value:String; - public function URLRequestHeader(name: String = "", value: String = "") { + public function URLRequestHeader(name:String = "", value:String = "") { this.name = name; this.value = value; } diff --git a/core/src/avm2/globals/flash/net/URLRequestMethod.as b/core/src/avm2/globals/flash/net/URLRequestMethod.as index 92a59ea23afd..9c9e8a6d2097 100644 --- a/core/src/avm2/globals/flash/net/URLRequestMethod.as +++ b/core/src/avm2/globals/flash/net/URLRequestMethod.as @@ -1,10 +1,10 @@ package flash.net { public final class URLRequestMethod { - public static const POST: String = "POST"; - public static const GET: String = "GET"; - public static const PUT: String = "PUT"; - public static const DELETE: String = "DELETE"; - public static const HEAD: String = "HEAD"; - public static const OPTIONS: String = "OPTIONS"; + public static const POST:String = "POST"; + public static const GET:String = "GET"; + public static const PUT:String = "PUT"; + public static const DELETE:String = "DELETE"; + public static const HEAD:String = "HEAD"; + public static const OPTIONS:String = "OPTIONS"; } } diff --git a/core/src/avm2/globals/flash/net/URLStream.as b/core/src/avm2/globals/flash/net/URLStream.as index a746949a367c..17ffc93b2a94 100644 --- a/core/src/avm2/globals/flash/net/URLStream.as +++ b/core/src/avm2/globals/flash/net/URLStream.as @@ -33,25 +33,25 @@ package flash.net { var self = this; this._loader.addEventListener(Event.OPEN, function(e:*):void { - self.dispatchEvent(new Event(Event.OPEN)); - }); + self.dispatchEvent(new Event(Event.OPEN)); + }); this._loader.addEventListener(Event.COMPLETE, function(e:*):void { - self._loader.data.endian = self._endian; - self.dispatchEvent(new Event(Event.COMPLETE)); - }); + self._loader.data.endian = self._endian; + self.dispatchEvent(new Event(Event.COMPLETE)); + }); this._loader.addEventListener(IOErrorEvent.IO_ERROR, function(e:*):void { - self.dispatchEvent(new IOErrorEvent(IOErrorEvent.IO_ERROR)); - }); + self.dispatchEvent(new IOErrorEvent(IOErrorEvent.IO_ERROR)); + }); this._loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, function(e:*):void { - self.dispatchEvent(new SecurityErrorEvent(SecurityErrorEvent.SECURITY_ERROR)); - }); + self.dispatchEvent(new SecurityErrorEvent(SecurityErrorEvent.SECURITY_ERROR)); + }); this._loader.addEventListener(ProgressEvent.PROGRESS, function(e:*):void { - self._loader.data.endian = self._endian; - self.dispatchEvent(new ProgressEvent(ProgressEvent.PROGRESS, false, false, e.bytesLoaded, e.bytesTotal)); - }); + self._loader.data.endian = self._endian; + self.dispatchEvent(new ProgressEvent(ProgressEvent.PROGRESS, false, false, e.bytesLoaded, e.bytesTotal)); + }); this._loader.addEventListener(HTTPStatusEvent.HTTP_STATUS, function(e:*):void { - self.dispatchEvent(new HTTPStatusEvent(HTTPStatusEvent.HTTP_STATUS, false, false, e.status, e.redirected)); - }); + self.dispatchEvent(new HTTPStatusEvent(HTTPStatusEvent.HTTP_STATUS, false, false, e.status, e.redirected)); + }); } public function get bytesAvailable():uint { diff --git a/core/src/avm2/globals/flash/net/URLVariables.as b/core/src/avm2/globals/flash/net/URLVariables.as index bc8822763a18..e366fc8ee32d 100644 --- a/core/src/avm2/globals/flash/net/URLVariables.as +++ b/core/src/avm2/globals/flash/net/URLVariables.as @@ -2,13 +2,13 @@ package flash.net { import flash.utils.escapeMultiByte; import flash.utils.unescapeMultiByte; public dynamic class URLVariables { - public function URLVariables(str: String = null) { + public function URLVariables(str:String = null) { if (str) { this.decode(str); } } - public function decode(str: String) { + public function decode(str:String) { for each (var pair in str.AS3::split("&")) { var splitIndex = pair.AS3::indexOf("="); if (splitIndex === -1) { @@ -27,11 +27,11 @@ package flash.net { } } - public function toString(): String { - var acc : String = "" - var sep :String = "" + public function toString():String { + var acc:String = ""; + var sep:String = ""; for (p in this) { - var pe : String = escapeMultiByte(p); + var pe:String = escapeMultiByte(p); var val = this[p]; if (val is Array) { for (i in val) { @@ -47,7 +47,7 @@ package flash.net { acc += pe; acc += "="; acc += escapeMultiByte(val); - sep="&"; + sep = "&"; } return acc; } diff --git a/core/src/avm2/globals/flash/net/XMLSocket.as b/core/src/avm2/globals/flash/net/XMLSocket.as index 3fd7b9c482e1..088759c059b6 100644 --- a/core/src/avm2/globals/flash/net/XMLSocket.as +++ b/core/src/avm2/globals/flash/net/XMLSocket.as @@ -1,5 +1,4 @@ -package flash.net -{ +package flash.net { import flash.net.Socket; import flash.events.EventDispatcher; import flash.events.ProgressEvent; @@ -9,13 +8,11 @@ package flash.net import flash.events.DataEvent; import flash.utils.ByteArray; - public class XMLSocket extends EventDispatcher - { + public class XMLSocket extends EventDispatcher { private var tempBuf:ByteArray = new ByteArray(); private var socket:Socket; - public function XMLSocket(host:String = null, port:int = 0) - { + public function XMLSocket(host:String = null, port:int = 0) { this.socket = new Socket(); this.socket.addEventListener(Event.CLOSE, this.socketCloseListener); @@ -24,34 +21,28 @@ package flash.net this.socket.addEventListener(IOErrorEvent.IO_ERROR, this.socketIoErrorListener); this.socket.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.socketSecurityErrorListener); - if (host != null) - { + if (host != null) { this.connect(host, port); } } private native function get domain():String; - private function socketCloseListener(evt:Event):void - { + private function socketCloseListener(evt:Event):void { this.tempBuf.clear(); this.dispatchEvent(evt); } - private function socketConnectEvent(evt:Event):void - { + private function socketConnectEvent(evt:Event):void { this.dispatchEvent(evt); } - private function socketDataListener(evt:ProgressEvent):void - { + private function socketDataListener(evt:ProgressEvent):void { // FIXME: There is probably a better way to do this. - for (var i:uint = 0; i < evt.bytesLoaded; i++) - { + for (var i:uint = 0; i < evt.bytesLoaded; i++) { var byte:int = this.socket.readByte(); - if (byte == 0) - { + if (byte == 0) { var length:uint = this.tempBuf.position; this.tempBuf.position = 0; @@ -59,65 +50,51 @@ package flash.net this.tempBuf.clear(); this.dispatchEvent(new DataEvent(DataEvent.DATA, false, false, data)); - } - else - { + } else { this.tempBuf.writeByte(byte); } } } - private function socketIoErrorListener(evt:IOErrorEvent):void - { + private function socketIoErrorListener(evt:IOErrorEvent):void { this.dispatchEvent(evt); } - private function socketSecurityErrorListener(evt:SecurityErrorEvent):void - { + private function socketSecurityErrorListener(evt:SecurityErrorEvent):void { this.dispatchEvent(evt); } - public function get connected():Boolean - { + public function get connected():Boolean { return this.socket.connected; } - public function get timeout():int - { + public function get timeout():int { return this.socket.timeout; } - public function set timeout(value:int) - { + public function set timeout(value:int) { this.socket.timeout = value; } - public function close():void - { + public function close():void { this.tempBuf.clear(); this.socket.close(); } - public function connect(host:String, port:int):void - { - if (host == null) - { + public function connect(host:String, port:int):void { + if (host == null) { host = this.domain(); } socket.connect(host, port); } - public function send(object:*):void - { + public function send(object:*):void { var val:String; - if (object is XML || object is XMLList) - { + if (object is XML || object is XMLList) { val = object.toXMLString(); - } - else - { + } else { val = object.toString(); } diff --git a/core/src/avm2/globals/flash/net/drm/AuthenticationMethod.as b/core/src/avm2/globals/flash/net/drm/AuthenticationMethod.as index 966cc24979bc..5ba45a10063a 100644 --- a/core/src/avm2/globals/flash/net/drm/AuthenticationMethod.as +++ b/core/src/avm2/globals/flash/net/drm/AuthenticationMethod.as @@ -1,9 +1,7 @@ -package flash.net.drm -{ - [API("667")] - public final class AuthenticationMethod - { - public static const ANONYMOUS:String = "anonymous"; - public static const USERNAME_AND_PASSWORD:String = "usernameAndPassword"; - } +package flash.net.drm { + [API("667")] + public final class AuthenticationMethod { + public static const ANONYMOUS:String = "anonymous"; + public static const USERNAME_AND_PASSWORD:String = "usernameAndPassword"; + } } diff --git a/core/src/avm2/globals/flash/printing/PrintJobOptions.as b/core/src/avm2/globals/flash/printing/PrintJobOptions.as index 4d0361e177be..724c356c9bf6 100644 --- a/core/src/avm2/globals/flash/printing/PrintJobOptions.as +++ b/core/src/avm2/globals/flash/printing/PrintJobOptions.as @@ -6,10 +6,9 @@ package flash.printing { public class PrintJobOptions { // Specifies whether the content in the print job is printed as a bitmap or as a vector. - public var printAsBitmap: Boolean; + public var printAsBitmap:Boolean; - public function PrintJobOptions(printAsBitmap:Boolean = false) - { + public function PrintJobOptions(printAsBitmap:Boolean = false) { this.printAsBitmap = printAsBitmap; } } diff --git a/core/src/avm2/globals/flash/printing/PrintJobOrientation.as b/core/src/avm2/globals/flash/printing/PrintJobOrientation.as index 740eedc41472..c4fade805fea 100644 --- a/core/src/avm2/globals/flash/printing/PrintJobOrientation.as +++ b/core/src/avm2/globals/flash/printing/PrintJobOrientation.as @@ -3,11 +3,9 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.printing -{ +package flash.printing { - public final class PrintJobOrientation - { + public final class PrintJobOrientation { // The landscape (horizontal) image orientation for printing. public static const LANDSCAPE:String = "landscape"; diff --git a/core/src/avm2/globals/flash/profiler/Telemetry.as b/core/src/avm2/globals/flash/profiler/Telemetry.as index 6a15c4e39ff8..f30229473989 100644 --- a/core/src/avm2/globals/flash/profiler/Telemetry.as +++ b/core/src/avm2/globals/flash/profiler/Telemetry.as @@ -1,12 +1,15 @@ package flash.profiler { - [API("678")] // the docs say 682, that's wrong + [API("678")] + // the docs say 682, that's wrong public final class Telemetry { - public static const connected: Boolean = false; - public static const spanMarker: Number = 0; + public static const connected:Boolean = false; + public static const spanMarker:Number = 0; + + public static function sendMetric(metric:String, value:*):void { + } + public static function sendSpanMetric(metric:String, startSpanMarker:Number, value:* = null):void { + } - public static function sendMetric(metric:String, value:*):void {} - public static function sendSpanMetric(metric:String, startSpanMarker:Number, value:* = null):void {} - public static function registerCommandHandler(commandName:String, handler:Function):Boolean { return false; } diff --git a/core/src/avm2/globals/flash/sampler.as b/core/src/avm2/globals/flash/sampler.as index 113658348b20..4a1057173f95 100644 --- a/core/src/avm2/globals/flash/sampler.as +++ b/core/src/avm2/globals/flash/sampler.as @@ -1,78 +1,78 @@ package flash.sampler { import __ruffle__.stub_method; - public function clearSamples(): void { + public function clearSamples():void { stub_method("flash.sampler", "clearSamples"); } - public function getGetterInvocationCount(obj: Object, name: QName): Number { + public function getGetterInvocationCount(obj:Object, name:QName):Number { stub_method("flash.sampler", "getGetterInvocationCount"); return -1; } - public function getInvocationCount(obj: Object, name: QName): Number { + public function getInvocationCount(obj:Object, name:QName):Number { stub_method("flash.sampler", "getInvocationCount"); return -1; } - public function getLexicalScopes(fun: Function): Array { + public function getLexicalScopes(fun:Function):Array { stub_method("flash.sampler", "getLexicalScopes"); return null; } - public function getMasterString(str: String): String { + public function getMasterString(str:String):String { stub_method("flash.sampler", "getMasterString"); return null; } - public function getMemberNames(obj: Object, instanceNames: Boolean = false): Object { + public function getMemberNames(obj:Object, instanceNames:Boolean = false):Object { stub_method("flash.sampler", "getMemberNames"); return null; } - public function getSampleCount(): Number { + public function getSampleCount():Number { stub_method("flash.sampler", "getSampleCount"); return 0; } - public function getSamples(): Object { + public function getSamples():Object { stub_method("flash.sampler", "getSamples"); return {}; } - public function getSavedThis(fun: Function): Object { + public function getSavedThis(fun:Function):Object { stub_method("flash.sampler", "getSavedThis"); return undefined; } - public function getSetterInvocationCount(obj: Object, name: QName): Number { + public function getSetterInvocationCount(obj:Object, name:QName):Number { stub_method("flash.sampler", "getSetterInvocationCount"); return -1; } - public function getSize(param1: *): Number { + public function getSize(param1:*):Number { stub_method("flash.sampler", "getSize"); return 0; } - public function isGetterSetter(obj: Object, name: QName): Boolean { + public function isGetterSetter(obj:Object, name:QName):Boolean { stub_method("flash.sampler", "isGetterSetter"); return false; } - public function pauseSampling(): void { + public function pauseSampling():void { stub_method("flash.sampler", "pauseSampling"); } - public function sampleInternalAllocs(everything: Boolean): void { + public function sampleInternalAllocs(everything:Boolean):void { stub_method("flash.sampler", "sampleInternalAllocs"); } - public function setSamplerCallback(fun: Function): void { + public function setSamplerCallback(fun:Function):void { stub_method("flash.sampler", "setSamplerCallback"); } - public function startSampling(): void { + public function startSampling():void { stub_method("flash.sampler", "startSampling"); } diff --git a/core/src/avm2/globals/flash/sampler/DeleteObjectSample.as b/core/src/avm2/globals/flash/sampler/DeleteObjectSample.as index 56407a5cc70e..c49a6c6459f6 100644 --- a/core/src/avm2/globals/flash/sampler/DeleteObjectSample.as +++ b/core/src/avm2/globals/flash/sampler/DeleteObjectSample.as @@ -1,8 +1,7 @@ package flash.sampler { public final class DeleteObjectSample extends Sample { public const id:Number; - + public const size:Number; } } - diff --git a/core/src/avm2/globals/flash/sampler/NewObjectSample.as b/core/src/avm2/globals/flash/sampler/NewObjectSample.as index 315a56ce6050..b33c9ddf5880 100644 --- a/core/src/avm2/globals/flash/sampler/NewObjectSample.as +++ b/core/src/avm2/globals/flash/sampler/NewObjectSample.as @@ -3,7 +3,7 @@ package flash.sampler { public final class NewObjectSample extends Sample { public const id:Number; - + public const type:Class; public function get object():* { @@ -17,4 +17,3 @@ package flash.sampler { } } } - diff --git a/core/src/avm2/globals/flash/sampler/Sample.as b/core/src/avm2/globals/flash/sampler/Sample.as index 6ec2cc0c5b4e..c47e00a4fb15 100644 --- a/core/src/avm2/globals/flash/sampler/Sample.as +++ b/core/src/avm2/globals/flash/sampler/Sample.as @@ -1,8 +1,7 @@ package flash.sampler { public class Sample { public const time:Number; - + public const stack:Array; } } - diff --git a/core/src/avm2/globals/flash/sampler/StackFrame.as b/core/src/avm2/globals/flash/sampler/StackFrame.as index 4a365d9d9b0c..53ba0e7bd004 100644 --- a/core/src/avm2/globals/flash/sampler/StackFrame.as +++ b/core/src/avm2/globals/flash/sampler/StackFrame.as @@ -5,9 +5,9 @@ package flash.sampler { public const file:String; public const line:uint; - + public const scriptID:Number; - + public function toString():String { if (this.file) { return this.name + "()[" + this.file + ":" + this.line + "]"; @@ -17,4 +17,3 @@ package flash.sampler { } } } - diff --git a/core/src/avm2/globals/flash/security/CertificateStatus.as b/core/src/avm2/globals/flash/security/CertificateStatus.as index 29320d7c8e05..32c0c2b01f1e 100644 --- a/core/src/avm2/globals/flash/security/CertificateStatus.as +++ b/core/src/avm2/globals/flash/security/CertificateStatus.as @@ -3,11 +3,9 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.security -{ +package flash.security { - public final class CertificateStatus - { + public final class CertificateStatus { // The certificate is outside its valid period. public static const EXPIRED:String = "expired"; diff --git a/core/src/avm2/globals/flash/security/X500DistinguishedName.as b/core/src/avm2/globals/flash/security/X500DistinguishedName.as index 440b82139bf9..629651224968 100644 --- a/core/src/avm2/globals/flash/security/X500DistinguishedName.as +++ b/core/src/avm2/globals/flash/security/X500DistinguishedName.as @@ -1,21 +1,20 @@ -package flash.security -{ +package flash.security { [API("674")] - public final class X500DistinguishedName - { - private var _commonName: String; - private var _countryName: String; - private var _localityName: String; - private var _organizationalUnitName: String; - private var _organizationName: String; - private var _stateOrProvinceName: String; + public final class X500DistinguishedName { + private var _commonName:String; + private var _countryName:String; + private var _localityName:String; + private var _organizationalUnitName:String; + private var _organizationName:String; + private var _stateOrProvinceName:String; - public function X500DistinguishedName() {} + public function X500DistinguishedName() { + } public function get commonName():String { return this._commonName; } - + public function get countryName():String { return this._countryName; } @@ -36,14 +35,14 @@ package flash.security return this._stateOrProvinceName; } - public function toString(): String { + public function toString():String { // TODO: figure out exact format return "C=" + this._countryName + - ",S=" + this._stateOrProvinceName + - ",L=" + this._localityName + - ",O=" + this._organizationName + - ",OU=" + this._organizationalUnitName + - ",CN=" + this._commonName; + ",S=" + this._stateOrProvinceName + + ",L=" + this._localityName + + ",O=" + this._organizationName + + ",OU=" + this._organizationalUnitName + + ",CN=" + this._commonName; } } } diff --git a/core/src/avm2/globals/flash/security/X509Certificate.as b/core/src/avm2/globals/flash/security/X509Certificate.as index 768dfd12b501..928e88bd1f71 100644 --- a/core/src/avm2/globals/flash/security/X509Certificate.as +++ b/core/src/avm2/globals/flash/security/X509Certificate.as @@ -1,30 +1,29 @@ -package flash.security -{ +package flash.security { [API("674")] - public final class X509Certificate - { + public final class X509Certificate { import flash.utils.ByteArray; - private var _encoded: ByteArray; - private var _issuer: X500DistinguishedName; - private var _issuerUniqueID: String; - private var _serialNumber: String; - private var _signatureAlgorithmOID: String; - private var _signatureAlgorithmParams: ByteArray; - private var _subject: X500DistinguishedName; - private var _subjectPublicKey: String; - private var _subjectPublicKeyAlgorithmOID: String; - private var _subjectUniqueID: String; - private var _validNotAfter: Date; - private var _validNotBefore: Date; - private var _version: uint; + private var _encoded:ByteArray; + private var _issuer:X500DistinguishedName; + private var _issuerUniqueID:String; + private var _serialNumber:String; + private var _signatureAlgorithmOID:String; + private var _signatureAlgorithmParams:ByteArray; + private var _subject:X500DistinguishedName; + private var _subjectPublicKey:String; + private var _subjectPublicKeyAlgorithmOID:String; + private var _subjectUniqueID:String; + private var _validNotAfter:Date; + private var _validNotBefore:Date; + private var _version:uint; - public function X509Certificate() {} + public function X509Certificate() { + } public function get encoded():ByteArray { return this._encoded; } - + public function get issuer():X500DistinguishedName { return this._issuer; } @@ -48,7 +47,7 @@ package flash.security public function get subject():X500DistinguishedName { return this._subject; } - + public function get subjectPublicKey():String { return this._subjectPublicKey; } diff --git a/core/src/avm2/globals/flash/sensors/Accelerometer.as b/core/src/avm2/globals/flash/sensors/Accelerometer.as index 89164c48a56b..3c209be6f134 100644 --- a/core/src/avm2/globals/flash/sensors/Accelerometer.as +++ b/core/src/avm2/globals/flash/sensors/Accelerometer.as @@ -7,11 +7,11 @@ package flash.sensors { return false; } - public function setRequestedUpdateInterval(interval: Number) { + public function setRequestedUpdateInterval(interval:Number) { __ruffle__.stub_method("flash.sensors.Accelerometer", "setRequestedUpdateInterval"); } - public function get muted(): Boolean { + public function get muted():Boolean { __ruffle__.stub_getter("flash.sensors.Accelerometer", "muted"); return true; } diff --git a/core/src/avm2/globals/flash/system.as b/core/src/avm2/globals/flash/system.as index 03bf95e4d9bc..a35556d8ee8f 100644 --- a/core/src/avm2/globals/flash/system.as +++ b/core/src/avm2/globals/flash/system.as @@ -1,4 +1,3 @@ package flash.system { public native function fscommand(command:String, args:String = ""):void; } - diff --git a/core/src/avm2/globals/flash/system/ApplicationDomain.as b/core/src/avm2/globals/flash/system/ApplicationDomain.as index ca589e5cb234..ef92607491e7 100644 --- a/core/src/avm2/globals/flash/system/ApplicationDomain.as +++ b/core/src/avm2/globals/flash/system/ApplicationDomain.as @@ -6,7 +6,7 @@ package flash.system { public static native function get currentDomain():ApplicationDomain; public function ApplicationDomain(parentDomain:ApplicationDomain = null) { - this.init(parentDomain) + this.init(parentDomain); } private native function init(parentDomain:ApplicationDomain):void; diff --git a/core/src/avm2/globals/flash/system/Capabilities.as b/core/src/avm2/globals/flash/system/Capabilities.as index e6febebf06f1..ed3a620128a6 100644 --- a/core/src/avm2/globals/flash/system/Capabilities.as +++ b/core/src/avm2/globals/flash/system/Capabilities.as @@ -1,20 +1,20 @@ package flash.system { import __ruffle__.stub_getter; public final class Capabilities { - public native static function get os(): String; - public native static function get playerType(): String; - public native static function get version(): String; + public native static function get os():String; + public native static function get playerType():String; + public native static function get version():String; public native static function get screenResolutionX():Number; public native static function get screenResolutionY():Number; public native static function get pixelAspectRatio():Number; public native static function get screenDPI():Number; - public native static function get language(): String; - public static function get manufacturer(): String { + public native static function get language():String; + public static function get manufacturer():String { stub_getter("flash.system.Capabilities", "manufacturer"); - return "Adobe Windows" + return "Adobe Windows"; } - public static function get isDebugger(): Boolean { - return false + public static function get isDebugger():Boolean { + return false; } } } diff --git a/core/src/avm2/globals/flash/system/IME.as b/core/src/avm2/globals/flash/system/IME.as index 7f4f6a13ea05..35031872df71 100644 --- a/core/src/avm2/globals/flash/system/IME.as +++ b/core/src/avm2/globals/flash/system/IME.as @@ -3,73 +3,62 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.system -{ +package flash.system { import flash.events.EventDispatcher; import __ruffle__.stub_method; import __ruffle__.stub_getter; import __ruffle__.stub_setter; - public final class IME extends EventDispatcher - { + public final class IME extends EventDispatcher { // The conversion mode of the current IME. - private static var _conversionMode: String = "ALPHANUMERIC_HALF"; + private static var _conversionMode:String = "ALPHANUMERIC_HALF"; // Indicates whether the system IME is enabled (true) or disabled (false). - private static var _enabled: Boolean; + private static var _enabled:Boolean; // The isSupported property is set to true if the IME class is available on the current platform, otherwise it is set to false. - private static var _isSupported: Boolean; + private static var _isSupported:Boolean; // Causes the runtime to abandon any composition that is in progress. - public static function compositionAbandoned():void - { + public static function compositionAbandoned():void { stub_method("flash.system.IME", "compositionAbandoned"); } // Call this method when the selection within the composition has been updated, either interactively or programmatically. - public static function compositionSelectionChanged(start:int, end:int):void - { + public static function compositionSelectionChanged(start:int, end:int):void { stub_method("flash.system.IME", "compositionSelectionChanged"); } // Instructs the IME to select the first candidate for the current composition string. - public static function doConversion():void - { + public static function doConversion():void { stub_method("flash.system.IME", "doConversion"); } // Sets the IME composition string. - public static function setCompositionString(composition:String):void - { + public static function setCompositionString(composition:String):void { stub_method("flash.system.IME", "setCompositionString"); } - public function get isSupported() : Boolean - { + public function get isSupported():Boolean { return _isSupported; } - public static function get enabled():Boolean - { + public static function get enabled():Boolean { stub_getter("flash.system.IME", "enabled"); return _enabled; } - public static function set enabled(value:Boolean):void - { + public static function set enabled(value:Boolean):void { stub_setter("flash.system.IME", "enabled"); _enabled = value; } - public static function get conversionMode():String - { + public static function get conversionMode():String { stub_getter("flash.system.IME", "conversionMode"); return _conversionMode; } - public static function set conversionMode(value:String):void - { + public static function set conversionMode(value:String):void { stub_setter("flash.system.IME", "conversionMode"); _conversionMode = value; } diff --git a/core/src/avm2/globals/flash/system/IMEConversionMode.as b/core/src/avm2/globals/flash/system/IMEConversionMode.as index a7d34ce1cca4..7cc9df9a51b7 100644 --- a/core/src/avm2/globals/flash/system/IMEConversionMode.as +++ b/core/src/avm2/globals/flash/system/IMEConversionMode.as @@ -3,11 +3,9 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.system -{ +package flash.system { - public final class IMEConversionMode - { + public final class IMEConversionMode { // The string "ALPHANUMERIC_FULL", for use with the IME.conversionMode property. public static const ALPHANUMERIC_FULL:String = "ALPHANUMERIC_FULL"; diff --git a/core/src/avm2/globals/flash/system/JPEGLoaderContext.as b/core/src/avm2/globals/flash/system/JPEGLoaderContext.as index c2b743246c6b..a3a6bb3701aa 100644 --- a/core/src/avm2/globals/flash/system/JPEGLoaderContext.as +++ b/core/src/avm2/globals/flash/system/JPEGLoaderContext.as @@ -3,18 +3,15 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.system -{ +package flash.system { // Both the docs and playerglobal.swc says this is "663", but it's actually available in regular Flash Player [API("662")] - public class JPEGLoaderContext extends LoaderContext - { + public class JPEGLoaderContext extends LoaderContext { // Specifies the strength of the deblocking filter. - public var deblockingFilter: Number = 0.0; + public var deblockingFilter:Number = 0.0; - public function JPEGLoaderContext(deblockingFilter:Number = 0.0, checkPolicyFile:Boolean = false, applicationDomain:ApplicationDomain = null, securityDomain:SecurityDomain = null) - { - super(checkPolicyFile,applicationDomain,securityDomain); + public function JPEGLoaderContext(deblockingFilter:Number = 0.0, checkPolicyFile:Boolean = false, applicationDomain:ApplicationDomain = null, securityDomain:SecurityDomain = null) { + super(checkPolicyFile, applicationDomain, securityDomain); this.deblockingFilter = deblockingFilter; } } diff --git a/core/src/avm2/globals/flash/system/LoaderContext.as b/core/src/avm2/globals/flash/system/LoaderContext.as index dc8258b660b0..b72a52d41534 100644 --- a/core/src/avm2/globals/flash/system/LoaderContext.as +++ b/core/src/avm2/globals/flash/system/LoaderContext.as @@ -2,19 +2,19 @@ package flash.system { import flash.display.DisplayObjectContainer; public class LoaderContext { - public var allowCodeImport : Boolean; + public var allowCodeImport:Boolean; [Ruffle(NativeAccessible)] - public var applicationDomain : ApplicationDomain; + public var applicationDomain:ApplicationDomain; - public var checkPolicyFile : Boolean; + public var checkPolicyFile:Boolean; [API("674")] - public var imageDecodingPolicy : String; + public var imageDecodingPolicy:String; [API("670")] - public var parameters : Object; // unset by default + public var parameters:Object; // unset by default [API("670")] - public var requestedContentParent : DisplayObjectContainer; // unset by default - public var securityDomain : SecurityDomain; + public var requestedContentParent:DisplayObjectContainer; // unset by default + public var securityDomain:SecurityDomain; public function LoaderContext(checkPolicyFile:Boolean = false, applicationDomain:ApplicationDomain = null, securityDomain:SecurityDomain = null) { this.allowCodeImport = true; @@ -26,12 +26,12 @@ package flash.system { } [API("661")] - public function get allowLoadBytesCodeExecution(): Boolean { + public function get allowLoadBytesCodeExecution():Boolean { return this.allowCodeImport; } [API("661")] - public function set allowLoadBytesCodeExecution(value:Boolean): void { + public function set allowLoadBytesCodeExecution(value:Boolean):void { this.allowCodeImport = value; } } diff --git a/core/src/avm2/globals/flash/system/MessageChannelState.as b/core/src/avm2/globals/flash/system/MessageChannelState.as index 8ef77d769957..07128b1398f3 100644 --- a/core/src/avm2/globals/flash/system/MessageChannelState.as +++ b/core/src/avm2/globals/flash/system/MessageChannelState.as @@ -3,12 +3,10 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.system -{ +package flash.system { [API("682")] - public final class MessageChannelState - { + public final class MessageChannelState { // This state indicates that the message channel has been closed and doesn't have any more messages to deliver. public static const CLOSED:String = "closed"; diff --git a/core/src/avm2/globals/flash/system/Security.as b/core/src/avm2/globals/flash/system/Security.as index 5ef54247b5d9..147833b923a4 100644 --- a/core/src/avm2/globals/flash/system/Security.as +++ b/core/src/avm2/globals/flash/system/Security.as @@ -1,18 +1,18 @@ package flash.system { - public final class Security { - public static native function get pageDomain():String; - public static native function get sandboxType():String; + public final class Security { + public static native function get pageDomain():String; + public static native function get sandboxType():String; - public static native function allowDomain(... domains):void; - public static native function allowInsecureDomain(... domains):void; - public static native function loadPolicyFile(url: String):void; - public static native function showSettings(panel: String = "default"):void; + public static native function allowDomain(...domains):void; + public static native function allowInsecureDomain(...domains):void; + public static native function loadPolicyFile(url:String):void; + public static native function showSettings(panel:String = "default"):void; - [API("661")] - public static const APPLICATION:String = "application"; - public static const LOCAL_TRUSTED:String = "localTrusted"; - public static const LOCAL_WITH_FILE:String = "localWithFile"; - public static const LOCAL_WITH_NETWORK:String = "localWithNetwork"; - public static const REMOTE:String = "remote"; - } + [API("661")] + public static const APPLICATION:String = "application"; + public static const LOCAL_TRUSTED:String = "localTrusted"; + public static const LOCAL_WITH_FILE:String = "localWithFile"; + public static const LOCAL_WITH_NETWORK:String = "localWithNetwork"; + public static const REMOTE:String = "remote"; + } } diff --git a/core/src/avm2/globals/flash/system/SecurityDomain.as b/core/src/avm2/globals/flash/system/SecurityDomain.as index bebeb4797a77..ba2a61c33c42 100644 --- a/core/src/avm2/globals/flash/system/SecurityDomain.as +++ b/core/src/avm2/globals/flash/system/SecurityDomain.as @@ -1,7 +1,7 @@ package flash.system { public class SecurityDomain { - private static var dummyDomain : SecurityDomain = new SecurityDomain(); - public static function get currentDomain() : SecurityDomain { + private static var dummyDomain:SecurityDomain = new SecurityDomain(); + public static function get currentDomain():SecurityDomain { return dummyDomain; } } diff --git a/core/src/avm2/globals/flash/system/SecurityPanel.as b/core/src/avm2/globals/flash/system/SecurityPanel.as index 0ddc44744d3d..57fdd20c2a60 100644 --- a/core/src/avm2/globals/flash/system/SecurityPanel.as +++ b/core/src/avm2/globals/flash/system/SecurityPanel.as @@ -3,11 +3,9 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.system -{ +package flash.system { - public final class SecurityPanel - { + public final class SecurityPanel { // When passed to Security.showSettings(), displays the Camera panel in Flash Player Settings. public static const CAMERA:String = "camera"; diff --git a/core/src/avm2/globals/flash/system/System.as b/core/src/avm2/globals/flash/system/System.as index a856b42bdecb..a9d087781d8e 100644 --- a/core/src/avm2/globals/flash/system/System.as +++ b/core/src/avm2/globals/flash/system/System.as @@ -3,36 +3,36 @@ package flash.system { import __ruffle__.stub_method; import __ruffle__.stub_getter; - public static function gc(): void { + public static function gc():void { } - public static function pauseForGCIfCollectionImminent(imminence:Number = 0.75): void { + public static function pauseForGCIfCollectionImminent(imminence:Number = 0.75):void { stub_method("flash.system.System", "pauseForGCIfCollectionImminent"); } - public static native function setClipboard(string:String): void; + public static native function setClipboard(string:String):void; public static function disposeXML(node:XML):void { stub_method("flash.system.System", "disposeXML"); } - public static function get freeMemory(): Number { + public static function get freeMemory():Number { stub_getter("flash.system.System", "freeMemory"); - return 1024*1024*10; // 10MB + return 1024 * 1024 * 10; // 10MB } - public static function get privateMemory(): Number { + public static function get privateMemory():Number { stub_getter("flash.system.System", "privateMemory"); - return 1024*1024*100; // 100MB + return 1024 * 1024 * 100; // 100MB } - public static function get totalMemoryNumber(): Number { + public static function get totalMemoryNumber():Number { stub_getter("flash.system.System", "totalMemoryNumber"); - return 1024*1024*90; // 90MB + return 1024 * 1024 * 90; // 90MB } - public static function get totalMemory(): uint { + public static function get totalMemory():uint { return totalMemoryNumber as uint; } } diff --git a/core/src/avm2/globals/flash/system/SystemUpdaterType.as b/core/src/avm2/globals/flash/system/SystemUpdaterType.as index 106152131b72..e7edd9165983 100644 --- a/core/src/avm2/globals/flash/system/SystemUpdaterType.as +++ b/core/src/avm2/globals/flash/system/SystemUpdaterType.as @@ -3,11 +3,9 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.system -{ +package flash.system { - public class SystemUpdaterType - { + public class SystemUpdaterType { // Updates the DRM module. public static const DRM:String = "drm"; diff --git a/core/src/avm2/globals/flash/system/TouchscreenType.as b/core/src/avm2/globals/flash/system/TouchscreenType.as index 93fefe05f3f9..9c7e3fbd2ca7 100644 --- a/core/src/avm2/globals/flash/system/TouchscreenType.as +++ b/core/src/avm2/globals/flash/system/TouchscreenType.as @@ -3,11 +3,9 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.system -{ +package flash.system { - public final class TouchscreenType - { + public final class TouchscreenType { // A touchscreen designed to respond to finger touches. public static const FINGER:String = "finger"; diff --git a/core/src/avm2/globals/flash/system/WorkerDomain.as b/core/src/avm2/globals/flash/system/WorkerDomain.as index c4c114c73b9a..ea0af5312a9b 100644 --- a/core/src/avm2/globals/flash/system/WorkerDomain.as +++ b/core/src/avm2/globals/flash/system/WorkerDomain.as @@ -1,10 +1,11 @@ package flash.system { - [API("680")] // the docs say 682, that's wrong + [API("680")] + // the docs say 682, that's wrong public final class WorkerDomain { - public static const isSupported: Boolean = false; + public static const isSupported:Boolean = false; public function WorkerDomain() { - throw new ArgumentError("Error #2012: WorkerDomain$ class cannot be instantiated.", 2012) + throw new ArgumentError("Error #2012: WorkerDomain$ class cannot be instantiated.", 2012); } } } \ No newline at end of file diff --git a/core/src/avm2/globals/flash/system/WorkerState.as b/core/src/avm2/globals/flash/system/WorkerState.as index 56293c0be8f2..80eb6f0da77d 100644 --- a/core/src/avm2/globals/flash/system/WorkerState.as +++ b/core/src/avm2/globals/flash/system/WorkerState.as @@ -3,12 +3,10 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.system -{ +package flash.system { [API("682")] - public final class WorkerState - { + public final class WorkerState { // This state indicates that an object that represents the new worker has been created, but the worker is not executing code. public static const NEW:String = "new"; diff --git a/core/src/avm2/globals/flash/text/AntiAliasType.as b/core/src/avm2/globals/flash/text/AntiAliasType.as index e0a75a696ad7..e748608142b5 100644 --- a/core/src/avm2/globals/flash/text/AntiAliasType.as +++ b/core/src/avm2/globals/flash/text/AntiAliasType.as @@ -1,6 +1,6 @@ package flash.text { - public final class AntiAliasType { - public static const ADVANCED:String = "advanced"; - public static const NORMAL:String = "normal"; - } + public final class AntiAliasType { + public static const ADVANCED:String = "advanced"; + public static const NORMAL:String = "normal"; + } } diff --git a/core/src/avm2/globals/flash/text/CSMSettings.as b/core/src/avm2/globals/flash/text/CSMSettings.as index d8b27c65351e..ca4b12dff9dd 100644 --- a/core/src/avm2/globals/flash/text/CSMSettings.as +++ b/core/src/avm2/globals/flash/text/CSMSettings.as @@ -1,16 +1,16 @@ package flash.text { - public final class CSMSettings { + public final class CSMSettings { - public var fontSize:Number; - - public var insideCutoff:Number; - - public var outsideCutoff:Number; - - public function CSMSettings(fontSize:Number, insideCutoff:Number, outsideCutoff:Number) { - this.fontSize = fontSize; - this.insideCutoff = insideCutoff; - this.outsideCutoff = outsideCutoff; - } - } + public var fontSize:Number; + + public var insideCutoff:Number; + + public var outsideCutoff:Number; + + public function CSMSettings(fontSize:Number, insideCutoff:Number, outsideCutoff:Number) { + this.fontSize = fontSize; + this.insideCutoff = insideCutoff; + this.outsideCutoff = outsideCutoff; + } + } } diff --git a/core/src/avm2/globals/flash/text/FontStyle.as b/core/src/avm2/globals/flash/text/FontStyle.as index 596c5f4152ff..3f7f1092e16c 100644 --- a/core/src/avm2/globals/flash/text/FontStyle.as +++ b/core/src/avm2/globals/flash/text/FontStyle.as @@ -1,8 +1,8 @@ package flash.text { public final class FontStyle { - public static const REGULAR: String = "regular"; - public static const BOLD: String = "bold"; - public static const ITALIC: String = "italic"; - public static const BOLD_ITALIC: String = "boldItalic"; + public static const REGULAR:String = "regular"; + public static const BOLD:String = "bold"; + public static const ITALIC:String = "italic"; + public static const BOLD_ITALIC:String = "boldItalic"; } } diff --git a/core/src/avm2/globals/flash/text/FontType.as b/core/src/avm2/globals/flash/text/FontType.as index 3b056b7b9b12..0a48748581ca 100644 --- a/core/src/avm2/globals/flash/text/FontType.as +++ b/core/src/avm2/globals/flash/text/FontType.as @@ -1,7 +1,7 @@ package flash.text { public final class FontType { - public static const EMBEDDED: String = "embedded"; - public static const EMBEDDED_CFF: String = "embeddedCFF"; - public static const DEVICE: String = "device"; + public static const EMBEDDED:String = "embedded"; + public static const EMBEDDED_CFF:String = "embeddedCFF"; + public static const DEVICE:String = "device"; } } diff --git a/core/src/avm2/globals/flash/text/GridFitType.as b/core/src/avm2/globals/flash/text/GridFitType.as index 72191dddc3c7..3b6b7f5ee43d 100644 --- a/core/src/avm2/globals/flash/text/GridFitType.as +++ b/core/src/avm2/globals/flash/text/GridFitType.as @@ -1,7 +1,7 @@ package flash.text { public final class GridFitType { - public static const NONE: String = "none"; - public static const PIXEL: String = "pixel"; - public static const SUBPIXEL: String = "subpixel"; + public static const NONE:String = "none"; + public static const PIXEL:String = "pixel"; + public static const SUBPIXEL:String = "subpixel"; } } diff --git a/core/src/avm2/globals/flash/text/StaticText.as b/core/src/avm2/globals/flash/text/StaticText.as index 9fcb1f352684..e3166af040ca 100644 --- a/core/src/avm2/globals/flash/text/StaticText.as +++ b/core/src/avm2/globals/flash/text/StaticText.as @@ -1,6 +1,6 @@ package flash.text { import flash.display.DisplayObject; - + [Ruffle(InstanceAllocator)] public final class StaticText extends DisplayObject { public native function get text():String; diff --git a/core/src/avm2/globals/flash/text/StyleSheet.as b/core/src/avm2/globals/flash/text/StyleSheet.as index 43f9e36d22f2..7d3e29f42370 100644 --- a/core/src/avm2/globals/flash/text/StyleSheet.as +++ b/core/src/avm2/globals/flash/text/StyleSheet.as @@ -4,9 +4,10 @@ package flash.text { [Ruffle(InstanceAllocator)] public dynamic class StyleSheet extends EventDispatcher { // Shallow copies of the original style objects. Not used by Ruffle itself, just for getStyle() - private var _styles: Object = {}; + private var _styles:Object = {}; - public function StyleSheet() {} + public function StyleSheet() { + } public function get styleNames():Array { var result = []; @@ -121,7 +122,7 @@ package flash.text { return result; } - private function _createShallowCopy(original: *): Object { + private function _createShallowCopy(original:*):Object { var copy = {}; for (var key in original) { copy[key] = original[key]; @@ -130,11 +131,11 @@ package flash.text { } // Avoid doing potentially expensive string parsing in AS :D - private native function innerParseCss(css: String): Object; - private native function innerParseColor(color: String): Number; - private native function innerParseFontFamily(fontFamily: String): String; + private native function innerParseCss(css:String):Object; + private native function innerParseColor(color:String):Number; + private native function innerParseFontFamily(fontFamily:String):String; - private native function setStyleInternal(selector: String, textFormat: TextFormat): void; - private native function clearInternal(): void; + private native function setStyleInternal(selector:String, textFormat:TextFormat):void; + private native function clearInternal():void; } } diff --git a/core/src/avm2/globals/flash/text/TextColorType.as b/core/src/avm2/globals/flash/text/TextColorType.as index 59f8e59c22d8..e7256d28d013 100644 --- a/core/src/avm2/globals/flash/text/TextColorType.as +++ b/core/src/avm2/globals/flash/text/TextColorType.as @@ -1,6 +1,6 @@ package flash.text { public final class TextColorType { - public static const DARK_COLOR: String = "dark"; - public static const LIGHT_COLOR: String = "light"; + public static const DARK_COLOR:String = "dark"; + public static const LIGHT_COLOR:String = "light"; } } diff --git a/core/src/avm2/globals/flash/text/TextDisplayMode.as b/core/src/avm2/globals/flash/text/TextDisplayMode.as index 92b66ffa1c8a..bf36209a3fe8 100644 --- a/core/src/avm2/globals/flash/text/TextDisplayMode.as +++ b/core/src/avm2/globals/flash/text/TextDisplayMode.as @@ -1,7 +1,7 @@ package flash.text { public final class TextDisplayMode { - public static const LCD: String = "lcd"; - public static const CRT: String = "crt"; - public static const DEFAULT: String = "default"; + public static const LCD:String = "lcd"; + public static const CRT:String = "crt"; + public static const DEFAULT:String = "default"; } } diff --git a/core/src/avm2/globals/flash/text/TextExtent.as b/core/src/avm2/globals/flash/text/TextExtent.as index 6f57d6e8fa57..fe7091695644 100644 --- a/core/src/avm2/globals/flash/text/TextExtent.as +++ b/core/src/avm2/globals/flash/text/TextExtent.as @@ -1,13 +1,13 @@ package flash.text { public class TextExtent { - public var width: Number; - public var height: Number; - public var textFieldWidth: Number; - public var textFieldHeight: Number; - public var ascent: Number; - public var descent: Number; + public var width:Number; + public var height:Number; + public var textFieldWidth:Number; + public var textFieldHeight:Number; + public var ascent:Number; + public var descent:Number; - public function TextExtent(width: Number, height: Number, textFieldWidth: Number, textFieldHeight: Number, ascent: Number, descent: Number) { + public function TextExtent(width:Number, height:Number, textFieldWidth:Number, textFieldHeight:Number, ascent:Number, descent:Number) { this.width = width; this.height = height; this.textFieldWidth = textFieldWidth; diff --git a/core/src/avm2/globals/flash/text/TextField.as b/core/src/avm2/globals/flash/text/TextField.as index 8fddc37911fe..d0dff0a5a2ac 100644 --- a/core/src/avm2/globals/flash/text/TextField.as +++ b/core/src/avm2/globals/flash/text/TextField.as @@ -30,8 +30,8 @@ package flash.text { public native function get bottomScrollV():int; - public native function get condenseWhite():Boolean - public native function set condenseWhite(value:Boolean):void + public native function get condenseWhite():Boolean; + public native function set condenseWhite(value:Boolean):void; public native function get defaultTextFormat():TextFormat; public native function set defaultTextFormat(value:TextFormat):void; @@ -54,8 +54,8 @@ package flash.text { public native function get maxChars():int; public native function set maxChars(value:int):void; - public native function get mouseWheelEnabled():Boolean - public native function set mouseWheelEnabled(value:Boolean):void + public native function get mouseWheelEnabled():Boolean; + public native function set mouseWheelEnabled(value:Boolean):void; public native function get multiline():Boolean; public native function set multiline(value:Boolean):void; @@ -114,10 +114,10 @@ package flash.text { public native function get numLines():int; - public native function get caretIndex(): int; + public native function get caretIndex():int; - public native function get selectionBeginIndex(): int; - public native function get selectionEndIndex(): int; + public native function get selectionBeginIndex():int; + public native function get selectionEndIndex():int; public native function appendText(text:String):void; public native function getLineMetrics(lineIndex:int):TextLineMetrics; diff --git a/core/src/avm2/globals/flash/text/TextFieldAutoSize.as b/core/src/avm2/globals/flash/text/TextFieldAutoSize.as index 66a0a1d5886b..a52bb1f0abf3 100644 --- a/core/src/avm2/globals/flash/text/TextFieldAutoSize.as +++ b/core/src/avm2/globals/flash/text/TextFieldAutoSize.as @@ -1,8 +1,8 @@ package flash.text { public final class TextFieldAutoSize { - public static const NONE: String = "none"; - public static const LEFT: String = "left"; - public static const CENTER: String = "center"; - public static const RIGHT: String = "right"; + public static const NONE:String = "none"; + public static const LEFT:String = "left"; + public static const CENTER:String = "center"; + public static const RIGHT:String = "right"; } } diff --git a/core/src/avm2/globals/flash/text/TextFieldType.as b/core/src/avm2/globals/flash/text/TextFieldType.as index cb5be99d80c8..2730e16d8d73 100644 --- a/core/src/avm2/globals/flash/text/TextFieldType.as +++ b/core/src/avm2/globals/flash/text/TextFieldType.as @@ -1,6 +1,6 @@ package flash.text { public final class TextFieldType { - public static const INPUT: String = "input"; - public static const DYNAMIC: String = "dynamic"; + public static const INPUT:String = "input"; + public static const DYNAMIC:String = "dynamic"; } } diff --git a/core/src/avm2/globals/flash/text/TextFormat.as b/core/src/avm2/globals/flash/text/TextFormat.as index 24496674ad20..87ab42fa310d 100644 --- a/core/src/avm2/globals/flash/text/TextFormat.as +++ b/core/src/avm2/globals/flash/text/TextFormat.as @@ -3,61 +3,74 @@ package flash.text { [Ruffle(InstanceAllocator)] public class TextFormat { public function TextFormat( - font:String = null, size:Object = null, color:Object = null, bold:Object = null, italic:Object = null, underline:Object = null, - url:String = null, target:String = null, align:String = null, leftMargin:Object = null, rightMargin:Object = null, indent:Object = null, leading:Object = null - ) { - if (font != null) this.font = font; - if (size != null) this.size = size; - if (color != null) this.color = color; - if (bold != null) this.bold = bold; - if (italic != null) this.italic = italic; - if (underline != null) this.underline = underline; - if (url != null) this.url = url; - if (target != null) this.target = target; - if (align != null) this.align = align; - if (leftMargin != null) this.leftMargin = leftMargin; - if (rightMargin != null) this.rightMargin = rightMargin; - if (indent != null) this.indent = indent; - if (leading != null) this.leading = leading; + font:String = null, size:Object = null, color:Object = null, bold:Object = null, italic:Object = null, underline:Object = null, + url:String = null, target:String = null, align:String = null, leftMargin:Object = null, rightMargin:Object = null, indent:Object = null, leading:Object = null + ) { + if (font != null) + this.font = font; + if (size != null) + this.size = size; + if (color != null) + this.color = color; + if (bold != null) + this.bold = bold; + if (italic != null) + this.italic = italic; + if (underline != null) + this.underline = underline; + if (url != null) + this.url = url; + if (target != null) + this.target = target; + if (align != null) + this.align = align; + if (leftMargin != null) + this.leftMargin = leftMargin; + if (rightMargin != null) + this.rightMargin = rightMargin; + if (indent != null) + this.indent = indent; + if (leading != null) + this.leading = leading; } - public native function get align(): String; - public native function set align(param1:String): void; - public native function get blockIndent(): Object; - public native function set blockIndent(param1:Object): void; - public native function get bold(): Object; - public native function set bold(param1:Object): void; - public native function get bullet(): Object; - public native function set bullet(param1:Object): void; - public native function get color(): Object; - public native function set color(param1:Object): void; - public native function get display(): String; - public native function set display(param1:String): void; - public native function get font(): String; - public native function set font(param1:String): void; - public native function get indent(): Object; - public native function set indent(param1:Object): void; - public native function get italic(): Object; - public native function set italic(param1:Object): void; - public native function get kerning(): Object; - public native function set kerning(param1:Object): void; - public native function get leading(): Object; - public native function set leading(param1:Object): void; - public native function get leftMargin(): Object; - public native function set leftMargin(param1:Object): void; - public native function get letterSpacing(): Object; - public native function set letterSpacing(param1:Object): void; - public native function get rightMargin(): Object; - public native function set rightMargin(param1:Object): void; - public native function get size(): Object; - public native function set size(param1:Object): void; - public native function get tabStops(): Array; - public native function set tabStops(param1:Array): void; - public native function get target(): String; - public native function set target(param1:String): void; - public native function get underline(): Object; - public native function set underline(param1:Object): void; - public native function get url(): String; - public native function set url(param1:String): void; + public native function get align():String; + public native function set align(param1:String):void; + public native function get blockIndent():Object; + public native function set blockIndent(param1:Object):void; + public native function get bold():Object; + public native function set bold(param1:Object):void; + public native function get bullet():Object; + public native function set bullet(param1:Object):void; + public native function get color():Object; + public native function set color(param1:Object):void; + public native function get display():String; + public native function set display(param1:String):void; + public native function get font():String; + public native function set font(param1:String):void; + public native function get indent():Object; + public native function set indent(param1:Object):void; + public native function get italic():Object; + public native function set italic(param1:Object):void; + public native function get kerning():Object; + public native function set kerning(param1:Object):void; + public native function get leading():Object; + public native function set leading(param1:Object):void; + public native function get leftMargin():Object; + public native function set leftMargin(param1:Object):void; + public native function get letterSpacing():Object; + public native function set letterSpacing(param1:Object):void; + public native function get rightMargin():Object; + public native function set rightMargin(param1:Object):void; + public native function get size():Object; + public native function set size(param1:Object):void; + public native function get tabStops():Array; + public native function set tabStops(param1:Array):void; + public native function get target():String; + public native function set target(param1:String):void; + public native function get underline():Object; + public native function set underline(param1:Object):void; + public native function get url():String; + public native function set url(param1:String):void; } } \ No newline at end of file diff --git a/core/src/avm2/globals/flash/text/TextFormatAlign.as b/core/src/avm2/globals/flash/text/TextFormatAlign.as index b221c65d9ec6..c120c495a5b9 100644 --- a/core/src/avm2/globals/flash/text/TextFormatAlign.as +++ b/core/src/avm2/globals/flash/text/TextFormatAlign.as @@ -1,10 +1,10 @@ package flash.text { public final class TextFormatAlign { - public static const LEFT: String = "left"; - public static const CENTER: String = "center"; - public static const RIGHT: String = "right"; - public static const JUSTIFY: String = "justify"; - public static const START: String = "start"; - public static const END: String = "end"; + public static const LEFT:String = "left"; + public static const CENTER:String = "center"; + public static const RIGHT:String = "right"; + public static const JUSTIFY:String = "justify"; + public static const START:String = "start"; + public static const END:String = "end"; } } diff --git a/core/src/avm2/globals/flash/text/TextFormatDisplay.as b/core/src/avm2/globals/flash/text/TextFormatDisplay.as index 6ca44b57c7c1..9e890af1d628 100644 --- a/core/src/avm2/globals/flash/text/TextFormatDisplay.as +++ b/core/src/avm2/globals/flash/text/TextFormatDisplay.as @@ -1,6 +1,6 @@ package flash.text { public final class TextFormatDisplay { - public static const BLOCK: String = "block"; - public static const INLINE: String = "inline"; + public static const BLOCK:String = "block"; + public static const INLINE:String = "inline"; } } diff --git a/core/src/avm2/globals/flash/text/TextInteractionMode.as b/core/src/avm2/globals/flash/text/TextInteractionMode.as index ee802a032b8a..f0b4f2058105 100644 --- a/core/src/avm2/globals/flash/text/TextInteractionMode.as +++ b/core/src/avm2/globals/flash/text/TextInteractionMode.as @@ -1,6 +1,6 @@ package flash.text { public final class TextInteractionMode { - public static const NORMAL: String = "normal"; - public static const SELECTION: String = "selection"; + public static const NORMAL:String = "normal"; + public static const SELECTION:String = "selection"; } } diff --git a/core/src/avm2/globals/flash/text/TextLineMetrics.as b/core/src/avm2/globals/flash/text/TextLineMetrics.as index b086402c8459..d50195fe22a9 100644 --- a/core/src/avm2/globals/flash/text/TextLineMetrics.as +++ b/core/src/avm2/globals/flash/text/TextLineMetrics.as @@ -1,13 +1,13 @@ package flash.text { public class TextLineMetrics { - public var x: Number; - public var width: Number; - public var height: Number; - public var ascent: Number; - public var descent: Number; - public var leading: Number; + public var x:Number; + public var width:Number; + public var height:Number; + public var ascent:Number; + public var descent:Number; + public var leading:Number; - public function TextLineMetrics(x: Number, width: Number, height: Number, ascent: Number, descent: Number, leading: Number) { + public function TextLineMetrics(x:Number, width:Number, height:Number, ascent:Number, descent:Number, leading:Number) { this.x = x; this.width = width; this.height = height; diff --git a/core/src/avm2/globals/flash/text/TextRenderer.as b/core/src/avm2/globals/flash/text/TextRenderer.as index 83804e5c5085..1248d33c79b5 100644 --- a/core/src/avm2/globals/flash/text/TextRenderer.as +++ b/core/src/avm2/globals/flash/text/TextRenderer.as @@ -3,46 +3,39 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.text -{ +package flash.text { import __ruffle__.stub_method; import __ruffle__.stub_getter; import __ruffle__.stub_setter; - public final class TextRenderer - { + public final class TextRenderer { // Controls the rendering of advanced anti-aliased text. - private static var _displayMode: String = "default"; + private static var _displayMode:String = "default"; // The adaptively sampled distance fields (ADFs) quality level for advanced anti-aliasing. - private static var _maxLevel: int = 4; + private static var _maxLevel:int = 4; // Sets a custom continuous stroke modulation (CSM) lookup table for a font. - public static function setAdvancedAntiAliasingTable(fontName:String, fontStyle:String, colorType:String, advancedAntiAliasingTable:Array):void - { + public static function setAdvancedAntiAliasingTable(fontName:String, fontStyle:String, colorType:String, advancedAntiAliasingTable:Array):void { stub_method("flash.text.TextRenderer", "setAdvancedAntiAliasingTable"); } - public static function get displayMode():String - { + public static function get displayMode():String { stub_getter("flash.text.TextRenderer", "displayMode"); return _displaymode; } - public static function set displayMode(value:String):void - { + public static function set displayMode(value:String):void { stub_setter("flash.text.TextRenderer", "displayMode"); _displayMode = value; } - public static function get maxLevel():int - { + public static function get maxLevel():int { stub_getter("flash.text.TextRenderer", "maxLevel"); return _maxLevel; } - public static function set maxLevel(value:int):void - { + public static function set maxLevel(value:int):void { stub_setter("flash.text.TextRenderer", "maxLevel"); _maxLevel = value; } diff --git a/core/src/avm2/globals/flash/text/engine/BreakOpportunity.as b/core/src/avm2/globals/flash/text/engine/BreakOpportunity.as index 2e5e7b27dd66..1eb6e82dcc11 100644 --- a/core/src/avm2/globals/flash/text/engine/BreakOpportunity.as +++ b/core/src/avm2/globals/flash/text/engine/BreakOpportunity.as @@ -3,11 +3,9 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.text.engine -{ +package flash.text.engine { [API("662")] - public final class BreakOpportunity - { + public final class BreakOpportunity { // Treats all characters in the ContentElement object as line break opportunities, meaning that a line break will occur after each character. public static const ALL:String = "all"; diff --git a/core/src/avm2/globals/flash/text/engine/CFFHinting.as b/core/src/avm2/globals/flash/text/engine/CFFHinting.as index 573114201c73..5ea68f5a58c4 100644 --- a/core/src/avm2/globals/flash/text/engine/CFFHinting.as +++ b/core/src/avm2/globals/flash/text/engine/CFFHinting.as @@ -3,11 +3,9 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.text.engine -{ +package flash.text.engine { [API("662")] - public final class CFFHinting - { + public final class CFFHinting { // Fits strong horizontal stems to the pixel grid for improved readability. public static const HORIZONTAL_STEM:String = "horizontalStem"; diff --git a/core/src/avm2/globals/flash/text/engine/DigitCase.as b/core/src/avm2/globals/flash/text/engine/DigitCase.as index 8519fda89e60..e4267676ff44 100644 --- a/core/src/avm2/globals/flash/text/engine/DigitCase.as +++ b/core/src/avm2/globals/flash/text/engine/DigitCase.as @@ -3,11 +3,9 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.text.engine -{ +package flash.text.engine { [API("662")] - public final class DigitCase - { + public final class DigitCase { // Used to specify default digit case. public static const DEFAULT:String = "default"; diff --git a/core/src/avm2/globals/flash/text/engine/DigitWidth.as b/core/src/avm2/globals/flash/text/engine/DigitWidth.as index 7b3e32399c25..a53a4171fc61 100644 --- a/core/src/avm2/globals/flash/text/engine/DigitWidth.as +++ b/core/src/avm2/globals/flash/text/engine/DigitWidth.as @@ -3,11 +3,9 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.text.engine -{ +package flash.text.engine { [API("662")] - public final class DigitWidth - { + public final class DigitWidth { // Used to specify default digit width. public static const DEFAULT:String = "default"; diff --git a/core/src/avm2/globals/flash/text/engine/ElementFormat.as b/core/src/avm2/globals/flash/text/engine/ElementFormat.as index bf7863b43ee8..4045cd8a294a 100644 --- a/core/src/avm2/globals/flash/text/engine/ElementFormat.as +++ b/core/src/avm2/globals/flash/text/engine/ElementFormat.as @@ -42,13 +42,12 @@ package flash.text.engine { private var _typographicCase:String; - public function ElementFormat(fontDescription:FontDescription = null, fontSize:Number = 12, color:uint = 0, alpha:Number = 1, - textRotation:String = "auto", dominantBaseline:String = "roman", - alignmentBaseline:String = "useDominantBaseline", baselineShift:Number = 0, kerning:String = "on", - trackingRight:Number = 0, trackingLeft:Number = 0, locale:String = "en", breakOpportunity:String = "auto", - digitCase:String = "default", digitWidth:String = "default", ligatureLevel:String = "common", - typographicCase:String = "default") { + textRotation:String = "auto", dominantBaseline:String = "roman", + alignmentBaseline:String = "useDominantBaseline", baselineShift:Number = 0, kerning:String = "on", + trackingRight:Number = 0, trackingLeft:Number = 0, locale:String = "en", breakOpportunity:String = "auto", + digitCase:String = "default", digitWidth:String = "default", ligatureLevel:String = "common", + typographicCase:String = "default") { this.fontDescription = (fontDescription != null) ? fontDescription : new FontDescription(); this.alignmentBaseline = alignmentBaseline; @@ -209,8 +208,8 @@ package flash.text.engine { stub_method("flash.text.engine.ElementFormat", "getFontMetrics"); var emBox:Rectangle = new Rectangle(0, _fontSize * -0.8, _fontSize, _fontSize); return new FontMetrics( - emBox, -5, 1.2, 1.8, 1.2, 0.075, 0.6, -0.35, 0.6, 0.0 - ); + emBox, -5, 1.2, 1.8, 1.2, 0.075, 0.6, -0.35, 0.6, 0.0 + ); } } } diff --git a/core/src/avm2/globals/flash/text/engine/FontDescription.as b/core/src/avm2/globals/flash/text/engine/FontDescription.as index 5a3d7b2950ce..5266cffdb4d1 100644 --- a/core/src/avm2/globals/flash/text/engine/FontDescription.as +++ b/core/src/avm2/globals/flash/text/engine/FontDescription.as @@ -20,7 +20,7 @@ package flash.text.engine { private var _cffHinting:String; public function FontDescription(fontName:String = "_serif", fontWeight:String = "normal", fontPosture:String = "normal", - fontLookup:String = "device", renderingMode:String = "cff", cffHinting:String = "horizontalStem") { + fontLookup:String = "device", renderingMode:String = "cff", cffHinting:String = "horizontalStem") { this.fontName = fontName; this.fontWeight = fontWeight; this.fontPosture = fontPosture; @@ -34,7 +34,8 @@ package flash.text.engine { } public function set fontName(value:String):void { - if (value == null) throwNonNull("fontName"); + if (value == null) + throwNonNull("fontName"); this._fontName = value; } @@ -44,7 +45,8 @@ package flash.text.engine { } public function set fontWeight(value:String):void { - if (value == null) throwNonNull("fontWeight"); + if (value == null) + throwNonNull("fontWeight"); if (value != FontWeight.NORMAL && value != FontWeight.BOLD) { throwNotAccepted("fontWeight"); } @@ -57,7 +59,8 @@ package flash.text.engine { } public function set fontPosture(value:String):void { - if (value == null) throwNonNull("fontPosture"); + if (value == null) + throwNonNull("fontPosture"); if (value != FontPosture.NORMAL && value != FontPosture.ITALIC) { throwNotAccepted("fontPosture"); } @@ -70,7 +73,8 @@ package flash.text.engine { } public function set fontLookup(value:String):void { - if (value == null) throwNonNull("fontLookup"); + if (value == null) + throwNonNull("fontLookup"); if (value != FontLookup.DEVICE && value != FontLookup.EMBEDDED_CFF) { throwNotAccepted("fontLookup"); } @@ -83,7 +87,8 @@ package flash.text.engine { } public function set renderingMode(value:String):void { - if (value == null) throwNonNull("renderingMode"); + if (value == null) + throwNonNull("renderingMode"); if (value != RenderingMode.NORMAL && value != RenderingMode.CFF) { throwNotAccepted("renderingMode"); } @@ -96,7 +101,8 @@ package flash.text.engine { } public function set cffHinting(value:String):void { - if (value == null) throwNonNull("cffHinting"); + if (value == null) + throwNonNull("cffHinting"); if (value != CFFHinting.NONE && value != CFFHinting.HORIZONTAL_STEM) { throwNotAccepted("cffHinting"); } @@ -104,16 +110,16 @@ package flash.text.engine { this._cffHinting = value; } - public static function isFontCompatible(fontName: String, fontWeight: String, fontPosture: String): Boolean { + public static function isFontCompatible(fontName:String, fontWeight:String, fontPosture:String):Boolean { stub_method("flash.text.engine.FontDescription", "isFontCompatible"); return false; } - private static function throwNonNull(name: String) { + private static function throwNonNull(name:String) { throw new TypeError("Error #2007: Parameter " + name + " must be non-null.", 2007); } - private static function throwNotAccepted(name: String) { + private static function throwNotAccepted(name:String) { throw new ArgumentError("Error #2008: Parameter " + name + " must be one of the accepted values.", 2008); } } diff --git a/core/src/avm2/globals/flash/text/engine/FontLookup.as b/core/src/avm2/globals/flash/text/engine/FontLookup.as index fbe33f401868..83d06b002eb5 100644 --- a/core/src/avm2/globals/flash/text/engine/FontLookup.as +++ b/core/src/avm2/globals/flash/text/engine/FontLookup.as @@ -3,11 +3,9 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.text.engine -{ +package flash.text.engine { [API("662")] - public final class FontLookup - { + public final class FontLookup { // Used to indicate device font lookup. public static const DEVICE:String = "device"; diff --git a/core/src/avm2/globals/flash/text/engine/FontPosture.as b/core/src/avm2/globals/flash/text/engine/FontPosture.as index a008160d79e5..62a478901003 100644 --- a/core/src/avm2/globals/flash/text/engine/FontPosture.as +++ b/core/src/avm2/globals/flash/text/engine/FontPosture.as @@ -3,11 +3,9 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.text.engine -{ +package flash.text.engine { [API("662")] - public final class FontPosture - { + public final class FontPosture { // Used to indicate italic font posture. public static const ITALIC:String = "italic"; diff --git a/core/src/avm2/globals/flash/text/engine/FontWeight.as b/core/src/avm2/globals/flash/text/engine/FontWeight.as index cac055f90ebb..f57766c3fe2a 100644 --- a/core/src/avm2/globals/flash/text/engine/FontWeight.as +++ b/core/src/avm2/globals/flash/text/engine/FontWeight.as @@ -3,11 +3,9 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.text.engine -{ +package flash.text.engine { [API("662")] - public final class FontWeight - { + public final class FontWeight { // Used to indicate bold font weight. public static const BOLD:String = "bold"; diff --git a/core/src/avm2/globals/flash/text/engine/GroupElement.as b/core/src/avm2/globals/flash/text/engine/GroupElement.as index 968e6165df17..169dce0a8941 100644 --- a/core/src/avm2/globals/flash/text/engine/GroupElement.as +++ b/core/src/avm2/globals/flash/text/engine/GroupElement.as @@ -25,7 +25,7 @@ package flash.text.engine { public function getElementIndex(element:ContentElement):int { return this._elements.indexOf(element); - } + } public function setElements(elements:Vector.):void { if (elements == null) { @@ -41,7 +41,7 @@ package flash.text.engine { return null; } if (beginIndex < 0 || beginIndex > this._elements.length || - endIndex < 0 || endIndex > this._elements.length) { + endIndex < 0 || endIndex > this._elements.length) { throw new RangeError("Error #2006: The supplied index is out of bounds.", 2006); } @@ -54,7 +54,7 @@ package flash.text.engine { return old; } - public function splitTextElement(elementIndex:int, splitIndex:int): TextElement { + public function splitTextElement(elementIndex:int, splitIndex:int):TextElement { var element = getElementAt(elementIndex); if (!(element instanceof TextElement)) { throw new ArgumentError("Error #2004: One of the parameters is invalid.", 2004); @@ -62,7 +62,7 @@ package flash.text.engine { var text = element.text; if (splitIndex < 0 || splitIndex >= text.length) { - throw new RangeError("Error #2006: The supplied index is out of bounds.", 2006); + throw new RangeError("Error #2006: The supplied index is out of bounds.", 2006); } element.text = text.slice(0, splitIndex); @@ -75,7 +75,7 @@ package flash.text.engine { override public function get text():String { var resultingText:String = ""; - for (var i = 0; i < this._elements.length; i ++) { + for (var i = 0; i < this._elements.length; i++) { resultingText += this._elements[i].text; } diff --git a/core/src/avm2/globals/flash/text/engine/JustificationStyle.as b/core/src/avm2/globals/flash/text/engine/JustificationStyle.as index f52788c51262..49d99fc7c6f5 100644 --- a/core/src/avm2/globals/flash/text/engine/JustificationStyle.as +++ b/core/src/avm2/globals/flash/text/engine/JustificationStyle.as @@ -3,11 +3,9 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.text.engine -{ +package flash.text.engine { [API("662")] - public final class JustificationStyle - { + public final class JustificationStyle { // Bases justification on either expanding or compressing the line, whichever gives a result closest to the desired width. public static const PRIORITIZE_LEAST_ADJUSTMENT:String = "prioritizeLeastAdjustment"; diff --git a/core/src/avm2/globals/flash/text/engine/Kerning.as b/core/src/avm2/globals/flash/text/engine/Kerning.as index 4899673606eb..83eae469bbfd 100644 --- a/core/src/avm2/globals/flash/text/engine/Kerning.as +++ b/core/src/avm2/globals/flash/text/engine/Kerning.as @@ -3,11 +3,9 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.text.engine -{ +package flash.text.engine { [API("662")] - public final class Kerning - { + public final class Kerning { // Used to indicate that kerning is enabled except where inappropriate in Asian typography. public static const AUTO:String = "auto"; diff --git a/core/src/avm2/globals/flash/text/engine/LigatureLevel.as b/core/src/avm2/globals/flash/text/engine/LigatureLevel.as index dccbd82b5864..e7ad5c08bde5 100644 --- a/core/src/avm2/globals/flash/text/engine/LigatureLevel.as +++ b/core/src/avm2/globals/flash/text/engine/LigatureLevel.as @@ -3,11 +3,9 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.text.engine -{ +package flash.text.engine { [API("662")] - public final class LigatureLevel - { + public final class LigatureLevel { // Used to specify common ligatures. public static const COMMON:String = "common"; diff --git a/core/src/avm2/globals/flash/text/engine/LineJustification.as b/core/src/avm2/globals/flash/text/engine/LineJustification.as index f5a0ef2abb7b..c4218ba5d14a 100644 --- a/core/src/avm2/globals/flash/text/engine/LineJustification.as +++ b/core/src/avm2/globals/flash/text/engine/LineJustification.as @@ -3,11 +3,9 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.text.engine -{ +package flash.text.engine { [API("662")] - public final class LineJustification - { + public final class LineJustification { // Justify all but the last line. public static const ALL_BUT_LAST:String = "allButLast"; diff --git a/core/src/avm2/globals/flash/text/engine/RenderingMode.as b/core/src/avm2/globals/flash/text/engine/RenderingMode.as index 238c60854ce2..125c6ab8df0f 100644 --- a/core/src/avm2/globals/flash/text/engine/RenderingMode.as +++ b/core/src/avm2/globals/flash/text/engine/RenderingMode.as @@ -3,11 +3,9 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.text.engine -{ +package flash.text.engine { [API("662")] - public final class RenderingMode - { + public final class RenderingMode { // Sets rendering mode to CFF (Compact Font Format). public static const CFF:String = "cff"; diff --git a/core/src/avm2/globals/flash/text/engine/TabAlignment.as b/core/src/avm2/globals/flash/text/engine/TabAlignment.as index 7267e7793021..0ed7ea35c118 100644 --- a/core/src/avm2/globals/flash/text/engine/TabAlignment.as +++ b/core/src/avm2/globals/flash/text/engine/TabAlignment.as @@ -3,11 +3,9 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.text.engine -{ +package flash.text.engine { [API("662")] - public final class TabAlignment - { + public final class TabAlignment { // Positions the center of the tabbed text at the tab stop. public static const CENTER:String = "center"; diff --git a/core/src/avm2/globals/flash/text/engine/TextBaseline.as b/core/src/avm2/globals/flash/text/engine/TextBaseline.as index c3e2b5902e27..3fdae5379f4f 100644 --- a/core/src/avm2/globals/flash/text/engine/TextBaseline.as +++ b/core/src/avm2/globals/flash/text/engine/TextBaseline.as @@ -3,11 +3,9 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.text.engine -{ +package flash.text.engine { [API("662")] - public final class TextBaseline - { + public final class TextBaseline { // Specifies an ascent baseline. public static const ASCENT:String = "ascent"; @@ -29,6 +27,5 @@ package flash.text.engine // Specifies that the alignmentBaseline is the same as the dominantBaseline. public static const USE_DOMINANT_BASELINE:String = "useDominantBaseline"; - } } diff --git a/core/src/avm2/globals/flash/text/engine/TextBlock.as b/core/src/avm2/globals/flash/text/engine/TextBlock.as index e4a1570711fc..ada55a256df8 100644 --- a/core/src/avm2/globals/flash/text/engine/TextBlock.as +++ b/core/src/avm2/globals/flash/text/engine/TextBlock.as @@ -23,17 +23,16 @@ package flash.text.engine { [Ruffle(NativeAccessible)] private var _firstLine:TextLine = null; - public function TextBlock(content:ContentElement = null, - tabStops:Vector. = null, - textJustifier:TextJustifier = null, - lineRotation:String = "rotate0", - baselineZero:String = "roman", - bidiLevel:int = 0, - applyNonLinearFontScaling:Boolean = true, - baselineFontDescription:FontDescription = null, - baselineFontSize:Number = 12 - ) { + tabStops:Vector. = null, + textJustifier:TextJustifier = null, + lineRotation:String = "rotate0", + baselineZero:String = "roman", + bidiLevel:int = 0, + applyNonLinearFontScaling:Boolean = true, + baselineFontDescription:FontDescription = null, + baselineFontSize:Number = 12 + ) { // The order of setting these properties matters- if lineRotation // is null/invalid, the rest won't be set because it will throw an error if (content) { diff --git a/core/src/avm2/globals/flash/text/engine/TextElement.as b/core/src/avm2/globals/flash/text/engine/TextElement.as index 2102f723a445..bcbca907d188 100644 --- a/core/src/avm2/globals/flash/text/engine/TextElement.as +++ b/core/src/avm2/globals/flash/text/engine/TextElement.as @@ -29,4 +29,3 @@ package flash.text.engine { } } } - diff --git a/core/src/avm2/globals/flash/text/engine/TextLine.as b/core/src/avm2/globals/flash/text/engine/TextLine.as index cb3c50bedf55..3fb42b0bd110 100644 --- a/core/src/avm2/globals/flash/text/engine/TextLine.as +++ b/core/src/avm2/globals/flash/text/engine/TextLine.as @@ -155,7 +155,8 @@ package flash.text.engine { } // This function does nothing in Flash Player 32 - public function flushAtomData():void { } + public function flushAtomData():void { + } // Overrides diff --git a/core/src/avm2/globals/flash/text/engine/TextLineCreationResult.as b/core/src/avm2/globals/flash/text/engine/TextLineCreationResult.as index 39ac9a3584e7..d0c03eca502e 100644 --- a/core/src/avm2/globals/flash/text/engine/TextLineCreationResult.as +++ b/core/src/avm2/globals/flash/text/engine/TextLineCreationResult.as @@ -3,11 +3,9 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.text.engine -{ +package flash.text.engine { [API("662")] - public final class TextLineCreationResult - { + public final class TextLineCreationResult { // Indicates no line was created because all text in the block had already been broken. public static const COMPLETE:String = "complete"; diff --git a/core/src/avm2/globals/flash/text/engine/TextLineValidity.as b/core/src/avm2/globals/flash/text/engine/TextLineValidity.as index 3e9d8ba1017f..d7236d35d85a 100644 --- a/core/src/avm2/globals/flash/text/engine/TextLineValidity.as +++ b/core/src/avm2/globals/flash/text/engine/TextLineValidity.as @@ -3,11 +3,9 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.text.engine -{ +package flash.text.engine { [API("662")] - public final class TextLineValidity - { + public final class TextLineValidity { // Specifies that the line is invalid. public static const INVALID:String = "invalid"; @@ -20,6 +18,5 @@ package flash.text.engine // Specifies that the text line is valid. public static const VALID:String = "valid"; - } } diff --git a/core/src/avm2/globals/flash/text/engine/TextRotation.as b/core/src/avm2/globals/flash/text/engine/TextRotation.as index 059df6729bbe..8a3659daca96 100644 --- a/core/src/avm2/globals/flash/text/engine/TextRotation.as +++ b/core/src/avm2/globals/flash/text/engine/TextRotation.as @@ -3,11 +3,9 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.text.engine -{ +package flash.text.engine { [API("662")] - public final class TextRotation - { + public final class TextRotation { // Specifies a 90 degree counter clockwise rotation for full width and wide glyphs only, as determined by the Unicode properties of the glyph. public static const AUTO:String = "auto"; diff --git a/core/src/avm2/globals/flash/text/engine/TypographicCase.as b/core/src/avm2/globals/flash/text/engine/TypographicCase.as index 726c8e34161f..15f1017fced9 100644 --- a/core/src/avm2/globals/flash/text/engine/TypographicCase.as +++ b/core/src/avm2/globals/flash/text/engine/TypographicCase.as @@ -3,11 +3,9 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.text.engine -{ +package flash.text.engine { [API("662")] - public final class TypographicCase - { + public final class TypographicCase { // Specifies that spacing is adjusted for uppercase characters on output. public static const CAPS:String = "caps"; diff --git a/core/src/avm2/globals/flash/text/ime/CompositionAttributeRange.as b/core/src/avm2/globals/flash/text/ime/CompositionAttributeRange.as index 3403f735e116..4e6086dd520e 100644 --- a/core/src/avm2/globals/flash/text/ime/CompositionAttributeRange.as +++ b/core/src/avm2/globals/flash/text/ime/CompositionAttributeRange.as @@ -3,11 +3,11 @@ package flash.text.ime { public var converted:Boolean; public var relativeStart:int; - + public var relativeEnd:int; - + public var selected:Boolean; - + public function CompositionAttributeRange(relativeStart:int, relativeEnd:int, selected:Boolean, converted:Boolean) { this.relativeStart = relativeStart; this.relativeEnd = relativeEnd; @@ -16,4 +16,3 @@ package flash.text.ime { } } } - diff --git a/core/src/avm2/globals/flash/text/ime/IIMEClient.as b/core/src/avm2/globals/flash/text/ime/IIMEClient.as index 25a35fb93dcb..e7eeeb5490cc 100644 --- a/core/src/avm2/globals/flash/text/ime/IIMEClient.as +++ b/core/src/avm2/globals/flash/text/ime/IIMEClient.as @@ -22,4 +22,3 @@ package flash.text.ime { function get verticalTextLayout():Boolean; } } - diff --git a/core/src/avm2/globals/flash/ui/ContextMenu.as b/core/src/avm2/globals/flash/ui/ContextMenu.as index 70f2cf32b0dd..32339a414bea 100644 --- a/core/src/avm2/globals/flash/ui/ContextMenu.as +++ b/core/src/avm2/globals/flash/ui/ContextMenu.as @@ -9,19 +9,19 @@ package flash.ui { private var _clipboardMenu:Boolean; [Ruffle(NativeAccessible)] - private var _builtInItems: ContextMenuBuiltInItems = new ContextMenuBuiltInItems(); + private var _builtInItems:ContextMenuBuiltInItems = new ContextMenuBuiltInItems(); - private var _clipboardItems: ContextMenuClipboardItems = new ContextMenuClipboardItems(); + private var _clipboardItems:ContextMenuClipboardItems = new ContextMenuClipboardItems(); public function ContextMenu() { super(); this.customItems = new Array(); } - + public function get customItems():Array { return this._customItems; } - + public function set customItems(value:Array):void { this._customItems = value; } @@ -39,7 +39,7 @@ package flash.ui { } } - public function get builtInItems(): ContextMenuBuiltInItems { + public function get builtInItems():ContextMenuBuiltInItems { return this._builtInItems; } @@ -47,7 +47,7 @@ package flash.ui { this._builtInItems = value; } - public function get clipboardItems(): ContextMenuClipboardItems { + public function get clipboardItems():ContextMenuClipboardItems { return this._clipboardItems; } diff --git a/core/src/avm2/globals/flash/ui/ContextMenuBuiltInItems.as b/core/src/avm2/globals/flash/ui/ContextMenuBuiltInItems.as index 0695f7974e51..9891c586301a 100644 --- a/core/src/avm2/globals/flash/ui/ContextMenuBuiltInItems.as +++ b/core/src/avm2/globals/flash/ui/ContextMenuBuiltInItems.as @@ -23,74 +23,67 @@ package flash.ui { [Ruffle(NativeAccessible)] private var _zoom:Boolean = true; - + public function get forwardAndBack():Boolean { return this._forwardAndBack; } - + public function set forwardAndBack(value:Boolean):void { this._forwardAndBack = value; } - - + public function get loop():Boolean { return this._loop; } - + public function set loop(value:Boolean):void { this._loop = value; } - - + public function get play():Boolean { return this._play; } - + public function set play(value:Boolean):void { this._play = value; } - - + public function get print():Boolean { return this._print; } - + public function set print(value:Boolean):void { this._print = value; } - - + public function get quality():Boolean { return this._quality; } - + public function set quality(value:Boolean):void { this._quality = value; } - - + public function get rewind():Boolean { return this._rewind; } - + public function set rewind(value:Boolean):void { this._rewind = value; } - - + public function get save():Boolean { return this._save; } - + public function set save(value:Boolean):void { this._save = value; } - - + public function get zoom():Boolean { return this._zoom; } - + public function set zoom(value:Boolean):void { this._zoom = value; } diff --git a/core/src/avm2/globals/flash/ui/ContextMenuClipboardItems.as b/core/src/avm2/globals/flash/ui/ContextMenuClipboardItems.as index 9d7ff79a9959..03643b4ba087 100644 --- a/core/src/avm2/globals/flash/ui/ContextMenuClipboardItems.as +++ b/core/src/avm2/globals/flash/ui/ContextMenuClipboardItems.as @@ -5,47 +5,47 @@ package flash.ui { private var _cut:Boolean; private var _paste:Boolean; private var _selectAll:Boolean; - + public function get clear():Boolean { return this._clear; } - + public function set clear(value:Boolean):void { this._clear = value; } - + public function get copy():Boolean { return this._copy; } - + public function set copy(value:Boolean):void { this._copy = value; } - + public function get cut():Boolean { return this._cut; } - + public function set cut(value:Boolean):void { this._cut = value; } - + public function get paste():Boolean { return this._paste; } - + public function set paste(value:Boolean):void { this._paste = value; } - + public function get selectAll():Boolean { return this._selectAll; } - + public function set selectAll(value:Boolean):void { this._selectAll = value; } - + public function clone():ContextMenuClipboardItems { var items:ContextMenuClipboardItems = new ContextMenuClipboardItems(); items.clear = this.clear; diff --git a/core/src/avm2/globals/flash/ui/ContextMenuItem.as b/core/src/avm2/globals/flash/ui/ContextMenuItem.as index 27ae231bdf9b..8c978ff6e1de 100644 --- a/core/src/avm2/globals/flash/ui/ContextMenuItem.as +++ b/core/src/avm2/globals/flash/ui/ContextMenuItem.as @@ -1,34 +1,30 @@ -package flash.ui -{ +package flash.ui { import flash.display.NativeMenuItem; - public final class ContextMenuItem extends NativeMenuItem - { + public final class ContextMenuItem extends NativeMenuItem { public function ContextMenuItem( - caption:String, - separatorBefore:Boolean = false, - enabled:Boolean = true, - visible:Boolean = true - ) - { + caption:String, + separatorBefore:Boolean = false, + enabled:Boolean = true, + visible:Boolean = true + ) { this.caption = caption; this.separatorBefore = separatorBefore; this.enabled = enabled; this.visible = visible; } - public function clone(): ContextMenuItem - { + public function clone():ContextMenuItem { return new ContextMenuItem(this.caption, this.separatorBefore, this.enabled, this.visible); } [Ruffle(NativeAccessible)] - public var caption: String; + public var caption:String; [Ruffle(NativeAccessible)] - public var separatorBefore: Boolean; + public var separatorBefore:Boolean; [Ruffle(NativeAccessible)] - public var visible: Boolean; + public var visible:Boolean; } } diff --git a/core/src/avm2/globals/flash/ui/GameInputControl.as b/core/src/avm2/globals/flash/ui/GameInputControl.as index dc08097b2356..cfe214b45f86 100644 --- a/core/src/avm2/globals/flash/ui/GameInputControl.as +++ b/core/src/avm2/globals/flash/ui/GameInputControl.as @@ -4,7 +4,7 @@ package flash.ui { [API("688")] public dynamic class GameInputControl extends EventDispatcher { public function GameInputControl() { - throw new ArgumentError("Error #2012: GameInputControl$ class cannot be instantiated.", 2012) + throw new ArgumentError("Error #2012: GameInputControl$ class cannot be instantiated.", 2012); } } } \ No newline at end of file diff --git a/core/src/avm2/globals/flash/ui/KeyLocation.as b/core/src/avm2/globals/flash/ui/KeyLocation.as index 22484ab3566e..072afc85854e 100644 --- a/core/src/avm2/globals/flash/ui/KeyLocation.as +++ b/core/src/avm2/globals/flash/ui/KeyLocation.as @@ -3,11 +3,9 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.ui -{ +package flash.ui { - public final class KeyLocation - { + public final class KeyLocation { // Indicates the key activation originated on a directional pad of input device. // Example: The trackball on a mobile device or the left arrow on a remote control. [API("669")] diff --git a/core/src/avm2/globals/flash/ui/Keyboard.as b/core/src/avm2/globals/flash/ui/Keyboard.as index ac22ee6a4ee9..4ce963672800 100644 --- a/core/src/avm2/globals/flash/ui/Keyboard.as +++ b/core/src/avm2/globals/flash/ui/Keyboard.as @@ -1,326 +1,327 @@ package flash.ui { public final class Keyboard { - public static native function get capsLock(): Boolean; - public static native function get hasVirtualKeyboard(): Boolean; - public static native function get numLock(): Boolean; - public static native function get physicalKeyboardType(): String; - public static native function isAccessible(): Boolean; + public static native function get capsLock():Boolean; + public static native function get hasVirtualKeyboard():Boolean; + public static native function get numLock():Boolean; + public static native function get physicalKeyboardType():String; + public static native function isAccessible():Boolean; - public static const BACKSPACE: uint = 8; - public static const TAB: uint = 9; - public static const ENTER: uint = 13; - public static const COMMAND: uint = 15; - public static const SHIFT: uint = 16; - public static const CONTROL: uint = 17; - public static const ALTERNATE: uint = 18; - public static const CAPS_LOCK: uint = 20; - public static const NUMPAD: uint = 21; - public static const ESCAPE: uint = 27; - public static const SPACE: uint = 32; - public static const PAGE_UP: uint = 33; - public static const PAGE_DOWN: uint = 34; - public static const END: uint = 35; - public static const HOME: uint = 36; - public static const LEFT: uint = 37; - public static const UP: uint = 38; - public static const RIGHT: uint = 39; - public static const DOWN: uint = 40; - public static const INSERT: uint = 45; - public static const DELETE: uint = 46; - public static const NUMBER_0: uint = 48; - public static const NUMBER_1: uint = 49; - public static const NUMBER_2: uint = 50; - public static const NUMBER_3: uint = 51; - public static const NUMBER_4: uint = 52; - public static const NUMBER_5: uint = 53; - public static const NUMBER_6: uint = 54; - public static const NUMBER_7: uint = 55; - public static const NUMBER_8: uint = 56; - public static const NUMBER_9: uint = 57; - public static const A: uint = 65; - public static const B: uint = 66; - public static const C: uint = 67; - public static const D: uint = 68; - public static const E: uint = 69; - public static const F: uint = 70; - public static const G: uint = 71; - public static const H: uint = 72; - public static const I: uint = 73; - public static const J: uint = 74; - public static const K: uint = 75; - public static const L: uint = 76; - public static const M: uint = 77; - public static const N: uint = 78; - public static const O: uint = 79; - public static const P: uint = 80; - public static const Q: uint = 81; - public static const R: uint = 82; - public static const S: uint = 83; - public static const T: uint = 84; - public static const U: uint = 85; - public static const V: uint = 86; - public static const W: uint = 87; - public static const X: uint = 88; - public static const Y: uint = 89; - public static const Z: uint = 90; - public static const NUMPAD_0: uint = 96; - public static const NUMPAD_1: uint = 97; - public static const NUMPAD_2: uint = 98; - public static const NUMPAD_3: uint = 99; - public static const NUMPAD_4: uint = 100; - public static const NUMPAD_5: uint = 101; - public static const NUMPAD_6: uint = 102; - public static const NUMPAD_7: uint = 103; - public static const NUMPAD_8: uint = 104; - public static const NUMPAD_9: uint = 105; - public static const NUMPAD_MULTIPLY: uint = 106; - public static const NUMPAD_ADD: uint = 107; - public static const NUMPAD_ENTER: uint = 108; - public static const NUMPAD_SUBTRACT: uint = 109; - public static const NUMPAD_DECIMAL: uint = 110; - public static const NUMPAD_DIVIDE: uint = 111; - public static const F1: uint = 112; - public static const F2: uint = 113; - public static const F3: uint = 114; - public static const F4: uint = 115; - public static const F5: uint = 116; - public static const F6: uint = 117; - public static const F7: uint = 118; - public static const F8: uint = 119; - public static const F9: uint = 120; - public static const F10: uint = 121; - public static const F11: uint = 122; - public static const F12: uint = 123; - public static const F13: uint = 124; - public static const F14: uint = 125; - public static const F15: uint = 126; - public static const SEMICOLON: uint = 186; - public static const EQUAL: uint = 187; - public static const COMMA: uint = 188; - public static const MINUS: uint = 189; - public static const PERIOD: uint = 190; - public static const SLASH: uint = 191; - public static const BACKQUOTE: uint = 192; - public static const LEFTBRACKET: uint = 219; - public static const BACKSLASH: uint = 220; - public static const RIGHTBRACKET: uint = 221; - public static const QUOTE: uint = 222; + public static const BACKSPACE:uint = 8; + public static const TAB:uint = 9; + public static const ENTER:uint = 13; + public static const COMMAND:uint = 15; + public static const SHIFT:uint = 16; + public static const CONTROL:uint = 17; + public static const ALTERNATE:uint = 18; + public static const CAPS_LOCK:uint = 20; + public static const NUMPAD:uint = 21; + public static const ESCAPE:uint = 27; + public static const SPACE:uint = 32; + public static const PAGE_UP:uint = 33; + public static const PAGE_DOWN:uint = 34; + public static const END:uint = 35; + public static const HOME:uint = 36; + public static const LEFT:uint = 37; + public static const UP:uint = 38; + public static const RIGHT:uint = 39; + public static const DOWN:uint = 40; + public static const INSERT:uint = 45; + public static const DELETE:uint = 46; + public static const NUMBER_0:uint = 48; + public static const NUMBER_1:uint = 49; + public static const NUMBER_2:uint = 50; + public static const NUMBER_3:uint = 51; + public static const NUMBER_4:uint = 52; + public static const NUMBER_5:uint = 53; + public static const NUMBER_6:uint = 54; + public static const NUMBER_7:uint = 55; + public static const NUMBER_8:uint = 56; + public static const NUMBER_9:uint = 57; + public static const A:uint = 65; + public static const B:uint = 66; + public static const C:uint = 67; + public static const D:uint = 68; + public static const E:uint = 69; + public static const F:uint = 70; + public static const G:uint = 71; + public static const H:uint = 72; + public static const I:uint = 73; + public static const J:uint = 74; + public static const K:uint = 75; + public static const L:uint = 76; + public static const M:uint = 77; + public static const N:uint = 78; + public static const O:uint = 79; + public static const P:uint = 80; + public static const Q:uint = 81; + public static const R:uint = 82; + public static const S:uint = 83; + public static const T:uint = 84; + public static const U:uint = 85; + public static const V:uint = 86; + public static const W:uint = 87; + public static const X:uint = 88; + public static const Y:uint = 89; + public static const Z:uint = 90; + public static const NUMPAD_0:uint = 96; + public static const NUMPAD_1:uint = 97; + public static const NUMPAD_2:uint = 98; + public static const NUMPAD_3:uint = 99; + public static const NUMPAD_4:uint = 100; + public static const NUMPAD_5:uint = 101; + public static const NUMPAD_6:uint = 102; + public static const NUMPAD_7:uint = 103; + public static const NUMPAD_8:uint = 104; + public static const NUMPAD_9:uint = 105; + public static const NUMPAD_MULTIPLY:uint = 106; + public static const NUMPAD_ADD:uint = 107; + public static const NUMPAD_ENTER:uint = 108; + public static const NUMPAD_SUBTRACT:uint = 109; + public static const NUMPAD_DECIMAL:uint = 110; + public static const NUMPAD_DIVIDE:uint = 111; + public static const F1:uint = 112; + public static const F2:uint = 113; + public static const F3:uint = 114; + public static const F4:uint = 115; + public static const F5:uint = 116; + public static const F6:uint = 117; + public static const F7:uint = 118; + public static const F8:uint = 119; + public static const F9:uint = 120; + public static const F10:uint = 121; + public static const F11:uint = 122; + public static const F12:uint = 123; + public static const F13:uint = 124; + public static const F14:uint = 125; + public static const F15:uint = 126; + public static const SEMICOLON:uint = 186; + public static const EQUAL:uint = 187; + public static const COMMA:uint = 188; + public static const MINUS:uint = 189; + public static const PERIOD:uint = 190; + public static const SLASH:uint = 191; + public static const BACKQUOTE:uint = 192; + public static const LEFTBRACKET:uint = 219; + public static const BACKSLASH:uint = 220; + public static const RIGHTBRACKET:uint = 221; + public static const QUOTE:uint = 222; [API("669")] - public static const SETUP: uint = 0x0100001C; + public static const SETUP:uint = 0x0100001C; [API("669")] - public static const NEXT: uint = 0x0100000E; + public static const NEXT:uint = 0x0100000E; [API("669")] - public static const MENU: uint = 0x01000012; + public static const MENU:uint = 0x01000012; [API("669")] - public static const CHANNEL_UP: uint = 0x01000004; + public static const CHANNEL_UP:uint = 0x01000004; [API("669")] - public static const EXIT: uint = 0x01000015; + public static const EXIT:uint = 0x01000015; [API("669")] - public static const BLUE: uint = 0x01000003; + public static const BLUE:uint = 0x01000003; [API("669")] - public static const CHANNEL_DOWN: uint = 0x01000005; + public static const CHANNEL_DOWN:uint = 0x01000005; [API("669")] - public static const INPUT: uint = 0x0100001B; + public static const INPUT:uint = 0x0100001B; [API("669")] - public static const DVR: uint = 0x01000019; + public static const DVR:uint = 0x01000019; [API("669")] - public static const SEARCH: uint = 0x0100001F; + public static const SEARCH:uint = 0x0100001F; [API("669")] - public static const MASTER_SHELL: uint = 0x0100001E; + public static const MASTER_SHELL:uint = 0x0100001E; [API("669")] - public static const SKIP_BACKWARD: uint = 0x0100000D; - [API("669")] // [NA] This should be 719, but it's not supported at time of writing - public static const PLAY_PAUSE: uint = 0x01000020; + public static const SKIP_BACKWARD:uint = 0x0100000D; [API("669")] - public static const HELP: uint = 0x0100001D; + // [NA] This should be 719, but it's not supported at time of writing + public static const PLAY_PAUSE:uint = 0x01000020; [API("669")] - public static const VOD: uint = 0x0100001A; + public static const HELP:uint = 0x0100001D; [API("669")] - public static const LIVE: uint = 0x01000010; + public static const VOD:uint = 0x0100001A; [API("669")] - public static const RED: uint = 0x01000000; + public static const LIVE:uint = 0x01000010; [API("669")] - public static const PREVIOUS: uint = 0x0100000F; + public static const RED:uint = 0x01000000; [API("669")] - public static const RECORD: uint = 0x01000006; + public static const PREVIOUS:uint = 0x0100000F; [API("669")] - public static const STOP: uint = 0x01000009; + public static const RECORD:uint = 0x01000006; [API("669")] - public static const SUBTITLE: uint = 0x01000018; + public static const STOP:uint = 0x01000009; [API("669")] - public static const PLAY: uint = 0x01000007; + public static const SUBTITLE:uint = 0x01000018; [API("669")] - public static const GUIDE: uint = 0x01000014; + public static const PLAY:uint = 0x01000007; [API("669")] - public static const YELLOW: uint = 0x01000002; + public static const GUIDE:uint = 0x01000014; [API("669")] - public static const REWIND: uint = 0x0100000B; + public static const YELLOW:uint = 0x01000002; [API("669")] - public static const INFO: uint = 0x01000013; + public static const REWIND:uint = 0x0100000B; [API("669")] - public static const LAST: uint = 0x01000011; + public static const INFO:uint = 0x01000013; [API("669")] - public static const PAUSE: uint = 0x01000008; + public static const LAST:uint = 0x01000011; [API("669")] - public static const AUDIO: uint = 0x01000017; + public static const PAUSE:uint = 0x01000008; [API("669")] - public static const GREEN: uint = 0x01000001; + public static const AUDIO:uint = 0x01000017; [API("669")] - public static const FAST_FORWARD: uint = 0x0100000A; + public static const GREEN:uint = 0x01000001; [API("669")] - public static const SKIP_FORWARD: uint = 0x0100000C; + public static const FAST_FORWARD:uint = 0x0100000A; [API("669")] - public static const BACK: uint = 0x01000016; + public static const SKIP_FORWARD:uint = 0x0100000C; + [API("669")] + public static const BACK:uint = 0x01000016; - public static const STRING_BEGIN: String = "\uf72a"; - public static const STRING_BREAK: String = "\uf732"; - public static const STRING_CLEARDISPLAY: String = "\uf73a"; - public static const STRING_CLEARLINE: String = "\uf739"; - public static const STRING_DELETE: String = "\uf728"; - public static const STRING_DELETECHAR: String = "\uf73e"; - public static const STRING_DELETELINE: String = "\uf73c"; - public static const STRING_DOWNARROW: String = "\uf701"; - public static const STRING_END: String = "\uf72b"; - public static const STRING_EXECUTE: String = "\uf742"; - public static const STRING_F1: String = "\uf704"; - public static const STRING_F2: String = "\uf705"; - public static const STRING_F3: String = "\uf706"; - public static const STRING_F4: String = "\uf707"; - public static const STRING_F5: String = "\uf708"; - public static const STRING_F6: String = "\uf709"; - public static const STRING_F7: String = "\uf70a"; - public static const STRING_F8: String = "\uf70b"; - public static const STRING_F9: String = "\uf70c"; - public static const STRING_F10: String = "\uf70d"; - public static const STRING_F11: String = "\uf70e"; - public static const STRING_F12: String = "\uf70f"; - public static const STRING_F13: String = "\uf710"; - public static const STRING_F14: String = "\uf711"; - public static const STRING_F15: String = "\uf712"; - public static const STRING_F16: String = "\uf713"; - public static const STRING_F17: String = "\uf714"; - public static const STRING_F18: String = "\uf715"; - public static const STRING_F19: String = "\uf716"; - public static const STRING_F20: String = "\uf717"; - public static const STRING_F21: String = "\uf718"; - public static const STRING_F22: String = "\uf719"; - public static const STRING_F23: String = "\uf71a"; - public static const STRING_F24: String = "\uf71b"; - public static const STRING_F25: String = "\uf71c"; - public static const STRING_F26: String = "\uf71d"; - public static const STRING_F27: String = "\uf71e"; - public static const STRING_F28: String = "\uf71f"; - public static const STRING_F29: String = "\uf720"; - public static const STRING_F30: String = "\uf721"; - public static const STRING_F31: String = "\uf722"; - public static const STRING_F32: String = "\uf723"; - public static const STRING_F33: String = "\uf724"; - public static const STRING_F34: String = "\uf725"; - public static const STRING_F35: String = "\uf726"; - public static const STRING_FIND: String = "\uf745"; - public static const STRING_HELP: String = "\uf746"; - public static const STRING_HOME: String = "\uf729"; - public static const STRING_INSERT: String = "\uf727"; - public static const STRING_INSERTCHAR: String = "\uf73d"; - public static const STRING_INSERTLINE: String = "\uf73b"; - public static const STRING_LEFTARROW: String = "\uf702"; - public static const STRING_MENU: String = "\uf735"; - public static const STRING_MODESWITCH: String = "\uf747"; - public static const STRING_NEXT: String = "\uf740"; - public static const STRING_PAGEDOWN: String = "\uf72d"; - public static const STRING_PAGEUP: String = "\uf72c"; - public static const STRING_PAUSE: String = "\uf730"; - public static const STRING_PREV: String = "\uf73f"; - public static const STRING_PRINT: String = "\uf738"; - public static const STRING_PRINTSCREEN: String = "\uf72e"; - public static const STRING_REDO: String = "\uf744"; - public static const STRING_RESET: String = "\uf733"; - public static const STRING_RIGHTARROW: String = "\uf703"; - public static const STRING_SCROLLLOCK: String = "\uf72f"; - public static const STRING_SELECT: String = "\uf741"; - public static const STRING_STOP: String = "\uf734"; - public static const STRING_SYSREQ: String = "\uf731"; - public static const STRING_SYSTEM: String = "\uf737"; - public static const STRING_UNDO: String = "\uf743"; - public static const STRING_UPARROW: String = "\uf700"; - public static const STRING_USER: String = "\uf736"; + public static const STRING_BEGIN:String = "\uf72a"; + public static const STRING_BREAK:String = "\uf732"; + public static const STRING_CLEARDISPLAY:String = "\uf73a"; + public static const STRING_CLEARLINE:String = "\uf739"; + public static const STRING_DELETE:String = "\uf728"; + public static const STRING_DELETECHAR:String = "\uf73e"; + public static const STRING_DELETELINE:String = "\uf73c"; + public static const STRING_DOWNARROW:String = "\uf701"; + public static const STRING_END:String = "\uf72b"; + public static const STRING_EXECUTE:String = "\uf742"; + public static const STRING_F1:String = "\uf704"; + public static const STRING_F2:String = "\uf705"; + public static const STRING_F3:String = "\uf706"; + public static const STRING_F4:String = "\uf707"; + public static const STRING_F5:String = "\uf708"; + public static const STRING_F6:String = "\uf709"; + public static const STRING_F7:String = "\uf70a"; + public static const STRING_F8:String = "\uf70b"; + public static const STRING_F9:String = "\uf70c"; + public static const STRING_F10:String = "\uf70d"; + public static const STRING_F11:String = "\uf70e"; + public static const STRING_F12:String = "\uf70f"; + public static const STRING_F13:String = "\uf710"; + public static const STRING_F14:String = "\uf711"; + public static const STRING_F15:String = "\uf712"; + public static const STRING_F16:String = "\uf713"; + public static const STRING_F17:String = "\uf714"; + public static const STRING_F18:String = "\uf715"; + public static const STRING_F19:String = "\uf716"; + public static const STRING_F20:String = "\uf717"; + public static const STRING_F21:String = "\uf718"; + public static const STRING_F22:String = "\uf719"; + public static const STRING_F23:String = "\uf71a"; + public static const STRING_F24:String = "\uf71b"; + public static const STRING_F25:String = "\uf71c"; + public static const STRING_F26:String = "\uf71d"; + public static const STRING_F27:String = "\uf71e"; + public static const STRING_F28:String = "\uf71f"; + public static const STRING_F29:String = "\uf720"; + public static const STRING_F30:String = "\uf721"; + public static const STRING_F31:String = "\uf722"; + public static const STRING_F32:String = "\uf723"; + public static const STRING_F33:String = "\uf724"; + public static const STRING_F34:String = "\uf725"; + public static const STRING_F35:String = "\uf726"; + public static const STRING_FIND:String = "\uf745"; + public static const STRING_HELP:String = "\uf746"; + public static const STRING_HOME:String = "\uf729"; + public static const STRING_INSERT:String = "\uf727"; + public static const STRING_INSERTCHAR:String = "\uf73d"; + public static const STRING_INSERTLINE:String = "\uf73b"; + public static const STRING_LEFTARROW:String = "\uf702"; + public static const STRING_MENU:String = "\uf735"; + public static const STRING_MODESWITCH:String = "\uf747"; + public static const STRING_NEXT:String = "\uf740"; + public static const STRING_PAGEDOWN:String = "\uf72d"; + public static const STRING_PAGEUP:String = "\uf72c"; + public static const STRING_PAUSE:String = "\uf730"; + public static const STRING_PREV:String = "\uf73f"; + public static const STRING_PRINT:String = "\uf738"; + public static const STRING_PRINTSCREEN:String = "\uf72e"; + public static const STRING_REDO:String = "\uf744"; + public static const STRING_RESET:String = "\uf733"; + public static const STRING_RIGHTARROW:String = "\uf703"; + public static const STRING_SCROLLLOCK:String = "\uf72f"; + public static const STRING_SELECT:String = "\uf741"; + public static const STRING_STOP:String = "\uf734"; + public static const STRING_SYSREQ:String = "\uf731"; + public static const STRING_SYSTEM:String = "\uf737"; + public static const STRING_UNDO:String = "\uf743"; + public static const STRING_UPARROW:String = "\uf700"; + public static const STRING_USER:String = "\uf736"; - public static const KEYNAME_UPARROW: String = "Up"; - public static const KEYNAME_DOWNARROW: String = "Down"; - public static const KEYNAME_LEFTARROW: String = "Left"; - public static const KEYNAME_RIGHTARROW: String = "Right"; - public static const KEYNAME_F1: String = "F1"; - public static const KEYNAME_F2: String = "F2"; - public static const KEYNAME_F3: String = "F3"; - public static const KEYNAME_F4: String = "F4"; - public static const KEYNAME_F5: String = "F5"; - public static const KEYNAME_F6: String = "F6"; - public static const KEYNAME_F7: String = "F7"; - public static const KEYNAME_F8: String = "F8"; - public static const KEYNAME_F9: String = "F9"; - public static const KEYNAME_F10: String = "F10"; - public static const KEYNAME_F11: String = "F11"; - public static const KEYNAME_F12: String = "F12"; - public static const KEYNAME_F13: String = "F13"; - public static const KEYNAME_F14: String = "F14"; - public static const KEYNAME_F15: String = "F15"; - public static const KEYNAME_F16: String = "F16"; - public static const KEYNAME_F17: String = "F17"; - public static const KEYNAME_F18: String = "F18"; - public static const KEYNAME_F19: String = "F19"; - public static const KEYNAME_F20: String = "F20"; - public static const KEYNAME_F21: String = "F21"; - public static const KEYNAME_F22: String = "F22"; - public static const KEYNAME_F23: String = "F23"; - public static const KEYNAME_F24: String = "F24"; - public static const KEYNAME_F25: String = "F25"; - public static const KEYNAME_F26: String = "F26"; - public static const KEYNAME_F27: String = "F27"; - public static const KEYNAME_F28: String = "F28"; - public static const KEYNAME_F29: String = "F29"; - public static const KEYNAME_F30: String = "F30"; - public static const KEYNAME_F31: String = "F31"; - public static const KEYNAME_F32: String = "F32"; - public static const KEYNAME_F33: String = "F33"; - public static const KEYNAME_F34: String = "F34"; - public static const KEYNAME_F35: String = "F35"; - public static const KEYNAME_INSERT: String = "Insert"; - public static const KEYNAME_DELETE: String = "Delete"; - public static const KEYNAME_HOME: String = "Home"; - public static const KEYNAME_BEGIN: String = "Begin"; - public static const KEYNAME_END: String = "End"; - public static const KEYNAME_PAGEUP: String = "PgUp"; - public static const KEYNAME_PAGEDOWN: String = "PgDn"; - public static const KEYNAME_PRINTSCREEN: String = "PrntScrn"; - public static const KEYNAME_SCROLLLOCK: String = "ScrlLck"; - public static const KEYNAME_PAUSE: String = "Pause"; - public static const KEYNAME_SYSREQ: String = "SysReq"; - public static const KEYNAME_BREAK: String = "Break"; - public static const KEYNAME_RESET: String = "Reset"; - public static const KEYNAME_STOP: String = "Stop"; - public static const KEYNAME_MENU: String = "Menu"; - public static const KEYNAME_USER: String = "User"; - public static const KEYNAME_SYSTEM: String = "Sys"; - public static const KEYNAME_PRINT: String = "Print"; - public static const KEYNAME_CLEARLINE: String = "ClrLn"; - public static const KEYNAME_CLEARDISPLAY: String = "ClrDsp"; - public static const KEYNAME_INSERTLINE: String = "InsLn"; - public static const KEYNAME_DELETELINE: String = "DelLn"; - public static const KEYNAME_INSERTCHAR: String = "InsChr"; - public static const KEYNAME_DELETECHAR: String = "DelChr"; - public static const KEYNAME_PREV: String = "Prev"; - public static const KEYNAME_NEXT: String = "Next"; - public static const KEYNAME_SELECT: String = "Select"; - public static const KEYNAME_EXECUTE: String = "Exec"; - public static const KEYNAME_UNDO: String = "Undo"; - public static const KEYNAME_REDO: String = "Redo"; - public static const KEYNAME_FIND: String = "Find"; - public static const KEYNAME_HELP: String = "Help"; - public static const KEYNAME_MODESWITCH: String = "ModeSw"; - public static const KEYNAME_PLAYPAUSE: String = "PlayPause"; + public static const KEYNAME_UPARROW:String = "Up"; + public static const KEYNAME_DOWNARROW:String = "Down"; + public static const KEYNAME_LEFTARROW:String = "Left"; + public static const KEYNAME_RIGHTARROW:String = "Right"; + public static const KEYNAME_F1:String = "F1"; + public static const KEYNAME_F2:String = "F2"; + public static const KEYNAME_F3:String = "F3"; + public static const KEYNAME_F4:String = "F4"; + public static const KEYNAME_F5:String = "F5"; + public static const KEYNAME_F6:String = "F6"; + public static const KEYNAME_F7:String = "F7"; + public static const KEYNAME_F8:String = "F8"; + public static const KEYNAME_F9:String = "F9"; + public static const KEYNAME_F10:String = "F10"; + public static const KEYNAME_F11:String = "F11"; + public static const KEYNAME_F12:String = "F12"; + public static const KEYNAME_F13:String = "F13"; + public static const KEYNAME_F14:String = "F14"; + public static const KEYNAME_F15:String = "F15"; + public static const KEYNAME_F16:String = "F16"; + public static const KEYNAME_F17:String = "F17"; + public static const KEYNAME_F18:String = "F18"; + public static const KEYNAME_F19:String = "F19"; + public static const KEYNAME_F20:String = "F20"; + public static const KEYNAME_F21:String = "F21"; + public static const KEYNAME_F22:String = "F22"; + public static const KEYNAME_F23:String = "F23"; + public static const KEYNAME_F24:String = "F24"; + public static const KEYNAME_F25:String = "F25"; + public static const KEYNAME_F26:String = "F26"; + public static const KEYNAME_F27:String = "F27"; + public static const KEYNAME_F28:String = "F28"; + public static const KEYNAME_F29:String = "F29"; + public static const KEYNAME_F30:String = "F30"; + public static const KEYNAME_F31:String = "F31"; + public static const KEYNAME_F32:String = "F32"; + public static const KEYNAME_F33:String = "F33"; + public static const KEYNAME_F34:String = "F34"; + public static const KEYNAME_F35:String = "F35"; + public static const KEYNAME_INSERT:String = "Insert"; + public static const KEYNAME_DELETE:String = "Delete"; + public static const KEYNAME_HOME:String = "Home"; + public static const KEYNAME_BEGIN:String = "Begin"; + public static const KEYNAME_END:String = "End"; + public static const KEYNAME_PAGEUP:String = "PgUp"; + public static const KEYNAME_PAGEDOWN:String = "PgDn"; + public static const KEYNAME_PRINTSCREEN:String = "PrntScrn"; + public static const KEYNAME_SCROLLLOCK:String = "ScrlLck"; + public static const KEYNAME_PAUSE:String = "Pause"; + public static const KEYNAME_SYSREQ:String = "SysReq"; + public static const KEYNAME_BREAK:String = "Break"; + public static const KEYNAME_RESET:String = "Reset"; + public static const KEYNAME_STOP:String = "Stop"; + public static const KEYNAME_MENU:String = "Menu"; + public static const KEYNAME_USER:String = "User"; + public static const KEYNAME_SYSTEM:String = "Sys"; + public static const KEYNAME_PRINT:String = "Print"; + public static const KEYNAME_CLEARLINE:String = "ClrLn"; + public static const KEYNAME_CLEARDISPLAY:String = "ClrDsp"; + public static const KEYNAME_INSERTLINE:String = "InsLn"; + public static const KEYNAME_DELETELINE:String = "DelLn"; + public static const KEYNAME_INSERTCHAR:String = "InsChr"; + public static const KEYNAME_DELETECHAR:String = "DelChr"; + public static const KEYNAME_PREV:String = "Prev"; + public static const KEYNAME_NEXT:String = "Next"; + public static const KEYNAME_SELECT:String = "Select"; + public static const KEYNAME_EXECUTE:String = "Exec"; + public static const KEYNAME_UNDO:String = "Undo"; + public static const KEYNAME_REDO:String = "Redo"; + public static const KEYNAME_FIND:String = "Find"; + public static const KEYNAME_HELP:String = "Help"; + public static const KEYNAME_MODESWITCH:String = "ModeSw"; + public static const KEYNAME_PLAYPAUSE:String = "PlayPause"; - public static const CharCodeStrings: Array = [ + public static const CharCodeStrings:Array = [ KEYNAME_UPARROW, KEYNAME_DOWNARROW, KEYNAME_LEFTARROW, diff --git a/core/src/avm2/globals/flash/ui/KeyboardType.as b/core/src/avm2/globals/flash/ui/KeyboardType.as index 5bf11308f111..dde899da3aef 100644 --- a/core/src/avm2/globals/flash/ui/KeyboardType.as +++ b/core/src/avm2/globals/flash/ui/KeyboardType.as @@ -3,11 +3,9 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.ui -{ +package flash.ui { - public final class KeyboardType - { + public final class KeyboardType { // A standard keyboard with a full set of numbers and letters. public static const ALPHANUMERIC:String = "alphanumeric"; diff --git a/core/src/avm2/globals/flash/ui/Mouse.as b/core/src/avm2/globals/flash/ui/Mouse.as index f6a92f3b0af3..eb1df34ff71c 100644 --- a/core/src/avm2/globals/flash/ui/Mouse.as +++ b/core/src/avm2/globals/flash/ui/Mouse.as @@ -4,8 +4,8 @@ package flash.ui { import __ruffle__.stub_method; public final class Mouse { - public static native function hide(): void; - public static native function show(): void; + public static native function hide():void; + public static native function show():void; public static function get supportsCursor():Boolean { stub_getter("flash.ui.Mouse", "supportsCursor"); return true; diff --git a/core/src/avm2/globals/flash/ui/MouseCursor.as b/core/src/avm2/globals/flash/ui/MouseCursor.as index 0b63488e10aa..754e35c526c2 100644 --- a/core/src/avm2/globals/flash/ui/MouseCursor.as +++ b/core/src/avm2/globals/flash/ui/MouseCursor.as @@ -3,11 +3,9 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.ui -{ +package flash.ui { - public final class MouseCursor - { + public final class MouseCursor { // Used to specify that the arrow cursor should be used. public static const ARROW:String = "arrow"; diff --git a/core/src/avm2/globals/flash/ui/MouseCursorData.as b/core/src/avm2/globals/flash/ui/MouseCursorData.as index ca0557d21403..f665a9e7dcf5 100644 --- a/core/src/avm2/globals/flash/ui/MouseCursorData.as +++ b/core/src/avm2/globals/flash/ui/MouseCursorData.as @@ -3,56 +3,48 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.ui -{ +package flash.ui { import flash.geom.Point; import flash.display.BitmapData; import __ruffle__.stub_getter; import __ruffle__.stub_setter; - public final class MouseCursorData - { + public final class MouseCursorData { // A Vector of BitmapData objects containing the cursor image or images. - private var _data: Vector.; + private var _data:Vector.; // The frame rate for animating the cursor. - private var _frameRate: Number; + private var _frameRate:Number; // The hot spot of the cursor in pixels. - private var _hotSpot: Point = new Point(0,0); + private var _hotSpot:Point = new Point(0, 0); - public function get data():Vector. - { + public function get data():Vector. { stub_getter("flash.ui.MouseCursorData", "data"); return this._data; } - public function set data(value:Vector.):void - { + public function set data(value:Vector.):void { stub_setter("flash.ui.MouseCursorData", "data"); this._data = value; } - public function get frameRate():Number - { + public function get frameRate():Number { stub_getter("flash.ui.MouseCursorData", "frameRate"); return this._frameRate; } - public function set frameRate(value:Number):void - { + public function set frameRate(value:Number):void { stub_setter("flash.ui.MouseCursorData", "frameRate"); this._frameRate = value; } - public function get hotSpot():Point - { + public function get hotSpot():Point { stub_getter("flash.ui.MouseCursorData", "hotSpot"); return this._hotSpot; } - public function set hotSpot(value:Point):void - { + public function set hotSpot(value:Point):void { stub_setter("flash.ui.MouseCursorData", "hotSpot"); this._hotSpot = value; } diff --git a/core/src/avm2/globals/flash/ui/MultitouchInputMode.as b/core/src/avm2/globals/flash/ui/MultitouchInputMode.as index d3d3080388cb..cd57e15819bb 100644 --- a/core/src/avm2/globals/flash/ui/MultitouchInputMode.as +++ b/core/src/avm2/globals/flash/ui/MultitouchInputMode.as @@ -3,12 +3,10 @@ // by https://github.com/golfinq/ActionScript_Event_Builder // It won't be regenerated in the future, so feel free to edit and/or fix -package flash.ui -{ +package flash.ui { - public final class MultitouchInputMode - { - // Specifies that TransformGestureEvent, PressAndTapGestureEvent, and GestureEvent events are dispatched for the related user interaction supported by the current environment, + public final class MultitouchInputMode { + // Specifies that TransformGestureEvent, PressAndTapGestureEvent, and GestureEvent events are dispatched for the related user interaction supported by the current environment, // and other touch events (such as a simple tap) are interpreted as mouse events. public static const GESTURE:String = "gesture"; diff --git a/core/src/avm2/globals/flash/utils.as b/core/src/avm2/globals/flash/utils.as index 93767b2c0a21..970cc1e106f6 100644 --- a/core/src/avm2/globals/flash/utils.as +++ b/core/src/avm2/globals/flash/utils.as @@ -5,7 +5,7 @@ package flash.utils { public native function getQualifiedSuperclassName(value:*):String; public native function getTimer():int; - public function describeType(value:*): XML { + public function describeType(value:*):XML { // TODO: Also set @alias on the resulting XML if (value === undefined) { // avmplus throws this error from the alias-lookup code, @@ -16,9 +16,9 @@ package flash.utils { return avmplus.describeType(value, avmplus.FLASH10_FLAGS); } - public native function setInterval(closure:Function, delay:Number, ... arguments):uint; + public native function setInterval(closure:Function, delay:Number, ...arguments):uint; public native function clearInterval(id:uint):void; - public native function setTimeout(closure:Function, delay:Number, ... arguments):uint; + public native function setTimeout(closure:Function, delay:Number, ...arguments):uint; public native function clearTimeout(id:uint):void; public native function escapeMultiByte(s:String):String; public native function unescapeMultiByte(s:String):String; diff --git a/core/src/avm2/globals/flash/utils/ByteArray.as b/core/src/avm2/globals/flash/utils/ByteArray.as index 8bbd262a1b1b..2c01363365ef 100644 --- a/core/src/avm2/globals/flash/utils/ByteArray.as +++ b/core/src/avm2/globals/flash/utils/ByteArray.as @@ -1,80 +1,80 @@ package flash.utils { - [Ruffle(InstanceAllocator)] - public class ByteArray implements IDataInput2, IDataOutput2 { - private static var _defaultObjectEncoding:uint = 3; - public static function get defaultObjectEncoding():uint { - return _defaultObjectEncoding; - } - - public static function set defaultObjectEncoding(encoding:uint):void { - _defaultObjectEncoding = encoding; - } - - public native function get bytesAvailable():uint; - - public native function get endian():String; - public native function set endian(value:String):void; - - public native function get length():uint; - public native function set length(value:uint):void; - - public native function get objectEncoding():uint; - public native function set objectEncoding(value:uint):void; - - public native function get position():uint; - public native function set position(value:uint):void; - - public function ByteArray() { - this.objectEncoding = _defaultObjectEncoding; - } - - public native function clear():void; - - public function deflate(): void { - this.compress("deflate"); - } - - public native function compress(algorithm: String = CompressionAlgorithm.ZLIB): void; - - public function inflate(): void { - this.uncompress("deflate"); - } - - public native function uncompress(algorithm: String = CompressionAlgorithm.ZLIB): void; - - public native function toString():String; - - public native function readBoolean():Boolean; - public native function readByte():int; - public native function readBytes(bytes:ByteArray, offset:uint = 0, length:uint = 0):void; - public native function readDouble():Number; - public native function readFloat():Number; - public native function readInt():int; - public native function readMultiByte(length:uint, charSet:String):String; - public native function readObject():*; - public native function readShort():int; - public native function readUnsignedByte():uint; - public native function readUnsignedInt():uint; - public native function readUnsignedShort():uint; - public native function readUTF():String; - public native function readUTFBytes(length:uint):String; - - public native function writeBoolean(value:Boolean):void; - public native function writeByte(value:int):void; - public native function writeBytes(bytes:ByteArray, offset:uint = 0, length:uint = 0):void; - public native function writeDouble(value:Number):void; - public native function writeFloat(value:Number):void; - public native function writeInt(value:int):void; - public native function writeMultiByte(value:String, charSet:String):void; - public native function writeShort(value:int):void; - public native function writeUnsignedInt(value:uint):void; - public native function writeUTF(value:String):void; - public native function writeUTFBytes(value:String):void; - public native function writeObject(object:*):void; - - prototype.toJSON = function(k:String):* { - return "ByteArray"; - } - prototype.setPropertyIsEnumerable("toJSON", false); - } + [Ruffle(InstanceAllocator)] + public class ByteArray implements IDataInput2, IDataOutput2 { + private static var _defaultObjectEncoding:uint = 3; + public static function get defaultObjectEncoding():uint { + return _defaultObjectEncoding; + } + + public static function set defaultObjectEncoding(encoding:uint):void { + _defaultObjectEncoding = encoding; + } + + public native function get bytesAvailable():uint; + + public native function get endian():String; + public native function set endian(value:String):void; + + public native function get length():uint; + public native function set length(value:uint):void; + + public native function get objectEncoding():uint; + public native function set objectEncoding(value:uint):void; + + public native function get position():uint; + public native function set position(value:uint):void; + + public function ByteArray() { + this.objectEncoding = _defaultObjectEncoding; + } + + public native function clear():void; + + public function deflate():void { + this.compress("deflate"); + } + + public native function compress(algorithm:String = CompressionAlgorithm.ZLIB):void; + + public function inflate():void { + this.uncompress("deflate"); + } + + public native function uncompress(algorithm:String = CompressionAlgorithm.ZLIB):void; + + public native function toString():String; + + public native function readBoolean():Boolean; + public native function readByte():int; + public native function readBytes(bytes:ByteArray, offset:uint = 0, length:uint = 0):void; + public native function readDouble():Number; + public native function readFloat():Number; + public native function readInt():int; + public native function readMultiByte(length:uint, charSet:String):String; + public native function readObject():*; + public native function readShort():int; + public native function readUnsignedByte():uint; + public native function readUnsignedInt():uint; + public native function readUnsignedShort():uint; + public native function readUTF():String; + public native function readUTFBytes(length:uint):String; + + public native function writeBoolean(value:Boolean):void; + public native function writeByte(value:int):void; + public native function writeBytes(bytes:ByteArray, offset:uint = 0, length:uint = 0):void; + public native function writeDouble(value:Number):void; + public native function writeFloat(value:Number):void; + public native function writeInt(value:int):void; + public native function writeMultiByte(value:String, charSet:String):void; + public native function writeShort(value:int):void; + public native function writeUnsignedInt(value:uint):void; + public native function writeUTF(value:String):void; + public native function writeUTFBytes(value:String):void; + public native function writeObject(object:*):void; + + prototype.toJSON = function(k:String):* { + return "ByteArray"; + }; + prototype.setPropertyIsEnumerable("toJSON", false); + } } diff --git a/core/src/avm2/globals/flash/utils/CompressionAlgorithm.as b/core/src/avm2/globals/flash/utils/CompressionAlgorithm.as index 3e81225dec70..db799834c04e 100644 --- a/core/src/avm2/globals/flash/utils/CompressionAlgorithm.as +++ b/core/src/avm2/globals/flash/utils/CompressionAlgorithm.as @@ -1,7 +1,7 @@ package flash.utils { public final class CompressionAlgorithm { - public static const ZLIB: String = "zlib"; - public static const DEFLATE: String = "deflate"; - public static const LZMA: String = "lzma"; + public static const ZLIB:String = "zlib"; + public static const DEFLATE:String = "deflate"; + public static const LZMA:String = "lzma"; } } diff --git a/core/src/avm2/globals/flash/utils/Dictionary.as b/core/src/avm2/globals/flash/utils/Dictionary.as index 299aca43746f..963cfe1a320a 100644 --- a/core/src/avm2/globals/flash/utils/Dictionary.as +++ b/core/src/avm2/globals/flash/utils/Dictionary.as @@ -1,14 +1,13 @@ package flash.utils { - import __ruffle__.stub_constructor; + import __ruffle__.stub_constructor; - [Ruffle(InstanceAllocator)] + [Ruffle(InstanceAllocator)] public dynamic class Dictionary { - public function Dictionary(weakKeys:Boolean = false) - { - if (weakKeys) { - stub_constructor("flash.utils.Dictionary", "with weak keys"); - } - } + public function Dictionary(weakKeys:Boolean = false) { + if (weakKeys) { + stub_constructor("flash.utils.Dictionary", "with weak keys"); + } + } } } diff --git a/core/src/avm2/globals/flash/utils/Endian.as b/core/src/avm2/globals/flash/utils/Endian.as index 29ca8b9be23b..5e54c6fbed4a 100644 --- a/core/src/avm2/globals/flash/utils/Endian.as +++ b/core/src/avm2/globals/flash/utils/Endian.as @@ -1,6 +1,6 @@ package flash.utils { public final class Endian { - public static const BIG_ENDIAN: String = "bigEndian"; - public static const LITTLE_ENDIAN: String = "littleEndian"; + public static const BIG_ENDIAN:String = "bigEndian"; + public static const LITTLE_ENDIAN:String = "littleEndian"; } } diff --git a/core/src/avm2/globals/flash/utils/Proxy.as b/core/src/avm2/globals/flash/utils/Proxy.as index e9bfcab415ca..9cbbcb421fad 100644 --- a/core/src/avm2/globals/flash/utils/Proxy.as +++ b/core/src/avm2/globals/flash/utils/Proxy.as @@ -7,59 +7,50 @@ package flash.utils { public class Proxy { [Ruffle(NativeCallable)] - flash_proxy function getProperty(name:*) : * - { + flash_proxy function getProperty(name:*):* { throw new IllegalOperationError("Error #2088: The Proxy class does not implement getProperty. It must be overridden by a subclass.", 2088); } [Ruffle(NativeCallable)] - flash_proxy function setProperty(name:*, value:*) : void - { + flash_proxy function setProperty(name:*, value:*):void { throw new IllegalOperationError("Error #2089: The Proxy class does not implement setProperty. It must be overridden by a subclass.", 2089); } [Ruffle(NativeCallable)] - flash_proxy function callProperty(name:*, ... rest) : * - { + flash_proxy function callProperty(name:*, ...rest):* { throw new IllegalOperationError("Error #2090: The Proxy class does not implement callProperty. It must be overridden by a subclass.", 2090); } [Ruffle(NativeCallable)] - flash_proxy function hasProperty(name:*) : Boolean - { + flash_proxy function hasProperty(name:*):Boolean { throw new IllegalOperationError("Error #2091: The Proxy class does not implement hasProperty. It must be overridden by a subclass.", 2091); } [Ruffle(NativeCallable)] - flash_proxy function deleteProperty(name:*) : Boolean - { + flash_proxy function deleteProperty(name:*):Boolean { throw new IllegalOperationError("Error #2092: The Proxy class does not implement deleteProperty. It must be overridden by a subclass.", 2092); } // TODO implement this - flash_proxy function getDescendants(name:*) : * - { + flash_proxy function getDescendants(name:*):* { throw new IllegalOperationError("Error #2093: The Proxy class does not implement getDescendants. It must be overridden by a subclass.", 2093); } [Ruffle(NativeCallable)] - flash_proxy function nextNameIndex(index:int) : int - { + flash_proxy function nextNameIndex(index:int):int { throw new IllegalOperationError("Error #2105: The Proxy class does not implement nextNameIndex. It must be overridden by a subclass.", 2105); } [Ruffle(NativeCallable)] - flash_proxy function nextName(index:int) : String - { + flash_proxy function nextName(index:int):String { throw new IllegalOperationError("Error #2106: The Proxy class does not implement nextName. It must be overridden by a subclass.", 2106); } [Ruffle(NativeCallable)] - flash_proxy function nextValue(index:int) : * - { + flash_proxy function nextValue(index:int):* { throw new IllegalOperationError("Error #2107: The Proxy class does not implement nextValue. It must be overridden by a subclass.", 2107); } - native flash_proxy function isAttribute(name:*) : Boolean; + native flash_proxy function isAttribute(name:*):Boolean; } } diff --git a/core/src/avm2/globals/flash/utils/Timer.as b/core/src/avm2/globals/flash/utils/Timer.as index 203c22126458..f97f5f8f049b 100644 --- a/core/src/avm2/globals/flash/utils/Timer.as +++ b/core/src/avm2/globals/flash/utils/Timer.as @@ -2,26 +2,26 @@ package flash.utils { import flash.events.EventDispatcher; import flash.events.TimerEvent; public class Timer extends EventDispatcher { - private var _currentCount: int; - private var _repeatCount: int; + private var _currentCount:int; + private var _repeatCount:int; [Ruffle(NativeAccessible)] - private var _delay: Number; + private var _delay:Number; [Ruffle(NativeAccessible)] - private var _timerId: int = -1; + private var _timerId:int = -1; // Returns 'true' if we should cancel the underlying Ruffle native timer [Ruffle(NativeAccessible)] private var _onUpdateClosure:Function; - private function checkDelay(delay:Number): void { + private function checkDelay(delay:Number):void { if (!isFinite(delay) || delay < 0) { throw new RangeError("Timer delay out of range", 2066); } } - public function Timer(delay:Number, repeatCount:int=0) { + public function Timer(delay:Number, repeatCount:int = 0) { this.checkDelay(delay); this._currentCount = 0; this._delay = delay; @@ -41,18 +41,18 @@ package flash.utils { return true; } return false; - } + }; } - public function get currentCount(): int { + public function get currentCount():int { return this._currentCount; } - public function get delay(): Number { + public function get delay():Number { return this._delay; } - public function set delay(value:Number): void { + public function set delay(value:Number):void { this.checkDelay(delay); this._delay = value; if (this.running) { @@ -62,18 +62,18 @@ package flash.utils { private native function updateDelay():void; - public function get repeatCount(): int { + public function get repeatCount():int { return this._repeatCount; } - public function set repeatCount(value:int): void { + public function set repeatCount(value:int):void { this._repeatCount = value; if (this._repeatCount != 0 && this._repeatCount <= this._currentCount) { this.stop(); } } - public function get running(): Boolean { + public function get running():Boolean { return this._timerId != -1; } diff --git a/core/src/avm2/globals/flash/xml/XMLDocument.as b/core/src/avm2/globals/flash/xml/XMLDocument.as index 35917dba2c36..2a16fa435859 100644 --- a/core/src/avm2/globals/flash/xml/XMLDocument.as +++ b/core/src/avm2/globals/flash/xml/XMLDocument.as @@ -1,98 +1,97 @@ -package flash.xml -{ +package flash.xml { -import flash.xml.XMLNode; -import flash.xml.XMLNodeType; + import flash.xml.XMLNode; + import flash.xml.XMLNodeType; - public class XMLDocument extends XMLNode { + public class XMLDocument extends XMLNode { - public var ignoreWhite: Boolean = false; + public var ignoreWhite:Boolean = false; - public function XMLDocument(input: String = null) { - super(XMLNodeType.ELEMENT_NODE, null); - if (input != null) { - parseXML(input); - } - } + public function XMLDocument(input:String = null) { + super(XMLNodeType.ELEMENT_NODE, null); + if (input != null) { + parseXML(input); + } + } - public function parseXML(input: String): void { - // This is something of a hack, but that's somewhat the nature of XMLDocument - // It accepts things like `... foo` which is FOUR children: - // `...` gets parsed as an element - // ` ` gets parsed as a text node - // `` gets parsed as a comment - // ` foo` is another text node - // To achieve this, just wrap it all together in a parent. + public function parseXML(input:String):void { + // This is something of a hack, but that's somewhat the nature of XMLDocument + // It accepts things like `... foo` which is FOUR children: + // `...` gets parsed as an element + // ` ` gets parsed as a text node + // `` gets parsed as a comment + // ` foo` is another text node + // To achieve this, just wrap it all together in a parent. - var oldSettings = XML.AS3::settings(); - var newSettings = XML.AS3::defaultSettings(); - newSettings.ignoreWhitespace = this.ignoreWhite; - XML.AS3::setSettings(newSettings); + var oldSettings = XML.AS3::settings(); + var newSettings = XML.AS3::defaultSettings(); + newSettings.ignoreWhitespace = this.ignoreWhite; + XML.AS3::setSettings(newSettings); - try { - clear(); - var root = new XML("" + input + ""); - for each (var child in root.children()) { - appendChild(_convertXmlNode(child)); + try { + clear(); + var root = new XML("" + input + ""); + for each (var child in root.children()) { + appendChild(_convertXmlNode(child)); + } + } + finally { + XML.AS3::setSettings(oldSettings); } - } finally { - XML.AS3::setSettings(oldSettings); - } - } + } - private function _convertXmlNode(original: XML): XMLNode { - var nodeType = _convertXmlNodeType(original.nodeKind()); - var nodeValue = nodeType == XMLNodeType.ELEMENT_NODE ? - _convertXmlName(original) : original.toString(); - var result = new XMLNode(nodeType, nodeValue); - for each (var originalChild in original.children()) { - result.appendChild(_convertXmlNode(originalChild)); - } + private function _convertXmlNode(original:XML):XMLNode { + var nodeType = _convertXmlNodeType(original.nodeKind()); + var nodeValue = nodeType == XMLNodeType.ELEMENT_NODE ? + _convertXmlName(original) : original.toString(); + var result = new XMLNode(nodeType, nodeValue); + for each (var originalChild in original.children()) { + result.appendChild(_convertXmlNode(originalChild)); + } - var attributes = {}; - for each (var attribute in original.attributes()) { - attributes[_convertXmlName(attribute)] = attribute.toString(); - } - for each (var ns in original.namespaceDeclarations()) { - var name = "xmlns"; - if (ns.prefix) { - name += ":" + ns.prefix; + var attributes = {}; + for each (var attribute in original.attributes()) { + attributes[_convertXmlName(attribute)] = attribute.toString(); + } + for each (var ns in original.namespaceDeclarations()) { + var name = "xmlns"; + if (ns.prefix) { + name += ":" + ns.prefix; + } + attributes[name] = ns.uri; } - attributes[name] = ns.uri; - } - result.attributes = attributes; - return result; - } + result.attributes = attributes; + return result; + } - private function _convertXmlName(node: XML): String { - var ns = node.namespace(); - if (ns.prefix) { - return ns.prefix + ":" + node.localName(); - } - return node.localName(); - } + private function _convertXmlName(node:XML):String { + var ns = node.namespace (); + if (ns.prefix) { + return ns.prefix + ":" + node.localName(); + } + return node.localName(); + } - private function _convertXmlNodeType(kind: String): uint { - if (kind == "text") { - return XMLNodeType.TEXT_NODE; - } - if (kind == "comment") { - return XMLNodeType.COMMENT_NODE; - } - if (kind == "element") { - return XMLNodeType.ELEMENT_NODE; - } - throw new Error("Invalid XML Node kind '" + kind + "' found whilst constructing (legacy) XMLDocument"); - } + private function _convertXmlNodeType(kind:String):uint { + if (kind == "text") { + return XMLNodeType.TEXT_NODE; + } + if (kind == "comment") { + return XMLNodeType.COMMENT_NODE; + } + if (kind == "element") { + return XMLNodeType.ELEMENT_NODE; + } + throw new Error("Invalid XML Node kind '" + kind + "' found whilst constructing (legacy) XMLDocument"); + } - public function createElement(name:String): XMLNode { - return new XMLNode(XMLNodeType.ELEMENT_NODE, name); - } + public function createElement(name:String):XMLNode { + return new XMLNode(XMLNodeType.ELEMENT_NODE, name); + } - public function createTextNode(text:String): XMLNode { - return new XMLNode(XMLNodeType.TEXT_NODE, text); - } - } + public function createTextNode(text:String):XMLNode { + return new XMLNode(XMLNodeType.TEXT_NODE, text); + } + } } - diff --git a/core/src/avm2/globals/flash/xml/XMLNode.as b/core/src/avm2/globals/flash/xml/XMLNode.as index ad22c482cc79..c8ad8d2cb7d0 100644 --- a/core/src/avm2/globals/flash/xml/XMLNode.as +++ b/core/src/avm2/globals/flash/xml/XMLNode.as @@ -1,5 +1,4 @@ -package flash.xml -{ +package flash.xml { import __ruffle__.stub_getter; import __ruffle__.stub_method; @@ -8,7 +7,7 @@ package flash.xml import flash.xml.XMLNodeType; public class XMLNode { - internal var _children: Array = []; + internal var _children:Array = []; public var nodeType:uint; @@ -27,7 +26,7 @@ package flash.xml public var previousSibling:XMLNode = null; public var nextSibling:XMLNode = null; - public function XMLNode(type: uint, input: String) { + public function XMLNode(type:uint, input:String) { nodeType = type; if (type == XMLNodeType.ELEMENT_NODE) { nodeName = input; @@ -36,17 +35,17 @@ package flash.xml } } - public function get childNodes(): Array { + public function get childNodes():Array { return _children; } - public function hasChildNodes(): Boolean { + public function hasChildNodes():Boolean { return _children.length > 0; } - public function cloneNode(deep: Boolean): XMLNode { + public function cloneNode(deep:Boolean):XMLNode { var clone = new XMLNode(nodeType, nodeType == XMLNodeType.ELEMENT_NODE - ? nodeName : nodeValue); + ? nodeName : nodeValue); for (var key in attributes) { clone.attributes[key] = attributes[key]; } @@ -60,7 +59,7 @@ package flash.xml return clone; } - public function removeNode(): void { + public function removeNode():void { if (parentNode) { if (parentNode.firstChild === this) { parentNode.firstChild = nextSibling; @@ -89,7 +88,7 @@ package flash.xml nextSibling = null; } - public function insertBefore(node: XMLNode, before: XMLNode = null): void { + public function insertBefore(node:XMLNode, before:XMLNode = null):void { if (before == null) { appendChild(node); return; @@ -116,7 +115,7 @@ package flash.xml node.parentNode = this; } - public function appendChild(node: XMLNode): void { + public function appendChild(node:XMLNode):void { if (node.parentNode === this) { return; } @@ -134,7 +133,7 @@ package flash.xml _children.push(node); } - public function getNamespaceForPrefix(prefix: String): String { + public function getNamespaceForPrefix(prefix:String):String { for (var attr in attributes) { if (attr.indexOf("xmlns:") != 0) { continue; @@ -151,7 +150,7 @@ package flash.xml return null; } - public function getPrefixForNamespace(ns: String): String { + public function getPrefixForNamespace(ns:String):String { for (var attr in attributes) { if (attr.indexOf("xmlns:") != 0) { continue; @@ -168,7 +167,7 @@ package flash.xml return null; } - public function get localName(): String { + public function get localName():String { if (nodeName == null) { return null; } @@ -180,7 +179,7 @@ package flash.xml } } - public function get prefix(): String { + public function get prefix():String { if (nodeName == null) { return null; } @@ -192,24 +191,25 @@ package flash.xml } } - public function get namespaceURI(): String { + public function get namespaceURI():String { if (prefix) { return getNamespaceForPrefix(prefix); } - var node: XMLNode = this; + var node:XMLNode = this; do { if (node.attributes.xmlns) { return node.attributes.xmlns; } node = node.parentNode; - } while (node); + } + while (node); return null; } - public function toString(): String { + public function toString():String { if (nodeType != XMLNodeType.ELEMENT_NODE) { return _escapeXML(nodeValue); } @@ -240,9 +240,9 @@ package flash.xml return result; } - private native static function _escapeXML(text: String): String; + private native static function _escapeXML(text:String):String; - internal function clear(): void { + internal function clear():void { _children = []; attributes = {}; @@ -257,4 +257,3 @@ package flash.xml } } } - diff --git a/core/src/avm2/globals/flash/xml/XMLNodeType.as b/core/src/avm2/globals/flash/xml/XMLNodeType.as index 702d23df95f9..aadf14ee7562 100644 --- a/core/src/avm2/globals/flash/xml/XMLNodeType.as +++ b/core/src/avm2/globals/flash/xml/XMLNodeType.as @@ -1,23 +1,20 @@ -package flash.xml -{ - public final class XMLNodeType - { - - public static const ELEMENT_NODE:uint = 1; - - public static const TEXT_NODE:uint = 3; - - // The rest of these are undocumented properties. - - public static const CDATA_NODE:uint = 4; - - public static const PROCESSING_INSTRUCTION_NODE:uint = 7; - - public static const COMMENT_NODE:uint = 8; - - public static const DOCUMENT_TYPE_NODE:uint = 10; - - public static const XML_DECLARATION:uint = 13; - } -} +package flash.xml { + public final class XMLNodeType { + + public static const ELEMENT_NODE:uint = 1; + + public static const TEXT_NODE:uint = 3; + + // The rest of these are undocumented properties. + + public static const CDATA_NODE:uint = 4; + public static const PROCESSING_INSTRUCTION_NODE:uint = 7; + + public static const COMMENT_NODE:uint = 8; + + public static const DOCUMENT_TYPE_NODE:uint = 10; + + public static const XML_DECLARATION:uint = 13; + } +} diff --git a/core/src/avm2/globals/globals.as b/core/src/avm2/globals/globals.as index 66a8a454c26a..c5a59f55c7f7 100644 --- a/core/src/avm2/globals/globals.as +++ b/core/src/avm2/globals/globals.as @@ -2,444 +2,444 @@ // need to come before subclasses and implementations. include "__ruffle__/dependent.as" -include "__ruffle__/stubs.as" - -include "Date.as" -include "Math.as" -include "RegExp.as" - -include "avmplus.as" - -include "flash/accessibility/Accessibility.as" -include "flash/accessibility/AccessibilityImplementation.as" -include "flash/accessibility/AccessibilityProperties.as" -include "flash/accessibility/ISearchableText.as" -include "flash/accessibility/ISimpleTextSelection.as" - -include "flash/concurrent/Condition.as" -include "flash/concurrent/Mutex.as" - -include "flash/crypto.as" - -include "flash/utils/IDataInput.as" -include "flash/utils/IDataOutput.as" -include "flash/utils/IDataInput2.as" -include "flash/utils/IDataOutput2.as" -include "flash/utils/IExternalizable.as" -include "flash/utils/ByteArray.as" -include "flash/utils/Dictionary.as" - -include "flash/events/IEventDispatcher.as" -include "flash/events/EventDispatcher.as" - -include "flash/desktop/ClipboardFormats.as" -include "flash/desktop/ClipboardTransferMode.as" -include "flash/desktop/Clipboard.as" -include "flash/desktop/IFilePromise.as" -include "flash/desktop/NativeProcess.as" -include "flash/desktop/NativeProcessStartupInfo.as" - -include "flash/desktop/Icon.as" -include "flash/desktop/InteractiveIcon.as" -include "flash/desktop/NativeApplication.as" - -include "flash/display/IBitmapDrawable.as" -include "flash/display/DisplayObject.as" -include "flash/display/Bitmap.as" -include "flash/display/BitmapData.as" -include "flash/display/Graphics.as" -include "flash/display/InteractiveObject.as" -include "flash/display/DisplayObjectContainer.as" -include "flash/display/LoaderInfo.as" -include "flash/display/Stage.as" - -include "flash/display/ActionScriptVersion.as" -include "flash/display/AVM1Movie.as" -include "flash/display/BitmapDataChannel.as" -include "flash/display/BitmapEncodingColorSpace.as" -include "flash/display/BlendMode.as" -include "flash/display/CapsStyle.as" -include "flash/display/ColorCorrection.as" -include "flash/display/ColorCorrectionSupport.as" -include "flash/display/FrameLabel.as" -include "flash/display/GradientType.as" -include "flash/display/IGraphicsStroke.as" -include "flash/display/IGraphicsFill.as" -include "flash/display/IGraphicsPath.as" -include "flash/display/IGraphicsData.as" -include "flash/display/GraphicsBitmapFill.as" -include "flash/display/GraphicsEndFill.as" -include "flash/display/GraphicsGradientFill.as" -include "flash/display/GraphicsPathCommand.as" -include "flash/display/GraphicsPathWinding.as" -include "flash/display/GraphicsPath.as" -include "flash/display/GraphicsTrianglePath.as" -include "flash/display/GraphicsShaderFill.as" -include "flash/display/GraphicsSolidFill.as" -include "flash/display/GraphicsStroke.as" -include "flash/display/InterpolationMethod.as" -include "flash/display/JointStyle.as" -include "flash/display/JPEGEncoderOptions.as" -include "flash/display/JPEGXREncoderOptions.as" -include "flash/display/Loader.as" -include "flash/display/LineScaleMode.as" -include "flash/display/MorphShape.as" -include "flash/display/NativeMenu.as" -include "flash/display/NativeMenuItem.as" -include "flash/display/NativeWindowDisplayState.as" -include "flash/display/NativeWindowSystemChrome.as" -include "flash/display/NativeWindowType.as" -include "flash/display/NativeWindowInitOptions.as" -include "flash/display/NativeWindow.as" -include "flash/display/PixelSnapping.as" -include "flash/display/PNGEncoderOptions.as" -include "flash/display/Scene.as" -include "flash/display/Shader.as" -include "flash/display/ShaderData.as" -include "flash/display/ShaderInput.as" -include "flash/display/ShaderJob.as" -include "flash/display/ShaderParameter.as" -include "flash/display/ShaderParameterType.as" -include "flash/display/ShaderPrecision.as" -include "flash/display/Shape.as" -include "flash/display/SimpleButton.as" -include "flash/display/SpreadMethod.as" -include "flash/display/Sprite.as" -include "flash/display/Stage3D.as" -include "flash/display/StageAlign.as" -include "flash/display/StageAspectRatio.as" -include "flash/display/StageDisplayState.as" -include "flash/display/StageOrientation.as" -include "flash/display/StageQuality.as" -include "flash/display/StageScaleMode.as" -include "flash/display/SWFVersion.as" -include "flash/display/TriangleCulling.as" - -include "flash/display/MovieClip.as" - -include "flash/display3D/Context3D.as" -include "flash/display3D/Context3DBlendFactor.as" -include "flash/display3D/Context3DBufferUsage.as" -include "flash/display3D/Context3DClearMask.as" -include "flash/display3D/Context3DCompareMode.as" -include "flash/display3D/Context3DMipFilter.as" -include "flash/display3D/Context3DProfile.as" -include "flash/display3D/Context3DProgramType.as" -include "flash/display3D/Context3DRenderMode.as" -include "flash/display3D/Context3DStencilAction.as" -include "flash/display3D/Context3DTextureFilter.as" -include "flash/display3D/Context3DTextureFormat.as" -include "flash/display3D/Context3DTriangleFace.as" -include "flash/display3D/Context3DVertexBufferFormat.as" -include "flash/display3D/Context3DWrapMode.as" -include "flash/display3D/IndexBuffer3D.as" -include "flash/display3D/Program3D.as" -include "flash/display3D/textures/TextureBase.as" -include "flash/display3D/textures/CubeTexture.as" -include "flash/display3D/textures/Texture.as" -include "flash/display3D/textures/RectangleTexture.as" -include "flash/display3D/VertexBuffer3D.as" - -include "flash/errors/IOError.as" // IOError is a superclass of EOFError -include "flash/errors/EOFError.as" -include "flash/errors/IllegalOperationError.as" -include "flash/errors/InvalidSWFError.as" -include "flash/errors/MemoryError.as" -include "flash/errors/ScriptTimeoutError.as" -include "flash/errors/StackOverflowError.as" - -// Event needs to come before its subclasses -include "flash/events/Event.as" -include "flash/events/TextEvent.as" -include "flash/events/ActivityEvent.as" -include "flash/events/ErrorEvent.as" -include "flash/events/GestureEvent.as" -include "flash/events/MouseEvent.as" -include "flash/events/AccelerometerEvent.as" -include "flash/events/AsyncErrorEvent.as" -include "flash/events/AudioOutputChangeEvent.as" -include "flash/events/AVDictionaryDataEvent.as" -include "flash/events/AVHTTPStatusEvent.as" -include "flash/events/AVPauseAtPeriodEndEvent.as" -include "flash/events/AVStatusEvent.as" -include "flash/events/ContextMenuEvent.as" -include "flash/events/DataEvent.as" -include "flash/events/DRMAuthenticationCompleteEvent.as" -include "flash/events/DRMAuthenticationErrorEvent.as" -include "flash/events/DRMLicenseRequestEvent.as" -include "flash/events/DRMReturnVoucherCompleteEvent.as" -include "flash/events/DRMReturnVoucherErrorEvent.as" -include "flash/events/EventPhase.as" -include "flash/events/FocusEvent.as" -include "flash/events/FullScreenEvent.as" -include "flash/events/GameInputEvent.as" -include "flash/events/GesturePhase.as" -include "flash/events/HTTPStatusEvent.as" -include "flash/events/IOErrorEvent.as" -include "flash/events/InvokeEvent.as" -include "flash/events/KeyboardEvent.as" -include "flash/events/NativeWindowBoundsEvent.as" -include "flash/events/NativeWindowDisplayStateEvent.as" -include "flash/events/NetDataEvent.as" -include "flash/events/NetFilterEvent.as" -include "flash/events/NetStatusEvent.as" -include "flash/events/PressAndTapGestureEvent.as" -include "flash/events/ProgressEvent.as" -include "flash/events/SampleDataEvent.as" -include "flash/events/SecurityErrorEvent.as" -include "flash/events/ShaderEvent.as" -include "flash/events/SoftKeyboardEvent.as" -include "flash/events/SoftKeyboardTrigger.as" -include "flash/events/StageVideoAvailabilityEvent.as" -include "flash/events/StageVideoEvent.as" -include "flash/events/StatusEvent.as" -include "flash/events/SyncEvent.as" -include "flash/events/ThrottleEvent.as" -include "flash/events/ThrottleType.as" -include "flash/events/TimerEvent.as" -include "flash/events/TouchEvent.as" -include "flash/events/TransformGestureEvent.as" -include "flash/events/UncaughtErrorEvent.as" -include "flash/events/UncaughtErrorEvents.as" -include "flash/events/VideoEvent.as" -include "flash/events/VideoTextureEvent.as" - -include "flash/external/ExternalInterface.as" - -include "flash/filters/BitmapFilter.as" -include "flash/filters/BitmapFilterQuality.as" -include "flash/filters/BitmapFilterType.as" -include "flash/filters/BevelFilter.as" -include "flash/filters/ConvolutionFilter.as" -include "flash/filters/GradientBevelFilter.as" -include "flash/filters/BlurFilter.as" -include "flash/filters/ColorMatrixFilter.as" -include "flash/filters/DisplacementMapFilter.as" -include "flash/filters/DisplacementMapFilterMode.as" -include "flash/filters/DropShadowFilter.as" -include "flash/filters/GlowFilter.as" -include "flash/filters/GradientGlowFilter.as" -include "flash/filters/ShaderFilter.as" - -include "flash/geom/ColorTransform.as" -include "flash/geom/Matrix.as" -include "flash/geom/Matrix3D.as" -include "flash/geom/Orientation3D.as" -include "flash/geom/PerspectiveProjection.as" -include "flash/geom/Point.as" -include "flash/geom/Rectangle.as" -include "flash/geom/Transform.as" -include "flash/geom/Utils3D.as" -include "flash/geom/Vector3D.as" - -include "flash/globalization/Collator.as" -include "flash/globalization/CollatorMode.as" -include "flash/globalization/CurrencyParseResult.as" -include "flash/globalization/CurrencyFormatter.as" -include "flash/globalization/DateTimeFormatter.as" -include "flash/globalization/DateTimeNameContext.as" -include "flash/globalization/DateTimeNameStyle.as" -include "flash/globalization/DateTimeStyle.as" -include "flash/globalization/LastOperationStatus.as" -include "flash/globalization/LocaleID.as" -include "flash/globalization/NationalDigitsType.as" -include "flash/globalization/NumberFormatter.as" -include "flash/globalization/NumberParseResult.as" -include "flash/globalization/StringTools.as" - -include "flash/media/AudioDecoder.as" -include "flash/media/AudioOutputChangeReason.as" -include "flash/media/AVCaptionStyle.as" -include "flash/media/AVNetworkingParams.as" -include "flash/media/AVResult.as" -include "flash/media/AVTagData.as" -include "flash/media/Camera.as" -include "flash/media/H264Level.as" -include "flash/media/H264Profile.as" -include "flash/media/Microphone.as" -include "flash/media/MicrophoneEnhancedMode.as" -include "flash/media/MicrophoneEnhancedOptions.as" -include "flash/media/ID3Info.as" -include "flash/media/Sound.as" -include "flash/media/SoundCodec.as" -include "flash/media/SoundChannel.as" -include "flash/media/SoundLoaderContext.as" -include "flash/media/SoundMixer.as" -include "flash/media/SoundTransform.as" -include "flash/media/StageVideoAvailability.as" -include "flash/media/StageVideoAvailabilityReason.as" -include "flash/media/Video.as" -include "flash/media/VideoCodec.as" -include "flash/media/VideoStatus.as" -include "flash/media/VideoStreamSettings.as" - -include "flash/net.as" -include "flash/net/DatagramSocket.as" -include "flash/net/FileFilter.as" -include "flash/net/FileReference.as" -include "flash/net/FileReferenceList.as" -include "flash/net/IDynamicPropertyOutput.as" -include "flash/net/IDynamicPropertyWriter.as" -include "flash/net/LocalConnection.as" -include "flash/net/NetConnection.as" -include "flash/net/NetGroup.as" -include "flash/net/NetGroupReceiveMode.as" -include "flash/net/NetGroupReplicationStrategy.as" -include "flash/net/NetGroupSendMode.as" -include "flash/net/NetGroupSendResult.as" -include "flash/net/NetStream.as" -include "flash/net/NetStreamAppendBytesAction.as" -include "flash/net/NetStreamInfo.as" -include "flash/net/NetStreamMulticastInfo.as" -include "flash/net/NetStreamPlayOptions.as" -include "flash/net/NetStreamPlayTransitions.as" -include "flash/net/URLRequestDefaults.as" -include "flash/net/ObjectEncoding.as" -include "flash/net/Responder.as" -include "flash/net/SharedObject.as" -include "flash/net/SharedObjectFlushStatus.as" -include "flash/net/Socket.as" -include "flash/net/URLLoader.as" -include "flash/net/URLLoaderDataFormat.as" -include "flash/net/URLRequest.as" -include "flash/net/URLRequestHeader.as" -include "flash/net/URLRequestMethod.as" -include "flash/net/URLStream.as" -include "flash/net/URLVariables.as" -include "flash/net/XMLSocket.as" - -include "flash/filesystem/File.as" // File extends FileReference - -include "flash/net/drm/AuthenticationMethod.as" -include "flash/net/drm/LoadVoucherSetting.as" - -include "flash/printing/PrintJob.as" -include "flash/printing/PrintJobOptions.as" -include "flash/printing/PrintJobOrientation.as" - -include "flash/profiler.as" -include "flash/profiler/Telemetry.as" - -include "flash/sampler.as" -include "flash/sampler/Sample.as" -include "flash/sampler/DeleteObjectSample.as" // DeleteObjectSample and NewObjectSample extend Sample -include "flash/sampler/NewObjectSample.as" -include "flash/sampler/StackFrame.as" - -include "flash/security/CertificateStatus.as" -include "flash/security/X509Certificate.as" -include "flash/security/X500DistinguishedName.as" - -include "flash/sensors/Accelerometer.as" -include "flash/sensors/Geolocation.as" - -include "flash/system.as" -include "flash/system/ApplicationDomain.as" -include "flash/system/Capabilities.as" -include "flash/system/IME.as" -include "flash/system/IMEConversionMode.as" -include "flash/system/ImageDecodingPolicy.as" -include "flash/system/LoaderContext.as" -include "flash/system/JPEGLoaderContext.as" -include "flash/system/MessageChannel.as" -include "flash/system/MessageChannelState.as" -include "flash/system/Security.as" -include "flash/system/SecurityDomain.as" -include "flash/system/SecurityPanel.as" -include "flash/system/System.as" -include "flash/system/SystemUpdaterType.as" -include "flash/system/TouchscreenType.as" -include "flash/system/Worker.as" -include "flash/system/WorkerDomain.as" -include "flash/system/WorkerState.as" - -include "flash/text/AntiAliasType.as" -include "flash/text/CSMSettings.as" -include "flash/text/Font.as" -include "flash/text/FontStyle.as" -include "flash/text/FontType.as" -include "flash/text/GridFitType.as" -include "flash/text/StaticText.as" -include "flash/text/StyleSheet.as" -include "flash/text/TextColorType.as" -include "flash/text/TextDisplayMode.as" -include "flash/text/TextExtent.as" -include "flash/text/TextField.as" -include "flash/text/TextFieldAutoSize.as" -include "flash/text/TextFieldType.as" -include "flash/text/TextFormat.as" -include "flash/text/TextFormatAlign.as" -include "flash/text/TextFormatDisplay.as" -include "flash/text/TextInteractionMode.as" -include "flash/text/TextLineMetrics.as" -include "flash/text/TextRenderer.as" -include "flash/text/TextRun.as" -include "flash/text/TextSnapshot.as" - -include "flash/text/engine/BreakOpportunity.as" -include "flash/text/engine/CFFHinting.as" -include "flash/text/engine/ContentElement.as" -include "flash/text/engine/DigitCase.as" -include "flash/text/engine/DigitWidth.as" -include "flash/text/engine/ElementFormat.as" -include "flash/text/engine/FontDescription.as" -include "flash/text/engine/FontLookup.as" -include "flash/text/engine/FontMetrics.as" -include "flash/text/engine/FontPosture.as" -include "flash/text/engine/FontWeight.as" -include "flash/text/engine/GraphicElement.as" -include "flash/text/engine/GroupElement.as" -include "flash/text/engine/JustificationStyle.as" -include "flash/text/engine/Kerning.as" -include "flash/text/engine/LigatureLevel.as" -include "flash/text/engine/LineJustification.as" -include "flash/text/engine/RenderingMode.as" - -include "flash/text/engine/TextJustifier.as" // TextJustifier needs to come before SpaceJustifier and EastAsianJustifier since the latter two extend the first -include "flash/text/engine/EastAsianJustifier.as" -include "flash/text/engine/SpaceJustifier.as" - -include "flash/text/engine/TabAlignment.as" -include "flash/text/engine/TabStop.as" -include "flash/text/engine/TextBaseline.as" -include "flash/text/engine/TextBlock.as" -include "flash/text/engine/TextElement.as" -include "flash/text/engine/TextLine.as" -include "flash/text/engine/TextLineCreationResult.as" -include "flash/text/engine/TextLineMirrorRegion.as" -include "flash/text/engine/TextLineValidity.as" -include "flash/text/engine/TextRotation.as" -include "flash/text/engine/TypographicCase.as" - -include "flash/text/ime/CompositionAttributeRange.as" -include "flash/text/ime/IIMEClient.as" - -include "flash/trace/Trace.as" - -include "flash/ui/ContextMenu.as" -include "flash/ui/ContextMenuBuiltInItems.as" -include "flash/ui/ContextMenuClipboardItems.as" -include "flash/ui/ContextMenuItem.as" -include "flash/ui/GameInput.as" -include "flash/ui/GameInputControl.as" -include "flash/ui/GameInputDevice.as" -include "flash/ui/Keyboard.as" -include "flash/ui/KeyboardType.as" -include "flash/ui/KeyLocation.as" -include "flash/ui/Mouse.as" -include "flash/ui/MouseCursor.as" -include "flash/ui/MouseCursorData.as" -// `MultitouchInputMode` needs to come before `Multitouch`, since `Multitouch` uses constants from -// `MultitouchInputMode`. -include "flash/ui/MultitouchInputMode.as" -include "flash/ui/Multitouch.as" - -include "flash/utils.as" -include "flash/utils/Proxy.as" -include "flash/utils/CompressionAlgorithm.as" -include "flash/utils/Endian.as" -include "flash/utils/Timer.as" - -include "flash/xml/XMLNodeType.as" -include "flash/xml/XMLNode.as" // XMLDocument extends XMLNode, so XMLNode needs to come before it. -include "flash/xml/XMLDocument.as" + include "__ruffle__/stubs.as" + + include "Date.as" + include "Math.as" + include "RegExp.as" + + include "avmplus.as" + + include "flash/accessibility/Accessibility.as" + include "flash/accessibility/AccessibilityImplementation.as" + include "flash/accessibility/AccessibilityProperties.as" + include "flash/accessibility/ISearchableText.as" + include "flash/accessibility/ISimpleTextSelection.as" + + include "flash/concurrent/Condition.as" + include "flash/concurrent/Mutex.as" + + include "flash/crypto.as" + + include "flash/utils/IDataInput.as" + include "flash/utils/IDataOutput.as" + include "flash/utils/IDataInput2.as" + include "flash/utils/IDataOutput2.as" + include "flash/utils/IExternalizable.as" + include "flash/utils/ByteArray.as" + include "flash/utils/Dictionary.as" + + include "flash/events/IEventDispatcher.as" + include "flash/events/EventDispatcher.as" + + include "flash/desktop/ClipboardFormats.as" + include "flash/desktop/ClipboardTransferMode.as" + include "flash/desktop/Clipboard.as" + include "flash/desktop/IFilePromise.as" + include "flash/desktop/NativeProcess.as" + include "flash/desktop/NativeProcessStartupInfo.as" + + include "flash/desktop/Icon.as" + include "flash/desktop/InteractiveIcon.as" + include "flash/desktop/NativeApplication.as" + + include "flash/display/IBitmapDrawable.as" + include "flash/display/DisplayObject.as" + include "flash/display/Bitmap.as" + include "flash/display/BitmapData.as" + include "flash/display/Graphics.as" + include "flash/display/InteractiveObject.as" + include "flash/display/DisplayObjectContainer.as" + include "flash/display/LoaderInfo.as" + include "flash/display/Stage.as" + + include "flash/display/ActionScriptVersion.as" + include "flash/display/AVM1Movie.as" + include "flash/display/BitmapDataChannel.as" + include "flash/display/BitmapEncodingColorSpace.as" + include "flash/display/BlendMode.as" + include "flash/display/CapsStyle.as" + include "flash/display/ColorCorrection.as" + include "flash/display/ColorCorrectionSupport.as" + include "flash/display/FrameLabel.as" + include "flash/display/GradientType.as" + include "flash/display/IGraphicsStroke.as" + include "flash/display/IGraphicsFill.as" + include "flash/display/IGraphicsPath.as" + include "flash/display/IGraphicsData.as" + include "flash/display/GraphicsBitmapFill.as" + include "flash/display/GraphicsEndFill.as" + include "flash/display/GraphicsGradientFill.as" + include "flash/display/GraphicsPathCommand.as" + include "flash/display/GraphicsPathWinding.as" + include "flash/display/GraphicsPath.as" + include "flash/display/GraphicsTrianglePath.as" + include "flash/display/GraphicsShaderFill.as" + include "flash/display/GraphicsSolidFill.as" + include "flash/display/GraphicsStroke.as" + include "flash/display/InterpolationMethod.as" + include "flash/display/JointStyle.as" + include "flash/display/JPEGEncoderOptions.as" + include "flash/display/JPEGXREncoderOptions.as" + include "flash/display/Loader.as" + include "flash/display/LineScaleMode.as" + include "flash/display/MorphShape.as" + include "flash/display/NativeMenu.as" + include "flash/display/NativeMenuItem.as" + include "flash/display/NativeWindowDisplayState.as" + include "flash/display/NativeWindowSystemChrome.as" + include "flash/display/NativeWindowType.as" + include "flash/display/NativeWindowInitOptions.as" + include "flash/display/NativeWindow.as" + include "flash/display/PixelSnapping.as" + include "flash/display/PNGEncoderOptions.as" + include "flash/display/Scene.as" + include "flash/display/Shader.as" + include "flash/display/ShaderData.as" + include "flash/display/ShaderInput.as" + include "flash/display/ShaderJob.as" + include "flash/display/ShaderParameter.as" + include "flash/display/ShaderParameterType.as" + include "flash/display/ShaderPrecision.as" + include "flash/display/Shape.as" + include "flash/display/SimpleButton.as" + include "flash/display/SpreadMethod.as" + include "flash/display/Sprite.as" + include "flash/display/Stage3D.as" + include "flash/display/StageAlign.as" + include "flash/display/StageAspectRatio.as" + include "flash/display/StageDisplayState.as" + include "flash/display/StageOrientation.as" + include "flash/display/StageQuality.as" + include "flash/display/StageScaleMode.as" + include "flash/display/SWFVersion.as" + include "flash/display/TriangleCulling.as" + + include "flash/display/MovieClip.as" + + include "flash/display3D/Context3D.as" + include "flash/display3D/Context3DBlendFactor.as" + include "flash/display3D/Context3DBufferUsage.as" + include "flash/display3D/Context3DClearMask.as" + include "flash/display3D/Context3DCompareMode.as" + include "flash/display3D/Context3DMipFilter.as" + include "flash/display3D/Context3DProfile.as" + include "flash/display3D/Context3DProgramType.as" + include "flash/display3D/Context3DRenderMode.as" + include "flash/display3D/Context3DStencilAction.as" + include "flash/display3D/Context3DTextureFilter.as" + include "flash/display3D/Context3DTextureFormat.as" + include "flash/display3D/Context3DTriangleFace.as" + include "flash/display3D/Context3DVertexBufferFormat.as" + include "flash/display3D/Context3DWrapMode.as" + include "flash/display3D/IndexBuffer3D.as" + include "flash/display3D/Program3D.as" + include "flash/display3D/textures/TextureBase.as" + include "flash/display3D/textures/CubeTexture.as" + include "flash/display3D/textures/Texture.as" + include "flash/display3D/textures/RectangleTexture.as" + include "flash/display3D/VertexBuffer3D.as" + + include "flash/errors/IOError.as" // IOError is a superclass of EOFError + include "flash/errors/EOFError.as" + include "flash/errors/IllegalOperationError.as" + include "flash/errors/InvalidSWFError.as" + include "flash/errors/MemoryError.as" + include "flash/errors/ScriptTimeoutError.as" + include "flash/errors/StackOverflowError.as" + + // Event needs to come before its subclasses + include "flash/events/Event.as" + include "flash/events/TextEvent.as" + include "flash/events/ActivityEvent.as" + include "flash/events/ErrorEvent.as" + include "flash/events/GestureEvent.as" + include "flash/events/MouseEvent.as" + include "flash/events/AccelerometerEvent.as" + include "flash/events/AsyncErrorEvent.as" + include "flash/events/AudioOutputChangeEvent.as" + include "flash/events/AVDictionaryDataEvent.as" + include "flash/events/AVHTTPStatusEvent.as" + include "flash/events/AVPauseAtPeriodEndEvent.as" + include "flash/events/AVStatusEvent.as" + include "flash/events/ContextMenuEvent.as" + include "flash/events/DataEvent.as" + include "flash/events/DRMAuthenticationCompleteEvent.as" + include "flash/events/DRMAuthenticationErrorEvent.as" + include "flash/events/DRMLicenseRequestEvent.as" + include "flash/events/DRMReturnVoucherCompleteEvent.as" + include "flash/events/DRMReturnVoucherErrorEvent.as" + include "flash/events/EventPhase.as" + include "flash/events/FocusEvent.as" + include "flash/events/FullScreenEvent.as" + include "flash/events/GameInputEvent.as" + include "flash/events/GesturePhase.as" + include "flash/events/HTTPStatusEvent.as" + include "flash/events/IOErrorEvent.as" + include "flash/events/InvokeEvent.as" + include "flash/events/KeyboardEvent.as" + include "flash/events/NativeWindowBoundsEvent.as" + include "flash/events/NativeWindowDisplayStateEvent.as" + include "flash/events/NetDataEvent.as" + include "flash/events/NetFilterEvent.as" + include "flash/events/NetStatusEvent.as" + include "flash/events/PressAndTapGestureEvent.as" + include "flash/events/ProgressEvent.as" + include "flash/events/SampleDataEvent.as" + include "flash/events/SecurityErrorEvent.as" + include "flash/events/ShaderEvent.as" + include "flash/events/SoftKeyboardEvent.as" + include "flash/events/SoftKeyboardTrigger.as" + include "flash/events/StageVideoAvailabilityEvent.as" + include "flash/events/StageVideoEvent.as" + include "flash/events/StatusEvent.as" + include "flash/events/SyncEvent.as" + include "flash/events/ThrottleEvent.as" + include "flash/events/ThrottleType.as" + include "flash/events/TimerEvent.as" + include "flash/events/TouchEvent.as" + include "flash/events/TransformGestureEvent.as" + include "flash/events/UncaughtErrorEvent.as" + include "flash/events/UncaughtErrorEvents.as" + include "flash/events/VideoEvent.as" + include "flash/events/VideoTextureEvent.as" + + include "flash/external/ExternalInterface.as" + + include "flash/filters/BitmapFilter.as" + include "flash/filters/BitmapFilterQuality.as" + include "flash/filters/BitmapFilterType.as" + include "flash/filters/BevelFilter.as" + include "flash/filters/ConvolutionFilter.as" + include "flash/filters/GradientBevelFilter.as" + include "flash/filters/BlurFilter.as" + include "flash/filters/ColorMatrixFilter.as" + include "flash/filters/DisplacementMapFilter.as" + include "flash/filters/DisplacementMapFilterMode.as" + include "flash/filters/DropShadowFilter.as" + include "flash/filters/GlowFilter.as" + include "flash/filters/GradientGlowFilter.as" + include "flash/filters/ShaderFilter.as" + + include "flash/geom/ColorTransform.as" + include "flash/geom/Matrix.as" + include "flash/geom/Matrix3D.as" + include "flash/geom/Orientation3D.as" + include "flash/geom/PerspectiveProjection.as" + include "flash/geom/Point.as" + include "flash/geom/Rectangle.as" + include "flash/geom/Transform.as" + include "flash/geom/Utils3D.as" + include "flash/geom/Vector3D.as" + + include "flash/globalization/Collator.as" + include "flash/globalization/CollatorMode.as" + include "flash/globalization/CurrencyParseResult.as" + include "flash/globalization/CurrencyFormatter.as" + include "flash/globalization/DateTimeFormatter.as" + include "flash/globalization/DateTimeNameContext.as" + include "flash/globalization/DateTimeNameStyle.as" + include "flash/globalization/DateTimeStyle.as" + include "flash/globalization/LastOperationStatus.as" + include "flash/globalization/LocaleID.as" + include "flash/globalization/NationalDigitsType.as" + include "flash/globalization/NumberFormatter.as" + include "flash/globalization/NumberParseResult.as" + include "flash/globalization/StringTools.as" + + include "flash/media/AudioDecoder.as" + include "flash/media/AudioOutputChangeReason.as" + include "flash/media/AVCaptionStyle.as" + include "flash/media/AVNetworkingParams.as" + include "flash/media/AVResult.as" + include "flash/media/AVTagData.as" + include "flash/media/Camera.as" + include "flash/media/H264Level.as" + include "flash/media/H264Profile.as" + include "flash/media/Microphone.as" + include "flash/media/MicrophoneEnhancedMode.as" + include "flash/media/MicrophoneEnhancedOptions.as" + include "flash/media/ID3Info.as" + include "flash/media/Sound.as" + include "flash/media/SoundCodec.as" + include "flash/media/SoundChannel.as" + include "flash/media/SoundLoaderContext.as" + include "flash/media/SoundMixer.as" + include "flash/media/SoundTransform.as" + include "flash/media/StageVideoAvailability.as" + include "flash/media/StageVideoAvailabilityReason.as" + include "flash/media/Video.as" + include "flash/media/VideoCodec.as" + include "flash/media/VideoStatus.as" + include "flash/media/VideoStreamSettings.as" + + include "flash/net.as" + include "flash/net/DatagramSocket.as" + include "flash/net/FileFilter.as" + include "flash/net/FileReference.as" + include "flash/net/FileReferenceList.as" + include "flash/net/IDynamicPropertyOutput.as" + include "flash/net/IDynamicPropertyWriter.as" + include "flash/net/LocalConnection.as" + include "flash/net/NetConnection.as" + include "flash/net/NetGroup.as" + include "flash/net/NetGroupReceiveMode.as" + include "flash/net/NetGroupReplicationStrategy.as" + include "flash/net/NetGroupSendMode.as" + include "flash/net/NetGroupSendResult.as" + include "flash/net/NetStream.as" + include "flash/net/NetStreamAppendBytesAction.as" + include "flash/net/NetStreamInfo.as" + include "flash/net/NetStreamMulticastInfo.as" + include "flash/net/NetStreamPlayOptions.as" + include "flash/net/NetStreamPlayTransitions.as" + include "flash/net/URLRequestDefaults.as" + include "flash/net/ObjectEncoding.as" + include "flash/net/Responder.as" + include "flash/net/SharedObject.as" + include "flash/net/SharedObjectFlushStatus.as" + include "flash/net/Socket.as" + include "flash/net/URLLoader.as" + include "flash/net/URLLoaderDataFormat.as" + include "flash/net/URLRequest.as" + include "flash/net/URLRequestHeader.as" + include "flash/net/URLRequestMethod.as" + include "flash/net/URLStream.as" + include "flash/net/URLVariables.as" + include "flash/net/XMLSocket.as" + + include "flash/filesystem/File.as" // File extends FileReference + + include "flash/net/drm/AuthenticationMethod.as" + include "flash/net/drm/LoadVoucherSetting.as" + + include "flash/printing/PrintJob.as" + include "flash/printing/PrintJobOptions.as" + include "flash/printing/PrintJobOrientation.as" + + include "flash/profiler.as" + include "flash/profiler/Telemetry.as" + + include "flash/sampler.as" + include "flash/sampler/Sample.as" + include "flash/sampler/DeleteObjectSample.as" // DeleteObjectSample and NewObjectSample extend Sample + include "flash/sampler/NewObjectSample.as" + include "flash/sampler/StackFrame.as" + + include "flash/security/CertificateStatus.as" + include "flash/security/X509Certificate.as" + include "flash/security/X500DistinguishedName.as" + + include "flash/sensors/Accelerometer.as" + include "flash/sensors/Geolocation.as" + + include "flash/system.as" + include "flash/system/ApplicationDomain.as" + include "flash/system/Capabilities.as" + include "flash/system/IME.as" + include "flash/system/IMEConversionMode.as" + include "flash/system/ImageDecodingPolicy.as" + include "flash/system/LoaderContext.as" + include "flash/system/JPEGLoaderContext.as" + include "flash/system/MessageChannel.as" + include "flash/system/MessageChannelState.as" + include "flash/system/Security.as" + include "flash/system/SecurityDomain.as" + include "flash/system/SecurityPanel.as" + include "flash/system/System.as" + include "flash/system/SystemUpdaterType.as" + include "flash/system/TouchscreenType.as" + include "flash/system/Worker.as" + include "flash/system/WorkerDomain.as" + include "flash/system/WorkerState.as" + + include "flash/text/AntiAliasType.as" + include "flash/text/CSMSettings.as" + include "flash/text/Font.as" + include "flash/text/FontStyle.as" + include "flash/text/FontType.as" + include "flash/text/GridFitType.as" + include "flash/text/StaticText.as" + include "flash/text/StyleSheet.as" + include "flash/text/TextColorType.as" + include "flash/text/TextDisplayMode.as" + include "flash/text/TextExtent.as" + include "flash/text/TextField.as" + include "flash/text/TextFieldAutoSize.as" + include "flash/text/TextFieldType.as" + include "flash/text/TextFormat.as" + include "flash/text/TextFormatAlign.as" + include "flash/text/TextFormatDisplay.as" + include "flash/text/TextInteractionMode.as" + include "flash/text/TextLineMetrics.as" + include "flash/text/TextRenderer.as" + include "flash/text/TextRun.as" + include "flash/text/TextSnapshot.as" + + include "flash/text/engine/BreakOpportunity.as" + include "flash/text/engine/CFFHinting.as" + include "flash/text/engine/ContentElement.as" + include "flash/text/engine/DigitCase.as" + include "flash/text/engine/DigitWidth.as" + include "flash/text/engine/ElementFormat.as" + include "flash/text/engine/FontDescription.as" + include "flash/text/engine/FontLookup.as" + include "flash/text/engine/FontMetrics.as" + include "flash/text/engine/FontPosture.as" + include "flash/text/engine/FontWeight.as" + include "flash/text/engine/GraphicElement.as" + include "flash/text/engine/GroupElement.as" + include "flash/text/engine/JustificationStyle.as" + include "flash/text/engine/Kerning.as" + include "flash/text/engine/LigatureLevel.as" + include "flash/text/engine/LineJustification.as" + include "flash/text/engine/RenderingMode.as" + + include "flash/text/engine/TextJustifier.as" // TextJustifier needs to come before SpaceJustifier and EastAsianJustifier since the latter two extend the first + include "flash/text/engine/EastAsianJustifier.as" + include "flash/text/engine/SpaceJustifier.as" + + include "flash/text/engine/TabAlignment.as" + include "flash/text/engine/TabStop.as" + include "flash/text/engine/TextBaseline.as" + include "flash/text/engine/TextBlock.as" + include "flash/text/engine/TextElement.as" + include "flash/text/engine/TextLine.as" + include "flash/text/engine/TextLineCreationResult.as" + include "flash/text/engine/TextLineMirrorRegion.as" + include "flash/text/engine/TextLineValidity.as" + include "flash/text/engine/TextRotation.as" + include "flash/text/engine/TypographicCase.as" + + include "flash/text/ime/CompositionAttributeRange.as" + include "flash/text/ime/IIMEClient.as" + + include "flash/trace/Trace.as" + + include "flash/ui/ContextMenu.as" + include "flash/ui/ContextMenuBuiltInItems.as" + include "flash/ui/ContextMenuClipboardItems.as" + include "flash/ui/ContextMenuItem.as" + include "flash/ui/GameInput.as" + include "flash/ui/GameInputControl.as" + include "flash/ui/GameInputDevice.as" + include "flash/ui/Keyboard.as" + include "flash/ui/KeyboardType.as" + include "flash/ui/KeyLocation.as" + include "flash/ui/Mouse.as" + include "flash/ui/MouseCursor.as" + include "flash/ui/MouseCursorData.as" + // `MultitouchInputMode` needs to come before `Multitouch`, since `Multitouch` uses constants from + // `MultitouchInputMode`. + include "flash/ui/MultitouchInputMode.as" + include "flash/ui/Multitouch.as" + + include "flash/utils.as" + include "flash/utils/Proxy.as" + include "flash/utils/CompressionAlgorithm.as" + include "flash/utils/Endian.as" + include "flash/utils/Timer.as" + + include "flash/xml/XMLNodeType.as" + include "flash/xml/XMLNode.as" // XMLDocument extends XMLNode, so XMLNode needs to come before it. + include "flash/xml/XMLDocument.as" diff --git a/core/src/avm2/globals/int.as b/core/src/avm2/globals/int.as index 80672c887e18..e9f671dc2f10 100644 --- a/core/src/avm2/globals/int.as +++ b/core/src/avm2/globals/int.as @@ -85,4 +85,3 @@ package { public static const length:int = 1; } } - diff --git a/core/src/avm2/globals/uint.as b/core/src/avm2/globals/uint.as index 98a22f65fcec..73c9fdb3e33c 100644 --- a/core/src/avm2/globals/uint.as +++ b/core/src/avm2/globals/uint.as @@ -85,4 +85,3 @@ package { public static const length:int = 1; } } -