Documentation ¶
Overview ¶
Package damage is the X client API for the DAMAGE extension.
Index ¶
Constants ¶
const ( MajorVersion = 1 MinorVersion = 1 )
const ( ReportLevelRawRectangles = 0 ReportLevelDeltaRectangles = 1 ReportLevelBoundingBox = 2 ReportLevelNonEmpty = 3 )
const BadBadDamage = 0
BadBadDamage is the error number for a BadBadDamage.
const Notify = 0
Notify is the event number for a NotifyEvent.
Variables ¶
This section is empty.
Functions ¶
func BadDamageErrorNew ¶
BadDamageErrorNew constructs a BadDamageError value that implements xgb.Error from a byte slice.
func NotifyEventNew ¶
NotifyEventNew constructs a NotifyEvent value that implements xgb.Event from a byte slice.
Types ¶
type AddCookie ¶
AddCookie is a cookie used only for Add requests.
func Add ¶
Add sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func AddChecked ¶
AddChecked sends a checked request. If an error occurs, it can be retrieved using AddCookie.Check.
type BadDamageError ¶
func (BadDamageError) BadId ¶
func (err BadDamageError) BadId() uint32
BadId returns the 'BadValue' number if one exists for the BadBadDamage error. If no bad value exists, 0 is returned.
func (BadDamageError) Error ¶
func (err BadDamageError) Error() string
func (BadDamageError) SequenceId ¶
func (err BadDamageError) SequenceId() uint16
SequenceId returns the sequence id attached to the BadBadDamage error. This is mostly used internally.
type CreateCookie ¶
CreateCookie is a cookie used only for Create requests.
func Create ¶
Create sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func CreateChecked ¶
CreateChecked sends a checked request. If an error occurs, it can be retrieved using CreateCookie.Check.
func (CreateCookie) Check ¶
func (cook CreateCookie) 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 DestroyCookie ¶
DestroyCookie is a cookie used only for Destroy requests.
func Destroy ¶
func Destroy(c *xgb.Conn, Damage Damage) DestroyCookie
Destroy sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func DestroyChecked ¶
func DestroyChecked(c *xgb.Conn, Damage Damage) DestroyCookie
DestroyChecked sends a checked request. If an error occurs, it can be retrieved using DestroyCookie.Check.
func (DestroyCookie) Check ¶
func (cook DestroyCookie) 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 NotifyEvent ¶
type NotifyEvent struct { Sequence uint16 Level byte Drawable xproto.Drawable Damage Damage Timestamp xproto.Timestamp Area xproto.Rectangle Geometry xproto.Rectangle }
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 QueryVersionCookie ¶
QueryVersionCookie is a cookie used only for QueryVersion requests.
func QueryVersion ¶
func QueryVersion(c *xgb.Conn, ClientMajorVersion, ClientMinorVersion uint32) 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, ClientMinorVersion uint32) 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 MajorVersion uint32 MinorVersion uint32 }
QueryVersionReply represents the data returned from a QueryVersion request.
type SubtractCookie ¶
SubtractCookie is a cookie used only for Subtract requests.
func Subtract ¶
Subtract sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SubtractChecked ¶
SubtractChecked sends a checked request. If an error occurs, it can be retrieved using SubtractCookie.Check.
func (SubtractCookie) Check ¶
func (cook SubtractCookie) 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.