This repo houses GTK3 bindings for the Neat language.
- Add a dependency to this repo to your package.json:
"dependencies": { "gtk": "*" }, "sources": { "gtk": "https://github.com/neat-lang/gtk" }
- Import the library:
import gtk;
- Substitute functions as such:
gtk_window_new("Hello World")
=>Window.new("Hello World")
gtk_window_set_title(window, "Window")
=>window.setTitle("Window")
- Connect signals as such:
connectSignal(widget, "name", &fun)
where fun is a nested function or method. Note thatfun
has to outlive the signal connection!