Ejemplo n.º 1
0
func (self *FontDescription) Merget(descToMerge *FontDescription, replaceExisting bool) {
	b := gobject.GBool(replaceExisting)
	defer b.Free()

	if descToMerge == nil {
		C.pango_font_description_merge(self.object, nil, *((*C.gboolean)(b.GetPtr())))
		return
	}
	C.pango_font_description_merge(self.object, descToMerge.object, *((*C.gboolean)(b.GetPtr())))
}
Ejemplo n.º 2
0
// Exported functions
//export _g_source_func
func _g_source_func(user_data unsafe.Pointer) C.gboolean {
	id := *((*C.gint64)(user_data))
	var res bool

	if f, ok := _closures[int64(id)]; ok {
		res = f([]interface{}{})
	}
	b := gobject.GBool(res)
	defer b.Free()
	return *((*C.gboolean)(b.GetPtr()))
}
Ejemplo n.º 3
0
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
}