window

package
v0.0.0-...-d956aad Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2020 License: Unlicense Imports: 22 Imported by: 0

Documentation

Overview

Package window implements platform specific windows and GPU contexts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main()

func NewWindow

func NewWindow(window Callbacks, opts *Options) error

Types

type Callbacks

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

type Context

type Context interface {
	Functions() *gl.Functions
	Present() error
	MakeCurrent() error
	Release()
	Lock()
	Unlock()
}

type Driver

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)
}

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

type FrameEvent

type FrameEvent struct {
	system.FrameEvent

	Sync bool
}

type Options

type Options struct {
	Width, Height unit.Value
	Title         string
}

Jump to

Keyboard shortcuts

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