client

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(x11 x11, cfg *Config, window xproto.Window, typ Type) (*Client, error)

func (*Client) Draw

func (c *Client) Draw() error

func (*Client) Geom

func (c *Client) Geom() Geom

func (*Client) Map

func (c *Client) Map() error

Map causes both the client window and the frame (parent) to be mapped

func (*Client) Mapped

func (c *Client) Mapped() bool

func (*Client) OnDestroy

func (c *Client) OnDestroy() error

OnDestroy is called when the WM receives the DestroyNotify event

func (*Client) OnProperty

func (c *Client) OnProperty(atom xproto.Atom)

func (*Client) OnUnmap

func (c *Client) OnUnmap() error

OnUnmap is called when the WM receives the UnmapNotify event (e.g. when the client window is closed by user action or when requested by the program itself)

func (*Client) Parent

func (c *Client) Parent() xproto.Window

func (*Client) SetGeom

func (c *Client) SetGeom(geom Geom)

func (*Client) Type

func (c *Client) Type() Type

func (*Client) Unmap

func (c *Client) Unmap() error

Unmap causes the client window to be unmapped. This in turn sends the UnmapNotify event that is then handled by (*Client).OnUnmap

func (*Client) Update

func (c *Client) Update() error

Update compares the desired state of the client against the actual state and executes updates aimed at reaching the desired state

func (*Client) Window

func (c *Client) Window() xproto.Window

type Config

type Config struct {
	TitlebarHeight uint8
	BorderWidth    uint8
	BgColor        uint32
	FontColor      uint32
	FontSize       float64
}

type Geom

type Geom struct {
	X, Y int16
	W, H uint16
}

type Type

type Type uint8
const (
	TypeUnknown Type = iota
	TypeNormal
	TypeDock
)

Jump to

Keyboard shortcuts

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