gtkmust

package module
v0.0.0-...-54f50bd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2019 License: ISC Imports: 2 Imported by: 0

README

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()
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AboutDialogNew

func AboutDialogNew() *gtk.AboutDialog

func ApplicationNew

func ApplicationNew(appId string, flags glib.ApplicationFlags) *gtk.Application

func ApplicationWindowNew

func ApplicationWindowNew(app *gtk.Application) *gtk.ApplicationWindow

func BoxNew

func BoxNew(o gtk.Orientation, spacing int) *gtk.Box

func ButtonNew

func ButtonNew() *gtk.Button

func ButtonNewWithLabel

func ButtonNewWithLabel(label string) *gtk.Button

func CellRendererPixbufNew

func CellRendererPixbufNew() *gtk.CellRendererPixbuf

func CellRendererTextNew

func CellRendererTextNew() *gtk.CellRendererText

func DialogNew

func DialogNew() *gtk.Dialog

func FileChooserDialogNewWith1Button

func FileChooserDialogNewWith1Button(title string,
	parent *gtk.Window,
	action gtk.FileChooserAction,
	first_button_text string,
	first_button_id gtk.ResponseType) *gtk.FileChooserDialog

func FileChooserDialogNewWith2Buttons

func FileChooserDialogNewWith2Buttons(title string,
	parent *gtk.Window,
	action gtk.FileChooserAction,
	first_button_text string,
	first_button_id gtk.ResponseType,
	second_button_text string,
	second_button_id gtk.ResponseType) *gtk.FileChooserDialog

func ImageNew

func ImageNew() *gtk.Image

func LabelNew

func LabelNew(label string) *gtk.Label

func ListStoreNew

func ListStoreNew(types ...glib.Type) *gtk.ListStore
func MenuBarNew() *gtk.MenuBar
func MenuItemNew() *gtk.MenuItem
func MenuItemNewWithMnemonic(label string) *gtk.MenuItem
func MenuNew() *gtk.Menu

func MustBox

func MustBox(res *gtk.Box, err error) *gtk.Box

func MustSList

func MustSList(res *glib.SList, err error) *glib.SList

func MustTreeSelection

func MustTreeSelection(res *gtk.TreeSelection, err error) *gtk.TreeSelection

func ScrolledWindowNew

func ScrolledWindowNew(h *gtk.Adjustment, v *gtk.Adjustment) *gtk.ScrolledWindow

func TargetEntryNew

func TargetEntryNew(target string, flags gtk.TargetFlags, info uint) *gtk.TargetEntry

func TreeViewColumnNew

func TreeViewColumnNew() *gtk.TreeViewColumn

func TreeViewColumnNewWithAttribute

func TreeViewColumnNewWithAttribute(title string, renderer gtk.ICellRenderer, attribute string, column int) *gtk.TreeViewColumn

func TreeViewNew

func TreeViewNew() *gtk.TreeView

func WindowNew

func WindowNew(t gtk.WindowType) *gtk.Window

Types

This section is empty.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL