cursor

package
v0.0.0-...-451b853 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2021 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package cursor .

Index

Constants

View Source
const (
	BottomLeftCorner  = "bottom_left_corner"
	BottomRightCorner = "bottom_right_corner"
	BottomSide        = "bottom_side"
	Grabbing          = "grabbing"
	LeftPtr           = "left_ptr"
	LeftSide          = "left_side"
	RightSide         = "right_side"
	TopLeftCorner     = "top_left_corner"
	TopRightCorner    = "top_right_corner"
	TopSide           = "top_side"
	Xterm             = "xterm"
	Hand1             = "hand1"
	Watch             = "watch"
)

interesting cursor icons

Variables

This section is empty.

Functions

This section is empty.

Types

type Cursor

type Cursor struct {
	Name          string
	Images        []*ImageBuffer
	TotalDuration uint32
}

func (*Cursor) Destroy

func (c *Cursor) Destroy() error

func (*Cursor) FrameAndDuration

func (c *Cursor) FrameAndDuration(millis uint32) FrameAndDuration

type FrameAndDuration

type FrameAndDuration struct {
	FrameIndex    int
	FrameDuration uint32
}

type ImageBuffer

type ImageBuffer struct {
	Buffer   *wl.Buffer
	Delay    uint32
	HotspotX uint32
	HotspotY uint32
	Width    uint32
	Height   uint32
}

func NewImageBuffer

func NewImageBuffer(theme *Theme, image xcursor.Image) (*ImageBuffer, error)

func (*ImageBuffer) Destroy

func (b *ImageBuffer) Destroy() error

type MultiError

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

func (MultiError) Add

func (e MultiError) Add(err error)

func (MultiError) Err

func (e MultiError) Err() error

func (MultiError) Error

func (e MultiError) Error() string

Error returns `\n` seperated string of all errors

type Theme

type Theme struct {
	Name     string
	Cursors  []*Cursor
	Size     uint32
	Pool     *wl.ShmPool
	PoolSize int32
	File     *os.File
}

func LoadTheme

func LoadTheme(size uint32, shm *wl.Shm) (*Theme, error)

func LoadThemeFromName

func LoadThemeFromName(name string, size uint32, shm *wl.Shm) (*Theme, error)

func LoadThemeOr

func LoadThemeOr(name string, size uint32, shm *wl.Shm) (*Theme, error)

func (*Theme) Destroy

func (t *Theme) Destroy() error

func (*Theme) GetCursor

func (t *Theme) GetCursor(name string) (*Cursor, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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