store

package
v2.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Original uint8 = 1 // Flag to restore original info
	Cached   uint8 = 2 // Flag to restore cached info
	Latest   uint8 = 3 // Flag to restore latest info
)
View Source
const (
	Stacked uint8 = 1 // Flag for stacked (internal index order) clients
	Ordered uint8 = 2 // Flag for ordered (bottom to top order) clients
	Visible uint8 = 3 // Flag for visible (top only) clients
)

Variables

View Source
var (
	X             *xgbutil.XUtil  // X connection
	WindowManager *XWindowManager // X window manager
	Workplace     *XWorkplace     // X workplace
	Pointer       *XPointer       // X pointer
	Windows       *XWindows       // X windows
)

Functions

func ActiveWindowSet added in v2.5.0

func ActiveWindowSet(X *xgbutil.XUtil, w *XWindow)

func Compatible added in v2.5.1

func Compatible(feature string) bool

func Connected

func Connected() bool

func CurrentDesktopGet

func CurrentDesktopGet(X *xgbutil.XUtil) uint

func CurrentDesktopSet added in v2.5.0

func CurrentDesktopSet(X *xgbutil.XUtil, desktop uint)

func DesktopGeometry added in v2.5.0

func DesktopGeometry(i uint) *common.Geometry

func InitRoot

func InitRoot()

func IsFullscreen added in v2.5.0

func IsFullscreen(info *Info) bool

func IsIgnored

func IsIgnored(info *Info) bool

func IsMaximized

func IsMaximized(info *Info) bool

func IsMinimized added in v2.5.0

func IsMinimized(info *Info) bool

func IsSpecial

func IsSpecial(info *Info) bool

func IsSticky added in v2.5.0

func IsSticky(info *Info) bool

func NumberOfDesktopsGet

func NumberOfDesktopsGet(X *xgbutil.XUtil) uint

func OnPointerUpdate

func OnPointerUpdate(fun func(XPointer, uint, uint))

func OnStateUpdate

func OnStateUpdate(fun func(string, uint, uint))

func ScreenGeometry added in v2.5.0

func ScreenGeometry(i uint) *common.Geometry

func ScreenGet added in v2.5.1

func ScreenGet(p common.Point) uint

func StateUpdate

func StateUpdate(X *xgbutil.XUtil, e xevent.PropertyNotifyEvent)

Types

type Client

type Client struct {
	Window   *XWindow // X window object
	Original *Info    `json:"-"` // Original client window information
	Cached   *Info    `json:"-"` // Cached client window information
	Latest   *Info    // Latest client window information
	Locked   bool     // Internal client move/resize lock
}

func CreateClient

func CreateClient(w xproto.Window) *Client

func (*Client) Cache

func (c *Client) Cache() common.Cache[*Client]

func (*Client) Decorate added in v2.5.1

func (c *Client) Decorate() bool

func (*Client) Fullscreen added in v2.5.0

func (c *Client) Fullscreen() bool

func (*Client) IsNew added in v2.5.0

func (c *Client) IsNew() bool

func (*Client) Limit added in v2.5.1

func (c *Client) Limit(w, h int) bool

func (*Client) Lock

func (c *Client) Lock()

func (*Client) MoveToDesktop added in v2.5.2

func (c *Client) MoveToDesktop(desktop uint32) bool

func (*Client) MoveToScreen added in v2.5.2

func (c *Client) MoveToScreen(screen uint32) bool

func (*Client) MoveWindow added in v2.5.0

func (c *Client) MoveWindow(x, y, w, h int)

func (*Client) OuterGeometry

func (c *Client) OuterGeometry() (x, y, w, h int)

func (*Client) Read

func (c *Client) Read() *Client

func (*Client) Restore

func (c *Client) Restore(flag uint8)

func (*Client) UnDecorate

func (c *Client) UnDecorate() bool

func (*Client) UnFullscreen added in v2.5.0

func (c *Client) UnFullscreen() bool

func (*Client) UnLimit added in v2.5.1

func (c *Client) UnLimit() bool

func (*Client) UnLock

func (c *Client) UnLock()

func (*Client) UnMaximize

func (c *Client) UnMaximize() bool

func (*Client) Update

func (c *Client) Update()

func (*Client) Write

func (c *Client) Write()

type Clients

type Clients struct {
	Maximum int       // Currently maximum allowed clients
	Stacked []*Client `json:"-"` // List of stored window clients
}

type Corner

type Corner struct {
	Name     string          // Corner name used in config
	Active   bool            // Mouse pointer is in this corner
	Screen   uint            // Screen index the corner is located
	Geometry common.Geometry // Geometry of the corner section
}

func CreateCorner

func CreateCorner(name string, screen uint, x int, y int, w int, h int) *Corner

func CreateCorners

func CreateCorners(screens []XHead) []*Corner

func HotCorner added in v2.5.0

func HotCorner() *Corner

func (*Corner) IsActive

func (c *Corner) IsActive(p *XPointer) bool

type Dimensions

type Dimensions struct {
	Geometry   common.Geometry   // Client window geometry
	Hints      Hints             // Client window dimension hints
	Extents    ewmh.FrameExtents // Client window geometry extents
	AdjPos     bool              // Position adjustments on move/resize
	AdjSize    bool              // Size adjustments on move/resize
	AdjRestore bool              // Disable adjustments on restore
}

type Directions

type Directions struct {
	Top    bool // Indicates proportion changes on the top
	Right  bool // Indicates proportion changes on the right
	Bottom bool // Indicates proportion changes on the bottom
	Left   bool // Indicates proportion changes on the left
}

type Hints

type Hints struct {
	Normal icccm.NormalHints // Client window geometry hints
	Motif  motif.Hints       // Client window decoration hints
}

type Info

type Info struct {
	Class      string     // Client window application name
	Name       string     // Client window title name
	Types      []string   // Client window types
	States     []string   // Client window states
	Location   Location   // Client window location
	Dimensions Dimensions // Client window dimensions
}

func GetInfo

func GetInfo(w xproto.Window) *Info

type Location

type Location struct {
	Desktop uint // Location desktop index
	Screen  uint // Location screen index
}

type Manager

type Manager struct {
	Name        string       // Manager name with window clients
	Location    *Location    // Manager workspace and screen location
	Proportions *Proportions // Manager proportions of window clients
	Masters     *Clients     // List of master window clients
	Slaves      *Clients     // List of slave window clients
	Decoration  bool         // Window decoration is enabled
}

func CreateManager

func CreateManager(loc Location) *Manager

func (*Manager) ActiveClient added in v2.5.2

func (mg *Manager) ActiveClient() *Client

func (*Manager) AddClient

func (mg *Manager) AddClient(c *Client)

func (*Manager) Clients

func (mg *Manager) Clients(flag uint8) []*Client

func (*Manager) DecorationDisabled added in v2.5.1

func (mg *Manager) DecorationDisabled() bool

func (*Manager) DecorationEnabled added in v2.5.1

func (mg *Manager) DecorationEnabled() bool

func (*Manager) DecreaseMaster

func (mg *Manager) DecreaseMaster()

func (*Manager) DecreaseProportion

func (mg *Manager) DecreaseProportion()

func (*Manager) DecreaseSlave

func (mg *Manager) DecreaseSlave()

func (*Manager) DisableDecoration added in v2.5.1

func (mg *Manager) DisableDecoration()

func (*Manager) EnableDecoration added in v2.5.1

func (mg *Manager) EnableDecoration()

func (*Manager) IncreaseMaster

func (mg *Manager) IncreaseMaster()

func (*Manager) IncreaseProportion

func (mg *Manager) IncreaseProportion()

func (*Manager) IncreaseSlave

func (mg *Manager) IncreaseSlave()

func (*Manager) Index

func (mg *Manager) Index(windows *Clients, c *Client) int

func (*Manager) IsMaster

func (mg *Manager) IsMaster(c *Client) bool

func (*Manager) IsSlave

func (mg *Manager) IsSlave(c *Client) bool

func (*Manager) MakeMaster

func (mg *Manager) MakeMaster(c *Client)

func (*Manager) NextClient

func (mg *Manager) NextClient() *Client

func (*Manager) Ordered

func (mg *Manager) Ordered(windows *Clients) []*Client

func (*Manager) PreviousClient

func (mg *Manager) PreviousClient() *Client

func (*Manager) RemoveClient

func (mg *Manager) RemoveClient(c *Client)

func (*Manager) SetProportions

func (mg *Manager) SetProportions(ps []float64, pi float64, i int, j int) bool

func (*Manager) SwapClient

func (mg *Manager) SwapClient(c1 *Client, c2 *Client)

func (*Manager) Visible

func (mg *Manager) Visible(windows *Clients) []*Client

type Proportions

type Proportions struct {
	MasterSlave  map[int][]float64 // Master-slave proportions
	MasterMaster map[int][]float64 // Master-master proportions
	SlaveSlave   map[int][]float64 // Slave-slave proportions
}

type XButton added in v2.5.0

type XButton struct {
	Left   bool // Pointer left click
	Middle bool // Pointer middle click
	Right  bool // Pointer right click
}

type XDisplays added in v2.5.0

type XDisplays struct {
	Name     string    // Unique heads name (display summary)
	Screens  []XHead   // Screen dimensions (full display size)
	Desktops []XHead   // Desktop dimensions (desktop without panels)
	Corners  []*Corner // Display corners (for pointer events)
}

func DisplaysGet

func DisplaysGet(X *xgbutil.XUtil) XDisplays

type XDrag added in v2.5.0

type XDrag struct {
	LeftTime   int64 // Pointer left last drag time
	MiddleTime int64 // Pointer middle last drag time
	RightTime  int64 // Pointer right last drag time
}

func (*XDrag) Left added in v2.5.0

func (d *XDrag) Left(dt time.Duration) bool

func (*XDrag) Middle added in v2.5.0

func (d *XDrag) Middle(dt time.Duration) bool

func (*XDrag) Right added in v2.5.0

func (d *XDrag) Right(dt time.Duration) bool

type XHead added in v2.5.0

type XHead struct {
	Id       uint32          // Head output id (display id)
	Name     string          // Head output name (display name)
	Primary  bool            // Head primary flag (primary display)
	Geometry common.Geometry // Head dimensions (x/y/width/height)
}

func PhysicalHeadsGet

func PhysicalHeadsGet(X *xgbutil.XUtil) []XHead

type XPointer added in v2.5.0

type XPointer struct {
	Drag     XDrag        // Pointer device drag states
	Button   XButton      // Pointer device button states
	Position common.Point // Pointer position coordinates
}

func PointerGet

func PointerGet(X *xgbutil.XUtil) *XPointer

func PointerUpdate

func PointerUpdate(X *xgbutil.XUtil) *XPointer

func (*XPointer) Dragging added in v2.5.0

func (p *XPointer) Dragging(dt time.Duration) bool

func (*XPointer) Press added in v2.5.0

func (p *XPointer) Press()

func (*XPointer) Pressed added in v2.5.0

func (p *XPointer) Pressed() bool

type XWindow added in v2.5.0

type XWindow struct {
	Id       xproto.Window   // Window object id
	Created  int64           // Internal creation timestamp
	Instance *xwindow.Window `json:"-"` // Window object instance
}

func ActiveWindowGet

func ActiveWindowGet(X *xgbutil.XUtil) XWindow

func ClientListStackingGet

func ClientListStackingGet(X *xgbutil.XUtil) []XWindow

func CreateXWindow added in v2.5.0

func CreateXWindow(w xproto.Window) *XWindow

type XWindowManager added in v2.5.1

type XWindowManager struct {
	Name string // Window manager name
}

type XWindows added in v2.5.0

type XWindows struct {
	Active  XWindow   // Current active window
	Stacked []XWindow // List of stacked windows
}

type XWorkplace added in v2.5.0

type XWorkplace struct {
	DesktopCount   uint      // Number of desktops
	ScreenCount    uint      // Number of screens
	CurrentDesktop uint      // Current desktop index
	CurrentScreen  uint      // Current screen index
	Displays       XDisplays // Physical connected displays
}

Jump to

Keyboard shortcuts

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