gui

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2019 License: GPL-3.0 Imports: 21 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Max added in v0.8.0

func Max(x, y int) int

func Min added in v0.8.0

func Min(x, y int) int

func UpdateNSGLContext added in v0.7.10

func UpdateNSGLContext(window *glfw.Window)

Types

type FontMap

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

func NewFontMap

func NewFontMap(defaultFont *glfont.Font, defaultBoldFont *glfont.Font) *FontMap

func (*FontMap) BoldFont added in v0.7.7

func (fm *FontMap) BoldFont() *glfont.Font

func (*FontMap) DefaultFont added in v0.7.7

func (fm *FontMap) DefaultFont() *glfont.Font

func (*FontMap) UpdateResolution

func (fm *FontMap) UpdateResolution(w int, h int)

type GUI

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

func New

func New(config *config.Config, terminal *terminal.Terminal, logger *zap.SugaredLogger) (*GUI, error)

func (*GUI) Close

func (gui *GUI) Close()

func (*GUI) GetMonitor added in v0.8.0

func (g *GUI) GetMonitor() *glfw.Monitor

func (*GUI) Height added in v0.8.0

func (g *GUI) Height() int

func (*GUI) RecalculateDpiScale added in v0.8.0

func (g *GUI) RecalculateDpiScale()

RecalculateDpiScale calculates dpi scale in comparison with "standard" monitor's dpi values

func (*GUI) Render

func (gui *GUI) Render() error

func (*GUI) SetHeight added in v0.8.0

func (g *GUI) SetHeight(height int)

func (*GUI) SetWidth added in v0.8.0

func (g *GUI) SetWidth(width int)

func (*GUI) SwapBuffers added in v0.7.10

func (gui *GUI) SwapBuffers()

func (*GUI) Width added in v0.8.0

func (g *GUI) Width() int

type OpenGLRenderer

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

func NewOpenGLRenderer

func NewOpenGLRenderer(config *config.Config, fontMap *FontMap, areaX int, areaY int, areaWidth int, areaHeight int, colourAttr uint32, program uint32) *OpenGLRenderer

func (*OpenGLRenderer) CellHeight

func (r *OpenGLRenderer) CellHeight() float32

func (*OpenGLRenderer) CellWidth

func (r *OpenGLRenderer) CellWidth() float32

func (*OpenGLRenderer) Clean

func (r *OpenGLRenderer) Clean()

func (*OpenGLRenderer) DrawCellBg

func (r *OpenGLRenderer) DrawCellBg(cell buffer.Cell, col uint, row uint, cursor bool, colour *config.Colour, force bool)

func (*OpenGLRenderer) DrawCellImage

func (r *OpenGLRenderer) DrawCellImage(cell buffer.Cell, col uint, row uint)

func (*OpenGLRenderer) DrawCellText

func (r *OpenGLRenderer) DrawCellText(text string, col uint, row uint, alpha float32, colour [3]float32, bold bool)

func (*OpenGLRenderer) DrawCursor

func (r *OpenGLRenderer) DrawCursor(col uint, row uint, colour config.Colour)

func (*OpenGLRenderer) GetTermSize

func (r *OpenGLRenderer) GetTermSize() (uint, uint)

func (*OpenGLRenderer) SetArea

func (r *OpenGLRenderer) SetArea(areaX int, areaY int, areaWidth int, areaHeight int)

Jump to

Keyboard shortcuts

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