gui

package module
v0.0.0-...-489eee2 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2022 License: Unlicense Imports: 2 Imported by: 0

README

gui

Package gui provides a basic platform-independent interface to construct graphical user interfaces.

Documentation

Overview

Package gui provides a basic portable library to construct graphical user interfaces.

The main interface is called Window, a draw.Image interface which represents a rectangular area of an underlying graphical user interface (GUI). Window can thus be manipulated like a regular draw.Image. The Window interface does not provide other regular window manipulation functions (i.e. resizing, moving) as these should be handled by the window manager. The gui library also does not support multi-window programs, as this harms portability and may lead to abuse of the capability.

Warning: package gui does not support GPUs and therefore should not be used in graphics-intensive solutions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open() (Window, Stdin, Pointer, error)

Open attempts to open a Window in the current GUI (if one exists), set up a Stdin interface, and provides access to a Pointer. Returns error as soon as one is encountered.

Types

type Pointer

type Pointer interface {
	Pos() (x, y int)
}

Pointer represents the current position of the pointing device or the last position of physical contact.

type Stdin

type Stdin interface {
	io.Reader
}

Stdin multiplexes os.Stdin and platform-specific input provided by the underlying GUI.

type Window

type Window interface {
	draw.Image
}

Window is a draw.Image that represents a rectangular area of an underlying GUI.

Jump to

Keyboard shortcuts

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