const ( ReportLevelRawRectangles = 0 ReportLevelDeltaRectangles = 1 ReportLevelBoundingBox = 2 ReportLevelNonEmpty = 3 )
BadBadDamage is the error number for a BadBadDamage.
const BadBadDamage = 0
Notify is the event number for a NotifyEvent.
const Notify = 0
func BadDamageErrorNew(buf []byte) xgb.Error
BadDamageErrorNew constructs a BadDamageError value that implements xgb.Error from a byte slice.
func Init(c *xgb.Conn) error
Init must be called before using the DAMAGE extension.
func NotifyEventNew(buf []byte) xgb.Event
NotifyEventNew constructs a NotifyEvent value that implements xgb.Event from a byte slice.
AddCookie is a cookie used only for Add requests.
type AddCookie struct { *xgb.Cookie }
func Add(c *xgb.Conn, Drawable xproto.Drawable, Region xfixes.Region) AddCookie
Add sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func AddChecked(c *xgb.Conn, Drawable xproto.Drawable, Region xfixes.Region) AddCookie
AddChecked sends a checked request. If an error occurs, it can be retrieved using AddCookie.Check()
func (cook AddCookie) 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 BadDamageError struct { Sequence uint16 NiceName string }
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 (err BadDamageError) Error() string
func (err BadDamageError) SequenceId() uint16
SequenceId returns the sequence id attached to the BadBadDamage error. This is mostly used internally.
CreateCookie is a cookie used only for Create requests.
type CreateCookie struct { *xgb.Cookie }
func Create(c *xgb.Conn, Damage Damage, Drawable xproto.Drawable, Level byte) CreateCookie
Create sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func CreateChecked(c *xgb.Conn, Damage Damage, Drawable xproto.Drawable, Level byte) CreateCookie
CreateChecked sends a checked request. If an error occurs, it can be retrieved using 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 Damage uint32
func NewDamageId(c *xgb.Conn) (Damage, error)
DestroyCookie is a cookie used only for Destroy requests.
type DestroyCookie struct { *xgb.Cookie }
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(c *xgb.Conn, Damage Damage) DestroyCookie
DestroyChecked sends a checked request. If an error occurs, it can be retrieved using 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 struct { Sequence uint16 Level byte Drawable xproto.Drawable Damage Damage Timestamp xproto.Timestamp Area xproto.Rectangle Geometry xproto.Rectangle }
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.
QueryVersionCookie is a cookie used only for QueryVersion requests.
type QueryVersionCookie struct { *xgb.Cookie }
func QueryVersion(c *xgb.Conn, ClientMajorVersion uint32, 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(c *xgb.Conn, ClientMajorVersion uint32, ClientMinorVersion uint32) 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 MajorVersion uint32 MinorVersion uint32 }
SubtractCookie is a cookie used only for Subtract requests.
type SubtractCookie struct { *xgb.Cookie }
func Subtract(c *xgb.Conn, Damage Damage, Repair xfixes.Region, Parts xfixes.Region) SubtractCookie
Subtract sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SubtractChecked(c *xgb.Conn, Damage Damage, Repair xfixes.Region, Parts xfixes.Region) SubtractCookie
SubtractChecked sends a checked request. If an error occurs, it can be retrieved using 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.