dri2

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2024 License: BSD-3-Clause, GooglePatentClause Imports: 6 Imported by: 0

Documentation

Overview

FILE GENERATED AUTOMATICALLY FROM "dri2.xml"

Index

Constants

View Source
const (
	// ExtName is the user-friendly name string of this X extension.
	ExtName = "DRI2"

	// ExtXName is the name string this extension is known by to the X server.
	ExtXName = "DRI2"
)
View Source
const (
	AttachmentBufferFrontLeft      = 0
	AttachmentBufferBackLeft       = 1
	AttachmentBufferFrontRight     = 2
	AttachmentBufferBackRight      = 3
	AttachmentBufferDepth          = 4
	AttachmentBufferStencil        = 5
	AttachmentBufferAccum          = 6
	AttachmentBufferFakeFrontLeft  = 7
	AttachmentBufferFakeFrontRight = 8
	AttachmentBufferDepthStencil   = 9
	AttachmentBufferHiz            = 10
)
View Source
const (
	DriverTypeDri   = 0
	DriverTypeVdpau = 1
)
View Source
const (
	EventTypeExchangeComplete = 1
	EventTypeBlitComplete     = 2
	EventTypeFlipComplete     = 3
)
View Source
const BufferSwapComplete = 0

BufferSwapComplete is the event number for a BufferSwapCompleteEvent.

View Source
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 AuthenticateUnchecked

func AuthenticateUnchecked(c *xgb.XConn, Window xproto.Window, Magic uint32) error

AuthenticateUnchecked sends an unchecked request.

func ConnectUnchecked

func ConnectUnchecked(c *xgb.XConn, Window xproto.Window, DriverType uint32) error

ConnectUnchecked sends an unchecked request.

func CopyRegionUnchecked

func CopyRegionUnchecked(c *xgb.XConn, Drawable xproto.Drawable, Region uint32, Dest uint32, Src uint32) error

CopyRegionUnchecked sends an unchecked request.

func CreateDrawable

func CreateDrawable(c *xgb.XConn, Drawable xproto.Drawable) error

CreateDrawable sends a checked request.

func CreateDrawableUnchecked added in v1.1.0

func CreateDrawableUnchecked(c *xgb.XConn, Drawable xproto.Drawable) error

CreateDrawableUnchecked sends an unchecked request.

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 DestroyDrawable

func DestroyDrawable(c *xgb.XConn, Drawable xproto.Drawable) error

DestroyDrawable sends a checked request.

func DestroyDrawableUnchecked added in v1.1.0

func DestroyDrawableUnchecked(c *xgb.XConn, Drawable xproto.Drawable) error

DestroyDrawableUnchecked sends an unchecked request.

func GetBuffersUnchecked

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

GetBuffersUnchecked sends an unchecked request.

func GetBuffersWithFormatUnchecked

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

GetBuffersWithFormatUnchecked sends an unchecked request.

func GetMSCUnchecked

func GetMSCUnchecked(c *xgb.XConn, Drawable xproto.Drawable) error

GetMSCUnchecked sends an unchecked request.

func GetParamUnchecked

func GetParamUnchecked(c *xgb.XConn, Drawable xproto.Drawable, Param uint32) error

GetParamUnchecked sends an unchecked request.

func QueryVersionUnchecked

func QueryVersionUnchecked(c *xgb.XConn, MajorVersion uint32, MinorVersion uint32) error

QueryVersionUnchecked sends an unchecked request.

func Register added in v1.1.0

func Register(xconn *xgb.XConn) error

Register will query the X server for DRI2 extension support, and register relevant extension unmarshalers with the XConn.

func SwapBuffersUnchecked

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

SwapBuffersUnchecked sends an unchecked request.

func SwapInterval

func SwapInterval(c *xgb.XConn, Drawable xproto.Drawable, Interval uint32) error

SwapInterval sends a checked request.

func SwapIntervalUnchecked added in v1.1.0

func SwapIntervalUnchecked(c *xgb.XConn, Drawable xproto.Drawable, Interval uint32) error

SwapIntervalUnchecked sends an unchecked request.

func UnmarshalBufferSwapCompleteEvent added in v1.1.0

func UnmarshalBufferSwapCompleteEvent(buf []byte) (xgb.XEvent, error)

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

func UnmarshalInvalidateBuffersEvent added in v1.1.0

func UnmarshalInvalidateBuffersEvent(buf []byte) (xgb.XEvent, error)

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

func WaitMSCUnchecked

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

WaitMSCUnchecked sends an unchecked request.

func WaitSBCUnchecked

func WaitSBCUnchecked(c *xgb.XConn, Drawable xproto.Drawable, TargetSbcHi uint32, TargetSbcLo uint32) error

WaitSBCUnchecked sends an unchecked request.

Types

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

func Authenticate

func Authenticate(c *xgb.XConn, Window xproto.Window, Magic uint32) (AuthenticateReply, error)

Authenticate sends a checked request.

func (*AuthenticateReply) Unmarshal added in v1.1.0

func (v *AuthenticateReply) Unmarshal(buf []byte) error

Unmarshal reads a byte slice into a AuthenticateReply value.

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) SeqID added in v1.1.0

func (v *BufferSwapCompleteEvent) SeqID() uint16

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

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: internal.Pad4((int(DriverNameLength) * 1))
	AlignmentPad []byte // size: internal.Pad4(((((int(DriverNameLength) + 3) & -4) - int(DriverNameLength)) * 1))
	DeviceName   string // size: internal.Pad4((int(DeviceNameLength) * 1))
}

ConnectReply represents the data returned from a Connect request.

func Connect

func Connect(c *xgb.XConn, Window xproto.Window, DriverType uint32) (ConnectReply, error)

Connect sends a checked request.

func (*ConnectReply) Unmarshal added in v1.1.0

func (v *ConnectReply) Unmarshal(buf []byte) error

Unmarshal reads a byte slice into a ConnectReply value.

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.

func CopyRegion

func CopyRegion(c *xgb.XConn, Drawable xproto.Drawable, Region uint32, Dest uint32, Src uint32) (CopyRegionReply, error)

CopyRegion sends a checked request.

func (*CopyRegionReply) Unmarshal added in v1.1.0

func (v *CopyRegionReply) Unmarshal(buf []byte) error

Unmarshal reads a byte slice into a CopyRegionReply value.

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 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: internal.Pad4((int(Count) * 20))
}

GetBuffersReply represents the data returned from a GetBuffers request.

func GetBuffers

func GetBuffers(c *xgb.XConn, Drawable xproto.Drawable, Count uint32, Attachments []uint32) (GetBuffersReply, error)

GetBuffers sends a checked request.

func (*GetBuffersReply) Unmarshal added in v1.1.0

func (v *GetBuffersReply) Unmarshal(buf []byte) error

Unmarshal reads a byte slice into a GetBuffersReply value.

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: internal.Pad4((int(Count) * 20))
}

GetBuffersWithFormatReply represents the data returned from a GetBuffersWithFormat request.

func GetBuffersWithFormat

func GetBuffersWithFormat(c *xgb.XConn, Drawable xproto.Drawable, Count uint32, Attachments []AttachFormat) (GetBuffersWithFormatReply, error)

GetBuffersWithFormat sends a checked request.

func (*GetBuffersWithFormatReply) Unmarshal added in v1.1.0

func (v *GetBuffersWithFormatReply) Unmarshal(buf []byte) error

Unmarshal reads a byte slice into a GetBuffersWithFormatReply value.

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.

func GetMSC

func GetMSC(c *xgb.XConn, Drawable xproto.Drawable) (GetMSCReply, error)

GetMSC sends a checked request.

func (*GetMSCReply) Unmarshal added in v1.1.0

func (v *GetMSCReply) Unmarshal(buf []byte) error

Unmarshal reads a byte slice into a GetMSCReply value.

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.

func GetParam

func GetParam(c *xgb.XConn, Drawable xproto.Drawable, Param uint32) (GetParamReply, error)

GetParam sends a checked request.

func (*GetParamReply) Unmarshal added in v1.1.0

func (v *GetParamReply) Unmarshal(buf []byte) error

Unmarshal reads a byte slice into a GetParamReply value.

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) SeqID added in v1.1.0

func (v *InvalidateBuffersEvent) SeqID() uint16

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

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.

func QueryVersion

func QueryVersion(c *xgb.XConn, MajorVersion uint32, MinorVersion uint32) (QueryVersionReply, error)

QueryVersion sends a checked request.

func (*QueryVersionReply) Unmarshal added in v1.1.0

func (v *QueryVersionReply) Unmarshal(buf []byte) error

Unmarshal reads a byte slice into a QueryVersionReply value.

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.

func SwapBuffers

func SwapBuffers(c *xgb.XConn, Drawable xproto.Drawable, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) (SwapBuffersReply, error)

SwapBuffers sends a checked request.

func (*SwapBuffersReply) Unmarshal added in v1.1.0

func (v *SwapBuffersReply) Unmarshal(buf []byte) error

Unmarshal reads a byte slice into a SwapBuffersReply value.

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.

func WaitMSC

func WaitMSC(c *xgb.XConn, Drawable xproto.Drawable, TargetMscHi uint32, TargetMscLo uint32, DivisorHi uint32, DivisorLo uint32, RemainderHi uint32, RemainderLo uint32) (WaitMSCReply, error)

WaitMSC sends a checked request.

func (*WaitMSCReply) Unmarshal added in v1.1.0

func (v *WaitMSCReply) Unmarshal(buf []byte) error

Unmarshal reads a byte slice into a WaitMSCReply value.

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.

func WaitSBC

func WaitSBC(c *xgb.XConn, Drawable xproto.Drawable, TargetSbcHi uint32, TargetSbcLo uint32) (WaitSBCReply, error)

WaitSBC sends a checked request.

func (*WaitSBCReply) Unmarshal added in v1.1.0

func (v *WaitSBCReply) Unmarshal(buf []byte) error

Unmarshal reads a byte slice into a WaitSBCReply value.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL