Skip to content

Latest commit

 

History

History
22 lines (19 loc) · 680 Bytes

README.md

File metadata and controls

22 lines (19 loc) · 680 Bytes

About

This repo houses GTK3 bindings for the Neat language.

Usage

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