Skip to content

Commit d0559ae

Browse files
committed
when using Haxe 4, replace __js__ with js.Syntax.code
1 parent 58083ad commit d0559ae

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+556
-556
lines changed

src/starling/animation/DelayedCall.hx

+6-6
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ class DelayedCall extends EventDispatcher implements IAnimatable
3939
private static function __init__ () {
4040

4141
untyped Object.defineProperties (DelayedCall.prototype, {
42-
"isComplete": { get: untyped __js__ ("function () { return this.get_alpha (); }") },
43-
"totalTime": { get: untyped __js__ ("function () { return this.get_totalTime (); }") },
44-
"currentTime": { get: untyped __js__ ("function () { return this.get_currentTime (); }") },
45-
"repeatCount": { get: untyped __js__ ("function () { return this.get_repeatCount (); }"), set: untyped __js__ ("function (v) { return this.set_repeatCount (v); }") },
46-
"callback": { get: untyped __js__ ("function () { return this.get_callback (); }") },
47-
"arguments": { get: untyped __js__ ("function () { return this.get_arguments (); }") },
42+
"isComplete": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_alpha (); }") },
43+
"totalTime": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_totalTime (); }") },
44+
"currentTime": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_currentTime (); }") },
45+
"repeatCount": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_repeatCount (); }"), set: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function (v) { return this.set_repeatCount (v); }") },
46+
"callback": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_callback (); }") },
47+
"arguments": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_arguments (); }") },
4848
});
4949

5050
}

src/starling/animation/Juggler.hx

+3-3
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ class Juggler implements IAnimatable
6262
private static function __init__ () {
6363

6464
untyped Object.defineProperties (Juggler.prototype, {
65-
"elapsedTime": { get: untyped __js__ ("function () { return this.get_elapsedTime (); }") },
66-
"timeScale": { get: untyped __js__ ("function () { return this.get_timeScale (); }"), set: untyped __js__ ("function (v) { return this.set_timeScale (v); }") },
67-
"objects": { get: untyped __js__ ("function () { return this.get_objects (); }") },
65+
"elapsedTime": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_elapsedTime (); }") },
66+
"timeScale": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_timeScale (); }"), set: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function (v) { return this.set_timeScale (v); }") },
67+
"objects": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_objects (); }") },
6868
});
6969

7070
}

src/starling/animation/Tween.hx

+21-21
Original file line numberDiff line numberDiff line change
@@ -83,27 +83,27 @@ import starling.utils.Color;
8383
private static function __init__ () {
8484

8585
untyped Object.defineProperties (Tween.prototype, {
86-
"isComplete": { get: untyped __js__ ("function () { return this.get_isComplete (); }") },
87-
"target": { get: untyped __js__ ("function () { return this.get_target (); }") },
88-
"transition": { get: untyped __js__ ("function () { return this.get_transition (); }"), set: untyped __js__ ("function (v) { return this.set_transition (v); }") },
89-
"transitionFunc": { get: untyped __js__ ("function () { return this.get_transitionFunc (); }"), set: untyped __js__ ("function (v) { return this.set_transitionFunc (v); }") },
90-
"totalTime": { get: untyped __js__ ("function () { return this.get_totalTime (); }") },
91-
"currentTime": { get: untyped __js__ ("function () { return this.get_currentTime (); }") },
92-
"progress": { get: untyped __js__ ("function () { return this.get_progress (); }") },
93-
"delay": { get: untyped __js__ ("function () { return this.get_delay (); }"), set: untyped __js__ ("function (v) { return this.set_delay (v); }") },
94-
"repeatCount": { get: untyped __js__ ("function () { return this.get_repeatCount (); }"), set: untyped __js__ ("function (v) { return this.set_repeatCount (v); }") },
95-
"repeatDelay": { get: untyped __js__ ("function () { return this.get_repeatDelay (); }"), set: untyped __js__ ("function (v) { return this.set_repeatDelay (v); }") },
96-
"reverse": { get: untyped __js__ ("function () { return this.get_reverse (); }"), set: untyped __js__ ("function (v) { return this.set_reverse (v); }") },
97-
"roundToInt": { get: untyped __js__ ("function () { return this.get_roundToInt (); }"), set: untyped __js__ ("function (v) { return this.set_roundToInt (v); }") },
98-
"onStart": { get: untyped __js__ ("function () { return this.get_onStart (); }"), set: untyped __js__ ("function (v) { return this.set_onStart (v); }") },
99-
"onUpdate": { get: untyped __js__ ("function () { return this.get_onUpdate (); }"), set: untyped __js__ ("function (v) { return this.set_onUpdate (v); }") },
100-
"onRepeat": { get: untyped __js__ ("function () { return this.get_onRepeat (); }"), set: untyped __js__ ("function (v) { return this.set_onRepeat (v); }") },
101-
"onComplete": { get: untyped __js__ ("function () { return this.get_onComplete (); }"), set: untyped __js__ ("function (v) { return this.set_onComplete (v); }") },
102-
"onStartArgs": { get: untyped __js__ ("function () { return this.get_onStartArgs (); }"), set: untyped __js__ ("function (v) { return this.set_onStartArgs (v); }") },
103-
"onUpdateArgs": { get: untyped __js__ ("function () { return this.get_onUpdateArgs (); }"), set: untyped __js__ ("function (v) { return this.set_onUpdateArgs (v); }") },
104-
"onRepeatArgs": { get: untyped __js__ ("function () { return this.get_onRepeatArgs (); }"), set: untyped __js__ ("function (v) { return this.set_onRepeatArgs (v); }") },
105-
"onCompleteArgs": { get: untyped __js__ ("function () { return this.get_onCompleteArgs (); }"), set: untyped __js__ ("function (v) { return this.set_onCompleteArgs (v); }") },
106-
"nextTween": { get: untyped __js__ ("function () { return this.get_nextTween (); }"), set: untyped __js__ ("function (v) { return this.set_nextTween (v); }") },
86+
"isComplete": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_isComplete (); }") },
87+
"target": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_target (); }") },
88+
"transition": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_transition (); }"), set: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function (v) { return this.set_transition (v); }") },
89+
"transitionFunc": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_transitionFunc (); }"), set: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function (v) { return this.set_transitionFunc (v); }") },
90+
"totalTime": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_totalTime (); }") },
91+
"currentTime": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_currentTime (); }") },
92+
"progress": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_progress (); }") },
93+
"delay": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_delay (); }"), set: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function (v) { return this.set_delay (v); }") },
94+
"repeatCount": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_repeatCount (); }"), set: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function (v) { return this.set_repeatCount (v); }") },
95+
"repeatDelay": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_repeatDelay (); }"), set: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function (v) { return this.set_repeatDelay (v); }") },
96+
"reverse": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_reverse (); }"), set: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function (v) { return this.set_reverse (v); }") },
97+
"roundToInt": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_roundToInt (); }"), set: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function (v) { return this.set_roundToInt (v); }") },
98+
"onStart": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_onStart (); }"), set: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function (v) { return this.set_onStart (v); }") },
99+
"onUpdate": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_onUpdate (); }"), set: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function (v) { return this.set_onUpdate (v); }") },
100+
"onRepeat": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_onRepeat (); }"), set: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function (v) { return this.set_onRepeat (v); }") },
101+
"onComplete": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_onComplete (); }"), set: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function (v) { return this.set_onComplete (v); }") },
102+
"onStartArgs": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_onStartArgs (); }"), set: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function (v) { return this.set_onStartArgs (v); }") },
103+
"onUpdateArgs": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_onUpdateArgs (); }"), set: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function (v) { return this.set_onUpdateArgs (v); }") },
104+
"onRepeatArgs": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_onRepeatArgs (); }"), set: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function (v) { return this.set_onRepeatArgs (v); }") },
105+
"onCompleteArgs": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_onCompleteArgs (); }"), set: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function (v) { return this.set_onCompleteArgs (v); }") },
106+
"nextTween": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_nextTween (); }"), set: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function (v) { return this.set_nextTween (v); }") },
107107
});
108108

109109
}

src/starling/assets/AssetFactory.hx

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class AssetFactory
3333
private static function __init__ () {
3434

3535
untyped Object.defineProperties (AssetFactory.prototype, {
36-
"priority": { get: untyped __js__ ("function () { return this.get_priority (); }"), set: untyped __js__ ("function (v) { return this.set_priority (v); }") },
36+
"priority": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_priority (); }"), set: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function (v) { return this.set_priority (v); }") },
3737
});
3838

3939
}

src/starling/assets/AssetManager.hx

+7-7
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,12 @@ class AssetManager extends EventDispatcher
171171
private static function __init__ () {
172172

173173
untyped Object.defineProperties (AssetManager.prototype, {
174-
"verbose": { get: untyped __js__ ("function () { return this.get_verbose (); }"), set: untyped __js__ ("function (v) { return this.set_verbose (v); }") },
175-
"numQueuedAssets": { get: untyped __js__ ("function () { return this.get_numQueuedAssets (); }") },
176-
"numConnections": { get: untyped __js__ ("function () { return this.get_numConnections (); }"), set: untyped __js__ ("function (v) { return this.set_numConnections (v); }") },
177-
"textureOptions": { get: untyped __js__ ("function () { return this.get_textureOptions (); }"), set: untyped __js__ ("function (v) { return this.set_textureOptions (v); }") },
178-
"dataLoader": { get: untyped __js__ ("function () { return this.get_dataLoader (); }"), set: untyped __js__ ("function (v) { return this.set_dataLoader (v); }") },
179-
"registerBitmapFontsWithFontFace": { get: untyped __js__ ("function () { return this.get_registerBitmapFontsWithFontFace (); }"), set: untyped __js__ ("function (v) { return this.set_registerBitmapFontsWithFontFace (v); }") },
174+
"verbose": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_verbose (); }"), set: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function (v) { return this.set_verbose (v); }") },
175+
"numQueuedAssets": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_numQueuedAssets (); }") },
176+
"numConnections": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_numConnections (); }"), set: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function (v) { return this.set_numConnections (v); }") },
177+
"textureOptions": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_textureOptions (); }"), set: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function (v) { return this.set_textureOptions (v); }") },
178+
"dataLoader": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_dataLoader (); }"), set: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function (v) { return this.set_dataLoader (v); }") },
179+
"registerBitmapFontsWithFontFace": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_registerBitmapFontsWithFontFace (); }"), set: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function (v) { return this.set_registerBitmapFontsWithFontFace (v); }") },
180180
});
181181

182182
}
@@ -1130,7 +1130,7 @@ class AssetPostProcessor
11301130
private static function __init__ () {
11311131

11321132
untyped Object.defineProperties (AssetPostProcessor.prototype, {
1133-
"priority": { get: untyped __js__ ("function () { return this.get_priority (); }") },
1133+
"priority": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_priority (); }") },
11341134
});
11351135

11361136
}

src/starling/assets/AssetReference.hx

+7-7
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ class AssetReference
2626
private static function __init__ () {
2727

2828
untyped Object.defineProperties (AssetReference.prototype, {
29-
"name": { get: untyped __js__ ("function () { return this.get_name (); }"), set: untyped __js__ ("function (v) { return this.set_name (v); }") },
30-
"url": { get: untyped __js__ ("function () { return this.get_url (); }"), set: untyped __js__ ("function (v) { return this.set_url (v); }") },
31-
"data": { get: untyped __js__ ("function () { return this.get_data (); }"), set: untyped __js__ ("function (v) { return this.set_data (v); }") },
32-
"mimeType": { get: untyped __js__ ("function () { return this.get_mimeType (); }"), set: untyped __js__ ("function (v) { return this.set_mimeType (v); }") },
33-
"extension": { get: untyped __js__ ("function () { return this.get_extension (); }"), set: untyped __js__ ("function (v) { return this.set_extension (v); }") },
34-
"textureOptions": { get: untyped __js__ ("function () { return this.get_textureOptions (); }"), set: untyped __js__ ("function (v) { return this.set_textureOptions (v); }") },
35-
"filename": { get: untyped __js__ ("function () { return this.get_filename (); }") },
29+
"name": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_name (); }"), set: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function (v) { return this.set_name (v); }") },
30+
"url": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_url (); }"), set: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function (v) { return this.set_url (v); }") },
31+
"data": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_data (); }"), set: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function (v) { return this.set_data (v); }") },
32+
"mimeType": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_mimeType (); }"), set: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function (v) { return this.set_mimeType (v); }") },
33+
"extension": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_extension (); }"), set: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function (v) { return this.set_extension (v); }") },
34+
"textureOptions": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_textureOptions (); }"), set: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function (v) { return this.set_textureOptions (v); }") },
35+
"filename": { get: untyped #if haxe4 js.Syntax.code #else __js__ #end ("function () { return this.get_filename (); }") },
3636
});
3737

3838
}

0 commit comments

Comments
 (0)