oak

package module
v3.0.0-cursorPosition Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2021 License: Apache-2.0 Imports: 44 Imported by: 8

README

Oak

A Pure Go game engine

Go Reference Code Coverage Mentioned in Awesome Go

Table of Contents

  1. Installation

  2. Motivation

  3. Features

  4. Support

  5. Quick Start

  6. Implementation and Examples

  7. Finished Games


Installation

go get -u github.com/oakmound/oak/v3/

Motivation

The initial version of oak was made to support Oakmound Studio's game, Agent Blue, and was developed in parallel.

Because Oak wants to have as few non-Go dependencies as possible, on as many platforms as possible, Oak does not by default use bindings involving CGo like OpenGL or GLFW.

On Pure Go

Oak has recently brought in dependencies that include C code, but we still describe the engine as a Pure Go engine, which at face value seems contradictory. Oak's goal is that, by default, a user can pull down the engine and create a fully functional game or GUI application on a machine with no C compiler installed, so when we say Pure Go we mean that, by default, the library is configured so no C compilation is required, and that no major features are locked behind C compliation.

We anticipate in the immediate future needing to introduce alternate drivers that include C dependencies for performance improvements in some scenarios, and currently we have no OSX solution that lacks objective C code.

Features and Systems

  1. Window Management
    • Windows and key events forked from shiny
    • Logical frame rate distinct from Draw rate
    • Fullscreen, Window Positioning support, etc
    • Auto-scaling for screen size changes (or dynamic content sizing)
  2. Image Rendering
    • render.Renderable interface
    • Sprite Sheet Batch Loading at startup
    • Manipulation
      • render.Modifiable interface
      • Built in Transformations and Filters
      • Some built-ins via gift
      • Extensible Modification syntax func(image.Image) *image.RGBA
    • Built in Renderable types covering common use cases
      • Sprite, Sequence, Switch, Composite
      • Primitive builders, ColorBox, Line, Bezier
      • History-tracking Reverting
    • Primarily 2D
  3. Particle System
  4. Mouse Handling
  5. Joystick Support
  6. Audio Support
    • Positional filters to pan and scale audio based on a listening position
  7. Collision
    • Collision R-Tree forked from rtreego
    • 2D Raycasting
    • Collision Spaces
      • Attachable to Objects
      • Auto React to collisions through events
      • OnHit bindings func(s1,s2 *collision.Space)
      • Start/Stop collision with targeted objects
  8. 2D Physics System
  9. Event Handler
    • PubSub system: event.CID can Bind(eventName,fn) and Trigger(eventName,payload) events
  10. Shaping
    • Convert shapes into:
      • Containment checks
      • Outlines
      • 2D arrays
  11. Custom Console Commands

Support

For discussions not significant enough to be an Issue or PR, feel free to ping us in the #oak channel on the gophers slack.

Quick Start

This is an example of the most basic oak program:

package main

import (
    "github.com/oakmound/oak/v3"
    "github.com/oakmound/oak/v3/scene"
)

func main() {
    oak.AddScene("firstScene", scene.Scene{
        Start: func(*scene.Context) {
            // ... draw entities, bind callbacks ... 
        }, 
    })
    oak.Init("firstScene")
}

See below or the examples folder for longer demos, godoc for reference documentation, and the wiki for more guided feature sets, tutorials and walkthroughs.

Implementation and Examples

Platformer Top down shooter Radar
Slideshow Bezier Curves Joysticks
Collision Demo Custom Mouse Cursor Fallback Fonts
Screen Options Multi Window Particle Demo

Games using Oak

Agent Blue Fantastic Doctor
Hiring Now: Looters Jeremy The Clam
Diamond Deck Championship

Documentation

Overview

Package oak is a game engine. It provides scene control, control over windows and what is drawn to them, propagates regular events to evaluate game logic, and so on. Oak also serves as the top level package and contains all the subdirectories that make up the Oak engine.

Example

Use oak to display a scene with a single movable character

AddScene("basicScene", scene.Scene{Start: func(*scene.Context) {
	char := entities.NewMoving(100, 100, 16, 32,
		render.NewColorBox(16, 32, color.RGBA{255, 0, 0, 255}),
		nil, 0, 0)
	render.Draw(char.R)
}})
Init("basicScene")
Output:

Index

Examples

Constants

This section is empty.

Variables

View Source
var (
	// DefaultShaker is the global default shaker, used when ShakeScreen is called.
	DefaultShaker = &ScreenShaker{false, floatgeom.Point2{1.0, 1.0}}
)

Functions

func AddCommand

func AddCommand(command string, fn func([]string)) error
Example

Use AddCommand to grant access to command line commands. Often used to toggle debug modes.

debug := true
AddCommand("SetDebug", func(args []string) {

	if len(args) == 0 {
		debug = !debug
	}
	switch args[0][:1] {
	case "t", "T":
		debug = true
	case "f", "F":
		debug = false
	}

})
Output:

func AddScene

func AddScene(name string, sc scene.Scene) error

func GetBackgroundImage

func GetBackgroundImage() image.Image

func GetCursorPosition

func GetCursorPosition() (x, y float64, err error)

func Height

func Height() int

func HideCursor

func HideCursor() error

func Init

func Init(scene string, configOptions ...ConfigOption) error

func IsDown

func IsDown(key string) bool

func IsHeld

func IsHeld(key string) (bool, time.Duration)

func ScreenShot

func ScreenShot() *image.RGBA

func SetBackground

func SetBackground(b Background)

func SetBinaryPayload

func SetBinaryPayload(payloadFn func(string) ([]byte, error), dirFn func(string) ([]string, error))

SetBinaryPayload just sets some public fields on packages that require access to binary functions as alternatives to os file functions.

func SetBorderless

func SetBorderless(bs bool) error

func SetColorBackground

func SetColorBackground(img image.Image)

func SetDown

func SetDown(key string)

func SetFullScreen

func SetFullScreen(fs bool) error

func SetLoadingRenderable

func SetLoadingRenderable(r render.Renderable)

func SetScreen

func SetScreen(x, y int)

func SetUp

func SetUp(key string)

func SetViewportBounds

func SetViewportBounds(rect intgeom.Rect2)

func ShiftScreen

func ShiftScreen(x, y int)

func Width

func Width() int

Types

type Assets

type Assets struct {
	AssetPath string `json:"assetPath"`
	AudioPath string `json:"audioPath"`
	ImagePath string `json:"imagePath"`
	FontPath  string `json:"fontPath"`
}

Assets is a json type storing paths to different asset folders

type Background

type Background interface {
	GetRGBA() *image.RGBA
}

type BatchLoadOptions

type BatchLoadOptions struct {
	BlankOutAudio    bool  `json:"blankOutAudio"`
	MaxImageFileSize int64 `json:"maxImageFileSize"`
}

BatchLoadOptions is a json type storing customizations for batch loading. These settings do not take effect unless batch load is true.

type Config

type Config struct {
	Assets              Assets           `json:"assets"`
	Debug               Debug            `json:"debug"`
	Screen              Screen           `json:"screen"`
	Font                Font             `json:"font"`
	BatchLoadOptions    BatchLoadOptions `json:"batchLoadOptions"`
	FrameRate           int              `json:"frameRate"`
	DrawFrameRate       int              `json:"drawFrameRate"`
	IdleDrawFrameRate   int              `json:"idleDrawFrameRate"`
	Language            string           `json:"language"`
	Title               string           `json:"title"`
	EventRefreshRate    Duration         `json:"refreshRate"`
	BatchLoad           bool             `json:"batchLoad"`
	GestureSupport      bool             `json:"gestureSupport"`
	LoadBuiltinCommands bool             `json:"loadBuiltinCommands"`
	TrackInputChanges   bool             `json:"trackInputChanges"`
	EnableDebugConsole  bool             `json:"enableDebugConsole"`
	TopMost             bool             `json:"topmost"`
	Borderless          bool             `json:"borderless"`
	Fullscreen          bool             `json:"fullscreen"`
}

Config stores initialization settings for oak.

func NewConfig

func NewConfig(opts ...ConfigOption) (Config, error)

type ConfigOption

type ConfigOption func(Config) (Config, error)

func FileConfig

func FileConfig(filePath string) ConfigOption

LoadConf loads a config file, that could exist inside oak's binary data storage (see fileutil), to SetupConfig

func ReaderConfig

func ReaderConfig(r io.Reader) ConfigOption

type Controller

type Controller struct {
	key.State

	// ScreenWidth is the width of the screen
	ScreenWidth int
	// ScreenHeight is the height of the screen
	ScreenHeight int

	// FrameRate is the current logical frame rate.
	// Changing this won't directly effect frame rate, that
	// requires changing the LogicTicker, but it will take
	// effect next scene
	FrameRate int

	// DrawFrameRate is the equivalent to FrameRate for
	// the rate at which the screen is drawn.
	DrawFrameRate int

	// IdleDrawFrameRate is how often the screen will be redrawn
	// when the window is out of focus.
	IdleDrawFrameRate int

	// DrawTicker is the parallel to LogicTicker to set the draw framerate
	DrawTicker *timing.DynamicTicker

	// SceneMap is a global map of scenes referred to when scenes advance to
	// determine what the next scene should be.
	// It can be replaced or modified so long as these modifications happen
	// during a scene or before the controller has started.
	SceneMap *scene.Map

	// Driver is the driver oak will call during initialization
	Driver Driver

	// LoadingR is a renderable that is displayed during loading screens.
	LoadingR render.Renderable

	// ErrorScene is a scene string that will be entered if the scene handler
	// fails to enter some other scene, for example, because it's name was
	// undefined in the scene map. If the scene map does not have ErrorScene
	// as well, it will fall back to panicking.
	ErrorScene string

	CallerMap     *event.CallerMap
	MouseTree     *collision.Tree
	CollisionTree *collision.Tree
	DrawStack     *render.DrawStack

	// LastMouseEvent is the last triggered mouse event,
	// tracked for continuous mouse responsiveness on events
	// that don't take in a mouse event
	LastMouseEvent mouse.Event

	// LastPress is the last triggered mouse event,
	// where the mouse event was a press.
	// If TrackMouseClicks is set to false then this will not be tracked
	LastMousePress mouse.Event

	FirstSceneInput interface{}

	ControllerID int32

	TrackMouseClicks bool

	// UseAspectRatio determines whether new window changes will distort or
	// maintain the relative width to height ratio of the screen buffer.
	UseAspectRatio bool
	// contains filtered or unexported fields
}

func NewController

func NewController() *Controller

func (*Controller) AddCommand

func (c *Controller) AddCommand(s string, fn func([]string)) error

AddCommand adds a console command to call fn when '<s> <args>' is input to the console. fn will be called with args split on whitespace.

func (*Controller) AddScene

func (c *Controller) AddScene(name string, s scene.Scene) error

AddScene is shorthand for oak.SceneMap.AddScene

func (*Controller) ChangeWindow

func (c *Controller) ChangeWindow(width, height int)

ChangeWindow sets the width and height of the game window. Although exported, calling it without a size event will probably not act as expected.

func (*Controller) ClearCommand

func (c *Controller) ClearCommand(s string)

ClearCommand clears an existing debug command by key: <s>

func (*Controller) ClearScreenFilter

func (c *Controller) ClearScreenFilter()

ClearScreenFilter resets the draw function to no longer filter the screen before publishing it to the window.

func (*Controller) ForceAddCommand

func (c *Controller) ForceAddCommand(s string, fn func([]string))

ForceAddCommand adds or overwrites a console command to call fn when '<s> <args>' is input to the console. fn will be called with args split on whitespace.

func (*Controller) GetBackgroundImage

func (c *Controller) GetBackgroundImage() image.Image

func (*Controller) GetCursorPosition

func (c *Controller) GetCursorPosition() (x, y float64, err error)

func (*Controller) GetDebugKeys

func (c *Controller) GetDebugKeys() []string

GetDebugKeys returns the current debug console commands as a string array

func (*Controller) GetScreen

func (c *Controller) GetScreen() *image.RGBA

GetScreen returns the current screen as an rgba buffer

func (*Controller) GetViewportBounds

func (c *Controller) GetViewportBounds() (rect intgeom.Rect2, ok bool)

GetViewportBounds reports what bounds the viewport has been set to, if any.

func (*Controller) GoToScene

func (c *Controller) GoToScene(nextScene string)

func (*Controller) Height

func (c *Controller) Height() int

func (*Controller) HideCursor

func (c *Controller) HideCursor() error

func (*Controller) InFocus

func (c *Controller) InFocus() bool

func (*Controller) Init

func (c *Controller) Init(firstScene string, configOptions ...ConfigOption) error

Init initializes the oak engine. It spawns off an event loop of several goroutines and loops through scenes after initialization.

func (*Controller) MoveWindow

func (c *Controller) MoveWindow(x, y, w, h int) error

MoveWindow sets the position of a window to be x,y and it's dimensions to w,h If the window does not support being positioned, it will report as such.

func (*Controller) NextScene

func (c *Controller) NextScene()

func (*Controller) Propagate

func (c *Controller) Propagate(eventName string, me mouse.Event)

Propagate triggers direct mouse events on entities which are clicked

func (*Controller) Quit

func (c *Controller) Quit()

Quit sends a signal to the window to close itself, ending oak.

func (*Controller) RecordGIF

func (c *Controller) RecordGIF(hundredths int) (stop func() *gif.GIF)

RecordGIF will start recording frames via screen shots with the given time delay (in 1/100ths of a second) between frames. When the returned stop function is called, the frames will be compiled into a gif.

func (*Controller) RemoveViewportBounds

func (c *Controller) RemoveViewportBounds()

RemoveViewportBounds removes restrictions on the viewport's movement. It will not cause the viewport to update immediately.

func (*Controller) ResetCommands

func (c *Controller) ResetCommands()

ResetCommands will throw out all existing debug commands from the debug console.

func (*Controller) RunCommand

func (c *Controller) RunCommand(cmd string, args ...string) error

RunCommand runs a command added with AddCommand. It's intended use is making it easier to alias commands/subcommands. It returns an error if the command doesn't exist.

func (*Controller) ScreenShot

func (c *Controller) ScreenShot() *image.RGBA

ScreenShot takes a snap shot of the window's image content. ScreenShot is not safe to call while an existing ScreenShot call has yet to finish executing. This could change in the future.

func (*Controller) SetAspectRatio

func (c *Controller) SetAspectRatio(xToY float64)

SetAspectRatio will enforce that the displayed window does not distort the input screen away from the given x:y ratio. The screen will not use these settings until a new size event is received from the OS.

func (*Controller) SetBackground

func (c *Controller) SetBackground(b Background)

func (*Controller) SetBorderless

func (c *Controller) SetBorderless(on bool) error

SetBorderless attempts to set the local oak window to have no border. If the window does not support this functionaltiy, it will report as such.

func (*Controller) SetColorBackground

func (c *Controller) SetColorBackground(img image.Image)

func (*Controller) SetFullScreen

func (c *Controller) SetFullScreen(on bool) error

SetFullScreen attempts to set the local oak window to be full screen. If the window does not support this functionality, it will report as such.

func (*Controller) SetLoadingRenderable

func (c *Controller) SetLoadingRenderable(r render.Renderable)

func (*Controller) SetLogicHandler

func (c *Controller) SetLogicHandler(h event.Handler)

SetLogicHandler swaps the logic system of the engine with some other implementation. If this is never called, it will use event.DefaultBus

func (*Controller) SetPalette

func (c *Controller) SetPalette(palette color.Palette)

SetPalette tells oak to conform the screen to the input color palette before drawing.

func (*Controller) SetScreen

func (c *Controller) SetScreen(x, y int)

SetScreen positions the viewport to be at x,y

func (*Controller) SetScreenFilter

func (c *Controller) SetScreenFilter(screenFilter mod.Filter)

SetScreenFilter will filter the screen by the given modification function prior to publishing the screen's rgba to be displayed.

func (*Controller) SetTitle

func (c *Controller) SetTitle(title string) error

func (*Controller) SetTopMost

func (c *Controller) SetTopMost(on bool) error

SetTopMost attempts to set the local oak window to stay on top of other windows. If the window does not support this functionality, it will report as such.

func (*Controller) SetTrayIcon

func (c *Controller) SetTrayIcon(icon string) error

func (*Controller) SetViewportBounds

func (c *Controller) SetViewportBounds(rect intgeom.Rect2)

SetViewportBounds sets the minimum and maximum position of the viewport, including screen dimensions

func (*Controller) Shake

func (c *Controller) Shake(ss *ScreenShaker, dur time.Duration)

Shake shakes the screen based on this ScreenShaker's attributes. See DefaultShaker for an example shaker setup

func (*Controller) ShakeScreen

func (c *Controller) ShakeScreen(dur time.Duration)

ShakeScreen will Shake using the package global DefaultShaker

func (*Controller) ShiftScreen

func (c *Controller) ShiftScreen(x, y int)

ShiftScreen shifts the viewport by x,y

func (*Controller) ShowNotification

func (c *Controller) ShowNotification(title, msg string, icon bool) error

func (*Controller) TriggerKeyDown

func (c *Controller) TriggerKeyDown(e okey.Event)

TriggerKeyDown triggers a software-emulated keypress. This should be used cautiously when the keyboard is in use. From the perspective of the event handler this is indistinguishable from a real keypress.

func (*Controller) TriggerKeyHeld

func (c *Controller) TriggerKeyHeld(e okey.Event)

TriggerKeyHeld triggers a software-emulated key hold signal. This should be used cautiously when the keyboard is in use. From the perspective of the event handler this is indistinguishable from a real key hold signal.

func (*Controller) TriggerKeyUp

func (c *Controller) TriggerKeyUp(e okey.Event)

TriggerKeyUp triggers a software-emulated key release. This should be used cautiously when the keyboard is in use. From the perspective of the event handler this is indistinguishable from a real key release.

func (*Controller) TriggerMouseEvent

func (c *Controller) TriggerMouseEvent(mevent omouse.Event)

TriggerMouseEvent triggers a software-emulated mouse event. This should be used cautiously when the mouse is in use. From the perspective of the event handler this is indistinguishable from a real key mouse press or movement.

func (*Controller) UpdateViewSize

func (c *Controller) UpdateViewSize(width, height int) error

func (*Controller) Viewport

func (c *Controller) Viewport() intgeom.Point2

func (*Controller) ViewportBounds

func (c *Controller) ViewportBounds() intgeom.Rect2

func (*Controller) Width

func (c *Controller) Width() int

type Debug

type Debug struct {
	Filter string `json:"filter"`
	Level  string `json:"level"`
}

Debug is a json type storing the starting debug filter and level

type Driver

type Driver func(f func(screen.Screen))

A Driver is a function which can take in our lifecycle function and initialize oak with the OS interfaces it needs.

type Duration

type Duration time.Duration

A Duration is a wrapper around time.Duration that allows for easier json formatting.

func (Duration) MarshalJSON

func (d Duration) MarshalJSON() ([]byte, error)

func (*Duration) UnmarshalJSON

func (d *Duration) UnmarshalJSON(b []byte) error

type Font

type Font struct {
	Hinting string  `json:"hinting"`
	Size    float64 `json:"size"`
	DPI     float64 `json:"dpi"`
	File    string  `json:"file"`
	Color   string  `json:"color"`
}

Font is a json type storing the default font settings

type InputType

type InputType = int32

InputType expresses some form of input to the engine to represent a player

const (
	KeyboardMouse InputType = iota
	Joystick      InputType = iota
)

Supported Input Types

var (
	// MostRecentInput tracks what input type was most recently detected.
	// This is only updated if TrackInputChanges is true in the config at startup
	// TODO: scope this to controllers
	MostRecentInput InputType
)

type Screen

type Screen struct {
	X      int `json:"X"`
	Y      int `json:"Y"`
	Height int `json:"height"`
	Width  int `json:"width"`
	Scale  int `json:"scale"`
	// Target sets the expected dimensions of the monitor the game will be opened on, in pixels.
	// If Fullscreen is false, then a scaling will be applied to correct the game screen size to be
	// appropriate for the Target size. If no TargetWidth or Height is provided, scaling will not
	// be adjusted.
	TargetWidth  int `json:"targetHeight"`
	TargetHeight int `json:"targetWidth"`
}

Screen is a json type storing the starting screen width and height

type ScreenShaker

type ScreenShaker struct {
	Random    bool
	Magnitude floatgeom.Point2
}

A ScreenShaker knows how to shake a screen by a (or up to a) given magnitude. If Random is true, the Shaker will shake up to the (negative or positive) magnitude of each the X and Y axes. Otherwise, it will oscillate between negative magnitude and positive magnitude.

Directories

Path Synopsis
alg
Package alg stores useful algorithms and math functions
Package alg stores useful algorithms and math functions
floatgeom
Package floatgeom stores primitives for floating point geometry
Package floatgeom stores primitives for floating point geometry
intgeom
Package intgeom stores primitives for integer geometry
Package intgeom stores primitives for integer geometry
range/colorrange
Package colorrange holds distributions that accept and return color.Colors
Package colorrange holds distributions that accept and return color.Colors
range/floatrange
Package floatrange holds distributions that accept and return float64s
Package floatrange holds distributions that accept and return float64s
range/intrange
Package intrange holds distributions that return ints
Package intrange holds distributions that return ints
Package audio provides audio types, font types for filtering audio reactively, and channels to allow constant audio play signals to be restricted to play at variable frequencies.
Package audio provides audio types, font types for filtering audio reactively, and channels to allow constant audio play signals to be restricted to play at variable frequencies.
Package collision provides collision tree and space structures along with hit detection functions on spaces.
Package collision provides collision tree and space structures along with hit detection functions on spaces.
ray
Package ray holds utilities for performing iterative collision checks or raycasts
Package ray holds utilities for performing iterative collision checks or raycasts
Package dlog provides logging functions with caller file and line information, logging levels and level and text filters.
Package dlog provides logging functions with caller file and line information, logging levels and level and text filters.
Package entities stores useful object and entity types, such as positions and renderables, collision spaces and renderables, and delta / speed vectors built into the above types.
Package entities stores useful object and entity types, such as positions and renderables, collision spaces and renderables, and delta / speed vectors built into the above types.
Package event propagates events through entities with given caller IDs.
Package event propagates events through entities with given caller IDs.
examples
Package fileutil provides functionality to subvert os and ioutil calls when needed for particular operating systems (js) or runtimes (asset data packaged into a binary)
Package fileutil provides functionality to subvert os and ioutil calls when needed for particular operating systems (js) or runtimes (asset data packaged into a binary)
Package joystick provides utilities for querying and reacting to joystick or gamepad inputs.
Package joystick provides utilities for querying and reacting to joystick or gamepad inputs.
Package key enumerates keystrings for use in bindings
Package key enumerates keystrings for use in bindings
Package mouse handles the propagation of mouse events though clickable regions.
Package mouse handles the propagation of mouse events though clickable regions.
Package oakerr stores errors returned throughout oak.
Package oakerr stores errors returned throughout oak.
Package physics provides vector types and operations to perform math and simple physics on those types.
Package physics provides vector types and operations to perform math and simple physics on those types.
Package render provides several types of renderable entities which are used throughout the code base In addition to entities the package also provides utilities to load images from files and load images from parts of files as well as draw them.
Package render provides several types of renderable entities which are used throughout the code base In addition to entities the package also provides utilities to load images from files and load images from parts of files as well as draw them.
mod
Package mod stores modification functions for images
Package mod stores modification functions for images
particle
Package particle provides options for generating renderable particle sources.
Package particle provides options for generating renderable particle sources.
Package scene stores definitions for interacting with game loop scenes
Package scene stores definitions for interacting with game loop scenes
Package shape provides types to satisfy the Shape interface, which allows for containment and outline checks on two dimensional shapes.
Package shape provides types to satisfy the Shape interface, which allows for containment and outline checks on two dimensional shapes.
shiny
driver
Package driver exposes screen implementation for various platforms Package driver provides the default driver for accessing a screen.
Package driver exposes screen implementation for various platforms Package driver provides the default driver for accessing a screen.
driver/gldriver
Package gldriver provides an OpenGL driver for accessing a screen.
Package gldriver provides an OpenGL driver for accessing a screen.
driver/internal/drawer
Package drawer provides functions that help implement screen.Drawer methods.
Package drawer provides functions that help implement screen.Drawer methods.
driver/internal/errscreen
Package errscreen provides a stub Screen implementation.
Package errscreen provides a stub Screen implementation.
driver/internal/event
Package event provides an infinitely buffered double-ended queue of events.
Package event provides an infinitely buffered double-ended queue of events.
driver/internal/lifecycler
Package lifecycler tracks a window's lifecycle state.
Package lifecycler tracks a window's lifecycle state.
driver/internal/swizzle
Package swizzle provides functions for converting between RGBA pixel formats.
Package swizzle provides functions for converting between RGBA pixel formats.
driver/internal/x11key
Package x11key contains X11 numeric codes for the keyboard and mouse.
Package x11key contains X11 numeric codes for the keyboard and mouse.
driver/mtldriver
Package mtldriver provides a Metal driver for accessing a screen.
Package mtldriver provides a Metal driver for accessing a screen.
driver/mtldriver/internal/appkit
Package appkit provides access to Apple's AppKit API (https://developer.apple.com/documentation/appkit).
Package appkit provides access to Apple's AppKit API (https://developer.apple.com/documentation/appkit).
driver/mtldriver/internal/coreanim
Package coreanim provides access to Apple's Core Animation API (https://developer.apple.com/documentation/quartzcore).
Package coreanim provides access to Apple's Core Animation API (https://developer.apple.com/documentation/quartzcore).
driver/windriver
Package windriver provides the Windows driver for accessing a screen.
Package windriver provides the Windows driver for accessing a screen.
driver/x11driver
Package x11driver provides the X11 driver for accessing a screen.
Package x11driver provides the X11 driver for accessing a screen.
gesture
Package gesture provides gesture events such as long presses and drags.
Package gesture provides gesture events such as long presses and drags.
screen
Package screen provides interfaces for portable two-dimensional graphics and input events.
Package screen provides interfaces for portable two-dimensional graphics and input events.
Package timing provides utilities for time
Package timing provides utilities for time

Jump to

Keyboard shortcuts

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