Documentation ¶
Index ¶
- type Module
- type ScreenSaver
- func (v *ScreenSaver) GetExportedMethods() dbusutil.ExportedMethods
- func (*ScreenSaver) GetInterfaceName() string
- func (ss *ScreenSaver) Inhibit(sender dbus.Sender, name, reason string) (cookie uint32, busErr *dbus.Error)
- func (ss *ScreenSaver) SetTimeout(seconds, interval uint32, blank bool) *dbus.Error
- func (ss *ScreenSaver) SimulateUserActivity() *dbus.Error
- func (ss *ScreenSaver) UnInhibit(sender dbus.Sender, cookie uint32) *dbus.Error
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 ¶
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 取消对应的抑制操作
Click to show internal directories.
Click to hide internal directories.