JSGtk+ examples showing how to build Gtk JavaScript applications.
All examples were originally based on GJS, here readapted to use part of jsgtk features.
Download this project with:
git clone https://github.com/WebReflection/jsgtk-examples.git
cd jsgtk-examples
Then install jsgtk
via npm install -g jsgtk
and run the examples with:
jsgtk egAsset
jsgtk egHeader
jsgtk egList
jsgtk egSearch
# ... etc ...
Some demo requires extra packages on OSX MacPorts such clutter-gtk
and/or webkit2-gtk
.
JSGtk+ example showing how to build Gtk javascript applications using Gtk.Image
JSGtk+ example showing how to build Gtk javascript applications setting the application icon from the 'assets' folder and if not available from the 'stock icons'
JSGtk+ example showing how to build Gtk javascript applications using Gtk.CssProvider from source code or from loaded .css files
JSGtk+ example showing how to build Gtk javascript applications using Gtk.Label and its justification options
JSGtk+ example showing how to build Gtk javascript applications emulating setTimeout, clearTimeout, setInterval and clearInterval functions with Mainloop timeout_add. It also shows how to import and use an application library
JSGtk+ example showing how to build Gtk javascript applications using Gtk.EventBox to catch events for widgets which do not have their own window
JSGtk+ example showing how to build Gtk javascript applications executing a non blocking command line call, it uses TextBuffer, TextView, GLib.spawn_async_with_pipes, Gio.UnixInputStream, Gio.DataInputStream and read_line_async
JSGtk+ example showing how to build Gtk javascript applications getting information from GLib and command line
JSGtk+ example showing how to build Gtk javascript applications adding an option to the application's Gio.Menu and opening dialog and modal windows using Gtk.Dialog
JSGtk+ example showing how to build Gtk javascript applications using Gtk TreeView and ListStore
JSGtk+ example showing how to build Gtk javascript applications reading and writting JSON files
JSGtk+ example showing how to build Gtk javascript applications with FileChooserDialog with FileFilter, setExtraWidget (ComboBox)
JSGtk+ example showing how to build Gtk javascript applications using Gtk HeaderBar, and Popover buttons with Gtk Widget or Gio GMenu.
JSGtk+ example showing how to build Gtk javascript applications using Gtk HeaderBar, SearchBar and a filtered FlowBox
JSGtk+ example showing how to build Gtk javascript applications using Gtk HeaderBar, SearchBar, ActionBar, a filtered FlowBox, an application library and custom widgets to create a selection mode
JSGtk+ example showing how to build Gtk javascript applications using Gtk and Clutter, showing how to drag actors with Clutter.DragAction, perform animations with PropertyTransition, TransitionGroup and control the actor from Gtk.Scale
JSGtk+ example showing how to build Gtk javascript applications using Gtk and Cairo, the left example adds one Cairo actor to Clutter, the example on the right adds one Cairo widget to GTK using GtkClutter.Embed, Gtk.DrawingArea, Cairo.Context, Clutter.Canvas
JSGtk+ example showing how to build Gtk javascript applications using WebKit2.WebView, also showing how to send messages from GTK to Webkit and vice versa