Created
July 22, 2016 23:40
-
-
Save hfiguiere/ccf1ab6aa15320584c8e469a40ce8eaf to your computer and use it in GitHub Desktop.
Sample AbiWidget in Python and JS.
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
var Gtk = imports.gi.Gtk; | |
var Abi = imports.gi.Abi; | |
Gtk.init(null, null) | |
var win = new Gtk.Window({title: 'AbiWord.js'}); | |
Abi.init([]); | |
var widget = new Abi.Widget(); | |
win.add(widget); | |
win.connect('delete-event', Gtk.main_quit); | |
win.show_all(); | |
Gtk.main(); |
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
import gi | |
gi.require_version('Abi', '3.0') | |
from gi.repository import Abi | |
gi.require_version('Gtk', '3.0') | |
from gi.repository import Gtk | |
win = Gtk.Window(title="PyAbiword") | |
Abi.init([]) | |
widget = Abi.Widget() | |
win.add(widget) | |
win.connect("delete-event", Gtk.main_quit) | |
win.show_all() | |
Gtk.main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment