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
- func Init(args *[]string)
- func Main()
- func MainQuit()
- type Adjustment
- type Align
- type Bin
- type Box
- func (v *Box) GetHomogeneous() bool
- func (v *Box) GetSpacing() int
- func (v *Box) Native() *C.GtkBox
- func (v *Box) PackEnd(child IWidget, expand, fill bool, padding uint)
- func (v *Box) PackStart(child IWidget, expand, fill bool, padding uint)
- func (v *Box) QueryChildPacking(child IWidget) (expand, fill bool, padding uint, packType PackType)
- func (v *Box) ReorderChild(child IWidget, position int)
- func (v *Box) SetChildPacking(child IWidget, expand, fill bool, padding uint, packType PackType)
- func (v *Box) SetHomogeneous(homogeneous bool)
- func (v *Box) SetSpacing(spacing int)
- type Builder
- type Button
- func (v *Button) Clicked()
- func (v *Button) GetAlignment() (xalign, yalign float32)
- func (v *Button) GetAlwaysShowImage() bool
- func (v *Button) GetEventWindow() (*gdk.Window, error)
- func (v *Button) GetFocusOnClick() bool
- func (v *Button) GetImage() (*Widget, error)
- func (v *Button) GetImagePosition() PositionType
- func (v *Button) GetLabel() (string, error)
- func (v *Button) GetRelief() ReliefStyle
- func (v *Button) GetUseStock() bool
- func (v *Button) GetUseUnderline() bool
- func (v *Button) Native() *C.GtkButton
- func (v *Button) SetAlignment(xalign, yalign float32)
- func (v *Button) SetAlwaysShowImage(alwaysShow bool)
- func (v *Button) SetFocusOnClick(focusOnClick bool)
- func (v *Button) SetImage(image IWidget)
- func (v *Button) SetImagePosition(position PositionType)
- func (v *Button) SetLabel(label string)
- func (v *Button) SetRelief(newStyle ReliefStyle)
- func (v *Button) SetUseStock(useStock bool)
- func (v *Button) SetUseUnderline(useUnderline bool)
- type ButtonsType
- type CellLayout
- type CellRenderer
- type CellRendererText
- type Clipboard
- type ComboBox
- type Container
- type Dialog
- func (v *Dialog) AddActionWidget(child IWidget, id ResponseType)
- func (v *Dialog) AddButton(text string, id ResponseType) (*Button, error)
- func (v *Dialog) GetActionArea() (*Widget, error)
- func (v *Dialog) GetContentArea() (*Box, error)
- func (v *Dialog) GetResponseForWidget(widget IWidget) ResponseType
- func (v *Dialog) GetWidgetForResponse(id ResponseType) (*Widget, error)
- func (v *Dialog) Native() *C.GtkDialog
- func (v *Dialog) Response(response ResponseType)
- func (v *Dialog) Run() int
- func (v *Dialog) SetDefaultResponse(id ResponseType)
- func (v *Dialog) SetResponseSensitive(id ResponseType, setting bool)
- type DialogFlags
- type Entry
- func (v *Entry) GetActivatesDefault() bool
- func (v *Entry) GetAlignment() float32
- func (v *Entry) GetBuffer() (*EntryBuffer, error)
- func (v *Entry) GetCompletion() (*EntryCompletion, error)
- func (v *Entry) GetCurrentIconDragSource() int
- func (v *Entry) GetCursorHAdjustment() (*Adjustment, error)
- func (v *Entry) GetHasFrame() bool
- func (v *Entry) GetIconActivatable(iconPos EntryIconPosition) bool
- func (v *Entry) GetIconAtPos(x, y int) int
- func (v *Entry) GetIconName(iconPos EntryIconPosition) (string, error)
- func (v *Entry) GetIconSensitive(iconPos EntryIconPosition) bool
- func (v *Entry) GetIconStock(iconPos EntryIconPosition) (string, error)
- func (v *Entry) GetIconStorageType(iconPos EntryIconPosition) ImageType
- func (v *Entry) GetIconTooltipMarkup(iconPos EntryIconPosition) (string, error)
- func (v *Entry) GetIconTooltipText(iconPos EntryIconPosition) (string, error)
- func (v *Entry) GetInputHints() InputHints
- func (v *Entry) GetInputPurpose() InputPurpose
- func (v *Entry) GetInvisibleChar() rune
- func (v *Entry) GetLayoutOffsets() (x, y int)
- func (v *Entry) GetMaxLength() int
- func (v *Entry) GetOverwriteMode() bool
- func (v *Entry) GetPlaceholderText() (string, error)
- func (v *Entry) GetProgressFraction() float64
- func (v *Entry) GetProgressPulseStep() float64
- func (v *Entry) GetText() (string, error)
- func (v *Entry) GetTextLength() uint16
- func (v *Entry) GetVisibility() bool
- func (v *Entry) GetWidthChars() int
- func (v *Entry) LayoutIndexToTextIndex(layoutIndex int) int
- func (v *Entry) Native() *C.GtkEntry
- func (v *Entry) ProgressPulse()
- func (v *Entry) ResetIMContext()
- func (v *Entry) SetActivatesDefault(setting bool)
- func (v *Entry) SetAlignment(xalign float32)
- func (v *Entry) SetBuffer(buffer *EntryBuffer)
- func (v *Entry) SetCompletion(completion *EntryCompletion)
- func (v *Entry) SetCursorHAdjustment(adjustment *Adjustment)
- func (v *Entry) SetHasFrame(setting bool)
- func (v *Entry) SetIconActivatable(iconPos EntryIconPosition, activatable bool)
- func (v *Entry) SetIconFromIconName(iconPos EntryIconPosition, name string)
- func (v *Entry) SetIconFromStock(iconPos EntryIconPosition, stockID string)
- func (v *Entry) SetIconSensitive(iconPos EntryIconPosition, sensitive bool)
- func (v *Entry) SetIconTooltipMarkup(iconPos EntryIconPosition, tooltip string)
- func (v *Entry) SetIconTooltipText(iconPos EntryIconPosition, tooltip string)
- func (v *Entry) SetInputHints(hints InputHints)
- func (v *Entry) SetInputPurpose(purpose InputPurpose)
- func (v *Entry) SetInvisibleChar(ch rune)
- func (v *Entry) SetMaxLength(len int)
- func (v *Entry) SetOverwriteMode(overwrite bool)
- func (v *Entry) SetPlaceholderText(text string)
- func (v *Entry) SetProgressFraction(fraction float64)
- func (v *Entry) SetProgressPulseStep(fraction float64)
- func (v *Entry) SetText(text string)
- func (v *Entry) SetVisibility(visible bool)
- func (v *Entry) SetWidthChars(nChars int)
- func (v *Entry) TextIndexToLayoutIndex(textIndex int) int
- func (v *Entry) UnsetInvisibleChar()
- type EntryBuffer
- func (v *EntryBuffer) DeleteText(position uint, nChars int) uint
- func (v *EntryBuffer) EmitDeletedText(pos, nChars uint)
- func (v *EntryBuffer) EmitInsertedText(pos uint, text string)
- func (v *EntryBuffer) GetBytes() uint
- func (v *EntryBuffer) GetLength() uint
- func (v *EntryBuffer) GetMaxLength() int
- func (v *EntryBuffer) GetText() (string, error)
- func (v *EntryBuffer) InsertText(position uint, text string) uint
- func (v *EntryBuffer) Native() *C.GtkEntryBuffer
- func (v *EntryBuffer) SetMaxLength(maxLength int)
- func (v *EntryBuffer) SetText(text string)
- type EntryCompletion
- type EntryIconPosition
- type Grid
- func (v *Grid) Attach(child IWidget, left, top, width, height int)
- func (v *Grid) AttachNextTo(child, sibling IWidget, side PositionType, width, height int)
- func (v *Grid) GetChildAt(left, top int) (*Widget, error)
- func (v *Grid) GetColumnHomogeneous() bool
- func (v *Grid) GetColumnSpacing() uint
- func (v *Grid) GetRowHomogeneous() bool
- func (v *Grid) GetRowSpacing() uint
- func (v *Grid) InsertColumn(position int)
- func (v *Grid) InsertNextTo(sibling IWidget, side PositionType)
- func (v *Grid) InsertRow(position int)
- func (v *Grid) Native() *C.GtkGrid
- func (v *Grid) SetColumnHomogeneous(homogeneous bool)
- func (v *Grid) SetColumnSpacing(spacing uint)
- func (v *Grid) SetRowHomogeneous(homogeneous bool)
- func (v *Grid) SetRowSpacing(spacing uint)
- type ICellLayout
- type ICellRenderer
- type IOrientable
- type ITreeModel
- type IWidget
- type IWindow
- type IconSize
- type Image
- func (v *Image) Clear()
- func (v *Image) GetIconName() (string, IconSize)
- func (v *Image) GetPixelSize() int
- func (v *Image) GetStorageType() ImageType
- func (v *Image) Native() *C.GtkImage
- func (v *Image) SetFromFile(filename string)
- func (v *Image) SetFromIconName(iconName string, size IconSize)
- func (v *Image) SetFromResource(resourcePath string)
- func (v *Image) SetFromStock(stock Stock, size IconSize)
- func (v *Image) SetPixelSize(pixelSize int)
- type ImageType
- type InputHints
- type InputPurpose
- type Label
- func (v *Label) GetSelectable() bool
- func (v *Label) GetText() (string, error)
- func (v *Label) Native() *C.GtkLabel
- func (v *Label) SetLabel(str string)
- func (v *Label) SetLineWrap(wrap bool)
- func (v *Label) SetMarkup(str string)
- func (v *Label) SetMarkupWithMnemonic(str string)
- func (v *Label) SetMaxWidthChars(nChars int)
- func (v *Label) SetPattern(patern string)
- func (v *Label) SetSelectable(setting bool)
- func (v *Label) SetText(str string)
- func (v *Label) SetWidthChars(nChars int)
- type ListStore
- func (v *ListStore) Append(iter *TreeIter)
- func (v *ListStore) Clear()
- func (v *ListStore) IterIsValid(iter *TreeIter) bool
- func (v *ListStore) MoveAfter(iter, position *TreeIter)
- func (v *ListStore) MoveBefore(iter, position *TreeIter)
- func (v *ListStore) Native() *C.GtkListStore
- func (v *ListStore) Prepend(iter *TreeIter)
- func (v *ListStore) Set(iter *TreeIter, columns []int, values []interface{}) error
- func (v *ListStore) Swap(a, b *TreeIter)
- type Menu
- type MenuBar
- type MenuItem
- type MenuShell
- type MessageDialog
- type MessageType
- type Misc
- type Notebook
- func (v *Notebook) AppendPage(child IWidget, tabLabel IWidget) int
- func (v *Notebook) AppendPageMenu(child IWidget, tabLabel IWidget, menuLabel IWidget) int
- func (v *Notebook) GetActionWidget(packType PackType) (*Widget, error)
- func (v *Notebook) GetCurrentPage() int
- func (v *Notebook) GetGroupName() (string, error)
- func (v *Notebook) GetMenuLabel(child IWidget) (*Widget, error)
- func (v *Notebook) GetMenuLabelText(child IWidget) (string, error)
- func (v *Notebook) GetNPages() int
- func (v *Notebook) GetNthPage(pageNum int) (*Widget, error)
- func (v *Notebook) GetScrollable() bool
- func (v *Notebook) GetShowBorder() bool
- func (v *Notebook) GetShowTabs() bool
- func (v *Notebook) GetTabDetachable(child IWidget) bool
- func (v *Notebook) GetTabLabel(child IWidget) (*Widget, error)
- func (v *Notebook) GetTabLabelText(child IWidget) (string, error)
- func (v *Notebook) GetTabPos() PositionType
- func (v *Notebook) GetTabReorderable(child IWidget) bool
- func (v *Notebook) InsertPage(child IWidget, tabLabel IWidget, position int) int
- func (v *Notebook) InsertPageMenu(child IWidget, tabLabel IWidget, menuLabel IWidget, position int) int
- func (v *Notebook) Native() *C.GtkNotebook
- func (v *Notebook) NextPage()
- func (v *Notebook) PageNum(child IWidget) int
- func (v *Notebook) PopupDisable()
- func (v *Notebook) PopupEnable()
- func (v *Notebook) PrependPage(child IWidget, tabLabel IWidget) int
- func (v *Notebook) PrependPageMenu(child IWidget, tabLabel IWidget, menuLabel IWidget) int
- func (v *Notebook) PrevPage()
- func (v *Notebook) RemovePage(pageNum int)
- func (v *Notebook) ReorderChild(child IWidget, position int)
- func (v *Notebook) SetActionWidget(widget IWidget, packType PackType)
- func (v *Notebook) SetCurrentPage(pageNum int)
- func (v *Notebook) SetGroupName(groupName string)
- func (v *Notebook) SetMenuLabel(child, menuLabel IWidget)
- func (v *Notebook) SetMenuLabelText(child IWidget, menuText string)
- func (v *Notebook) SetScrollable(scrollable bool)
- func (v *Notebook) SetShowBorder(showBorder bool)
- func (v *Notebook) SetShowTabs(showTabs bool)
- func (v *Notebook) SetTabDetachable(child IWidget, detachable bool)
- func (v *Notebook) SetTabLabel(child, tabLabel IWidget)
- func (v *Notebook) SetTabLabelText(child IWidget, tabText string)
- func (v *Notebook) SetTabPos(pos PositionType)
- func (v *Notebook) SetTabReorderable(child IWidget, reorderable bool)
- type Orientable
- type Orientation
- type PackType
- type PolicyType
- type PositionType
- type ProgressBar
- type ReliefStyle
- type ResponseType
- type ScrolledWindow
- type SpinButton
- type Statusbar
- type Stock
- type TreeIter
- type TreeModel
- func (v *TreeModel) GetColumnType(index int) glib.Type
- func (v *TreeModel) GetFlags() TreeModelFlags
- func (v *TreeModel) GetIter(path *TreePath) (*TreeIter, error)
- func (v *TreeModel) GetIterFirst() (*TreeIter, error)
- func (v *TreeModel) GetIterFromString(path string) (*TreeIter, error)
- func (v *TreeModel) GetNColumns() int
- func (v *TreeModel) GetPath(iter *TreeIter) (*TreePath, error)
- func (v *TreeModel) GetValue(iter *TreeIter, column int) (*glib.Value, error)
- func (v *TreeModel) Native() *C.GtkTreeModel
- type TreeModelFlags
- type TreePath
- type TreeSelection
- type TreeView
- type TreeViewColumn
- func (v *TreeViewColumn) AddAttribute(renderer ICellRenderer, attribute string, column int)
- func (v *TreeViewColumn) GetExpand() bool
- func (v *TreeViewColumn) GetMinWidth() int
- func (v *TreeViewColumn) Native() *C.GtkTreeViewColumn
- func (v *TreeViewColumn) SetExpand(expand bool)
- func (v *TreeViewColumn) SetMinWidth(minWidth int)
- type Widget
- func (v *Widget) Activate() bool
- func (v *Widget) AddEvents(events int)
- func (v *Widget) Destroy()
- func (v *Widget) Event(event *gdk.Event) bool
- func (v *Widget) GetDeviceEnabled(device *gdk.Device) bool
- func (v *Widget) GetEvents() int
- func (v *Widget) GetHAlign() Align
- func (v *Widget) GetHExpand() bool
- func (v *Widget) GetName() (string, error)
- func (v *Widget) GetNoShowAll() bool
- func (v *Widget) GetParent() (*Widget, error)
- func (v *Widget) GetParentWindow() (*gdk.Window, error)
- func (v *Widget) GetSizeRequest() (width, height int)
- func (v *Widget) GetTooltipText() (string, error)
- func (v *Widget) GetToplevel() (*Widget, error)
- func (v *Widget) GetVAlign() Align
- func (v *Widget) GetVExpand() bool
- func (v *Widget) GrabDefault()
- func (v *Widget) GrabFocus()
- func (v *Widget) Hide()
- func (v *Widget) InDestruction() bool
- func (v *Widget) IsFocus() bool
- func (v *Widget) Map()
- func (v *Widget) Native() *C.GtkWidget
- func (v *Widget) OverrideFont(description string)
- func (v *Widget) Reparent(newParent IWidget)
- func (v *Widget) SetDeviceEnabled(device *gdk.Device, enabled bool)
- func (v *Widget) SetEvents(events int)
- func (v *Widget) SetHAlign(align Align)
- func (v *Widget) SetHExpand(expand bool)
- func (v *Widget) SetName(name string)
- func (v *Widget) SetNoShowAll(noShowAll bool)
- func (v *Widget) SetParent(parent IWidget)
- func (v *Widget) SetParentWindow(parentWindow *gdk.Window)
- func (v *Widget) SetSensitive(sensitive bool)
- func (v *Widget) SetSizeRequest(width, height int)
- func (v *Widget) SetTooltipText(text string)
- func (v *Widget) SetVAlign(align Align)
- func (v *Widget) SetVExpand(expand bool)
- func (v *Widget) SetVisible(visible bool)
- func (v *Widget) Show()
- func (v *Widget) ShowAll()
- func (v *Widget) ShowNow()
- func (v *Widget) Unmap()
- func (v *Widget) Unparent()
- type Window
- type WindowPosition
- type WindowType
Constants ¶
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 )
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 )
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 )
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 )
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 )
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 )
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 )
const ( POLICY_ALWAYS PolicyType = C.GTK_POLICY_ALWAYS POLICY_AUTOMATIC = C.GTK_POLICY_AUTOMATIC POLICY_NEVER = C.GTK_POLICY_NEVER )
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 )
const ( RELIEF_NORMAL ReliefStyle = C.GTK_RELIEF_NORMAL RELIEF_HALF = C.GTK_RELIEF_HALF RELIEF_NONE = C.GTK_RELIEF_NONE )
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 )
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 )
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.
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 Bin ¶
type Bin struct {
Container
}
Bin is a representation of GTK's 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 ¶
GetHomogeneous() is a wrapper around gtk_box_get_homogeneous().
func (*Box) GetSpacing ¶
GetSpacing() is a wrapper around gtk_box_get_spacing().
func (*Box) QueryChildPacking ¶
QueryChildPacking() is a wrapper around gtk_box_query_child_packing().
func (*Box) ReorderChild ¶
ReorderChild() is a wrapper around gtk_box_reorder_child().
func (*Box) SetChildPacking ¶
SetChildPacking() is a wrapper around gtk_box_set_child_packing().
func (*Box) SetHomogeneous ¶
SetHomogeneous() is a wrapper around gtk_box_set_homogeneous().
func (*Box) SetSpacing ¶
SetSpacing() is a wrapper around gtk_box_set_spacing()
type Builder ¶
Builder is a representation of GTK's GtkBuilder.
func BuilderNew ¶
BuilderNew() is a wrapper around gtk_builder_new().
func (*Builder) AddFromFile ¶
AddFromFile() is a wrapper around gtk_builder_add_from_file().
func (*Builder) AddFromResource ¶
AddFromResource() is a wrapper around gtk_builder_add_from_resource().
func (*Builder) AddFromString ¶
AddFromString() is a wrapper around gtk_builder_add_from_string().
func (*Builder) GetObject ¶
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 ButtonNewFromStock ¶
ButtonNewFromStock() is a wrapper around gtk_button_new_from_stock().
func ButtonNewWithLabel ¶
ButtonNewWithLabel() is a wrapper around gtk_button_new_with_label().
func ButtonNewWithMnemonic ¶
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 ¶
GetAlignment() is a wrapper around gtk_button_get_alignment().
func (*Button) GetAlwaysShowImage ¶
GetAlwaysShowImage() is a wrapper around gtk_button_get_always_show_image().
func (*Button) GetEventWindow ¶
GetEventWindow() is a wrapper around gtk_button_get_event_window().
func (*Button) GetFocusOnClick ¶
GetFocusOnClick() is a wrapper around gtk_button_get_focus_on_click().
func (*Button) GetImagePosition ¶
func (v *Button) GetImagePosition() PositionType
GetImagePosition() is a wrapper around gtk_button_get_image_position().
func (*Button) GetRelief ¶
func (v *Button) GetRelief() ReliefStyle
GetRelief() is a wrapper around gtk_button_get_relief().
func (*Button) GetUseStock ¶
GetUseStock() is a wrapper around gtk_button_get_use_stock().
func (*Button) GetUseUnderline ¶
GetUseUnderline() is a wrapper around gtk_button_get_use_underline().
func (*Button) SetAlignment ¶
SetAlignment() is a wrapper around gtk_button_set_alignment().
func (*Button) SetAlwaysShowImage ¶
SetAlwaysShowImage() is a wrapper around gtk_button_set_always_show_image().
func (*Button) SetFocusOnClick ¶
SetFocusOnClick() is a wrapper around gtk_button_set_focus_on_click().
func (*Button) SetImagePosition ¶
func (v *Button) SetImagePosition(position PositionType)
SetImagePosition() is a wrapper around gtk_button_set_image_position().
func (*Button) SetRelief ¶
func (v *Button) SetRelief(newStyle ReliefStyle)
SetRelief() is a wrapper around gtk_button_set_relief().
func (*Button) SetUseStock ¶
SetUseStock() is a wrapper around gtk_button_set_use_stock().
func (*Button) SetUseUnderline ¶
SetUseUnderline() is a wrapper around gtk_button_set_use_underline().
type CellLayout ¶
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 ¶
Clipboard is a wrapper around GTK's GtkClipboard.
func ClipboardGet ¶
ClipboardGet() is a wrapper around gtk_clipboard_get().
func ClipboardGetForDisplay ¶
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.
type ComboBox ¶
type ComboBox struct { Bin // Interfaces CellLayout }
ComboBox is a representation of GTK's GtkComboBox.
func ComboBoxNew ¶
ComboBoxNew() is a wrapper around gtk_combo_box_new().
func ComboBoxNewWithEntry ¶
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) Native ¶
func (v *ComboBox) Native() *C.GtkComboBox
Native() returns a pointer to the underlying GtkComboBox.
type Container ¶
type Container struct {
Widget
}
Container is a representation of GTK's GtkContainer.
func (*Container) Native ¶
func (v *Container) Native() *C.GtkContainer
Native() returns a pointer to the underlying GtkContainer.
type Dialog ¶
type Dialog struct {
Window
}
Dialog is a representation of GTK's GtkDialog.
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 ¶
GetActionArea() is a wrapper around gtk_dialog_get_action_area().
func (*Dialog) GetContentArea ¶
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) Response ¶
func (v *Dialog) Response(response ResponseType)
Response() is a wrapper around gtk_dialog_response().
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 EntryNewWithBuffer ¶
func EntryNewWithBuffer(buffer *EntryBuffer) (*Entry, error)
EntryNewWithBuffer() is a wrapper around gtk_entry_new_with_buffer().
func (*Entry) GetActivatesDefault ¶
GetActivatesDefault() is a wrapper around gtk_entry_get_activates_default().
func (*Entry) GetAlignment ¶
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 ¶
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 ¶
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 ¶
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 ¶
GetInvisibleChar() is a wrapper around gtk_entry_get_invisible_char().
func (*Entry) GetLayoutOffsets ¶
GetLayoutOffsets() is a wrapper around gtk_entry_get_layout_offsets().
func (*Entry) GetMaxLength ¶
GetMaxLength() is a wrapper around gtk_entry_get_max_length().
func (*Entry) GetOverwriteMode ¶
GetOverwriteMode() is a wrapper around gtk_entry_get_overwrite_mode().
func (*Entry) GetPlaceholderText ¶
GetPlaceholderText() is a wrapper around gtk_entry_get_placeholder_text().
func (*Entry) GetProgressFraction ¶
GetProgressFraction() is a wrapper around gtk_entry_get_progress_fraction().
func (*Entry) GetProgressPulseStep ¶
GetProgressPulseStep() is a wrapper around gtk_entry_get_progress_pulse_step().
func (*Entry) GetTextLength ¶
GetTextLength() is a wrapper around gtk_entry_get_text_length().
func (*Entry) GetVisibility ¶
GetVisibility() is a wrapper around gtk_entry_get_visibility().
func (*Entry) GetWidthChars ¶
GetWidthChars() is a wrapper around gtk_entry_get_width_chars().
func (*Entry) LayoutIndexToTextIndex ¶
LayoutIndexToTextIndex() is a wrapper around gtk_entry_layout_index_to_text_index().
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 ¶
SetActivatesDefault() is a wrapper around gtk_entry_set_activates_default().
func (*Entry) SetAlignment ¶
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 ¶
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 ¶
SetInvisibleChar() is a wrapper around gtk_entry_set_invisible_char().
func (*Entry) SetMaxLength ¶
SetMaxLength() is a wrapper around gtk_entry_set_max_length().
func (*Entry) SetOverwriteMode ¶
SetOverwriteMode() is a wrapper around gtk_entry_set_overwrite_mode().
func (*Entry) SetPlaceholderText ¶
SetPlaceholderText() is a wrapper around gtk_entry_set_placeholder_text().
func (*Entry) SetProgressFraction ¶
SetProgressFraction() is a wrapper around gtk_entry_set_progress_fraction().
func (*Entry) SetProgressPulseStep ¶
SetProgressPulseStep() is a wrapper around gtk_entry_set_progress_pulse_step().
func (*Entry) SetVisibility ¶
SetVisibility() is a wrapper around gtk_entry_set_visibility().
func (*Entry) SetWidthChars ¶
SetWidthChars() is a wrapper around gtk_entry_set_width_chars().
func (*Entry) TextIndexToLayoutIndex ¶
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 ¶
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 ¶
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 (*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 ¶
GetChildAt() is a wrapper around gtk_grid_get_child_at().
func (*Grid) GetColumnHomogeneous ¶
GetColumnHomogeneous() is a wrapper around gtk_grid_get_column_homogeneous().
func (*Grid) GetColumnSpacing ¶
GetColumnSpacing() is a wrapper around gtk_grid_get_column_spacing().
func (*Grid) GetRowHomogeneous ¶
GetRowHomogeneous() is a wrapper around gtk_grid_get_row_homogeneous().
func (*Grid) GetRowSpacing ¶
GetRowSpacing() is a wrapper around gtk_grid_get_row_spacing().
func (*Grid) InsertColumn ¶
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) SetColumnHomogeneous ¶
SetColumnHomogeneous() is a wrapper around gtk_grid_set_column_homogeneous().
func (*Grid) SetColumnSpacing ¶
SetColumnSpacing() is a wrapper around gtk_grid_set_column_spacing().
func (*Grid) SetRowHomogeneous ¶
SetRowHomogeneous() is a wrapper around gtk_grid_set_row_homogeneous().
func (*Grid) SetRowSpacing ¶
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 Image ¶
type Image struct {
Misc
}
Image is a representation of GTK's GtkImage.
func ImageNewFromFile ¶
ImageNewFromFile() is a wrapper around gtk_image_new_from_file().
func ImageNewFromIconName ¶
ImageNewFromIconName() is a wrapper around gtk_image_new_from_icon_name().
func ImageNewFromResource ¶
ImageNewFromResource() is a wrapper around gtk_image_new_from_resource().
func ImageNewFromStock ¶
ImageNewFromStock() is a wrapper around gtk_image_new_from_stock().
func (*Image) GetIconName ¶
GetIconName() is a wrapper around gtk_image_get_icon_name().
func (*Image) GetPixelSize ¶
GetPixelSize() is a wrapper around gtk_image_get_pixel_size().
func (*Image) GetStorageType ¶
GetStorageType() is a wrapper around gtk_image_get_storage_type().
func (*Image) SetFromFile ¶
SetFromFile() is a wrapper around gtk_image_set_from_file().
func (*Image) SetFromIconName ¶
SetFromIconName() is a wrapper around gtk_image_set_from_icon_name().
func (*Image) SetFromResource ¶
SetFromResource() is a wrapper around gtk_image_set_from_resource().
func (*Image) SetFromStock ¶
SetFromStock() is a wrapper around gtk_image_set_from_stock().
func (*Image) SetPixelSize ¶
SetPixelSize() is a wrapper around gtk_image_set_pixel_size().
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 LabelNewWithMnemonic ¶
LabelNewWithMnemonic() is a wrapper around gtk_label_new_with_mnemonic().
func (*Label) GetSelectable ¶
GetSelectable() is a wrapper around gtk_label_get_selectable().
func (*Label) SetLineWrap ¶
SetLineWrap() is a wrapper around gtk_label_set_line_wrap().
func (*Label) SetMarkupWithMnemonic ¶
SetMarkupWithMnemonic() is a wrapper around gtk_label_set_markup_with_mnemonic().
func (*Label) SetMaxWidthChars ¶
SetMaxWidthChars() is a wrapper around gtk_label_set_max_width_chars().
func (*Label) SetPattern ¶
SetPattern() is a wrapper around gtk_label_set_pattern().
func (*Label) SetSelectable ¶
SetSelectable() is a wrapper around gtk_label_set_selectable().
func (*Label) SetWidthChars ¶
SetWidthChars() is a wrapper around gtk_label_set_width_chars().
type ListStore ¶
ListStore is a representation of GTK's GtkListStore.
func ListStoreNew ¶
ListStoreNew() is a wrapper around gtk_list_store_newv().
func (*ListStore) Clear ¶
func (v *ListStore) Clear()
Clear() is a wrapper around gtk_list_store_clear().
func (*ListStore) IterIsValid ¶
IterIsValid() is a wrapper around gtk_list_store_iter_is_valid().
func (*ListStore) MoveBefore ¶
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) Set ¶
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);
type MenuBar ¶
type MenuBar struct {
MenuShell
}
MenuBar is a representation of GTK's GtkMenuBar.
func MenuBarNew ¶
MenuBarNew() is a wrapper around gtk_menu_bar_new().
func (*MenuBar) Native ¶
func (v *MenuBar) Native() *C.GtkMenuBar
Native() returns a pointer to the underlying GtkMenuBar.
type MenuItem ¶
type MenuItem struct {
Bin
}
MenuItem is a representation of GTK's GtkMenuItem.
func MenuItemNew ¶
MenuItemNew() is a wrapper around gtk_menu_item_new().
func MenuItemNewWithLabel ¶
MenuItemNewWithLabel() is a wrapper around gtk_menu_item_new_with_label().
func MenuItemNewWithMnemonic ¶
MenuItemNewWithMnemonic() is a wrapper around gtk_menu_item_new_with_mnemonic().
func (*MenuItem) Native ¶
func (v *MenuItem) Native() *C.GtkMenuItem
Native() returns a pointer to the underlying GtkMenuItem.
func (*MenuItem) SetSubmenu ¶
SetSubmenu() is a wrapper around gtk_menu_item_set_submenu().
type MenuShell ¶
type MenuShell struct {
Container
}
MenuShell is a representation of GTK's GtkMenuShell.
func (*MenuShell) Native ¶
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 Notebook ¶
type Notebook struct {
Container
}
Notebook is a representation of GTK's GtkNotebook.
func NotebookNew ¶
NotebookNew() is a wrapper around gtk_notebook_new().
func (*Notebook) AppendPage ¶
AppendPage() is a wrapper around gtk_notebook_append_page().
func (*Notebook) AppendPageMenu ¶
AppendPageMenu() is a wrapper around gtk_notebook_append_page_menu().
func (*Notebook) GetActionWidget ¶
GetActionWidget() is a wrapper around gtk_notebook_get_action_widget().
func (*Notebook) GetCurrentPage ¶
GetCurrentPage() is a wrapper around gtk_notebook_get_current_page().
func (*Notebook) GetGroupName ¶
GetGroupName() is a wrapper around gtk_notebook_get_group_name().
func (*Notebook) GetMenuLabel ¶
GetMenuLabel() is a wrapper around gtk_notebook_get_menu_label().
func (*Notebook) GetMenuLabelText ¶
GetMenuLabelText() is a wrapper around gtk_notebook_get_menu_label_text().
func (*Notebook) GetNthPage ¶
GetNthPage() is a wrapper around gtk_notebook_get_nth_page().
func (*Notebook) GetScrollable ¶
GetScrollable() is a wrapper around gtk_notebook_get_scrollable().
func (*Notebook) GetShowBorder ¶
GetShowBorder() is a wrapper around gtk_notebook_get_show_border().
func (*Notebook) GetShowTabs ¶
GetShowTabs() is a wrapper around gtk_notebook_get_show_tabs().
func (*Notebook) GetTabDetachable ¶
GetTabDetachable() is a wrapper around gtk_notebook_get_tab_detachable().
func (*Notebook) GetTabLabel ¶
GetTabLabel() is a wrapper around gtk_notebook_get_tab_label().
func (*Notebook) GetTabLabelText ¶
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 ¶
GetTabReorderable() is a wrapper around gtk_notebook_get_tab_reorderable().
func (*Notebook) InsertPage ¶
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) 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 ¶
PrependPage() is a wrapper around gtk_notebook_prepend_page().
func (*Notebook) PrependPageMenu ¶
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 ¶
RemovePage() is a wrapper around gtk_notebook_remove_page().
func (*Notebook) ReorderChild ¶
ReorderChild() is a wrapper around gtk_notebook_reorder_child().
func (*Notebook) SetActionWidget ¶
SetActionWidget() is a wrapper around gtk_notebook_set_action_widget().
func (*Notebook) SetCurrentPage ¶
SetCurrentPage() is a wrapper around gtk_notebook_set_current_page().
func (*Notebook) SetGroupName ¶
SetGroupName() is a wrapper around gtk_notebook_set_group_name().
func (*Notebook) SetMenuLabel ¶
SetMenuLabel() is a wrapper around gtk_notebook_set_menu_label().
func (*Notebook) SetMenuLabelText ¶
SetMenuLabelText() is a wrapper around gtk_notebook_set_menu_label_text().
func (*Notebook) SetScrollable ¶
SetScrollable() is a wrapper around gtk_notebook_set_scrollable().
func (*Notebook) SetShowBorder ¶
SetShowBorder() is a wrapper around gtk_notebook_set_show_border().
func (*Notebook) SetShowTabs ¶
SetShowTabs() is a wrapper around gtk_notebook_set_show_tabs().
func (*Notebook) SetTabDetachable ¶
SetTabDetachable() is a wrapper around gtk_notebook_set_tab_detachable().
func (*Notebook) SetTabLabel ¶
SetTabLabel() is a wrapper around gtk_notebook_set_tab_label().
func (*Notebook) SetTabLabelText ¶
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 ¶
SetTabReorderable() is a wrapper around gtk_notebook_set_tab_reorderable().
type Orientable ¶
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 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 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 ¶
StatusbarNew() is a wrapper around gtk_statusbar_new().
func (*Statusbar) GetContextId ¶
GetContextId() is a wrapper around gtk_statusbar_get_context_id().
func (*Statusbar) GetMessageArea ¶
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
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) Native ¶
func (v *TreeIter) Native() *C.GtkTreeIter
Native() returns a pointer to the underlying GtkTreeIter.
type TreeModel ¶
TreeModel is a representation of GTK's GtkTreeModel GInterface.
func (*TreeModel) GetColumnType ¶
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) GetIterFirst ¶
GetIterFirst() is a wrapper around gtk_tree_model_get_iter_first().
func (*TreeModel) GetIterFromString ¶
GetIterFromString() is a wrapper around gtk_tree_model_get_iter_from_string().
func (*TreeModel) GetNColumns ¶
GetNColumns() 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 ¶
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 ¶
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) 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) Destroy ¶
func (v *Widget) Destroy()
Destroy() is a wrapper around gtk_widget_destroy().
func (*Widget) GetDeviceEnabled ¶
GetDeviceEnabled() is a wrapper around gtk_widget_get_device_enabled().
func (*Widget) GetHExpand ¶
GetHExpand() is a wrapper around gtk_widget_get_hexpand().
func (*Widget) GetName ¶
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 ¶
GetNoShowAll() is a wrapper around gtk_widget_get_no_show_all().
func (*Widget) GetParentWindow ¶
GetParentWindow() is a wrapper around gtk_widget_get_parent_window().
func (*Widget) GetSizeRequest ¶
GetSizeRequest() is a wrapper around gtk_widget_get_size_request().
func (*Widget) GetTooltipText ¶
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 ¶
GetToplevel() is a wrapper around gtk_widget_get_toplevel().
func (*Widget) GetVExpand ¶
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) InDestruction ¶
InDestruction() is a wrapper around gtk_widget_in_destruction().
func (*Widget) OverrideFont ¶
OverrideFont() is a wrapper around gtk_widget_override_font().
func (*Widget) SetDeviceEnabled ¶
SetDeviceEnabled() is a wrapper around gtk_widget_set_device_enabled().
func (*Widget) SetHExpand ¶
SetHExpand() is a wrapper around gtk_widget_set_hexpand().
func (*Widget) SetNoShowAll ¶
SetNoShowAll() is a wrapper around gtk_widget_set_no_show_all().
func (*Widget) SetParentWindow ¶
SetParentWindow() is a wrapper around gtk_widget_set_parent_window().
func (*Widget) SetSensitive ¶
SetSensitive() is a wrapper around gtk_widget_set_sensitive().
func (*Widget) SetSizeRequest ¶
SetSizeRequest() is a wrapper around gtk_widget_set_size_request().
func (*Widget) SetTooltipText ¶
SetTooltipText() is a wrapper around gtk_widget_set_tooltip_text().
func (*Widget) SetVExpand ¶
SetVExpand() is a wrapper around gtk_widget_set_vexpand().
func (*Widget) SetVisible ¶
SetVisible() is a wrapper around gtk_widget_set_visible().
func (*Widget) ShowAll ¶
func (v *Widget) ShowAll()
ShowAll() is a wrapper around gtk_widget_show_all().
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) SetDefaultGeometry ¶
SetDefaultGeometry() is a wrapper around gtk_window_set_default_geometry().
func (*Window) SetDefaultSize ¶
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) SetTransientFor ¶
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 )