gioui.org: gioui.org/app/internal/window Index | Files

package window

import "gioui.org/app/internal/window"

Package window implements platform specific windows and GPU contexts.

Index

Package Files

egl_wayland.go egl_x11.go os_unix.go os_wayland.go os_x11.go window.go

Variables

var ErrDeviceLost = errors.New("GPU device lost")

ErrDeviceLost is returned from Context.Present when the underlying GPU device is gone and should be recreated.

func Main Uses

func Main()

func NewWindow Uses

func NewWindow(window Callbacks, opts *Options) error

type Callbacks Uses

type Callbacks interface {
    SetDriver(d Driver)
    Event(e event.Event)
}

type Context Uses

type Context interface {
    Backend() (backend.Device, error)
    Present() error
    MakeCurrent() error
    Release()
    Lock()
    Unlock()
}

type Driver Uses

type Driver interface {
    // SetAnimating sets the animation flag. When the window is animating,
    // FrameEvents are delivered as fast as the display can handle them.
    SetAnimating(anim bool)
    // ShowTextInput updates the virtual keyboard state.
    ShowTextInput(show bool)
    NewContext() (Context, error)

    // ReadClipboard requests the clipboard content.
    ReadClipboard()
    // WriteClipboard requests a clipboard write.
    WriteClipboard(s string)

    // Close the window.
    Close()
}

Driver is the interface for the platform implementation of a window.

type FrameEvent Uses

type FrameEvent struct {
    system.FrameEvent

    Sync bool
}

type Options Uses

type Options struct {
    Width, Height       unit.Value
    MinWidth, MinHeight unit.Value
    MaxWidth, MaxHeight unit.Value
    Title               string
}

Package window imports 26 packages (graph) and is imported by 3 packages. Updated 2020-11-26. Refresh now. Tools for package owners.