gtk

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2020 License: ISC Imports: 13 Imported by: 0

Documentation

Overview

Go bindings for GTK+ 3. Supports version 3.6 and later.

Functions use the same names as the native C function calls, but use CamelCase. In cases where native GTK uses pointers to values to simulate multiple return values, Go's native multiple return values are used instead. Whenever a native GTK call could return an unexpected NULL pointer, an additional error is returned in the Go binding.

GTK's C API documentation can be very useful for understanding how the functions in this package work and what each type is for. This documentation can be found at https://developer.gnome.org/gtk3/.

In addition to Go versions of the C GTK functions, every struct type includes a method named Native (either by direct implementation, or by means of struct embedding). These methods return a uintptr of the native C object the binding type represents. These pointers may be type switched to a native C pointer using unsafe and used with cgo function calls outside this package.

Memory management is handled in proper Go fashion, using runtime finalizers to properly free memory when it is no longer needed. Each time a Go type is created with a pointer to a GObject, a reference is added for Go, sinking the floating reference when necessary. After going out of scope and the next time Go's garbage collector is run, a finalizer is run to remove Go's reference to the GObject. When this reference count hits zero (when neither Go nor GTK holds ownership) the object will be freed internally by GTK.

Index

Constants

View Source
const (
	ICON_LOOKUP_NO_SVG           IconLookupFlags = C.GTK_ICON_LOOKUP_NO_SVG
	ICON_LOOKUP_FORCE_SVG                        = C.GTK_ICON_LOOKUP_FORCE_SVG
	ICON_LOOKUP_USE_BUILTIN                      = C.GTK_ICON_LOOKUP_USE_BUILTIN
	ICON_LOOKUP_GENERIC_FALLBACK                 = C.GTK_ICON_LOOKUP_GENERIC_FALLBACK
	ICON_LOOKUP_FORCE_SIZE                       = C.GTK_ICON_LOOKUP_FORCE_SIZE
)
View Source
const (
	SORT_COLUMN_DEFAULT  int = -1
	SORT_COLUMN_UNSORTED int = -2
)

Use as column id in SetSortColumnId to specify ListStore sorted by default column or unsorted

View Source
const (
	LEVEL_BAR_OFFSET_LOW  string = C.GTK_LEVEL_BAR_OFFSET_LOW
	LEVEL_BAR_OFFSET_HIGH string = C.GTK_LEVEL_BAR_OFFSET_HIGH
)

stock offset macro values of GtkLevelBar

View Source
const (
	UNIT_PIXEL           int    = C.GTK_UNIT_PIXEL
	PAPER_NAME_A3        string = C.GTK_PAPER_NAME_A3
	PAPER_NAME_A4        string = C.GTK_PAPER_NAME_A4
	PAPER_NAME_A5        string = C.GTK_PAPER_NAME_A5
	PAPER_NAME_B5        string = C.GTK_PAPER_NAME_B5
	PAPER_NAME_LETTER    string = C.GTK_PAPER_NAME_LETTER
	PAPER_NAME_EXECUTIVE string = C.GTK_PAPER_NAME_EXECUTIVE
	PAPER_NAME_LEGAL     string = C.GTK_PAPER_NAME_LEGAL
)
View Source
const (
	PRINT_SETTINGS_PRINTER              string = C.GTK_PRINT_SETTINGS_PRINTER
	PRINT_SETTINGS_ORIENTATION          string = C.GTK_PRINT_SETTINGS_ORIENTATION
	PRINT_SETTINGS_PAPER_FORMAT         string = C.GTK_PRINT_SETTINGS_PAPER_FORMAT
	PRINT_SETTINGS_PAPER_WIDTH          string = C.GTK_PRINT_SETTINGS_PAPER_WIDTH
	PRINT_SETTINGS_PAPER_HEIGHT         string = C.GTK_PRINT_SETTINGS_PAPER_HEIGHT
	PRINT_SETTINGS_USE_COLOR            string = C.GTK_PRINT_SETTINGS_USE_COLOR
	PRINT_SETTINGS_COLLATE              string = C.GTK_PRINT_SETTINGS_COLLATE
	PRINT_SETTINGS_REVERSE              string = C.GTK_PRINT_SETTINGS_REVERSE
	PRINT_SETTINGS_DUPLEX               string = C.GTK_PRINT_SETTINGS_DUPLEX
	PRINT_SETTINGS_QUALITY              string = C.GTK_PRINT_SETTINGS_QUALITY
	PRINT_SETTINGS_N_COPIES             string = C.GTK_PRINT_SETTINGS_N_COPIES
	PRINT_SETTINGS_NUMBER_UP            string = C.GTK_PRINT_SETTINGS_NUMBER_UP
	PRINT_SETTINGS_NUMBER_UP_LAYOUT     string = C.GTK_PRINT_SETTINGS_NUMBER_UP_LAYOUT
	PRINT_SETTINGS_RESOLUTION           string = C.GTK_PRINT_SETTINGS_RESOLUTION
	PRINT_SETTINGS_RESOLUTION_X         string = C.GTK_PRINT_SETTINGS_RESOLUTION_X
	PRINT_SETTINGS_RESOLUTION_Y         string = C.GTK_PRINT_SETTINGS_RESOLUTION_Y
	PRINT_SETTINGS_PRINTER_LPI          string = C.GTK_PRINT_SETTINGS_PRINTER_LPI
	PRINT_SETTINGS_SCALE                string = C.GTK_PRINT_SETTINGS_SCALE
	PRINT_SETTINGS_PRINT_PAGES          string = C.GTK_PRINT_SETTINGS_PRINT_PAGES
	PRINT_SETTINGS_PAGE_RANGES          string = C.GTK_PRINT_SETTINGS_PAGE_RANGES
	PRINT_SETTINGS_PAGE_SET             string = C.GTK_PRINT_SETTINGS_PAGE_SET
	PRINT_SETTINGS_DEFAULT_SOURCE       string = C.GTK_PRINT_SETTINGS_DEFAULT_SOURCE
	PRINT_SETTINGS_MEDIA_TYPE           string = C.GTK_PRINT_SETTINGS_MEDIA_TYPE
	PRINT_SETTINGS_DITHER               string = C.GTK_PRINT_SETTINGS_DITHER
	PRINT_SETTINGS_FINISHINGS           string = C.GTK_PRINT_SETTINGS_FINISHINGS
	PRINT_SETTINGS_OUTPUT_BIN           string = C.GTK_PRINT_SETTINGS_OUTPUT_BIN
	PRINT_SETTINGS_OUTPUT_DIR           string = C.GTK_PRINT_SETTINGS_OUTPUT_DIR
	PRINT_SETTINGS_OUTPUT_BASENAME      string = C.GTK_PRINT_SETTINGS_OUTPUT_BASENAME
	PRINT_SETTINGS_OUTPUT_FILE_FORMAT   string = C.GTK_PRINT_SETTINGS_OUTPUT_FILE_FORMAT
	PRINT_SETTINGS_OUTPUT_URI           string = C.GTK_PRINT_SETTINGS_OUTPUT_URI
	PRINT_SETTINGS_WIN32_DRIVER_EXTRA   string = C.GTK_PRINT_SETTINGS_WIN32_DRIVER_EXTRA
	PRINT_SETTINGS_WIN32_DRIVER_VERSION string = C.GTK_PRINT_SETTINGS_WIN32_DRIVER_VERSION
)
View Source
const (
	STYLE_PROVIDER_PRIORITY_FALLBACK    StyleProviderPriority = C.GTK_STYLE_PROVIDER_PRIORITY_FALLBACK
	STYLE_PROVIDER_PRIORITY_THEME                             = C.GTK_STYLE_PROVIDER_PRIORITY_THEME
	STYLE_PROVIDER_PRIORITY_SETTINGS                          = C.GTK_STYLE_PROVIDER_PRIORITY_SETTINGS
	STYLE_PROVIDER_PRIORITY_APPLICATION                       = C.GTK_STYLE_PROVIDER_PRIORITY_APPLICATION
	STYLE_PROVIDER_PRIORITY_USER                              = C.GTK_STYLE_PROVIDER_PRIORITY_USER
)
View Source
const (
	TREE_VIEW_COLUMN_GROW_ONLY TreeViewColumnSizing = C.GTK_TREE_VIEW_COLUMN_GROW_ONLY
	TREE_VIEW_COLUMN_AUTOSIZE                       = C.GTK_TREE_VIEW_COLUMN_AUTOSIZE
	TREE_VIEW_COLUMN_FIXED                          = C.GTK_TREE_VIEW_COLUMN_FIXED
)
View Source
const (
	LEVEL_BAR_OFFSET_FULL string = C.GTK_LEVEL_BAR_OFFSET_FULL
)

Variables

View Source
var WrapMap = map[string]WrapFn{
	"GtkAccelGroup":           wrapAccelGroup,
	"GtkAccelMao":             wrapAccelMap,
	"GtkAdjustment":           wrapAdjustment,
	"GtkApplicationWindow":    wrapApplicationWindow,
	"GtkAssistant":            wrapAssistant,
	"GtkBin":                  wrapBin,
	"GtkBox":                  wrapBox,
	"GtkButton":               wrapButton,
	"GtkCalendar":             wrapCalendar,
	"GtkCellLayout":           wrapCellLayout,
	"GtkCellRenderer":         wrapCellRenderer,
	"GtkCellRendererSpinner":  wrapCellRendererSpinner,
	"GtkCellRendererPixbuf":   wrapCellRendererPixbuf,
	"GtkCellRendererText":     wrapCellRendererText,
	"GtkCellRendererProgress": wrapCellRendererProgress,
	"GtkCellRendererToggle":   wrapCellRendererToggle,
	"GtkCheckButton":          wrapCheckButton,
	"GtkCheckMenuItem":        wrapCheckMenuItem,
	"GtkClipboard":            wrapClipboard,
	"GtkColorButton":          wrapColorButton,
	"GtkContainer":            wrapContainer,
	"GtkDialog":               wrapDialog,
	"GtkDrawingArea":          wrapDrawingArea,
	"GtkEditable":             wrapEditable,
	"GtkEntry":                wrapEntry,
	"GtkEntryBuffer":          wrapEntryBuffer,
	"GtkEntryCompletion":      wrapEntryCompletion,
	"GtkEventBox":             wrapEventBox,
	"GtkExpander":             wrapExpander,
	"GtkFrame":                wrapFrame,
	"GtkFileChooser":          wrapFileChooser,
	"GtkFileChooserButton":    wrapFileChooserButton,
	"GtkFileChooserDialog":    wrapFileChooserDialog,
	"GtkFileChooserWidget":    wrapFileChooserWidget,
	"GtkGrid":                 wrapGrid,
	"GtkIconView":             wrapIconView,
	"GtkImage":                wrapImage,
	"GtkLabel":                wrapLabel,
	"GtkLayout":               wrapLayout,
	"GtkLinkButton":           wrapLinkButton,
	"GtkListStore":            wrapListStore,
	"GtkMenu":                 wrapMenu,
	"GtkMenuBar":              wrapMenuBar,
	"GtkMenuButton":           wrapMenuButton,
	"GtkMenuItem":             wrapMenuItem,
	"GtkMenuShell":            wrapMenuShell,
	"GtkMessageDialog":        wrapMessageDialog,
	"GtkNotebook":             wrapNotebook,
	"GtkOffscreenWindow":      wrapOffscreenWindow,
	"GtkOrientable":           wrapOrientable,
	"GtkOverlay":              wrapOverlay,
	"GtkPaned":                wrapPaned,
	"GtkProgressBar":          wrapProgressBar,
	"GtkRadioButton":          wrapRadioButton,
	"GtkRadioMenuItem":        wrapRadioMenuItem,
	"GtkRange":                wrapRange,
	"GtkRecentChooser":        wrapRecentChooser,
	"GtkRecentChooserMenu":    wrapRecentChooserMenu,
	"GtkRecentFilter":         wrapRecentFilter,
	"GtkRecentManager":        wrapRecentManager,
	"GtkScaleButton":          wrapScaleButton,
	"GtkScale":                wrapScale,
	"GtkScrollable":           wrapScrollable,
	"GtkScrollbar":            wrapScrollbar,
	"GtkScrolledWindow":       wrapScrolledWindow,
	"GtkSearchEntry":          wrapSearchEntry,
	"GtkSeparator":            wrapSeparator,
	"GtkSeparatorMenuItem":    wrapSeparatorMenuItem,
	"GtkSeparatorToolItem":    wrapSeparatorToolItem,
	"GtkSpinButton":           wrapSpinButton,
	"GtkSpinner":              wrapSpinner,
	"GtkStatusbar":            wrapStatusbar,
	"GtkSwitch":               wrapSwitch,
	"GtkTextView":             wrapTextView,
	"GtkTextBuffer":           wrapTextBuffer,
	"GtkTextTag":              wrapTextTag,
	"GtkTextTagTable":         wrapTextTagTable,
	"GtkToggleButton":         wrapToggleButton,
	"GtkToolbar":              wrapToolbar,
	"GtkToolButton":           wrapToolButton,
	"GtkToggleToolButton":     wrapToggleToolButton,
	"GtkToolItem":             wrapToolItem,
	"GtkTreeModel":            wrapTreeModel,
	"GtkTreeModelFilter":      wrapTreeModelFilter,
	"GtkTreeModelSort":        wrapTreeModelSort,
	"GtkTreeSelection":        wrapTreeSelection,
	"GtkTreeStore":            wrapTreeStore,
	"GtkTreeView":             wrapTreeView,
	"GtkTreeViewColumn":       wrapTreeViewColumn,
	"GtkViewport":             wrapViewport,
	"GtkVolumeButton":         wrapVolumeButton,
	"GtkWidget":               wrapWidget,
	"GtkWindow":               wrapWindow,
}

Functions

func AccelGroupsActivate

func AccelGroupsActivate(obj *glib.Object, key uint, mods gdk.ModifierType) bool

AccelGroupsActivate is a wrapper around gtk_accel_groups_activate().

func AccelGroupsFromObject

func AccelGroupsFromObject(obj *glib.Object) *glib.SList

AccelGroupsFromObject is a wrapper around gtk_accel_groups_from_object().

func AccelMapAddEntry

func AccelMapAddEntry(path string, key uint, mods gdk.ModifierType)

AccelMapAddEntry is a wrapper around gtk_accel_map_add_entry().

func AccelMapAddFilter

func AccelMapAddFilter(filter string)

AccelMapAddFilter is a wrapper around gtk_accel_map_add_filter().

func AccelMapChangeEntry

func AccelMapChangeEntry(path string, key uint, mods gdk.ModifierType, replace bool) bool

AccelMapChangeEntry is a wrapper around gtk_accel_map_change_entry().

func AccelMapLoad

func AccelMapLoad(fileName string)

AccelMapLoad is a wrapper around gtk_accel_map_load().

func AccelMapLoadFD

func AccelMapLoadFD(fd int)

AccelMapLoadFD is a wrapper around gtk_accel_map_load_fd().

func AccelMapLockPath

func AccelMapLockPath(path string)

AccelMapLockPath is a wrapper around gtk_accel_map_lock_path().

func AccelMapSave

func AccelMapSave(fileName string)

AccelMapSave is a wrapper around gtk_accel_map_save().

func AccelMapSaveFD

func AccelMapSaveFD(fd int)

AccelMapSaveFD is a wrapper around gtk_accel_map_save_fd().

func AccelMapUnlockPath

func AccelMapUnlockPath(path string)

AccelMapUnlockPath is a wrapper around gtk_accel_map_unlock_path().

func AcceleratorGetDefaultModMask

func AcceleratorGetDefaultModMask() gdk.ModifierType

AcceleratorGetDefaultModMask is a wrapper around gtk_accelerator_get_default_mod_mask().

func AcceleratorGetLabel

func AcceleratorGetLabel(key uint, mods gdk.ModifierType) string

AcceleratorGetLabel is a wrapper around gtk_accelerator_get_label().

func AcceleratorName

func AcceleratorName(key uint, mods gdk.ModifierType) string

AcceleratorName is a wrapper around gtk_accelerator_name().

func AcceleratorParse

func AcceleratorParse(acc string) (key uint, mods gdk.ModifierType)

AcceleratorParse is a wrapper around gtk_accelerator_parse().

func AcceleratorSetDefaultModMask

func AcceleratorSetDefaultModMask(mods gdk.ModifierType)

AcceleratorSetDefaultModMask is a wrapper around gtk_accelerator_set_default_mod_mask().

func AcceleratorValid

func AcceleratorValid(key uint, mods gdk.ModifierType) bool

AcceleratorValid is a wrapper around gtk_accelerator_valid().

func AddProviderForScreen

func AddProviderForScreen(s *gdk.Screen, provider IStyleProvider, prio uint)

AddProviderForScreen is a wrapper around gtk_style_context_add_provider_for_screen().

func CheckVersion

func CheckVersion(major, minor, micro uint) error

func DragSetIconPixbuf

func DragSetIconPixbuf(context *gdk.DragContext, pixbuf *gdk.Pixbuf, hot_x int, hot_y int)

for "drag-begin" event

func EventsPending

func EventsPending() bool

EventsPending is a wrapper around gtk_events_pending.

func GdkCairoSetSourcePixBuf

func GdkCairoSetSourcePixBuf(cr *cairo.Context, pixbuf *gdk.Pixbuf, pixbufX, pixbufY float64)

GdkCairoSetSourcePixBuf() is a wrapper around gdk_cairo_set_source_pixbuf().

func GetData

func GetData(pointer uintptr) (data []byte)

fixed GetData directly from ptr

func GetMajorVersion

func GetMajorVersion() uint

func GetMicroVersion

func GetMicroVersion() uint

func GetMinorVersion

func GetMinorVersion() uint

func Init

func Init(args *[]string)

Init() is a wrapper around gtk_init() and must be called before any other GTK calls and is used to initialize everything necessary.

In addition to setting up GTK for usage, a pointer to a slice of strings may be passed in to parse standard GTK command line arguments. args will be modified to remove any flags that were handled. Alternatively, nil may be passed in to not perform any command line parsing.

func InitCheck

func InitCheck(args *[]string) error

InitCheck() is a wrapper around gtk_init_check() and works exactly like Init() only that it doesn't terminate the program if initialization fails.

func Main

func Main()

Main() is a wrapper around gtk_main() and runs the GTK main loop, blocking until MainQuit() is called.

func MainIteration

func MainIteration() bool

MainIteration is a wrapper around gtk_main_iteration.

func MainIterationDo

func MainIterationDo(blocking bool) bool

MainIterationDo is a wrapper around gtk_main_iteration_do.

func MainQuit

func MainQuit()

MainQuit() is a wrapper around gtk_main_quit() is used to terminate the GTK main loop (started by Main()).

func OpenFileChooserNative

func OpenFileChooserNative(title string, parent_window IWindow) *string

* FileChooserNative

func PaperSizeGetDefaultRightMargin

func PaperSizeGetDefaultRightMargin(unit Unit) string

PaperSizeGetDefault() is a wrapper around gtk_paper_size_get_default().

func PaperSizeGetPaperSizes

func PaperSizeGetPaperSizes(includeCustom bool) *glib.List

PaperSizeGetPaperSizes() is a wrapper around gtk_paper_size_get_paper_sizes().

func PrintRunPageSetupDialogAsync

func PrintRunPageSetupDialogAsync(parent IWindow, setup *PageSetup,
	settings *PrintSettings, cb PageSetupDoneCallback, data uintptr)

PrintRunPageSetupDialogAsync() is a wrapper around gtk_print_run_page_setup_dialog_async().

func RemoveProviderForScreen

func RemoveProviderForScreen(s *gdk.Screen, provider IStyleProvider)

RemoveProviderForScreen is a wrapper around gtk_style_context_remove_provider_for_screen().

func SetData

func SetData(pointer uintptr, atom gdk.Atom, data []byte)

for "drag-data-get"

func SetInteractiveDebugging

func SetInteractiveDebugging(enable bool)

SetInteractiveDebugging is a wrapper around gtk_window_set_interactive_debugging().

func StyleContextResetWidgets

func StyleContextResetWidgets(v *gdk.Screen)

StyleContextResetWidgets is a wrapper around gtk_style_context_reset_widgets().

func TestInit

func TestInit(args *[]string)

TestInit is a wrapper around gtk_test_init(). This function is used to initialize a GTK+ test program. It will in turn call g_test_init() and gtk_init() to properly initialize the testing framework and graphical toolkit. It’ll also set the program’s locale to “C” and prevent loading of rc files and Gtk+ modules. This is done to make tets program environments as deterministic as possible.

Like gtk_init() and g_test_init(), any known arguments will be processed and stripped from argc and argv.

func TestListAllTypes

func TestListAllTypes() []glib.Type

TestListAllTypes is a wrapper around gtk_test_list_all_types(). Return the type ids that have been registered after calling TestRegisterAllTypes().

func TestRegisterAllTypes

func TestRegisterAllTypes()

TestRegisterAllTypes is a wrapper around gtk_test_register_all_types(). Force registration of all core Gtk+ and Gdk object types. This allowes to refer to any of those object types via g_type_from_name() after calling this function.

func TestWidgetSendKey

func TestWidgetSendKey(widget IWidget, keyval uint, modifiers gdk.ModifierType) bool

TestWidgetSendKey is a wrapper around gtk_test_widget_send_key()

This function will generate keyboard press and release events in the middle of the first GdkWindow found that belongs to widget. For windowless widgets like GtkButton (which returns FALSE from gtk_widget_get_has_window()), this will often be an input-only event window. For other widgets, this is usually widget->window.

widget: Widget to generate a key press and release on. keyval: A Gdk keyboard value. modifiers: Keyboard modifiers the event is setup with.

returns: whether all actions neccessary for the key event simulation were carried out successfully.

func TestWidgetWaitForDraw

func TestWidgetWaitForDraw(widget IWidget)

TestWidgetWaitForDraw is a wrapper around gtk_test_widget_wait_for_draw(). Enters the main loop and waits for widget to be “drawn”. In this context that means it waits for the frame clock of widget to have run a full styling, layout and drawing cycle. This function is intended to be used for syncing with actions that depend on widget relayouting or on interaction with the display server.

func WidgetToLabel

func WidgetToLabel(widget *Widget) (interface{}, error)

func WindowGetDefaultIconList

func WindowGetDefaultIconList() *glib.List

WindowGetDefaultIconList is a wrapper around gtk_window_get_default_icon_list(). Returned list is wrapped to return *gdk.Pixbuf elements.

func WindowGetDefaultIconName

func WindowGetDefaultIconName() (string, error)

WindowGetDefaultIconName is a wrapper around gtk_window_get_default_icon_name().

func WindowListToplevels

func WindowListToplevels() *glib.List

WindowListToplevels is a wrapper around gtk_window_list_toplevels(). Returned list is wrapped to return *gtk.Window elements. TODO: Use IWindow and wrap to correct type

func WindowSetAutoStartupNotification

func WindowSetAutoStartupNotification(setting bool)

WindowSetAutoStartupNotification is a wrapper around gtk_window_set_auto_startup_notification().

func WindowSetDefaultIcon

func WindowSetDefaultIcon(icon *gdk.Pixbuf)

WindowSetDefaultIcon is a wrapper around gtk_window_set_default_icon().

func WindowSetDefaultIconFromFile

func WindowSetDefaultIconFromFile(file string) error

WindowSetDefaultIconFromFile is a wrapper around gtk_window_set_default_icon_from_file().

func WindowSetDefaultIconList

func WindowSetDefaultIconList(list *glib.List)

WindowSetDefaultIconList is a wrapper around gtk_window_set_default_icon_list(). List should only contain *gdk.Pixbuf elements!

func WindowSetDefaultIconName

func WindowSetDefaultIconName(s string)

WindowSetDefaultIconName is a wrapper around gtk_window_set_default_icon_name().

Types

type AboutDialog

type AboutDialog struct {
	Dialog
}

AboutDialog is a representation of GTK's GtkAboutDialog.

func AboutDialogNew

func AboutDialogNew() (*AboutDialog, error)

AboutDialogNew is a wrapper around gtk_about_dialog_new().

func (*AboutDialog) AddCreditSection

func (v *AboutDialog) AddCreditSection(sectionName string, people []string)

AddCreditSection is a wrapper around gtk_about_dialog_add_credit_section().

func (*AboutDialog) GetArtists

func (v *AboutDialog) GetArtists() []string

GetArtists is a wrapper around gtk_about_dialog_get_artists().

func (*AboutDialog) GetAuthors

func (v *AboutDialog) GetAuthors() []string

GetAuthors is a wrapper around gtk_about_dialog_get_authors().

func (*AboutDialog) GetComments

func (v *AboutDialog) GetComments() string

GetComments is a wrapper around gtk_about_dialog_get_comments().

func (*AboutDialog) GetCopyright

func (v *AboutDialog) GetCopyright() string

GetCopyright is a wrapper around gtk_about_dialog_get_copyright().

func (*AboutDialog) GetDocumenters

func (v *AboutDialog) GetDocumenters() []string

GetDocumenters is a wrapper around gtk_about_dialog_get_documenters().

func (*AboutDialog) GetLicense

func (v *AboutDialog) GetLicense() string

GetLicense is a wrapper around gtk_about_dialog_get_license().

func (*AboutDialog) GetLicenseType

func (v *AboutDialog) GetLicenseType() License

GetLicenseType is a wrapper around gtk_about_dialog_get_license_type().

func (v *AboutDialog) GetLogo() (*gdk.Pixbuf, error)

GetLogo is a wrapper around gtk_about_dialog_get_logo().

func (*AboutDialog) GetLogoIconName

func (v *AboutDialog) GetLogoIconName() string

GetLogoIconName is a wrapper around gtk_about_dialog_get_logo_icon_name().

func (*AboutDialog) GetProgramName

func (v *AboutDialog) GetProgramName() string

GetProgramName is a wrapper around gtk_about_dialog_get_program_name().

func (*AboutDialog) GetTranslatorCredits

func (v *AboutDialog) GetTranslatorCredits() string

GetTranslatorCredits is a wrapper around gtk_about_dialog_get_translator_credits().

func (*AboutDialog) GetVersion

func (v *AboutDialog) GetVersion() string

GetVersion is a wrapper around gtk_about_dialog_get_version().

func (*AboutDialog) GetWebsite

func (v *AboutDialog) GetWebsite() string

GetWebsite is a wrapper around gtk_about_dialog_get_website().

func (*AboutDialog) GetWebsiteLabel

func (v *AboutDialog) GetWebsiteLabel() string

GetWebsiteLabel is a wrapper around gtk_about_dialog_get_website_label().

func (*AboutDialog) GetWrapLicense

func (v *AboutDialog) GetWrapLicense() bool

GetWrapLicense is a wrapper around gtk_about_dialog_get_wrap_license().

func (*AboutDialog) SetArtists

func (v *AboutDialog) SetArtists(artists []string)

SetArtists is a wrapper around gtk_about_dialog_set_artists().

func (*AboutDialog) SetAuthors

func (v *AboutDialog) SetAuthors(authors []string)

SetAuthors is a wrapper around gtk_about_dialog_set_authors().

func (*AboutDialog) SetComments

func (v *AboutDialog) SetComments(comments string)

SetComments is a wrapper around gtk_about_dialog_set_comments().

func (*AboutDialog) SetCopyright

func (v *AboutDialog) SetCopyright(copyright string)

SetCopyright is a wrapper around gtk_about_dialog_set_copyright().

func (*AboutDialog) SetDocumenters

func (v *AboutDialog) SetDocumenters(documenters []string)

SetDocumenters is a wrapper around gtk_about_dialog_set_documenters().

func (*AboutDialog) SetLicense

func (v *AboutDialog) SetLicense(license string)

SetLicense is a wrapper around gtk_about_dialog_set_license().

func (*AboutDialog) SetLicenseType

func (v *AboutDialog) SetLicenseType(license License)

SetLicenseType is a wrapper around gtk_about_dialog_set_license_type().

func (v *AboutDialog) SetLogo(logo *gdk.Pixbuf)

SetLogo is a wrapper around gtk_about_dialog_set_logo().

func (*AboutDialog) SetLogoIconName

func (v *AboutDialog) SetLogoIconName(name string)

SetLogoIconName is a wrapper around gtk_about_dialog_set_logo_icon_name().

func (*AboutDialog) SetProgramName

func (v *AboutDialog) SetProgramName(name string)

SetProgramName is a wrapper around gtk_about_dialog_set_program_name().

func (*AboutDialog) SetTranslatorCredits

func (v *AboutDialog) SetTranslatorCredits(translatorCredits string)

SetTranslatorCredits is a wrapper around gtk_about_dialog_set_translator_credits().

func (*AboutDialog) SetVersion

func (v *AboutDialog) SetVersion(version string)

SetVersion is a wrapper around gtk_about_dialog_set_version().

func (*AboutDialog) SetWebsite

func (v *AboutDialog) SetWebsite(website string)

SetWebsite is a wrapper around gtk_about_dialog_set_website().

func (*AboutDialog) SetWebsiteLabel

func (v *AboutDialog) SetWebsiteLabel(websiteLabel string)

SetWebsiteLabel is a wrapper around gtk_about_dialog_set_website_label().

func (*AboutDialog) SetWrapLicense

func (v *AboutDialog) SetWrapLicense(wrapLicense bool)

SetWrapLicense is a wrapper around gtk_about_dialog_set_wrap_license().

type AccelFlags

type AccelFlags int

AccelFlags is a representation of GTK's GtkAccelFlags

const (
	ACCEL_VISIBLE AccelFlags = C.GTK_ACCEL_VISIBLE
	ACCEL_LOCKED  AccelFlags = C.GTK_ACCEL_LOCKED
	ACCEL_MASK    AccelFlags = C.GTK_ACCEL_MASK
)

type AccelGroup

type AccelGroup struct {
	*glib.Object
}

AccelGroup is a representation of GTK's GtkAccelGroup.

func AccelGroupFromClosure

func AccelGroupFromClosure(f interface{}) *AccelGroup

AccelGroupFromClosure is a wrapper around gtk_accel_group_from_accel_closure().

func AccelGroupNew

func AccelGroupNew() (*AccelGroup, error)

AccelGroup is a wrapper around gtk_accel_group_new().

func (*AccelGroup) Activate

func (v *AccelGroup) Activate(quark glib.Quark, acceleratable *glib.Object, key uint, mods gdk.ModifierType) bool

Activate is a wrapper around gtk_accel_group_activate().

func (*AccelGroup) Connect

func (v *AccelGroup) Connect(key uint, mods gdk.ModifierType, flags AccelFlags, f interface{})

Connect is a wrapper around gtk_accel_group_connect().

func (*AccelGroup) ConnectByPath

func (v *AccelGroup) ConnectByPath(path string, f interface{})

ConnectByPath is a wrapper around gtk_accel_group_connect_by_path().

func (*AccelGroup) Disconnect

func (v *AccelGroup) Disconnect(f interface{})

Disconnect is a wrapper around gtk_accel_group_disconnect().

func (*AccelGroup) DisconnectKey

func (v *AccelGroup) DisconnectKey(key uint, mods gdk.ModifierType)

DisconnectKey is a wrapper around gtk_accel_group_disconnect_key().

func (*AccelGroup) GetModifierMask

func (v *AccelGroup) GetModifierMask() gdk.ModifierType

GetModifierMask is a wrapper around gtk_accel_group_get_modifier_mask().

func (*AccelGroup) IsLocked

func (v *AccelGroup) IsLocked() bool

IsLocked is a wrapper around gtk_accel_group_get_is_locked().

func (*AccelGroup) Lock

func (v *AccelGroup) Lock()

Lock is a wrapper around gtk_accel_group_lock().

func (*AccelGroup) Unlock

func (v *AccelGroup) Unlock()

Unlock is a wrapper around gtk_accel_group_unlock().

type AccelKey

type AccelKey struct {
	// contains filtered or unexported fields
}

func AccelMapLookupEntry

func AccelMapLookupEntry(path string) *AccelKey

AccelMapLookupEntry is a wrapper around gtk_accel_map_lookup_entry().

type AccelMap

type AccelMap struct {
	*glib.Object
}

AccelMap is a representation of GTK's GtkAccelMap.

func AccelMapGet

func AccelMapGet() *AccelMap

AccelMapGet is a wrapper around gtk_accel_map_get().

type ActionBar

type ActionBar struct {
	Bin
}

ActionBar is a representation of GtkActionBar

func ActionBarNew

func ActionBarNew() (*ActionBar, error)

ActionBarNew is a wrapper around gtk_action_bar_new()

func (*ActionBar) GetCenterWidget

func (a *ActionBar) GetCenterWidget() *Widget

GetCenterWidget is a wrapper around gtk_action_bar_get_center_widget().

func (*ActionBar) PackEnd

func (a *ActionBar) PackEnd(child IWidget)

PackEnd is a wrapper around gtk_action_bar_pack_end().

func (*ActionBar) PackStart

func (a *ActionBar) PackStart(child IWidget)

PackStart is a wrapper around gtk_action_bar_pack_start().

func (*ActionBar) SetCenterWidget

func (a *ActionBar) SetCenterWidget(child IWidget)

SetCenterWidget is a wrapper around gtk_action_bar_set_center_widget().

type Actionable

type Actionable struct {
	*glib.Object
}

Actionable is a representation of the GtkActionable GInterface. Do not embed this concrete type in implementing structs but rather use IActionable (see Button wrapper for an example)

func (*Actionable) GetActionName

func (v *Actionable) GetActionName() (string, error)

GetActionName is a wrapper around gtk_actionable_set_action_name(). Since 3.4

func (*Actionable) SetActionName

func (v *Actionable) SetActionName(action_name string)

SetActionName is a wrapper around gtk_actionable_set_action_name(). Since 3.4

func (*Actionable) SetDetailedActionName

func (v *Actionable) SetDetailedActionName(detailed_action_name string)

SetDetailedActionName is a wrapper around gtk_actionable_set_detailed_action_name(). Since 3.4

type Adjustment

type Adjustment struct {
	glib.InitiallyUnowned
}

Adjustment is a representation of GTK's GtkAdjustment.

func AdjustmentNew

func AdjustmentNew(value, lower, upper, stepIncrement, pageIncrement, pageSize float64) (*Adjustment, error)

AdjustmentNew is a wrapper around gtk_adjustment_new().

func (*Adjustment) Configure

func (v *Adjustment) Configure(value, lower, upper, stepIncrement, pageIncrement, pageSize float64)

Configure is a wrapper around gtk_adjustment_configure().

func (*Adjustment) GetLower

func (v *Adjustment) GetLower() float64

GetLower is a wrapper around gtk_adjustment_get_lower().

func (*Adjustment) GetMinimumIncrement

func (v *Adjustment) GetMinimumIncrement() float64

GetMinimumIncrement is a wrapper around gtk_adjustment_get_minimum_increment().

func (*Adjustment) GetPageIncrement

func (v *Adjustment) GetPageIncrement() float64

GetPageIncrement is a wrapper around gtk_adjustment_get_page_increment().

func (*Adjustment) GetPageSize

func (v *Adjustment) GetPageSize() float64

GetPageSize is a wrapper around gtk_adjustment_get_page_size().

func (*Adjustment) GetStepIncrement

func (v *Adjustment) GetStepIncrement() float64

GetStepIncrement is a wrapper around gtk_adjustment_get_step_increment().

func (*Adjustment) GetUpper

func (v *Adjustment) GetUpper() float64

GetUpper is a wrapper around gtk_adjustment_get_upper().

func (*Adjustment) GetValue

func (v *Adjustment) GetValue() float64

GetValue is a wrapper around gtk_adjustment_get_value().

func (*Adjustment) SetLower

func (v *Adjustment) SetLower(value float64)

SetLower is a wrapper around gtk_adjustment_set_lower().

func (*Adjustment) SetPageIncrement

func (v *Adjustment) SetPageIncrement(value float64)

SetPageIncrement is a wrapper around gtk_adjustment_set_page_increment().

func (*Adjustment) SetPageSize

func (v *Adjustment) SetPageSize(value float64)

SetPageSize is a wrapper around gtk_adjustment_set_page_size().

func (*Adjustment) SetStepIncrement

func (v *Adjustment) SetStepIncrement(value float64)

SetStepIncrement is a wrapper around gtk_adjustment_set_step_increment().

func (*Adjustment) SetUpper

func (v *Adjustment) SetUpper(value float64)

SetUpper is a wrapper around gtk_adjustment_set_upper().

func (*Adjustment) SetValue

func (v *Adjustment) SetValue(value float64)

SetValue is a wrapper around gtk_adjustment_set_value().

type Align

type Align int

Align is a representation of GTK's GtkAlign.

const (
	ALIGN_FILL   Align = C.GTK_ALIGN_FILL
	ALIGN_START  Align = C.GTK_ALIGN_START
	ALIGN_END    Align = C.GTK_ALIGN_END
	ALIGN_CENTER Align = C.GTK_ALIGN_CENTER
)
const (
	ALIGN_BASELINE Align = C.GTK_ALIGN_BASELINE
)

type Allocation

type Allocation struct {
	gdk.Rectangle
}

Allocation is a representation of GTK's GtkAllocation type.

type AppChooser

type AppChooser struct {
	*glib.Object
}

AppChooser is a representation of GTK's GtkAppChooser GInterface.

func (*AppChooser) GetContentType

func (v *AppChooser) GetContentType() string

GetContentType is a wrapper around gtk_app_chooser_get_content_type().

func (*AppChooser) Refresh

func (v *AppChooser) Refresh()

Refresh is a wrapper around gtk_app_chooser_refresh().

type AppChooserButton

type AppChooserButton struct {
	ComboBox

	// Interfaces
	AppChooser
}

AppChooserButton is a representation of GTK's GtkAppChooserButton.

func AppChooserButtonNew

func AppChooserButtonNew(content_type string) (*AppChooserButton, error)

AppChooserButtonNew() is a wrapper around gtk_app_chooser_button_new().

func (*AppChooserButton) AppendSeparator

func (v *AppChooserButton) AppendSeparator()

AppendSeparator() is a wrapper around gtk_app_chooser_button_append_separator().

func (*AppChooserButton) GetHeading

func (v *AppChooserButton) GetHeading() (string, error)

GetHeading() is a wrapper around gtk_app_chooser_button_get_heading(). In case when gtk_app_chooser_button_get_heading() returns a nil string, GetHeading() returns a non-nil error.

func (*AppChooserButton) GetShowDefaultItem

func (v *AppChooserButton) GetShowDefaultItem() bool

GetShowDefaultItem() is a wrapper around gtk_app_chooser_button_get_show_default_item().

func (*AppChooserButton) GetShowDialogItem

func (v *AppChooserButton) GetShowDialogItem() bool

GetShowDialogItem() is a wrapper around gtk_app_chooser_button_get_show_dialog_item().

func (*AppChooserButton) SetActiveCustomItem

func (v *AppChooserButton) SetActiveCustomItem(name string)

SetActiveCustomItem() is a wrapper around gtk_app_chooser_button_set_active_custom_item().

func (*AppChooserButton) SetHeading

func (v *AppChooserButton) SetHeading(heading string)

SetHeading() is a wrapper around gtk_app_chooser_button_set_heading().

func (*AppChooserButton) SetShowDefaultItem

func (v *AppChooserButton) SetShowDefaultItem(setting bool)

SetShowDefaultItem() is a wrapper around gtk_app_chooser_button_set_show_default_item().

func (*AppChooserButton)