Documentation ¶
Overview ¶
package frame draws window decorations around clients managed by Wingo.
Index ¶
- Constants
- func ClientToFrame(f Frame, gravity, x, y, w, h int) (int, int, int, int)
- func Maximize(f Frame)
- func Reset(f Frame)
- type Borders
- func (f *Borders) Active()
- func (f *Borders) Bottom() int
- func (f Borders) Client() Client
- func (f *Borders) Current() bool
- func (f *Borders) Destroy()
- func (f Borders) Geom() xrect.Rect
- func (f *Borders) Inactive()
- func (f Borders) IsMapped() bool
- func (f *Borders) Left() int
- func (f *Borders) MROpt(validate bool, flags, x, y, w, h int)
- func (f Borders) Map()
- func (f *Borders) Maximize()
- func (f *Borders) Move(x, y int)
- func (f *Borders) MoveResize(validate bool, x, y, w, h int)
- func (f Borders) Moving() bool
- func (f Borders) MovingState() *MoveState
- func (f *Borders) Off()
- func (f *Borders) On()
- func (f Borders) Parent() *Parent
- func (f *Borders) Resize(validate bool, w, h int)
- func (f Borders) Resizing() bool
- func (f Borders) ResizingState() *ResizeState
- func (f *Borders) Right() int
- func (f *Borders) Top() int
- func (f Borders) Unmap()
- func (f *Borders) Unmaximize()
- type BordersTheme
- type Client
- type Frame
- type Full
- func (f *Full) Active()
- func (f *Full) Bottom() int
- func (f Full) Client() Client
- func (f *Full) Current() bool
- func (f *Full) Destroy()
- func (f Full) Geom() xrect.Rect
- func (f *Full) Inactive()
- func (f Full) IsMapped() bool
- func (f *Full) Left() int
- func (f *Full) MROpt(validate bool, flags, x, y, w, h int)
- func (f Full) Map()
- func (f *Full) Maximize()
- func (f *Full) Move(x, y int)
- func (f *Full) MoveResize(validate bool, x, y, w, h int)
- func (f Full) Moving() bool
- func (f Full) MovingState() *MoveState
- func (f *Full) Off()
- func (f *Full) On()
- func (f Full) Parent() *Parent
- func (f *Full) Resize(validate bool, w, h int)
- func (f Full) Resizing() bool
- func (f Full) ResizingState() *ResizeState
- func (f *Full) Right() int
- func (f *Full) Top() int
- func (f Full) Unmap()
- func (f *Full) Unmaximize()
- func (f *Full) UpdateIcon()
- func (f *Full) UpdateTitle()
- type FullTheme
- type MoveState
- type Nada
- func (f *Nada) Active()
- func (f *Nada) Bottom() int
- func (f Nada) Client() Client
- func (f *Nada) Current() bool
- func (f Nada) Destroy()
- func (f Nada) Geom() xrect.Rect
- func (f *Nada) Inactive()
- func (f Nada) IsMapped() bool
- func (f *Nada) Left() int
- func (f *Nada) MROpt(validate bool, flags, x, y, w, h int)
- func (f Nada) Map()
- func (f *Nada) Maximize()
- func (f *Nada) Move(x, y int)
- func (f *Nada) MoveResize(validate bool, x, y, w, h int)
- func (f Nada) Moving() bool
- func (f Nada) MovingState() *MoveState
- func (f *Nada) Off()
- func (f *Nada) On()
- func (f Nada) Parent() *Parent
- func (f *Nada) Resize(validate bool, w, h int)
- func (f Nada) Resizing() bool
- func (f Nada) ResizingState() *ResizeState
- func (f *Nada) Right() int
- func (f *Nada) Top() int
- func (f Nada) Unmap()
- func (f *Nada) Unmaximize()
- type Parent
- type ResizeState
- type Slim
- func (f *Slim) Active()
- func (f *Slim) Bottom() int
- func (f Slim) Client() Client
- func (f *Slim) Current() bool
- func (f Slim) Destroy()
- func (f Slim) Geom() xrect.Rect
- func (f *Slim) Inactive()
- func (f Slim) IsMapped() bool
- func (f *Slim) Left() int
- func (f *Slim) MROpt(validate bool, flags, x, y, w, h int)
- func (f Slim) Map()
- func (f *Slim) Maximize()
- func (f *Slim) Move(x, y int)
- func (f *Slim) MoveResize(validate bool, x, y, w, h int)
- func (f Slim) Moving() bool
- func (f Slim) MovingState() *MoveState
- func (f *Slim) Off()
- func (f *Slim) On()
- func (f Slim) Parent() *Parent
- func (f *Slim) Resize(validate bool, w, h int)
- func (f Slim) Resizing() bool
- func (f Slim) ResizingState() *ResizeState
- func (f *Slim) Right() int
- func (f *Slim) Top() int
- func (f Slim) Unmap()
- func (f *Slim) Unmaximize()
- type SlimTheme
Constants ¶
View Source
const ( Active = iota Inactive )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Borders ¶
type Borders struct {
// contains filtered or unexported fields
}
func NewBorders ¶
func (*Borders) MoveResize ¶
func (Borders) MovingState ¶
func (f Borders) MovingState() *MoveState
func (Borders) ResizingState ¶
func (f Borders) ResizingState() *ResizeState
func (*Borders) Unmaximize ¶
func (f *Borders) Unmaximize()
type BordersTheme ¶
type BordersTheme struct { BorderSize int AThinColor, IThinColor render.Color ABorderColor, IBorderColor render.Color }
func DefaultBordersTheme ¶
func DefaultBordersTheme() *BordersTheme
type Client ¶
type Client interface { State() int Frame() Frame IsMaximized() bool Icon(width, height int) *xgraphics.Image Name() string ClientGeom() xrect.Rect ValidateHeight(height int) int ValidateWidth(width int) int GravitizeX(x, gravity int) int GravitizeY(y, gravity int) int Win() *xwindow.Window Id() xproto.Window EnsureUnmax() FramePieceMouseSetup(ident string, wid xproto.Window) String() string HeadGeom() xrect.Rect }
type Frame ¶
type Frame interface { Client() Client Parent() *Parent Map() Unmap() Destroy() Geom() xrect.Rect IsMapped() bool Move(x, y int) Resize(validate bool, width, height int) MoveResize(validate bool, x, y, width, height int) MROpt(validate bool, flags, x, y, width, height int) Moving() bool MovingState() *MoveState Resizing() bool ResizingState() *ResizeState Current() bool Top() int Bottom() int Left() int Right() int Off() On() Active() Inactive() Maximize() Unmaximize() }
type Full ¶
type Full struct {
// contains filtered or unexported fields
}
func (*Full) MoveResize ¶
func (Full) MovingState ¶
func (f Full) MovingState() *MoveState
func (Full) ResizingState ¶
func (f Full) ResizingState() *ResizeState
func (*Full) Unmaximize ¶
func (f *Full) Unmaximize()
func (*Full) UpdateIcon ¶
func (f *Full) UpdateIcon()
func (*Full) UpdateTitle ¶
func (f *Full) UpdateTitle()
type FullTheme ¶
type FullTheme struct { Font *truetype.Font FontSize float64 AFontColor, IFontColor render.Color TitleSize int ATitleColor, ITitleColor render.Color BorderSize int ABorderColor, IBorderColor render.Color ACloseButton, ICloseButton *xgraphics.Image AMaximizeButton, IMaximizeButton *xgraphics.Image AMinimizeButton, IMinimizeButton *xgraphics.Image }
func DefaultFullTheme ¶
type Nada ¶
type Nada struct {
// contains filtered or unexported fields
}
func (Nada) Destroy ¶
func (f Nada) Destroy()
Destroy will check if the client window is still a sub-window of this frame, and reparent it to the root window if so.
Destroy does *not* destroy the parent window! The caller must do that, since the parent window is shared across many frames.
func (*Nada) MoveResize ¶
func (Nada) MovingState ¶
func (f Nada) MovingState() *MoveState
func (Nada) ResizingState ¶
func (f Nada) ResizingState() *ResizeState
func (*Nada) Unmaximize ¶
func (f *Nada) Unmaximize()
type Parent ¶
type Parent struct { *xwindow.Window MoveState *MoveState ResizeState *ResizeState // contains filtered or unexported fields }
type ResizeState ¶
type Slim ¶
type Slim struct {
// contains filtered or unexported fields
}
func (Slim) Destroy ¶
func (f Slim) Destroy()
Destroy will check if the client window is still a sub-window of this frame, and reparent it to the root window if so.
Destroy does *not* destroy the parent window! The caller must do that, since the parent window is shared across many frames.
func (*Slim) MoveResize ¶
func (Slim) MovingState ¶
func (f Slim) MovingState() *MoveState
func (Slim) ResizingState ¶
func (f Slim) ResizingState() *ResizeState
func (*Slim) Unmaximize ¶
func (f *Slim) Unmaximize()
Click to show internal directories.
Click to hide internal directories.