gtk

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

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

Go to latest
Published: Oct 31, 2019 License: Zlib Imports: 7 Imported by: 4

Documentation

Index

Constants

View Source
const (
	RESPONSE_ACCEPT int32 = iota
	RESPONSE_NONE   int32 = iota
)

Variables

This section is empty.

Functions

func CreateGLArea

func CreateGLArea()

func CreateGLAreaAndAddToContainer

func CreateGLAreaAndAddToContainer(container Container)

func CreateGLAreaAndAddToWindow

func CreateGLAreaAndAddToWindow()

func CreateWindow

func CreateWindow(windowWidth, windowHeight int, title string) error

func CursorDisable

func CursorDisable()

func CursorDisabled

func CursorDisabled() bool

func CursorHidden

func CursorHidden() bool

func CursorHide

func CursorHide()

func CursorShow

func CursorShow()

func CursorShown

func CursorShown() bool

func Init

func Init()

func Main

func Main()

func MainQuit

func MainQuit()

func SetGLArea

func SetGLArea(area GLArea)

func SetWindow

func SetWindow(window Window)

func WindowGetSize

func WindowGetSize() mgl32.Vec2

func WindowSetFullscreen

func WindowSetFullscreen(b bool)

func WindowSetSize

func WindowSetSize(size mgl32.Vec2)

Types

type Adjustment

type Adjustment struct {
	Handle *C.GtkAdjustment
}

type Box

type Box struct {
	Handle *C.GtkBox
}

func BoxNew

func BoxNew(orient Orientation, spacing int) Box

func (Box) ToContainer

func (this Box) ToContainer() Container

func (Box) ToWidget

func (this Box) ToWidget() Widget

type Builder

type Builder struct {
	Handle *C.GtkBuilder
}

func BuilderNew

func BuilderNew() Builder

func (Builder) AddFromFile

func (this Builder) AddFromFile(file string) error

func (Builder) GetObject

func (this Builder) GetObject(name string) GObject

type Button

type Button struct {
	Handle *C.GtkButton
	ID     int
}

func ButtonNew

func ButtonNew() Button

func ButtonNewWithLabel

func ButtonNewWithLabel(label string) Button

func (Button) SignalConnect

func (this Button) SignalConnect(signal string, callback ButtonSignalCallback)

func (Button) ToContainer

func (this Button) ToContainer() Container

func (Button) ToWidget

func (this Button) ToWidget() Widget

type ButtonSignalCallback

type ButtonSignalCallback func(button Button)

type Colorspace

type Colorspace int
const (
	COLORSPACE Colorspace = iota
)

type Container

type Container struct {
	Handle *C.GtkContainer
}

func (Container) Add

func (this Container) Add(widget Widget)

func (Container) GetChildren

func (this Container) GetChildren() GList

func (Container) Remove

func (this Container) Remove(widget Widget)

type Dialog

type Dialog struct {
	Handle *C.GtkDialog
}

func (Dialog) Run

func (this Dialog) Run() int32

func (Dialog) ToWidget

func (this Dialog) ToWidget() Widget

type Editable

type Editable struct {
	Handle *C.GtkEditable
}

func (Editable) SetEditable

func (this Editable) SetEditable(editable bool)

type Entry

type Entry struct {
	Handle *C.GtkEntry
}

func EntryNew

func EntryNew() Entry

func (Entry) GetText

func (this Entry) GetText() string

func (Entry) SetText

func (this Entry) SetText(text string)

func (Entry) ToEditable

func (this Entry) ToEditable() Editable

func (Entry) ToWidget

func (this Entry) ToWidget() Widget

type Event

type Event struct {
	Handle *C.GdkEvent
}

func (Event) ToEventKey

func (this Event) ToEventKey() EventKey

type EventKey

type EventKey struct {
	Handle *C.GdkEventKey
}

func (EventKey) Keyval

func (this EventKey) Keyval() gohome.Key

type FileChooser

type FileChooser struct {
	Handle *C.GtkFileChooser
}

func (FileChooser) GetFilename

func (this FileChooser) GetFilename() string

func (FileChooser) GetFilenames

func (this FileChooser) GetFilenames() (files []string)

func (FileChooser) SetFilter

func (this FileChooser) SetFilter(filter FileFilter)

func (FileChooser) SetSelectMultiple

func (this FileChooser) SetSelectMultiple(select_multiple bool)

type FileChooserAction

type FileChooserAction int
const (
	FILE_CHOOSER_ACTION_OPEN          FileChooserAction = iota
	FILE_CHOOSER_ACTION_SAVE          FileChooserAction = iota
	FILE_CHOOSER_ACTION_SELECT_FOLDER FileChooserAction = iota
	FILE_CHOOSER_ACTION_CREATE_FOLDER FileChooserAction = iota
)

type FileChooserDialog

type FileChooserDialog struct {
	Handle *C.GtkFileChooserDialog
}

func FileChooserDialogNew

func FileChooserDialogNew(title string, parent Window, action FileChooserAction) FileChooserDialog

func (FileChooserDialog) ToDialog

func (this FileChooserDialog) ToDialog() Dialog

func (FileChooserDialog) ToFileChooser

func (this FileChooserDialog) ToFileChooser() FileChooser

func (FileChooserDialog) ToWidget

func (this FileChooserDialog) ToWidget() Widget

type FileFilter

type FileFilter struct {
	Handle *C.GtkFileFilter
}

func FileFilterNew

func FileFilterNew() FileFilter

func (FileFilter) AddPattern

func (this FileFilter) AddPattern(pattern string)

type GLArea

type GLArea struct {
	Handle *C.GtkGLArea
}

func GLAreaNew

func GLAreaNew() GLArea

func GetGLArea

func GetGLArea() GLArea

func (GLArea) Configure

func (this GLArea) Configure()

func (GLArea) ToWidget

func (this GLArea) ToWidget() Widget

type GList

type GList struct {
	Handle *C.GList
}

func (GList) Data

func (this GList) Data() GPointer

func (GList) Equals

func (this GList) Equals(other GList) bool

func (GList) Next

func (this GList) Next() GList

func (GList) Prev

func (this GList) Prev() GList

type GObject

type GObject struct {
	Handle *C.GObject
}

func (GObject) GetData

func (this GObject) GetData(key string) string

func (GObject) SetData

func (this GObject) SetData(key string, data string)

func (GObject) ToBox

func (this GObject) ToBox() Box

func (GObject) ToGLArea

func (this GObject) ToGLArea() GLArea

func (GObject) ToListBox

func (this GObject) ToListBox() ListBox

func (GObject) ToMenuItem

func (this GObject) ToMenuItem() MenuItem

func (GObject) ToToolButton

func (this GObject) ToToolButton() ToolButton

func (GObject) ToWidget

func (this GObject) ToWidget() Widget

type GPointer

type GPointer struct {
	Handle C.gpointer
}

func (GPointer) ToLabel

func (this GPointer) ToLabel() Label

func (GPointer) ToWidget

func (this GPointer) ToWidget() Widget

type Grid

type Grid struct {
	Handle *C.GtkGrid
}

func GridNew

func GridNew() Grid

func (Grid) Attach

func (this Grid) Attach(child Widget, left, top, width, height int32)

type Image

type Image struct {
	Handle *C.GtkImage
}

func ImageNewFromPixbuf

func ImageNewFromPixbuf(pixbuf Pixbuf) Image

func (Image) ToWidget

func (this Image) ToWidget() Widget

type Label

type Label struct {
	Handle *C.GtkLabel
}

func LabelNew

func LabelNew(text string) Label

func (Label) GetText

func (this Label) GetText() string

func (Label) SetText

func (this Label) SetText(text string)

func (Label) ToGObject

func (this Label) ToGObject() GObject

func (Label) ToWidget

func (this Label) ToWidget() Widget

type ListBox

type ListBox struct {
	Handle *C.GtkListBox
}

func ListBoxNew

func ListBoxNew() ListBox

func (ListBox) GetSelectedRow

func (this ListBox) GetSelectedRow() ListBoxRow

func (ListBox) Insert

func (this ListBox) Insert(widget Widget, position int32)

func (ListBox) SignalConnect

func (this ListBox) SignalConnect(signal string, callback interface{})

func (ListBox) ToContainer

func (this ListBox) ToContainer() Container

func (ListBox) ToWidget

func (this ListBox) ToWidget() Widget

type ListBoxRow

type ListBoxRow struct {
	Handle *C.GtkListBoxRow
}

func (ListBoxRow) IsNULL

func (this ListBoxRow) IsNULL() bool

func (ListBoxRow) ToContainer

func (this ListBoxRow) ToContainer() Container

func (ListBoxRow) ToWidget

func (this ListBoxRow) ToWidget() Widget
type Menu struct {
	Handle *C.GtkMenu
}
func MenuNew() Menu
func (this Menu) ToMenuShell() MenuShell
func (this Menu) ToWidget() Widget
type MenuBar struct {
	Handle *C.GtkMenuBar
}
func MenuBarNew() MenuBar
func (this MenuBar) ToContainer() Container
func (this MenuBar) ToMenuShell() MenuShell
func (this MenuBar) ToWidget() Widget
type MenuItem struct {
	Handle *C.GtkMenuItem
}
func MenuItemNewWithLabel(label string) MenuItem
func (this MenuItem) SetSubmenu(menu Menu)
func (this MenuItem) SignalConnect(signal string, callback MenuItemSignalCallback)
func (this MenuItem) ToWidget() Widget
type MenuItemSignalCallback func(menuItem MenuItem)
type MenuShell struct {
	Handle *C.GtkMenuShell
}
func (this MenuShell) Append(item MenuItem)

type MotionNotifyCallback

type MotionNotifyCallback func(x, y int16)
var OnMotion MotionNotifyCallback

type Orientation

type Orientation int
const (
	ORIENTATION_HORIZONTAL Orientation = iota
	ORIENTATION_VERTICAL   Orientation = iota
)

type Pixbuf

type Pixbuf struct {
	Handle *C.GdkPixbuf
}

func PixbufNewFromBytes

func PixbufNewFromBytes(data []byte, colorspace Colorspace, has_alpha bool, bits_per_sample, width, height, rowstride int) Pixbuf

type RenderCallback

type RenderCallback func()
var OnRender RenderCallback

type SpinButton

type SpinButton struct {
	Handle *C.GtkSpinButton
}

func SpinButtonNew

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

func SpinButtonNewWithRange

func SpinButtonNewWithRange(min, max, step float64) SpinButton

func (SpinButton) GetValue

func (this SpinButton) GetValue() float64

func (SpinButton) SetValue

func (this SpinButton) SetValue(val float64)

func (SpinButton) ToWidget

func (this SpinButton) ToWidget() Widget

type Switch

type Switch struct {
	Handle *C.GtkSwitch
}

func SwitchNew

func SwitchNew() Switch

func (Switch) GetActive

func (this Switch) GetActive() bool

func (Switch) GetState

func (this Switch) GetState() bool

func (Switch) SetActive

func (this Switch) SetActive(active bool)

func (Switch) SetState

func (this Switch) SetState(state bool)

func (Switch) ToWidget

func (this Switch) ToWidget() Widget

type ToolButton

type ToolButton struct {
	Handle *C.GtkToolButton
}

func (ToolButton) SignalConnect

func (this ToolButton) SignalConnect(callback func(toolButton ToolButton))

func (ToolButton) ToWidget

func (this ToolButton) ToWidget() Widget

type UseWholeWindowCallback

type UseWholeWindowCallback func() bool
var OnUseWholeScreen UseWholeWindowCallback

type Widget

type Widget struct {
	Handle *C.GtkWidget
}

func (Widget) Destroy

func (this Widget) Destroy()

func (Widget) Equals

func (this Widget) Equals(other Widget) bool

func (Widget) GetName

func (this Widget) GetName() string

func (Widget) GetParent

func (this Widget) GetParent() Widget

func (Widget) GetSize

func (this Widget) GetSize() (int32, int32)

func (Widget) GetSizeRequest

func (this Widget) GetSizeRequest() (int32, int32)

func (Widget) GrabFocus

func (this Widget) GrabFocus()

func (Widget) HasFocus

func (this Widget) HasFocus() bool

func (Widget) IsNULL

func (this Widget) IsNULL() bool

func (Widget) Realize

func (this Widget) Realize()

func (Widget) SetCanFocus

func (this Widget) SetCanFocus(value bool)

func (Widget) SetName

func (this Widget) SetName(name string)

func (Widget) SetSizeRequest

func (this Widget) SetSizeRequest(width, height int)

func (Widget) Show

func (this Widget) Show()

func (Widget) ShowAll

func (this Widget) ShowAll()

func (Widget) SignalConnect

func (this Widget) SignalConnect(signal string, callback interface{})

func (Widget) ToBox

func (this Widget) ToBox() Box

func (Widget) ToContainer

func (this Widget) ToContainer() Container

func (Widget) ToEntry

func (this Widget) ToEntry() Entry

func (Widget) ToGrid

func (this Widget) ToGrid() Grid

func (Widget) ToLabel

func (this Widget) ToLabel() Label

func (Widget) ToListBox

func (this Widget) ToListBox() ListBox

func (Widget) ToWindow

func (this Widget) ToWindow() Window

func (Widget) Unrealize

func (this Widget) Unrealize()

type Window

type Window struct {
	Handle *C.GtkWindow
}

func CreateWindowObject

func CreateWindowObject() Window

func GetWindow

func GetWindow() Window

func WindowNew

func WindowNew() Window

func (Window) ConfigureParameters

func (this Window) ConfigureParameters()

func (Window) ConfigureParametersAdv

func (this Window) ConfigureParametersAdv(width, height int, title string)

func (Window) ConnectSignals

func (this Window) ConnectSignals()

func (Window) SetAttachedTo

func (this Window) SetAttachedTo(widget Widget)

func (Window) ToContainer

func (this Window) ToContainer() Container

func (Window) ToWidget

func (this Window) ToWidget() Widget

Jump to

Keyboard shortcuts

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