Documentation ¶
Overview ¶
Package screensaver is the X client API for the MIT-SCREEN-SAVER extension.
Index ¶
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.
Variables ¶
This section is empty.
Functions ¶
func NotifyEventNew ¶
NotifyEventNew constructs a NotifyEvent value that implements xgb.Event from a byte slice.
Types ¶
type NotifyEvent ¶
type NotifyEvent struct { Sequence uint16 State byte Time xproto.Timestamp Root xproto.Window Window xproto.Window Kind byte Forced bool }
func (NotifyEvent) Bytes ¶
func (v NotifyEvent) Bytes() []byte
Bytes writes a NotifyEvent value to a byte slice.
func (NotifyEvent) SequenceId ¶
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 ¶
func (v NotifyEvent) String() string
String is a rudimentary string representation of NotifyEvent.
type QueryInfoCookie ¶
QueryInfoCookie is a cookie used only for QueryInfo requests.
func QueryInfo ¶
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 ¶
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 ¶
func (cook QueryInfoCookie) Reply() (*QueryInfoReply, error)
Reply blocks and returns the reply data for a QueryInfo request.
type QueryInfoReply ¶
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 ¶
QueryVersionCookie is a cookie used only for QueryVersion requests.
func QueryVersion ¶
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 ¶
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 ¶
func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error)
Reply blocks and returns the reply data for a QueryVersion request.
type QueryVersionReply ¶
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 ¶
SelectInputCookie is a cookie used only for SelectInput requests.
func SelectInput ¶
SelectInput sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SelectInputChecked ¶
SelectInputChecked sends a checked request. If an error occurs, it can be retrieved using SelectInputCookie.Check()
func (SelectInputCookie) Check ¶
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 ¶
SetAttributesCookie is a cookie used only for SetAttributes requests.
func SetAttributes ¶
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 ¶
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 ¶
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 ¶
SuspendCookie is a cookie used only for Suspend requests.
func Suspend ¶
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 ¶
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 ¶
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 ¶
UnsetAttributesCookie is a cookie used only for UnsetAttributes requests.
func UnsetAttributes ¶
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 ¶
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 ¶
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.