randr

package
v0.0.0-...-17244d7 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RotationRotate0   = 1
	RotationRotate90  = 2
	RotationRotate180 = 4
	RotationRotate270 = 8
	RotationReflectX  = 16
	RotationReflectY  = 32
)

enum Rotation

View Source
const (
	SetConfigSuccess           = 0
	SetConfigInvalidConfigTime = 1
	SetConfigInvalidTime       = 2
	SetConfigFailed            = 3
)

enum SetConfig

View Source
const (
	NotifyMaskScreenChange     = 1
	NotifyMaskCrtcChange       = 2
	NotifyMaskOutputChange     = 4
	NotifyMaskOutputProperty   = 8
	NotifyMaskProviderChange   = 16
	NotifyMaskProviderProperty = 32
	NotifyMaskResourceChange   = 64
	NotifyMaskLease            = 128
)

enum NotifyMask

View Source
const (
	ModeFlagHsyncPositive  = 1
	ModeFlagHsyncNegative  = 2
	ModeFlagVsyncPositive  = 4
	ModeFlagVsyncNegative  = 8
	ModeFlagInterlace      = 16
	ModeFlagDoubleScan     = 32
	ModeFlagCsync          = 64
	ModeFlagCsyncPositive  = 128
	ModeFlagCsyncNegative  = 256
	ModeFlagHskewPresent   = 512
	ModeFlagBcast          = 1024
	ModeFlagPixelMultiplex = 2048
	ModeFlagDoubleClock    = 4096
	ModeFlagHalveClock     = 8192
)

enum ModeFlag

View Source
const (
	ConnectionConnected    = 0
	ConnectionDisconnected = 1
	ConnectionUnknown      = 2
)

enum Connection

View Source
const (
	TransformUnit       = 1
	TransformScaleUp    = 2
	TransformScaleDown  = 4
	TransformProjective = 8
)

enum Transform

View Source
const (
	ProviderCapabilitySourceOutput  = 1
	ProviderCapabilitySinkOutput    = 2
	ProviderCapabilitySourceOffload = 4
	ProviderCapabilitySinkOffload   = 8
)

enum ProviderCapability

View Source
const (
	NotifyCrtcChange       = 0
	NotifyOutputChange     = 1
	NotifyOutputProperty   = 2
	NotifyProviderChange   = 3
	NotifyProviderProperty = 4
	NotifyResourceChange   = 5
	NotifyLease            = 6
)

enum Notify

View Source
const AddOutputModeOpcode = 18
View Source
const BadCrtcErrorCode = 1
View Source
const BadModeErrorCode = 2
View Source
const BadOutputErrorCode = 0
View Source
const BadProviderErrorCode = 3
View Source
const ChangeOutputPropertyOpcode = 13
View Source
const ChangeProviderPropertyOpcode = 39
View Source
const ConfigureOutputPropertyOpcode = 12
View Source
const ConfigureProviderPropertyOpcode = 38
View Source
const CreateLeaseOpcode = 45
View Source
const CreateModeOpcode = 16
View Source
const DeleteMonitorOpcode = 44
View Source
const DeleteOutputModeOpcode = 19
View Source
const DeleteOutputPropertyOpcode = 14
View Source
const DeleteProviderPropertyOpcode = 40
View Source
const DestroyModeOpcode = 17
View Source
const FreeLeaseOpcode = 46
View Source
const GetCrtcGammaOpcode = 23
View Source
const GetCrtcGammaSizeOpcode = 22
View Source
const GetCrtcInfoOpcode = 20
View Source
const GetCrtcTransformOpcode = 27
View Source
const GetMonitorsOpcode = 42
View Source
const GetOutputInfoOpcode = 9
View Source
const GetOutputPrimaryOpcode = 31
View Source
const GetOutputPropertyOpcode = 15
View Source
const GetPanningOpcode = 28
View Source
const GetProviderInfoOpcode = 33
View Source
const GetProviderPropertyOpcode = 41
View Source
const GetProvidersOpcode = 32
View Source
const GetScreenInfoOpcode = 5
View Source
const GetScreenResourcesCurrentOpcode = 25
View Source
const GetScreenResourcesOpcode = 8
View Source
const GetScreenSizeRangeOpcode = 6
View Source
const ListOutputPropertiesOpcode = 10
View Source
const ListProviderPropertiesOpcode = 36
View Source
const MajorVersion = 1

_ns.ext_name: RandR

View Source
const MinorVersion = 6
View Source
const NotifyEventCode = 1
View Source
const QueryOutputPropertyOpcode = 11
View Source
const QueryProviderPropertyOpcode = 37
View Source
const QueryVersionOpcode = 0
View Source
const ScreenChangeNotifyEventCode = 0
View Source
const SelectInputOpcode = 4
View Source
const SetCrtcConfigOpcode = 21
View Source
const SetCrtcGammaOpcode = 24
View Source
const SetCrtcTransformOpcode = 26
View Source
const SetMonitorOpcode = 43
View Source
const SetOutputPrimaryOpcode = 30
View Source
const SetPanningOpcode = 29
View Source
const SetProviderOffloadSinkOpcode = 34
View Source
const SetProviderOutputSourceOpcode = 35
View Source
const SetScreenConfigOpcode = 2
View Source
const SetScreenSizeOpcode = 7

Variables

This section is empty.

Functions

func Ext

func Ext() *x.Extension

func SelectInput

func SelectInput(conn *x.Conn, window x.Window, enable uint16)

func SelectInputChecked

func SelectInputChecked(conn *x.Conn, window x.Window, enable uint16) x.VoidCookie

func SetCrtcGamma

func SetCrtcGamma(conn *x.Conn, crtc Crtc, red, green, blue []uint16)

func SetCrtcGammaChecked

func SetCrtcGammaChecked(conn *x.Conn, crtc Crtc, red, green, blue []uint16) x.VoidCookie

Types

type CreateLeaseCookie

type CreateLeaseCookie x.SeqNum

type CreateModeCookie

type CreateModeCookie x.SeqNum

type Crtc

type Crtc uint32

simple ('xcb', 'RandR', 'CRTC')

type CrtcChangeNotifyEvent

type CrtcChangeNotifyEvent struct {
	Timestamp     x.Timestamp
	Window        x.Window
	Crtc          Crtc
	Mode          Mode
	Rotation      uint16
	X, Y          int16
	Width, Height uint16
}

type GetCrtcGammaCookie

type GetCrtcGammaCookie x.SeqNum

type GetCrtcGammaSizeCookie

type GetCrtcGammaSizeCookie x.SeqNum

func GetCrtcGammaSize

func GetCrtcGammaSize(conn *x.Conn, crtc Crtc) GetCrtcGammaSizeCookie

func (GetCrtcGammaSizeCookie) Reply

func (cookie GetCrtcGammaSizeCookie) Reply(conn *x.Conn) (*GetCrtcGammaSizeReply, error)

type GetCrtcGammaSizeReply

type GetCrtcGammaSizeReply struct {
	Size uint16
}

type GetCrtcInfoCookie

type GetCrtcInfoCookie x.SeqNum

func GetCrtcInfo

func GetCrtcInfo(conn *x.Conn, crtc Crtc, configTimestamp x.Timestamp) GetCrtcInfoCookie

func (GetCrtcInfoCookie) Reply

func (cookie GetCrtcInfoCookie) Reply(conn *x.Conn) (*GetCrtcInfoReply, error)

type GetCrtcInfoReply

type GetCrtcInfoReply struct {
	Status          uint8
	Timestamp       x.Timestamp
	X               int16
	Y               int16
	Width           uint16
	Height          uint16
	Mode            Mode
	Rotation        uint16
	Rotations       uint16
	Outputs         []Output
	PossibleOutputs []Output
}

type GetCrtcTransformCookie

type GetCrtcTransformCookie x.SeqNum

type GetMonitorsCookie

type GetMonitorsCookie x.SeqNum

type GetOutputInfoCookie

type GetOutputInfoCookie x.SeqNum

func GetOutputInfo

func GetOutputInfo(conn *x.Conn, output Output, configTimestamp x.Timestamp) GetOutputInfoCookie

func (GetOutputInfoCookie) Reply

func (cookie GetOutputInfoCookie) Reply(conn *x.Conn) (*GetOutputInfoReply, error)

type GetOutputInfoReply

type GetOutputInfoReply struct {
	Status        uint8
	Timestamp     x.Timestamp
	Crtc          Crtc
	MmWidth       uint32
	MmHeight      uint32
	Connection    uint8
	SubPixelOrder uint8
	NumPreferred  uint16
	Crtcs         []Crtc
	Modes         []Mode
	Clones        []Output
	Name          string
}

func (*GetOutputInfoReply) GetPreferredMode

func (r *GetOutputInfoReply) GetPreferredMode() Mode

type GetOutputPrimaryCookie

type GetOutputPrimaryCookie x.SeqNum

func GetOutputPrimary

func GetOutputPrimary(conn *x.Conn, window x.Window) GetOutputPrimaryCookie

func (GetOutputPrimaryCookie) Reply

func (cookie GetOutputPrimaryCookie) Reply(conn *x.Conn) (*GetOutputPrimaryReply, error)

type GetOutputPrimaryReply

type GetOutputPrimaryReply struct {
	Output Output
}

type GetOutputPropertyCookie

type GetOutputPropertyCookie x.SeqNum

func GetOutputProperty

func GetOutputProperty(conn *x.Conn, output Output, property, Type x.Atom, longOffset, longLength uint32, delete, pending bool) GetOutputPropertyCookie

func (GetOutputPropertyCookie) Reply

func (cookie GetOutputPropertyCookie) Reply(conn *x.Conn) (*GetOutputPropertyReply, error)

type GetOutputPropertyReply

type GetOutputPropertyReply struct {
	Format     byte
	Type       x.Atom
	BytesAfter uint32
	ValueLen   uint32
	Value      []byte
}

type GetPanningCookie

type GetPanningCookie x.SeqNum

type GetProviderInfoCookie

type GetProviderInfoCookie x.SeqNum

type GetProviderPropertyCookie

type GetProviderPropertyCookie x.SeqNum

type GetProvidersCookie

type GetProvidersCookie x.SeqNum

type GetScreenInfoCookie

type GetScreenInfoCookie x.SeqNum

type GetScreenResourcesCookie

type GetScreenResourcesCookie x.SeqNum

func GetScreenResources

func GetScreenResources(conn *x.Conn, window x.Window) GetScreenResourcesCookie

func (GetScreenResourcesCookie) Reply

type GetScreenResourcesCurrentCookie

type GetScreenResourcesCurrentCookie x.SeqNum

type GetScreenResourcesReply

type GetScreenResourcesReply struct {
	Timestamp       x.Timestamp
	ConfigTimestamp x.Timestamp
	Crtcs           []Crtc
	Outputs         []Output // size: xgb.Pad((int(NumOutputs) * 4))
	Modes           []ModeInfo
}

type GetScreenSizeRangeCookie

type GetScreenSizeRangeCookie x.SeqNum

type Lease

type Lease uint32

simple ('xcb', 'RandR', 'LEASE')

type ListOutputPropertiesCookie

type ListOutputPropertiesCookie x.SeqNum

type ListProviderPropertiesCookie

type ListProviderPropertiesCookie x.SeqNum

type Mode

type Mode uint32

simple ('xcb', 'RandR', 'MODE')

type ModeInfo

type ModeInfo struct {
	Id         uint32
	Width      uint16
	Height     uint16
	DotClock   uint32
	HSyncStart uint16
	HSyncEnd   uint16
	HTotal     uint16
	HSkew      uint16
	VSyncStart uint16
	VSyncEnd   uint16
	VTotal     uint16

	Name      string
	ModeFlags uint32
	// contains filtered or unexported fields
}

size: 8 * 4b

type NotifyEvent

type NotifyEvent struct {
	SubCode  uint8
	Sequence uint16
	Data     []byte
}

func NewNotifyEvent

func NewNotifyEvent(data []byte) (*NotifyEvent, error)

func (*NotifyEvent) NewCrtcChangeNotifyEvent

func (e *NotifyEvent) NewCrtcChangeNotifyEvent() (*CrtcChangeNotifyEvent, error)

func (*NotifyEvent) NewOutputChangeNotifyEvent

func (e *NotifyEvent) NewOutputChangeNotifyEvent() (*OutputChangeNotifyEvent, error)

func (*NotifyEvent) NewOutputPropertyNotifyEvent

func (e *NotifyEvent) NewOutputPropertyNotifyEvent() (*OutputPropertyNotifyEvent,
	error)

type Output

type Output uint32

simple ('xcb', 'RandR', 'OUTPUT')

type OutputChangeNotifyEvent

type OutputChangeNotifyEvent struct {
	Timestamp       x.Timestamp
	ConfigTimestamp x.Timestamp
	Window          x.Window
	Output          Output
	Crtc            Crtc
	Mode            Mode
	Rotation        uint16
	Connection      uint8
	SubPixelOrder   uint8
}

type OutputPropertyNotifyEvent

type OutputPropertyNotifyEvent struct {
	Window    x.Window
	Output    Output
	Atom      x.Atom
	Timestamp x.Timestamp
	Status    uint8
}

type Provider

type Provider uint32

simple ('xcb', 'RandR', 'PROVIDER')

type QueryOutputPropertyCookie

type QueryOutputPropertyCookie x.SeqNum

type QueryProviderPropertyCookie

type QueryProviderPropertyCookie x.SeqNum

type QueryVersionCookie

type QueryVersionCookie x.SeqNum

func QueryVersion

func QueryVersion(conn *x.Conn, clientMajorVersion, clientMinorVersion uint32) QueryVersionCookie

func (QueryVersionCookie) Reply

func (cookie QueryVersionCookie) Reply(conn *x.Conn) (*QueryVersionReply, error)

type QueryVersionReply

type QueryVersionReply struct {
	ServerMajorVersion uint32
	ServerMinorVersion uint32
}

type ScreenChangeNotifyEvent

type ScreenChangeNotifyEvent struct {
	Rotation        uint8
	Sequence        uint16
	Timestamp       x.Timestamp
	ConfigTimestamp x.Timestamp
	Root            x.Window
	RequestWindow   x.Window
	SizeID          uint16
	SubpixelOrder   uint16
	Width           uint16
	Height          uint16
	MmWidth         uint16
	MmHeight        uint16
}

func NewScreenChangeNotifyEvent

func NewScreenChangeNotifyEvent(data []byte) (*ScreenChangeNotifyEvent, error)

type SetCrtcConfigCookie

type SetCrtcConfigCookie x.SeqNum

func SetCrtcConfig

func SetCrtcConfig(conn *x.Conn, crtc Crtc, timestamp, configTimestamp x.Timestamp, X, y int16, mode Mode, rotation uint16, outputs []Output) SetCrtcConfigCookie

func (SetCrtcConfigCookie) Reply

func (cookie SetCrtcConfigCookie) Reply(conn *x.Conn) (*SetCrtcConfigReply, error)

type SetCrtcConfigReply

type SetCrtcConfigReply struct {
	Status    uint8
	Timestamp x.Timestamp
}

type SetPanningCookie

type SetPanningCookie x.SeqNum

type SetScreenConfigCookie

type SetScreenConfigCookie x.SeqNum

Jump to

Keyboard shortcuts

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