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

package damage

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

Package damage is the X client API for the DAMAGE extension.

Index

Package Files

damage.go

Constants

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.

func BadDamageErrorNew Uses

func BadDamageErrorNew(buf []byte) xgb.Error

BadDamageErrorNew constructs a BadDamageError value that implements xgb.Error from a byte slice.

func Init Uses

func Init(c *xgb.Conn) error

Init must be called before using the DAMAGE extension.

func NotifyEventNew Uses

func NotifyEventNew(buf []byte) xgb.Event

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

type AddCookie Uses

type AddCookie struct {
    *xgb.Cookie
}

AddCookie is a cookie used only for Add requests.

func Add Uses

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 Uses

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 (AddCookie) Check Uses

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 Uses

type BadDamageError struct {
    Sequence uint16
    NiceName string
}

func (BadDamageError) BadId Uses

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 Uses

func (err BadDamageError) Error() string

func (BadDamageError) SequenceId Uses

func (err BadDamageError) SequenceId() uint16

SequenceId returns the sequence id attached to the BadBadDamage error. This is mostly used internally.

type CreateCookie Uses

type CreateCookie struct {
    *xgb.Cookie
}

CreateCookie is a cookie used only for Create requests.

func Create Uses

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 Uses

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 (CreateCookie) Check Uses

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 Uses

type Damage uint32

func NewDamageId Uses

func NewDamageId(c *xgb.Conn) (Damage, error)

type DestroyCookie Uses

type DestroyCookie struct {
    *xgb.Cookie
}

DestroyCookie is a cookie used only for Destroy requests.

func Destroy Uses

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 Uses

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 Uses

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 Uses

type NotifyEvent struct {
    Sequence  uint16
    Level     byte
    Drawable  xproto.Drawable
    Damage    Damage
    Timestamp xproto.Timestamp
    Area      xproto.Rectangle
    Geometry  xproto.Rectangle
}

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 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 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 Uses

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 (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
    MajorVersion uint32
    MinorVersion uint32
}

QueryVersionReply represents the data returned from a QueryVersion request.

type SubtractCookie Uses

type SubtractCookie struct {
    *xgb.Cookie
}

SubtractCookie is a cookie used only for Subtract requests.

func Subtract Uses

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 Uses

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 (SubtractCookie) Check Uses

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.

Package damage imports 3 packages (graph) and is imported by 2 packages. Updated 2016-11-06. Refresh now. Tools for package owners.