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

package screensaver

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

Package screensaver is the X client API for the MIT-SCREEN-SAVER extension.

Index

Package Files

screensaver.go

Constants

const (
    EventNotifyMask = 1
    EventCycleMask  = 2
)
const (
    KindBlanked  = 0
    KindInternal = 1
    KindExternal = 2
)
const (
    StateOff      = 0
    StateOn       = 1
    StateCycle    = 2
    StateDisabled = 3
)
const Notify = 0

Notify is the event number for a NotifyEvent.

func Init Uses

func Init(c *xgb.Conn) error

Init must be called before using the MIT-SCREEN-SAVER extension.

func NotifyEventNew Uses

func NotifyEventNew(buf []byte) xgb.Event

NotifyEventNew constructs a NotifyEvent value that implements xgb.Event from a byte slice.

type NotifyEvent Uses

type NotifyEvent struct {
    Sequence uint16
    State    byte
    Time     xproto.Timestamp
    Root     xproto.Window
    Window   xproto.Window
    Kind     byte
    Forced   bool
}

func (NotifyEvent) Bytes Uses

func (v NotifyEvent) Bytes() []byte

Bytes writes a NotifyEvent value to a byte slice.

func (NotifyEvent) SequenceId Uses

func (v NotifyEvent) SequenceId() uint16

SequenceId returns the sequence id attached to the Notify event. Events without a sequence number (KeymapNotify) return 0. This is mostly used internally.

func (NotifyEvent) String Uses

func (v NotifyEvent) String() string

String is a rudimentary string representation of NotifyEvent.

type QueryInfoCookie Uses

type QueryInfoCookie struct {
    *xgb.Cookie
}

QueryInfoCookie is a cookie used only for QueryInfo requests.

func QueryInfo Uses

func QueryInfo(c *xgb.Conn, Drawable xproto.Drawable) QueryInfoCookie

QueryInfo sends a checked request. If an error occurs, it will be returned with the reply by calling QueryInfoCookie.Reply()

func QueryInfoUnchecked Uses

func QueryInfoUnchecked(c *xgb.Conn, Drawable xproto.Drawable) QueryInfoCookie

QueryInfoUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func (QueryInfoCookie) Reply Uses

func (cook QueryInfoCookie) Reply() (*QueryInfoReply, error)

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

type QueryInfoReply Uses

type QueryInfoReply struct {
    Sequence         uint16 // sequence number of the request for this reply
    Length           uint32 // number of bytes in this reply
    State            byte
    SaverWindow      xproto.Window
    MsUntilServer    uint32
    MsSinceUserInput uint32
    EventMask        uint32
    Kind             byte
}

QueryInfoReply represents the data returned from a QueryInfo request.

type QueryVersionCookie Uses

type QueryVersionCookie struct {
    *xgb.Cookie
}

QueryVersionCookie is a cookie used only for QueryVersion requests.

func QueryVersion Uses

func QueryVersion(c *xgb.Conn, ClientMajorVersion byte, ClientMinorVersion byte) QueryVersionCookie

QueryVersion sends a checked request. If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()

func QueryVersionUnchecked Uses

func QueryVersionUnchecked(c *xgb.Conn, ClientMajorVersion byte, ClientMinorVersion byte) QueryVersionCookie

QueryVersionUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func (QueryVersionCookie) Reply Uses

func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error)

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

type QueryVersionReply Uses

type QueryVersionReply 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
}

QueryVersionReply represents the data returned from a QueryVersion request.

type SelectInputCookie Uses

type SelectInputCookie struct {
    *xgb.Cookie
}

SelectInputCookie is a cookie used only for SelectInput requests.

func SelectInput Uses

func SelectInput(c *xgb.Conn, Drawable xproto.Drawable, EventMask uint32) SelectInputCookie

SelectInput sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func SelectInputChecked Uses

func SelectInputChecked(c *xgb.Conn, Drawable xproto.Drawable, EventMask uint32) SelectInputCookie

SelectInputChecked sends a checked request. If an error occurs, it can be retrieved using SelectInputCookie.Check()

func (SelectInputCookie) Check Uses

func (cook SelectInputCookie) 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 SetAttributesCookie Uses

type SetAttributesCookie struct {
    *xgb.Cookie
}

SetAttributesCookie is a cookie used only for SetAttributes requests.

func SetAttributes Uses

func SetAttributes(c *xgb.Conn, Drawable xproto.Drawable, X int16, Y int16, Width uint16, Height uint16, BorderWidth uint16, Class byte, Depth byte, Visual xproto.Visualid, ValueMask uint32, ValueList []uint32) SetAttributesCookie

SetAttributes sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func SetAttributesChecked Uses

func SetAttributesChecked(c *xgb.Conn, Drawable xproto.Drawable, X int16, Y int16, Width uint16, Height uint16, BorderWidth uint16, Class byte, Depth byte, Visual xproto.Visualid, ValueMask uint32, ValueList []uint32) SetAttributesCookie

SetAttributesChecked sends a checked request. If an error occurs, it can be retrieved using SetAttributesCookie.Check()

func (SetAttributesCookie) Check Uses

func (cook SetAttributesCookie) 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 SuspendCookie Uses

type SuspendCookie struct {
    *xgb.Cookie
}

SuspendCookie is a cookie used only for Suspend requests.

func Suspend Uses

func Suspend(c *xgb.Conn, Suspend bool) SuspendCookie

Suspend sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func SuspendChecked Uses

func SuspendChecked(c *xgb.Conn, Suspend bool) SuspendCookie

SuspendChecked sends a checked request. If an error occurs, it can be retrieved using SuspendCookie.Check()

func (SuspendCookie) Check Uses

func (cook SuspendCookie) 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 UnsetAttributesCookie Uses

type UnsetAttributesCookie struct {
    *xgb.Cookie
}

UnsetAttributesCookie is a cookie used only for UnsetAttributes requests.

func UnsetAttributes Uses

func UnsetAttributes(c *xgb.Conn, Drawable xproto.Drawable) UnsetAttributesCookie

UnsetAttributes sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func UnsetAttributesChecked Uses

func UnsetAttributesChecked(c *xgb.Conn, Drawable xproto.Drawable) UnsetAttributesCookie

UnsetAttributesChecked sends a checked request. If an error occurs, it can be retrieved using UnsetAttributesCookie.Check()

func (UnsetAttributesCookie) Check Uses

func (cook UnsetAttributesCookie) 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 screensaver imports 2 packages (graph) and is imported by 4 packages. Updated 2016-11-06. Refresh now. Tools for package owners.