Esempio n. 1
0
func SaveFile(w *Window) string {
	cname := C.uiSaveFile(w.w)
	if cname == nil {
		return ""
	}
	defer C.uiFreeText(cname)
	return C.GoString(cname)
}
Esempio n. 2
0
// Text returns the Checkbox's text.
func (c *Checkbox) Text() string {
	ctext := C.uiCheckboxText(c.c)
	text := C.GoString(ctext)
	C.uiFreeText(ctext)
	return text
}
Esempio n. 3
0
File: draw.go Progetto: sjn1978/ui
// Family returns the name of the nth family in the list.
func (f *FontFamilies) Family(n int) string {
	cname := C.uiDrawFontFamiliesFamily(f.ff, C.uintmax_t(n))
	name := C.GoString(cname)
	C.uiFreeText(cname)
	return name
}
Esempio n. 4
0
// Text returns the Button's text.
func (b *Button) Text() string {
	ctext := C.uiButtonText(b.b)
	text := C.GoString(ctext)
	C.uiFreeText(ctext)
	return text
}
Esempio n. 5
0
// Title returns the Group's title.
func (g *Group) Title() string {
	ctitle := C.uiGroupTitle(g.g)
	title := C.GoString(ctitle)
	C.uiFreeText(ctitle)
	return title
}
Esempio n. 6
0
// Text returns the Label's text.
func (l *Label) Text() string {
	ctext := C.uiLabelText(l.l)
	text := C.GoString(ctext)
	C.uiFreeText(ctext)
	return text
}
Esempio n. 7
0
// Text returns the Entry's text.
func (e *Entry) Text() string {
	ctext := C.uiEntryText(e.e)
	text := C.GoString(ctext)
	C.uiFreeText(ctext)
	return text
}
Esempio n. 8
0
File: window.go Progetto: sjn1978/ui
// Title returns the Window's title.
func (w *Window) Title() string {
	ctitle := C.uiWindowTitle(w.w)
	title := C.GoString(ctitle)
	C.uiFreeText(ctitle)
	return title
}
Esempio n. 9
0
// LibuiFreeText allows implementations of Control
// to call the libui function uiFreeText.
func LibuiFreeText(c uintptr) {
	C.uiFreeText((*C.char)(unsafe.Pointer(c)))
}