ui

package
v0.0.0-...-b06f57e Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2018 License: BSD-2-Clause Imports: 13 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TempFile

func TempFile(size int64) (*os.File, error)

Types

type BGRA

type BGRA struct {
	Pix    []uint8
	Stride int
	Rect   image.Rectangle
}

BGRA is like RGBA but in wayland's byte order

func NewBGRA

func NewBGRA(r image.Rectangle) *BGRA

NewBGRA returns a new BGRA image with the given bounds.

func NewBGRAWithData

func NewBGRAWithData(r image.Rectangle, data []uint8) *BGRA

func (*BGRA) At

func (p *BGRA) At(x, y int) color.Color

func (*BGRA) Bounds

func (p *BGRA) Bounds() image.Rectangle

func (*BGRA) ColorModel

func (p *BGRA) ColorModel() color.Model

func (*BGRA) Opaque

func (p *BGRA) Opaque() bool

Opaque scans the entire image and reports whether it is fully opaque.

func (*BGRA) Painter

func (p *BGRA) Painter() *BGRAPainter

func (*BGRA) PixOffset

func (p *BGRA) PixOffset(x, y int) int

PixOffset returns the index of the first element of Pix that corresponds to the pixel at (x, y).

func (*BGRA) RGBAAt

func (p *BGRA) RGBAAt(x, y int) color.RGBA

func (*BGRA) Set

func (p *BGRA) Set(x, y int, c color.Color)

func (*BGRA) SetRGBA

func (p *BGRA) SetRGBA(x, y int, c color.RGBA)

func (*BGRA) SubImage

func (p *BGRA) SubImage(r image.Rectangle) image.Image

SubImage returns an image representing the portion of the image p visible through r. The returned value shares pixels with the original image.

type BGRAPainter

type BGRAPainter struct {
	// contains filtered or unexported fields
}

a BGRAPainter is used to interface with the freetype renderer and raster library

func (*BGRAPainter) Paint

func (p *BGRAPainter) Paint(spans []raster.Span, done bool)

func (*BGRAPainter) SetColor

func (p *BGRAPainter) SetColor(c color.Color)

type Config

type Config struct {
	Width  int
	Height int
	Active bool
}

type Display

type Display struct {
	// contains filtered or unexported fields
}

func Connect

func Connect(addr string) (*Display, error)

func (*Display) Context

func (d *Display) Context() *wl.Context

func (*Display) Disconnect

func (d *Display) Disconnect()

func (*Display) Dispatch

func (d *Display) Dispatch() chan<- struct{}

func (*Display) FindWindow

func (d *Display) FindWindow() *Window

TODO

func (*Display) HandleDisplayError

func (d *Display) HandleDisplayError(ev wl.DisplayErrorEvent)

func (*Display) HandleWmBasePing

func (d *Display) HandleWmBasePing(ev xdg.WmBasePingEvent)

func (*Display) Keyboard

func (d *Display) Keyboard() *wl.Keyboard

func (*Display) NewWindow

func (d *Display) NewWindow(width, height int32) (*Window, error)

func (*Display) Pointer

func (d *Display) Pointer() *wl.Pointer

func (*Display) Touch

func (d *Display) Touch() *wl.Touch

type Window

type Window struct {
	// contains filtered or unexported fields
}

func (*Window) Dispose

func (w *Window) Dispose()

func (*Window) Draw

func (w *Window) Draw(img image.Image)

func (*Window) DrawUsingFunc

func (w *Window) DrawUsingFunc(fn func(*BGRA))

func (*Window) HandleShellSurfacePing

func (w *Window) HandleShellSurfacePing(ev wl.ShellSurfacePingEvent)

func (*Window) HandleSurfaceConfigure

func (w *Window) HandleSurfaceConfigure(ev xdg.SurfaceConfigureEvent)

func (*Window) HandleToplevelClose

func (w *Window) HandleToplevelClose(ev xdg.ToplevelCloseEvent)

the compositor wants the surface to be closed, based on user action

func (*Window) HandleToplevelConfigure

func (w *Window) HandleToplevelConfigure(ev xdg.ToplevelConfigureEvent)

Directories

Path Synopsis
examples
img

Jump to

Keyboard shortcuts

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