const ( EventNotifyMask = 1 EventCycleMask = 2 )
const ( KindBlanked = 0 KindInternal = 1 KindExternal = 2 )
const ( StateOff = 0 StateOn = 1 StateCycle = 2 StateDisabled = 3 )
Notify is the event number for a NotifyEvent.
const Notify = 0
func Init(c *xgb.Conn) error
Init must be called before using the MIT-SCREEN-SAVER extension.
func NotifyEventNew(buf []byte) xgb.Event
NotifyEventNew constructs a NotifyEvent value that implements xgb.Event from a byte slice.
type NotifyEvent struct { Sequence uint16 State byte Time xproto.Timestamp Root xproto.Window Window xproto.Window Kind byte Forced bool }
func (v NotifyEvent) Bytes() []byte
Bytes writes a NotifyEvent value to a byte slice.
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 (v NotifyEvent) String() string
String is a rudimentary string representation of NotifyEvent.
QueryInfoCookie is a cookie used only for QueryInfo requests.
type QueryInfoCookie struct { *xgb.Cookie }
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(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 (cook QueryInfoCookie) Reply() (*QueryInfoReply, error)
Reply blocks and returns the reply data for a QueryInfo request.
QueryInfoReply represents the data returned from a QueryInfo request.
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 }
QueryVersionCookie is a cookie used only for QueryVersion requests.
type QueryVersionCookie struct { *xgb.Cookie }
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(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 (cook QueryVersionCookie) Reply() (*QueryVersionReply, error)
Reply blocks and returns the reply data for a QueryVersion request.
QueryVersionReply represents the data returned from a QueryVersion request.
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 }
SelectInputCookie is a cookie used only for SelectInput requests.
type SelectInputCookie struct { *xgb.Cookie }
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(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 (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.
SetAttributesCookie is a cookie used only for SetAttributes requests.
type SetAttributesCookie struct { *xgb.Cookie }
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(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 (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.
SuspendCookie is a cookie used only for Suspend requests.
type SuspendCookie struct { *xgb.Cookie }
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(c *xgb.Conn, Suspend bool) SuspendCookie
SuspendChecked sends a checked request. If an error occurs, it can be retrieved using 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.
UnsetAttributesCookie is a cookie used only for UnsetAttributes requests.
type UnsetAttributesCookie struct { *xgb.Cookie }
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(c *xgb.Conn, Drawable xproto.Drawable) UnsetAttributesCookie
UnsetAttributesChecked sends a checked request. If an error occurs, it can be retrieved using 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.