drandr

package
v0.0.0-...-3511385 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CrtcInfo

type CrtcInfo struct {
	Id       uint32 // if crtc == 0, means output closed or disconnection
	Mode     uint32
	X        int16
	Y        int16
	Width    uint16
	Height   uint16
	Rotation uint16
	Reflect  uint16

	Rotations []uint16
	Reflects  []uint16
}

type ModeInfo

type ModeInfo struct {
	Id     uint32
	Width  uint16
	Height uint16
	Rate   float64
}

func (ModeInfo) Equal

func (info ModeInfo) Equal(v ModeInfo) bool

type ModeInfos

type ModeInfos []ModeInfo

func FindCommonModes

func FindCommonModes(infosGroup ...ModeInfos) ModeInfos

func (ModeInfos) Equal

func (infos ModeInfos) Equal(list ModeInfos) bool

func (ModeInfos) FilterBySize

func (infos ModeInfos) FilterBySize() ModeInfos

func (ModeInfos) HasRefreshRate

func (infos ModeInfos) HasRefreshRate(rate float64) bool

func (ModeInfos) Len

func (infos ModeInfos) Len() int

func (ModeInfos) Less

func (infos ModeInfos) Less(i, j int) bool

func (ModeInfos) Max

func (infos ModeInfos) Max() ModeInfo

func (ModeInfos) Query

func (infos ModeInfos) Query(id uint32) ModeInfo

func (ModeInfos) QueryBySize

func (infos ModeInfos) QueryBySize(width, height uint16) ModeInfos

func (ModeInfos) String

func (infos ModeInfos) String() string

func (ModeInfos) Swap

func (infos ModeInfos) Swap(i, j int)

type OutputInfo

type OutputInfo struct {
	Name       string
	Id         uint32
	MmWidth    uint32
	MmHeight   uint32
	Crtc       CrtcInfo
	Connection bool
	Timestamp  x.Timestamp

	EDID []byte

	Clones         randrIdList
	Crtcs          randrIdList
	Modes          randrIdList
	PreferredModes randrIdList
}

type OutputInfos

type OutputInfos []OutputInfo

func (OutputInfos) ListConnectionOutputs

func (infos OutputInfos) ListConnectionOutputs() OutputInfos

func (OutputInfos) ListNames

func (infos OutputInfos) ListNames() []string

func (OutputInfos) Query

func (infos OutputInfos) Query(id uint32) OutputInfo

func (OutputInfos) QueryByName

func (infos OutputInfos) QueryByName(name string) OutputInfo

type ScreenInfo

type ScreenInfo struct {
	Outputs OutputInfos
	Modes   ModeInfos
	// contains filtered or unexported fields
}

func GetScreenInfo

func GetScreenInfo(conn *x.Conn) (*ScreenInfo, error)

func (*ScreenInfo) GetPrimary

func (info *ScreenInfo) GetPrimary() (*OutputInfo, error)

func (*ScreenInfo) GetScreenSize

func (info *ScreenInfo) GetScreenSize() (uint16, uint16)

Jump to

Keyboard shortcuts

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