Documentation ¶
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
- type AuthenticateCookie
- type AuthenticateReply
- type BufferSwapCompleteEvent
- type ConnectCookie
- type ConnectReply
- type CopyRegionCookie
- type CopyRegionReply
- type CreateDrawableCookie
- type DRI2Buffer
- type DestroyDrawableCookie
- type GetBuffersCookie
- type GetBuffersReply
- type GetBuffersWithFormatCookie
- type GetBuffersWithFormatReply
- type GetMSCCookie
- type GetMSCReply
- type GetParamCookie
- type GetParamReply
- type InvalidateBuffersEvent
- type QueryVersionCookie
- type QueryVersionReply
- type SwapBuffersCookie
- type SwapBuffersReply
- type SwapIntervalCookie
- type WaitMSCCookie
- type WaitMSCReply
- type WaitSBCCookie
- type WaitSBCReply
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.
Variables ¶
This section is empty.
Functions ¶
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 ¶
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 InvalidateBuffersEventNew ¶
InvalidateBuffersEventNew constructs a InvalidateBuffersEvent value that implements xgb.Event from a byte slice.
Types ¶
type AttachFormat ¶
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.
func Authenticate ¶
func Authenticate(c *xgb.Conn, buf []byte, Window xproto.Window, Magic uint32) (AuthenticateCookie, []byte)
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, buf []byte, Window xproto.Window, Magic uint32) (AuthenticateCookie, []byte)
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 ¶
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 ¶
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.
func Connect ¶
func Connect(c *xgb.Conn, buf []byte, Window xproto.Window, DriverType uint32) (ConnectCookie, []byte)
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, buf []byte, Window xproto.Window, DriverType uint32) (ConnectCookie, []byte)
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 ¶
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 ¶
CopyRegionCookie is a cookie used only for CopyRegion requests.
func CopyRegion ¶
func CopyRegion(c *xgb.Conn, buf []byte, Drawable xproto.Drawable, Region uint32, Dest uint32, Src uint32) (CopyRegionCookie, []byte)
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, buf []byte, Drawable xproto.Drawable, Region uint32, Dest uint32, Src uint32) (CopyRegionCookie, []byte)
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 ¶
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 ¶
CreateDrawableCookie is a cookie used only for CreateDrawable requests.
func CreateDrawable ¶
func CreateDrawable(c *xgb.Conn, buf []byte, Drawable xproto.Drawable) (CreateDrawableCookie, []byte)
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, buf []byte, Drawable xproto.Drawable) (CreateDrawableCookie, []byte)
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 ¶
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.
func DestroyDrawable ¶
func DestroyDrawable(c *xgb.Conn, buf []byte, Drawable xproto.Drawable) (DestroyDrawableCookie, []byte)
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, buf []byte, Drawable xproto.Drawable) (DestroyDrawableCookie, []byte)
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.
func GetBuffers ¶
func GetBuffers(c *xgb.Conn, buf []byte, Drawable xproto.Drawable, Count uint32, Attachments []uint32) (GetBuffersCookie, []byte)
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, buf []byte, Drawable xproto.Drawable, Count uint32, Attachments []uint32) (GetBuffersCookie, []byte)
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 ¶
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 ¶
GetBuffersWithFormatCookie is a cookie used only for GetBuffersWithFormat requests.
func GetBuffersWithFormat ¶
func GetBuffersWithFormat(c *xgb.Conn, buf []byte, Drawable xproto.Drawable, Count uint32, Attachments []AttachFormat) (GetBuffersWithFormatCookie, []byte)
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, buf []byte, Drawable xproto.Drawable, Count uint32, Attachments []AttachFormat) (GetBuffersWithFormatCookie, []byte)
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 ¶
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 ¶
GetMSCCookie is a cookie used only for GetMSC requests.
func GetMSC ¶
GetMSC sends a checked request. If an error occurs, it will be returned with the reply by calling GetMSCCookie.Reply()
func GetMSCUnchecked ¶
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 ¶
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 ¶
GetParamCookie is a cookie used only for GetParam requests.
func GetParam ¶
func GetParam(c *xgb.Conn, buf []byte, Drawable xproto.Drawable, Param uint32) (GetParamCookie, []byte)
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, buf []byte, Drawable xproto.Drawable, Param uint32) (GetParamCookie, []byte)
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 ¶
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 ¶
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.
func QueryVersion ¶
func QueryVersion(c *xgb.Conn, buf []byte, MajorVersion uint32, MinorVersion uint32) (QueryVersionCookie, []byte)
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, buf []byte, MajorVersion uint32, MinorVersion uint32) (QueryVersionCookie, []byte)
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 SwapBuffersCookie ¶
SwapBuffersCookie is a cookie used only for SwapBuffers requests.
func SwapBuffers ¶
func SwapBuffers(c *xgb.Conn, buf []byte, Drawable xproto.Drawable, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) (SwapBuffersCookie, []byte)
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, buf []byte, Drawable xproto.Drawable, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) (SwapBuffersCookie, []byte)
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 ¶
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 ¶
SwapIntervalCookie is a cookie used only for SwapInterval requests.
func SwapInterval ¶
func SwapInterval(c *xgb.Conn, buf []byte, Drawable xproto.Drawable, Interval uint32) (SwapIntervalCookie, []byte)
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, buf []byte, Drawable xproto.Drawable, Interval uint32) (SwapIntervalCookie, []byte)
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.
func WaitMSC ¶
func WaitMSC(c *xgb.Conn, buf []byte, Drawable xproto.Drawable, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) (WaitMSCCookie, []byte)
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, buf []byte, Drawable xproto.Drawable, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) (WaitMSCCookie, []byte)
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 ¶
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 ¶
WaitSBCCookie is a cookie used only for WaitSBC requests.
func WaitSBC ¶
func WaitSBC(c *xgb.Conn, buf []byte, Drawable xproto.Drawable, TargetSbcHi uint32, TargetSbcLo uint32) (WaitSBCCookie, []byte)
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, buf []byte, Drawable xproto.Drawable, TargetSbcHi uint32, TargetSbcLo uint32) (WaitSBCCookie, []byte)
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 ¶
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.