api: threads, files
This commit is contained in:
@@ -1,7 +1,18 @@
|
||||
|
||||
module.exports = function(__runtime__, scope){
|
||||
importClass(android.view.KeyEvent);
|
||||
var events = Object.create(__runtime__.events);
|
||||
|
||||
var keys = {
|
||||
"home": KeyEvent.KEYCODE_HOME,
|
||||
"menu": KeyEvent.KEYCODE_MENU,
|
||||
"back": KeyEvent.KEYCODE_BACK,
|
||||
"volume_up": KeyEvent.KEYCODE_VOLUME_UP,
|
||||
"volume_down": KeyEvent.KEYCODE_VOLUME_DOWN
|
||||
}
|
||||
|
||||
scope.keys = keys;
|
||||
|
||||
return events;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
|
||||
module.exports = function(__runtime__, scope){
|
||||
var files = com.stardust.pio.PFiles;
|
||||
var files = Object.create(com.stardust.pio.PFiles);
|
||||
files.cwd = function(){
|
||||
return scope.engines.myEngine().cwd();
|
||||
}
|
||||
scope.files = files;
|
||||
scope.open = function(path, mode, encoding, bufferSize){
|
||||
if(arguments.length == 1){
|
||||
|
||||
Reference in New Issue
Block a user