wind

package
v0.0.0-...-d3fc8e5 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Columntag = iota
	Rowtag
	Tag
	Body
)
View Source
const (
	BUFSIZE   = 8192
	RUNESIZE  = int(unsafe.Sizeof(rune(0)))
	RBUFSIZE  = bufs.Len / runes.RuneSize
	EVENTSIZE = 256
)

fbufalloc() guarantees room off end of BUFSIZE

View Source
const (
	TABDIR = 3
)

Variables

View Source
var GlobalAutoindent bool

extern var wdir [unknown]C.char /* must use extern because no dimension given */

View Source
var GlobalIncref int
View Source
var MaxTab int // size of a tab, in units of the '0' character
View Source
var OnWinclose func(*Window)

Functions

func All

func All(f func(*Window, interface{}), arg interface{})

func Colclean

func Colclean(c *Column) bool

func Coldragwin1

func Coldragwin1(c *Column, w *Window, but int, op, p draw.Point)

func Colgrow

func Colgrow(c *Column, w *Window, but int)

func Colresize

func Colresize(c *Column, r draw.Rectangle)

func Colsort

func Colsort(c *Column)

func Delrunepos

func Delrunepos(w *Window) int

func Dirname

func Dirname(t *Text, r []rune) []rune

func Init

func Init(w *Window, clone *Window, r draw.Rectangle)

func Region

func Region(a int, b int) int

func RowInit

func RowInit(row *Row, r draw.Rectangle)

func Rowclean

func Rowclean(row *Row) bool

func Rowclose

func Rowclose(row *Row, c *Column, dofree bool)

func Rowdragcol1

func Rowdragcol1(row *Row, c *Column, op, p draw.Point)

func Rowresize

func Rowresize(row *Row, r draw.Rectangle)

func Scrlresize

func Scrlresize()

func Selrestore

func Selrestore(f *frame.Frame, pt0 draw.Point, p0 int, p1 int)

func Textbacknl

func Textbacknl(t *Text, p int, n int) int

func Textbsinsert

func Textbsinsert(t *Text, q0 int, r []rune, tofile bool, nrp *int) int

func Textbswidth

func Textbswidth(t *Text, c rune) int

func Textcolumnate

func Textcolumnate(t *Text, dlp []*Dirlist)

func Textcommit

func Textcommit(t *Text, tofile bool)

func Textdelete

func Textdelete(t *Text, q0 int, q1 int, tofile bool)

func Textdoubleclick

func Textdoubleclick(t *Text, q0 *int, q1 *int)

func Textfilewidth

func Textfilewidth(t *Text, q0 int, oneelement bool) int

func Textfill

func Textfill(t *Text)

func Textinsert

func Textinsert(t *Text, q0 int, r []rune, tofile bool)

func Textreset

func Textreset(t *Text)

func Textresize

func Textresize(t *Text, r draw.Rectangle, keepextra bool) int

func Textscrdraw

func Textscrdraw(t *Text)

func Textsetorigin

func Textsetorigin(t *Text, org int, exact bool)

func Textsetselect

func Textsetselect(t *Text, q0 int, q1 int)

func Textshow

func Textshow(t *Text, q0 int, q1 int, doselect bool)

func Typecommit

func Typecommit(t *Text)

func Winaddincl

func Winaddincl(w *Window, r []rune)

func Winclean

func Winclean(w *Window, conservative bool) bool

func Wincleartatg

func Wincleartatg(w *Window)

func Winclose

func Winclose(w *Window)

func Wincommit

func Wincommit(w *Window, t *Text)

func Winctlprint

func Winctlprint(w *Window, fonts bool) string

func Windirfree

func Windirfree(w *Window)

func Winevent

func Winevent(w *Window, format string, args ...interface{})

func Winlock

func Winlock(w *Window, owner rune)

func Winlock1

func Winlock1(w *Window, owner rune)

func Winresize

func Winresize(w *Window, r draw.Rectangle, safe, keepextra bool) int

func Winsetname

func Winsetname(w *Window, name []rune)

func Winsettag

func Winsettag(w *Window)

func Winundo

func Winundo(w *Window, isundo bool)

func Winunlock

func Winunlock(w *Window)

Types

type Column

type Column struct {
	R    draw.Rectangle
	Tag  Text
	Row  *Row
	W    []*Window
	Safe bool
}
var Activecol *Column

func RowAdd

func RowAdd(row *Row, c *Column, x int) *Column

type Dirlist

type Dirlist struct {
	R   []rune
	Wid int
}

type File

type File struct {
	*file.File
	Curtext *Text
	Text    []*Text
	Info    os.FileInfo
	SHA1    [20]byte
	Unread  bool
	// contains filtered or unexported fields
}

func (*File) SetName

func (f *File) SetName(r []rune)

type Row

type Row struct {
	Lk  sync.Mutex
	R   draw.Rectangle
	Tag Text
	Col []*Column
}
var TheRow Row

type Text

type Text struct {
	File    *File
	Fr      frame.Frame
	Reffont *adraw.RefFont
	Org     int
	Q0      int
	Q1      int
	What    int
	Tabstop int
	W       *Window
	ScrollR draw.Rectangle

	All      draw.Rectangle
	Row      *Row
	Col      *Column
	IQ1      int
	Eq0      int
	Cq0      int
	Cache    []rune
	Nofill   bool
	Needundo bool
	// contains filtered or unexported fields
}
var Argtext *Text
var Barttext *Text // shared between mousetask and keyboardthread
var Mousetext *Text // global because Text.close needs to clear it
var Seltext *Text
var Typetext *Text // global because Text.close needs to clear it

func Rowwhich

func Rowwhich(row *Row, p draw.Point) *Text

func (*Text) Len

func (t *Text) Len() int

func (*Text) RuneAt

func (t *Text) RuneAt(pos int) rune

type Window

type Window struct {
	Ref        uint32
	Tag        Text
	Body       Text
	R          draw.Rectangle
	IsDir      bool
	IsScratch  bool
	Filemenu   bool
	Dirty      bool
	Autoindent bool
	Showdel    bool
	ID         int
	Addr       runes.Range
	Limit      runes.Range
	Nomark     bool
	Wrselrange runes.Range
	Rdselfd    *os.File
	Col        *Column
	Eventtag   uint16
	Eventwait  chan bool
	Events     []byte
	Owner      rune
	Maxlines   int
	Dlp        []*Dirlist
	Putseq     int
	Incl       [][]rune

	Ctllock sync.Mutex
	Ctlfid  int
	Dumpstr string
	Dumpdir string

	Utflastqid  int
	Utflastboff int64
	Utflastq    int
	Tagsafe     bool
	Tagexpand   bool
	Taglines    int

	Editoutlk util.QLock
	External  bool
	// contains filtered or unexported fields
}
var Activewin *Window

func Coladd

func Coladd(c *Column, w *Window, clone *Window, y int) *Window

func Colclose

func Colclose(c *Column, w *Window, dofree bool) *Window

Jump to

Keyboard shortcuts

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