First commit

This commit is contained in:
2021-03-07 05:58:59 +01:00
committed by Andreas Schaafsma
commit 5d4c4a054e
18475 changed files with 3309357 additions and 0 deletions

View File

@@ -0,0 +1,75 @@
// Class: lime.system.BackgroundWorker
var $global = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = require("./../../hxClasses_stub").default;
var $import = require("./../../import_stub").default;
function lime_app__$Event_$Dynamic_$Void() {return require("./../../lime/app/_Event_Dynamic_Void");}
// Constructor
var BackgroundWorker = function() {
this.onProgress = new (lime_app__$Event_$Dynamic_$Void().default)();
this.onError = new (lime_app__$Event_$Dynamic_$Void().default)();
this.onComplete = new (lime_app__$Event_$Dynamic_$Void().default)();
this.doWork = new (lime_app__$Event_$Dynamic_$Void().default)();
}
// Meta
BackgroundWorker.__name__ = ["lime","system","BackgroundWorker"];
BackgroundWorker.prototype = {
cancel: function() {
this.canceled = true;
},
run: function(message) {
this.canceled = false;
this.completed = false;
this.__runMessage = message;
this.__doWork();
},
sendComplete: function(message) {
this.completed = true;
if(!this.canceled) {
this.canceled = true;
this.onComplete.dispatch(message);
}
},
sendError: function(message) {
if(!this.canceled) {
this.canceled = true;
this.onError.dispatch(message);
}
},
sendProgress: function(message) {
if(!this.canceled) {
this.onProgress.dispatch(message);
}
},
__doWork: function() {
this.doWork.dispatch(this.__runMessage);
},
__update: function(deltaTime) {
}
};
BackgroundWorker.prototype.__class__ = $hxClasses["lime.system.BackgroundWorker"] = BackgroundWorker;
// Init
// Statics
BackgroundWorker.MESSAGE_COMPLETE = "__COMPLETE__"
BackgroundWorker.MESSAGE_ERROR = "__ERROR__"
// Export
exports.default = BackgroundWorker;

View File

@@ -0,0 +1,66 @@
// Class: lime.system.CFFI
var $global = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = require("./../../hxClasses_stub").default;
var $import = require("./../../import_stub").default;
function Reflect() {return require("./../../Reflect");}
// Constructor
var CFFI = function(){}
// Meta
CFFI.__name__ = ["lime","system","CFFI"];
CFFI.prototype = {
};
CFFI.prototype.__class__ = $hxClasses["lime.system.CFFI"] = CFFI;
// Init
{
CFFI.available = false;
CFFI.enabled = false;
};
// Statics
CFFI.load = function(library,method,args,lazy) {
if(lazy == null) {
lazy = false;
}
if(args == null) {
args = 0;
}
if(!CFFI.enabled) {
return (Reflect().default).makeVarArgs(function(__) {
return { };
});
}
var result = null;
return result;
}
CFFI.__findHaxelib = function(library) {
return "";
}
CFFI.__loaderTrace = function(message) {
}
CFFI.__sysName = function() {
return null;
}
CFFI.__tryLoad = function(name,library,func,args) {
return null;
}
CFFI.__moduleNames = null
// Export
exports.default = CFFI;

View File

@@ -0,0 +1,59 @@
// Class: lime.system.Clipboard
var $global = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = require("./../../hxClasses_stub").default;
var $import = require("./../../import_stub").default;
function lime_app__$Event_$Void_$Void() {return require("./../../lime/app/_Event_Void_Void");}
function lime_app_Application() {return require("./../../lime/app/Application");}
// Constructor
var Clipboard = function(){}
// Meta
Clipboard.__name__ = ["lime","system","Clipboard"];
Clipboard.prototype = {
};
Clipboard.prototype.__class__ = $hxClasses["lime.system.Clipboard"] = Clipboard;
// Init
// Statics
Clipboard.__update = function() {
var cacheText = Clipboard._text;
if(Clipboard._text != cacheText) {
Clipboard.onUpdate.dispatch();
}
}
Clipboard.get_text = function() {
return Clipboard._text;
}
Clipboard.set_text = function(value) {
var cacheText = Clipboard._text;
Clipboard._text = value;
var $window = (lime_app_Application().default).current.get_window();
if($window != null) {
$window.backend.setClipboard(value);
}
if(Clipboard._text != cacheText) {
Clipboard.onUpdate.dispatch();
}
return value;
}
Clipboard.onUpdate = new (lime_app__$Event_$Void_$Void().default)()
// Export
exports.default = Clipboard;

View File

@@ -0,0 +1,37 @@
// Class: lime.system.Display
var $global = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = require("./../../hxClasses_stub").default;
// Constructor
var Display = function() {
}
// Meta
Display.__name__ = ["lime","system","Display"];
Display.prototype = {
};
Display.prototype.__class__ = $hxClasses["lime.system.Display"] = Display;
// Init
// Statics
// Export
exports.default = Display;

View File

@@ -0,0 +1,41 @@
// Class: lime.system.DisplayMode
var $global = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = require("./../../hxClasses_stub").default;
// Constructor
var DisplayMode = function(width,height,refreshRate,pixelFormat) {
this.width = width;
this.height = height;
this.refreshRate = refreshRate;
this.pixelFormat = pixelFormat;
}
// Meta
DisplayMode.__name__ = ["lime","system","DisplayMode"];
DisplayMode.prototype = {
};
DisplayMode.prototype.__class__ = $hxClasses["lime.system.DisplayMode"] = DisplayMode;
// Init
// Statics
// Export
exports.default = DisplayMode;

View File

@@ -0,0 +1,25 @@
// Enum: lime.system.Endian
var $global = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
// Imports
var $estr = require("./../../estr_stub").default;
var $hxClasses = require("./../../hxClasses_stub").default;
// Definition
var Endian = $hxClasses["lime.system.Endian"] = { __ename__: ["lime","system","Endian"], __constructs__: ["LITTLE_ENDIAN","BIG_ENDIAN"] }
Endian.LITTLE_ENDIAN = ["LITTLE_ENDIAN",0];
Endian.LITTLE_ENDIAN.toString = $estr;
Endian.LITTLE_ENDIAN.__enum__ = Endian;
Endian.BIG_ENDIAN = ["BIG_ENDIAN",1];
Endian.BIG_ENDIAN.toString = $estr;
Endian.BIG_ENDIAN.__enum__ = Endian;
exports.default = Endian;

View File

@@ -0,0 +1,137 @@
// Class: lime.system.JNI
var $global = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = require("./../../hxClasses_stub").default;
var $import = require("./../../import_stub").default;
function haxe_ds_StringMap() {return require("./../../haxe/ds/StringMap");}
function Reflect() {return require("./../../Reflect");}
function haxe_Log() {return require("./../../haxe/Log");}
// Constructor
var JNI = function(){}
// Meta
JNI.__name__ = ["lime","system","JNI"];
JNI.prototype = {
};
JNI.prototype.__class__ = $hxClasses["lime.system.JNI"] = JNI;
// Init
// Statics
JNI.callMember = function(method,jobject,a) {
var _g = a.length;
switch(_g) {
case 0:
return method(jobject);
case 1:
return method(jobject,a[0]);
case 2:
return method(jobject,a[0],a[1]);
case 3:
return method(jobject,a[0],a[1],a[2]);
case 4:
return method(jobject,a[0],a[1],a[2],a[3]);
case 5:
return method(jobject,a[0],a[1],a[2],a[3],a[4]);
case 6:
return method(jobject,a[0],a[1],a[2],a[3],a[4],a[5]);
case 7:
return method(jobject,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);
default:
return null;
}
}
JNI.callStatic = function(method,a) {
var _g = a.length;
switch(_g) {
case 0:
return method();
case 1:
return method(a[0]);
case 2:
return method(a[0],a[1]);
case 3:
return method(a[0],a[1],a[2]);
case 4:
return method(a[0],a[1],a[2],a[3]);
case 5:
return method(a[0],a[1],a[2],a[3],a[4]);
case 6:
return method(a[0],a[1],a[2],a[3],a[4],a[5]);
case 7:
return method(a[0],a[1],a[2],a[3],a[4],a[5],a[6]);
default:
return null;
}
}
JNI.createMemberField = function(className,memberName,signature) {
JNI.init();
return null;
}
JNI.createMemberMethod = function(className,memberName,signature,useArray,quietFail) {
if(quietFail == null) {
quietFail = false;
}
if(useArray == null) {
useArray = false;
}
JNI.init();
return null;
}
JNI.createStaticField = function(className,memberName,signature) {
JNI.init();
return null;
}
JNI.createStaticMethod = function(className,memberName,signature,useArray,quietFail) {
if(quietFail == null) {
quietFail = false;
}
if(useArray == null) {
useArray = false;
}
JNI.init();
return null;
}
JNI.getEnv = function() {
JNI.init();
return null;
}
JNI.init = function() {
if(!JNI.initialized) {
JNI.initialized = true;
}
}
JNI.onCallback = function(object,method,args) {
var field = (Reflect().default).field(object,method);
if(field != null) {
if(args == null) {
args = [];
}
return (Reflect().default).callMethod(object,field,args);
}
(haxe_Log().default).trace("onCallback - unknown field " + method,{ fileName : "JNI.hx", lineNumber : 184, className : "lime.system.JNI", methodName : "onCallback"});
return null;
}
JNI.postUICallback = function(callback) {
callback();
}
JNI.alreadyCreated = new (haxe_ds_StringMap().default)()
JNI.initialized = false
// Export
exports.default = JNI;

View File

@@ -0,0 +1,43 @@
// Class: lime.system.JNIMemberField
var $global = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = require("./../../hxClasses_stub").default;
// Constructor
var JNIMemberField = function(field) {
this.field = field;
}
// Meta
JNIMemberField.__name__ = ["lime","system","JNIMemberField"];
JNIMemberField.prototype = {
get: function(jobject) {
return null;
},
set: function(jobject,value) {
return value;
}
};
JNIMemberField.prototype.__class__ = $hxClasses["lime.system.JNIMemberField"] = JNIMemberField;
// Init
// Statics
// Export
exports.default = JNIMemberField;

View File

@@ -0,0 +1,60 @@
// Class: lime.system.JNIMethod
var $global = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = require("./../../hxClasses_stub").default;
var $import = require("./../../import_stub").default;
var $bind = require("./../../bind_stub").default;
function Reflect() {return require("./../../Reflect");}
// Constructor
var JNIMethod = function(method) {
this.method = method;
}
// Meta
JNIMethod.__name__ = ["lime","system","JNIMethod"];
JNIMethod.prototype = {
callMember: function(args) {
return null;
},
callStatic: function(args) {
return null;
},
getMemberMethod: function(useArray) {
if(useArray) {
return $bind(this,this.callMember);
} else {
return (Reflect().default).makeVarArgs($bind(this,this.callMember));
}
},
getStaticMethod: function(useArray) {
if(useArray) {
return $bind(this,this.callStatic);
} else {
return (Reflect().default).makeVarArgs($bind(this,this.callStatic));
}
}
};
JNIMethod.prototype.__class__ = $hxClasses["lime.system.JNIMethod"] = JNIMethod;
// Init
// Statics
// Export
exports.default = JNIMethod;

View File

@@ -0,0 +1,43 @@
// Class: lime.system.JNIStaticField
var $global = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = require("./../../hxClasses_stub").default;
// Constructor
var JNIStaticField = function(field) {
this.field = field;
}
// Meta
JNIStaticField.__name__ = ["lime","system","JNIStaticField"];
JNIStaticField.prototype = {
get: function() {
return null;
},
set: function(value) {
return value;
}
};
JNIStaticField.prototype.__class__ = $hxClasses["lime.system.JNIStaticField"] = JNIStaticField;
// Init
// Statics
// Export
exports.default = JNIStaticField;

View File

@@ -0,0 +1,65 @@
// Class: lime.system.Sensor
var $global = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = require("./../../hxClasses_stub").default;
var $import = require("./../../import_stub").default;
function haxe_ds_IntMap() {return require("./../../haxe/ds/IntMap");}
function lime_app__$Event_$Float_$Float_$Float_$Void() {return require("./../../lime/app/_Event_Float_Float_Float_Void");}
// Constructor
var Sensor = function(type,id) {
this.onUpdate = new (lime_app__$Event_$Float_$Float_$Float_$Void().default)();
this.type = type;
this.id = id;
}
// Meta
Sensor.__name__ = ["lime","system","Sensor"];
Sensor.prototype = {
};
Sensor.prototype.__class__ = $hxClasses["lime.system.Sensor"] = Sensor;
// Init
// Statics
Sensor.getSensors = function(type) {
if(type == null) {
return Sensor.sensors.slice();
} else {
var result = [];
var _g = 0;
var _g1 = Sensor.sensors;
while(_g < _g1.length) {
var sensor = _g1[_g];
++_g;
if(sensor.type == type) {
result.push(sensor);
}
}
return result;
}
}
Sensor.registerSensor = function(type,id) {
var sensor = new Sensor(type,id);
Sensor.sensors.push(sensor);
Sensor.sensorByID.set(id,sensor);
}
Sensor.sensorByID = new (haxe_ds_IntMap().default)()
Sensor.sensors = []
// Export
exports.default = Sensor;

View File

@@ -0,0 +1,21 @@
// Enum: lime.system.SensorType
var $global = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
// Imports
var $estr = require("./../../estr_stub").default;
var $hxClasses = require("./../../hxClasses_stub").default;
// Definition
var SensorType = $hxClasses["lime.system.SensorType"] = { __ename__: ["lime","system","SensorType"], __constructs__: ["ACCELEROMETER"] }
SensorType.ACCELEROMETER = ["ACCELEROMETER",0];
SensorType.ACCELEROMETER.toString = $estr;
SensorType.ACCELEROMETER.__enum__ = SensorType;
exports.default = SensorType;

View File

@@ -0,0 +1,280 @@
// Class: lime.system.System
var $global = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = require("./../../hxClasses_stub").default;
var $import = require("./../../import_stub").default;
function haxe_ds_IntMap() {return require("./../../haxe/ds/IntMap");}
function js_Browser() {return require("./../../js/Browser");}
function Std() {return require("./../../Std");}
function StringTools() {return require("./../../StringTools");}
function Reflect() {return require("./../../Reflect");}
function lime_system_Display() {return require("./../../lime/system/Display");}
function lime_system_DisplayMode() {return require("./../../lime/system/DisplayMode");}
function lime_math_Rectangle() {return require("./../../lime/math/Rectangle");}
function lime_system_CFFI() {return require("./../../lime/system/CFFI");}
function haxe_ds_StringMap() {return require("./../../haxe/ds/StringMap");}
function lime_system_Endian() {return require("./../../lime/system/Endian");}
// Constructor
var System = function(){}
// Meta
System.__name__ = ["lime","system","System"];
System.prototype = {
};
System.prototype.__class__ = $hxClasses["lime.system.System"] = System;
// Init
// Statics
System.embed = function(projectName,element,width,height,windowConfig) {
if(System.__applicationEntryPoint == null || System.__applicationConfig == null) {
return;
}
if(System.__applicationEntryPoint.exists(projectName)) {
var htmlElement = null;
if(typeof(element) == "string") {
htmlElement = (js_Browser().default).get_document().getElementById(element);
} else if(element == null) {
htmlElement = (js_Browser().default).get_document().createElement("div");
} else {
htmlElement = element;
}
if(htmlElement == null) {
(js_Browser().default).get_window().console.log("[lime.embed] ERROR: Cannot find target element: " + (Std().default).string(element));
return;
}
if(width == null) {
width = 0;
}
if(height == null) {
height = 0;
}
var defaultConfig = System.__applicationConfig.get(projectName);
var config = { };
System.__copyMissingFields(config,defaultConfig);
if(windowConfig != null) {
config.windows = [];
if((windowConfig instanceof Array) && windowConfig.__enum__ == null) {
config.windows = windowConfig;
} else {
config.windows[0] = windowConfig;
}
var _g1 = 0;
var _g = config.windows.length;
while(_g1 < _g) {
var i = _g1++;
if(i < defaultConfig.windows.length) {
System.__copyMissingFields(config.windows[i],defaultConfig.windows[i]);
}
System.__copyMissingFields(config.windows[i].parameters,defaultConfig.windows[i].parameters);
if(typeof(windowConfig.background) == "string") {
var background = (StringTools().default).replace((Std().default).string(windowConfig.background),"#","");
if(background.indexOf("0x") > -1) {
windowConfig.background = (Std().default).parseInt(background);
} else {
windowConfig.background = (Std().default).parseInt("0x" + background);
}
}
}
}
if((Reflect().default).field(config.windows[0],"rootPath")) {
config.rootPath = (Reflect().default).field(config.windows[0],"rootPath");
(Reflect().default).deleteField(config.windows[0],"rootPath");
}
config.windows[0].element = htmlElement;
config.windows[0].width = width;
config.windows[0].height = height;
(System.__applicationEntryPoint.get(projectName))(config);
}
}
System.exit = function(code) {
}
System.getDisplay = function(id) {
if(id == 0) {
var display = new (lime_system_Display().default)();
display.id = 0;
display.name = "Generic Display";
display.dpi = 96 * (js_Browser().default).get_window().devicePixelRatio;
display.currentMode = new (lime_system_DisplayMode().default)((js_Browser().default).get_window().screen.width,(js_Browser().default).get_window().screen.height,60,1);
display.supportedModes = [display.currentMode];
display.bounds = new (lime_math_Rectangle().default)(0,0,display.currentMode.width,display.currentMode.height);
return display;
}
return null;
}
System.getTimer = function() {
return (Std().default)["int"]((js_Browser().default).get_window().performance.now());
}
System.load = function(library,method,args,lazy) {
if(lazy == null) {
lazy = false;
}
if(args == null) {
args = 0;
}
return (lime_system_CFFI().default).load(library,method,args,lazy);
}
System.openFile = function(path) {
if(path != null) {
(js_Browser().default).get_window().open(path,"_blank");
}
}
System.openURL = function(url,target) {
if(target == null) {
target = "_blank";
}
if(url != null) {
(js_Browser().default).get_window().open(url,target);
}
}
System.__copyMissingFields = function(target,source) {
if(source == null || target == null) {
return;
}
var _g = 0;
var _g1 = (Reflect().default).fields(source);
while(_g < _g1.length) {
var field = _g1[_g];
++_g;
if(!(Reflect().default).hasField(target,field)) {
(Reflect().default).setField(target,field,(Reflect().default).field(source,field));
}
}
}
System.__getDirectory = function(type) {
return null;
}
System.__registerEntryPoint = function(projectName,entryPoint,config) {
if(System.__applicationConfig == null) {
System.__applicationConfig = new (haxe_ds_StringMap().default)();
}
if(System.__applicationEntryPoint == null) {
System.__applicationEntryPoint = new (haxe_ds_StringMap().default)();
}
System.__applicationEntryPoint.set(projectName,entryPoint);
System.__applicationConfig.set(projectName,config);
}
System.__runProcess = function(command,args) {
return null;
}
System.get_allowScreenTimeout = function() {
return true;
}
System.set_allowScreenTimeout = function(value) {
return true;
}
System.get_applicationDirectory = function() {
if(System.__applicationDirectory == null) {
System.__applicationDirectory = System.__getDirectory(0);
}
return System.__applicationDirectory;
}
System.get_applicationStorageDirectory = function() {
if(System.__applicationStorageDirectory == null) {
System.__applicationStorageDirectory = System.__getDirectory(1);
}
return System.__applicationStorageDirectory;
}
System.get_deviceModel = function() {
var tmp = System.__deviceModel == null;
return System.__deviceModel;
}
System.get_deviceVendor = function() {
var tmp = System.__deviceVendor == null;
return System.__deviceVendor;
}
System.get_desktopDirectory = function() {
if(System.__desktopDirectory == null) {
System.__desktopDirectory = System.__getDirectory(2);
}
return System.__desktopDirectory;
}
System.get_documentsDirectory = function() {
if(System.__documentsDirectory == null) {
System.__documentsDirectory = System.__getDirectory(3);
}
return System.__documentsDirectory;
}
System.get_endianness = function() {
if(System.__endianness == null) {
var arrayBuffer = new ArrayBuffer(2);
var this1;
if(arrayBuffer != null) {
this1 = new Uint8Array(arrayBuffer,0);
} else {
this1 = null;
}
var uint8Array = this1;
var this2;
if(arrayBuffer != null) {
this2 = new Uint16Array(arrayBuffer,0);
} else {
this2 = null;
}
var uint16array = this2;
uint8Array[0] = 170;
uint8Array[1] = 187;
if(uint16array[0] == 43707) {
System.__endianness = (lime_system_Endian().default).BIG_ENDIAN;
} else {
System.__endianness = (lime_system_Endian().default).LITTLE_ENDIAN;
}
}
return System.__endianness;
}
System.get_fontsDirectory = function() {
if(System.__fontsDirectory == null) {
System.__fontsDirectory = System.__getDirectory(4);
}
return System.__fontsDirectory;
}
System.get_numDisplays = function() {
return 1;
}
System.get_platformLabel = function() {
if(System.__platformLabel == null) {
var name = System.get_platformName();
var version = System.get_platformVersion();
if(name != null && version != null) {
System.__platformLabel = name + " " + version;
} else if(name != null) {
System.__platformLabel = name;
}
}
return System.__platformLabel;
}
System.get_platformName = function() {
if(System.__platformName == null) {
System.__platformName = "HTML5";
}
return System.__platformName;
}
System.get_platformVersion = function() {
var tmp = System.__platformVersion == null;
return System.__platformVersion;
}
System.get_userDirectory = function() {
if(System.__userDirectory == null) {
System.__userDirectory = System.__getDirectory(5);
}
return System.__userDirectory;
}
System.__directories = new (haxe_ds_IntMap().default)()
// Export
exports.default = System;

View File

@@ -0,0 +1,68 @@
// Class: lime.system.ThreadPool
var $global = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = require("./../../hxClasses_stub").default;
var $import = require("./../../import_stub").default;
function lime_app__$Event_$haxe_$Function_$Void() {return require("./../../lime/app/_Event_haxe_Function_Void");}
// Constructor
var ThreadPool = function(minThreads,maxThreads) {
if(maxThreads == null) {
maxThreads = 1;
}
if(minThreads == null) {
minThreads = 0;
}
this.onRun = new (lime_app__$Event_$haxe_$Function_$Void().default)();
this.onProgress = new (lime_app__$Event_$haxe_$Function_$Void().default)();
this.onError = new (lime_app__$Event_$haxe_$Function_$Void().default)();
this.onComplete = new (lime_app__$Event_$haxe_$Function_$Void().default)();
this.doWork = new (lime_app__$Event_$haxe_$Function_$Void().default)();
this.minThreads = minThreads;
this.maxThreads = maxThreads;
this.currentThreads = 0;
}
// Meta
ThreadPool.__name__ = ["lime","system","ThreadPool"];
ThreadPool.prototype = {
queue: function(state) {
this.runWork(state);
},
sendComplete: function(state) {
this.onComplete.dispatch(state);
},
sendError: function(state) {
this.onError.dispatch(state);
},
sendProgress: function(state) {
this.onProgress.dispatch(state);
},
runWork: function(state) {
this.onRun.dispatch(state);
this.doWork.dispatch(state);
}
};
ThreadPool.prototype.__class__ = $hxClasses["lime.system.ThreadPool"] = ThreadPool;
// Init
// Statics
// Export
exports.default = ThreadPool;

View File

@@ -0,0 +1,80 @@
// Class: lime.system._CFFIPointer.CFFIPointer_Impl_
var $global = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = require("./../../../hxClasses_stub").default;
var $import = require("./../../../import_stub").default;
// Constructor
var CFFIPointer_Impl_ = function(){}
// Meta
CFFIPointer_Impl_.__name__ = ["lime","system","_CFFIPointer","CFFIPointer_Impl_"];
CFFIPointer_Impl_.prototype = {
};
CFFIPointer_Impl_.prototype.__class__ = $hxClasses["lime.system._CFFIPointer.CFFIPointer_Impl_"] = CFFIPointer_Impl_;
// Init
// Statics
CFFIPointer_Impl_._new = function(handle) {
var this1 = handle;
return this1;
}
CFFIPointer_Impl_.get = function(this1) {
var tmp = this1 != null;
return 0;
}
CFFIPointer_Impl_.equals = function(a,b) {
return CFFIPointer_Impl_.get(a) == b;
}
CFFIPointer_Impl_.equalsPointer = function(a,b) {
return CFFIPointer_Impl_.get(a) == CFFIPointer_Impl_.get(b);
}
CFFIPointer_Impl_.greaterThan = function(a,b) {
return CFFIPointer_Impl_.get(a) > b;
}
CFFIPointer_Impl_.greaterThanPointer = function(a,b) {
return CFFIPointer_Impl_.get(a) > CFFIPointer_Impl_.get(b);
}
CFFIPointer_Impl_.greaterThanOrEqual = function(a,b) {
return CFFIPointer_Impl_.get(a) >= b;
}
CFFIPointer_Impl_.greaterThanOrEqualPointer = function(a,b) {
return CFFIPointer_Impl_.get(a) >= CFFIPointer_Impl_.get(b);
}
CFFIPointer_Impl_.lessThan = function(a,b) {
return CFFIPointer_Impl_.get(a) < b;
}
CFFIPointer_Impl_.lessThanPointer = function(a,b) {
return CFFIPointer_Impl_.get(a) < CFFIPointer_Impl_.get(b);
}
CFFIPointer_Impl_.lessThanOrEqual = function(a,b) {
return CFFIPointer_Impl_.get(a) <= b;
}
CFFIPointer_Impl_.lessThanOrEqualPointer = function(a,b) {
return CFFIPointer_Impl_.get(a) <= CFFIPointer_Impl_.get(b);
}
CFFIPointer_Impl_.notEquals = function(a,b) {
return CFFIPointer_Impl_.get(a) != b;
}
CFFIPointer_Impl_.notEqualsPointer = function(a,b) {
return CFFIPointer_Impl_.get(a) != CFFIPointer_Impl_.get(b);
}
// Export
exports.default = CFFIPointer_Impl_;

View File

@@ -0,0 +1,117 @@
// Class: lime.system._Locale.Locale_Impl_
var $global = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = require("./../../../hxClasses_stub").default;
var $import = require("./../../../import_stub").default;
// Constructor
var Locale_Impl_ = function(){}
// Meta
Locale_Impl_.__name__ = ["lime","system","_Locale","Locale_Impl_"];
Locale_Impl_.prototype = {
};
Locale_Impl_.prototype.__class__ = $hxClasses["lime.system._Locale.Locale_Impl_"] = Locale_Impl_;
// Init
// Statics
Locale_Impl_._new = function(value) {
var this1 = value;
return this1;
}
Locale_Impl_.equals = function(a,b) {
var language = Locale_Impl_.get_language(a);
var region = Locale_Impl_.get_region(a);
var language2 = Locale_Impl_.get_language(b);
var region2 = Locale_Impl_.get_region(b);
var languageMatch = language == language2;
var regionMatch = region == region2;
if(!languageMatch && language != null && language2 != null) {
languageMatch = language.toLowerCase() == language2.toLowerCase();
}
if(!regionMatch && region != null && region2 != null) {
regionMatch = region.toLowerCase() == region2.toLowerCase();
}
if(languageMatch) {
return regionMatch;
} else {
return false;
}
}
Locale_Impl_.__init = function() {
if(Locale_Impl_.__systemLocale == null) {
var locale = null;
locale = navigator.language;
if(locale != null) {
Locale_Impl_.__systemLocale = locale;
} else {
Locale_Impl_.__systemLocale = "en-US";
}
Locale_Impl_.set_currentLocale(Locale_Impl_.__systemLocale);
}
}
Locale_Impl_.get_language = function(this1) {
if(this1 != null) {
var index = this1.indexOf("_");
if(index > -1) {
return this1.substring(0,index);
}
index = this1.indexOf("-");
if(index > -1) {
return this1.substring(0,index);
}
}
return this1;
}
Locale_Impl_.get_region = function(this1) {
if(this1 != null) {
var underscoreIndex = this1.indexOf("_");
var dotIndex = this1.indexOf(".");
var dashIndex = this1.indexOf("-");
if(underscoreIndex > -1) {
if(dotIndex > -1) {
return this1.substring(underscoreIndex + 1,dotIndex);
} else {
return this1.substring(underscoreIndex + 1);
}
} else if(dashIndex > -1) {
if(dotIndex > -1) {
return this1.substring(dashIndex + 1,dotIndex);
} else {
return this1.substring(dashIndex + 1);
}
}
}
return null;
}
Locale_Impl_.get_currentLocale = function() {
Locale_Impl_.__init();
return Locale_Impl_.currentLocale;
}
Locale_Impl_.set_currentLocale = function(value) {
Locale_Impl_.__init();
return Locale_Impl_.currentLocale = value;
}
Locale_Impl_.get_systemLocale = function() {
Locale_Impl_.__init();
return Locale_Impl_.__systemLocale;
}
// Export
exports.default = Locale_Impl_;

View File

@@ -0,0 +1,39 @@
// Class: lime.system._ThreadPool.ThreadPoolMessage
var $global = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = require("./../../../hxClasses_stub").default;
// Constructor
var ThreadPoolMessage = function(type,state) {
this.type = type;
this.state = state;
}
// Meta
ThreadPoolMessage.__name__ = ["lime","system","_ThreadPool","ThreadPoolMessage"];
ThreadPoolMessage.prototype = {
};
ThreadPoolMessage.prototype.__class__ = $hxClasses["lime.system._ThreadPool.ThreadPoolMessage"] = ThreadPoolMessage;
// Init
// Statics
// Export
exports.default = ThreadPoolMessage;

View File

@@ -0,0 +1,37 @@
// Enum: lime.system._ThreadPool.ThreadPoolMessageType
var $global = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
// Imports
var $estr = require("./../../../estr_stub").default;
var $hxClasses = require("./../../../hxClasses_stub").default;
// Definition
var ThreadPoolMessageType = $hxClasses["lime.system._ThreadPool.ThreadPoolMessageType"] = { __ename__: ["lime","system","_ThreadPool","ThreadPoolMessageType"], __constructs__: ["COMPLETE","ERROR","EXIT","PROGRESS","WORK"] }
ThreadPoolMessageType.PROGRESS = ["PROGRESS",3];
ThreadPoolMessageType.PROGRESS.toString = $estr;
ThreadPoolMessageType.PROGRESS.__enum__ = ThreadPoolMessageType;
ThreadPoolMessageType.COMPLETE = ["COMPLETE",0];
ThreadPoolMessageType.COMPLETE.toString = $estr;
ThreadPoolMessageType.COMPLETE.__enum__ = ThreadPoolMessageType;
ThreadPoolMessageType.WORK = ["WORK",4];
ThreadPoolMessageType.WORK.toString = $estr;
ThreadPoolMessageType.WORK.__enum__ = ThreadPoolMessageType;
ThreadPoolMessageType.ERROR = ["ERROR",1];
ThreadPoolMessageType.ERROR.toString = $estr;
ThreadPoolMessageType.ERROR.__enum__ = ThreadPoolMessageType;
ThreadPoolMessageType.EXIT = ["EXIT",2];
ThreadPoolMessageType.EXIT.toString = $estr;
ThreadPoolMessageType.EXIT.__enum__ = ThreadPoolMessageType;
exports.default = ThreadPoolMessageType;