wlroutput

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleRequest

func HandleRequest(conn net.Conn, req Request, manager *Manager)

Types

type ConfigurationRequest

type ConfigurationRequest struct {
	Heads []HeadConfig `json:"heads"`
	Test  bool         `json:"test"`
}

type HeadConfig

type HeadConfig struct {
	Name       string  `json:"name"`
	Enabled    bool    `json:"enabled"`
	ModeID     *uint32 `json:"modeId,omitempty"`
	CustomMode *struct {
		Width   int32 `json:"width"`
		Height  int32 `json:"height"`
		Refresh int32 `json:"refresh"`
	} `json:"customMode,omitempty"`
	Position     *struct{ X, Y int32 } `json:"position,omitempty"`
	Transform    *int32                `json:"transform,omitempty"`
	Scale        *float64              `json:"scale,omitempty"`
	AdaptiveSync *uint32               `json:"adaptiveSync,omitempty"`
}

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(display *wlclient.Display) (*Manager, error)

func (*Manager) ApplyConfiguration

func (m *Manager) ApplyConfiguration(heads []HeadConfig, test bool) error

func (*Manager) Close

func (m *Manager) Close()

func (*Manager) FatalError

func (m *Manager) FatalError() <-chan error

func (*Manager) GetState

func (m *Manager) GetState() State

func (*Manager) Subscribe

func (m *Manager) Subscribe(id string) chan State

func (*Manager) Unsubscribe

func (m *Manager) Unsubscribe(id string)

type Output

type Output struct {
	Name           string       `json:"name"`
	Description    string       `json:"description"`
	Make           string       `json:"make"`
	Model          string       `json:"model"`
	SerialNumber   string       `json:"serialNumber"`
	PhysicalWidth  int32        `json:"physicalWidth"`
	PhysicalHeight int32        `json:"physicalHeight"`
	Enabled        bool         `json:"enabled"`
	X              int32        `json:"x"`
	Y              int32        `json:"y"`
	Transform      int32        `json:"transform"`
	Scale          float64      `json:"scale"`
	CurrentMode    *OutputMode  `json:"currentMode"`
	Modes          []OutputMode `json:"modes"`
	AdaptiveSync   uint32       `json:"adaptiveSync"`
	ID             uint32       `json:"id"`
}

type OutputMode

type OutputMode struct {
	Width     int32  `json:"width"`
	Height    int32  `json:"height"`
	Refresh   int32  `json:"refresh"`
	Preferred bool   `json:"preferred"`
	ID        uint32 `json:"id"`
}

type Request

type Request struct {
	ID     int                    `json:"id,omitempty"`
	Method string                 `json:"method"`
	Params map[string]interface{} `json:"params,omitempty"`
}

type State

type State struct {
	Outputs []Output `json:"outputs"`
	Serial  uint32   `json:"serial"`
}

type SuccessResult

type SuccessResult struct {
	Success bool   `json:"success"`
	Message string `json:"message"`
}

Jump to

Keyboard shortcuts

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