示例#1
0
文件: label_unix.go 项目: sjn1978/ui
func (l *label) SetText(text string) {
	ctext := togstr(text)
	defer freegstr(ctext)
	C.gtk_label_set_text(l.label, ctext)
}
示例#2
0
func gtk_label_set_text(widget *C.GtkWidget, text string) {
	ctext := C.CString(text)
	defer C.free(unsafe.Pointer(ctext))
	C.gtk_label_set_text(togtklabel(widget), togstr(ctext))
}
示例#3
0
文件: label.go 项目: napsy/go-gtk3
func (self *Label) SetText(str string) {
	s := gobject.GString(str)
	defer s.Free()
	C.gtk_label_set_text(self.object, (*C.gchar)(s.GetPtr()))
}
示例#4
0
文件: label.go 项目: twstrike/gotk3
// SetText is a wrapper around gtk_label_set_text().
func (v *Label) SetText(str string) {
	cstr := C.CString(str)
	defer C.free(unsafe.Pointer(cstr))
	C.gtk_label_set_text(v.native(), (*C.gchar)(cstr))
}
示例#5
0
文件: linux_gtk.go 项目: axet/desktop
func gtk_label_set_text(label GtkWidget, s string) {
	n := C.CString(s)
	defer C.free(unsafe.Pointer(n))
	C.gtk_label_set_text(Arg(label), n)
}