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

package dri2

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

Package dri2 is the X client API for the DRI2 extension.

Index

Package Files

dri2.go

Constants

const (
    AttachmentBufferFrontLeft      = 0
    AttachmentBufferBackLeft       = 1
    AttachmentBufferFrontRight     = 2
    AttachmentBufferBackRight      = 3
    AttachmentBufferDepth          = 4
    AttachmentBufferStencil        = 5
    AttachmentBufferAccum          = 6
    AttachmentBufferFakeFrontLeft  = 7
    AttachmentBufferFakeFrontRight = 8
    AttachmentBufferDepthStencil   = 9
    AttachmentBufferHiz            = 10
)
const (
    DriverTypeDri   = 0
    DriverTypeVdpau = 1
)
const (
    EventTypeExchangeComplete = 1
    EventTypeBlitComplete     = 2
    EventTypeFlipComplete     = 3
)
const BufferSwapComplete = 0

BufferSwapComplete is the event number for a BufferSwapCompleteEvent.

const InvalidateBuffers = 1

InvalidateBuffers is the event number for a InvalidateBuffersEvent.

func AttachFormatListBytes Uses

func AttachFormatListBytes(buf []byte, list []AttachFormat) int

AttachFormatListBytes writes a list of AttachFormat values to a byte slice.

func AttachFormatRead Uses

func AttachFormatRead(buf []byte, v *AttachFormat) int

AttachFormatRead reads a byte slice into a AttachFormat value.

func AttachFormatReadList Uses

func AttachFormatReadList(buf []byte, dest []AttachFormat) int

AttachFormatReadList reads a byte slice into a list of AttachFormat values.

func BufferSwapCompleteEventNew Uses

func BufferSwapCompleteEventNew(buf []byte) xgb.Event

BufferSwapCompleteEventNew constructs a BufferSwapCompleteEvent value that implements xgb.Event from a byte slice.

func DRI2BufferListBytes Uses

func DRI2BufferListBytes(buf []byte, list []DRI2Buffer) int

DRI2BufferListBytes writes a list of DRI2Buffer values to a byte slice.

func DRI2BufferRead Uses

func DRI2BufferRead(buf []byte, v *DRI2Buffer) int

DRI2BufferRead reads a byte slice into a DRI2Buffer value.

func DRI2BufferReadList Uses

func DRI2BufferReadList(buf []byte, dest []DRI2Buffer) int

DRI2BufferReadList reads a byte slice into a list of DRI2Buffer values.

func Init Uses

func Init(c *xgb.Conn) error

Init must be called before using the DRI2 extension.

func InvalidateBuffersEventNew Uses

func InvalidateBuffersEventNew(buf []byte) xgb.Event

InvalidateBuffersEventNew constructs a InvalidateBuffersEvent value that implements xgb.Event from a byte slice.

type AttachFormat Uses

type AttachFormat struct {
    Attachment uint32
    Format     uint32
}

func (AttachFormat) Bytes Uses

func (v AttachFormat) Bytes() []byte

Bytes writes a AttachFormat value to a byte slice.

type AuthenticateCookie Uses

type AuthenticateCookie struct {
    *xgb.Cookie
}

AuthenticateCookie is a cookie used only for Authenticate requests.

func Authenticate Uses

func Authenticate(c *xgb.Conn, Window xproto.Window, Magic uint32) AuthenticateCookie

Authenticate sends a checked request. If an error occurs, it will be returned with the reply by calling AuthenticateCookie.Reply()

func AuthenticateUnchecked Uses

func AuthenticateUnchecked(c *xgb.Conn, Window xproto.Window, Magic uint32) AuthenticateCookie

AuthenticateUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func (AuthenticateCookie) Reply Uses

func (cook AuthenticateCookie) Reply() (*AuthenticateReply, error)

Reply blocks and returns the reply data for a Authenticate request.

type AuthenticateReply Uses

type AuthenticateReply struct {
    Sequence uint16 // sequence number of the request for this reply
    Length   uint32 // number of bytes in this reply
    // padding: 1 bytes
    Authenticated uint32
}

AuthenticateReply represents the data returned from a Authenticate request.

type BufferSwapCompleteEvent Uses

type BufferSwapCompleteEvent struct {
    Sequence uint16
    // padding: 1 bytes
    EventType uint16
    // padding: 2 bytes
    Drawable xproto.Drawable
    UstHi    uint32
    UstLo    uint32
    MscHi    uint32
    MscLo    uint32
    Sbc      uint32
}

func (BufferSwapCompleteEvent) Bytes Uses

func (v BufferSwapCompleteEvent) Bytes() []byte

Bytes writes a BufferSwapCompleteEvent value to a byte slice.

func (BufferSwapCompleteEvent) SequenceId Uses

func (v BufferSwapCompleteEvent) SequenceId() uint16

SequenceId returns the sequence id attached to the BufferSwapComplete event. Events without a sequence number (KeymapNotify) return 0. This is mostly used internally.

func (BufferSwapCompleteEvent) String Uses

func (v BufferSwapCompleteEvent) String() string

String is a rudimentary string representation of BufferSwapCompleteEvent.

type ConnectCookie Uses

type ConnectCookie struct {
    *xgb.Cookie
}

ConnectCookie is a cookie used only for Connect requests.

func Connect Uses

func Connect(c *xgb.Conn, Window xproto.Window, DriverType uint32) ConnectCookie

Connect sends a checked request. If an error occurs, it will be returned with the reply by calling ConnectCookie.Reply()

func ConnectUnchecked Uses

func ConnectUnchecked(c *xgb.Conn, Window xproto.Window, DriverType uint32) ConnectCookie

ConnectUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func (ConnectCookie) Reply Uses

func (cook ConnectCookie) Reply() (*ConnectReply, error)

Reply blocks and returns the reply data for a Connect request.

type ConnectReply Uses

type ConnectReply struct {
    Sequence uint16 // sequence number of the request for this reply
    Length   uint32 // number of bytes in this reply
    // padding: 1 bytes
    DriverNameLength uint32
    DeviceNameLength uint32
    // padding: 16 bytes
    DriverName   string // size: xgb.Pad((int(DriverNameLength) * 1))
    AlignmentPad []byte // size: xgb.Pad(((((int(DriverNameLength) + 3) & -4) - int(DriverNameLength)) * 1))
    DeviceName   string // size: xgb.Pad((int(DeviceNameLength) * 1))
}

ConnectReply represents the data returned from a Connect request.

type CopyRegionCookie Uses

type CopyRegionCookie struct {
    *xgb.Cookie
}

CopyRegionCookie is a cookie used only for CopyRegion requests.

func CopyRegion Uses

func CopyRegion(c *xgb.Conn, Drawable xproto.Drawable, Region uint32, Dest uint32, Src uint32) CopyRegionCookie

CopyRegion sends a checked request. If an error occurs, it will be returned with the reply by calling CopyRegionCookie.Reply()

func CopyRegionUnchecked Uses

func CopyRegionUnchecked(c *xgb.Conn, Drawable xproto.Drawable, Region uint32, Dest uint32, Src uint32) CopyRegionCookie

CopyRegionUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func (CopyRegionCookie) Reply Uses

func (cook CopyRegionCookie) Reply() (*CopyRegionReply, error)

Reply blocks and returns the reply data for a CopyRegion request.

type CopyRegionReply Uses

type CopyRegionReply struct {
    Sequence uint16 // sequence number of the request for this reply
    Length   uint32 // number of bytes in this reply

}

CopyRegionReply represents the data returned from a CopyRegion request.

type CreateDrawableCookie Uses

type CreateDrawableCookie struct {
    *xgb.Cookie
}

CreateDrawableCookie is a cookie used only for CreateDrawable requests.

func CreateDrawable Uses

func CreateDrawable(c *xgb.Conn, Drawable xproto.Drawable) CreateDrawableCookie

CreateDrawable sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func CreateDrawableChecked Uses

func CreateDrawableChecked(c *xgb.Conn, Drawable xproto.Drawable) CreateDrawableCookie

CreateDrawableChecked sends a checked request. If an error occurs, it can be retrieved using CreateDrawableCookie.Check()

func (CreateDrawableCookie) Check Uses

func (cook CreateDrawableCookie) 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 DRI2Buffer Uses

type DRI2Buffer struct {
    Attachment uint32
    Name       uint32
    Pitch      uint32
    Cpp        uint32
    Flags      uint32
}

func (DRI2Buffer) Bytes Uses

func (v DRI2Buffer) Bytes() []byte

Bytes writes a DRI2Buffer value to a byte slice.

type DestroyDrawableCookie Uses

type DestroyDrawableCookie struct {
    *xgb.Cookie
}

DestroyDrawableCookie is a cookie used only for DestroyDrawable requests.

func DestroyDrawable Uses

func DestroyDrawable(c *xgb.Conn, Drawable xproto.Drawable) DestroyDrawableCookie

DestroyDrawable sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func DestroyDrawableChecked Uses

func DestroyDrawableChecked(c *xgb.Conn, Drawable xproto.Drawable) DestroyDrawableCookie

DestroyDrawableChecked sends a checked request. If an error occurs, it can be retrieved using DestroyDrawableCookie.Check()

func (DestroyDrawableCookie) Check Uses

func (cook DestroyDrawableCookie) 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 GetBuffersCookie Uses

type GetBuffersCookie struct {
    *xgb.Cookie
}

GetBuffersCookie is a cookie used only for GetBuffers requests.

func GetBuffers Uses

func GetBuffers(c *xgb.Conn, Drawable xproto.Drawable, Count uint32, Attachments []uint32) GetBuffersCookie

GetBuffers sends a checked request. If an error occurs, it will be returned with the reply by calling GetBuffersCookie.Reply()

func GetBuffersUnchecked Uses

func GetBuffersUnchecked(c *xgb.Conn, Drawable xproto.Drawable, Count uint32, Attachments []uint32) GetBuffersCookie

GetBuffersUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func (GetBuffersCookie) Reply Uses

func (cook GetBuffersCookie) Reply() (*GetBuffersReply, error)

Reply blocks and returns the reply data for a GetBuffers request.

type GetBuffersReply Uses

type GetBuffersReply struct {
    Sequence uint16 // sequence number of the request for this reply
    Length   uint32 // number of bytes in this reply
    // padding: 1 bytes
    Width  uint32
    Height uint32
    Count  uint32
    // padding: 12 bytes
    Buffers []DRI2Buffer // size: xgb.Pad((int(Count) * 20))
}

GetBuffersReply represents the data returned from a GetBuffers request.

type GetBuffersWithFormatCookie Uses

type GetBuffersWithFormatCookie struct {
    *xgb.Cookie
}

GetBuffersWithFormatCookie is a cookie used only for GetBuffersWithFormat requests.

func GetBuffersWithFormat Uses

func GetBuffersWithFormat(c *xgb.Conn, Drawable xproto.Drawable, Count uint32, Attachments []AttachFormat) GetBuffersWithFormatCookie

GetBuffersWithFormat sends a checked request. If an error occurs, it will be returned with the reply by calling GetBuffersWithFormatCookie.Reply()

func GetBuffersWithFormatUnchecked Uses

func GetBuffersWithFormatUnchecked(c *xgb.Conn, Drawable xproto.Drawable, Count uint32, Attachments []AttachFormat) GetBuffersWithFormatCookie

GetBuffersWithFormatUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func (GetBuffersWithFormatCookie) Reply Uses

func (cook GetBuffersWithFormatCookie) Reply() (*GetBuffersWithFormatReply, error)

Reply blocks and returns the reply data for a GetBuffersWithFormat request.

type GetBuffersWithFormatReply Uses

type GetBuffersWithFormatReply struct {
    Sequence uint16 // sequence number of the request for this reply
    Length   uint32 // number of bytes in this reply
    // padding: 1 bytes
    Width  uint32
    Height uint32
    Count  uint32
    // padding: 12 bytes
    Buffers []DRI2Buffer // size: xgb.Pad((int(Count) * 20))
}

GetBuffersWithFormatReply represents the data returned from a GetBuffersWithFormat request.

type GetMSCCookie Uses

type GetMSCCookie struct {
    *xgb.Cookie
}

GetMSCCookie is a cookie used only for GetMSC requests.

func GetMSC Uses

func GetMSC(c *xgb.Conn, Drawable xproto.Drawable) GetMSCCookie

GetMSC sends a checked request. If an error occurs, it will be returned with the reply by calling GetMSCCookie.Reply()

func GetMSCUnchecked Uses

func GetMSCUnchecked(c *xgb.Conn, Drawable xproto.Drawable) GetMSCCookie

GetMSCUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func (GetMSCCookie) Reply Uses

func (cook GetMSCCookie) Reply() (*GetMSCReply, error)

Reply blocks and returns the reply data for a GetMSC request.

type GetMSCReply Uses

type GetMSCReply struct {
    Sequence uint16 // sequence number of the request for this reply
    Length   uint32 // number of bytes in this reply
    // padding: 1 bytes
    UstHi uint32
    UstLo uint32
    MscHi uint32
    MscLo uint32
    SbcHi uint32
    SbcLo uint32
}

GetMSCReply represents the data returned from a GetMSC request.

type GetParamCookie Uses

type GetParamCookie struct {
    *xgb.Cookie
}

GetParamCookie is a cookie used only for GetParam requests.

func GetParam Uses

func GetParam(c *xgb.Conn, Drawable xproto.Drawable, Param uint32) GetParamCookie

GetParam sends a checked request. If an error occurs, it will be returned with the reply by calling GetParamCookie.Reply()

func GetParamUnchecked Uses

func GetParamUnchecked(c *xgb.Conn, Drawable xproto.Drawable, Param uint32) GetParamCookie

GetParamUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func (GetParamCookie) Reply Uses

func (cook GetParamCookie) Reply() (*GetParamReply, error)

Reply blocks and returns the reply data for a GetParam request.

type GetParamReply Uses

type GetParamReply struct {
    Sequence          uint16 // sequence number of the request for this reply
    Length            uint32 // number of bytes in this reply
    IsParamRecognized bool
    ValueHi           uint32
    ValueLo           uint32
}

GetParamReply represents the data returned from a GetParam request.

type InvalidateBuffersEvent Uses

type InvalidateBuffersEvent struct {
    Sequence uint16
    // padding: 1 bytes
    Drawable xproto.Drawable
}

func (InvalidateBuffersEvent) Bytes Uses

func (v InvalidateBuffersEvent) Bytes() []byte

Bytes writes a InvalidateBuffersEvent value to a byte slice.

func (InvalidateBuffersEvent) SequenceId Uses

func (v InvalidateBuffersEvent) SequenceId() uint16

SequenceId returns the sequence id attached to the InvalidateBuffers event. Events without a sequence number (KeymapNotify) return 0. This is mostly used internally.

func (InvalidateBuffersEvent) String Uses

func (v InvalidateBuffersEvent) String() string

String is a rudimentary string representation of InvalidateBuffersEvent.

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, MajorVersion uint32, MinorVersion 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, MajorVersion uint32, MinorVersion 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 SwapBuffersCookie Uses

type SwapBuffersCookie struct {
    *xgb.Cookie
}

SwapBuffersCookie is a cookie used only for SwapBuffers requests.

func SwapBuffers Uses

func SwapBuffers(c *xgb.Conn, Drawable xproto.Drawable, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) SwapBuffersCookie

SwapBuffers sends a checked request. If an error occurs, it will be returned with the reply by calling SwapBuffersCookie.Reply()

func SwapBuffersUnchecked Uses

func SwapBuffersUnchecked(c *xgb.Conn, Drawable xproto.Drawable, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) SwapBuffersCookie

SwapBuffersUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func (SwapBuffersCookie) Reply Uses

func (cook SwapBuffersCookie) Reply() (*SwapBuffersReply, error)

Reply blocks and returns the reply data for a SwapBuffers request.

type SwapBuffersReply Uses

type SwapBuffersReply struct {
    Sequence uint16 // sequence number of the request for this reply
    Length   uint32 // number of bytes in this reply
    // padding: 1 bytes
    SwapHi uint32
    SwapLo uint32
}

SwapBuffersReply represents the data returned from a SwapBuffers request.

type SwapIntervalCookie Uses

type SwapIntervalCookie struct {
    *xgb.Cookie
}

SwapIntervalCookie is a cookie used only for SwapInterval requests.

func SwapInterval Uses

func SwapInterval(c *xgb.Conn, Drawable xproto.Drawable, Interval uint32) SwapIntervalCookie

SwapInterval sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func SwapIntervalChecked Uses

func SwapIntervalChecked(c *xgb.Conn, Drawable xproto.Drawable, Interval uint32) SwapIntervalCookie

SwapIntervalChecked sends a checked request. If an error occurs, it can be retrieved using SwapIntervalCookie.Check()

func (SwapIntervalCookie) Check Uses

func (cook SwapIntervalCookie) 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 WaitMSCCookie Uses

type WaitMSCCookie struct {
    *xgb.Cookie
}

WaitMSCCookie is a cookie used only for WaitMSC requests.

func WaitMSC Uses

func WaitMSC(c *xgb.Conn, Drawable xproto.Drawable, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) WaitMSCCookie

WaitMSC sends a checked request. If an error occurs, it will be returned with the reply by calling WaitMSCCookie.Reply()

func WaitMSCUnchecked Uses

func WaitMSCUnchecked(c *xgb.Conn, Drawable xproto.Drawable, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) WaitMSCCookie

WaitMSCUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func (WaitMSCCookie) Reply Uses

func (cook WaitMSCCookie) Reply() (*WaitMSCReply, error)

Reply blocks and returns the reply data for a WaitMSC request.

type WaitMSCReply Uses

type WaitMSCReply struct {
    Sequence uint16 // sequence number of the request for this reply
    Length   uint32 // number of bytes in this reply
    // padding: 1 bytes
    UstHi uint32
    UstLo uint32
    MscHi uint32
    MscLo uint32
    SbcHi uint32
    SbcLo uint32
}

WaitMSCReply represents the data returned from a WaitMSC request.

type WaitSBCCookie Uses

type WaitSBCCookie struct {
    *xgb.Cookie
}

WaitSBCCookie is a cookie used only for WaitSBC requests.

func WaitSBC Uses

func WaitSBC(c *xgb.Conn, Drawable xproto.Drawable, TargetSbcHi uint32, TargetSbcLo uint32) WaitSBCCookie

WaitSBC sends a checked request. If an error occurs, it will be returned with the reply by calling WaitSBCCookie.Reply()

func WaitSBCUnchecked Uses

func WaitSBCUnchecked(c *xgb.Conn, Drawable xproto.Drawable, TargetSbcHi uint32, TargetSbcLo uint32) WaitSBCCookie

WaitSBCUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func (WaitSBCCookie) Reply Uses

func (cook WaitSBCCookie) Reply() (*WaitSBCReply, error)

Reply blocks and returns the reply data for a WaitSBC request.

type WaitSBCReply Uses

type WaitSBCReply struct {
    Sequence uint16 // sequence number of the request for this reply
    Length   uint32 // number of bytes in this reply
    // padding: 1 bytes
    UstHi uint32
    UstLo uint32
    MscHi uint32
    MscLo uint32
    SbcHi uint32
    SbcLo uint32
}

WaitSBCReply represents the data returned from a WaitSBC request.

Package dri2 imports 2 packages (graph). Updated 2016-11-06. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).