コード例 #1
0
ファイル: gdkpixbuf.go プロジェクト: hauke96/go-gtk
func (v Loader) Close() (bool, *glib.Error) {
	var err *C.GError
	ret := gobool(C.gdk_pixbuf_loader_close(v.GPixbufLoader, &err))
	if err != nil {
		return ret, glib.ErrorFromNative(unsafe.Pointer(err))
	}
	return ret, nil
}
コード例 #2
0
ファイル: gdk.go プロジェクト: raichu/gotk3
// Close is a wrapper around gdk_pixbuf_loader_close().  An error is
// returned instead of a bool like the native C function to support the
// io.Closer interface.
func (v *PixbufLoader) Close() error {
	var err *C.GError

	if ok := gobool(C.gdk_pixbuf_loader_close(v.native(), &err)); !ok {
		defer C.g_error_free(err)
		return errors.New(C.GoString((*C.char)(err.message)))
	}
	return nil
}
コード例 #3
0
ファイル: gdkpixbuf_traits.go プロジェクト: reusee/ggir
/*
Informs a pixbuf loader that no further writes with
gdk_pixbuf_loader_write() will occur, so that it can free its
internal loading structures. Also, tries to parse any data that
hasn't yet been parsed; if the remaining data is partial or
corrupt, an error will be returned.  If %FALSE is returned, @error
will be set to an error from the #GDK_PIXBUF_ERROR or #G_FILE_ERROR
domains. If you're just cancelling a load rather than expecting it
to be finished, passing %NULL for @error to ignore it is
reasonable.

Remember that this does not unref the loader, so if you plan not to
use it anymore, please g_object_unref() it.
*/
func (self *TraitPixbufLoader) Close() (return__ bool, __err__ error) {
	var __cgo_error__ *C.GError
	var __cgo__return__ C.gboolean
	__cgo__return__ = C.gdk_pixbuf_loader_close(self.CPointer, &__cgo_error__)
	return__ = __cgo__return__ == C.gboolean(1)
	if __cgo_error__ != nil {
		__err__ = errors.New(C.GoString((*C.char)(unsafe.Pointer(__cgo_error__.message))))
	}
	return
}
コード例 #4
0
ファイル: gdkpixbuf.go プロジェクト: arip33/go-gtk
func (v GdkPixbufLoader) Close() (ret bool, err *C.GError) {
	var error *C.GError
	ret = gboolean2bool(C.gdk_pixbuf_loader_close(v.PixbufLoader, &error))
	err = error
	return
}
コード例 #5
0
ファイル: gdkpixbuf.go プロジェクト: stnmrshx/mokuton-gtk
func (v Loader) Close() (ret bool, err *C.GError) {
	var error *C.GError
	ret = gobool(C.gdk_pixbuf_loader_close(v.GPixbufLoader, &error))
	err = error
	return
}