示例#1
0
func (v Loader) GetPixbuf() *Pixbuf {
	gpixbuf := C.gdk_pixbuf_loader_get_pixbuf(v.GPixbufLoader)
	return &Pixbuf{
		GdkPixbuf: &GdkPixbuf{gpixbuf},
		GObject:   glib.ObjectFromNative(unsafe.Pointer(gpixbuf)),
	}
}
示例#2
0
/*
Queries the #GdkPixbuf that a pixbuf loader is currently creating.
In general it only makes sense to call this function after the
"area-prepared" signal has been emitted by the loader; this means
that enough data has been read to know the size of the image that
will be allocated.  If the loader has not received enough data via
gdk_pixbuf_loader_write(), then this function returns %NULL.  The
returned pixbuf will be the same in all future calls to the loader,
so simply calling g_object_ref() should be sufficient to continue
using it.  Additionally, if the loader is an animation, it will
return the "static image" of the animation
(see gdk_pixbuf_animation_get_static_image()).
*/
func (self *TraitPixbufLoader) GetPixbuf() (return__ *Pixbuf) {
	var __cgo__return__ *C.GdkPixbuf
	__cgo__return__ = C.gdk_pixbuf_loader_get_pixbuf(self.CPointer)
	if __cgo__return__ != nil {
		return__ = NewPixbufFromCPointer(unsafe.Pointer(reflect.ValueOf(__cgo__return__).Pointer()))
	}
	return
}
示例#3
0
文件: gdk.go 项目: raichu/gotk3
// GetPixbuf is a wrapper around gdk_pixbuf_loader_get_pixbuf().
func (v *PixbufLoader) GetPixbuf() (*Pixbuf, error) {
	c := C.gdk_pixbuf_loader_get_pixbuf(v.native())
	if c == nil {
		return nil, nilPtrErr
	}
	obj := &glib.Object{glib.ToGObject(unsafe.Pointer(c))}
	p := &Pixbuf{obj}
	obj.Ref()
	runtime.SetFinalizer(obj, (*glib.Object).Unref)
	return p, nil
}
示例#4
0
func (_self_ *PixbufLoader) GetPixbuf() (_go__return__ Pixbuf) {
	var _return_ *C.GdkPixbuf
	_return_ = C.gdk_pixbuf_loader_get_pixbuf((*C.GdkPixbufLoader)(_self_._value_))
	_go__return__ = ToPixbuf(unsafe.Pointer(_return_))
	return
}
示例#5
0
func (v GdkPixbufLoader) GetPixbuf() *GdkPixbuf {
	return &GdkPixbuf{
		C.gdk_pixbuf_loader_get_pixbuf(v.PixbufLoader)}
}
示例#6
0
func (v Loader) GetPixbuf() *Pixbuf {
	return &Pixbuf{C.gdk_pixbuf_loader_get_pixbuf(v.GPixbufLoader)}
}