Skip to content

lidaobing/gtkmust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GTKMust - a wrapper on github.com/gotk3/gotk3

GoDoc

I knew that I don't know how to deal with error returned by gotk3, so just panic.

Sample Usage

package main

import (
	"github.com/gotk3/gotk3/gtk"
	"github.com/lidaobing/gtkmust"
)

func main() {
	// Initialize GTK without parsing any command line arguments.
	gtk.Init(nil)

	// Create a new toplevel window, set its title, and connect it to the
	// "destroy" signal to exit the GTK main loop when it is destroyed.
	win := gtkmust.WindowNew(gtk.WINDOW_TOPLEVEL)
	win.SetTitle("Simple Example")
	win.Connect("destroy", func() {
		gtk.MainQuit()
	})

	// Create a new label widget to show in the window.
	l := gtkmust.LabelNew("Hello, gotk3!")

	// Add the label to the window.
	win.Add(l)

	// Set the default window size.
	win.SetDefaultSize(800, 600)

	// Recursively show all widgets contained in this window.
	win.ShowAll()

	// Begin executing the GTK main loop.  This blocks until
	// gtk.MainQuit() is run.
	gtk.Main()
}

About

a wrapper on github.com/gotk3/gotk3

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages