Code Monkey home page Code Monkey logo

wxnode's Introduction

Feel free to use this module but, I am no longer supporting it in favor of AppJs

wxNode

node.js wrapper for wxWidgets.

Installation Linux

  • Download and install wxWidgets 2.9.3.
$ npm install wxnode

Installation Windows

  • Download wxWidgets 2.9.3.
  • Download and install node from source (release, 64-bit) "vcbuild.bat release"
cd d:\dev\wxWidgets-2.9.3\build\msw
nmake -f makefile.vc BUILD=release UNICODE=1 RUNTIME_LIBS=static DEBUG_FLAG=0
set WXWIN=d:\dev\wxWidgets-2.9.3
set WXCFG=vc_lib\mswu
cd d:\dev\wxNode
node mnm.js build

Try an example

node examples/helloWorld.js
node examples/...

Quick Examples

var wx = require("wxnode");

var MyApp = wx.App.extend({
  onInit: function() {
    var location = new wx.Point(50, 50);
    var size = new wx.Size(450, 340);
    var frame = new MyFrame("Hello World", location, size);
    frame.show(true);
    this.setTopWindow(frame);
    return true;
  }
});

var MyFrame = wx.Frame.extend({
  init: function(title, pos, size) {
    this._super(null, -1, title, pos, size);

    this.EVT_CLOSE(this.onClose);
  },

  onClose: function(event) {
    process.exit();
  }
});

var app = new MyApp();
app.run();

Building wxWidgets linux

$ sudo apt-get install libwebkitgtk-dev
$ sudo ldconfig
$ ./configure --enable-webview --enable-webview-webkit && make
$ sudo make install
## Creating wxapi.xml from wxWidgets
$ sudo apt-get install libwebkitgtk-dev
$ cd wxWidgets-2.9.3/docs/doxygen
$ ./regen.sh xml
$ cd ../..
$ ./configure --enable-webview --enable-webview-webkit
$ patch -p0 -i ~/wxNode/rungccxml.sh.patch
$ patch -p0 -i ~/wxNode/strvararg.h.patch
$ cd utils/ifacecheck/
$ ./rungccxml.sh
$ cp wxapi.xml ~/wxNode/wxapi.xml
$ cd ~/wxNode
$ rm wxapi.json
$ rm -rf build
$ ./render-templates.js && ./mnm.js build

wxnode's People

Contributors

joeferner avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.