gtk

package
v0.0.0-...-5e279b2 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2013 License: ISC Imports: 7 Imported by: 1

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

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

GetChild() 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) GetHomogeneous

func (v *Box) GetHomogeneous() bool

GetHomogeneous() is a wrapper around gtk_box_get_homogeneous().

func (*Box) GetSpacing

func (v *Box) GetSpacing() int

GetSpacing() is a wrapper around gtk_box_get_spacing().

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

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)

GetObject() 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 (b *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) Clicked

func (v *Button) Clicked()

Clicked() is a wrapper around gtk_button_clicked().

func (*Button) GetAlignment

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

GetAlignment() is a wrapper around gtk_button_get_alignment().

func (*Button) GetAlwaysShowImage

func (v *Button) GetAlwaysShowImage() bool

GetAlwaysShowImage() is a wrapper around gtk_button_get_always_show_image().

func (*Button) GetEventWindow

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

GetEventWindow() is a wrapper around gtk_button_get_event_window().

func (*Button) GetFocusOnClick

func (v *Button) GetFocusOnClick() bool

GetFocusOnClick() is a wrapper around gtk_button_get_focus_on_click().

func (*Button) GetImage

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

GetImage() is a wrapper around gtk_button_get_image().

func (*Button) GetImagePosition

func (v *Button) GetImagePosition() PositionType

GetImagePosition() is a wrapper around gtk_button_get_image_position().

func (*Button) GetLabel

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

GetLabel() is a wrapper around gtk_button_get_label().

func (*Button) GetRelief

func (v *Button) GetRelief() ReliefStyle

GetRelief() is a wrapper around gtk_button_get_relief().

func (*Button) GetUseStock

func (v *Button) GetUseStock() bool

GetUseStock() is a wrapper around gtk_button_get_use_stock().

func (*Button) GetUseUnderline

func (v *Button) GetUseUnderline() bool

GetUseUnderline() is a wrapper around gtk_button_get_use_underline().

func (*Button) Native

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

Native() returns a pointer to the underlying GtkButton.

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

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)

ClipboardGet() is a wrapper around gtk_clipboard_get().

func ClipboardGetForDisplay

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

ClipboardGetForDisplay() 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) GetActive

func (v *ComboBox) GetActive() int

GetActive() 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) 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) GetActionArea

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

GetActionArea() is a wrapper around gtk_dialog_get_action_area().

func (*Dialog) GetContentArea

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

GetContentArea() is a wrapper around gtk_dialog_get_content_area().

func (*Dialog) GetResponseForWidget

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

GetResponseForWidget() is a wrapper around gtk_dialog_get_response_for_widget().

func (*Dialog) GetWidgetForResponse

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

GetWidgetForResponse() 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) GetActivatesDefault

func (v *Entry) GetActivatesDefault() bool

GetActivatesDefault() is a wrapper around gtk_entry_get_activates_default().

func (*Entry) GetAlignment

func (v *Entry) GetAlignment() float32

GetAlignment() is a wrapper around gtk_entry_get_alignment().

func (*Entry) GetBuffer

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

GetBuffer() is a wrapper around gtk_entry_get_buffer().

func (*Entry) GetCompletion

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

GetCompletion() is a wrapper around gtk_entry_get_completion().

func (*Entry) GetCurrentIconDragSource

func (v *Entry) GetCurrentIconDragSource() int

GetCurrentIconDragSource() is a wrapper around gtk_entry_get_current_icon_drag_source().

func (*Entry) GetCursorHAdjustment

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

GetCursorHAdjustment() is a wrapper around gtk_entry_get_cursor_hadjustment().

func (*Entry) GetHasFrame

func (v *Entry) GetHasFrame() bool

GetHasFrame() is a wrapper around gtk_entry_get_has_frame().

func (*Entry) GetIconActivatable

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

GetIconActivatable() is a wrapper around gtk_entry_get_icon_activatable().

func (*Entry) GetIconAtPos

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

GetIconAtPos() is a wrapper around gtk_entry_get_icon_at_pos().

func (*Entry) GetIconName

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

GetIconName() is a wrapper around gtk_entry_get_icon_name().

func (*Entry) GetIconSensitive

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

GetIconSensitive() is a wrapper around gtk_entry_get_icon_sensitive().

func (*Entry) GetIconStock

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

GetIconStock() is a wrapper around gtk_entry_get_icon_stock().

func (*Entry) GetIconStorageType

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

GetIconStorageType() is a wrapper around gtk_entry_get_icon_storage_type().

func (*Entry) GetIconTooltipMarkup

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

GetIconTooltipMarkup() is a wrapper around gtk_entry_get_icon_tooltip_markup().

func (*Entry) GetIconTooltipText

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

GetIconTooltipText() is a wrapper around gtk_entry_get_icon_tooltip_text().

func (*Entry) GetInputHints

func (v *Entry) GetInputHints() InputHints

GetInputHints() is a wrapper around gtk_entry_get_input_hints().

func (*Entry) GetInputPurpose

func (v *Entry) GetInputPurpose() InputPurpose

GetInputPurpose() is a wrapper around gtk_entry_get_input_purpose().

func (*Entry) GetInvisibleChar

func (v *Entry) GetInvisibleChar() rune

GetInvisibleChar() is a wrapper around gtk_entry_get_invisible_char().

func (*Entry) GetLayoutOffsets

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

GetLayoutOffsets() is a wrapper around gtk_entry_get_layout_offsets().

func (*Entry) GetMaxLength

func (v *Entry) GetMaxLength() int

GetMaxLength() is a wrapper around gtk_entry_get_max_length().

func (*Entry) GetOverwriteMode

func (v *Entry) GetOverwriteMode() bool

GetOverwriteMode() is a wrapper around gtk_entry_get_overwrite_mode().

func (*Entry) GetPlaceholderText

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

GetPlaceholderText() is a wrapper around gtk_entry_get_placeholder_text().

func (*Entry) GetProgressFraction

func (v *Entry) GetProgressFraction() float64

GetProgressFraction() is a wrapper around gtk_entry_get_progress_fraction().

func (*Entry) GetProgressPulseStep

func (v *Entry) GetProgressPulseStep() float64

GetProgressPulseStep() is a wrapper around gtk_entry_get_progress_pulse_step().

func (*Entry) GetText

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

GetText() is a wrapper around gtk_entry_get_text().

func (*Entry) GetTextLength

func (v *Entry) GetTextLength() uint16

GetTextLength() is a wrapper around gtk_entry_get_text_length().

func (*Entry) GetVisibility

func (v *Entry) GetVisibility() bool

GetVisibility() is a wrapper around gtk_entry_get_visibility().

func (*Entry) GetWidthChars

func (v *Entry) GetWidthChars() int

GetWidthChars() is a wrapper around gtk_entry_get_width_chars().

func (*Entry) LayoutIndexToTextIndex

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

LayoutIndexToTextIndex() is a wrapper around gtk_entry_layout_index_to_text_index().

func (*Entry) Native

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

Native() returns a pointer to the underlying GtkEntry.

func (*Entry) ProgressPulse

func (v *Entry) ProgressPulse()

ProgressPulse() is a wrapper around gtk_entry_progress_pulse().

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

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

TextIndexToLayoutIndex() is a wrapper around gtk_entry_text_index_to_layout_index().

func (*Entry) UnsetInvisibleChar

func (v *Entry) UnsetInvisibleChar()

UnsetInvisibleChar() is a wrapper around gtk_entry_unset_invisible_char().

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

func (v *EntryBuffer) GetBytes() uint

GetBytes() is a wrapper around gtk_entry_buffer_get_bytes().

func (*EntryBuffer) GetLength

func (v *EntryBuffer) GetLength() uint

GetLength() is a wrapper around gtk_entry_buffer_get_length().

func (*EntryBuffer) GetMaxLength

func (v *EntryBuffer) GetMaxLength() int

GetMaxLength() is a wrapper around gtk_entry_buffer_get_max_length().

func (*EntryBuffer) GetText

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

GetText() 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.

func (*EntryBuffer) InsertText

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

InsertText() is a wrapper around gtk_entry_buffer_insert_text().

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

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

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

GetChildAt() is a wrapper around gtk_grid_get_child_at().

func (*Grid) GetColumnHomogeneous

func (v *Grid) GetColumnHomogeneous() bool

GetColumnHomogeneous() is a wrapper around gtk_grid_get_column_homogeneous().

func (*Grid) GetColumnSpacing

func (v *Grid) GetColumnSpacing() uint

GetColumnSpacing() is a wrapper around gtk_grid_get_column_spacing().

func (*Grid) GetRowHomogeneous

func (v *Grid) GetRowHomogeneous() bool

GetRowHomogeneous() is a wrapper around gtk_grid_get_row_homogeneous().

func (*Grid) GetRowSpacing

func (v *Grid) GetRowSpacing() uint

GetRowSpacing() is a wrapper around gtk_grid_get_row_spacing().

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

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

GetIconName() is a wrapper around gtk_image_get_icon_name().

func (*Image) GetPixelSize

func (v *Image) GetPixelSize() int

GetPixelSize() is a wrapper around gtk_image_get_pixel_size().

func (*Image) GetStorageType

func (v *Image) GetStorageType() ImageType

GetStorageType() is a wrapper around gtk_image_get_storage_type().

func (*Image) Native

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

Native() returns a pointer to the underlying GtkImage.

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

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

func (v *Label) GetSelectable() bool

GetSelectable() is a wrapper around gtk_label_get_selectable().

func (*Label) GetText

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

GetText() is a wrapper around gtk_label_get_text().

func (*Label) Native

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

Native() returns a pointer to the underlying GtkLabel.

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

type ListStore

type ListStore struct {
	*glib.Object

	// Interfaces
	TreeModel
}

ListStore is a representation of GTK's GtkListStore.

func ListStoreNew

func ListStoreNew(types ...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) 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, columns []int, values []interface{}) error

Set() is a wrapper around gtk_list_store_set_value() but provides a function similar to gtk_list_store_set() in that multiple columns may be set by one call. The length of columns and values slices must match, or Set() will return a non-nil error.

As an example, a call to:

store.Set(iter, []int{0, 1}, []interface{}{"Foo", "Bar"})

is functionally equivalent to calling the native C GTK function:

gtk_list_store_set(store, iter, 0, "Foo", 1, "Bar", -1);

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) SetLabel(label string)

SetLabel() is a wrapper around gtk_menu_item_set_label().

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

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

GetActionWidget() is a wrapper around gtk_notebook_get_action_widget().

func (*Notebook) GetCurrentPage

func (v *Notebook) GetCurrentPage() int

GetCurrentPage() is a wrapper around gtk_notebook_get_current_page().

func (*Notebook) GetGroupName

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

GetGroupName() is a wrapper around gtk_notebook_get_group_name().

func (*Notebook) GetMenuLabel

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

GetMenuLabel() is a wrapper around gtk_notebook_get_menu_label().

func (*Notebook) GetMenuLabelText

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

GetMenuLabelText() is a wrapper around gtk_notebook_get_menu_label_text().

func (*Notebook) GetNPages

func (v *Notebook) GetNPages() int

GetNPages() is a wrapper around gtk_notebook_get_n_pages().

func (*Notebook) GetNthPage

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

GetNthPage() is a wrapper around gtk_notebook_get_nth_page().

func (*Notebook) GetScrollable

func (v *Notebook) GetScrollable() bool

GetScrollable() is a wrapper around gtk_notebook_get_scrollable().

func (*Notebook) GetShowBorder

func (v *Notebook) GetShowBorder() bool

GetShowBorder() is a wrapper around gtk_notebook_get_show_border().

func (*Notebook) GetShowTabs

func (v *Notebook) GetShowTabs() bool

GetShowTabs() is a wrapper around gtk_notebook_get_show_tabs().

func (*Notebook) GetTabDetachable

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

GetTabDetachable() is a wrapper around gtk_notebook_get_tab_detachable().

func (*Notebook) GetTabLabel

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

GetTabLabel() is a wrapper around gtk_notebook_get_tab_label().

func (*Notebook) GetTabLabelText

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

GetTabLabelText() is a wrapper around gtk_notebook_get_tab_label_text().

func (*Notebook) GetTabPos

func (v *Notebook) GetTabPos() PositionType

GetTabPos() is a wrapper around gtk_notebook_get_tab_pos().

func (*Notebook) GetTabReorderable

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

GetTabReorderable() is a wrapper around gtk_notebook_get_tab_reorderable().

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

type Orientable

type Orientable struct {
	*glib.Object
}

Orientable is a representation of GTK's GtkOrientable GInterface.

func (*Orientable) GetOrientation

func (v *Orientable) GetOrientation() Orientation

GetOrientation() is a wrapper around gtk_orientable_get_orientation().

func (*Orientable) Native

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

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

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

func (v *ProgressBar) GetFraction() float64

GetFraction() 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) GetValue

func (v *SpinButton) GetValue() float64

GetValue() is a wrapper around gtk_spin_button_get_value().

func (*SpinButton) GetValueAsInt

func (v *SpinButton) GetValueAsInt() int

GetValueAsInt() is a wrapper around gtk_spin_button_get_value_as_int().

func (*SpinButton) Native

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

Native() returns a pointer to the underlying GtkSpinButton.

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

GetContextId() is a wrapper around gtk_statusbar_get_context_id().

func (*Statusbar) GetMessageArea

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

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

TreeModel is a representation of GTK's GtkTreeModel GInterface.

func (*TreeModel) GetColumnType

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

GetColumnType() is a wrapper around gtk_tree_model_get_column_type().

func (*TreeModel) GetFlags

func (v *TreeModel) GetFlags() TreeModelFlags

GetFlags() is a wrapper around gtk_tree_model_get_flags().

func (*TreeModel) GetIter

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

GetIter() is a wrapper around gtk_tree_model_get_iter().

func (*TreeModel) GetIterFirst

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

GetIterFirst() is a wrapper around gtk_tree_model_get_iter_first().

func (*TreeModel) GetIterFromString

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

GetIterFromString() is a wrapper around gtk_tree_model_get_iter_from_string().

func (*TreeModel) GetNColumns

func (v *TreeModel) GetNColumns() int

GetNColumns() is a wrapper around gtk_tree_model_get_n_columns().

func (*TreeModel) GetPath

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

GetPath() is a wrapper around gtk_tree_model_get_path().

func (*TreeModel) GetValue

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

GetValue() is a wrapper around gtk_tree_model_get_value().

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

GetSelected() 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) GetModel

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

GetModel() is a wrapper around gtk_tree_view_get_model().

func (*TreeView) GetSelection

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

GetSelection() is a wrapper around gtk_tree_view_get_selection().

func (*TreeView) Native

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

Native() returns a pointer to the underlying GtkTreeView.

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 TreeViewColumnNewWithAttribute

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

TreeViewColumnNewWithAttribute() is a wrapper around gtk_tree_view_column_new_with_attributes() that only sets one attribute for one column.

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

func (v *TreeViewColumn) GetExpand() bool

GetExpand() is a wrapper around gtk_tree_view_column_get_expand().

func (*TreeViewColumn) GetMinWidth

func (v *TreeViewColumn) GetMinWidth() int

GetMinWidth() 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) 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().

type Widget

type Widget struct {
	glib.InitiallyUnowned
}

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

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

GetDeviceEnabled() is a wrapper around gtk_widget_get_device_enabled().

func (*Widget) GetEvents

func (v *Widget) GetEvents() int

GetEvents() is a wrapper around gtk_widget_get_events().

func (*Widget) GetHAlign

func (v *Widget) GetHAlign() Align

GetHAlign() is a wrapper around gtk_widget_get_halign().

func (*Widget) GetHExpand

func (v *Widget) GetHExpand() bool

GetHExpand() is a wrapper around gtk_widget_get_hexpand().

func (*Widget) GetName

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

GetName() 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) GetNoShowAll

func (v *Widget) GetNoShowAll() bool

GetNoShowAll() is a wrapper around gtk_widget_get_no_show_all().

func (*Widget) GetParent

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

GetParent() is a wrapper around gtk_widget_get_parent().

func (*Widget) GetParentWindow

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

GetParentWindow() is a wrapper around gtk_widget_get_parent_window().

func (*Widget) GetSizeRequest

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

GetSizeRequest() is a wrapper around gtk_widget_get_size_request().

func (*Widget) GetTooltipText

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

GetTooltipText() 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) GetToplevel

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

GetToplevel() is a wrapper around gtk_widget_get_toplevel().

func (*Widget) GetVAlign

func (v *Widget) GetVAlign() Align

GetVAlign() is a wrapper around gtk_widget_get_valign().

func (*Widget) GetVExpand

func (v *Widget) GetVExpand() bool

GetVExpand() is a wrapper around gtk_widget_get_vexpand().

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

func (v *Widget) Hide()

Hide() is a wrapper around gtk_widget_hide().

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

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

Native() returns a pointer to the underlying GtkWidget.

func (*Widget) OverrideFont

func (v *Widget) OverrideFont(description string)

OverrideFont() is a wrapper around gtk_widget_override_font().

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

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