gtk

package
v0.0.0-...-9d62d90 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2013 License: ISC Imports: 8 Imported by: 2

Documentation

Overview

Go bindings for GTK+ 3. Supports version 3.8 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 additonal 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 function called Native(), taking itself as a receiver, which returns the native C type or a pointer (in the case of GObjects). The returned C types are scoped to this gtk package and must be converted to a local package before they can be used as arguments to native GTK calls using cgo.

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 (
	ALIGN_FILL   Align = C.GTK_ALIGN_FILL
	ALIGN_START        = C.GTK_ALIGN_START
	ALIGN_END          = C.GTK_ALIGN_END
	ALIGN_CENTER       = C.GTK_ALIGN_CENTER
)
View Source
const (
	BUTTONS_NONE      ButtonsType = C.GTK_BUTTONS_NONE
	BUTTONS_OK                    = C.GTK_BUTTONS_OK
	BUTTONS_CLOSE                 = C.GTK_BUTTONS_CLOSE
	BUTTONS_CANCEL                = C.GTK_BUTTONS_CANCEL
	BUTTONS_YES_NO                = C.GTK_BUTTONS_YES_NO
	BUTTONS_OK_CANCEL             = C.GTK_BUTTONS_OK_CANCEL
)
View Source
const (
	ICON_SIZE_INVALID       IconSize = C.GTK_ICON_SIZE_INVALID
	ICON_SIZE_MENU                   = C.GTK_ICON_SIZE_MENU
	ICON_SIZE_SMALL_TOOLBAR          = C.GTK_ICON_SIZE_SMALL_TOOLBAR
	ICON_SIZE_LARGE_TOOLBAR          = C.GTK_ICON_SIZE_LARGE_TOOLBAR
	ICON_SIZE_BUTTON                 = C.GTK_ICON_SIZE_BUTTON
	ICON_SIZE_DND                    = C.GTK_ICON_SIZE_DND
	ICON_SIZE_DIALOG                 = C.GTK_ICON_SIZE_DIALOG
)
View Source
const (
	IMAGE_EMPTY     ImageType = C.GTK_IMAGE_EMPTY
	IMAGE_PIXBUF              = C.GTK_IMAGE_PIXBUF
	IMAGE_STOCK               = C.GTK_IMAGE_STOCK
	IMAGE_ICON_SET            = C.GTK_IMAGE_ICON_SET
	IMAGE_ANIMATION           = C.GTK_IMAGE_ANIMATION
	IMAGE_ICON_NAME           = C.GTK_IMAGE_ICON_NAME
	IMAGE_GICON               = C.GTK_IMAGE_GICON
)
View Source
const (
	INPUT_HINT_NONE                InputHints = C.GTK_INPUT_HINT_NONE
	INPUT_HINT_SPELLCHECK                     = C.GTK_INPUT_HINT_SPELLCHECK
	INPUT_HINT_NO_SPELLCHECK                  = C.GTK_INPUT_HINT_NO_SPELLCHECK
	INPUT_HINT_WORD_COMPLETION                = C.GTK_INPUT_HINT_WORD_COMPLETION
	INPUT_HINT_LOWERCASE                      = C.GTK_INPUT_HINT_LOWERCASE
	INPUT_HINT_UPPERCASE_CHARS                = C.GTK_INPUT_HINT_UPPERCASE_CHARS
	INPUT_HINT_UPPERCASE_WORDS                = C.GTK_INPUT_HINT_UPPERCASE_WORDS
	INPUT_HINT_UPPERCASE_SENTENCES            = C.GTK_INPUT_HINT_UPPERCASE_SENTENCES
	INPUT_HINT_INHIBIT_OSK                    = C.GTK_INPUT_HINT_INHIBIT_OSK
)
View Source
const (
	INPUT_PURPOSE_FREE_FORM InputPurpose = C.GTK_INPUT_PURPOSE_FREE_FORM
	INPUT_PURPOSE_ALPHA                  = C.GTK_INPUT_PURPOSE_ALPHA
	INPUT_PURPOSE_DIGITS                 = C.GTK_INPUT_PURPOSE_DIGITS
	INPUT_PURPOSE_NUMBER                 = C.GTK_INPUT_PURPOSE_NUMBER
	INPUT_PURPOSE_PHONE                  = C.GTK_INPUT_PURPOSE_PHONE
	INPUT_PURPOSE_URL                    = C.GTK_INPUT_PURPOSE_URL
	INPUT_PURPOSE_EMAIL                  = C.GTK_INPUT_PURPOSE_EMAIL
	INPUT_PURPOSE_NAME                   = C.GTK_INPUT_PURPOSE_NAME
	INPUT_PURPOSE_PASSWORD               = C.GTK_INPUT_PURPOSE_PASSWORD
	INPUT_PURPOSE_PIN                    = C.GTK_INPUT_PURPOSE_PIN
)
View Source
const (
	MESSAGE_INFO     MessageType = C.GTK_MESSAGE_INFO
	MESSAGE_WARNING              = C.GTK_MESSAGE_WARNING
	MESSAGE_QUESTION             = C.GTK_MESSAGE_QUESTION
	MESSAGE_ERROR                = C.GTK_MESSAGE_ERROR
	MESSAGE_OTHER                = C.GTK_MESSAGE_OTHER
)
View Source
const (
	POLICY_ALWAYS    PolicyType = C.GTK_POLICY_ALWAYS
	POLICY_AUTOMATIC            = C.GTK_POLICY_AUTOMATIC
	POLICY_NEVER                = C.GTK_POLICY_NEVER
)
View Source
const (
	POS_LEFT   PositionType = C.GTK_POS_LEFT
	POS_RIGHT               = C.GTK_POS_RIGHT
	POS_TOP                 = C.GTK_POS_TOP
	POS_BOTTOM              = C.GTK_POS_BOTTOM
)
View Source
const (
	RELIEF_NORMAL ReliefStyle = C.GTK_RELIEF_NORMAL
	RELIEF_HALF               = C.GTK_RELIEF_HALF
	RELIEF_NONE               = C.GTK_RELIEF_NONE
)
View Source
const (
	RESPONSE_NONE         ResponseType = C.GTK_RESPONSE_NONE
	RESPONSE_REJECT                    = C.GTK_RESPONSE_REJECT
	RESPONSE_ACCEPT                    = C.GTK_RESPONSE_ACCEPT
	RESPONSE_DELETE_EVENT              = C.GTK_RESPONSE_DELETE_EVENT
	RESPONSE_OK                        = C.GTK_RESPONSE_OK
	RESPONSE_CANCEL                    = C.GTK_RESPONSE_CANCEL
	RESPONSE_CLOSE                     = C.GTK_RESPONSE_CLOSE
	RESPONSE_YES                       = C.GTK_RESPONSE_YES
	RESPONSE_NO                        = C.GTK_RESPONSE_NO
	RESPONSE_APPLY                     = C.GTK_RESPONSE_APPLY
	RESPONSE_HELP                      = C.GTK_RESPONSE_HELP
)
View Source
const (
	STOCK_ABOUT                         Stock = C.GTK_STOCK_ABOUT
	STOCK_ADD                                 = C.GTK_STOCK_ADD
	STOCK_APPLY                               = C.GTK_STOCK_APPLY
	STOCK_BOLD                                = C.GTK_STOCK_BOLD
	STOCK_CANCEL                              = C.GTK_STOCK_CANCEL
	STOCK_CAPS_LOCK_WARNING                   = C.GTK_STOCK_CAPS_LOCK_WARNING
	STOCK_CDROM                               = C.GTK_STOCK_CDROM
	STOCK_CLEAR                               = C.GTK_STOCK_CLEAR
	STOCK_CLOSE                               = C.GTK_STOCK_CLOSE
	STOCK_COLOR_PICKER                        = C.GTK_STOCK_COLOR_PICKER
	STOCK_CONNECT                             = C.GTK_STOCK_CONNECT
	STOCK_CONVERT                             = C.GTK_STOCK_CONVERT
	STOCK_COPY                                = C.GTK_STOCK_COPY
	STOCK_CUT                                 = C.GTK_STOCK_CUT
	STOCK_DELETE                              = C.GTK_STOCK_DELETE
	STOCK_DIALOG_AUTHENTICATION               = C.GTK_STOCK_DIALOG_AUTHENTICATION
	STOCK_DIALOG_INFO                         = C.GTK_STOCK_DIALOG_INFO
	STOCK_DIALOG_WARNING                      = C.GTK_STOCK_DIALOG_WARNING
	STOCK_DIALOG_ERROR                        = C.GTK_STOCK_DIALOG_ERROR
	STOCK_DIALOG_QUESTION                     = C.GTK_STOCK_DIALOG_QUESTION
	STOCK_DIRECTORY                           = C.GTK_STOCK_DIRECTORY
	STOCK_DISCARD                             = C.GTK_STOCK_DISCARD
	STOCK_DISCONNECT                          = C.GTK_STOCK_DISCONNECT
	STOCK_DND                                 = C.GTK_STOCK_DND
	STOCK_DND_MULTIPLE                        = C.GTK_STOCK_DND_MULTIPLE
	STOCK_EDIT                                = C.GTK_STOCK_EDIT
	STOCK_EXECUTE                             = C.GTK_STOCK_EXECUTE
	STOCK_FILE                                = C.GTK_STOCK_FILE
	STOCK_FIND                                = C.GTK_STOCK_FIND
	STOCK_FIND_AND_REPLACE                    = C.GTK_STOCK_FIND_AND_REPLACE
	STOCK_FLOPPY                              = C.GTK_STOCK_FLOPPY
	STOCK_FULLSCREEN                          = C.GTK_STOCK_FULLSCREEN
	STOCK_GOTO_BOTTOM                         = C.GTK_STOCK_GOTO_BOTTOM
	STOCK_GOTO_FIRST                          = C.GTK_STOCK_GOTO_FIRST
	STOCK_GOTO_LAST                           = C.GTK_STOCK_GOTO_LAST
	STOCK_GOTO_TOP                            = C.GTK_STOCK_GOTO_TOP
	STOCK_GO_BACK                             = C.GTK_STOCK_GO_BACK
	STOCK_GO_DOWN                             = C.GTK_STOCK_GO_DOWN
	STOCK_GO_FORWARD                          = C.GTK_STOCK_GO_FORWARD
	STOCK_GO_UP                               = C.GTK_STOCK_GO_UP
	STOCK_HARDDISK                            = C.GTK_STOCK_HARDDISK
	STOCK_HELP                                = C.GTK_STOCK_HELP
	STOCK_HOME                                = C.GTK_STOCK_HOME
	STOCK_INDEX                               = C.GTK_STOCK_INDEX
	STOCK_INDENT                              = C.GTK_STOCK_INDENT
	STOCK_INFO                                = C.GTK_STOCK_INFO
	STOCK_ITALIC                              = C.GTK_STOCK_ITALIC
	STOCK_JUMP_TO                             = C.GTK_STOCK_JUMP_TO
	STOCK_JUSTIFY_CENTER                      = C.GTK_STOCK_JUSTIFY_CENTER
	STOCK_JUSTIFY_FILL                        = C.GTK_STOCK_JUSTIFY_FILL
	STOCK_JUSTIFY_LEFT                        = C.GTK_STOCK_JUSTIFY_LEFT
	STOCK_JUSTIFY_RIGHT                       = C.GTK_STOCK_JUSTIFY_RIGHT
	STOCK_LEAVE_FULLSCREEN                    = C.GTK_STOCK_LEAVE_FULLSCREEN
	STOCK_MISSING_IMAGE                       = C.GTK_STOCK_MISSING_IMAGE
	STOCK_MEDIA_FORWARD                       = C.GTK_STOCK_MEDIA_FORWARD
	STOCK_MEDIA_NEXT                          = C.GTK_STOCK_MEDIA_NEXT
	STOCK_MEDIA_PAUSE                         = C.GTK_STOCK_MEDIA_PAUSE
	STOCK_MEDIA_PLAY                          = C.GTK_STOCK_MEDIA_PLAY
	STOCK_MEDIA_PREVIOUS                      = C.GTK_STOCK_MEDIA_PREVIOUS
	STOCK_MEDIA_RECORD                        = C.GTK_STOCK_MEDIA_RECORD
	STOCK_MEDIA_REWIND                        = C.GTK_STOCK_MEDIA_REWIND
	STOCK_MEDIA_STOP                          = C.GTK_STOCK_MEDIA_STOP
	STOCK_NETWORK                             = C.GTK_STOCK_NETWORK
	STOCK_NEW                                 = C.GTK_STOCK_NEW
	STOCK_NO                                  = C.GTK_STOCK_NO
	STOCK_OK                                  = C.GTK_STOCK_OK
	STOCK_OPEN                                = C.GTK_STOCK_OPEN
	STOCK_ORIENTATION_PORTRAIT                = C.GTK_STOCK_ORIENTATION_PORTRAIT
	STOCK_ORIENTATION_LANDSCAPE               = C.GTK_STOCK_ORIENTATION_LANDSCAPE
	STOCK_ORIENTATION_REVERSE_LANDSCAPE       = C.GTK_STOCK_ORIENTATION_REVERSE_LANDSCAPE
	STOCK_ORIENTATION_REVERSE_PORTRAIT        = C.GTK_STOCK_ORIENTATION_REVERSE_PORTRAIT
	STOCK_PAGE_SETUP                          = C.GTK_STOCK_PAGE_SETUP
	STOCK_PASTE                               = C.GTK_STOCK_PASTE
	STOCK_PREFERENCES                         = C.GTK_STOCK_PREFERENCES
	STOCK_PRINT                               = C.GTK_STOCK_PRINT
	STOCK_PRINT_ERROR                         = C.GTK_STOCK_PRINT_ERROR
	STOCK_PRINT_PAUSED                        = C.GTK_STOCK_PRINT_PAUSED
	STOCK_PRINT_PREVIEW                       = C.GTK_STOCK_PRINT_PREVIEW
	STOCK_PRINT_REPORT                        = C.GTK_STOCK_PRINT_REPORT
	STOCK_PRINT_WARNING                       = C.GTK_STOCK_PRINT_WARNING
	STOCK_PROPERTIES                          = C.GTK_STOCK_PROPERTIES
	STOCK_QUIT                                = C.GTK_STOCK_QUIT
	STOCK_REDO                                = C.GTK_STOCK_REDO
	STOCK_REFRESH                             = C.GTK_STOCK_REFRESH
	STOCK_REMOVE                              = C.GTK_STOCK_REMOVE
	STOCK_REVERT_TO_SAVED                     = C.GTK_STOCK_REVERT_TO_SAVED
	STOCK_SAVE                                = C.GTK_STOCK_SAVE
	STOCK_SAVE_AS                             = C.GTK_STOCK_SAVE_AS
	STOCK_SELECT_ALL                          = C.GTK_STOCK_SELECT_ALL
	STOCK_SELECT_COLOR                        = C.GTK_STOCK_SELECT_COLOR
	STOCK_SELECT_FONT                         = C.GTK_STOCK_SELECT_FONT
	STOCK_SORT_ASCENDING                      = C.GTK_STOCK_SORT_ASCENDING
	STOCK_SORT_DESCENDING                     = C.GTK_STOCK_SORT_DESCENDING
	STOCK_SPELL_CHECK                         = C.GTK_STOCK_SPELL_CHECK
	STOCK_STOP                                = C.GTK_STOCK_STOP
	STOCK_STRIKETHROUGH                       = C.GTK_STOCK_STRIKETHROUGH
	STOCK_UNDELETE                            = C.GTK_STOCK_UNDELETE
	STOCK_UNDERLINE                           = C.GTK_STOCK_UNDERLINE
	STOCK_UNDO                                = C.GTK_STOCK_UNDO
	STOCK_UNINDENT                            = C.GTK_STOCK_UNINDENT
	STOCK_YES                                 = C.GTK_STOCK_YES
	STOCK_ZOOM_100                            = C.GTK_STOCK_ZOOM_100
	STOCK_ZOOM_FIT                            = C.GTK_STOCK_ZOOM_FIT
	STOCK_ZOOM_IN                             = C.GTK_STOCK_ZOOM_IN
	STOCK_ZOOM_OUT                            = C.GTK_STOCK_ZOOM_OUT
)
View Source
const (
	WIN_POS_NONE             WindowPosition = C.GTK_WIN_POS_NONE
	WIN_POS_CENTER                          = C.GTK_WIN_POS_CENTER
	WIN_POS_MOUSE                           = C.GTK_WIN_POS_MOUSE
	WIN_POS_CENTER_ALWAYS                   = C.GTK_WIN_POS_CENTER_ALWAYS
	WIN_POS_CENTER_ON_PARENT                = C.GTK_WIN_POS_CENTER_ON_PARENT
)

Variables

This section is empty.

Functions

func GetAdjustmentType

func GetAdjustmentType() glib.Type

func GetBinType

func GetBinType() glib.Type

func GetBoxType

func GetBoxType() glib.Type

func GetBuildableType

func GetBuildableType() glib.Type

func GetBuilderType

func GetBuilderType() glib.Type

func GetButtonType

func GetButtonType() glib.Type

func GetCellLayoutType

func GetCellLayoutType() glib.Type

func GetCellRendererTextType

func GetCellRendererTextType() glib.Type

func GetCellRendererType

func GetCellRendererType() glib.Type

func GetClipboardType

func GetClipboardType() glib.Type

func GetComboBoxType

func GetComboBoxType() glib.Type

func GetContainerType

func GetContainerType() glib.Type

func GetDialogType

func GetDialogType() glib.Type

func GetEntryBufferType

func GetEntryBufferType() glib.Type

func GetEntryCompletionType

func GetEntryCompletionType() glib.Type

func GetEntryType

func GetEntryType() glib.Type

func GetFileChooserButtonType

func GetFileChooserButtonType() glib.Type

func GetFileChooserType

func GetFileChooserType() glib.Type

func GetGridType

func GetGridType() glib.Type

func GetImageMenuItemType

func GetImageMenuItemType() glib.Type

func GetImageType

func GetImageType() glib.Type

func GetLabelType

func GetLabelType() glib.Type

func GetListStoreType

func GetListStoreType() glib.Type

func GetMenuBarType

func GetMenuBarType() glib.Type

func GetMenuItemType

func GetMenuItemType() glib.Type

func GetMenuShellType

func GetMenuShellType() glib.Type

func GetMenuType

func GetMenuType() glib.Type

func GetMessageDialogType

func GetMessageDialogType() glib.Type

func GetMiscType

func GetMiscType() glib.Type

func GetNotebookType

func GetNotebookType() glib.Type

func GetOffscreenWindowType

func GetOffscreenWindowType() glib.Type

func GetOrientableType

func GetOrientableType() glib.Type

func GetProgressBarType

func GetProgressBarType() glib.Type

func GetScrolledWindowType

func GetScrolledWindowType() glib.Type

func GetSpinButtonType

func GetSpinButtonType() glib.Type

func GetStatusbarType

func GetStatusbarType() glib.Type

func GetTextBufferType

func GetTextBufferType() glib.Type

func GetTextIterType

func GetTextIterType() glib.Type

func GetTextViewType

func GetTextViewType() glib.Type

func GetTreeIterType

func GetTreeIterType() glib.Type

func GetTreeModelType

func GetTreeModelType() glib.Type

func GetTreePathType

func GetTreePathType() glib.Type

func GetTreeSelectionType

func GetTreeSelectionType() glib.Type

func GetTreeViewColumnType

func GetTreeViewColumnType() glib.Type

func GetTreeViewType

func GetTreeViewType() glib.Type

func GetWidgetType

func GetWidgetType() glib.Type

func GetWindowType

func GetWindowType() glib.Type

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 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

func MainLevel

func MainLevel() uint

func MainQuit

func MainQuit()

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

Types

type Adjustment

type Adjustment struct {
	glib.InitiallyUnowned
}

Adjustment is a representation of GTK's GtkAdjustment.

func (*Adjustment) Native

func (v *Adjustment) Native() *C.GtkAdjustment

Native() returns a pointer to the underlying GtkAdjustment.

type Align

type Align int

Align is a representation of GTK's GtkAlign.

type Bin

type Bin struct {
	Container
}

Bin is a representation of GTK's GtkBin.

func (*Bin) Child

func (v *Bin) Child() (*Widget, error)

Child() is a wrapper around gtk_bin_get_child().

func (*Bin) Native

func (v *Bin) Native() *C.GtkBin

Native() returns a pointer to the underlying GtkBin.

type Box

type Box struct {
	Container
}

Box is a representation of GTK's GtkBox.

func BoxNew

func BoxNew(orientation Orientation, spacing int) (*Box, error)

BoxNew() is a wrapper around gtk_box_new().

func (*Box) Homogeneous

func (v *Box) Homogeneous() bool

Homogeneous() is a wrapper around gtk_box_get_homogeneous().

func (*Box) Native

func (v *Box) Native() *C.GtkBox

Native() returns a pointer to the underlying GtkBox.

func (*Box) PackEnd

func (v *Box) PackEnd(child IWidget, expand, fill bool, padding uint)

PackEnd() is a wrapper around gtk_box_pack_end().

func (*Box) PackStart

func (v *Box) PackStart(child IWidget, expand, fill bool, padding uint)

PackStart() is a wrapper around gtk_box_pack_start().

func (*Box) QueryChildPacking

func (v *Box) QueryChildPacking(child IWidget) (expand, fill bool, padding uint, packType PackType)

QueryChildPacking() is a wrapper around gtk_box_query_child_packing().

func (*Box) ReorderChild

func (v *Box) ReorderChild(child IWidget, position int)

ReorderChild() is a wrapper around gtk_box_reorder_child().

func (*Box) SetChildPacking

func (v *Box) SetChildPacking(child IWidget, expand, fill bool, padding uint, packType PackType)

SetChildPacking() is a wrapper around gtk_box_set_child_packing().

func (*Box) SetHomogeneous

func (v *Box) SetHomogeneous(homogeneous bool)

SetHomogeneous() is a wrapper around gtk_box_set_homogeneous().

func (*Box) SetSpacing

func (v *Box) SetSpacing(spacing int)

SetSpacing() is a wrapper around gtk_box_set_spacing()

func (*Box) Spacing

func (v *Box) Spacing() int

Spacing() is a wrapper around gtk_box_get_spacing().

type Buildable

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

Buildable is a representation of GTK's GtkBuildable GInterface.

func (*Buildable) BuildableName

func (v *Buildable) BuildableName() string

func (*Buildable) Native

func (v *Buildable) Native() *C.GtkBuildable

type Builder

type Builder struct {
	*glib.Object
}

Builder is a representation of GTK's GtkBuilder.

func BuilderNew

func BuilderNew() (*Builder, error)

BuilderNew() is a wrapper around gtk_builder_new().

func (*Builder) AddFromFile

func (b *Builder) AddFromFile(filename string) error

AddFromFile() is a wrapper around gtk_builder_add_from_file().

func (*Builder) AddFromResource

func (b *Builder) AddFromResource(path string) error

AddFromResource() is a wrapper around gtk_builder_add_from_resource().

func (*Builder) AddFromString

func (b *Builder) AddFromString(str string) error

AddFromString() is a wrapper around gtk_builder_add_from_string().

func (*Builder) GetObject

func (b *Builder) GetObject(name string) (glib.IObject, error)

Object() is a wrapper around gtk_builder_get_object(). The returned result is an IObject, so it will need to be type-asserted to the appropriate type before being used. For example, to get an object and type assert it as a window:

obj, err := builder.GetObject("window")
if err != nil {
    // object not found
    return
}
if w, ok := obj.(*gtk.Window); ok {
    // do stuff with w here
} else {
    // not a *gtk.Window
}

func (*Builder) Native

func (v *Builder) Native() *C.GtkBuilder

Native() returns a pointer to the underlying GtkBuilder.

type Button

type Button struct {
	Bin
}

Button is a representation of GTK's GtkButton.

func ButtonNew

func ButtonNew() (*Button, error)

ButtonNew() is a wrapper around gtk_button_new().

func ButtonNewFromStock

func ButtonNewFromStock(stock Stock) (*Button, error)

ButtonNewFromStock() is a wrapper around gtk_button_new_from_stock().

func ButtonNewWithLabel

func ButtonNewWithLabel(label string) (*Button, error)

ButtonNewWithLabel() is a wrapper around gtk_button_new_with_label().

func ButtonNewWithMnemonic

func ButtonNewWithMnemonic(label string) (*Button, error)

ButtonNewWithMnemonic() is a wrapper around gtk_button_new_with_mnemonic().

func (*Button) Alignment

func (v *Button) Alignment() (xalign, yalign float32)

Alignment() is a wrapper around gtk_button_get_alignment().

func (*Button) AlwaysShowImage

func (v *Button) AlwaysShowImage() bool

AlwaysShowImage() is a wrapper around gtk_button_get_always_show_image().

func (*Button) Clicked

func (v *Button) Clicked()

Clicked() is a wrapper around gtk_button_clicked().

func (*Button) EventWindow

func (v *Button) EventWindow() (*gdk.Window, error)

EventWindow() is a wrapper around gtk_button_get_event_window().

func (*Button) FocusOnClick

func (v *Button) FocusOnClick() bool

FocusOnClick() is a wrapper around gtk_button_get_focus_on_click().

func (*Button) Image

func (v *Button) Image() (*Widget, error)

Image() is a wrapper around gtk_button_get_image().

func (*Button) ImagePosition

func (v *Button) ImagePosition() PositionType

ImagePosition() is a wrapper around gtk_button_get_image_position().

func (*Button) Label

func (v *Button) Label() (string, error)

Label() is a wrapper around gtk_button_get_label().

func (*Button) Native

func (v *Button) Native() *C.GtkButton

Native() returns a pointer to the underlying GtkButton.

func (*Button) Relief

func (v *Button) Relief() ReliefStyle

Relief() is a wrapper around gtk_button_get_relief().

func (*Button) SetAlignment

func (v *Button) SetAlignment(xalign, yalign float32)

SetAlignment() is a wrapper around gtk_button_set_alignment().

func (*Button) SetAlwaysShowImage

func (v *Button) SetAlwaysShowImage(alwaysShow bool)

SetAlwaysShowImage() is a wrapper around gtk_button_set_always_show_image().

func (*Button) SetFocusOnClick

func (v *Button) SetFocusOnClick(focusOnClick bool)

SetFocusOnClick() is a wrapper around gtk_button_set_focus_on_click().

func (*Button) SetImage

func (v *Button) SetImage(image IWidget)

SetImage() is a wrapper around gtk_button_set_image().

func (*Button) SetImagePosition

func (v *Button) SetImagePosition(position PositionType)

SetImagePosition() is a wrapper around gtk_button_set_image_position().

func (*Button) SetLabel

func (v *Button) SetLabel(label string)

SetLabel() is a wrapper around gtk_button_set_label().

func (*Button) SetRelief

func (v *Button) SetRelief(newStyle ReliefStyle)

SetRelief() is a wrapper around gtk_button_set_relief().

func (*Button) SetUseStock

func (v *Button) SetUseStock(useStock bool)

SetUseStock() is a wrapper around gtk_button_set_use_stock().

func (*Button) SetUseUnderline

func (v *Button) SetUseUnderline(useUnderline bool)

SetUseUnderline() is a wrapper around gtk_button_set_use_underline().

func (*Button) UseStock

func (v *Button) UseStock() bool

UseStock() is a wrapper around gtk_button_get_use_stock().

func (*Button) UseUnderline

func (v *Button) UseUnderline() bool

UseUnderline() is a wrapper around gtk_button_get_use_underline().

type ButtonsType

type ButtonsType int

ButtonsType is a representation of GTK's GtkButtonsType.

type CellLayout

type CellLayout struct {
	*glib.Object
}

CellLayout is a representation of GTK's GtkCellLayout GInterface.

func (*CellLayout) AddAttribute

func (v *CellLayout) AddAttribute(cell ICellRenderer, attribute string, column int)

AddAttribute() is a wrapper around gtk_cell_layout_add_attribute().

func (*CellLayout) Native

func (v *CellLayout) Native() *C.GtkCellLayout

Native() returns a pointer to the underlying GObject as a GtkCellLayout.

func (*CellLayout) PackStart

func (v *CellLayout) PackStart(cell ICellRenderer, expand bool)

PackStart() is a wrapper around gtk_cell_layout_pack_start().

type CellRenderer

type CellRenderer struct {
	glib.InitiallyUnowned
}

CellRenderer is a representation of GTK's GtkCellRenderer.

func (*CellRenderer) Native

func (v *CellRenderer) Native() *C.GtkCellRenderer

Native() returns a pointer to the underlying GtkCellRenderer.

type CellRendererText

type CellRendererText struct {
	CellRenderer
}

CellRendererText is a representation of GTK's GtkCellRendererText.

func CellRendererTextNew

func CellRendererTextNew() (*CellRendererText, error)

CellRendererTextNew() is a wrapper around gtk_cell_renderer_text_new().

func (*CellRendererText) Native

func (v *CellRendererText) Native() *C.GtkCellRendererText

Native() returns a pointer to the underlying GtkCellRendererText.

type Clipboard

type Clipboard struct {
	*glib.Object
}

Clipboard is a wrapper around GTK's GtkClipboard.

func ClipboardGet

func ClipboardGet(atom gdk.Atom) (*Clipboard, error)

Clipboard() is a wrapper around gtk_clipboard_get().

func ClipboardGetForDisplay

func ClipboardGetForDisplay(display *gdk.Display, atom gdk.Atom) (*Clipboard, error)

ClipboardForDisplay() is a wrapper around gtk_clipboard_get_for_display().

func (*Clipboard) Native

func (v *Clipboard) Native() *C.GtkClipboard

Native() returns a pointer to the underlying GtkClipboard.

func (*Clipboard) SetText

func (v *Clipboard) SetText(text string)

SetText() is a wrapper around gtk_clipboard_set_text().

type ComboBox

type ComboBox struct {
	Bin

	// Interfaces
	CellLayout
}

ComboBox is a representation of GTK's GtkComboBox.

func ComboBoxNew

func ComboBoxNew() (*ComboBox, error)

ComboBoxNew() is a wrapper around gtk_combo_box_new().

func ComboBoxNewWithEntry

func ComboBoxNewWithEntry() (*ComboBox, error)

ComboBoxNewWithEntry() is a wrapper around gtk_combo_box_new_with_entry().

func ComboBoxNewWithModel

func ComboBoxNewWithModel(model ITreeModel) (*ComboBox, error)

ComboBoxNewWithModel() is a wrapper around gtk_combo_box_new_with_model().

func (*ComboBox) Active

func (v *ComboBox) Active() int

Active() is a wrapper around gtk_combo_box_get_active().

func (*ComboBox) Native

func (v *ComboBox) Native() *C.GtkComboBox

Native() returns a pointer to the underlying GtkComboBox.

func (*ComboBox) SetActive

func (v *ComboBox) SetActive(index int)

SetActive() is a wrapper around gtk_combo_box_set_active().

type Container

type Container struct {
	Widget
}

Container is a representation of GTK's GtkContainer.

func (*Container) Add

func (v *Container) Add(w IWidget)

Add() is a wrapper around gtk_container_add().

func (*Container) Native

func (v *Container) Native() *C.GtkContainer

Native() returns a pointer to the underlying GtkContainer.

func (*Container) Remove

func (v *Container) Remove(w IWidget)

Remove() is a wrapper around gtk_container_remove().

type Dialog

type Dialog struct {
	Window
}

Dialog is a representation of GTK's GtkDialog.

func DialogNew

func DialogNew() (*Dialog, error)

DialogNew() is a wrapper around gtk_dialog_new().

func (*Dialog) ActionArea

func (v *Dialog) ActionArea() (*Widget, error)

ActionArea() is a wrapper around gtk_dialog_get_action_area().

func (*Dialog) AddActionWidget

func (v *Dialog) AddActionWidget(child IWidget, id ResponseType)

AddActionWidget() is a wrapper around gtk_dialog_add_action_widget().

func (*Dialog) AddButton

func (v *Dialog) AddButton(text string, id ResponseType) (*Button, error)

AddButton() is a wrapper around gtk_dialog_add_button(). text may be either the literal button text, or a Stock type converted to a string.

func (*Dialog) ContentArea

func (v *Dialog) ContentArea() (*Box, error)

ContentArea() is a wrapper around gtk_dialog_get_content_area().

func (*Dialog) GetResponseForWidget

func (v *Dialog) GetResponseForWidget(widget IWidget) ResponseType

ResponseForWidget() is a wrapper around gtk_dialog_get_response_for_widget().

func (*Dialog) GetWidgetForResponse

func (v *Dialog) GetWidgetForResponse(id ResponseType) (*Widget, error)

WidgetForResponse() is a wrapper around gtk_dialog_get_widget_for_response().

func (*Dialog) Native

func (v *Dialog) Native() *C.GtkDialog

Native() returns a pointer to the underlying GtkDialog.

func (*Dialog) Response

func (v *Dialog) Response(response ResponseType)

Response() is a wrapper around gtk_dialog_response().

func (*Dialog) Run

func (v *Dialog) Run() int

Run() is a wrapper around gtk_dialog_run().

func (*Dialog) SetDefaultResponse

func (v *Dialog) SetDefaultResponse(id ResponseType)

SetDefaultResponse() is a wrapper around gtk_dialog_set_default_response().

func (*Dialog) SetResponseSensitive

func (v *Dialog) SetResponseSensitive(id ResponseType, setting bool)

SetResponseSensitive() is a wrapper around gtk_dialog_set_response_sensitive().

type DialogFlags

type DialogFlags int

DialogFlags is a representation of GTK's GtkDialogFlags.

const (
	DIALOG_MODAL               DialogFlags = C.GTK_DIALOG_MODAL
	DIALOG_DESTROY_WITH_PARENT             = C.GTK_DIALOG_DESTROY_WITH_PARENT
)

type Entry

type Entry struct {
	Widget
}

Entry is a representation of GTK's GtkEntry.

func EntryNew

func EntryNew() (*Entry, error)

EntryNew() is a wrapper around gtk_entry_new().

func EntryNewWithBuffer

func EntryNewWithBuffer(buffer *EntryBuffer) (*Entry, error)

EntryNewWithBuffer() is a wrapper around gtk_entry_new_with_buffer().

func (*Entry) ActivatesDefault

func (v *Entry) ActivatesDefault() bool

ActivatesDefault() is a wrapper around gtk_entry_get_activates_default().

func (*Entry) Alignment

func (v *Entry) Alignment() float32

Alignment() is a wrapper around gtk_entry_get_alignment().

func (*Entry) Buffer

func (v *Entry) Buffer() (*EntryBuffer, error)

Buffer() is a wrapper around gtk_entry_get_buffer().

func (*Entry) Completion

func (v *Entry) Completion() (*EntryCompletion, error)

Completion() is a wrapper around gtk_entry_get_completion().

func (*Entry) CurrentIconDragSource

func (v *Entry) CurrentIconDragSource() int

CurrentIconDragSource() is a wrapper around gtk_entry_get_current_icon_drag_source().

func (*Entry) CursorHAdjustment

func (v *Entry) CursorHAdjustment() (*Adjustment, error)

CursorHAdjustment() is a wrapper around gtk_entry_get_cursor_hadjustment().

func (*Entry) GetIconActivatable

func (v *Entry) GetIconActivatable(iconPos EntryIconPosition) bool

IconActivatable() is a wrapper around gtk_entry_get_icon_activatable().

func (*Entry) GetIconAtPos

func (v *Entry) GetIconAtPos(x, y int) int

IconAtPos() is a wrapper around gtk_entry_get_icon_at_pos().

func (*Entry) GetIconName

func (v *Entry) GetIconName(iconPos EntryIconPosition) (string, error)

IconName() is a wrapper around gtk_entry_get_icon_name().

func (*Entry) GetIconSensitive

func (v *Entry) GetIconSensitive(iconPos EntryIconPosition) bool

IconSensitive() is a wrapper around gtk_entry_get_icon_sensitive().

func (*Entry) GetIconStock

func (v *Entry) GetIconStock(iconPos EntryIconPosition) (string, error)

IconStock() is a wrapper around gtk_entry_get_icon_stock().

func (*Entry) GetIconStorageType

func (v *Entry) GetIconStorageType(iconPos EntryIconPosition) ImageType

IconStorageType() is a wrapper around gtk_entry_get_icon_storage_type().

func (*Entry) GetIconTooltipMarkup

func (v *Entry) GetIconTooltipMarkup(iconPos EntryIconPosition) (string, error)

IconTooltipMarkup() is a wrapper around gtk_entry_get_icon_tooltip_markup().

func (*Entry) GetIconTooltipText

func (v *Entry) GetIconTooltipText(iconPos EntryIconPosition) (string, error)

IconTooltipText() is a wrapper around gtk_entry_get_icon_tooltip_text().

func (*Entry) HasFrame

func (v *Entry) HasFrame() bool

HasFrame() is a wrapper around gtk_entry_get_has_frame().

func (*Entry) InputHints

func (v *Entry) InputHints() InputHints

InputHints() is a wrapper around gtk_entry_get_input_hints().

func (*Entry) InputPurpose

func (v *Entry) InputPurpose() InputPurpose

InputPurpose() is a wrapper around gtk_entry_get_input_purpose().

func (*Entry) InvisibleChar

func (v *Entry) InvisibleChar() rune

InvisibleChar() is a wrapper around gtk_entry_get_invisible_char().

func (*Entry) LayoutIndexToTextIndex

func (v *Entry) LayoutIndexToTextIndex(layoutIndex int) int

LayoutIndexToTextIndex() is a wrapper around gtk_entry_layout_index_to_text_index().

func (*Entry) LayoutOffsets

func (v *Entry) LayoutOffsets() (x, y int)

LayoutOffsets() is a wrapper around gtk_entry_get_layout_offsets().

func (*Entry) MaxLength

func (v *Entry) MaxLength() int

MaxLength() is a wrapper around gtk_entry_get_max_length().

func (*Entry) Native

func (v *Entry) Native() *C.GtkEntry

Native() returns a pointer to the underlying GtkEntry.

func (*Entry) OverwriteMode

func (v *Entry) OverwriteMode() bool

OverwriteMode() is a wrapper around gtk_entry_get_overwrite_mode().

func (*Entry) PlaceholderText

func (v *Entry) PlaceholderText() (string, error)

PlaceholderText() is a wrapper around gtk_entry_get_placeholder_text().

func (*Entry) ProgressFraction

func (v *Entry) ProgressFraction() float64

ProgressFraction() is a wrapper around gtk_entry_get_progress_fraction().

func (*Entry) ProgressPulse

func (v *Entry) ProgressPulse()

ProgressPulse() is a wrapper around gtk_entry_progress_pulse().

func (*Entry) ProgressPulseStep

func (v *Entry) ProgressPulseStep() float64

ProgressPulseStep() is a wrapper around gtk_entry_get_progress_pulse_step().

func (*Entry) ResetIMContext

func (v *Entry) ResetIMContext()

ResetIMContext() is a wrapper around gtk_entry_reset_im_context().

func (*Entry) SetActivatesDefault

func (v *Entry) SetActivatesDefault(setting bool)

SetActivatesDefault() is a wrapper around gtk_entry_set_activates_default().

func (*Entry) SetAlignment

func (v *Entry) SetAlignment(xalign float32)

SetAlignment() is a wrapper around gtk_entry_set_alignment().

func (*Entry) SetBuffer

func (v *Entry) SetBuffer(buffer *EntryBuffer)

SetBuffer() is a wrapper around gtk_entry_set_buffer().

func (*Entry) SetCompletion

func (v *Entry) SetCompletion(completion *EntryCompletion)

SetCompletion() is a wrapper around gtk_entry_set_completion().

func (*Entry) SetCursorHAdjustment

func (v *Entry) SetCursorHAdjustment(adjustment *Adjustment)

SetCursorHAdjustment() is a wrapper around gtk_entry_set_cursor_hadjustment().

func (*Entry) SetHasFrame

func (v *Entry) SetHasFrame(setting bool)

SetHasFrame() is a wrapper around gtk_entry_set_has_frame().

func (*Entry) SetIconActivatable

func (v *Entry) SetIconActivatable(iconPos EntryIconPosition, activatable bool)

SetIconActivatable() is a wrapper around gtk_entry_set_icon_activatable().

func (*Entry) SetIconFromIconName

func (v *Entry) SetIconFromIconName(iconPos EntryIconPosition, name string)

SetIconFromIconName() is a wrapper around gtk_entry_set_icon_from_icon_name().

func (*Entry) SetIconFromStock

func (v *Entry) SetIconFromStock(iconPos EntryIconPosition, stockID string)

SetIconFromStock() is a wrapper around gtk_entry_set_icon_from_stock().

func (*Entry) SetIconSensitive

func (v *Entry) SetIconSensitive(iconPos EntryIconPosition, sensitive bool)

SetIconSensitive() is a wrapper around gtk_entry_set_icon_sensitive().

func (*Entry) SetIconTooltipMarkup

func (v *Entry) SetIconTooltipMarkup(iconPos EntryIconPosition, tooltip string)

SetIconTooltipMarkup() is a wrapper around gtk_entry_set_icon_tooltip_markup().

func (*Entry) SetIconTooltipText

func (v *Entry) SetIconTooltipText(iconPos EntryIconPosition, tooltip string)

SetIconTooltipText() is a wrapper around gtk_entry_set_icon_tooltip_text().

func (*Entry) SetInputHints

func (v *Entry) SetInputHints(hints InputHints)

SetInputHints() is a wrapper around gtk_entry_set_input_hints().

func (*Entry) SetInputPurpose

func (v *Entry) SetInputPurpose(purpose InputPurpose)

SetInputPurpose() is a wrapper around gtk_entry_set_input_purpose().

func (*Entry) SetInvisibleChar

func (v *Entry) SetInvisibleChar(ch rune)

SetInvisibleChar() is a wrapper around gtk_entry_set_invisible_char().

func (*Entry) SetMaxLength

func (v *Entry) SetMaxLength(len int)

SetMaxLength() is a wrapper around gtk_entry_set_max_length().

func (*Entry) SetOverwriteMode

func (v *Entry) SetOverwriteMode(overwrite bool)

SetOverwriteMode() is a wrapper around gtk_entry_set_overwrite_mode().

func (*Entry) SetPlaceholderText

func (v *Entry) SetPlaceholderText(text string)

SetPlaceholderText() is a wrapper around gtk_entry_set_placeholder_text().

func (*Entry) SetProgressFraction

func (v *Entry) SetProgressFraction(fraction float64)

SetProgressFraction() is a wrapper around gtk_entry_set_progress_fraction().

func (*Entry) SetProgressPulseStep

func (v *Entry) SetProgressPulseStep(fraction float64)

SetProgressPulseStep() is a wrapper around gtk_entry_set_progress_pulse_step().

func (*Entry) SetText

func (v *Entry) SetText(text string)

SetText() is a wrapper around gtk_entry_set_text().

func (*Entry) SetVisibility

func (v *Entry) SetVisibility(visible bool)

SetVisibility() is a wrapper around gtk_entry_set_visibility().

func (*Entry) SetWidthChars

func (v *Entry) SetWidthChars(nChars int)

SetWidthChars() is a wrapper around gtk_entry_set_width_chars().

func (*Entry) Text

func (v *Entry) Text() (string, error)

Text() is a wrapper around gtk_entry_get_text().

func (*Entry) TextIndexToLayoutIndex

func (v *Entry) TextIndexToLayoutIndex(textIndex int) int

TextIndexToLayoutIndex() is a wrapper around gtk_entry_text_index_to_layout_index().

func (*Entry) TextLength

func (v *Entry) TextLength() uint16

TextLength() is a wrapper around gtk_entry_get_text_length().

func (*Entry) UnsetInvisibleChar

func (v *Entry) UnsetInvisibleChar()

UnsetInvisibleChar() is a wrapper around gtk_entry_unset_invisible_char().

func (*Entry) Visibility

func (v *Entry) Visibility() bool

Visibility() is a wrapper around gtk_entry_get_visibility().

func (*Entry) WidthChars

func (v *Entry) WidthChars() int

WidthChars() is a wrapper around gtk_entry_get_width_chars().

type EntryBuffer

type EntryBuffer struct {
	*glib.Object
}

EntryBuffer is a representation of GTK's GtkEntryBuffer.

func EntryBufferNew

func EntryBufferNew(initialChars string, nInitialChars int) (*EntryBuffer, error)

EntryBufferNew() is a wrapper around gtk_entry_buffer_new().

func (*EntryBuffer) Bytes

func (v *EntryBuffer) Bytes() uint

Bytes() is a wrapper around gtk_entry_buffer_get_bytes().

func (*EntryBuffer) DeleteText

func (v *EntryBuffer) DeleteText(position uint, nChars int) uint

DeleteText() is a wrapper around gtk_entry_buffer_delete_text().

func (*EntryBuffer) EmitDeletedText

func (v *EntryBuffer) EmitDeletedText(pos, nChars uint)

EmitDeletedText() is a wrapper around gtk_entry_buffer_emit_deleted_text().

func (*EntryBuffer) EmitInsertedText

func (v *EntryBuffer) EmitInsertedText(pos uint, text string)

EmitInsertedText() is a wrapper around gtk_entry_buffer_emit_inserted_text().

func (*EntryBuffer) InsertText

func (v *EntryBuffer) InsertText(position uint, text string) uint

InsertText() is a wrapper around gtk_entry_buffer_insert_text().

func (*EntryBuffer) Length

func (v *EntryBuffer) Length() uint

Length() is a wrapper around gtk_entry_buffer_get_length().

func (*EntryBuffer) MaxLength

func (v *EntryBuffer) MaxLength() int

MaxLength() is a wrapper around gtk_entry_buffer_get_max_length().

func (*EntryBuffer) Native

func (v *EntryBuffer) Native() *C.GtkEntryBuffer

Native() returns a pointer to the underlying GtkEntryBuffer.

func (*EntryBuffer) SetMaxLength

func (v *EntryBuffer) SetMaxLength(maxLength int)

SetMaxLength() is a wrapper around gtk_entry_buffer_set_max_length().

func (*EntryBuffer) SetText

func (v *EntryBuffer) SetText(text string)

SetText() is a wrapper around gtk_entry_buffer_set_text().

func (*EntryBuffer) Text

func (v *EntryBuffer) Text() (string, error)

Text() is a wrapper around gtk_entry_buffer_get_text(). A non-nil error is returned in the case that gtk_entry_buffer_get_text returns NULL to differentiate between NULL and an empty string.

type EntryCompletion

type EntryCompletion struct {
	*glib.Object
}

EntryCompletion is a representation of GTK's GtkEntryCompletion.

func (*EntryCompletion) Native

func (v *EntryCompletion) Native() *C.GtkEntryCompletion

Native() returns a pointer to the underlying GtkEntryCompletion.

type EntryIconPosition

type EntryIconPosition int

EntryIconPosition is a representation of GTK's GtkEntryIconPosition.

const (
	ENTRY_ICON_PRIMARY   EntryIconPosition = C.GTK_ENTRY_ICON_PRIMARY
	ENTRY_ICON_SECONDARY                   = C.GTK_ENTRY_ICON_SECONDARY
)

type FileChooser

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

FileChooser is a representation of GTK's GtkFileChooser GInterface.

func (*FileChooser) Filename

func (f *FileChooser) Filename() string

func (*FileChooser) Native

func (v *FileChooser) Native() *C.GtkFileChooser

func (*FileChooser) SetCurrentFolder

func (f *FileChooser) SetCurrentFolder(filename string)

type FileChooserButton

type FileChooserButton struct {
	Box

	// Interfaces
	FileChooser
}

* GtkFileChooserButton

func (*FileChooserButton) Native

Native() returns a pointer to the underlying GtkGrid.

type Grid

type Grid struct {
	Container

	// Interfaces
	Orientable
}

Grid is a representation of GTK's GtkGrid.

func GridNew

func GridNew() (*Grid, error)

GridNew() is a wrapper around gtk_grid_new().

func (*Grid) Attach

func (v *Grid) Attach(child IWidget, left, top, width, height int)

Attach() is a wrapper around gtk_grid_attach().

func (*Grid) AttachNextTo

func (v *Grid) AttachNextTo(child, sibling IWidget, side PositionType, width, height int)

AttachNextTo() is a wrapper around gtk_grid_attach_next_to().

func (*Grid) ColumnHomogeneous

func (v *Grid) ColumnHomogeneous() bool

ColumnHomogeneous() is a wrapper around gtk_grid_get_column_homogeneous().

func (*Grid) ColumnSpacing

func (v *Grid) ColumnSpacing() uint

ColumnSpacing() is a wrapper around gtk_grid_get_column_spacing().

func (*Grid) GetChildAt

func (v *Grid) GetChildAt(left, top int) (*Widget, error)

ChildAt() is a wrapper around gtk_grid_get_child_at().

func (*Grid) InsertColumn

func (v *Grid) InsertColumn(position int)

InsertColumn() is a wrapper around gtk_grid_insert_column().

func (*Grid) InsertNextTo

func (v *Grid) InsertNextTo(sibling IWidget, side PositionType)

InsertNextTo() is a wrapper around gtk_grid_insert_next_to()

func (*Grid) InsertRow

func (v *Grid) InsertRow(position int)

InsertRow() is a wrapper around gtk_grid_insert_row().

func (*Grid) Native

func (v *Grid) Native() *C.GtkGrid

Native() returns a pointer to the underlying GtkGrid.

func (*Grid) RowHomogeneous

func (v *Grid) RowHomogeneous() bool

RowHomogeneous() is a wrapper around gtk_grid_get_row_homogeneous().

func (*Grid) RowSpacing

func (v *Grid) RowSpacing() uint

RowSpacing() is a wrapper around gtk_grid_get_row_spacing().

func (*Grid) SetColumnHomogeneous

func (v *Grid) SetColumnHomogeneous(homogeneous bool)

SetColumnHomogeneous() is a wrapper around gtk_grid_set_column_homogeneous().

func (*Grid) SetColumnSpacing

func (v *Grid) SetColumnSpacing(spacing uint)

SetColumnSpacing() is a wrapper around gtk_grid_set_column_spacing().

func (*Grid) SetRowHomogeneous

func (v *Grid) SetRowHomogeneous(homogeneous bool)

SetRowHomogeneous() is a wrapper around gtk_grid_set_row_homogeneous().

func (*Grid) SetRowSpacing

func (v *Grid) SetRowSpacing(spacing uint)

SetRowSpacing() is a wrapper around gtk_grid_set_row_spacing().

type ICellLayout

type ICellLayout interface {
	// contains filtered or unexported methods
}

ICellLayout is an interface type implemented by all structs embedding a CellLayout. It is meant to be used as an argument type for wrapper functions that wrap around a C GTK function taking a GtkCellLayout.

type ICellRenderer

type ICellRenderer interface {
	// contains filtered or unexported methods
}

ICellRenderer is an interface type implemented by all structs embedding a CellRenderer. It is meant to be used as an argument type for wrapper functions that wrap around a C GTK function taking a GtkCellRenderer.

type IOrientable

type IOrientable interface {
	// contains filtered or unexported methods
}

IOrientable is an interface type implemented by all structs embedding an Orientable. It is meant to be used as an argument type for wrapper functions that wrap around a C GTK function taking a GtkOrientable.

type ITreeModel

type ITreeModel interface {
	// contains filtered or unexported methods
}

ITreeModel is an interface type implemented by all structs embedding a TreeModel. It is meant to be used as an argument type for wrapper functions that wrap around a C GTK function taking a GtkTreeModel.

type IWidget

type IWidget interface {
	// contains filtered or unexported methods
}

IWidget is an interface type implemented by all structs embedding a Widget. It is meant to be used as an argument type for wrapper functions that wrap around a C GTK function taking a GtkWidget.

type IWindow

type IWindow interface {
	// contains filtered or unexported methods
}

IWindow is an interface type implemented by all structs embedding a Window. It is meant to be used as an argument type for wrapper functions that wrap around a C GTK function taking a GtkWindow.

type IconSize

type IconSize int

IconSize is a representation of GTK's GtkIconSize.

type Image

type Image struct {
	Misc
}

Image is a representation of GTK's GtkImage.

func ImageNew

func ImageNew() (*Image, error)

ImageNew() is a wrapper around gtk_image_new().

func ImageNewFromFile

func ImageNewFromFile(filename string) (*Image, error)

ImageNewFromFile() is a wrapper around gtk_image_new_from_file().

func ImageNewFromIconName

func ImageNewFromIconName(iconName string, size IconSize) (*Image, error)

ImageNewFromIconName() is a wrapper around gtk_image_new_from_icon_name().

func ImageNewFromResource

func ImageNewFromResource(resourcePath string) (*Image, error)

ImageNewFromResource() is a wrapper around gtk_image_new_from_resource().

func ImageNewFromStock

func ImageNewFromStock(stock Stock, size IconSize) (*Image, error)

ImageNewFromStock() is a wrapper around gtk_image_new_from_stock().

func (*Image) Clear

func (v *Image) Clear()

Clear() is a wrapper around gtk_image_clear().

func (*Image) IconName

func (v *Image) IconName() (string, IconSize)

IconName() is a wrapper around gtk_image_get_icon_name().

func (*Image) Native

func (v *Image) Native() *C.GtkImage

Native() returns a pointer to the underlying GtkImage.

func (*Image) PixelSize

func (v *Image) PixelSize() int

PixelSize() is a wrapper around gtk_image_get_pixel_size().

func (*Image) SetFromFile

func (v *Image) SetFromFile(filename string)

SetFromFile() is a wrapper around gtk_image_set_from_file().

func (*Image) SetFromIconName

func (v *Image) SetFromIconName(iconName string, size IconSize)

SetFromIconName() is a wrapper around gtk_image_set_from_icon_name().

func (*Image) SetFromResource

func (v *Image) SetFromResource(resourcePath string)

SetFromResource() is a wrapper around gtk_image_set_from_resource().

func (*Image) SetFromStock

func (v *Image) SetFromStock(stock Stock, size IconSize)

SetFromStock() is a wrapper around gtk_image_set_from_stock().

func (*Image) SetPixelSize

func (v *Image) SetPixelSize(pixelSize int)

SetPixelSize() is a wrapper around gtk_image_set_pixel_size().

func (*Image) StorageType

func (v *Image) StorageType() ImageType

StorageType() is a wrapper around gtk_image_get_storage_type().

type ImageMenuItem

type ImageMenuItem struct {
	MenuItem
}

ImageMenuItem is a representation of GTK's GtkImageMenuItem.

func (*ImageMenuItem) Native

func (v *ImageMenuItem) Native() *C.GtkImageMenuItem

Native() returns a pointer to the underlying GtkImageMenuItem.

type ImageType

type ImageType int

ImageType is a representation of GTK's GtkImageType.

type InputHints

type InputHints int

InputHints is a representation of GTK's GtkInputHints.

type InputPurpose

type InputPurpose int

InputPurpose is a representation of GTK's GtkInputPurpose.

type Label

type Label struct {
	Misc
}

Label is a representation of GTK's GtkLabel.

func LabelNew

func LabelNew(str string) (*Label, error)

LabelNew() is a wrapper around gtk_label_new().

func LabelNewWithMnemonic

func LabelNewWithMnemonic(str string) (*Label, error)

LabelNewWithMnemonic() is a wrapper around gtk_label_new_with_mnemonic().

func (*Label) Native

func (v *Label) Native() *C.GtkLabel

Native() returns a pointer to the underlying GtkLabel.

func (*Label) Selectable

func (v *Label) Selectable() bool

Selectable() is a wrapper around gtk_label_get_selectable().

func (*Label) SetLabel

func (v *Label) SetLabel(str string)

SetLabel() is a wrapper around gtk_label_set_label().

func (*Label) SetLineWrap

func (v *Label) SetLineWrap(wrap bool)

SetLineWrap() is a wrapper around gtk_label_set_line_wrap().

func (*Label) SetMarkup

func (v *Label) SetMarkup(str string)

SetMarkup() is a wrapper around gtk_label_set_markup().

func (*Label) SetMarkupWithMnemonic

func (v *Label) SetMarkupWithMnemonic(str string)

SetMarkupWithMnemonic() is a wrapper around gtk_label_set_markup_with_mnemonic().

func (*Label) SetMaxWidthChars

func (v *Label) SetMaxWidthChars(nChars int)

SetMaxWidthChars() is a wrapper around gtk_label_set_max_width_chars().

func (*Label) SetPattern

func (v *Label) SetPattern(patern string)

SetPattern() is a wrapper around gtk_label_set_pattern().

func (*Label) SetSelectable

func (v *Label) SetSelectable(setting bool)

SetSelectable() is a wrapper around gtk_label_set_selectable().

func (*Label) SetText

func (v *Label) SetText(str string)

SetText() is a wrapper around gtk_label_set_text().

func (*Label) SetWidthChars

func (v *Label) SetWidthChars(nChars int)

SetWidthChars() is a wrapper around gtk_label_set_width_chars().

func (*Label) Text

func (v *Label) Text() (string, error)

Text() is a wrapper around gtk_label_get_text().

type ListStore

type ListStore struct {
	*glib.Object

	// Interfaces
	TreeModel
}

ListStore is a representation of GTK's GtkListStore.

func ListStoreNew

func ListStoreNew(columns map[string]glib.Type) (*ListStore, error)

ListStoreNew() is a wrapper around gtk_list_store_newv().

func (*ListStore) Append

func (v *ListStore) Append(iter *TreeIter)

Append() is a wrapper around gtk_list_store_append().

func (*ListStore) Clear

func (v *ListStore) Clear()

Clear() is a wrapper around gtk_list_store_clear().

func (*ListStore) ColumnIndex

func (v *ListStore) ColumnIndex(name string) int

func (*ListStore) InsertWithValues

func (v *ListStore) InsertWithValues(position int, values map[string]interface{}) (*TreeIter, error)

InsertWithValues() is a wrapper around gtk_list_store_insert_with_valuesv()

func (*ListStore) IterIsValid

func (v *ListStore) IterIsValid(iter *TreeIter) bool

IterIsValid() is a wrapper around gtk_list_store_iter_is_valid().

func (*ListStore) MoveAfter

func (v *ListStore) MoveAfter(iter, position *TreeIter)

MoveAfter() is a wrapper around gtk_list_store_move_after().

func (*ListStore) MoveBefore

func (v *ListStore) MoveBefore(iter, position *TreeIter)

MoveBefore() is a wrapper around gtk_list_store_move_before().

func (*ListStore) Native

func (v *ListStore) Native() *C.GtkListStore

Native() returns a pointer to the underlying GtkListStore.

func (*ListStore) Prepend

func (v *ListStore) Prepend(iter *TreeIter)

Prepend() is a wrapper around gtk_list_store_prepend().

func (*ListStore) Set

func (v *ListStore) Set(iter *TreeIter, values map[string]interface{}) error

Set() is a wrapper around gtk_list_store_set_valuesv()

func (*ListStore) Swap

func (v *ListStore) Swap(a, b *TreeIter)

Swap() is a wrapper around gtk_list_store_swap().

type Menu struct {
	MenuShell
}

Menu is a representation of GTK's GtkMenu.

func MenuNew() (*Menu, error)

MenuNew() is a wrapper around gtk_menu_new().

func (v *Menu) Native() *C.GtkMenu

Native() returns a pointer to the underlying GtkMenu.

type MenuBar struct {
	MenuShell
}

MenuBar is a representation of GTK's GtkMenuBar.

func MenuBarNew() (*MenuBar, error)

MenuBarNew() is a wrapper around gtk_menu_bar_new().

func (v *MenuBar) Native() *C.GtkMenuBar

Native() returns a pointer to the underlying GtkMenuBar.

type MenuItem struct {
	Bin
}

MenuItem is a representation of GTK's GtkMenuItem.

func MenuItemNew() (*MenuItem, error)

MenuItemNew() is a wrapper around gtk_menu_item_new().

func MenuItemNewWithLabel(label string) (*MenuItem, error)

MenuItemNewWithLabel() is a wrapper around gtk_menu_item_new_with_label().

func MenuItemNewWithMnemonic(label string) (*MenuItem, error)

MenuItemNewWithMnemonic() is a wrapper around gtk_menu_item_new_with_mnemonic().

func (v *MenuItem) Native() *C.GtkMenuItem

Native() returns a pointer to the underlying GtkMenuItem.

func (v *MenuItem) SetSubmenu(submenu IWidget)

SetSubmenu() is a wrapper around gtk_menu_item_set_submenu().

type MenuShell struct {
	Container
}

MenuShell is a representation of GTK's GtkMenuShell.

func (v *MenuShell) Append(child IWidget)

Append() is a wrapper around gtk_menu_shell_append().

func (v *MenuShell) Native() *C.GtkMenuShell

Native() returns a pointer to the underlying GtkMenuShell.

type MessageDialog

type MessageDialog struct {
	Dialog
}

MessageDialog is a representation of GTK's GtkMessageDialog.

func MessageDialogNew

func MessageDialogNew(parent IWindow, flags DialogFlags, mType MessageType, buttons ButtonsType, format string, a ...interface{}) *MessageDialog

MessageDialogNew() is a wrapper around gtk_message_dialog_new(). The text is created and formatted by the format specifier and any additional arguments.

func (*MessageDialog) Native

func (v *MessageDialog) Native() *C.GtkMessageDialog

Native() returns a pointer to the underlying GtkMessageDialog.

type MessageType

type MessageType int

MessageType is a representation of GTK's GtkMessageType.

type Misc

type Misc struct {
	Widget
}

Misc is a representation of GTK's GtkMisc.

func (*Misc) Native

func (v *Misc) Native() *C.GtkMisc

Native() returns a pointer to the underlying GtkMisc.

type Notebook

type Notebook struct {
	Container
}

Notebook is a representation of GTK's GtkNotebook.

func NotebookNew

func NotebookNew() (*Notebook, error)

NotebookNew() is a wrapper around gtk_notebook_new().

func (*Notebook) AppendPage

func (v *Notebook) AppendPage(child IWidget, tabLabel IWidget) int

AppendPage() is a wrapper around gtk_notebook_append_page().

func (*Notebook) AppendPageMenu

func (v *Notebook) AppendPageMenu(child IWidget, tabLabel IWidget, menuLabel IWidget) int

AppendPageMenu() is a wrapper around gtk_notebook_append_page_menu().

func (*Notebook) CurrentPage

func (v *Notebook) CurrentPage() int

CurrentPage() is a wrapper around gtk_notebook_get_current_page().

func (*Notebook) GetActionWidget

func (v *Notebook) GetActionWidget(packType PackType) (*Widget, error)

ActionWidget() is a wrapper around gtk_notebook_get_action_widget().

func (*Notebook) GetMenuLabel

func (v *Notebook) GetMenuLabel(child IWidget) (*Widget, error)

MenuLabel() is a wrapper around gtk_notebook_get_menu_label().

func (*Notebook) GetMenuLabelText

func (v *Notebook) GetMenuLabelText(child IWidget) (string, error)

MenuLabelText() is a wrapper around gtk_notebook_get_menu_label_text().

func (*Notebook) GetNthPage

func (v *Notebook) GetNthPage(pageNum int) (*Widget, error)

NthPage() is a wrapper around gtk_notebook_get_nth_page().

func (*Notebook) GetTabDetachable

func (v *Notebook) GetTabDetachable(child IWidget) bool

TabDetachable() is a wrapper around gtk_notebook_get_tab_detachable().

func (*Notebook) GetTabLabel

func (v *Notebook) GetTabLabel(child IWidget) (*Widget, error)

TabLabel() is a wrapper around gtk_notebook_get_tab_label().

func (*Notebook) GetTabLabelText

func (v *Notebook) GetTabLabelText(child IWidget) (string, error)

TabLabelText() is a wrapper around gtk_notebook_get_tab_label_text().

func (*Notebook) GetTabReorderable

func (v *Notebook) GetTabReorderable(child IWidget) bool

TabReorderable() is a wrapper around gtk_notebook_get_tab_reorderable().

func (*Notebook) GroupName

func (v *Notebook) GroupName() (string, error)

GroupName() is a wrapper around gtk_notebook_get_group_name().

func (*Notebook) InsertPage

func (v *Notebook) InsertPage(child IWidget, tabLabel IWidget, position int) int

InsertPage() is a wrapper around gtk_notebook_insert_page().

func (*Notebook) InsertPageMenu

func (v *Notebook) InsertPageMenu(child IWidget, tabLabel IWidget, menuLabel IWidget, position int) int

InsertPageMenu() is a wrapper around gtk_notebook_insert_page_menu().

func (*Notebook) NPages

func (v *Notebook) NPages() int

NPages() is a wrapper around gtk_notebook_get_n_pages().

func (*Notebook) Native

func (v *Notebook) Native() *C.GtkNotebook

Native() returns a pointer to the underlying GtkNotebook.

func (*Notebook) NextPage

func (v *Notebook) NextPage()

NextPage() is a wrapper around gtk_notebook_next_page().

func (*Notebook) PageNum

func (v *Notebook) PageNum(child IWidget) int

PageNum() is a wrapper around gtk_notebook_page_num().

func (*Notebook) PopupDisable

func (v *Notebook) PopupDisable()

PopupDisable() is a wrapper around gtk_notebook_popup_disable().

func (*Notebook) PopupEnable

func (v *Notebook) PopupEnable()

PopupEnable() is a wrapper around gtk_notebook_popup_enable().

func (*Notebook) PrependPage

func (v *Notebook) PrependPage(child IWidget, tabLabel IWidget) int

PrependPage() is a wrapper around gtk_notebook_prepend_page().

func (*Notebook) PrependPageMenu

func (v *Notebook) PrependPageMenu(child IWidget, tabLabel IWidget, menuLabel IWidget) int

PrependPageMenu() is a wrapper around gtk_notebook_prepend_page_menu().

func (*Notebook) PrevPage

func (v *Notebook) PrevPage()

PrevPage() is a wrapper around gtk_notebook_prev_page().

func (*Notebook) RemovePage

func (v *Notebook) RemovePage(pageNum int)

RemovePage() is a wrapper around gtk_notebook_remove_page().

func (*Notebook) ReorderChild

func (v *Notebook) ReorderChild(child IWidget, position int)

ReorderChild() is a wrapper around gtk_notebook_reorder_child().

func (*Notebook) Scrollable

func (v *Notebook) Scrollable() bool

Scrollable() is a wrapper around gtk_notebook_get_scrollable().

func (*Notebook) SetActionWidget

func (v *Notebook) SetActionWidget(widget IWidget, packType PackType)

SetActionWidget() is a wrapper around gtk_notebook_set_action_widget().

func (*Notebook) SetCurrentPage

func (v *Notebook) SetCurrentPage(pageNum int)

SetCurrentPage() is a wrapper around gtk_notebook_set_current_page().

func (*Notebook) SetGroupName

func (v *Notebook) SetGroupName(groupName string)

SetGroupName() is a wrapper around gtk_notebook_set_group_name().

func (*Notebook) SetMenuLabel

func (v *Notebook) SetMenuLabel(child, menuLabel IWidget)

SetMenuLabel() is a wrapper around gtk_notebook_set_menu_label().

func (*Notebook) SetMenuLabelText

func (v *Notebook) SetMenuLabelText(child IWidget, menuText string)

SetMenuLabelText() is a wrapper around gtk_notebook_set_menu_label_text().

func (*Notebook) SetScrollable

func (v *Notebook) SetScrollable(scrollable bool)

SetScrollable() is a wrapper around gtk_notebook_set_scrollable().

func (*Notebook) SetShowBorder

func (v *Notebook) SetShowBorder(showBorder bool)

SetShowBorder() is a wrapper around gtk_notebook_set_show_border().

func (*Notebook) SetShowTabs

func (v *Notebook) SetShowTabs(showTabs bool)

SetShowTabs() is a wrapper around gtk_notebook_set_show_tabs().

func (*Notebook) SetTabDetachable

func (v *Notebook) SetTabDetachable(child IWidget, detachable bool)

SetTabDetachable() is a wrapper around gtk_notebook_set_tab_detachable().

func (*Notebook) SetTabLabel

func (v *Notebook) SetTabLabel(child, tabLabel IWidget)

SetTabLabel() is a wrapper around gtk_notebook_set_tab_label().

func (*Notebook) SetTabLabelText

func (v *Notebook) SetTabLabelText(child IWidget, tabText string)

SetTabLabelText() is a wrapper around gtk_notebook_set_tab_label_text().

func (*Notebook) SetTabPos

func (v *Notebook) SetTabPos(pos PositionType)

SetTabPos() is a wrapper around gtk_notebook_set_tab_pos().

func (*Notebook) SetTabReorderable

func (v *Notebook) SetTabReorderable(child IWidget, reorderable bool)

SetTabReorderable() is a wrapper around gtk_notebook_set_tab_reorderable().

func (*Notebook) ShowBorder

func (v *Notebook) ShowBorder() bool

ShowBorder() is a wrapper around gtk_notebook_get_show_border().

func (*Notebook) ShowTabs

func (v *Notebook) ShowTabs() bool

ShowTabs() is a wrapper around gtk_notebook_get_show_tabs().

func (*Notebook) TabPos

func (v *Notebook) TabPos() PositionType

TabPos() is a wrapper around gtk_notebook_get_tab_pos().

type OffscreenWindow

type OffscreenWindow struct {
	Bin
}

OffscreenWindow is a representation of GTK's GtkOffscreenWindow.

func (*OffscreenWindow) Native

func (v *OffscreenWindow) Native() *C.GtkOffscreenWindow

Native() returns a pointer to the underlying GtkWindow.

type Orientable

type Orientable struct {
	*glib.Object
}

Orientable is a representation of GTK's GtkOrientable GInterface.

func (*Orientable) Native

func (v *Orientable) Native() *C.GtkOrientable

Native returns a pointer to the underlying GObject as a GtkOrientable.

func (*Orientable) Orientation

func (v *Orientable) Orientation() Orientation

Orientation() is a wrapper around gtk_orientable_get_orientation().

func (*Orientable) SetOrientation

func (v *Orientable) SetOrientation(orientation Orientation)

SetOrientation() is a wrapper around gtk_orientable_set_orientation().

type Orientation

type Orientation int

Orientation is a representation of GTK's GtkOrientation.

const (
	ORIENTATION_HORIZONTAL Orientation = C.GTK_ORIENTATION_HORIZONTAL
	ORIENTATION_VERTICAL               = C.GTK_ORIENTATION_VERTICAL
)

type PackType

type PackType int

PackType is a representation of GTK's GtkPackType.

const (
	PACK_START PackType = C.GTK_PACK_START
	PACK_END            = C.GTK_PACK_END
)

type PolicyType

type PolicyType int

PolicyType is a representation of GTK's GtkPolicyType.

type PositionType

type PositionType int

PositionType is a representation of GTK's GtkPositionType.

type ProgressBar

type ProgressBar struct {
	Widget
}

ProgressBar is a representation of GTK's GtkProgressBar.

func ProgressBarNew

func ProgressBarNew() (*ProgressBar, error)

ProgressBarNew() is a wrapper around gtk_progress_bar_new().

func (*ProgressBar) Fraction

func (v *ProgressBar) Fraction() float64

Fraction() is a wrapper around gtk_progress_bar_get_fraction().

func (*ProgressBar) Native

func (v *ProgressBar) Native() *C.GtkProgressBar

Native() returns a pointer to the underlying GtkProgressBar.

func (*ProgressBar) SetFraction

func (v *ProgressBar) SetFraction(fraction float64)

SetFraction() is a wrapper around gtk_progress_bar_set_fraction().

func (*ProgressBar) SetText

func (v *ProgressBar) SetText(text string)

SetText() is a wrapper around gtk_progress_bar_set_text().

type ReliefStyle

type ReliefStyle int

ReliefStyle is a representation of GTK's GtkReliefStyle.

type ResponseType

type ResponseType int

ResponseType is a representation of GTK's GtkResponseType.

type ScrolledWindow

type ScrolledWindow struct {
	Bin
}

ScrolledWindow is a representation of GTK's GtkScrolledWindow.

func ScrolledWindowNew

func ScrolledWindowNew(hadjustment, vadjustment *Adjustment) (*ScrolledWindow, error)

ScrolledWindowNew() is a wrapper around gtk_scrolled_window_new().

func (*ScrolledWindow) Native

func (v *ScrolledWindow) Native() *C.GtkScrolledWindow

Native() returns a pointer to the underlying GtkScrolledWindow.

func (*ScrolledWindow) SetPolicy

func (v *ScrolledWindow) SetPolicy(hScrollbarPolicy, vScrollbarPolicy PolicyType)

SetPolicy() is a wrapper around gtk_scrolled_window_set_policy().

type SpinButton

type SpinButton struct {
	Entry
}

SpinButton is a representation of GTK's GtkSpinButton.

func SpinButtonNew

func SpinButtonNew(adjustment *Adjustment, climbRate float64, digits uint) (*SpinButton, error)

SpinButtonNew() is a wrapper around gtk_spin_button_new().

func SpinButtonNewWithRange

func SpinButtonNewWithRange(min, max, step float64) (*SpinButton, error)

SpinButtonNewWithRange() is a wrapper around gtk_spin_button_new_with_range().

func (*SpinButton) Configure

func (v *SpinButton) Configure(adjustment *Adjustment, climbRate float64, digits uint)

Configure() is a wrapper around gtk_spin_button_configure().

func (*SpinButton) Native

func (v *SpinButton) Native() *C.GtkSpinButton

Native() returns a pointer to the underlying GtkSpinButton.

func (*SpinButton) SetValue

func (v *SpinButton) SetValue(value float64)

SetValue() is a wrapper around gtk_spin_button_set_value().

func (*SpinButton) Value

func (v *SpinButton) Value() float64

Value() is a wrapper around gtk_spin_button_get_value().

func (*SpinButton) ValueAsInt

func (v *SpinButton) ValueAsInt() int

ValueAsInt() is a wrapper around gtk_spin_button_get_value_as_int().

type Statusbar

type Statusbar struct {
	Box
}

Statusbar is a representation of GTK's GtkStatusbar

func StatusbarNew

func StatusbarNew() (*Statusbar, error)

StatusbarNew() is a wrapper around gtk_statusbar_new().

func (*Statusbar) GetContextId

func (v *Statusbar) GetContextId(contextDescription string) uint

ContextId() is a wrapper around gtk_statusbar_get_context_id().

func (*Statusbar) MessageArea

func (v *Statusbar) MessageArea() (*Box, error)

MessageArea() is a wrapper around gtk_statusbar_get_message_area().

func (*Statusbar) Native

func (v *Statusbar) Native() *C.GtkStatusbar

Native() returns a pointer to the underlying GtkStatusbar

func (*Statusbar) Pop

func (v *Statusbar) Pop(contextID uint)

Pop() is a wrapper around gtk_statusbar_pop().

func (*Statusbar) Push

func (v *Statusbar) Push(contextID uint, text string) uint

Push() is a wrapper around gtk_statusbar_push().

type Stock

type Stock string

Stock is a special type that does not have an equivalent type in GTK. It is the type used as a parameter anytime an identifier for stock icons are needed. A Stock must be type converted to string when function parameters may take a Stock, but when other string values are valid as well.

type TextBuffer

type TextBuffer struct {
	*glib.Object
}
  • GtkTextBuffer

TextBuffer is a representation of GTK's GtkTextBuffer.

func (*TextBuffer) GetIterAtOffset

func (t *TextBuffer) GetIterAtOffset(offset int) *TextIter

func (*TextBuffer) Insert

func (t *TextBuffer) Insert(iter *TextIter, text string)

func (*TextBuffer) Native

func (v *TextBuffer) Native() *C.GtkTextBuffer

func (*TextBuffer) SetText

func (t *TextBuffer) SetText(text string)

type TextIter

type TextIter struct {
	// contains filtered or unexported fields
}
  • GtkTextIter

TextIter is a representation of GTK's GtkTextIter.

type TextView

type TextView struct {
	Container
}
  • GtkTextView

TextView is a representation of GTK's GtkTextView.

func (*TextView) Buffer

func (t *TextView) Buffer() (*TextBuffer, error)

func (*TextView) Native

func (v *TextView) Native() *C.GtkTextView

type TreeIter

type TreeIter struct {
	GtkTreeIter C.GtkTreeIter
}

TreeIter is a representation of GTK's GtkTreeIter.

func (*TreeIter) Copy

func (v *TreeIter) Copy() (*TreeIter, error)

Copy() is a wrapper around gtk_tree_iter_copy().

func (*TreeIter) Native

func (v *TreeIter) Native() *C.GtkTreeIter

Native() returns a pointer to the underlying GtkTreeIter.

type TreeModel

type TreeModel struct {
	*glib.Object
	// contains filtered or unexported fields
}

TreeModel is a representation of GTK's GtkTreeModel GInterface.

func (*TreeModel) Flags

func (v *TreeModel) Flags() TreeModelFlags

Flags() is a wrapper around gtk_tree_model_get_flags().

func (*TreeModel) GetColumnType

func (v *TreeModel) GetColumnType(index int) glib.Type

ColumnType() is a wrapper around gtk_tree_model_get_column_type().

func (*TreeModel) GetIter

func (v *TreeModel) GetIter(path *TreePath) (*TreeIter, error)

Iter() is a wrapper around gtk_tree_model_get_iter().

func (*TreeModel) GetIterFromString

func (v *TreeModel) GetIterFromString(path string) (*TreeIter, error)

IterFromString() is a wrapper around gtk_tree_model_get_iter_from_string().

func (*TreeModel) GetPath

func (v *TreeModel) GetPath(iter *TreeIter) (*TreePath, error)

Path() is a wrapper around gtk_tree_model_get_path().

func (*TreeModel) GetValue

func (v *TreeModel) GetValue(iter *TreeIter, column int) (*glib.Value, error)

Value() is a wrapper around gtk_tree_model_get_value().

func (*TreeModel) IterFirst

func (v *TreeModel) IterFirst() (*TreeIter, error)

IterFirst() is a wrapper around gtk_tree_model_get_iter_first().

func (*TreeModel) NColumns

func (v *TreeModel) NColumns() int

NColumns() is a wrapper around gtk_tree_model_get_n_columns().

func (*TreeModel) Native

func (v *TreeModel) Native() *C.GtkTreeModel

Native() returns a pointer to the underlying GObject as a GtkTreeModel.

type TreeModelFlags

type TreeModelFlags int

TreeModelFlags is a representation of GTK's GtkTreeModelFlags.

const (
	TREE_MODEL_ITERS_PERSIST TreeModelFlags = C.GTK_TREE_MODEL_ITERS_PERSIST
	TREE_MODEL_LIST_ONLY                    = C.GTK_TREE_MODEL_LIST_ONLY
)

type TreePath

type TreePath struct {
	GtkTreePath *C.GtkTreePath
}

TreePath is a representation of GTK's GtkTreePath.

func (*TreePath) Native

func (v *TreePath) Native() *C.GtkTreePath

Native() returns a pointer to the underlying GtkTreePath.

type TreeSelection

type TreeSelection struct {
	*glib.Object
}

TreeSelection is a representation of GTK's GtkTreeSelection.

func (*TreeSelection) GetSelected

func (v *TreeSelection) GetSelected(model *ITreeModel, iter *TreeIter) bool

Selected() is a wrapper around gtk_tree_selection_get_selected().

func (*TreeSelection) Native

func (v *TreeSelection) Native() *C.GtkTreeSelection

Native() returns a pointer to the underlying GtkTreeSelection.

type TreeView

type TreeView struct {
	Container
}

TreeView is a representation of GTK's GtkTreeView.

func TreeViewNew

func TreeViewNew() (*TreeView, error)

TreeViewNew() is a wrapper around gtk_tree_view_new().

func TreeViewNewWithModel

func TreeViewNewWithModel(model ITreeModel) (*TreeView, error)

TreeViewNewWithModel() is a wrapper around gtk_tree_view_new_with_model().

func (*TreeView) AppendColumn

func (v *TreeView) AppendColumn(column *TreeViewColumn) int

AppendColumn() is a wrapper around gtk_tree_view_append_column().

func (*TreeView) Model

func (v *TreeView) Model() (*TreeModel, error)

Model() is a wrapper around gtk_tree_view_get_model().

func (*TreeView) Native

func (v *TreeView) Native() *C.GtkTreeView

Native() returns a pointer to the underlying GtkTreeView.

func (*TreeView) Selection

func (v *TreeView) Selection() (*TreeSelection, error)

Selection() is a wrapper around gtk_tree_view_get_selection().

func (*TreeView) SetModel

func (v *TreeView) SetModel(model ITreeModel)

SetModel() is a wrapper around gtk_tree_view_set_model().

type TreeViewColumn

type TreeViewColumn struct {
	glib.InitiallyUnowned
}

TreeViewColumns is a representation of GTK's GtkTreeViewColumn.

func TreeViewColumnNew

func TreeViewColumnNew() (*TreeViewColumn, error)

TreeViewColumnNew() is a wrapper around gtk_tree_view_column_new().

func TreeViewColumnNewWithAttributes

func TreeViewColumnNewWithAttributes(title string, renderer ICellRenderer, model ITreeModel, attributes map[string]string) (*TreeViewColumn, error)

TreeViewColumnNewWithAttribute() creates a new column with the specified attributes. Rather than wrap around any C functions, it uses existing gotk3 calls to create the column, set its title, pack the renderer, and set attributes in separate steps. The model is needed to be able to map attribute values to the correct column indexes.

func (*TreeViewColumn) AddAttribute

func (v *TreeViewColumn) AddAttribute(renderer ICellRenderer, attribute string, column int)

AddAttribute() is a wrapper around gtk_tree_view_column_add_attribute().

func (*TreeViewColumn) Expand

func (v *TreeViewColumn) Expand() bool

Expand() is a wrapper around gtk_tree_view_column_get_expand().

func (*TreeViewColumn) MinWidth

func (v *TreeViewColumn) MinWidth() int

MinWidth() is a wrapper around gtk_tree_view_column_get_min_width().

func (*TreeViewColumn) Native

func (v *TreeViewColumn) Native() *C.GtkTreeViewColumn

Native() returns a pointer to the underlying GtkTreeViewColumn.

func (*TreeViewColumn) PackStart

func (v *TreeViewColumn) PackStart(renderer ICellRenderer, expand bool)

PackStart() is a wrapper around gtk_tree_view_column_pack_start().

func (*TreeViewColumn) Resizable

func (v *TreeViewColumn) Resizable() bool

Resizable() is a wrapper around gtk_tree_view_column_get_resizable().

func (*TreeViewColumn) SetExpand

func (v *TreeViewColumn) SetExpand(expand bool)

SetExpand() is a wrapper around gtk_tree_view_column_set_expand().

func (*TreeViewColumn) SetMinWidth

func (v *TreeViewColumn) SetMinWidth(minWidth int)

SetMinWidth() is a wrapper around gtk_tree_view_column_set_min_width().

func (*TreeViewColumn) SetResizable

func (v *TreeViewColumn) SetResizable(resizable bool)

SetResizable() is a wrapper around gtk_tree_view_column_set_resizable().

func (*TreeViewColumn) SetTitle

func (v *TreeViewColumn) SetTitle(title string)

SetTitle() is a wrapper around gtk_tree_view_column_set_title().

type Widget

type Widget struct {
	glib.InitiallyUnowned

	// Interfaces
	Buildable
}

Widget is a representation of GTK's GtkWidget.

func (*Widget) Activate

func (v *Widget) Activate() bool

Activate() is a wrapper around gtk_widget_activate().

func (*Widget) AddEvents

func (v *Widget) AddEvents(events int)

AddEvents() is a wrapper around gtk_widget_add_events().

func (*Widget) Destroy

func (v *Widget) Destroy()

Destroy() is a wrapper around gtk_widget_destroy().

func (*Widget) Event

func (v *Widget) Event(event *gdk.Event) bool

Event() is a wrapper around gtk_widget_event().

func (*Widget) Events

func (v *Widget) Events() int

Events() is a wrapper around gtk_widget_get_events().

func (*Widget) GetDeviceEnabled

func (v *Widget) GetDeviceEnabled(device *gdk.Device) bool

DeviceEnabled() is a wrapper around gtk_widget_get_device_enabled().

func (*Widget) GrabDefault

func (v *Widget) GrabDefault()

GrabDefault() is a wrapper around gtk_widget_grab_default().

func (*Widget) GrabFocus

func (v *Widget) GrabFocus()

GrabFocus() is a wrapper around gtk_widget_grab_focus().

func (*Widget) HAlign

func (v *Widget) HAlign() Align

HAlign() is a wrapper around gtk_widget_get_halign().

func (*Widget) HExpand

func (v *Widget) HExpand() bool

HExpand() is a wrapper around gtk_widget_get_hexpand().

func (*Widget) Hide

func (v *Widget) Hide()

Hide() is a wrapper around gtk_widget_hide().

func (*Widget) HideOnDelete

func (v *Widget) HideOnDelete() bool

func (*Widget) InDestruction

func (v *Widget) InDestruction() bool

InDestruction() is a wrapper around gtk_widget_in_destruction().

func (*Widget) IsFocus

func (v *Widget) IsFocus() bool

IsFocus() is a wrapper around gtk_widget_is_focus().

func (*Widget) Map

func (v *Widget) Map()

Map() is a wrapper around gtk_widget_map().

func (*Widget) Name

func (v *Widget) Name() (string, error)

Name() is a wrapper around gtk_widget_get_name(). A non-nil error is returned in the case that gtk_widget_get_name returns NULL to differentiate between NULL and an empty string.

func (*Widget) Native

func (v *Widget) Native() *C.GtkWidget

Native() returns a pointer to the underlying GtkWidget.

func (*Widget) NoShowAll

func (v *Widget) NoShowAll() bool

NoShowAll() is a wrapper around gtk_widget_get_no_show_all().

func (*Widget) OverrideFont

func (v *Widget) OverrideFont(description string)

OverrideFont() is a wrapper around gtk_widget_override_font().

func (*Widget) Parent

func (v *Widget) Parent() (*Widget, error)

Parent() is a wrapper around gtk_widget_get_parent().

func (*Widget) ParentWindow

func (v *Widget) ParentWindow() (*gdk.Window, error)

ParentWindow() is a wrapper around gtk_widget_get_parent_window().

func (*Widget) Reparent

func (v *Widget) Reparent(newParent IWidget)

Reparent() is a wrapper around gtk_widget_reparent().

func (*Widget) SetDeviceEnabled

func (v *Widget) SetDeviceEnabled(device *gdk.Device, enabled bool)

SetDeviceEnabled() is a wrapper around gtk_widget_set_device_enabled().

func (*Widget) SetEvents

func (v *Widget) SetEvents(events int)

SetEvents() is a wrapper around gtk_widget_set_events().

func (*Widget) SetHAlign

func (v *Widget) SetHAlign(align Align)

SetHAlign() is a wrapper around gtk_widget_set_halign().

func (*Widget) SetHExpand

func (v *Widget) SetHExpand(expand bool)

SetHExpand() is a wrapper around gtk_widget_set_hexpand().

func (*Widget) SetName

func (v *Widget) SetName(name string)

SetName() is a wrapper around gtk_widget_set_name().

func (*Widget) SetNoShowAll

func (v *Widget) SetNoShowAll(noShowAll bool)

SetNoShowAll() is a wrapper around gtk_widget_set_no_show_all().

func (*Widget) SetParent

func (v *Widget) SetParent(parent IWidget)

SetParent() is a wrapper around gtk_widget_set_parent().

func (*Widget) SetParentWindow

func (v *Widget) SetParentWindow(parentWindow *gdk.Window)

SetParentWindow() is a wrapper around gtk_widget_set_parent_window().

func (*Widget) SetSensitive

func (v *Widget) SetSensitive(sensitive bool)

SetSensitive() is a wrapper around gtk_widget_set_sensitive().

func (*Widget) SetSizeRequest

func (v *Widget) SetSizeRequest(width, height int)

SetSizeRequest() is a wrapper around gtk_widget_set_size_request().

func (*Widget) SetTooltipText

func (v *Widget) SetTooltipText(text string)

SetTooltipText() is a wrapper around gtk_widget_set_tooltip_text().

func (*Widget) SetVAlign

func (v *Widget) SetVAlign(align Align)

SetVAlign() is a wrapper around gtk_widget_set_valign().

func (*Widget) SetVExpand

func (v *Widget) SetVExpand(expand bool)

SetVExpand() is a wrapper around gtk_widget_set_vexpand().

func (*Widget) SetVisible

func (v *Widget) SetVisible(visible bool)

SetVisible() is a wrapper around gtk_widget_set_visible().

func (*Widget) Show

func (v *Widget) Show()

Show() is a wrapper around gtk_widget_show().

func (*Widget) ShowAll

func (v *Widget) ShowAll()

ShowAll() is a wrapper around gtk_widget_show_all().

func (*Widget) ShowNow

func (v *Widget) ShowNow()

ShowNow() is a wrapper around gtk_widget_show_now().

func (*Widget) SizeRequest

func (v *Widget) SizeRequest() (width, height int)

SizeRequest() is a wrapper around gtk_widget_get_size_request().

func (*Widget) TooltipText

func (v *Widget) TooltipText() (string, error)

TooltipText() is a wrapper around gtk_widget_get_tooltip_text(). A non-nil error is returned in the case that gtk_widget_get_tooltip_text returns NULL to differentiate between NULL and an empty string.

func (*Widget) Toplevel

func (v *Widget) Toplevel() (*Widget, error)

Toplevel() is a wrapper around gtk_widget_get_toplevel().

func (*Widget) Unmap

func (v *Widget) Unmap()

Unmap() is a wrapper around gtk_widget_unmap().

func (*Widget) Unparent

func (v *Widget) Unparent()

Unparent() is a wrapper around gtk_widget_unparent().

func (*Widget) VAlign

func (v *Widget) VAlign() Align

VAlign() is a wrapper around gtk_widget_get_valign().

func (*Widget) VExpand

func (v *Widget) VExpand() bool

VExpand() is a wrapper around gtk_widget_get_vexpand().

type Window

type Window struct {
	Bin
}

Window is a representation of GTK's GtkWindow.

func WindowNew

func WindowNew(t WindowType) (*Window, error)

WindowNew() is a wrapper around gtk_window_new().

func (*Window) Native

func (v *Window) Native() *C.GtkWindow

Native() returns a pointer to the underlying GtkWindow.

func (*Window) SetDefaultGeometry

func (v *Window) SetDefaultGeometry(width, height int)

SetDefaultGeometry() is a wrapper around gtk_window_set_default_geometry().

func (*Window) SetDefaultSize

func (v *Window) SetDefaultSize(width, height int)

SetDefaultSize() is a wrapper around gtk_window_set_default_size().

func (*Window) SetPosition

func (v *Window) SetPosition(position WindowPosition)

SetPosition() is a wrapper around gtk_window_set_position()

func (*Window) SetTitle

func (v *Window) SetTitle(title string)

SetTitle() is a wrapper around gtk_window_set_title().

func (*Window) SetTransientFor

func (v *Window) SetTransientFor(parent IWindow)

SetTransientFor() is a wrapper around gtk_window_set_transient_for().

type WindowPosition

type WindowPosition int

WindowPosition is a representation of GTK's GtkWindowPosition.

type WindowType

type WindowType int

WindowType is a representation of GTK's GtkWindowType.

const (
	WINDOW_TOPLEVEL WindowType = C.GTK_WINDOW_TOPLEVEL
	WINDOW_POPUP               = C.GTK_WINDOW_POPUP
)

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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