Ejemplo n.º 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)),
	}
}
Ejemplo n.º 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
}
Ejemplo n.º 3
0
Archivo: gdk.go Proyecto: 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
}
Ejemplo n.º 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
}
Ejemplo n.º 5
0
func (v GdkPixbufLoader) GetPixbuf() *GdkPixbuf {
	return &GdkPixbuf{
		C.gdk_pixbuf_loader_get_pixbuf(v.PixbufLoader)}
}
Ejemplo n.º 6
0
func (v Loader) GetPixbuf() *Pixbuf {
	return &Pixbuf{C.gdk_pixbuf_loader_get_pixbuf(v.GPixbufLoader)}
}