xinerama

package
v0.0.0-...-47f30c1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: BSD-3-Clause Imports: 4 Imported by: 2

Documentation

Overview

Package xinerama provides a convenience function to retrieve the geometry of all active heads sorted in order from left to right and then top to bottom. While Xinerama is an old extension that isn't often used in lieu of RandR and TwinView, it can still be used to query for information about all active heads. That is, even if TwinView or RandR is being used, Xinerama will still report the correct geometry of each head.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Heads

type Heads []xrect.Rect

Alias so we use it as a receiver to satisfy sort.Interface

func PhysicalHeads

func PhysicalHeads(xu *xgbutil.XUtil) (Heads, error)

PhyiscalHeads returns the list of heads in a physical ordering. Namely, left to right then top to bottom. (Defined by (X, Y).) Xinerama must have been initialized, otherwise the xinerama.QueryScreens request will panic. PhysicalHeads also checks to make sure each rectangle has a unique (x, y) tuple, so as not to return the geometry of cloned displays. (At present moment, xgbutil initializes Xinerama automatically during initial connection.)

func (Heads) Len

func (hds Heads) Len() int

Len satisfies 'Len' in sort.Interface.

func (Heads) Less

func (hds Heads) Less(i int, j int) bool

Less satisfies 'Less' in sort.Interface.

func (Heads) Swap

func (hds Heads) Swap(i int, j int)

Swap does just that. Nothing to see here...

Jump to

Keyboard shortcuts

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