xgb: github.com/BurntSushi/xgb/dpms Index | Files

package dpms

import "github.com/BurntSushi/xgb/dpms"

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

Index

Package Files

dpms.go

Constants

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

func Init Uses

func Init(c *xgb.Conn) error

Init must be called before using the DPMS extension.

type CapableCookie Uses

type CapableCookie struct {
    *xgb.Cookie
}

CapableCookie is a cookie used only for Capable requests.

func Capable Uses

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 Uses

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 Uses

func (cook CapableCookie) Reply() (*CapableReply, error)

Reply blocks and returns the reply data for a Capable request.

type CapableReply Uses

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 Uses

type DisableCookie struct {
    *xgb.Cookie
}

DisableCookie is a cookie used only for Disable requests.

func Disable Uses

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 Uses

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 Uses

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 Uses

type EnableCookie struct {
    *xgb.Cookie
}

EnableCookie is a cookie used only for Enable requests.

func Enable Uses

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 Uses

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 Uses

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 Uses

type ForceLevelCookie struct {
    *xgb.Cookie
}

ForceLevelCookie is a cookie used only for ForceLevel requests.

func ForceLevel Uses

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 Uses

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 Uses

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 Uses

type GetTimeoutsCookie struct {
    *xgb.Cookie
}

GetTimeoutsCookie is a cookie used only for GetTimeouts requests.

func GetTimeouts Uses

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 Uses

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 Uses

func (cook GetTimeoutsCookie) Reply() (*GetTimeoutsReply, error)

Reply blocks and returns the reply data for a GetTimeouts request.

type GetTimeoutsReply Uses

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 Uses

type GetVersionCookie struct {
    *xgb.Cookie
}

GetVersionCookie is a cookie used only for GetVersion requests.

func GetVersion Uses

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 Uses

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 Uses

func (cook GetVersionCookie) Reply() (*GetVersionReply, error)

Reply blocks and returns the reply data for a GetVersion request.

type GetVersionReply Uses

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 Uses

type InfoCookie struct {
    *xgb.Cookie
}

InfoCookie is a cookie used only for Info requests.

func Info Uses

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 Uses

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 Uses

func (cook InfoCookie) Reply() (*InfoReply, error)

Reply blocks and returns the reply data for a Info request.

type InfoReply Uses

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 Uses

type SetTimeoutsCookie struct {
    *xgb.Cookie
}

SetTimeoutsCookie is a cookie used only for SetTimeouts requests.

func SetTimeouts Uses

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 Uses

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 Uses

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.

Package dpms imports 2 packages (graph). Updated 2016-11-06. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).