-
-
Notifications
You must be signed in to change notification settings - Fork 839
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
avm2: Add several AIR classes and version-gate
ImageDecodingPolicy
…
…to SWF13+ `NativeProcess`, `NativeProcessStartupInfo`, and `File` classes
- Loading branch information
1 parent
2a38a2c
commit bed5a2f
Showing
5 changed files
with
114 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package flash.desktop { | ||
import __ruffle__.stub_method; | ||
|
||
import flash.events.EventDispatcher; | ||
|
||
[API("668")] | ||
public class NativeProcess extends EventDispatcher { | ||
public function NativeProcess() { | ||
super(); | ||
} | ||
|
||
public static function get isSupported():Boolean { | ||
return false; | ||
} | ||
|
||
public function start(info:NativeProcessStartupInfo):void { | ||
stub_method("flash.desktop.NativeProcess", "start"); | ||
} | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
core/src/avm2/globals/flash/desktop/NativeProcessStartupInfo.as
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package flash.desktop { | ||
import __ruffle__.stub_getter; | ||
import __ruffle__.stub_setter; | ||
|
||
import flash.filesystem.File; | ||
|
||
[API("668")] | ||
public class NativeProcessStartupInfo { | ||
public function NativeProcessStartupInfo() { | ||
super(); | ||
} | ||
|
||
public function get arguments():Vector.<String> { | ||
stub_getter("flash.desktop.NativeProcessStartupInfo", "arguments"); | ||
|
||
return null; | ||
} | ||
|
||
public function set arguments(value:Vector.<String>):void { | ||
stub_setter("flash.desktop.NativeProcessStartupInfo", "arguments"); | ||
} | ||
|
||
public function get executable():File { | ||
stub_getter("flash.desktop.NativeProcessStartupInfo", "executable"); | ||
|
||
return null; | ||
} | ||
|
||
public function set executable(value:File):void { | ||
stub_setter("flash.desktop.NativeProcessStartupInfo", "executable"); | ||
} | ||
|
||
public function get workingDirectory():File { | ||
stub_getter("flash.desktop.NativeProcessStartupInfo", "workingDirectory"); | ||
|
||
return null; | ||
} | ||
|
||
public function set workingDirectory(value:File):void { | ||
stub_setter("flash.desktop.NativeProcessStartupInfo", "workingDirectory"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package flash.filesystem { | ||
import __ruffle__.stub_constructor; | ||
import __ruffle__.stub_getter; | ||
import __ruffle__.stub_method; | ||
|
||
import flash.net.FileReference; | ||
|
||
[API("661")] | ||
public class File extends FileReference { | ||
private static var _applicationDirectory:File = null; | ||
|
||
public function File(path:String = null) { | ||
stub_constructor("flash.filesystem.File"); | ||
} | ||
|
||
public static function get applicationDirectory():File { | ||
if (_applicationDirectory === null) { | ||
_applicationDirectory = new File(); | ||
} | ||
|
||
return _applicationDirectory; | ||
} | ||
|
||
public function resolvePath(path:String):File { | ||
stub_method("flash.filesystem.File", "resolvePath"); | ||
|
||
return new File(); | ||
} | ||
|
||
public function get exists():Boolean { | ||
stub_getter("flash.filesystem.File", "exists"); | ||
|
||
return false; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
package flash.system { | ||
public final class ImageDecodingPolicy { | ||
public static const ON_DEMAND:String = "onDemand"; | ||
public static const ON_LOAD:String = "onLoad"; | ||
} | ||
[API("674")] | ||
public final class ImageDecodingPolicy { | ||
public static const ON_DEMAND:String = "onDemand"; | ||
public static const ON_LOAD:String = "onLoad"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters