...

Package dpms

import "github.com/jezek/xgb/dpms"
Overview
Index

Overview ▾

Package dpms is the X client API for the DPMS extension.

Index ▾

Constants
func Init(c *xgb.Conn) error
type CapableCookie
    func Capable(c *xgb.Conn) CapableCookie
    func CapableUnchecked(c *xgb.Conn) CapableCookie
    func (cook CapableCookie) Reply() (*CapableReply, error)
type CapableReply
type DisableCookie
    func Disable(c *xgb.Conn) DisableCookie
    func DisableChecked(c *xgb.Conn) DisableCookie
    func (cook DisableCookie) Check() error
type EnableCookie
    func Enable(c *xgb.Conn) EnableCookie
    func EnableChecked(c *xgb.Conn) EnableCookie
    func (cook EnableCookie) Check() error
type ForceLevelCookie
    func ForceLevel(c *xgb.Conn, PowerLevel uint16) ForceLevelCookie
    func ForceLevelChecked(c *xgb.Conn, PowerLevel uint16) ForceLevelCookie
    func (cook ForceLevelCookie) Check() error
type GetTimeoutsCookie
    func GetTimeouts(c *xgb.Conn) GetTimeoutsCookie
    func GetTimeoutsUnchecked(c *xgb.Conn) GetTimeoutsCookie
    func (cook GetTimeoutsCookie) Reply() (*GetTimeoutsReply, error)
type GetTimeoutsReply
type GetVersionCookie
    func GetVersion(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) GetVersionCookie
    func GetVersionUnchecked(c *xgb.Conn, ClientMajorVersion uint16, ClientMinorVersion uint16) GetVersionCookie
    func (cook GetVersionCookie) Reply() (*GetVersionReply, error)
type GetVersionReply
type InfoCookie
    func Info(c *xgb.Conn) InfoCookie
    func InfoUnchecked(c *xgb.Conn) InfoCookie
    func (cook InfoCookie) Reply() (*InfoReply, error)
type InfoReply
type SetTimeoutsCookie
    func SetTimeouts(c *xgb.Conn, StandbyTimeout uint16, SuspendTimeout uint16, OffTimeout uint16) SetTimeoutsCookie
    func SetTimeoutsChecked(c *xgb.Conn, StandbyTimeout uint16, SuspendTimeout uint16, OffTimeout uint16) SetTimeoutsCookie
    func (cook SetTimeoutsCookie) Check() error

Package files

dpms.go

Constants

const (
    DPMSModeOn      = 0
    DPMSModeStandby = 1
    DPMSModeSuspend = 2
    DPMSModeOff     = 3
)

func Init

func Init(c *xgb.Conn) error

Init must be called before using the DPMS extension.

type CapableCookie

CapableCookie is a cookie used only for Capable requests.

type CapableCookie struct {
    *xgb.Cookie
}

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

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
}

type DisableCookie

DisableCookie is a cookie used only for Disable requests.

type DisableCookie struct {
    *xgb.Cookie
}

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.

type EnableCookie struct {
    *xgb.Cookie
}

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.

type ForceLevelCookie struct {
    *xgb.Cookie
}

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.

type GetTimeoutsCookie struct {
    *xgb.Cookie
}

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

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
}

type GetVersionCookie

GetVersionCookie is a cookie used only for GetVersion requests.

type GetVersionCookie struct {
    *xgb.Cookie
}

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

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
}

type InfoCookie

InfoCookie is a cookie used only for Info requests.

type InfoCookie struct {
    *xgb.Cookie
}

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

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
}

type SetTimeoutsCookie

SetTimeoutsCookie is a cookie used only for SetTimeouts requests.

type SetTimeoutsCookie struct {
    *xgb.Cookie
}

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.