Documentation
¶
Overview ¶
Package dpms is the X client API for the DPMS extension.
Index ¶
Constants ¶
const ( DPMSModeOn = 0 DPMSModeStandby = 1 DPMSModeSuspend = 2 DPMSModeOff = 3 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CapableCookie ¶
CapableCookie is a cookie used only for Capable requests.
func Capable ¶
func Capable(c *xgb.Conn) CapableCookie
Capable sends a checked request. If an error occurs, it will be returned with the reply by calling CapableCookie.Reply()
func CapableUnchecked ¶
func CapableUnchecked(c *xgb.Conn) CapableCookie
CapableUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func (CapableCookie) Reply ¶
func (cook CapableCookie) Reply() (*CapableReply, error)
Reply blocks and returns the reply data for a Capable request.
type CapableReply ¶
type CapableReply struct { Sequence uint16 // sequence number of the request for this reply Length uint32 // number of bytes in this reply // padding: 1 bytes Capable bool }
CapableReply represents the data returned from a Capable request.
type DisableCookie ¶
DisableCookie is a cookie used only for Disable requests.
func Disable ¶
func Disable(c *xgb.Conn) DisableCookie
Disable sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func DisableChecked ¶
func DisableChecked(c *xgb.Conn) DisableCookie
DisableChecked sends a checked request. If an error occurs, it can be retrieved using DisableCookie.Check()
func (DisableCookie) Check ¶
func (cook DisableCookie) Check() error
Check returns an error if one occurred for checked requests that are not expecting a reply. This cannot be called for requests expecting a reply, nor for unchecked requests.
type EnableCookie ¶
EnableCookie is a cookie used only for Enable requests.
func Enable ¶
func Enable(c *xgb.Conn) EnableCookie
Enable sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func EnableChecked ¶
func EnableChecked(c *xgb.Conn) EnableCookie
EnableChecked sends a checked request. If an error occurs, it can be retrieved using EnableCookie.Check()
func (EnableCookie) Check ¶
func (cook EnableCookie) Check() error
Check returns an error if one occurred for checked requests that are not expecting a reply. This cannot be called for requests expecting a reply, nor for unchecked requests.
type ForceLevelCookie ¶
ForceLevelCookie is a cookie used only for ForceLevel requests.
func ForceLevel ¶
func ForceLevel(c *xgb.Conn, PowerLevel uint16) ForceLevelCookie
ForceLevel sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func ForceLevelChecked ¶
func ForceLevelChecked(c *xgb.Conn, PowerLevel uint16) ForceLevelCookie
ForceLevelChecked sends a checked request. If an error occurs, it can be retrieved using ForceLevelCookie.Check()
func (ForceLevelCookie) Check ¶
func (cook ForceLevelCookie) Check() error
Check returns an error if one occurred for checked requests that are not expecting a reply. This cannot be called for requests expecting a reply, nor for unchecked requests.
type GetTimeoutsCookie ¶
GetTimeoutsCookie is a cookie used only for GetTimeouts requests.
func GetTimeouts ¶
func GetTimeouts(c *xgb.Conn) GetTimeoutsCookie
GetTimeouts sends a checked request. If an error occurs, it will be returned with the reply by calling GetTimeoutsCookie.Reply()
func GetTimeoutsUnchecked ¶
func GetTimeoutsUnchecked(c *xgb.Conn) GetTimeoutsCookie
GetTimeoutsUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func (GetTimeoutsCookie) Reply ¶
func (cook GetTimeoutsCookie) Reply() (*GetTimeoutsReply, error)
Reply blocks and returns the reply data for a GetTimeouts request.
type GetTimeoutsReply ¶
type GetTimeoutsReply struct { Sequence uint16 // sequence number of the request for this reply Length uint32 // number of bytes in this reply // padding: 1 bytes StandbyTimeout uint16 SuspendTimeout uint16 OffTimeout uint16 }
GetTimeoutsReply represents the data returned from a GetTimeouts request.
type GetVersionCookie ¶
GetVersionCookie is a cookie used only for GetVersion requests.
func GetVersion ¶
func GetVersion(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) GetVersionCookie
GetVersion sends a checked request. If an error occurs, it will be returned with the reply by calling GetVersionCookie.Reply()
func GetVersionUnchecked ¶
func GetVersionUnchecked(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) GetVersionCookie
GetVersionUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func (GetVersionCookie) Reply ¶
func (cook GetVersionCookie) Reply() (*GetVersionReply, error)
Reply blocks and returns the reply data for a GetVersion request.
type GetVersionReply ¶
type GetVersionReply struct { Sequence uint16 // sequence number of the request for this reply Length uint32 // number of bytes in this reply // padding: 1 bytes ServerMajorVersion uint16 ServerMinorVersion uint16 }
GetVersionReply represents the data returned from a GetVersion request.
type InfoCookie ¶
InfoCookie is a cookie used only for Info requests.
func Info ¶
func Info(c *xgb.Conn) InfoCookie
Info sends a checked request. If an error occurs, it will be returned with the reply by calling InfoCookie.Reply()
func InfoUnchecked ¶
func InfoUnchecked(c *xgb.Conn) InfoCookie
InfoUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func (InfoCookie) Reply ¶
func (cook InfoCookie) Reply() (*InfoReply, error)
Reply blocks and returns the reply data for a Info request.
type InfoReply ¶
type InfoReply struct { Sequence uint16 // sequence number of the request for this reply Length uint32 // number of bytes in this reply // padding: 1 bytes PowerLevel uint16 State bool }
InfoReply represents the data returned from a Info request.
type SetTimeoutsCookie ¶
SetTimeoutsCookie is a cookie used only for SetTimeouts requests.
func SetTimeouts ¶
func SetTimeouts(c *xgb.Conn, StandbyTimeout uint16, SuspendTimeout uint16, OffTimeout uint16) SetTimeoutsCookie
SetTimeouts sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SetTimeoutsChecked ¶
func SetTimeoutsChecked(c *xgb.Conn, StandbyTimeout uint16, SuspendTimeout uint16, OffTimeout uint16) SetTimeoutsCookie
SetTimeoutsChecked sends a checked request. If an error occurs, it can be retrieved using SetTimeoutsCookie.Check()
func (SetTimeoutsCookie) Check ¶
func (cook SetTimeoutsCookie) Check() error
Check returns an error if one occurred for checked requests that are not expecting a reply. This cannot be called for requests expecting a reply, nor for unchecked requests.