forked from parro-it/libui-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
251 additions
and
137 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 |
---|---|---|
|
@@ -91,3 +91,8 @@ build | |
*.dylib | ||
|
||
auto*.gypi | ||
_libui | ||
|
||
*.h | ||
|
||
*.dylib |
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,3 +0,0 @@ | ||
[submodule "libui"] | ||
path = libui | ||
url = https://github.com/andlabs/libui.git | ||
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
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
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,47 @@ | ||
var libui = require('../index.js'); | ||
|
||
libui.Ui.init(); | ||
var win = new libui.UiWindow('Forms window', 800, 600, false); | ||
win.margined = 1; | ||
win.onClosing(function () { | ||
libui.stopLoop(); | ||
}); | ||
|
||
var hBox = new libui.UiHorizontalBox(); | ||
hBox.padded = true; | ||
|
||
var name = new libui.UiEntry(); | ||
var surname = new libui.UiEntry(); | ||
var age = new libui.UiSlider(0, 100); | ||
var JSONData = new libui.UiMultilineEntry(); | ||
|
||
name.onChanged(setJSON); | ||
surname.onChanged(setJSON); | ||
age.onChanged(setJSON); | ||
|
||
name.text = 'Andrea'; | ||
surname.text = 'Parodi'; | ||
age.value = 40; | ||
|
||
var form = new libui.UiForm(); | ||
form.padded = true; | ||
form.append('name', name, 0); | ||
form.append('surname', surname, 0); | ||
form.append('age', age, 0); | ||
|
||
hBox.append(form, 1); | ||
hBox.append(JSONData, 1); | ||
|
||
win.setChild(hBox); | ||
win.show(); | ||
libui.startLoop(); | ||
|
||
function setJSON() { | ||
var data = { | ||
name: name.text, | ||
surname: surname.text, | ||
age: age.value | ||
}; | ||
JSONData.text = JSON.stringify(data, null, 4); | ||
} | ||
|
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
Submodule libui
deleted from
ec15e2
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,50 +1,58 @@ | ||
{ | ||
"name": "libui-node", | ||
"version": "0.0.0", | ||
"description": "Node.js bindings for libui", | ||
"repository": "parro-it/libui-node", | ||
"license": "MIT", | ||
"contributors": [ | ||
{ | ||
"name": "Chan Guan Hao", | ||
"email": "[email protected]", | ||
"url": "http://mavenave.me" | ||
}, | ||
{ | ||
"name": "Andrea Parodi", | ||
"email": "[email protected]", | ||
"url": "http://www.parro.it" | ||
} | ||
], | ||
"scripts": { | ||
"test": "NO_AT_BRIDGE=1 ava && xo", | ||
"start": "NO_AT_BRIDGE=1 node examples/control-gallery.js", | ||
"start-np": "NO_AT_BRIDGE=1 node examples/node-pad.js", | ||
"start-core": "NO_AT_BRIDGE=1 node examples/core-api.js", | ||
"autogypi": "autogypi", | ||
"node-gyp": "node-gyp", | ||
"install": "npm run build:libui && autogypi && npm run build", | ||
"build:libui": "mkdir -p libui/build && cd libui/build && cmake .. && make && cd ../..", | ||
"build": "node-gyp configure build || echo failed" | ||
}, | ||
"keywords": [ | ||
"libui", | ||
"desktop", | ||
"GUI" | ||
], | ||
"engines": { | ||
"node": ">=0.12" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"devDependencies": { | ||
"ava": "^0.14.0", | ||
"xo": "^0.14.0" | ||
}, | ||
"dependencies": { | ||
"autogypi": "^0.2.2", | ||
"nbind": "^0.2.1", | ||
"node-gyp": "^3.3.1" | ||
} | ||
"name": "libui-node", | ||
"version": "0.0.9", | ||
"description": "Node.js bindings for libui", | ||
"repository": "parro-it/libui-node", | ||
"license": "MIT", | ||
"libui": "pre5.alpha.4", | ||
"contributors": [ | ||
{ | ||
"name": "Chan Guan Hao", | ||
"email": "[email protected]", | ||
"url": "http://mavenave.me" | ||
}, | ||
{ | ||
"name": "Andrea Parodi", | ||
"email": "[email protected]", | ||
"url": "http://www.parro.it" | ||
} | ||
], | ||
"scripts": { | ||
"test": "NO_AT_BRIDGE=1 ava && xo", | ||
"start": "NO_AT_BRIDGE=1 node examples/control-gallery.js", | ||
"start-np": "NO_AT_BRIDGE=1 node examples/node-pad.js", | ||
"start-core": "NO_AT_BRIDGE=1 node examples/core-api.js", | ||
"autogypi": "autogypi", | ||
"node-gyp": "node-gyp", | ||
"install": "libui-download ${npm_package_libui} && autogypi && npm run build", | ||
"build": "node-gyp configure build", | ||
"clean": "rm -rf build; rm *.h; rm *.dylib" | ||
}, | ||
"keywords": [ | ||
"libui", | ||
"desktop", | ||
"multiplatform", | ||
"GUI" | ||
], | ||
"engines": { | ||
"node": ">=0.12" | ||
}, | ||
"files": [ | ||
"index.js", | ||
"src", | ||
"binding.gyp", | ||
"auto-top.gypi", | ||
"auto.gypi", | ||
"autogypi.json" | ||
], | ||
"devDependencies": { | ||
"ava": "^0.14.0", | ||
"xo": "^0.14.0" | ||
}, | ||
"dependencies": { | ||
"autogypi": "^0.2.2", | ||
"libui-download": "0.0.3", | ||
"nbind": "^0.2.1", | ||
"node-gyp": "^3.3.1" | ||
} | ||
} |
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
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,4 +1,4 @@ | ||
#include "../libui/ui.h" | ||
#include "../ui.h" | ||
#include "ui-node.h" | ||
#include "nbind/nbind.h" | ||
|
||
|
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,4 +1,4 @@ | ||
#include "../libui/ui.h" | ||
#include "../ui.h" | ||
#include "ui-node.h" | ||
#include "nbind/nbind.h" | ||
|
||
|
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,4 +1,4 @@ | ||
#include "../libui/ui.h" | ||
#include "../ui.h" | ||
#include "ui-node.h" | ||
#include "nbind/nbind.h" | ||
|
||
|
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,4 +1,4 @@ | ||
#include "../libui/ui.h" | ||
#include "../ui.h" | ||
#include "nbind/api.h" | ||
#include "nbind/nbind.h" | ||
|
||
|
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
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
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
Oops, something went wrong.