gocursor

package module
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

README

GoCursor

Go Reference go-mod Go Report Card

GoCursor is a project that provides Cursor Image capture.

Supported system

  • Linux(x11)
  • Windows
  • macOS

How to use

cursor_test.go is a good example.

After being familiar, you could go to Go Reference to view high-level usage.

Thanks

lwch/rdesktop

linuxdeepin/go-x11-client

FyshOS/fynedesk

TigerVNC/tigervnc

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NewPlatformImplError = errors.New("platform impl new() error")
	InstanceUsableError  = errors.New("instance not usable")
	CaptureError         = errors.New("cursor capture error")
	FreeError            = errors.New("instance has been freed")
	CaptureUnknownError  = errors.New("cursor unknown capture error, please check platformImpl for debugging")
)

Errors

Functions

func CaptureCursor

func CaptureCursor() (img *image.RGBA, err error)

CaptureCursor 快速使用默认配置捕获鼠标指针图像

Types

type Cursor

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

func New

func New() (*Cursor, error)

New 使用默认配置创建实例

func NewWithConfig

func NewWithConfig(config platformImpl.ImplConfig) (*Cursor, error)

NewWithConfig 使用自定义配置创建实例

func (*Cursor) Capture

func (c *Cursor) Capture() (*image.RGBA, error)

Capture 使用默认配置捕捉鼠标指针图像

func (*Cursor) CaptureWithConfig

func (c *Cursor) CaptureWithConfig(config platformImpl.ImplCursorConfig) (*image.RGBA, error)

CaptureWithConfig 使用自定义配置捕捉鼠标指针图像

func (*Cursor) Free

func (c *Cursor) Free() error

Free 释放实例

func (*Cursor) PlatformStatus

func (c *Cursor) PlatformStatus() interface{}

PlatformStatus 获取实例的平台状态

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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