Пример #1
0
func (v GdkPixbufLoader) Write(buf []byte) (ret bool, err *C.GError) {
	var error *C.GError
	var pbuf *byte
	pbuf = &buf[0]
	ret = gboolean2bool(C.gdk_pixbuf_loader_write(v.PixbufLoader, C.to_gucharptr(unsafe.Pointer(pbuf)), C.gsize(len(buf)), &error))
	err = error
	return
}
Пример #2
0
func (v Loader) Write(buf []byte) (bool, *glib.Error) {
	var err *C.GError
	var pbuf *byte
	pbuf = &buf[0]
	ret := gobool(C.gdk_pixbuf_loader_write(v.GPixbufLoader, C.to_gucharptr(unsafe.Pointer(pbuf)), C.gsize(len(buf)), &err))
	if err != nil {
		return ret, glib.ErrorFromNative(unsafe.Pointer(err))
	}
	return ret, nil
}