screensaver

package
v0.0.0-...-520a03a Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2021 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

type Module struct {
	*loader.ModuleBase
	// contains filtered or unexported fields
}

func (*Module) GetDependencies

func (m *Module) GetDependencies() []string

func (*Module) Start

func (m *Module) Start() error

func (*Module) Stop

func (m *Module) Stop() error

func (*Module) WaitEnable

func (m *Module) WaitEnable()

type ScreenSaver

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

func (*ScreenSaver) GetExportedMethods

func (v *ScreenSaver) GetExportedMethods() dbusutil.ExportedMethods

func (*ScreenSaver) GetInterfaceName

func (*ScreenSaver) GetInterfaceName() string

func (*ScreenSaver) Inhibit

func (ss *ScreenSaver) Inhibit(sender dbus.Sender, name, reason string) (cookie uint32,
	busErr *dbus.Error)

抑制 Idle 计时器,不再检测系统是否空闲,然后返回一个 id,用来取消此操作。

name: 抑制 Idle 计时器的程序名称

reason: 抑制原因

cookie: 此次操作对应的 id,用来取消抑制

func (*ScreenSaver) SetTimeout

func (ss *ScreenSaver) SetTimeout(seconds, interval uint32, blank bool) *dbus.Error

设置 Idle 的定时器超时时间

seconds: 超时时间,以秒为单位

interval: 屏保模式下,背景更换的间隔时间

blank: 是否黑屏,此参数暂时无效

func (*ScreenSaver) SimulateUserActivity

func (ss *ScreenSaver) SimulateUserActivity() *dbus.Error

模拟用户操作,让系统处于使用状态,重新开始 Idle 定时器

func (*ScreenSaver) UnInhibit

func (ss *ScreenSaver) UnInhibit(sender dbus.Sender, cookie uint32) *dbus.Error

根据 id 取消对应的抑制操作

Jump to

Keyboard shortcuts

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