示例#1
0
文件: button.go 项目: hwch/go-gtk
func NewButton() *Button {
	bt := C.gtk_button_new()
	if bt == nil {
		return nil
	}
	return ToButton(unsafe.Pointer(bt))
}
示例#2
0
文件: button.go 项目: napsy/go-gtk3
//Create and return new button Structure
func NewButton() *Button {
	b := &Button{}

	o := C.gtk_button_new()

	b.Container = NewContainer(unsafe.Pointer(o))

	b.object = C.to_GtkButton(unsafe.Pointer(o))
	return b
}
示例#3
0
文件: button.go 项目: ziutek/gtk
func NewButton() *Button {
	b := new(Button)
	b.SetPtr(glib.Pointer(C.gtk_button_new()))
	return b
}
示例#4
0
func gtk_button_new() *C.GtkWidget {
	return C.gtk_button_new()
}