clients

package
v0.0.0-...-24dab48 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2015 License: MIT, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(cs *branch.Branch, c Client, f Client, csq *rules.Consequence)

func CompareStack

func CompareStack(c, o Client) int

func New

func New() *branch.Branch

func Remove

func Remove(cs *branch.Branch, c Client) error

func RestrainHeight

func RestrainHeight(c Constraint, h uint16) uint16

func RestrainSize

func RestrainSize(c Constraint, w, h uint16) (uint16, uint16)

func RestrainWidth

func RestrainWidth(c Constraint, w uint16) uint16

func TiledCount

func TiledCount(clients *branch.Branch) int

Types

type Bordr

type Bordr interface {
	BorderWidth() uint
	SetBorderWidth(uint)
	Draw(Client, bool, bool)
	Color(bool, bool) uint32
}

type Client

type Client interface {
	Class() string
	Instance() string
	Rectangle() xproto.Rectangle
	Adjacent(Client, string) bool
	SideHandle(string) *xproto.Point
	window.Window
	Floatr
	Tilr
	State
	Constraint
	Bordr
	Shiftr
	Stackr
}

func All

func All(clients *branch.Branch) []Client

func Cycled

func Cycled(clients *branch.Branch, sel selector.Selector) Client

func Focused

func Focused(clients *branch.Branch) Client

func NewClient

func NewClient(c *xgb.Conn, x xproto.Window, r xproto.Window, csq *rules.Consequence) Client

func Next

func Next(clients *branch.Branch) Client

func Prev

func Prev(clients *branch.Branch) Client

func Select

func Select(selectors []selector.Selector, cls ...*branch.Branch) Client

func Tagged

func Tagged(clients *branch.Branch, sel selector.Selector) Client

type ClientState

type ClientState int
const (
	Focus ClientState = iota
	FullScreen
	PseudoTiled
	Floating
	Locked
	Sticky
	Private
	Urgent
	Vacant
)

type Constraint

type Constraint interface {
	Min(string) uint16
	Max(string) uint16
	SetConstraint(*rules.Consequence)
}

type Floatr

type Floatr interface {
	FRectangle() xproto.Rectangle
	X(int16)
	Y(int16)
	Reposition(int16, int16)
	Width(uint16)
	Height(uint16)
	Size(uint16, uint16)
	Center(xproto.Rectangle, int16)
	Embrace(xproto.Rectangle)
	Translate(xproto.Rectangle, xproto.Rectangle)
	UpdateFloatingRectangle(*xgb.Conn, xproto.Window)
	SetFloatingRectangle(xproto.Rectangle)
}

type Layer

type Layer int
const (
	Normal Layer = iota
	Below
	Above
)

type MatchClient

type MatchClient func(Client) bool

type ShiftDirection

type ShiftDirection int
const (
	Right ShiftDirection = iota
	Down
	Left
	Up
)

type ShiftMode

type ShiftMode int
const (
	Automatic ShiftMode = iota
	Manual
)

type ShiftOrientation

type ShiftOrientation int
const (
	Horizontal ShiftOrientation = iota
	Vertical
)

func (ShiftOrientation) String

func (s ShiftOrientation) String() string

type Shiftr

type Shiftr interface {
	Rotate() int
	SetRotate(int)
	Ratio() float64
	SetRatio(float64)
	Mode() ShiftMode
	SetMode(string)
	Orientation() ShiftOrientation
	SetOrientation(string)
	Direction() ShiftDirection
	SetDirection(string)
	SetShift(*rules.Consequence)
}

type Stackr

type Stackr interface {
	GetStack() Layer
	SetStack(Layer)
}

type State

type State interface {
	Tiled() bool
	Floating() bool
	Focused() bool
	Pseudotiled() bool
	Fullscreen() bool
	Get(ClientState) bool
	Set(ClientState, bool)
	SetState(*rules.Consequence)
}

type Tilr

type Tilr interface {
	Area() int
	TRectangle() xproto.Rectangle
	SetTiledRectangle(xproto.Rectangle)
}

Jump to

Keyboard shortcuts

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