gui/pkg/screen/platform.go
Snider 91f4532b50 feat(screen): add screen core.Service with computed queries via IPC
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 14:19:56 +00:00

34 lines
816 B
Go

// pkg/screen/platform.go
package screen
// Platform abstracts the screen/display backend.
type Platform interface {
GetAll() []Screen
GetPrimary() *Screen
}
// Screen describes a display/monitor.
type Screen struct {
ID string `json:"id"`
Name string `json:"name"`
ScaleFactor float64 `json:"scaleFactor"`
Size Size `json:"size"`
Bounds Rect `json:"bounds"`
WorkArea Rect `json:"workArea"`
IsPrimary bool `json:"isPrimary"`
Rotation float64 `json:"rotation"`
}
// Rect represents a rectangle with position and dimensions.
type Rect struct {
X int `json:"x"`
Y int `json:"y"`
Width int `json:"width"`
Height int `json:"height"`
}
// Size represents dimensions.
type Size struct {
Width int `json:"width"`
Height int `json:"height"`
}