func (self *Window) SetWMClass(name, class string) { n := gobject.GString(name) c := gobject.GString(class) defer n.Free() defer c.Free() C.gtk_window_set_wmclass(self.object, (*C.gchar)(n.GetPtr()), (*C.gchar)(c.GetPtr())) }
func NewButtonWithMnemonic(label string) *Button { b := &Button{} l := gobject.GString(label) o := C.gtk_button_new_with_mnemonic((*C.gchar)(l.GetPtr())) b.Container = NewContainer(unsafe.Pointer(o)) b.object = C.to_GtkButton(unsafe.Pointer(o)) return b }
func NewFontDescriptionFromString(str string) *FontDescription { s := gobject.GString(str) defer s.Free() f := &FontDescription{} f.object = C.pango_font_description_from_string((*C.char)(s.GetPtr())) FontDescriptionFinalizer(f) return f }
// Create new application func NewApplication(id string, flags GApplicationFlags) *Application { cid := gobject.GString(id) defer cid.Free() app := C.gtk_application_new((*C.gchar)(cid.GetPtr()), C.GApplicationFlags(flags)) C.g_application_register(C.to_GApplication(app), nil, nil) //C.g_application_activate(C.to_GApplication(app)) gtkapp := &Application{app} gtkapp.Connect("activate", func() {}) return gtkapp }
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 }
func NewFrame(label string) *Frame { f := &Frame{} s := gobject.GString(label) defer s.Free() o := C.gtk_frame_new((*C.gchar)(s.GetPtr())) f.Container = NewContainer(unsafe.Pointer(o)) f.object = C.to_GtkFrame(unsafe.Pointer(o)) return f }
func AtomIntern(atomName string, onlyIfExists bool) Atom { s := gobject.GString(atomName) defer s.Free() b := gobject.GBool(onlyIfExists) defer b.Free() o := C.gdk_atom_intern((*C.gchar)(s.GetPtr()), *((*C.gboolean)(b.GetPtr()))) a := Atom{} a.object = new(C.GdkAtom) *a.object = o return a }
// Button interface func (self *Button) SetLabel(label string) { s := gobject.GString(label) //defer s.Free() C.gtk_button_set_label(self.object, (*C.gchar)(s.GetPtr())) }
// Button interface func (self *Entry) SetText(label string) { s := gobject.GString(label) //defer s.Free() C.gtk_entry_set_text(self.object, (*C.gchar)(s.GetPtr())) }
func (self *Label) SetLabel(str string) { s := gobject.GString(str) defer s.Free() C.gtk_label_set_label(self.object, (*C.gchar)(s.GetPtr())) }
func (self *Label) SetTextWithMnemonic(text string) { s := gobject.GString(text) defer s.Free() C.gtk_label_set_text_with_mnemonic(self.object, (*C.gchar)(s.GetPtr())) }
func (self *Label) SetMarkupWithMnemonic(str string) { s := gobject.GString(str) defer s.Free() C.gtk_label_set_markup_with_mnemonic(self.object, (*C.gchar)(s.GetPtr())) }
func (self *FontDescription) SetFamily(family string) { s := gobject.GString(family) defer s.Free() C.pango_font_description_set_family(self.object, (*C.char)(s.GetPtr())) }
// Frame interface func (self *Frame) SetLabel(label string) { s := gobject.GString(label) defer s.Free() C.gtk_frame_set_label(self.object, (*C.gchar)(s.GetPtr())) }