Documentation
¶
Index ¶
- Constants
- Variables
- func IdleAdd(func())
- func Init() (bool, error)
- func KeyvalToUnicode(uint) rune
- func TextureFromRGBA([]byte, int, int) uintptr
- type MainLoop
- type Picture
- type Widget
- func BoxNew(bool) Widget
- func ButtonNewWithLabel(string) Widget
- func CheckButtonNewWithLabel(string) Widget
- func ColorNew() Widget
- func ComboNew([]string) Widget
- func DateNew() Widget
- func DrawingAreaNew() Widget
- func EntryNew() Widget
- func FixedNew() Widget
- func LabelNew(string) Widget
- func LinkNew(string) Widget
- func ListBoxNew() Widget
- func PopUpNew([]string) Widget
- func ProgressNew() Widget
- func SearchNew() Widget
- func SliderNew(float64, float64, float64) Widget
- func SpinnerNew() Widget
- func StepperNew(float64, float64, float64) Widget
- func TextViewNew() Widget
- func ToggleButtonNewWithLabel(string) Widget
- func WindowNew() Widget
- func (w Widget) Active() bool
- func (w Widget) AddTickCallback(func() bool) uint64
- func (w Widget) Append(Widget)
- func (w Widget) Buffer() Widget
- func (w Widget) ColorHex() string
- func (w Widget) ComboText() string
- func (w Widget) Connect(string, func()) uint64
- func (w Widget) ConnectBufferChanged(func()) uint64
- func (w Widget) DateISO() string
- func (w Widget) ListBoxAppendText(string)
- func (f Widget) Move(Widget, float64, float64)
- func (w Widget) OnActivateLink(func()) uint64
- func (w Widget) OnKey(func(uint, uint, uint, bool))
- func (w Widget) OnMotion(func(uint, float64, float64))
- func (w Widget) OnMouseDown(func(int, uint, float64, float64))
- func (w Widget) OnMouseUp(func(int, uint, float64, float64))
- func (w Widget) OnScroll(func(float64, float64, uint))
- func (w Widget) Present()
- func (f Widget) Put(Widget, float64, float64)
- func (w Widget) QueueDraw()
- func (w Widget) SelectRow(int)
- func (w Widget) Selected() int
- func (w Widget) SelectedRow() int
- func (w Widget) SetActive(bool)
- func (w Widget) SetChild(Widget)
- func (w Widget) SetColorHex(string)
- func (w Widget) SetComboText(string)
- func (w Widget) SetDateISO(string)
- func (w Widget) SetDefaultSize(int, int)
- func (w Widget) SetFraction(float64)
- func (w Widget) SetGroup(Widget)
- func (w Widget) SetLabel(string)
- func (w Widget) SetSelected(int)
- func (w Widget) SetSizeRequest(int, int)
- func (w Widget) SetSpinValue(float64)
- func (w Widget) SetText(string)
- func (w Widget) SetTextViewText(string)
- func (w Widget) SetTitle(string)
- func (w Widget) SetValue(float64)
- func (w Widget) SetVisibility(bool)
- func (w Widget) SetVisible(bool)
- func (w Widget) SpinValue() float64
- func (w Widget) Start()
- func (w Widget) Stop()
- func (w Widget) Text() string
- func (w Widget) TextViewText() string
- func (w Widget) Unparent()
- func (w Widget) Value() float64
Constants ¶
const ( ModShift uint = 1 << 0 ModControl uint = 1 << 2 ModAlt uint = 1 << 3 ModSuper uint = 1 << 26 )
GDK modifier-state bits, defined here too so consumer code naming them compiles off Linux.
const MemoryR8G8B8A8 = 5
MemoryR8G8B8A8 is the GdkMemoryFormat for a go-widgets RGBA frame; defined here too so consumer code naming it compiles off Linux.
Variables ¶
var ErrUnsupported = errors.New("gtk4: only available on Linux")
ErrUnsupported is returned by Init on any platform without GTK4 (everything but Linux). It is defined on every platform so a portable consumer can test for it with errors.Is.
Functions ¶
func KeyvalToUnicode ¶ added in v0.3.0
The input event controllers do nothing off Linux; a host there uses the platform's own toolkit for input.
Types ¶
type MainLoop ¶
type MainLoop uintptr
MainLoop is a GLib main loop. Off Linux it does nothing.
func MainLoopNew ¶
func MainLoopNew() MainLoop
type Picture ¶ added in v0.2.0
type Picture uintptr
Picture is a GtkPicture showing an RGBA frame. Off Linux it does nothing.
func PictureNew ¶ added in v0.2.0
func PictureNew() Picture
type Widget ¶
type Widget uintptr
Widget is a GTK widget. Off Linux no real one is ever created.
func ButtonNewWithLabel ¶
func CheckButtonNewWithLabel ¶
func DrawingAreaNew ¶ added in v0.2.0
func DrawingAreaNew() Widget
func ListBoxNew ¶ added in v0.6.0
func ListBoxNew() Widget
func ProgressNew ¶ added in v0.5.0
func ProgressNew() Widget
Widgets added for the go-widgets host backend; null/no-op/zero off Linux.
func SpinnerNew ¶ added in v0.5.0
func SpinnerNew() Widget
func TextViewNew ¶ added in v0.5.0
func TextViewNew() Widget
func ToggleButtonNewWithLabel ¶ added in v0.5.0
func WindowNew ¶
func WindowNew() Widget
The constructors return the null widget off Linux; the methods are no-ops or zero, so consumer code that names them still compiles.