예제 #1
0
func SaveFile(w *Window) string {
	cname := C.uiSaveFile(w.w)
	if cname == nil {
		return ""
	}
	defer C.uiFreeText(cname)
	return C.GoString(cname)
}
예제 #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
}
예제 #3
0
파일: draw.go 프로젝트: 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
}
예제 #4
0
파일: button.go 프로젝트: carriercomm/ui-1
// 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
}
예제 #5
0
파일: group.go 프로젝트: carriercomm/ui-1
// 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
}
예제 #6
0
파일: label.go 프로젝트: duckbrain/ui
// 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
}
예제 #7
0
파일: entry.go 프로젝트: duckbrain/ui
// 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
}
예제 #8
0
파일: window.go 프로젝트: 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
}
예제 #9
0
파일: control.go 프로젝트: duckbrain/ui
// LibuiFreeText allows implementations of Control
// to call the libui function uiFreeText.
func LibuiFreeText(c uintptr) {
	C.uiFreeText((*C.char)(unsafe.Pointer(c)))
}