Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

libui

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

libui - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

example.js

121

index.js

@@ -1,120 +0,1 @@

const libui = require('./build/Release/libui');
libui.init();
const menu = new libui.Menu('File', [
{
label: 'Open',
type: 'item',
onClick: () => {
const filepath = window.openFile();
if (!filepath) {
window.msgBox('No file selected', "Don't be alarmed");
return;
}
window.msgBox('File selected', filepath);
}
},
{
label: 'Save',
type: 'item',
onClick: () => {
const filepath = window.saveFile();
if (!filepath) {
window.msgBox('No file selected', "Don't be alarmed");
return;
}
window.msgBox('File selected', filepath);
},
},
{
type: 'about',
onClick: () => {
console.log('about');
},
},
{
type: 'check',
label: 'Check this',
onClick: () => {
console.log('check');
},
},
{
type: 'preferences',
onClick: () => {
console.log('preferences');
},
},
]); // has to come before window
const window = new libui.Window({
title: 'Cool',
width: 700,
height: 700,
hasMenu: true,
margined: false,
onClosing: (err) => {
console.log('exited')
},
});
libui.render();
/*
<Window>
<View>
<Group title="Controls">
<Button onClick>Button</Button>
<CheckBox onToggle>CheckBox</CheckBox>
<TextInput onChange />
<Text>Text</Text>
<HorizontalSeparator />
<DatePicker />
<TimePicker />
<DateTimePicker />
<FontButton />
<ColorButton />
</Group>
</View>
<View>
<Group title="Numbers">
<SpinBox min=0 max=100 />
<Slider min=0 max=100 />
<ProgressBar value=50 />
</Group>
<Group title="Lists">
<ComboBox>
<ComboBox.Item>1</ComboBox.Item>
<ComboBox.Item>2</ComboBox.Item>
<ComboBox.Item>3</ComboBox.Item>
</ComboBox>
<EditableComboBox>
<ComboBox.Item>1</ComboBox.Item>
<ComboBox.Item>2</ComboBox.Item>
<ComboBox.Item>3</ComboBox.Item>
</EditableComboBox>
<RadioButtons>
<RadioButtons.Button>1</RadioButtons.Button>
<RadioButtons.Button>2</RadioButtons.Button>
<RadioButtons.Button>3</RadioButtons.Button>
</RadioButtons>
<Tab>
<Tab.Page title="Page 1">
<View>
</View>
</Tab.Page>
<Tab.Page title="Page 2">
<View>
</View>
</Tab.Page>
<Tab.Page title="Page 3">
<View>
</View>
</Tab.Page>
</Tab>
</Group>
</View>
</Window>
*/
module.exports = require('./build/Release/libui');
{
"name": "libui",
"version": "0.0.0",
"version": "0.0.1",
"description": "Node.js bindings for libui",
"main": "hello.js",
"main": "index.js",
"keywords": [
"libui",
"desktop",
"GUI"
],
"repository": {
"type": "git",
"url": "git://github.com/mavenave/libui.js.git"
},
"license": "MIT",
"author": {
"name": "Chan Guan Hao",
"email": "guanhao3797@gmail.com",
"url": "http://mavenave.me"
},
"gypfile": true,

@@ -11,5 +26,5 @@ "engines": {

"scripts": {
"start": "node index.js",
"build": "cd libui; make; cd ..; node-gyp build"
"example": "node example.js",
"postinstall": "cd libui; make; cd ..; node-gyp build"
}
}

@@ -5,3 +5,12 @@ libui.js

[![NPM module](https://img.shields.io/npm/v/libui.svg)](https://npmjs.org/package/libui)
[![NPM downloads](https://img.shields.io/npm/dt/libui.svg)](https://npmjs.org/package/libui)
Installation
---
```
npm install libui
```
Example

@@ -8,0 +17,0 @@ ---

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc