libui-node
Advanced tools
Comparing version 0.0.10 to 0.0.11
29
index.js
var nbind = require('nbind'); | ||
var binding = nbind.init(__dirname); | ||
var Ui = binding.lib.Ui; | ||
var loopRunning = false; | ||
module.exports = binding.lib; | ||
function stopLoop() { | ||
if (!loopRunning) { | ||
return; | ||
} | ||
loopRunning = false; | ||
Ui.quit(); | ||
binding.lib.EventLoop.stop(); | ||
} | ||
function startLoop(cb) { | ||
function step() { | ||
Ui.mainStep(false); | ||
if (loopRunning) { | ||
setTimeout(step); | ||
} else if (cb) { | ||
cb(); | ||
} | ||
} | ||
if (loopRunning) { | ||
return; | ||
} | ||
loopRunning = true; | ||
Ui.mainSteps(); | ||
step(); | ||
function startLoop() { | ||
binding.lib.EventLoop.start(); | ||
} | ||
@@ -35,0 +14,0 @@ |
{ | ||
"name": "libui-node", | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"description": "Node.js bindings for libui", | ||
@@ -50,2 +50,4 @@ "repository": "parro-it/libui-node", | ||
"ava": "^0.14.0", | ||
"humanize": "0.0.9", | ||
"proc-stats": "0.0.4", | ||
"xo": "^0.14.0" | ||
@@ -52,0 +54,0 @@ }, |
@@ -49,3 +49,3 @@ # libui-node | ||
Windows built script is not supported for the moment, I yet hadn't get the time to write build script to it. | ||
Windows is not supported for the moment, I didn't yet get the time to write build script for it. | ||
@@ -52,0 +52,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
82690
59
4
94