// Code generated by cmd/cgo; DO NOT EDIT. //line /home/josie/.cache/paru/clone/wiiudownloader/src/pkg/mod/github.com/gotk3/gotk3@v0.6.5-0.20240618185848-ff349ae13f56/gdk/pixbuf_since_2_2.go:1:1 // Same copyright and license as the rest of the files in this project package gdk // #cgo pkg-config: gdk-3.0 glib-2.0 gobject-2.0 // #include // #include "gdk.go.h" // #include "pixbuf.go.h" import _ "unsafe" import ( "unsafe" "github.com/gotk3/gotk3/glib" ) // The GdkPixbuf Structure // TODO: // gdk_pixbuf_set_option(). /* * GdkPixbufLoader */ // SetSize is a wrapper around gdk_pixbuf_loader_set_size(). func (v *PixbufLoader) SetSize(width, height int) { func() { _cgo0 := /*line :27:31*/v.native(); var _cgo1 _Ctype_int = _Ctype_int /*line :27:48*/(width); var _cgo2 _Ctype_int = _Ctype_int /*line :27:62*/(height); _cgoCheckPointer(_cgo0, nil); /*line :27:71*/_Cfunc_gdk_pixbuf_loader_set_size(_cgo0, _cgo1, _cgo2); }() } /* * PixbufFormat */ // PixbufGetFormats is a wrapper around gdk_pixbuf_get_formats(). func PixbufGetFormats() []*PixbufFormat { l := (* /*line :36:9*/_Ctype_struct__GSList /*line :36:25*/)(( /*line :36:27*/_Cfunc_gdk_pixbuf_get_formats /*line :36:50*/)()) formats := glib.WrapSList(uintptr(unsafe.Pointer(l))) if formats == nil { return nil // no error. A nil list is considered to be empty. } // "The structures themselves are owned by GdkPixbuf". Free the list only. defer formats.Free() ret := make([]*PixbufFormat, 0, formats.Length()) formats.Foreach(func(item interface{}) { ret = append( ret, &PixbufFormat{ (* /*line :50:7*/_Ctype_GdkPixbufFormat /*line :50:24*/)(item.(unsafe.Pointer))}) }) return ret } // GetName is a wrapper around gdk_pixbuf_format_get_name(). func (f *PixbufFormat) GetName() (string, error) { c := func() *_Ctype_gchar{ _cgo0 := /*line :58:36*/f.native(); _cgoCheckPointer(_cgo0, nil); return /*line :58:47*/_Cfunc_gdk_pixbuf_format_get_name(_cgo0); }() return ( /*line :59:9*/_Cfunc_GoString /*line :59:18*/)((* /*line :59:22*/_Ctype_char /*line :59:28*/)(c)), nil } // GetDescription is a wrapper around gdk_pixbuf_format_get_description(). func (f *PixbufFormat) GetDescription() (string, error) { c := func() *_Ctype_gchar{ _cgo0 := /*line :64:43*/f.native(); _cgoCheckPointer(_cgo0, nil); return /*line :64:54*/_Cfunc_gdk_pixbuf_format_get_description(_cgo0); }() return ( /*line :65:9*/_Cfunc_GoString /*line :65:18*/)((* /*line :65:22*/_Ctype_char /*line :65:28*/)(c)), nil } // GetMimeTypes is a wrapper around gdk_pixbuf_format_get_mime_types(). func (f *PixbufFormat) GetMimeTypes() []string { var types []string c := func() **_Ctype_gchar{ _cgo0 := /*line :71:42*/f.native(); _cgoCheckPointer(_cgo0, nil); return /*line :71:53*/_Cfunc_gdk_pixbuf_format_get_mime_types(_cgo0); }() if c == nil { return nil } for *c != nil { types = append(types, ( /*line :76:25*/_Cfunc_GoString /*line :76:34*/)((* /*line :76:38*/_Ctype_char /*line :76:44*/)(*c))) c = func() **_Ctype_gchar{ _cgo0 := /*line :77:23*/c; _cgoCheckPointer(_cgo0, nil); return /*line :77:25*/_Cfunc_next_gcharptr(_cgo0); }() } return types } // GetExtensions is a wrapper around gdk_pixbuf_format_get_extensions(). func (f *PixbufFormat) GetExtensions() []string { var extensions []string c := func() **_Ctype_gchar{ _cgo0 := /*line :85:42*/f.native(); _cgoCheckPointer(_cgo0, nil); return /*line :85:53*/_Cfunc_gdk_pixbuf_format_get_extensions(_cgo0); }() if c == nil { return nil } for *c != nil { extensions = append(extensions, ( /*line :90:35*/_Cfunc_GoString /*line :90:44*/)((* /*line :90:48*/_Ctype_char /*line :90:54*/)(*c))) c = func() **_Ctype_gchar{ _cgo0 := /*line :91:23*/c; _cgoCheckPointer(_cgo0, nil); return /*line :91:25*/_Cfunc_next_gcharptr(_cgo0); }() } return extensions } // GetLicense is a wrapper around gdk_pixbuf_format_get_license(). func (f *PixbufFormat) GetLicense() (string, error) { c := func() *_Ctype_gchar{ _cgo0 := /*line :98:39*/f.native(); _cgoCheckPointer(_cgo0, nil); return /*line :98:50*/_Cfunc_gdk_pixbuf_format_get_license(_cgo0); }() return ( /*line :99:9*/_Cfunc_GoString /*line :99:18*/)((* /*line :99:22*/_Ctype_char /*line :99:28*/)(c)), nil }