Documentation
¶
Overview ¶
Package gtk is the GTK4-hosted Linux back-end: instead of blitting to a from-scratch X11/Wayland surface, GTK owns the window, the toolkit's pixel framebuffer goes in a GtkPicture, and native platform controls (toolkit.NativeControl) are real GtkEntry/GtkButton/… overlaid above it in a GtkFixed. It links no cgo — everything is github.com/go-gtk/gtk4 over purego.
It is the third native-control host, the sibling of internal/cocoa and internal/win32, and runs the same NativeControl descriptor reconcile (syncNative) they do — but here the widgets are GTK's, so a radio group finally groups properly rather than sharing one global action.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Window ¶
type Window struct {
// contains filtered or unexported fields
}
Window is the GTK4-hosted back-end window. It satisfies the window.Backend contract (Run/Close/Size/String).
func Open ¶
Open creates the GTK window (but does not enter the loop; Run does). width and height are logical points; scale is framebuffer pixels per point.
func (*Window) Run ¶
Run binds root and drives the GLib main loop until the window is closed, presenting a fresh frame every vsync from the window's frame clock.