...

Package dri2

import "github.com/jezek/xgb/dri2"
Overview
Index

Overview ▾

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

Index ▾

Constants
func AttachFormatListBytes(buf []byte, list []AttachFormat) int
func AttachFormatRead(buf []byte, v *AttachFormat) int
func AttachFormatReadList(buf []byte, dest []AttachFormat) int
func BufferSwapCompleteEventNew(buf []byte) xgb.Event
func DRI2BufferListBytes(buf []byte, list []DRI2Buffer) int
func DRI2BufferRead(buf []byte, v *DRI2Buffer) int
func DRI2BufferReadList(buf []byte, dest []DRI2Buffer) int
func Init(c *xgb.Conn) error
func InvalidateBuffersEventNew(buf []byte) xgb.Event
type AttachFormat
    func (v AttachFormat) Bytes() []byte
type AuthenticateCookie
    func Authenticate(c *xgb.Conn, Window xproto.Window, Magic uint32) AuthenticateCookie
    func AuthenticateUnchecked(c *xgb.Conn, Window xproto.Window, Magic uint32) AuthenticateCookie
    func (cook AuthenticateCookie) Reply() (*AuthenticateReply, error)
type AuthenticateReply
type BufferSwapCompleteEvent
    func (v BufferSwapCompleteEvent) Bytes() []byte
    func (v BufferSwapCompleteEvent) SequenceId() uint16
    func (v BufferSwapCompleteEvent) String() string
type ConnectCookie
    func Connect(c *xgb.Conn, Window xproto.Window, DriverType uint32) ConnectCookie
    func ConnectUnchecked(c *xgb.Conn, Window xproto.Window, DriverType uint32) ConnectCookie
    func (cook ConnectCookie) Reply() (*ConnectReply, error)
type ConnectReply
type CopyRegionCookie
    func CopyRegion(c *xgb.Conn, Drawable xproto.Drawable, Region uint32, Dest uint32, Src uint32) CopyRegionCookie
    func CopyRegionUnchecked(c *xgb.Conn, Drawable xproto.Drawable, Region uint32, Dest uint32, Src uint32) CopyRegionCookie
    func (cook CopyRegionCookie) Reply() (*CopyRegionReply, error)
type CopyRegionReply
type CreateDrawableCookie
    func CreateDrawable(c *xgb.Conn, Drawable xproto.Drawable) CreateDrawableCookie
    func CreateDrawableChecked(c *xgb.Conn, Drawable xproto.Drawable) CreateDrawableCookie
    func (cook CreateDrawableCookie) Check() error
type DRI2Buffer
    func (v DRI2Buffer) Bytes() []byte
type DestroyDrawableCookie
    func DestroyDrawable(c *xgb.Conn, Drawable xproto.Drawable) DestroyDrawableCookie
    func DestroyDrawableChecked(c *xgb.Conn, Drawable xproto.Drawable) DestroyDrawableCookie
    func (cook DestroyDrawableCookie) Check() error
type GetBuffersCookie
    func GetBuffers(c *xgb.Conn, Drawable xproto.Drawable, Count uint32, Attachments []uint32) GetBuffersCookie
    func GetBuffersUnchecked(c *xgb.Conn, Drawable xproto.Drawable, Count uint32, Attachments []uint32) GetBuffersCookie
    func (cook GetBuffersCookie) Reply() (*GetBuffersReply, error)
type GetBuffersReply
type GetBuffersWithFormatCookie
    func GetBuffersWithFormat(c *xgb.Conn, Drawable xproto.Drawable, Count uint32, Attachments []AttachFormat) GetBuffersWithFormatCookie
    func GetBuffersWithFormatUnchecked(c *xgb.Conn, Drawable xproto.Drawable, Count uint32, Attachments []AttachFormat) GetBuffersWithFormatCookie
    func (cook GetBuffersWithFormatCookie) Reply() (*GetBuffersWithFormatReply, error)
type GetBuffersWithFormatReply
type GetMSCCookie
    func GetMSC(c *xgb.Conn, Drawable xproto.Drawable) GetMSCCookie
    func GetMSCUnchecked(c *xgb.Conn, Drawable xproto.Drawable) GetMSCCookie
    func (cook GetMSCCookie) Reply() (*GetMSCReply, error)
type GetMSCReply
type GetParamCookie
    func GetParam(c *xgb.Conn, Drawable xproto.Drawable, Param uint32) GetParamCookie
    func GetParamUnchecked(c *xgb.Conn, Drawable xproto.Drawable, Param uint32) GetParamCookie
    func (cook GetParamCookie) Reply() (*GetParamReply, error)
type GetParamReply
type InvalidateBuffersEvent
    func (v InvalidateBuffersEvent) Bytes() []byte
    func (v InvalidateBuffersEvent) SequenceId() uint16
    func (v InvalidateBuffersEvent) String() string
type QueryVersionCookie
    func QueryVersion(c *xgb.Conn, MajorVersion uint32, MinorVersion uint32) QueryVersionCookie
    func QueryVersionUnchecked(c *xgb.Conn, MajorVersion uint32, MinorVersion uint32) QueryVersionCookie
    func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error)
type QueryVersionReply
type SwapBuffersCookie
    func SwapBuffers(c *xgb.Conn, Drawable xproto.Drawable, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) SwapBuffersCookie
    func SwapBuffersUnchecked(c *xgb.Conn, Drawable xproto.Drawable, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) SwapBuffersCookie
    func (cook SwapBuffersCookie) Reply() (*SwapBuffersReply, error)
type SwapBuffersReply
type SwapIntervalCookie
    func SwapInterval(c *xgb.Conn, Drawable xproto.Drawable, Interval uint32) SwapIntervalCookie
    func SwapIntervalChecked(c *xgb.Conn, Drawable xproto.Drawable, Interval uint32) SwapIntervalCookie
    func (cook SwapIntervalCookie) Check() error
type WaitMSCCookie
    func WaitMSC(c *xgb.Conn, Drawable xproto.Drawable, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) WaitMSCCookie
    func WaitMSCUnchecked(c *xgb.Conn, Drawable xproto.Drawable, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) WaitMSCCookie
    func (cook WaitMSCCookie) Reply() (*WaitMSCReply, error)
type WaitMSCReply
type WaitSBCCookie
    func WaitSBC(c *xgb.Conn, Drawable xproto.Drawable, TargetSbcHi uint32, TargetSbcLo uint32) WaitSBCCookie
    func WaitSBCUnchecked(c *xgb.Conn, Drawable xproto.Drawable, TargetSbcHi uint32, TargetSbcLo uint32) WaitSBCCookie
    func (cook WaitSBCCookie) Reply() (*WaitSBCReply, error)
type WaitSBCReply

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
)

BufferSwapComplete is the event number for a BufferSwapCompleteEvent.

const BufferSwapComplete = 0

InvalidateBuffers is the event number for a InvalidateBuffersEvent.

const InvalidateBuffers = 1

func AttachFormatListBytes

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

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

func AttachFormatRead

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

AttachFormatRead reads a byte slice into a AttachFormat value.

func AttachFormatReadList

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

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

func BufferSwapCompleteEventNew

func BufferSwapCompleteEventNew(buf []byte) xgb.Event

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

func DRI2BufferListBytes

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

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

func DRI2BufferRead

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

DRI2BufferRead reads a byte slice into a DRI2Buffer value.

func DRI2BufferReadList

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

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

func Init

func Init(c *xgb.Conn) error

Init must be called before using the DRI2 extension.

func InvalidateBuffersEventNew

func InvalidateBuffersEventNew(buf []byte) xgb.Event

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

type AttachFormat

type AttachFormat struct {
    Attachment uint32
    Format     uint32
}

func (AttachFormat) Bytes

func (v AttachFormat) Bytes() []byte

Bytes writes a AttachFormat value to a byte slice.

type AuthenticateCookie

AuthenticateCookie is a cookie used only for Authenticate requests.

type AuthenticateCookie struct {
    *xgb.Cookie
}

func Authenticate

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

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

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

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

type AuthenticateReply

AuthenticateReply represents the data returned from a Authenticate request.

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
}

type BufferSwapCompleteEvent

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

func (v BufferSwapCompleteEvent) Bytes() []byte

Bytes writes a BufferSwapCompleteEvent value to a byte slice.

func (BufferSwapCompleteEvent) SequenceId

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

func (v BufferSwapCompleteEvent) String() string

String is a rudimentary string representation of BufferSwapCompleteEvent.

type ConnectCookie

ConnectCookie is a cookie used only for Connect requests.

type ConnectCookie struct {
    *xgb.Cookie
}

func Connect

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

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

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

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

type ConnectReply

ConnectReply represents the data returned from a Connect request.

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))
}

type CopyRegionCookie

CopyRegionCookie is a cookie used only for CopyRegion requests.

type CopyRegionCookie struct {
    *xgb.Cookie
}

func CopyRegion

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

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

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

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

type CopyRegionReply

CopyRegionReply represents the data returned from a CopyRegion request.

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

}

type CreateDrawableCookie

CreateDrawableCookie is a cookie used only for CreateDrawable requests.

type CreateDrawableCookie struct {
    *xgb.Cookie
}

func CreateDrawable

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

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

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

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

func (DRI2Buffer) Bytes

func (v DRI2Buffer) Bytes() []byte

Bytes writes a DRI2Buffer value to a byte slice.

type DestroyDrawableCookie

DestroyDrawableCookie is a cookie used only for DestroyDrawable requests.

type DestroyDrawableCookie struct {
    *xgb.Cookie
}

func DestroyDrawable

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

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

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

GetBuffersCookie is a cookie used only for GetBuffers requests.

type GetBuffersCookie struct {
    *xgb.Cookie
}

func GetBuffers

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

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

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

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

type GetBuffersReply

GetBuffersReply represents the data returned from a GetBuffers request.

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))
}

type GetBuffersWithFormatCookie

GetBuffersWithFormatCookie is a cookie used only for GetBuffersWithFormat requests.

type GetBuffersWithFormatCookie struct {
    *xgb.Cookie
}

func GetBuffersWithFormat

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

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

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

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

type GetBuffersWithFormatReply

GetBuffersWithFormatReply represents the data returned from a GetBuffersWithFormat request.

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))
}

type GetMSCCookie

GetMSCCookie is a cookie used only for GetMSC requests.

type GetMSCCookie struct {
    *xgb.Cookie
}

func GetMSC

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

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

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

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

type GetMSCReply

GetMSCReply represents the data returned from a GetMSC request.

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
}

type GetParamCookie

GetParamCookie is a cookie used only for GetParam requests.

type GetParamCookie struct {
    *xgb.Cookie
}

func GetParam

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

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

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

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

type GetParamReply

GetParamReply represents the data returned from a GetParam request.

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
}

type InvalidateBuffersEvent

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

func (InvalidateBuffersEvent) Bytes

func (v InvalidateBuffersEvent) Bytes() []byte

Bytes writes a InvalidateBuffersEvent value to a byte slice.

func (InvalidateBuffersEvent) SequenceId

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

func (v InvalidateBuffersEvent) String() string

String is a rudimentary string representation of InvalidateBuffersEvent.

type QueryVersionCookie

QueryVersionCookie is a cookie used only for QueryVersion requests.

type QueryVersionCookie struct {
    *xgb.Cookie
}

func QueryVersion

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

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

func (cook QueryVersionCookie) Reply() (*QueryVersionReply, error)

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

type QueryVersionReply

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
}

type SwapBuffersCookie

SwapBuffersCookie is a cookie used only for SwapBuffers requests.

type SwapBuffersCookie struct {
    *xgb.Cookie
}

func SwapBuffers

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

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

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

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

type SwapBuffersReply

SwapBuffersReply represents the data returned from a SwapBuffers request.

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
}

type SwapIntervalCookie

SwapIntervalCookie is a cookie used only for SwapInterval requests.

type SwapIntervalCookie struct {
    *xgb.Cookie
}

func SwapInterval

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

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

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

WaitMSCCookie is a cookie used only for WaitMSC requests.

type WaitMSCCookie struct {
    *xgb.Cookie
}

func WaitMSC

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

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

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

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

type WaitMSCReply

WaitMSCReply represents the data returned from a WaitMSC request.

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
}

type WaitSBCCookie

WaitSBCCookie is a cookie used only for WaitSBC requests.

type WaitSBCCookie struct {
    *xgb.Cookie
}

func WaitSBC

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

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

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

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

type WaitSBCReply

WaitSBCReply represents the data returned from a WaitSBC request.

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
}