Skip to content

Commit 6575393

Browse files
committed
avm2: Reformat & add API versioning to flash.globalization classes
This patch adds API versioning and removes Adobe docs.
1 parent 656f8f1 commit 6575393

File tree

10 files changed

+27
-201
lines changed

10 files changed

+27
-201
lines changed
Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,7 @@
1-
// The initial version of this file was autogenerated from the official AS3 reference at
2-
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/globalization/CollatorMode.html
3-
// by https://github.com/golfinq/ActionScript_Event_Builder
4-
// It won't be regenerated in the future, so feel free to edit and/or fix
5-
6-
package flash.globalization
7-
{
8-
9-
public final class CollatorMode
10-
{
11-
// Initializes a Collator object so that the compare method is optimized for determining whether two strings are equivalent.
1+
package flash.globalization {
2+
[API("667")]
3+
public final class CollatorMode {
124
public static const MATCHING:String = "matching";
13-
14-
// Initializes a Collator object so that the compare method is optimized for sorting a list of text strings to be displayed to an end user.
155
public static const SORTING:String = "sorting";
16-
176
}
187
}

core/src/avm2/globals/flash/globalization/CurrencyParseResult.as

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,19 @@
1-
// The initial version of this file was autogenerated from the official AS3 reference at
2-
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/globalization/CurrencyParseResult.html
3-
// by https://github.com/golfinq/ActionScript_Event_Builder
4-
// It won't be regenerated in the future, so feel free to edit and/or fix
1+
package flash.globalization {
2+
[API("667")]
3+
public final class CurrencyParseResult {
4+
private var _value:Number;
5+
private var _currencyString:String;
56

6-
package flash.globalization
7-
{
8-
public final class CurrencyParseResult
9-
{
10-
// The currency amount value that was extracted from the input string.
11-
private var _value: Number;
12-
13-
// The portion of the input string that corresponds to the currency symbol or currency string.
14-
private var _currencyString: String;
15-
16-
public function CurrencyParseResult(value:Number = NaN, symbol:String = "")
17-
{
7+
public function CurrencyParseResult(value:Number = NaN, symbol:String = "") {
188
this._value = value;
199
this._currencyString = symbol;
2010
}
2111

22-
public function get value() : Number
23-
{
12+
public function get value():Number {
2413
return this._value;
2514
}
2615

27-
public function get currencyString() : String
28-
{
16+
public function get currencyString():String {
2917
return this._currencyString;
3018
}
3119
}

core/src/avm2/globals/flash/globalization/DateTimeFormatter.as

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ package flash.globalization {
22
import __ruffle__.stub_constructor;
33
import __ruffle__.stub_getter;
44
import __ruffle__.stub_method;
5-
import flash.globalization.LastOperationStatus;
65

6+
[API("667")]
77
public final class DateTimeFormatter {
88
private var _dateStyle:String;
99
private var _dateTimePattern:String;
@@ -98,4 +98,4 @@ package flash.globalization {
9898
this._timeStyle = timeStyle;
9999
}
100100
}
101-
}
101+
}
Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,7 @@
1-
// The initial version of this file was autogenerated from the official AS3 reference at
2-
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/globalization/DateTimeNameContext.html
3-
// by https://github.com/golfinq/ActionScript_Event_Builder
4-
// It won't be regenerated in the future, so feel free to edit and/or fix
5-
6-
package flash.globalization
7-
{
8-
9-
public final class DateTimeNameContext
10-
{
11-
// Indicates that the date element name is used within a date format.
1+
package flash.globalization {
2+
[API("667")]
3+
public final class DateTimeNameContext {
124
public static const FORMAT:String = "format";
13-
14-
// Indicates that the date element name is used in a "stand alone" context, independent of other formats.
155
public static const STANDALONE:String = "standalone";
16-
176
}
187
}
Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,8 @@
1-
// The initial version of this file was autogenerated from the official AS3 reference at
2-
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/globalization/DateTimeNameStyle.html
3-
// by https://github.com/golfinq/ActionScript_Event_Builder
4-
// It won't be regenerated in the future, so feel free to edit and/or fix
5-
6-
package flash.globalization
7-
{
8-
9-
public final class DateTimeNameStyle
10-
{
11-
// Specifies the full form or full name style for month names and weekday names.
1+
package flash.globalization {
2+
[API("667")]
3+
public final class DateTimeNameStyle {
124
public static const FULL:String = "full";
13-
14-
// Specifies the long abbreviation style for month names and weekday names.
155
public static const LONG_ABBREVIATION:String = "longAbbreviation";
16-
17-
// Specifies the short abbreviation style for month names and weekday names.
186
public static const SHORT_ABBREVIATION:String = "shortAbbreviation";
19-
207
}
218
}
Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,10 @@
1-
// The initial version of this file was autogenerated from the official AS3 reference at
2-
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/globalization/DateTimeStyle.html
3-
// by https://github.com/golfinq/ActionScript_Event_Builder
4-
// It won't be regenerated in the future, so feel free to edit and/or fix
5-
6-
package flash.globalization
7-
{
8-
9-
public final class DateTimeStyle
10-
{
11-
// Specifies that a custom pattern string is used to specify the date or time style.
1+
package flash.globalization {
2+
[API("667")]
3+
public final class DateTimeStyle {
124
public static const CUSTOM:String = "custom";
13-
14-
// Specifies the long style of a date or time.
155
public static const LONG:String = "long";
16-
17-
// Specifies the medium style of a date or time.
186
public static const MEDIUM:String = "medium";
19-
20-
// Specifies that the date or time should not be included in the formatted string.
217
public static const NONE:String = "none";
22-
23-
// Specifies the short style of a date or time.
248
public static const SHORT:String = "short";
25-
269
}
2710
}
Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,22 @@
1-
// The initial version of this file was autogenerated from the official AS3 reference at
2-
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/globalization/LastOperationStatus.html
3-
// by https://github.com/golfinq/ActionScript_Event_Builder
4-
// It won't be regenerated in the future, so feel free to edit and/or fix
5-
61
package flash.globalization {
72
[API("667")]
83
public final class LastOperationStatus {
9-
// Indicates that given buffer is not enough to hold the result.
104
public static const BUFFER_OVERFLOW_ERROR:String = "bufferOverflowError";
11-
12-
// Indicates that the return error code is not known.
135
public static const ERROR_CODE_UNKNOWN:String = "errorCodeUnknown";
14-
15-
// Indicates that an argument passed to a method was illegal.
166
public static const ILLEGAL_ARGUMENT_ERROR:String = "illegalArgumentError";
17-
18-
// Indicates that an iterator went out of range or an invalid parameter was specified for month, day, or time.
197
public static const INDEX_OUT_OF_BOUNDS_ERROR:String = "indexOutOfBoundsError";
20-
21-
// Indicates that a given attribute value is out of the expected range.
228
public static const INVALID_ATTR_VALUE:String = "invalidAttrValue";
23-
24-
// Indicates that invalid Unicode value was found.
259
public static const INVALID_CHAR_FOUND:String = "invalidCharFound";
26-
27-
// Indicates that memory allocation has failed.
2810
public static const MEMORY_ALLOCATION_ERROR:String = "memoryAllocationError";
29-
30-
// Indicates that the last operation succeeded without any errors.
3111
public static const NO_ERROR:String = "noError";
32-
33-
// Indicates that an operation resulted a value that exceeds a specified numeric type.
3412
public static const NUMBER_OVERFLOW_ERROR:String = "numberOverflowError";
35-
36-
// Indicates that the parsing of a number failed.
3713
public static const PARSE_ERROR:String = "parseError";
38-
39-
// Indicates that the pattern for formatting a number, date, or time is invalid.
4014
public static const PATTERN_SYNTAX_ERROR:String = "patternSyntaxError";
41-
42-
// Indicates that an underlying platform API failed for an operation.
4315
public static const PLATFORM_API_FAILED:String = "platformAPIFailed";
44-
45-
// Indicates that a truncated Unicode character value was found.
4616
public static const TRUNCATED_CHAR_FOUND:String = "truncatedCharFound";
47-
48-
// Indicates that an unexpected token was detected in a Locale ID string.
4917
public static const UNEXPECTED_TOKEN:String = "unexpectedToken";
50-
51-
// Indicates that the requested operation or option is not supported.
5218
public static const UNSUPPORTED_ERROR:String = "unsupportedError";
53-
54-
// Indicates that an operating system default value was used during the most recent operation.
5519
public static const USING_DEFAULT_WARNING:String = "usingDefaultWarning";
56-
57-
// Indicates that a fallback value was set during the most recent operation.
5820
public static const USING_FALLBACK_WARNING:String = "usingFallbackWarning";
5921
}
6022
}
Lines changed: 3 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,108 +1,37 @@
1-
// The initial version of this file was autogenerated from the official AS3 reference at
2-
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/globalization/NationalDigitsType.html
3-
// by https://github.com/golfinq/ActionScript_Event_Builder
4-
// It won't be regenerated in the future, so feel free to edit and/or fix
5-
6-
package flash.globalization
7-
{
8-
9-
public final class NationalDigitsType
10-
{
11-
// Represents the Unicode value for the zero digit of the Arabic-Indic digit set.
1+
package flash.globalization {
2+
[API("667")]
3+
public final class NationalDigitsType {
124
public static const ARABIC_INDIC:uint = 0x0660;
13-
14-
// Represents the Unicode value for the zero digit of the Balinese digit set.
155
public static const BALINESE:uint = 0x1B50;
16-
17-
// Represents the Unicode value for the zero digit of the Bengali digit set.
186
public static const BENGALI:uint = 0x09E6;
19-
20-
// Represents the Unicode value for the zero digit of the Cham digit set.
217
public static const CHAM:uint = 0xAA50;
22-
23-
// Represents the Unicode value for the zero digit of the Devanagari digit set.
248
public static const DEVANAGARI:uint = 0x0966;
25-
26-
// Represents the Unicode value for the zero digit of the Latin-1 (European) digit set.
279
public static const EUROPEAN:uint = 0x0030;
28-
29-
// Represents the Unicode value for the zero digit of the Extended Arabic-Indic digit set.
3010
public static const EXTENDED_ARABIC_INDIC:uint = 0x06F0;
31-
32-
// Represents the Unicode value for the zero digit of the Fullwidth digit set.
3311
public static const FULL_WIDTH:uint = 0xFF10;
34-
35-
// Represents the Unicode value for the zero digit of the Gujarati digit set.
3612
public static const GUJARATI:uint = 0x0AE6;
37-
38-
// Represents the Unicode value for the zero digit of the Gurmukhi digit set.
3913
public static const GURMUKHI:uint = 0x0A66;
40-
41-
// Represents the Unicode value for the zero digit of the Kannada digit set.
4214
public static const KANNADA:uint = 0x0CE6;
43-
44-
// Represents the Unicode value for the zero digit of the Kayah Li digit set.
4515
public static const KAYAH_LI:uint = 0xA900;
46-
47-
// Represents the Unicode value for the zero digit of the Khmer digit set.
4816
public static const KHMER:uint = 0x17E0;
49-
50-
// Represents the Unicode value for the zero digit of the Lao digit set.
5117
public static const LAO:uint = 0x0ED0;
52-
53-
// Represents the Unicode value for the zero digit of the Lepcha digit set.
5418
public static const LEPCHA:uint = 0x1C40;
55-
56-
// Represents the Unicode value for the zero digit of the Limbu digit set.
5719
public static const LIMBU:uint = 0x1946;
58-
59-
// Represents the Unicode value for the zero digit of the Malayalam digit set.
6020
public static const MALAYALAM:uint = 0x0D66;
61-
62-
// Represents the Unicode value for the zero digit of the Mongolian digit set.
6321
public static const MONGOLIAN:uint = 0x1810;
64-
65-
// Represents the Unicode value for the zero digit of the Myanmar digit set.
6622
public static const MYANMAR:uint = 0x1040;
67-
68-
// Represents the Unicode value for the zero digit of the Myanmar Shan digit set.
6923
public static const MYANMAR_SHAN:uint = 0x1090;
70-
71-
// Represents the Unicode value for the zero digit of the New Tai Lue digit set.
7224
public static const NEW_TAI_LUE:uint = 0x19D0;
73-
74-
// Represents the Unicode value for the zero digit of the Nko digit set.
7525
public static const NKO:uint = 0x07C0;
76-
77-
// Represents the Unicode value for the zero digit of the Ol Chiki digit set.
7826
public static const OL_CHIKI:uint = 0x1C50;
79-
80-
// Represents the Unicode value for the zero digit of the Oriya digit set.
8127
public static const ORIYA:uint = 0x0B66;
82-
83-
// Represents the Unicode value for the zero digit of the Osmanya digit set.
8428
public static const OSMANYA:uint = 0x104A0;
85-
86-
// Represents the Unicode value for the zero digit of the Saurashtra digit set.
8729
public static const SAURASHTRA:uint = 0xA8D0;
88-
89-
// Represents the Unicode value for the zero digit of the Sundanese digit set.
9030
public static const SUNDANESE:uint = 0x1BB0;
91-
92-
// Represents the Unicode value for the zero digit of the Tamil digit set.
9331
public static const TAMIL:uint = 0x0BE6;
94-
95-
// Represents the Unicode value for the zero digit of the Telugu digit set.
9632
public static const TELUGU:uint = 0x0C66;
97-
98-
// Represents the Unicode value for the zero digit of the Thai digit set.
9933
public static const THAI:uint = 0x0E50;
100-
101-
// Represents the Unicode value for the zero digit of the Tibetan digit set.
10234
public static const TIBETAN:uint = 0x0F20;
103-
104-
// Represents the Unicode value for the zero digit of the Vai digit set.
10535
public static const VAI:uint = 0xA620;
106-
10736
}
10837
}

core/src/avm2/globals/flash/globalization/NumberFormatter.as

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@ package flash.globalization {
22
import __ruffle__.stub_constructor;
33
import __ruffle__.stub_getter;
44
import __ruffle__.stub_method;
5-
import flash.globalization.LastOperationStatus;
6-
import flash.globalization.NationalDigitsType;
7-
import flash.globalization.NumberParseResult;
85

6+
[API("667")]
97
public final class NumberFormatter {
108
private var _decimalSeparator = ".";
119
private var _digitsType = NationalDigitsType.EUROPEAN;

core/src/avm2/globals/flash/globalization/NumberParseResult.as

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
package flash.globalization {
2+
[API("667")]
23
public final class NumberParseResult {
34
private var _endIndex:int;
45
private var _startIndex:int;

0 commit comments

Comments
 (0)