Documentation
¶
Index ¶
- Constants
- Variables
- func IdleAdd(func())
- func Init() (bool, error)
- func TextureFromRGBA([]byte, int, int) uintptr
- type MainLoop
- type Picture
- type Widget
- func (w Widget) Active() bool
- func (w Widget) AddTickCallback(func() bool) uint64
- func (w Widget) Connect(string, func()) uint64
- func (f Widget) Move(Widget, float64, float64)
- func (w Widget) Present()
- func (f Widget) Put(Widget, float64, float64)
- func (w Widget) QueueDraw()
- func (w Widget) SetActive(bool)
- func (w Widget) SetChild(Widget)
- func (w Widget) SetDefaultSize(int, int)
- func (w Widget) SetLabel(string)
- func (w Widget) SetSizeRequest(int, int)
- func (w Widget) SetText(string)
- func (w Widget) SetTitle(string)
- func (w Widget) SetVisibility(bool)
- func (w Widget) SetVisible(bool)
- func (w Widget) Text() string
- func (w Widget) Unparent()
Constants ¶
View Source
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 ¶
View Source
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 ¶
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 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.
func (Widget) AddTickCallback ¶ added in v0.2.4
func (Widget) SetDefaultSize ¶
func (Widget) SetSizeRequest ¶
func (Widget) SetVisibility ¶
func (Widget) SetVisible ¶
Click to show internal directories.
Click to hide internal directories.