-
Notifications
You must be signed in to change notification settings - Fork 33
Linux Support Status
This contains information for individuals who want to contribute to the Linux build of Tint. To start, ensure you've installed and met the dependencies listed in the README.md. You can also find compilation/build instructions there too.
There are two major items that need to be accomplished in GTK:
- Support of the same auto-layout system within Gtk. The cassowary constraint solver is used in Windows to accomplish this. To my knowledge, no system is supported in Gtk to provide auto-layout support. You can see the port to Windows (which is a loose WPF wrapper around the CCS C++ implementation at https://github.com/trueinteractions/wpf-autolayout/, effectively if no existing auto layout implementation exists the implementation at the previous URL would need to be ported to Gtk).
- Creating GTK versions of all of the classes in Tint (window, button, etc) within Gtk, some of these should be fairly straight forward (e.g., WebView ports Gtk's implementation of webview, Window to Gtk's Window). Much of this work is making sure the values/behavior/actions are the same on linux vs other operating systems. This is mostly defined by the existing API in our docs, and the unit tests.
For more information on minor items that need to be done, see below.
-
Add linux dependencies and build support to tools.sh(DONE) -
Add linux support for gyp(DONE) -
Add configuration params for linux to build steps(DONE) -
Add application GTK boot-event loop to node(DONE) -
node-gir needs upgrade to v0.12.0(DONE) -
Build in bridge (modules/Bridge/Bridge_gtk.js) based on libraries/gir/gir.js to import objects(DONE). -
Memory tests for GIR/gobject introspection on GIR.(DONE) -
Performance tests for GIR/gobject introspection on GIR.(DONE) - Add build system (circle-ci?) (in progress)
- Add linux support to unit tests
- Add gtk auto-layout support (see cassowary constraint solver)
- Add windows, control, container javascript object
- Add webview, textinput, etc javascript classes
- Add linux documentation
- Full pass of existing unit tests
- Add packaging support..... ?..
GObject Introspection is a library that retrieves or reflects other C/C++ classes back to Javascript thats built in to Tint (using node-gir). The module interface can be found after using require('Bridge') at process.bridge.gobj
Currently theres only two methods search_path() and load(), load takes one argument, the name of the library to load (for example var libxml = process.bridge.gobj.load('libxml2');) For more info on using native objects see: https://github.com/creationix/node-gir/tree/master/examples
require('Bridge');
process.bridge.gobj.load('Gtk', '3.0');
var win = new process.bridge.gobj.Gtk.Window({type:gtk.WindowType.toplevel, title:'Hello World'});
win.show();// Setup bridge, load Gtk
require('Application');
// Gtk is already loaded, load WebKit for this example.
process.bridge.gobj.load('WebKit');
// For berevity.
var $ = process.bridge.gobj.Gtk;
var $$ = process.bridge.gobj.WebKit;
// create a new window
var win = new $.Window({type:$.WindowType.toplevel});
win.title = 'WebKit example in GTK.';
win.resize_to_geometry(640,480);
// create a scroll view to place the webview in.
var sw = new $.ScrolledWindow();
win.add(sw);
var view = new $$.WebView();
view.load_uri("https://www.trueinteractions.com/tint2/docs/");
sw.add(view);
// Note, do not use win.show() unless only the top window (and none of the children) will be shown.
win.show_all();