xv

package
v0.0.0-...-deaf085 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2021 License: BSD-3-Clause, GooglePatentClause Imports: 3 Imported by: 12

Documentation

Overview

Package xv is the X client API for the XVideo extension.

Index

Constants

View Source
const (
	AttributeFlagGettable = 1
	AttributeFlagSettable = 2
)
View Source
const (
	GrabPortStatusSuccess        = 0
	GrabPortStatusBadExtension   = 1
	GrabPortStatusAlreadyGrabbed = 2
	GrabPortStatusInvalidTime    = 3
	GrabPortStatusBadReply       = 4
	GrabPortStatusBadAlloc       = 5
)
View Source
const (
	ImageFormatInfoFormatPacked = 0
	ImageFormatInfoFormatPlanar = 1
)
View Source
const (
	ImageFormatInfoTypeRgb = 0
	ImageFormatInfoTypeYuv = 1
)
View Source
const (
	ScanlineOrderTopToBottom = 0
	ScanlineOrderBottomToTop = 1
)
View Source
const (
	TypeInputMask  = 1
	TypeOutputMask = 2
	TypeVideoMask  = 4
	TypeStillMask  = 8
	TypeImageMask  = 16
)
View Source
const (
	VideoNotifyReasonStarted   = 0
	VideoNotifyReasonStopped   = 1
	VideoNotifyReasonBusy      = 2
	VideoNotifyReasonPreempted = 3
	VideoNotifyReasonHardError = 4
)
View Source
const BadBadControl = 2

BadBadControl is the error number for a BadBadControl.

View Source
const BadBadEncoding = 1

BadBadEncoding is the error number for a BadBadEncoding.

View Source
const BadBadPort = 0

BadBadPort is the error number for a BadBadPort.

View Source
const PortNotify = 1

PortNotify is the event number for a PortNotifyEvent.

View Source
const VideoNotify = 0

VideoNotify is the event number for a VideoNotifyEvent.

Variables

This section is empty.

Functions

func AdaptorInfoListBytes

func AdaptorInfoListBytes(buf []byte, list []AdaptorInfo) int

AdaptorInfoListBytes writes a list of AdaptorInfo values to a byte slice.

func AdaptorInfoListSize

func AdaptorInfoListSize(list []AdaptorInfo) int

AdaptorInfoListSize computes the size (bytes) of a list of AdaptorInfo values.

func AdaptorInfoRead

func AdaptorInfoRead(buf []byte, v *AdaptorInfo) int

AdaptorInfoRead reads a byte slice into a AdaptorInfo value.

func AdaptorInfoReadList

func AdaptorInfoReadList(buf []byte, dest []AdaptorInfo) int

AdaptorInfoReadList reads a byte slice into a list of AdaptorInfo values.

func AttributeInfoListBytes

func AttributeInfoListBytes(buf []byte, list []AttributeInfo) int

AttributeInfoListBytes writes a list of AttributeInfo values to a byte slice.

func AttributeInfoListSize

func AttributeInfoListSize(list []AttributeInfo) int

AttributeInfoListSize computes the size (bytes) of a list of AttributeInfo values.

func AttributeInfoRead

func AttributeInfoRead(buf []byte, v *AttributeInfo) int

AttributeInfoRead reads a byte slice into a AttributeInfo value.

func AttributeInfoReadList

func AttributeInfoReadList(buf []byte, dest []AttributeInfo) int

AttributeInfoReadList reads a byte slice into a list of AttributeInfo values.

func BadControlErrorNew

func BadControlErrorNew(buf []byte) xgb.Error

BadControlErrorNew constructs a BadControlError value that implements xgb.Error from a byte slice.

func BadEncodingErrorNew

func BadEncodingErrorNew(buf []byte) xgb.Error

BadEncodingErrorNew constructs a BadEncodingError value that implements xgb.Error from a byte slice.

func BadPortErrorNew

func BadPortErrorNew(buf []byte) xgb.Error

BadPortErrorNew constructs a BadPortError value that implements xgb.Error from a byte slice.

func EncodingInfoListBytes

func EncodingInfoListBytes(buf []byte, list []EncodingInfo) int

EncodingInfoListBytes writes a list of EncodingInfo values to a byte slice.

func EncodingInfoListSize

func EncodingInfoListSize(list []EncodingInfo) int

EncodingInfoListSize computes the size (bytes) of a list of EncodingInfo values.

func EncodingInfoRead

func EncodingInfoRead(buf []byte, v *EncodingInfo) int

EncodingInfoRead reads a byte slice into a EncodingInfo value.

func EncodingInfoReadList

func EncodingInfoReadList(buf []byte, dest []EncodingInfo) int

EncodingInfoReadList reads a byte slice into a list of EncodingInfo values.

func FormatListBytes

func FormatListBytes(buf []byte, list []Format) int

FormatListBytes writes a list of Format values to a byte slice.

func FormatRead

func FormatRead(buf []byte, v *Format) int

FormatRead reads a byte slice into a Format value.

func FormatReadList

func FormatReadList(buf []byte, dest []Format) int

FormatReadList reads a byte slice into a list of Format values.

func ImageFormatInfoListBytes

func ImageFormatInfoListBytes(buf []byte, list []ImageFormatInfo) int

ImageFormatInfoListBytes writes a list of ImageFormatInfo values to a byte slice.

func ImageFormatInfoListSize

func ImageFormatInfoListSize(list []ImageFormatInfo) int

ImageFormatInfoListSize computes the size (bytes) of a list of ImageFormatInfo values.

func ImageFormatInfoRead

func ImageFormatInfoRead(buf []byte, v *ImageFormatInfo) int

ImageFormatInfoRead reads a byte slice into a ImageFormatInfo value.

func ImageFormatInfoReadList

func ImageFormatInfoReadList(buf []byte, dest []ImageFormatInfo) int

ImageFormatInfoReadList reads a byte slice into a list of ImageFormatInfo values.

func ImageListBytes

func ImageListBytes(buf []byte, list []Image) int

ImageListBytes writes a list of Image values to a byte slice.

func ImageListSize

func ImageListSize(list []Image) int

ImageListSize computes the size (bytes) of a list of Image values.

func ImageRead

func ImageRead(buf []byte, v *Image) int

ImageRead reads a byte slice into a Image value.

func ImageReadList

func ImageReadList(buf []byte, dest []Image) int

ImageReadList reads a byte slice into a list of Image values.

func Init

func Init(c *xgb.Conn) error

Init must be called before using the XVideo extension.

func PortNotifyEventNew

func PortNotifyEventNew(buf []byte) xgb.Event

PortNotifyEventNew constructs a PortNotifyEvent value that implements xgb.Event from a byte slice.

func RationalListBytes

func RationalListBytes(buf []byte, list []Rational) int

RationalListBytes writes a list of Rational values to a byte slice.

func RationalRead

func RationalRead(buf []byte, v *Rational) int

RationalRead reads a byte slice into a Rational value.

func RationalReadList

func RationalReadList(buf []byte, dest []Rational) int

RationalReadList reads a byte slice into a list of Rational values.

func VideoNotifyEventNew

func VideoNotifyEventNew(buf []byte) xgb.Event

VideoNotifyEventNew constructs a VideoNotifyEvent value that implements xgb.Event from a byte slice.

Types

type AdaptorInfo

type AdaptorInfo struct {
	BaseId     Port
	NameSize   uint16
	NumPorts   uint16
	NumFormats uint16
	Type       byte
	// padding: 1 bytes
	Name string // size: xgb.Pad((int(NameSize) * 1))
	// padding: 0 bytes
	Formats []Format // size: xgb.Pad((int(NumFormats) * 8))
}

func (AdaptorInfo) Bytes

func (v AdaptorInfo) Bytes() []byte

Bytes writes a AdaptorInfo value to a byte slice.

type AttributeInfo

type AttributeInfo struct {
	Flags uint32
	Min   int32
	Max   int32
	Size  uint32
	Name  string // size: xgb.Pad((int(Size) * 1))
}

func (AttributeInfo) Bytes

func (v AttributeInfo) Bytes() []byte

Bytes writes a AttributeInfo value to a byte slice.

type BadControlError

type BadControlError struct {
	Sequence uint16
	NiceName string
}

func (BadControlError) BadId

func (err BadControlError) BadId() uint32

BadId returns the 'BadValue' number if one exists for the BadBadControl error. If no bad value exists, 0 is returned.

func (BadControlError) Error

func (err BadControlError) Error() string

func (BadControlError) SequenceId

func (err BadControlError) SequenceId() uint16

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

type BadEncodingError

type BadEncodingError struct {
	Sequence uint16
	NiceName string
}

func (BadEncodingError) BadId

func (err BadEncodingError) BadId() uint32

BadId returns the 'BadValue' number if one exists for the BadBadEncoding error. If no bad value exists, 0 is returned.

func (BadEncodingError) Error

func (err BadEncodingError) Error() string

func (BadEncodingError) SequenceId

func (err BadEncodingError) SequenceId() uint16

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

type BadPortError

type BadPortError struct {
	Sequence uint16
	NiceName string
}

func (BadPortError) BadId

func (err BadPortError) BadId() uint32

BadId returns the 'BadValue' number if one exists for the BadBadPort error. If no bad value exists, 0 is returned.

func (BadPortError) Error

func (err BadPortError) Error() string

func (BadPortError) SequenceId

func (err BadPortError) SequenceId() uint16

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

type Encoding

type Encoding uint32

func NewEncodingId

func NewEncodingId(c *xgb.Conn) (Encoding, error)

type EncodingInfo

type EncodingInfo struct {
	Encoding Encoding
	NameSize uint16
	Width    uint16
	Height   uint16
	// padding: 2 bytes
	Rate Rational
	Name string // size: xgb.Pad((int(NameSize) * 1))
}

func (EncodingInfo) Bytes

func (v EncodingInfo) Bytes() []byte

Bytes writes a EncodingInfo value to a byte slice.

type Format

type Format struct {
	Visual xproto.Visualid
	Depth  byte
}

func (Format) Bytes

func (v Format) Bytes() []byte

Bytes writes a Format value to a byte slice.

type GetPortAttributeCookie

type GetPortAttributeCookie struct {
	*xgb.Cookie
}

GetPortAttributeCookie is a cookie used only for GetPortAttribute requests.

func GetPortAttribute

func GetPortAttribute(c *xgb.Conn, Port Port, Attribute xproto.Atom) GetPortAttributeCookie

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

func GetPortAttributeUnchecked

func GetPortAttributeUnchecked(c *xgb.Conn, Port Port, Attribute xproto.Atom) GetPortAttributeCookie

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

func (GetPortAttributeCookie) Reply

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

type GetPortAttributeReply

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

GetPortAttributeReply represents the data returned from a GetPortAttribute request.

type GetStillCookie

type GetStillCookie struct {
	*xgb.Cookie
}

GetStillCookie is a cookie used only for GetStill requests.

func GetStill

func GetStill(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) GetStillCookie

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

func GetStillChecked

func GetStillChecked(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) GetStillCookie

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

func (GetStillCookie) Check

func (cook GetStillCookie) 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 GetVideoCookie

type GetVideoCookie struct {
	*xgb.Cookie
}

GetVideoCookie is a cookie used only for GetVideo requests.

func GetVideo

func GetVideo(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) GetVideoCookie

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

func GetVideoChecked

func GetVideoChecked(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) GetVideoCookie

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

func (GetVideoCookie) Check

func (cook GetVideoCookie) 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 GrabPortCookie

type GrabPortCookie struct {
	*xgb.Cookie
}

GrabPortCookie is a cookie used only for GrabPort requests.

func GrabPort

func GrabPort(c *xgb.Conn, Port Port, Time xproto.Timestamp) GrabPortCookie

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

func GrabPortUnchecked

func GrabPortUnchecked(c *xgb.Conn, Port Port, Time xproto.Timestamp) GrabPortCookie

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

func (GrabPortCookie) Reply

func (cook GrabPortCookie) Reply() (*GrabPortReply, error)

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

type GrabPortReply

type GrabPortReply struct {
	Sequence uint16 // sequence number of the request for this reply
	Length   uint32 // number of bytes in this reply
	Result   byte
}

GrabPortReply represents the data returned from a GrabPort request.

type Image

type Image struct {
	Id        uint32
	Width     uint16
	Height    uint16
	DataSize  uint32
	NumPlanes uint32
	Pitches   []uint32 // size: xgb.Pad((int(NumPlanes) * 4))
	// alignment gap to multiple of 4
	Offsets []uint32 // size: xgb.Pad((int(NumPlanes) * 4))
	Data    []byte   // size: xgb.Pad((int(DataSize) * 1))
}

func (Image) Bytes

func (v Image) Bytes() []byte

Bytes writes a Image value to a byte slice.

type ImageFormatInfo

type ImageFormatInfo struct {
	Id        uint32
	Type      byte
	ByteOrder byte
	// padding: 2 bytes
	Guid      []byte // size: 16
	Bpp       byte
	NumPlanes byte
	// padding: 2 bytes
	Depth byte
	// padding: 3 bytes
	RedMask   uint32
	GreenMask uint32
	BlueMask  uint32
	Format    byte
	// padding: 3 bytes
	YSampleBits    uint32
	USampleBits    uint32
	VSampleBits    uint32
	VhorzYPeriod   uint32
	VhorzUPeriod   uint32
	VhorzVPeriod   uint32
	VvertYPeriod   uint32
	VvertUPeriod   uint32
	VvertVPeriod   uint32
	VcompOrder     []byte // size: 32
	VscanlineOrder byte
}

func (ImageFormatInfo) Bytes

func (v ImageFormatInfo) Bytes() []byte

Bytes writes a ImageFormatInfo value to a byte slice.

type ListImageFormatsCookie

type ListImageFormatsCookie struct {
	*xgb.Cookie
}

ListImageFormatsCookie is a cookie used only for ListImageFormats requests.

func ListImageFormats

func ListImageFormats(c *xgb.Conn, Port Port) ListImageFormatsCookie

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

func ListImageFormatsUnchecked

func ListImageFormatsUnchecked(c *xgb.Conn, Port Port) ListImageFormatsCookie

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

func (ListImageFormatsCookie) Reply

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

type ListImageFormatsReply

type ListImageFormatsReply struct {
	Sequence uint16 // sequence number of the request for this reply
	Length   uint32 // number of bytes in this reply
	// padding: 1 bytes
	NumFormats uint32
	// padding: 20 bytes
	Format []ImageFormatInfo // size: ImageFormatInfoListSize(Format)
}

ListImageFormatsReply represents the data returned from a ListImageFormats request.

type Port

type Port uint32

func NewPortId

func NewPortId(c *xgb.Conn) (Port, error)

type PortNotifyEvent

type PortNotifyEvent struct {
	Sequence uint16
	// padding: 1 bytes
	Time      xproto.Timestamp
	Port      Port
	Attribute xproto.Atom
	Value     int32
}

func (PortNotifyEvent) Bytes

func (v PortNotifyEvent) Bytes() []byte

Bytes writes a PortNotifyEvent value to a byte slice.

func (PortNotifyEvent) SequenceId

func (v PortNotifyEvent) SequenceId() uint16

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

func (PortNotifyEvent) String

func (v PortNotifyEvent) String() string

String is a rudimentary string representation of PortNotifyEvent.

type PutImageCookie

type PutImageCookie struct {
	*xgb.Cookie
}

PutImageCookie is a cookie used only for PutImage requests.

func PutImage

func PutImage(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, Id uint32, SrcX int16, SrcY int16, SrcW uint16, SrcH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16, Width uint16, Height uint16, Data []byte) PutImageCookie

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

func PutImageChecked

func PutImageChecked(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, Id uint32, SrcX int16, SrcY int16, SrcW uint16, SrcH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16, Width uint16, Height uint16, Data []byte) PutImageCookie

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

func (PutImageCookie) Check

func (cook PutImageCookie) 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 PutStillCookie

type PutStillCookie struct {
	*xgb.Cookie
}

PutStillCookie is a cookie used only for PutStill requests.

func PutStill

func PutStill(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) PutStillCookie

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

func PutStillChecked

func PutStillChecked(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) PutStillCookie

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

func (PutStillCookie) Check

func (cook PutStillCookie) 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 PutVideoCookie

type PutVideoCookie struct {
	*xgb.Cookie
}

PutVideoCookie is a cookie used only for PutVideo requests.

func PutVideo

func PutVideo(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) PutVideoCookie

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

func PutVideoChecked

func PutVideoChecked(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, VidX int16, VidY int16, VidW uint16, VidH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16) PutVideoCookie

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

func (PutVideoCookie) Check

func (cook PutVideoCookie) 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 QueryAdaptorsCookie

type QueryAdaptorsCookie struct {
	*xgb.Cookie
}

QueryAdaptorsCookie is a cookie used only for QueryAdaptors requests.

func QueryAdaptors

func QueryAdaptors(c *xgb.Conn, Window xproto.Window) QueryAdaptorsCookie

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

func QueryAdaptorsUnchecked

func QueryAdaptorsUnchecked(c *xgb.Conn, Window xproto.Window) QueryAdaptorsCookie

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

func (QueryAdaptorsCookie) Reply

func (cook QueryAdaptorsCookie) Reply() (*QueryAdaptorsReply, error)

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

type QueryAdaptorsReply

type QueryAdaptorsReply struct {
	Sequence uint16 // sequence number of the request for this reply
	Length   uint32 // number of bytes in this reply
	// padding: 1 bytes
	NumAdaptors uint16
	// padding: 22 bytes
	Info []AdaptorInfo // size: AdaptorInfoListSize(Info)
}

QueryAdaptorsReply represents the data returned from a QueryAdaptors request.

type QueryBestSizeCookie

type QueryBestSizeCookie struct {
	*xgb.Cookie
}

QueryBestSizeCookie is a cookie used only for QueryBestSize requests.

func QueryBestSize

func QueryBestSize(c *xgb.Conn, Port Port, VidW uint16, VidH uint16, DrwW uint16, DrwH uint16, Motion bool) QueryBestSizeCookie

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

func QueryBestSizeUnchecked

func QueryBestSizeUnchecked(c *xgb.Conn, Port Port, VidW uint16, VidH uint16, DrwW uint16, DrwH uint16, Motion bool) QueryBestSizeCookie

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

func (QueryBestSizeCookie) Reply

func (cook QueryBestSizeCookie) Reply() (*QueryBestSizeReply, error)

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

type QueryBestSizeReply

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

QueryBestSizeReply represents the data returned from a QueryBestSize request.

type QueryEncodingsCookie

type QueryEncodingsCookie struct {
	*xgb.Cookie
}

QueryEncodingsCookie is a cookie used only for QueryEncodings requests.

func QueryEncodings

func QueryEncodings(c *xgb.Conn, Port Port) QueryEncodingsCookie

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

func QueryEncodingsUnchecked

func QueryEncodingsUnchecked(c *xgb.Conn, Port Port) QueryEncodingsCookie

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

func (QueryEncodingsCookie) Reply

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

type QueryEncodingsReply

type QueryEncodingsReply struct {
	Sequence uint16 // sequence number of the request for this reply
	Length   uint32 // number of bytes in this reply
	// padding: 1 bytes
	NumEncodings uint16
	// padding: 22 bytes
	Info []EncodingInfo // size: EncodingInfoListSize(Info)
}

QueryEncodingsReply represents the data returned from a QueryEncodings request.

type QueryExtensionCookie

type QueryExtensionCookie struct {
	*xgb.Cookie
}

QueryExtensionCookie is a cookie used only for QueryExtension requests.

func QueryExtension

func QueryExtension(c *xgb.Conn) QueryExtensionCookie

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

func QueryExtensionUnchecked

func QueryExtensionUnchecked(c *xgb.Conn) QueryExtensionCookie

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

func (QueryExtensionCookie) Reply

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

type QueryExtensionReply

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

QueryExtensionReply represents the data returned from a QueryExtension request.

type QueryImageAttributesCookie

type QueryImageAttributesCookie struct {
	*xgb.Cookie
}

QueryImageAttributesCookie is a cookie used only for QueryImageAttributes requests.

func QueryImageAttributes

func QueryImageAttributes(c *xgb.Conn, Port Port, Id uint32, Width uint16, Height uint16) QueryImageAttributesCookie

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

func QueryImageAttributesUnchecked

func QueryImageAttributesUnchecked(c *xgb.Conn, Port Port, Id uint32, Width uint16, Height uint16) QueryImageAttributesCookie

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

func (QueryImageAttributesCookie) Reply

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

type QueryImageAttributesReply

type QueryImageAttributesReply struct {
	Sequence uint16 // sequence number of the request for this reply
	Length   uint32 // number of bytes in this reply
	// padding: 1 bytes
	NumPlanes uint32
	DataSize  uint32
	Width     uint16
	Height    uint16
	// padding: 12 bytes
	Pitches []uint32 // size: xgb.Pad((int(NumPlanes) * 4))
	// alignment gap to multiple of 4
	Offsets []uint32 // size: xgb.Pad((int(NumPlanes) * 4))
}

QueryImageAttributesReply represents the data returned from a QueryImageAttributes request.

type QueryPortAttributesCookie

type QueryPortAttributesCookie struct {
	*xgb.Cookie
}

QueryPortAttributesCookie is a cookie used only for QueryPortAttributes requests.

func QueryPortAttributes

func QueryPortAttributes(c *xgb.Conn, Port Port) QueryPortAttributesCookie

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

func QueryPortAttributesUnchecked

func QueryPortAttributesUnchecked(c *xgb.Conn, Port Port) QueryPortAttributesCookie

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

func (QueryPortAttributesCookie) Reply

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

type QueryPortAttributesReply

type QueryPortAttributesReply struct {
	Sequence uint16 // sequence number of the request for this reply
	Length   uint32 // number of bytes in this reply
	// padding: 1 bytes
	NumAttributes uint32
	TextSize      uint32
	// padding: 16 bytes
	Attributes []AttributeInfo // size: AttributeInfoListSize(Attributes)
}

QueryPortAttributesReply represents the data returned from a QueryPortAttributes request.

type Rational

type Rational struct {
	Numerator   int32
	Denominator int32
}

func (Rational) Bytes

func (v Rational) Bytes() []byte

Bytes writes a Rational value to a byte slice.

type SelectPortNotifyCookie

type SelectPortNotifyCookie struct {
	*xgb.Cookie
}

SelectPortNotifyCookie is a cookie used only for SelectPortNotify requests.

func SelectPortNotify

func SelectPortNotify(c *xgb.Conn, Port Port, Onoff bool) SelectPortNotifyCookie

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

func SelectPortNotifyChecked

func SelectPortNotifyChecked(c *xgb.Conn, Port Port, Onoff bool) SelectPortNotifyCookie

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

func (SelectPortNotifyCookie) Check

func (cook SelectPortNotifyCookie) 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 SelectVideoNotifyCookie

type SelectVideoNotifyCookie struct {
	*xgb.Cookie
}

SelectVideoNotifyCookie is a cookie used only for SelectVideoNotify requests.

func SelectVideoNotify

func SelectVideoNotify(c *xgb.Conn, Drawable xproto.Drawable, Onoff bool) SelectVideoNotifyCookie

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

func SelectVideoNotifyChecked

func SelectVideoNotifyChecked(c *xgb.Conn, Drawable xproto.Drawable, Onoff bool) SelectVideoNotifyCookie

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

func (SelectVideoNotifyCookie) Check

func (cook SelectVideoNotifyCookie) 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 SetPortAttributeCookie

type SetPortAttributeCookie struct {
	*xgb.Cookie
}

SetPortAttributeCookie is a cookie used only for SetPortAttribute requests.

func SetPortAttribute

func SetPortAttribute(c *xgb.Conn, Port Port, Attribute xproto.Atom, Value int32) SetPortAttributeCookie

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

func SetPortAttributeChecked

func SetPortAttributeChecked(c *xgb.Conn, Port Port, Attribute xproto.Atom, Value int32) SetPortAttributeCookie

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

func (SetPortAttributeCookie) Check

func (cook SetPortAttributeCookie) 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 ShmPutImageCookie

type ShmPutImageCookie struct {
	*xgb.Cookie
}

ShmPutImageCookie is a cookie used only for ShmPutImage requests.

func ShmPutImage

func ShmPutImage(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, Shmseg shm.Seg, Id uint32, Offset uint32, SrcX int16, SrcY int16, SrcW uint16, SrcH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16, Width uint16, Height uint16, SendEvent byte) ShmPutImageCookie

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

func ShmPutImageChecked

func ShmPutImageChecked(c *xgb.Conn, Port Port, Drawable xproto.Drawable, Gc xproto.Gcontext, Shmseg shm.Seg, Id uint32, Offset uint32, SrcX int16, SrcY int16, SrcW uint16, SrcH uint16, DrwX int16, DrwY int16, DrwW uint16, DrwH uint16, Width uint16, Height uint16, SendEvent byte) ShmPutImageCookie

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

func (ShmPutImageCookie) Check

func (cook ShmPutImageCookie) 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 StopVideoCookie

type StopVideoCookie struct {
	*xgb.Cookie
}

StopVideoCookie is a cookie used only for StopVideo requests.

func StopVideo

func StopVideo(c *xgb.Conn, Port Port, Drawable xproto.Drawable) StopVideoCookie

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

func StopVideoChecked

func StopVideoChecked(c *xgb.Conn, Port Port, Drawable xproto.Drawable) StopVideoCookie

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

func (StopVideoCookie) Check

func (cook StopVideoCookie) 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 UngrabPortCookie

type UngrabPortCookie struct {
	*xgb.Cookie
}

UngrabPortCookie is a cookie used only for UngrabPort requests.

func UngrabPort

func UngrabPort(c *xgb.Conn, Port Port, Time xproto.Timestamp) UngrabPortCookie

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

func UngrabPortChecked

func UngrabPortChecked(c *xgb.Conn, Port Port, Time xproto.Timestamp) UngrabPortCookie

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

func (UngrabPortCookie) Check

func (cook UngrabPortCookie) 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 VideoNotifyEvent

type VideoNotifyEvent struct {
	Sequence uint16
	Reason   byte
	Time     xproto.Timestamp
	Drawable xproto.Drawable
	Port     Port
}

func (VideoNotifyEvent) Bytes

func (v VideoNotifyEvent) Bytes() []byte

Bytes writes a VideoNotifyEvent value to a byte slice.

func (VideoNotifyEvent) SequenceId

func (v VideoNotifyEvent) SequenceId() uint16

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

func (VideoNotifyEvent) String

func (v VideoNotifyEvent) String() string

String is a rudimentary string representation of VideoNotifyEvent.

Jump to

Keyboard shortcuts

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