示例#1
0
文件: label.go 项目: napsy/go-gtk3
func NewLabelWithMnemonic(str string) *Label {
	l := &Label{}

	s := gobject.GString(str)
	defer s.Free()

	o := C.gtk_label_new_with_mnemonic((*C.gchar)(s.GetPtr()))

	l.Widget = NewWidget(unsafe.Pointer(o))
	l.object = C.to_GtkLabel(unsafe.Pointer(o))

	return l
}
示例#2
0
文件: label.go 项目: napsy/go-gtk3
// Conversion function for gobject registration map
func newLabelFromNative(obj unsafe.Pointer) interface{} {
	var l Label
	l.object = C.to_GtkLabel(obj)
	l.Widget = NewWidget(unsafe.Pointer(l.object))
	return &l
}