Exemplo n.º 1
0
func (s *Settings) Set(name string, val interface{}) {
	sval := C.GtkSettingsValue{
		origin: settings_origin,
		value:  *v2g(glib.ValueOf(val)),
	}
	C.gtk_settings_set_property_value(s.g(), (*C.gchar)(C.CString(name)), &sval)
}
Exemplo n.º 2
0
func makeGstStructure(name string, fields glib.Params) *C.GstStructure {
	nm := (*C.gchar)(C.CString(name))
	s := C.gst_structure_new_empty(nm)
	C.free(unsafe.Pointer(nm))
	for k, v := range fields {
		n := (*C.gchar)(C.CString(k))
		C.gst_structure_take_value(s, n, v2g(glib.ValueOf(v)))
		C.free(unsafe.Pointer(n))
	}
	return s
}
Exemplo n.º 3
0
func (f Fourcc) Value() *glib.Value {
	return glib.ValueOf(f)
}