tiling

package
v0.0.0-...-4290623 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TileHori = 0
	TileVert = 1
)

TileHori side by side TileVert on top of each other

Variables

This section is empty.

Functions

This section is empty.

Types

type Area

type Area struct {
	X      uint32
	Y      uint32
	Width  uint32
	Height uint32
}

Area the drawing boundaries

type Tile

type Tile struct {
	Mode   TileMode
	Bounds Area
	Wind   xproto.Window
	Right  *Tile
	Left   *Tile
}

Tile contains mode area and actual X11 window if mode is vertical right is up and Left is bottom perhaps future add stacking where tiles go on top of each other...

func (*Tile) Boundaries

func (t *Tile) Boundaries(bounds *Area)

Boundaries return maximum area

func (*Tile) Config

func (t *Tile) Config(xConn *xgb.Conn, padX uint32, padY uint32)

Config map window to area

func (*Tile) Delete

func (t *Tile) Delete(w xproto.Window)

Delete delete given window from tile tree

func (*Tile) Find

func (t *Tile) Find(w xproto.Window) (rt *Tile)

Find search given window from tile tree rt nil if not found

func (*Tile) FindWithParent

func (t *Tile) FindWithParent(w xproto.Window) (rt *Tile, p *Tile)

FindWithParent search given window return tile containing it and its parent tile nil, nil if not found tile, nil if found but has no parent

func (*Tile) HasBranch

func (t *Tile) HasBranch() bool

HasBranch returns true if there is child branches

func (*Tile) Insert

func (t *Tile) Insert(m TileMode, focus xproto.Window, w xproto.Window)

Insert append window into tree determinated by focus if focus == nil inserts into root

type TileMode

type TileMode uint16

TileMode tiling mode TileHori, TileVert

type Workspace

type Workspace struct {
	Name   string
	Bounds Area
	Root   *Tile
}

Workspace contains root tile

func (*Workspace) Config

func (ws *Workspace) Config(xConn *xgb.Conn, padX uint32, padY uint32)

Config configures all x11 windows bound on given workspace, adds padding padX side padding padY up/down padding

func (*Workspace) Delete

func (ws *Workspace) Delete(w xproto.Window)

Delete Remove window and reallocate bounding Area

func (*Workspace) Insert

func (ws *Workspace) Insert(m TileMode, focus xproto.Window, w xproto.Window)

Insert boilerplate code for tile

Jump to

Keyboard shortcuts

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