gdesktop

package
v0.0.0-...-f3abbe6 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetActiveScreenCount

func GetActiveScreenCount() int

get display count

func ScreenShot

func ScreenShot(screenIndex int, lvl CompLvl) ([]byte, error)

get screenshot PNG image screenIdx is a 0-base index

Types

type CompLvl

type CompLvl int
const (
	DefaultCompression CompLvl = CompLvl(png.DefaultCompression)
	NoCompression      CompLvl = CompLvl(png.NoCompression)
	BestSpeed          CompLvl = CompLvl(png.BestSpeed)
	BestCompression    CompLvl = CompLvl(png.BestCompression)
)

type WndInfo

type WndInfo struct {
	Title    string
	Pid      uint64
	Filename string
	App      string
}

func GetActiveWindowInfo

func GetActiveWindowInfo() (WndInfo, error)

https://play.golang.org/p/YfGDtIuuBw // windows only https://gist.github.com/obonyojimmy/d6b263212a011ac7682ac738b7fb4c70 // windows only http://codegists.com/snippet/go/active-windowgo_obonyojimmy_go // windows only 此函数涉及安全性API, 需要在"安全与隐私 -> 辅助功能"中将终端或者代码父进程加入白名单

Jump to

Keyboard shortcuts

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