const ( DPMSModeOn = 0 DPMSModeStandby = 1 DPMSModeSuspend = 2 DPMSModeOff = 3 )
func Init(c *xgb.Conn) error
Init must be called before using the DPMS extension.
CapableCookie is a cookie used only for Capable requests.
type CapableCookie struct { *xgb.Cookie }
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(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 (cook CapableCookie) Reply() (*CapableReply, error)
Reply blocks and returns the reply data for a Capable request.
CapableReply represents the data returned from a Capable request.
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 }
DisableCookie is a cookie used only for Disable requests.
type DisableCookie struct { *xgb.Cookie }
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(c *xgb.Conn) DisableCookie
DisableChecked sends a checked request. If an error occurs, it can be retrieved using 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.
EnableCookie is a cookie used only for Enable requests.
type EnableCookie struct { *xgb.Cookie }
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(c *xgb.Conn) EnableCookie
EnableChecked sends a checked request. If an error occurs, it can be retrieved using 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.
ForceLevelCookie is a cookie used only for ForceLevel requests.
type ForceLevelCookie struct { *xgb.Cookie }
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(c *xgb.Conn, PowerLevel uint16) ForceLevelCookie
ForceLevelChecked sends a checked request. If an error occurs, it can be retrieved using 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.
GetTimeoutsCookie is a cookie used only for GetTimeouts requests.
type GetTimeoutsCookie struct { *xgb.Cookie }
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(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 (cook GetTimeoutsCookie) Reply() (*GetTimeoutsReply, error)
Reply blocks and returns the reply data for a GetTimeouts request.
GetTimeoutsReply represents the data returned from a GetTimeouts request.
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 }
GetVersionCookie is a cookie used only for GetVersion requests.
type GetVersionCookie struct { *xgb.Cookie }
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(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 (cook GetVersionCookie) Reply() (*GetVersionReply, error)
Reply blocks and returns the reply data for a GetVersion request.
GetVersionReply represents the data returned from a GetVersion request.
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 }
InfoCookie is a cookie used only for Info requests.
type InfoCookie struct { *xgb.Cookie }
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(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 (cook InfoCookie) Reply() (*InfoReply, error)
Reply blocks and returns the reply data for a Info request.
InfoReply represents the data returned from a Info request.
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 }
SetTimeoutsCookie is a cookie used only for SetTimeouts requests.
type SetTimeoutsCookie struct { *xgb.Cookie }
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(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 (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.