detached 4bd1055

Core + Gen + GIR + Templates: Support error returns when throws=1

commit
4bd10555ef83ef3ce5a635c20ff10d7d5b3b8360
author
jwijenbergh · · 2023-08-16 16:10 UTC
parent
33775f6
signature
GPG Unverified1A2298F6C34F96E5 The key is unknown
598 files · +25884 -22504
M gen.go +4 -0
@@ -44,4 +44,8 @@ func main() {
44 if err == nil {44 if err == nil {
45 os.WriteFile("v4/gobject/more.go", data, 0o644)45 os.WriteFile("v4/gobject/more.go", data, 0o644)
46 }46 }
47+ data, err = os.ReadFile("templates/glib")
48+ if err == nil {
49+ os.WriteFile("v4/glib/more.go", data, 0o644)
50+ }
47 }51 }
M internal/core/core.go +21 -0
@@ -9,6 +9,7 @@ import (
9 "os/exec"9 "os/exec"
10 "path/filepath"10 "path/filepath"
11 "strings"11 "strings"
12+ "unsafe"
12 13
13 "github.com/jwijenbergh/purego"14 "github.com/jwijenbergh/purego"
14 )15 )
@@ -136,3 +137,23 @@ func GetPath(name string) string {
136 137
137 panic(fmt.Sprintf("Path for library: %s not found. Please set the path to this library shared object file manually with env variable: %s. Or make sure pkg-config is setup correctly", strings.ToLower(name), ev))138 panic(fmt.Sprintf("Path for library: %s not found. Please set the path to this library shared object file manually with env variable: %s. Or make sure pkg-config is setup correctly", strings.ToLower(name), ev))
138 }139 }
140+
141+
142+
143+// GoString copies a char* to a Go string.
144+// This function was copied from purego
145+func GoString(c uintptr) string {
146+ // We take the address and then dereference it to trick go vet from creating a possible misuse of unsafe.Pointer
147+ ptr := *(*unsafe.Pointer)(unsafe.Pointer(&c))
148+ if ptr == nil {
149+ return ""
150+ }
151+ var length int
152+ for {
153+ if *(*byte)(unsafe.Add(ptr, uintptr(length))) == '\x00' {
154+ break
155+ }
156+ length++
157+ }
158+ return string(unsafe.Slice((*byte)(ptr), length))
159+}
M internal/gir/pass/pass.go +15 -10
@@ -110,6 +110,11 @@ func (p *Pass) writeGo(r types.Repository, gotemp *template.Template, dir string
110 if f.AnyType.Type != nil && f.AnyType.Type.CType == "gint" {110 if f.AnyType.Type != nil && f.AnyType.Type.CType == "gint" {
111 _type = "int32"111 _type = "int32"
112 }112 }
113+
114+ // HACK: in structs the strings should be uintptr as we convert it ourselves
115+ if _type == "string" {
116+ _type = "uintptr"
117+ }
113 fields = append(fields, types.RecordField{118 fields = append(fields, types.RecordField{
114 Name: util.SnakeToCamel(f.Name),119 Name: util.SnakeToCamel(f.Name),
115 Type: _type,120 Type: _type,
@@ -131,8 +136,8 @@ func (p *Pass) writeGo(r types.Repository, gotemp *template.Template, dir string
131 cbT := types.CallbackTemplate{136 cbT := types.CallbackTemplate{
132 Doc: cb.Doc.StringSafe(),137 Doc: cb.Doc.StringSafe(),
133 Name: cb.Name,138 Name: cb.Name,
134- Args: cb.Parameters.Template(ns.Name, "", p.Types),139+ Args: cb.Parameters.Template(ns.Name, "", p.Types, cb.Throws),
135- Ret: cb.ReturnValue.Template(ns.Name, "", p.Types),140+ Ret: cb.ReturnValue.Template(ns.Name, "", p.Types, cb.Throws),
136 }141 }
137 callbacks[fn] = append(callbacks[fn], cbT)142 callbacks[fn] = append(callbacks[fn], cbT)
138 }143 }
@@ -186,8 +191,8 @@ func (p *Pass) writeGo(r types.Repository, gotemp *template.Template, dir string
186 Name: name,191 Name: name,
187 CName: f.CIdentifier,192 CName: f.CIdentifier,
188 Doc: f.Doc.StringSafe(),193 Doc: f.Doc.StringSafe(),
189- Args: f.Parameters.Template(ns.Name, "", p.Types),194+ Args: f.Parameters.Template(ns.Name, "", p.Types, f.Throws),
190- Ret: f.ReturnValue.Template(ns.Name, "", p.Types),195+ Ret: f.ReturnValue.Template(ns.Name, "", p.Types, f.Throws),
191 })196 })
192 }197 }
193 198
@@ -204,8 +209,8 @@ func (p *Pass) writeGo(r types.Repository, gotemp *template.Template, dir string
204 Name: name,209 Name: name,
205 CName: c.CIdentifier,210 CName: c.CIdentifier,
206 Doc: c.Doc.StringSafe(),211 Doc: c.Doc.StringSafe(),
207- Args: c.Parameters.Template(ns.Name, "", p.Types),212+ Args: c.Parameters.Template(ns.Name, "", p.Types, c.Throws),
208- Ret: c.ReturnValue.Template(ns.Name, "", p.Types),213+ Ret: c.ReturnValue.Template(ns.Name, "", p.Types, c.Throws),
209 }214 }
210 }215 }
211 signals := make([]types.SignalsTemplate, len(cls.Signals))216 signals := make([]types.SignalsTemplate, len(cls.Signals))
@@ -214,8 +219,8 @@ func (p *Pass) writeGo(r types.Repository, gotemp *template.Template, dir string
214 Doc: s.Doc.StringSafe(),219 Doc: s.Doc.StringSafe(),
215 Name: util.DashToCamel(s.Name),220 Name: util.DashToCamel(s.Name),
216 CName: s.Name,221 CName: s.Name,
217- Args: s.Parameters.Template(ns.Name, "", p.Types),222+ Args: s.Parameters.Template(ns.Name, "", p.Types, false),
218- Ret: s.ReturnValue.Template(ns.Name, "", p.Types),223+ Ret: s.ReturnValue.Template(ns.Name, "", p.Types, false),
219 }224 }
220 }225 }
221 receivers := make([]types.FuncTemplate, len(cls.Methods))226 receivers := make([]types.FuncTemplate, len(cls.Methods))
@@ -226,8 +231,8 @@ func (p *Pass) writeGo(r types.Repository, gotemp *template.Template, dir string
226 Doc: f.Doc.StringSafe(),231 Doc: f.Doc.StringSafe(),
227 Name: name,232 Name: name,
228 CName: f.CIdentifier,233 CName: f.CIdentifier,
229- Args: f.Parameters.Template(ns.Name, "", p.Types),234+ Args: f.Parameters.Template(ns.Name, "", p.Types, f.Throws),
230- Ret: f.ReturnValue.Template(ns.Name, "", p.Types),235+ Ret: f.ReturnValue.Template(ns.Name, "", p.Types, f.Throws),
231 }236 }
232 }237 }
233 var interfaces []types.InterfaceTemplate238 var interfaces []types.InterfaceTemplate
M internal/gir/types/interface.go +2 -2
@@ -28,8 +28,8 @@ func ConvertInterface(currns string, ins string, inter Interface, implemented ma
28 Doc: m.Doc.StringSafe(),28 Doc: m.Doc.StringSafe(),
29 CName: m.CIdentifier,29 CName: m.CIdentifier,
30 Name: name,30 Name: name,
31- Args: m.Parameters.Template(currns, ins, kinds),31+ Args: m.Parameters.Template(currns, ins, kinds, m.Throws),
32- Ret: m.ReturnValue.Template(currns, ins, kinds),32+ Ret: m.ReturnValue.Template(currns, ins, kinds, m.Throws),
33 },33 },
34 })34 })
35 }35 }
M internal/gir/types/template.go +98 -1
@@ -132,6 +132,15 @@ func (f *funcArgsTemplate) Add(p Parameter, ins string, ns string, kinds KindMap
132 f.AddPure(goType, varName, kind)132 f.AddPure(goType, varName, kind)
133 }133 }
134 134
135+func (f *funcArgsTemplate) AddThrows(ns string) {
136+ f.API.Call = append(f.API.Call, "&cerr")
137+ if strings.ToLower(ns) != "glib" {
138+ f.Pure.Types = append(f.Pure.Types, "**glib.Error")
139+ } else {
140+ f.Pure.Types = append(f.Pure.Types, "**Error")
141+ }
142+}
143+
135 type CallbackTemplate struct {144 type CallbackTemplate struct {
136 Doc string145 Doc string
137 Name string146 Name string
@@ -196,15 +205,103 @@ type funcRetTemplate struct {
196 Class bool205 Class bool
197 // RefSink indicates whether or not we should increase the reference count using obj.RefSink()206 // RefSink indicates whether or not we should increase the reference count using obj.RefSink()
198 RefSink bool207 RefSink bool
208+ // Throws indicates whether or not this function throws
209+ Throws bool
199 }210 }
200 211
201 func (fr *funcRetTemplate) Instance() string {212 func (fr *funcRetTemplate) Instance() string {
213+ val := fr.Value + "{}"
202 if strings.HasPrefix(fr.Value, "*") {214 if strings.HasPrefix(fr.Value, "*") {
203- return "&"+fr.Value[1:]215+ return "&"+val[1:]
216+ }
217+ return val
218+}
219+
220+func (fr *funcRetTemplate) Return() string {
221+ if fr.Throws {
222+ if fr.Value == "" {
223+ return "error"
224+ }
225+ return fmt.Sprintf("(%s, error)", fr.Value)
204 }226 }
205 return fr.Value227 return fr.Value
206 }228 }
207 229
230+func (fr *funcRetTemplate) HasReturn() bool {
231+ return fr.Value != "" || fr.Throws
232+}
233+
234+func (fr *funcRetTemplate) Preamble(nglib bool) string {
235+ preamb := strings.Builder{}
236+ if fr.Class {
237+ preamb.WriteString("var cls ")
238+ preamb.WriteString(fr.Value)
239+ preamb.WriteString("\n")
240+ }
241+ if fr.Throws {
242+ preamb.WriteString("var cerr *")
243+ if nglib {
244+ preamb.WriteString("glib.")
245+ }
246+ preamb.WriteString("Error\n")
247+ }
248+ return preamb.String()
249+}
250+
251+func (fr *funcRetTemplate) Fmt(ngo bool) string {
252+ if !fr.HasReturn() {
253+ return ""
254+ }
255+ after := strings.Builder{}
256+ val := "cret"
257+ if fr.Class {
258+ if fr.Throws {
259+ after.WriteString(`
260+ if cret == 0 {
261+ return cls, cerr
262+ }
263+`)
264+ } else {
265+ after.WriteString(`
266+ if cret == 0 {
267+ return cls
268+ }
269+`)
270+ }
271+ if fr.RefSink {
272+ if ngo {
273+ after.WriteString("gobject.")
274+ }
275+ after.WriteString("IncreaseRef(cret)\n")
276+ }
277+ after.WriteString("cls = ")
278+ after.WriteString(fr.Instance())
279+ after.WriteString("\n")
280+ after.WriteString("cls.Ptr = cret\n")
281+ val = "cls"
282+ }
283+ if fr.Throws {
284+ after.WriteString("if cerr == nil {\n")
285+ after.WriteString("return ")
286+ if fr.Value != "" {
287+ after.WriteString(val)
288+ after.WriteString(",")
289+ }
290+ after.WriteString( "nil\n")
291+ after.WriteString("}\n")
292+ after.WriteString("return ")
293+ if fr.Value != "" {
294+ after.WriteString(val)
295+ after.WriteString(",")
296+ }
297+ after.WriteString( "cerr\n")
298+ return after.String()
299+ }
300+ after.WriteString("return ")
301+ after.WriteString(val)
302+ return after.String()
303+}
304+
208 type FuncTemplate struct {305 type FuncTemplate struct {
209 // Name is the name of the function declared as the Go function variable and public exposed API306 // Name is the name of the function declared as the Go function variable and public exposed API
210 Name string307 Name string
M internal/gir/types/types.go +6 -2
@@ -579,7 +579,7 @@ func (p *Parameter) VarName() string {
579 return snaked + "Var"579 return snaked + "Var"
580 }580 }
581 581
582-func (p *Parameters) Template(ns string, ifacens string, kinds KindMap) funcArgsTemplate {582+func (p *Parameters) Template(ns string, ifacens string, kinds KindMap, throws bool) funcArgsTemplate {
583 if p == nil {583 if p == nil {
584 return funcArgsTemplate{}584 return funcArgsTemplate{}
585 }585 }
@@ -591,6 +591,9 @@ func (p *Parameters) Template(ns string, ifacens string, kinds KindMap) funcArgs
591 for _, par := range params {591 for _, par := range params {
592 args.Add(par, ifacens, ns, kinds)592 args.Add(par, ifacens, ns, kinds)
593 }593 }
594+ if throws {
595+ args.AddThrows(ns)
596+ }
594 return args597 return args
595 }598 }
596 599
@@ -659,7 +662,7 @@ type ReturnValue struct {
659 AnyType662 AnyType
660 }663 }
661 664
662-func (r *ReturnValue) Template(ns string, ins string, kinds KindMap) funcRetTemplate {665+func (r *ReturnValue) Template(ns string, ins string, kinds KindMap, throws bool) funcRetTemplate {
663 val := r.AnyType.Translate(ns, kinds)666 val := r.AnyType.Translate(ns, kinds)
664 raw := val667 raw := val
665 class := false668 class := false
@@ -691,5 +694,6 @@ func (r *ReturnValue) Template(ns string, ins string, kinds KindMap) funcRetTemp
691 Value: val,694 Value: val,
692 Class: class,695 Class: class,
693 RefSink: r.TransferOwnership.TransferOwnership == "none",696 RefSink: r.TransferOwnership.TransferOwnership == "none",
697+ Throws: throws,
694 }698 }
695 }699 }
A templates/glib +14 -0
@@ -0,0 +1,14 @@
1+package glib
2+
3+import (
4+ "fmt"
5+ "github.com/jwijenbergh/puregotk/internal/core"
6+)
7+
8+func (e *Error) Error() string {
9+ return fmt.Sprintf("Gtk reported an error with message: '%s', Domain: '%v' and Code: '%v'", e.MessageGo(), e.Domain, e.Code)
10+}
11+
12+func (e *Error) MessageGo() string {
13+ return core.GoString(e.Message)
14+}⏎̸
M templates/go +21 -79
@@ -2,6 +2,7 @@
2 package {{.PkgName}}2 package {{.PkgName}}
3 3
4 {{ $NotGObject := ne .PkgName "gobject" }}4 {{ $NotGObject := ne .PkgName "gobject" }}
5+{{ $NotGLib := ne .PkgName "glib" }}
5 6
6 {{if or .Imports .NeedsInit}}7 {{if or .Imports .NeedsInit}}
7 import (8 import (
@@ -55,23 +56,10 @@ func (x *{{.Name}}Base) SetGoPointer(ptr uintptr) {
55 {{$outer := .}}56 {{$outer := .}}
56 {{range .Methods -}}57 {{range .Methods -}}
57 {{.Doc}}58 {{.Doc}}
58-func (x *{{$outer.Name}}Base) {{.Name}}({{conv .Args.API.Full}}) {{.Ret.Value}} {59+func (x *{{$outer.Name}}Base) {{.Name}}({{conv .Args.API.Full}}) {{.Ret.Return}} {
59- {{if .Ret.Class}}60+ {{.Ret.Preamble $NotGLib}}
60- {{.Name}}Ptr := {{.Namespace}}X{{.FullName}}(x.GoPointer() {{convc .Args.API.Call}})61+ {{if .Ret.Value}}cret := {{end}}{{.Namespace}}X{{.FullName}}(x.GoPointer() {{convc .Args.API.Call}})
61- if {{.Name}}Ptr == 0 {62+ {{.Ret.Fmt $NotGObject}}
62- return nil
63- }
64- {{if .Ret.RefSink}}
65- {{if $NotGObject}}gobject.{{end}}IncreaseRef({{.Name}}Ptr)
66- {{end}}
67- {{.Name}}Cls := {{.Ret.Instance}}{}
68- {{.Name}}Cls.Ptr = {{.Name}}Ptr
69- return {{.Name}}Cls
70- {{else if .Ret.Value}}
71- return {{.Namespace}}X{{.FullName}}(x.GoPointer() {{convc .Args.API.Call}})
72- {{else}}
73- {{.Namespace}}X{{.FullName}}(x.GoPointer() {{convc .Args.API.Call}})
74- {{end}}
75 }63 }
76 {{end}}64 {{end}}
77 65
@@ -101,23 +89,10 @@ const (
101 var x{{.Name}} func({{conv .Args.Pure.Types}}) {{.Ret.Raw}}89 var x{{.Name}} func({{conv .Args.Pure.Types}}) {{.Ret.Raw}}
102 90
103 {{.Doc}}91 {{.Doc}}
104-func {{.Name}}({{conv .Args.API.Full}}) {{.Ret.Value}} {92+func {{.Name}}({{conv .Args.API.Full}}) {{.Ret.Return}} {
105- {{if .Ret.Class}}93+ {{.Ret.Preamble $NotGLib}}
106- {{.Name}}Ptr := x{{.Name}}({{conv .Args.API.Call}})94+ {{if .Ret.Value}}cret := {{end}}x{{.Name}}({{conv .Args.API.Call}})
107- if {{.Name}}Ptr == 0 {95+ {{.Ret.Fmt $NotGObject}}
108- return nil
109- }
110- {{if .Ret.RefSink}}
111- {{if $NotGObject}}gobject.{{end}}IncreaseRef({{.Name}}Ptr)
112- {{end}}
113- {{.Name}}Cls := {{.Ret.Instance}}{}
114- {{.Name}}Cls.Ptr = {{.Name}}Ptr
115- return {{.Name}}Cls
116- {{else if .Ret.Value}}
117- return x{{.Name}}({{conv .Args.API.Call}})
118- {{else}}
119- x{{.Name}}({{conv .Args.API.Call}})
120- {{end}}
121 }96 }
122 {{end}}97 {{end}}
123 98
@@ -142,17 +117,10 @@ var x{{.Name}}{{$outer.Name}} func({{conv .Args.Pure.Types}}) {{.Ret.Raw}}
142 117
143 118
144 {{.Doc}}119 {{.Doc}}
145-func {{.Name}}{{$outer.Name}}({{conv .Args.API.Full}}) {{.Ret.Value}} {120+func {{.Name}}{{$outer.Name}}({{conv .Args.API.Full}}) {{.Ret.Return}} {
146- {{.Name}}{{$outer.Name}}Ptr := x{{.Name}}{{$outer.Name}}({{conv .Args.API.Call}})121+ {{.Ret.Preamble $NotGLib}}
147- if {{.Name}}{{$outer.Name}}Ptr == 0 {122+ {{if .Ret.Value}}cret :={{end}}x{{.Name}}{{$outer.Name}}({{conv .Args.API.Call}})
148- return nil123+ {{.Ret.Fmt $NotGObject}}
149- }
150- {{if .Ret.RefSink}}
151- {{if $NotGObject}}gobject.{{end}}IncreaseRef({{.Name}}{{$outer.Name}}Ptr)
152- {{end}}
153- {{.Name}}{{$outer.Name}}Cls := {{.Ret.Instance}}{}
154- {{.Name}}{{$outer.Name}}Cls.Ptr = {{.Name}}{{$outer.Name}}Ptr
155- return {{.Name}}{{$outer.Name}}Cls
156 }124 }
157 {{end}}125 {{end}}
158 126
@@ -161,23 +129,10 @@ func {{.Name}}{{$outer.Name}}({{conv .Args.API.Full}}) {{.Ret.Value}} {
161 var x{{$outer.Name}}{{.Name}} func(uintptr {{convc .Args.Pure.Types}}) {{.Ret.Raw}}129 var x{{$outer.Name}}{{.Name}} func(uintptr {{convc .Args.Pure.Types}}) {{.Ret.Raw}}
162 130
163 {{.Doc}}131 {{.Doc}}
164-func (x *{{$outer.Name}}) {{.Name}}({{conv .Args.API.Full}}) {{.Ret.Value}} {132+func (x *{{$outer.Name}}) {{.Name}}({{conv .Args.API.Full}}) {{.Ret.Return}} {
165- {{if .Ret.Class}}133+ {{.Ret.Preamble $NotGLib}}
166- {{.Name}}Ptr := x{{$outer.Name}}{{.Name}}(x.GoPointer() {{convc .Args.API.Call}})134+ {{if .Ret.Value}}cret :={{end}}x{{$outer.Name}}{{.Name}}(x.GoPointer() {{convc .Args.API.Call}})
167- if {{.Name}}Ptr == 0 {135+ {{.Ret.Fmt $NotGObject}}
168- return nil
169- }
170- {{if .Ret.RefSink}}
171- {{if $NotGObject}}gobject.{{end}}IncreaseRef({{.Name}}Ptr)
172- {{end}}
173- {{.Name}}Cls := {{.Ret.Instance}}{}
174- {{.Name}}Cls.Ptr = {{.Name}}Ptr
175- return {{.Name}}Cls
176- {{else if .Ret.Value}}
177- return x{{$outer.Name}}{{.Name}}(x.GoPointer() {{convc .Args.API.Call}})
178- {{else}}
179- x{{$outer.Name}}{{.Name}}(x.GoPointer() {{convc .Args.API.Call}})
180- {{end}}
181 }136 }
182 {{end}}137 {{end}}
183 138
@@ -212,23 +167,10 @@ func (x *{{$outer.Name}}) Connect{{.Name}}(cb func({{$outer.Name}} {{convc .Args
212 {{range .Interfaces -}}167 {{range .Interfaces -}}
213 {{range .Methods -}}168 {{range .Methods -}}
214 {{.Doc}}169 {{.Doc}}
215-func (x *{{$outer.Name}}) {{.Name}}({{conv .Args.API.Full}}) {{.Ret.Value}} {170+func (x *{{$outer.Name}}) {{.Name}}({{conv .Args.API.Full}}) {{.Ret.Return}} {
216- {{if .Ret.Class}}171+ {{.Ret.Preamble $NotGLib}}
217- {{.Name}}Ptr := {{.Namespace}}X{{.FullName}}(x.GoPointer() {{convc .Args.API.Call}})172+ {{if .Ret.Value}}cret := {{end}} {{.Namespace}}X{{.FullName}}(x.GoPointer() {{convc .Args.API.Call}})
218- if {{.Name}}Ptr == 0 {173+ {{.Ret.Fmt $NotGObject}}
219- return nil
220- }
221- {{if .Ret.RefSink}}
222- {{if $NotGObject}}gobject.{{end}}IncreaseRef({{.Name}}Ptr)
223- {{end}}
224- {{.Name}}Cls := {{.Ret.Instance}}{}
225- {{.Name}}Cls.Ptr = {{.Name}}Ptr
226- return {{.Name}}Cls
227- {{else if .Ret.Value}}
228- return {{.Namespace}}X{{.FullName}}(x.GoPointer() {{convc .Args.API.Call}})
229- {{else}}
230- {{.Namespace}}X{{.FullName}}(x.GoPointer() {{convc .Args.API.Call}})
231- {{end}}
232 }174 }
233 {{end}}175 {{end}}
234 {{end}}176 {{end}}
M v4/adw/adw-about-window.go +89 -92
@@ -208,16 +208,17 @@ var xNewAboutWindow func() uintptr
208 208
209 // Creates a new `AdwAboutWindow`.209 // Creates a new `AdwAboutWindow`.
210 func NewAboutWindow() *gtk.Widget {210 func NewAboutWindow() *gtk.Widget {
211- NewAboutWindowPtr := xNewAboutWindow()211+ var cls *gtk.Widget
212- if NewAboutWindowPtr == 0 {
213- return nil
214- }
215 212
216- gobject.IncreaseRef(NewAboutWindowPtr)213+ cret := xNewAboutWindow()
217 214
218- NewAboutWindowCls := &gtk.Widget{}215+ if cret == 0 {
219- NewAboutWindowCls.Ptr = NewAboutWindowPtr216+ return cls
220- return NewAboutWindowCls217+ }
218+ gobject.IncreaseRef(cret)
219+ cls = &gtk.Widget{}
220+ cls.Ptr = cret
221+ return cls
221 }222 }
222 223
223 var xAboutWindowAddAcknowledgementSection func(uintptr, string, uintptr)224 var xAboutWindowAddAcknowledgementSection func(uintptr, string, uintptr)
@@ -341,8 +342,8 @@ var xAboutWindowGetApplicationIcon func(uintptr) string
341 // Gets the name of the application icon for @self.342 // Gets the name of the application icon for @self.
342 func (x *AboutWindow) GetApplicationIcon() string {343 func (x *AboutWindow) GetApplicationIcon() string {
343 344
344- return xAboutWindowGetApplicationIcon(x.GoPointer())345+ cret := xAboutWindowGetApplicationIcon(x.GoPointer())
345-346+ return cret
346 }347 }
347 348
348 var xAboutWindowGetApplicationName func(uintptr) string349 var xAboutWindowGetApplicationName func(uintptr) string
@@ -350,8 +351,8 @@ var xAboutWindowGetApplicationName func(uintptr) string
350 // Gets the application name for @self.351 // Gets the application name for @self.
351 func (x *AboutWindow) GetApplicationName() string {352 func (x *AboutWindow) GetApplicationName() string {
352 353
353- return xAboutWindowGetApplicationName(x.GoPointer())354+ cret := xAboutWindowGetApplicationName(x.GoPointer())
354-355+ return cret
355 }356 }
356 357
357 var xAboutWindowGetArtists func(uintptr) uintptr358 var xAboutWindowGetArtists func(uintptr) uintptr
@@ -359,8 +360,8 @@ var xAboutWindowGetArtists func(uintptr) uintptr
359 // Gets the list of artists of the application.360 // Gets the list of artists of the application.
360 func (x *AboutWindow) GetArtists() uintptr {361 func (x *AboutWindow) GetArtists() uintptr {
361 362
362- return xAboutWindowGetArtists(x.GoPointer())363+ cret := xAboutWindowGetArtists(x.GoPointer())
363-364+ return cret
364 }365 }
365 366
366 var xAboutWindowGetComments func(uintptr) string367 var xAboutWindowGetComments func(uintptr) string
@@ -368,8 +369,8 @@ var xAboutWindowGetComments func(uintptr) string
368 // Gets the comments about the application.369 // Gets the comments about the application.
369 func (x *AboutWindow) GetComments() string {370 func (x *AboutWindow) GetComments() string {
370 371
371- return xAboutWindowGetComments(x.GoPointer())372+ cret := xAboutWindowGetComments(x.GoPointer())
372-373+ return cret
373 }374 }
374 375
375 var xAboutWindowGetCopyright func(uintptr) string376 var xAboutWindowGetCopyright func(uintptr) string
@@ -377,8 +378,8 @@ var xAboutWindowGetCopyright func(uintptr) string
377 // Gets the copyright information for @self.378 // Gets the copyright information for @self.
378 func (x *AboutWindow) GetCopyright() string {379 func (x *AboutWindow) GetCopyright() string {
379 380
380- return xAboutWindowGetCopyright(x.GoPointer())381+ cret := xAboutWindowGetCopyright(x.GoPointer())
381-382+ return cret
382 }383 }
383 384
384 var xAboutWindowGetDebugInfo func(uintptr) string385 var xAboutWindowGetDebugInfo func(uintptr) string
@@ -386,8 +387,8 @@ var xAboutWindowGetDebugInfo func(uintptr) string
386 // Gets the debug information for @self.387 // Gets the debug information for @self.
387 func (x *AboutWindow) GetDebugInfo() string {388 func (x *AboutWindow) GetDebugInfo() string {
388 389
389- return xAboutWindowGetDebugInfo(x.GoPointer())390+ cret := xAboutWindowGetDebugInfo(x.GoPointer())
390-391+ return cret
391 }392 }
392 393
393 var xAboutWindowGetDebugInfoFilename func(uintptr) string394 var xAboutWindowGetDebugInfoFilename func(uintptr) string
@@ -395,8 +396,8 @@ var xAboutWindowGetDebugInfoFilename func(uintptr) string
395 // Gets the debug information filename for @self.396 // Gets the debug information filename for @self.
396 func (x *AboutWindow) GetDebugInfoFilename() string {397 func (x *AboutWindow) GetDebugInfoFilename() string {
397 398
398- return xAboutWindowGetDebugInfoFilename(x.GoPointer())399+ cret := xAboutWindowGetDebugInfoFilename(x.GoPointer())
399-400+ return cret
400 }401 }
401 402
402 var xAboutWindowGetDesigners func(uintptr) uintptr403 var xAboutWindowGetDesigners func(uintptr) uintptr
@@ -404,8 +405,8 @@ var xAboutWindowGetDesigners func(uintptr) uintptr
404 // Gets the list of designers of the application.405 // Gets the list of designers of the application.
405 func (x *AboutWindow) GetDesigners() uintptr {406 func (x *AboutWindow) GetDesigners() uintptr {
406 407
407- return xAboutWindowGetDesigners(x.GoPointer())408+ cret := xAboutWindowGetDesigners(x.GoPointer())
408-409+ return cret
409 }410 }
410 411
411 var xAboutWindowGetDeveloperName func(uintptr) string412 var xAboutWindowGetDeveloperName func(uintptr) string
@@ -413,8 +414,8 @@ var xAboutWindowGetDeveloperName func(uintptr) string
413 // Gets the developer name for @self.414 // Gets the developer name for @self.
414 func (x *AboutWindow) GetDeveloperName() string {415 func (x *AboutWindow) GetDeveloperName() string {
415 416
416- return xAboutWindowGetDeveloperName(x.GoPointer())417+ cret := xAboutWindowGetDeveloperName(x.GoPointer())
417-418+ return cret
418 }419 }
419 420
420 var xAboutWindowGetDevelopers func(uintptr) uintptr421 var xAboutWindowGetDevelopers func(uintptr) uintptr
@@ -422,8 +423,8 @@ var xAboutWindowGetDevelopers func(uintptr) uintptr
422 // Gets the list of developers of the application.423 // Gets the list of developers of the application.
423 func (x *AboutWindow) GetDevelopers() uintptr {424 func (x *AboutWindow) GetDevelopers() uintptr {
424 425
425- return xAboutWindowGetDevelopers(x.GoPointer())426+ cret := xAboutWindowGetDevelopers(x.GoPointer())
426-427+ return cret
427 }428 }
428 429
429 var xAboutWindowGetDocumenters func(uintptr) uintptr430 var xAboutWindowGetDocumenters func(uintptr) uintptr
@@ -431,8 +432,8 @@ var xAboutWindowGetDocumenters func(uintptr) uintptr
431 // Gets the list of documenters of the application.432 // Gets the list of documenters of the application.
432 func (x *AboutWindow) GetDocumenters() uintptr {433 func (x *AboutWindow) GetDocumenters() uintptr {
433 434
434- return xAboutWindowGetDocumenters(x.GoPointer())435+ cret := xAboutWindowGetDocumenters(x.GoPointer())
435-436+ return cret
436 }437 }
437 438
438 var xAboutWindowGetIssueUrl func(uintptr) string439 var xAboutWindowGetIssueUrl func(uintptr) string
@@ -440,8 +441,8 @@ var xAboutWindowGetIssueUrl func(uintptr) string
440 // Gets the issue tracker URL for @self.441 // Gets the issue tracker URL for @self.
441 func (x *AboutWindow) GetIssueUrl() string {442 func (x *AboutWindow) GetIssueUrl() string {
442 443
443- return xAboutWindowGetIssueUrl(x.GoPointer())444+ cret := xAboutWindowGetIssueUrl(x.GoPointer())
444-445+ return cret
445 }446 }
446 447
447 var xAboutWindowGetLicense func(uintptr) string448 var xAboutWindowGetLicense func(uintptr) string
@@ -449,8 +450,8 @@ var xAboutWindowGetLicense func(uintptr) string
449 // Gets the license for @self.450 // Gets the license for @self.
450 func (x *AboutWindow) GetLicense() string {451 func (x *AboutWindow) GetLicense() string {
451 452
452- return xAboutWindowGetLicense(x.GoPointer())453+ cret := xAboutWindowGetLicense(x.GoPointer())
453-454+ return cret
454 }455 }
455 456
456 var xAboutWindowGetLicenseType func(uintptr) gtk.License457 var xAboutWindowGetLicenseType func(uintptr) gtk.License
@@ -458,8 +459,8 @@ var xAboutWindowGetLicenseType func(uintptr) gtk.License
458 // Gets the license type for @self.459 // Gets the license type for @self.
459 func (x *AboutWindow) GetLicenseType() gtk.License {460 func (x *AboutWindow) GetLicenseType() gtk.License {
460 461
461- return xAboutWindowGetLicenseType(x.GoPointer())462+ cret := xAboutWindowGetLicenseType(x.GoPointer())
462-463+ return cret
463 }464 }
464 465
465 var xAboutWindowGetReleaseNotes func(uintptr) string466 var xAboutWindowGetReleaseNotes func(uintptr) string
@@ -467,8 +468,8 @@ var xAboutWindowGetReleaseNotes func(uintptr) string
467 // Gets the release notes for @self.468 // Gets the release notes for @self.
468 func (x *AboutWindow) GetReleaseNotes() string {469 func (x *AboutWindow) GetReleaseNotes() string {
469 470
470- return xAboutWindowGetReleaseNotes(x.GoPointer())471+ cret := xAboutWindowGetReleaseNotes(x.GoPointer())
471-472+ return cret
472 }473 }
473 474
474 var xAboutWindowGetReleaseNotesVersion func(uintptr) string475 var xAboutWindowGetReleaseNotesVersion func(uintptr) string
@@ -476,8 +477,8 @@ var xAboutWindowGetReleaseNotesVersion func(uintptr) string
476 // Gets the version described by the application's release notes.477 // Gets the version described by the application's release notes.
477 func (x *AboutWindow) GetReleaseNotesVersion() string {478 func (x *AboutWindow) GetReleaseNotesVersion() string {
478 479
479- return xAboutWindowGetReleaseNotesVersion(x.GoPointer())480+ cret := xAboutWindowGetReleaseNotesVersion(x.GoPointer())
480-481+ return cret
481 }482 }
482 483
483 var xAboutWindowGetSupportUrl func(uintptr) string484 var xAboutWindowGetSupportUrl func(uintptr) string
@@ -485,8 +486,8 @@ var xAboutWindowGetSupportUrl func(uintptr) string
485 // Gets the URL of the support page for @self.486 // Gets the URL of the support page for @self.
486 func (x *AboutWindow) GetSupportUrl() string {487 func (x *AboutWindow) GetSupportUrl() string {
487 488
488- return xAboutWindowGetSupportUrl(x.GoPointer())489+ cret := xAboutWindowGetSupportUrl(x.GoPointer())
489-490+ return cret
490 }491 }
491 492
492 var xAboutWindowGetTranslatorCredits func(uintptr) string493 var xAboutWindowGetTranslatorCredits func(uintptr) string
@@ -494,8 +495,8 @@ var xAboutWindowGetTranslatorCredits func(uintptr) string
494 // Gets the translator credits string.495 // Gets the translator credits string.
495 func (x *AboutWindow) GetTranslatorCredits() string {496 func (x *AboutWindow) GetTranslatorCredits() string {
496 497
497- return xAboutWindowGetTranslatorCredits(x.GoPointer())498+ cret := xAboutWindowGetTranslatorCredits(x.GoPointer())
498-499+ return cret
499 }500 }
500 501
501 var xAboutWindowGetVersion func(uintptr) string502 var xAboutWindowGetVersion func(uintptr) string
@@ -503,8 +504,8 @@ var xAboutWindowGetVersion func(uintptr) string
503 // Gets the version for @self.504 // Gets the version for @self.
504 func (x *AboutWindow) GetVersion() string {505 func (x *AboutWindow) GetVersion() string {
505 506
506- return xAboutWindowGetVersion(x.GoPointer())507+ cret := xAboutWindowGetVersion(x.GoPointer())
507-508+ return cret
508 }509 }
509 510
510 var xAboutWindowGetWebsite func(uintptr) string511 var xAboutWindowGetWebsite func(uintptr) string
@@ -512,8 +513,8 @@ var xAboutWindowGetWebsite func(uintptr) string
512 // Gets the application website URL for @self.513 // Gets the application website URL for @self.
513 func (x *AboutWindow) GetWebsite() string {514 func (x *AboutWindow) GetWebsite() string {
514 515
515- return xAboutWindowGetWebsite(x.GoPointer())516+ cret := xAboutWindowGetWebsite(x.GoPointer())
516-517+ return cret
517 }518 }
518 519
519 var xAboutWindowSetApplicationIcon func(uintptr, string)520 var xAboutWindowSetApplicationIcon func(uintptr, string)
@@ -912,8 +913,8 @@ func (x *AboutWindow) ConnectActivateLink(cb func(AboutWindow, string) bool) {
912 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.913 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
913 func (x *AboutWindow) GetAccessibleRole() gtk.AccessibleRole {914 func (x *AboutWindow) GetAccessibleRole() gtk.AccessibleRole {
914 915
915- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())916+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
916-917+ return cret
917 }918 }
918 919
919 // Resets the accessible @property to its default value.920 // Resets the accessible @property to its default value.
@@ -1048,40 +1049,38 @@ func (x *AboutWindow) UpdateStateValue(NStatesVar int, StatesVar uintptr, Values
1048 // of the <object> tag used to construct the @buildable.1049 // of the <object> tag used to construct the @buildable.
1049 func (x *AboutWindow) GetBuildableId() string {1050 func (x *AboutWindow) GetBuildableId() string {
1050 1051
1051- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())1052+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
1052-1053+ return cret
1053 }1054 }
1054 1055
1055 // Returns the renderer that is used for this `GtkNative`.1056 // Returns the renderer that is used for this `GtkNative`.
1056 func (x *AboutWindow) GetRenderer() *gsk.Renderer {1057 func (x *AboutWindow) GetRenderer() *gsk.Renderer {
1058+ var cls *gsk.Renderer
1057 1059
1058- GetRendererPtr := gtk.XGtkNativeGetRenderer(x.GoPointer())1060+ cret := gtk.XGtkNativeGetRenderer(x.GoPointer())
1059- if GetRendererPtr == 0 {
1060- return nil
1061- }
1062-
1063- gobject.IncreaseRef(GetRendererPtr)
1064-
1065- GetRendererCls := &gsk.Renderer{}
1066- GetRendererCls.Ptr = GetRendererPtr
1067- return GetRendererCls
1068 1061
1062+ if cret == 0 {
1063+ return cls
1064+ }
1065+ gobject.IncreaseRef(cret)
1066+ cls = &gsk.Renderer{}
1067+ cls.Ptr = cret
1068+ return cls
1069 }1069 }
1070 1070
1071 // Returns the surface of this `GtkNative`.1071 // Returns the surface of this `GtkNative`.
1072 func (x *AboutWindow) GetSurface() *gdk.Surface {1072 func (x *AboutWindow) GetSurface() *gdk.Surface {
1073+ var cls *gdk.Surface
1073 1074
1074- GetSurfacePtr := gtk.XGtkNativeGetSurface(x.GoPointer())1075+ cret := gtk.XGtkNativeGetSurface(x.GoPointer())
1075- if GetSurfacePtr == 0 {
1076- return nil
1077- }
1078-
1079- gobject.IncreaseRef(GetSurfacePtr)
1080-
1081- GetSurfaceCls := &gdk.Surface{}
1082- GetSurfaceCls.Ptr = GetSurfacePtr
1083- return GetSurfaceCls
1084 1076
1077+ if cret == 0 {
1078+ return cls
1079+ }
1080+ gobject.IncreaseRef(cret)
1081+ cls = &gdk.Surface{}
1082+ cls.Ptr = cret
1083+ return cls
1085 }1084 }
1086 1085
1087 // Retrieves the surface transform of @self.1086 // Retrieves the surface transform of @self.
@@ -1114,18 +1113,17 @@ func (x *AboutWindow) Unrealize() {
1114 1113
1115 // Returns the display that this `GtkRoot` is on.1114 // Returns the display that this `GtkRoot` is on.
1116 func (x *AboutWindow) GetDisplay() *gdk.Display {1115 func (x *AboutWindow) GetDisplay() *gdk.Display {
1116+ var cls *gdk.Display
1117 1117
1118- GetDisplayPtr := gtk.XGtkRootGetDisplay(x.GoPointer())1118+ cret := gtk.XGtkRootGetDisplay(x.GoPointer())
1119- if GetDisplayPtr == 0 {
1120- return nil
1121- }
1122-
1123- gobject.IncreaseRef(GetDisplayPtr)
1124-
1125- GetDisplayCls := &gdk.Display{}
1126- GetDisplayCls.Ptr = GetDisplayPtr
1127- return GetDisplayCls
1128 1119
1120+ if cret == 0 {
1121+ return cls
1122+ }
1123+ gobject.IncreaseRef(cret)
1124+ cls = &gdk.Display{}
1125+ cls.Ptr = cret
1126+ return cls
1129 }1127 }
1130 1128
1131 // Retrieves the current focused widget within the root.1129 // Retrieves the current focused widget within the root.
@@ -1135,18 +1133,17 @@ func (x *AboutWindow) GetDisplay() *gdk.Display {
1135 // `gtk_widget_has_focus (widget)` will be %FALSE for the1133 // `gtk_widget_has_focus (widget)` will be %FALSE for the
1136 // widget.1134 // widget.
1137 func (x *AboutWindow) GetFocus() *gtk.Widget {1135 func (x *AboutWindow) GetFocus() *gtk.Widget {
1136+ var cls *gtk.Widget
1138 1137
1139- GetFocusPtr := gtk.XGtkRootGetFocus(x.GoPointer())1138+ cret := gtk.XGtkRootGetFocus(x.GoPointer())
1140- if GetFocusPtr == 0 {
1141- return nil
1142- }
1143-
1144- gobject.IncreaseRef(GetFocusPtr)
1145-
1146- GetFocusCls := &gtk.Widget{}
1147- GetFocusCls.Ptr = GetFocusPtr
1148- return GetFocusCls
1149 1139
1140+ if cret == 0 {
1141+ return cls
1142+ }
1143+ gobject.IncreaseRef(cret)
1144+ cls = &gtk.Widget{}
1145+ cls.Ptr = cret
1146+ return cls
1150 }1147 }
1151 1148
1152 // If @focus is not the current focus widget, and is focusable, sets1149 // If @focus is not the current focus widget, and is focusable, sets
M v4/adw/adw-action-row.go +36 -36
@@ -65,16 +65,17 @@ var xNewActionRow func() uintptr
65 65
66 // Creates a new `AdwActionRow`.66 // Creates a new `AdwActionRow`.
67 func NewActionRow() *gtk.Widget {67 func NewActionRow() *gtk.Widget {
68- NewActionRowPtr := xNewActionRow()68+ var cls *gtk.Widget
69- if NewActionRowPtr == 0 {
70- return nil
71- }
72 69
73- gobject.IncreaseRef(NewActionRowPtr)70+ cret := xNewActionRow()
74 71
75- NewActionRowCls := &gtk.Widget{}72+ if cret == 0 {
76- NewActionRowCls.Ptr = NewActionRowPtr73+ return cls
77- return NewActionRowCls74+ }
75+ gobject.IncreaseRef(cret)
76+ cls = &gtk.Widget{}
77+ cls.Ptr = cret
78+ return cls
78 }79 }
79 80
80 var xActionRowActivate func(uintptr)81 var xActionRowActivate func(uintptr)
@@ -108,18 +109,17 @@ var xActionRowGetActivatableWidget func(uintptr) uintptr
108 109
109 // Gets the widget activated when @self is activated.110 // Gets the widget activated when @self is activated.
110 func (x *ActionRow) GetActivatableWidget() *gtk.Widget {111 func (x *ActionRow) GetActivatableWidget() *gtk.Widget {
112+ var cls *gtk.Widget
111 113
112- GetActivatableWidgetPtr := xActionRowGetActivatableWidget(x.GoPointer())114+ cret := xActionRowGetActivatableWidget(x.GoPointer())
113- if GetActivatableWidgetPtr == 0 {
114- return nil
115- }
116-
117- gobject.IncreaseRef(GetActivatableWidgetPtr)
118-
119- GetActivatableWidgetCls := &gtk.Widget{}
120- GetActivatableWidgetCls.Ptr = GetActivatableWidgetPtr
121- return GetActivatableWidgetCls
122 115
116+ if cret == 0 {
117+ return cls
118+ }
119+ gobject.IncreaseRef(cret)
120+ cls = &gtk.Widget{}
121+ cls.Ptr = cret
122+ return cls
123 }123 }
124 124
125 var xActionRowGetIconName func(uintptr) string125 var xActionRowGetIconName func(uintptr) string
@@ -127,8 +127,8 @@ var xActionRowGetIconName func(uintptr) string
127 // Gets the icon name for @self.127 // Gets the icon name for @self.
128 func (x *ActionRow) GetIconName() string {128 func (x *ActionRow) GetIconName() string {
129 129
130- return xActionRowGetIconName(x.GoPointer())130+ cret := xActionRowGetIconName(x.GoPointer())
131-131+ return cret
132 }132 }
133 133
134 var xActionRowGetSubtitle func(uintptr) string134 var xActionRowGetSubtitle func(uintptr) string
@@ -136,8 +136,8 @@ var xActionRowGetSubtitle func(uintptr) string
136 // Gets the subtitle for @self.136 // Gets the subtitle for @self.
137 func (x *ActionRow) GetSubtitle() string {137 func (x *ActionRow) GetSubtitle() string {
138 138
139- return xActionRowGetSubtitle(x.GoPointer())139+ cret := xActionRowGetSubtitle(x.GoPointer())
140-140+ return cret
141 }141 }
142 142
143 var xActionRowGetSubtitleLines func(uintptr) int143 var xActionRowGetSubtitleLines func(uintptr) int
@@ -146,8 +146,8 @@ var xActionRowGetSubtitleLines func(uintptr) int
146 // ellipsized.146 // ellipsized.
147 func (x *ActionRow) GetSubtitleLines() int {147 func (x *ActionRow) GetSubtitleLines() int {
148 148
149- return xActionRowGetSubtitleLines(x.GoPointer())149+ cret := xActionRowGetSubtitleLines(x.GoPointer())
150-150+ return cret
151 }151 }
152 152
153 var xActionRowGetSubtitleSelectable func(uintptr) bool153 var xActionRowGetSubtitleSelectable func(uintptr) bool
@@ -155,8 +155,8 @@ var xActionRowGetSubtitleSelectable func(uintptr) bool
155 // Gets whether the user can copy the subtitle from the label155 // Gets whether the user can copy the subtitle from the label
156 func (x *ActionRow) GetSubtitleSelectable() bool {156 func (x *ActionRow) GetSubtitleSelectable() bool {
157 157
158- return xActionRowGetSubtitleSelectable(x.GoPointer())158+ cret := xActionRowGetSubtitleSelectable(x.GoPointer())
159-159+ return cret
160 }160 }
161 161
162 var xActionRowGetTitleLines func(uintptr) int162 var xActionRowGetTitleLines func(uintptr) int
@@ -165,8 +165,8 @@ var xActionRowGetTitleLines func(uintptr) int
165 // ellipsized.165 // ellipsized.
166 func (x *ActionRow) GetTitleLines() int {166 func (x *ActionRow) GetTitleLines() int {
167 167
168- return xActionRowGetTitleLines(x.GoPointer())168+ cret := xActionRowGetTitleLines(x.GoPointer())
169-169+ return cret
170 }170 }
171 171
172 var xActionRowRemove func(uintptr, uintptr)172 var xActionRowRemove func(uintptr, uintptr)
@@ -273,8 +273,8 @@ func (x *ActionRow) ConnectActivated(cb func(ActionRow)) {
273 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.273 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
274 func (x *ActionRow) GetAccessibleRole() gtk.AccessibleRole {274 func (x *ActionRow) GetAccessibleRole() gtk.AccessibleRole {
275 275
276- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())276+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
277-277+ return cret
278 }278 }
279 279
280 // Resets the accessible @property to its default value.280 // Resets the accessible @property to its default value.
@@ -406,15 +406,15 @@ func (x *ActionRow) UpdateStateValue(NStatesVar int, StatesVar uintptr, ValuesVa
406 // Gets the action name for @actionable.406 // Gets the action name for @actionable.
407 func (x *ActionRow) GetActionName() string {407 func (x *ActionRow) GetActionName() string {
408 408
409- return gtk.XGtkActionableGetActionName(x.GoPointer())409+ cret := gtk.XGtkActionableGetActionName(x.GoPointer())
410-410+ return cret
411 }411 }
412 412
413 // Gets the current target value of @actionable.413 // Gets the current target value of @actionable.
414 func (x *ActionRow) GetActionTargetValue() *glib.Variant {414 func (x *ActionRow) GetActionTargetValue() *glib.Variant {
415 415
416- return gtk.XGtkActionableGetActionTargetValue(x.GoPointer())416+ cret := gtk.XGtkActionableGetActionTargetValue(x.GoPointer())
417-417+ return cret
418 }418 }
419 419
420 // Specifies the name of the action with which this widget should be420 // Specifies the name of the action with which this widget should be
@@ -492,8 +492,8 @@ func (x *ActionRow) SetDetailedActionName(DetailedActionNameVar string) {
492 // of the <object> tag used to construct the @buildable.492 // of the <object> tag used to construct the @buildable.
493 func (x *ActionRow) GetBuildableId() string {493 func (x *ActionRow) GetBuildableId() string {
494 494
495- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())495+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
496-496+ return cret
497 }497 }
498 498
499 func init() {499 func init() {
M v4/adw/adw-animation-target.go +45 -41
@@ -56,14 +56,16 @@ var xNewCallbackAnimationTarget func(uintptr, uintptr, uintptr) uintptr
56 // Creates a new `AdwAnimationTarget` that calls the given @callback during56 // Creates a new `AdwAnimationTarget` that calls the given @callback during
57 // the animation.57 // the animation.
58 func NewCallbackAnimationTarget(CallbackVar AnimationTargetFunc, UserDataVar uintptr, DestroyVar glib.DestroyNotify) *AnimationTarget {58 func NewCallbackAnimationTarget(CallbackVar AnimationTargetFunc, UserDataVar uintptr, DestroyVar glib.DestroyNotify) *AnimationTarget {
59- NewCallbackAnimationTargetPtr := xNewCallbackAnimationTarget(purego.NewCallback(CallbackVar), UserDataVar, purego.NewCallback(DestroyVar))59+ var cls *AnimationTarget
60- if NewCallbackAnimationTargetPtr == 0 {60+
61- return nil61+ cret := xNewCallbackAnimationTarget(purego.NewCallback(CallbackVar), UserDataVar, purego.NewCallback(DestroyVar))
62- }
63 62
64- NewCallbackAnimationTargetCls := &AnimationTarget{}63+ if cret == 0 {
65- NewCallbackAnimationTargetCls.Ptr = NewCallbackAnimationTargetPtr64+ return cls
66- return NewCallbackAnimationTargetCls65+ }
66+ cls = &AnimationTarget{}
67+ cls.Ptr = cret
68+ return cls
67 }69 }
68 70
69 func (c *CallbackAnimationTarget) GoPointer() uintptr {71 func (c *CallbackAnimationTarget) GoPointer() uintptr {
@@ -91,14 +93,16 @@ var xNewPropertyAnimationTarget func(uintptr, string) uintptr
91 // Creates a new `AdwPropertyAnimationTarget` for the @property_name property on93 // Creates a new `AdwPropertyAnimationTarget` for the @property_name property on
92 // @object.94 // @object.
93 func NewPropertyAnimationTarget(ObjectVar *gobject.Object, PropertyNameVar string) *AnimationTarget {95 func NewPropertyAnimationTarget(ObjectVar *gobject.Object, PropertyNameVar string) *AnimationTarget {
94- NewPropertyAnimationTargetPtr := xNewPropertyAnimationTarget(ObjectVar.GoPointer(), PropertyNameVar)96+ var cls *AnimationTarget
95- if NewPropertyAnimationTargetPtr == 0 {97+
96- return nil98+ cret := xNewPropertyAnimationTarget(ObjectVar.GoPointer(), PropertyNameVar)
97- }
98 99
99- NewPropertyAnimationTargetCls := &AnimationTarget{}100+ if cret == 0 {
100- NewPropertyAnimationTargetCls.Ptr = NewPropertyAnimationTargetPtr101+ return cls
101- return NewPropertyAnimationTargetCls102+ }
103+ cls = &AnimationTarget{}
104+ cls.Ptr = cret
105+ return cls
102 }106 }
103 107
104 var xNewForPspecPropertyAnimationTarget func(uintptr, uintptr) uintptr108 var xNewForPspecPropertyAnimationTarget func(uintptr, uintptr) uintptr
@@ -106,14 +110,16 @@ var xNewForPspecPropertyAnimationTarget func(uintptr, uintptr) uintptr
106 // Creates a new `AdwPropertyAnimationTarget` for the @pspec property on110 // Creates a new `AdwPropertyAnimationTarget` for the @pspec property on
107 // @object.111 // @object.
108 func NewForPspecPropertyAnimationTarget(ObjectVar *gobject.Object, PspecVar *gobject.ParamSpec) *AnimationTarget {112 func NewForPspecPropertyAnimationTarget(ObjectVar *gobject.Object, PspecVar *gobject.ParamSpec) *AnimationTarget {
109- NewForPspecPropertyAnimationTargetPtr := xNewForPspecPropertyAnimationTarget(ObjectVar.GoPointer(), PspecVar.GoPointer())113+ var cls *AnimationTarget
110- if NewForPspecPropertyAnimationTargetPtr == 0 {
111- return nil
112- }
113 114
114- NewForPspecPropertyAnimationTargetCls := &AnimationTarget{}115+ cret := xNewForPspecPropertyAnimationTarget(ObjectVar.GoPointer(), PspecVar.GoPointer())
115- NewForPspecPropertyAnimationTargetCls.Ptr = NewForPspecPropertyAnimationTargetPtr116+
116- return NewForPspecPropertyAnimationTargetCls117+ if cret == 0 {
118+ return cls
119+ }
120+ cls = &AnimationTarget{}
121+ cls.Ptr = cret
122+ return cls
117 }123 }
118 124
119 var xPropertyAnimationTargetGetObject func(uintptr) uintptr125 var xPropertyAnimationTargetGetObject func(uintptr) uintptr
@@ -124,36 +130,34 @@ var xPropertyAnimationTargetGetObject func(uintptr) uintptr
124 // the object; make sure the object is kept alive throughout the target's130 // the object; make sure the object is kept alive throughout the target's
125 // lifetime.131 // lifetime.
126 func (x *PropertyAnimationTarget) GetObject() *gobject.Object {132 func (x *PropertyAnimationTarget) GetObject() *gobject.Object {
133+ var cls *gobject.Object
127 134
128- GetObjectPtr := xPropertyAnimationTargetGetObject(x.GoPointer())135+ cret := xPropertyAnimationTargetGetObject(x.GoPointer())
129- if GetObjectPtr == 0 {
130- return nil
131- }
132-
133- gobject.IncreaseRef(GetObjectPtr)
134-
135- GetObjectCls := &gobject.Object{}
136- GetObjectCls.Ptr = GetObjectPtr
137- return GetObjectCls
138 136
137+ if cret == 0 {
138+ return cls
139+ }
140+ gobject.IncreaseRef(cret)
141+ cls = &gobject.Object{}
142+ cls.Ptr = cret
143+ return cls
139 }144 }
140 145
141 var xPropertyAnimationTargetGetPspec func(uintptr) uintptr146 var xPropertyAnimationTargetGetPspec func(uintptr) uintptr
142 147
143 // Gets the `GParamSpec` of the property animated by @self.148 // Gets the `GParamSpec` of the property animated by @self.
144 func (x *PropertyAnimationTarget) GetPspec() *gobject.ParamSpec {149 func (x *PropertyAnimationTarget) GetPspec() *gobject.ParamSpec {
150+ var cls *gobject.ParamSpec
145 151
146- GetPspecPtr := xPropertyAnimationTargetGetPspec(x.GoPointer())152+ cret := xPropertyAnimationTargetGetPspec(x.GoPointer())
147- if GetPspecPtr == 0 {
148- return nil
149- }
150-
151- gobject.IncreaseRef(GetPspecPtr)
152-
153- GetPspecCls := &gobject.ParamSpec{}
154- GetPspecCls.Ptr = GetPspecPtr
155- return GetPspecCls
156 153
154+ if cret == 0 {
155+ return cls
156+ }
157+ gobject.IncreaseRef(cret)
158+ cls = &gobject.ParamSpec{}
159+ cls.Ptr = cret
160+ return cls
157 }161 }
158 162
159 func (c *PropertyAnimationTarget) GoPointer() uintptr {163 func (c *PropertyAnimationTarget) GoPointer() uintptr {
M v4/adw/adw-animation-util.go +4 -4
@@ -15,8 +15,8 @@ var xGetEnableAnimations func(uintptr) bool
15 // animate it or not.15 // animate it or not.
16 func GetEnableAnimations(WidgetVar *gtk.Widget) bool {16 func GetEnableAnimations(WidgetVar *gtk.Widget) bool {
17 17
18- return xGetEnableAnimations(WidgetVar.GoPointer())18+ cret := xGetEnableAnimations(WidgetVar.GoPointer())
19-19+ return cret
20 }20 }
21 21
22 var xLerp func(float64, float64, float64) float6422 var xLerp func(float64, float64, float64) float64
@@ -24,8 +24,8 @@ var xLerp func(float64, float64, float64) float64
24 // Computes the linear interpolation between @a and @b for @t.24 // Computes the linear interpolation between @a and @b for @t.
25 func Lerp(AVar float64, BVar float64, TVar float64) float64 {25 func Lerp(AVar float64, BVar float64, TVar float64) float64 {
26 26
27- return xLerp(AVar, BVar, TVar)27+ cret := xLerp(AVar, BVar, TVar)
28-28+ return cret
29 }29 }
30 30
31 func init() {31 func init() {
M v4/adw/adw-animation.go +24 -26
@@ -94,8 +94,8 @@ var xAnimationGetFollowEnableAnimationsSetting func(uintptr) bool
94 // Gets whether @self should be skipped when animations are globally disabled.94 // Gets whether @self should be skipped when animations are globally disabled.
95 func (x *Animation) GetFollowEnableAnimationsSetting() bool {95 func (x *Animation) GetFollowEnableAnimationsSetting() bool {
96 96
97- return xAnimationGetFollowEnableAnimationsSetting(x.GoPointer())97+ cret := xAnimationGetFollowEnableAnimationsSetting(x.GoPointer())
98-98+ return cret
99 }99 }
100 100
101 var xAnimationGetState func(uintptr) AnimationState101 var xAnimationGetState func(uintptr) AnimationState
@@ -106,26 +106,25 @@ var xAnimationGetState func(uintptr) AnimationState
106 // hasn't been started yet.106 // hasn't been started yet.
107 func (x *Animation) GetState() AnimationState {107 func (x *Animation) GetState() AnimationState {
108 108
109- return xAnimationGetState(x.GoPointer())109+ cret := xAnimationGetState(x.GoPointer())
110-110+ return cret
111 }111 }
112 112
113 var xAnimationGetTarget func(uintptr) uintptr113 var xAnimationGetTarget func(uintptr) uintptr
114 114
115 // Gets the target @self animates.115 // Gets the target @self animates.
116 func (x *Animation) GetTarget() *AnimationTarget {116 func (x *Animation) GetTarget() *AnimationTarget {
117+ var cls *AnimationTarget
117 118
118- GetTargetPtr := xAnimationGetTarget(x.GoPointer())119+ cret := xAnimationGetTarget(x.GoPointer())
119- if GetTargetPtr == 0 {
120- return nil
121- }
122-
123- gobject.IncreaseRef(GetTargetPtr)
124-
125- GetTargetCls := &AnimationTarget{}
126- GetTargetCls.Ptr = GetTargetPtr
127- return GetTargetCls
128 120
121+ if cret == 0 {
122+ return cls
123+ }
124+ gobject.IncreaseRef(cret)
125+ cls = &AnimationTarget{}
126+ cls.Ptr = cret
127+ return cls
129 }128 }
130 129
131 var xAnimationGetValue func(uintptr) float64130 var xAnimationGetValue func(uintptr) float64
@@ -133,8 +132,8 @@ var xAnimationGetValue func(uintptr) float64
133 // Gets the current value of @self.132 // Gets the current value of @self.
134 func (x *Animation) GetValue() float64 {133 func (x *Animation) GetValue() float64 {
135 134
136- return xAnimationGetValue(x.GoPointer())135+ cret := xAnimationGetValue(x.GoPointer())
137-136+ return cret
138 }137 }
139 138
140 var xAnimationGetWidget func(uintptr) uintptr139 var xAnimationGetWidget func(uintptr) uintptr
@@ -148,18 +147,17 @@ var xAnimationGetWidget func(uintptr) uintptr
148 // mapped, or if it gets unmapped during an ongoing animation, the animation147 // mapped, or if it gets unmapped during an ongoing animation, the animation
149 // will be automatically skipped.148 // will be automatically skipped.
150 func (x *Animation) GetWidget() *gtk.Widget {149 func (x *Animation) GetWidget() *gtk.Widget {
150+ var cls *gtk.Widget
151 151
152- GetWidgetPtr := xAnimationGetWidget(x.GoPointer())152+ cret := xAnimationGetWidget(x.GoPointer())
153- if GetWidgetPtr == 0 {
154- return nil
155- }
156-
157- gobject.IncreaseRef(GetWidgetPtr)
158-
159- GetWidgetCls := &gtk.Widget{}
160- GetWidgetCls.Ptr = GetWidgetPtr
161- return GetWidgetCls
162 153
154+ if cret == 0 {
155+ return cls
156+ }
157+ gobject.IncreaseRef(cret)
158+ cls = &gtk.Widget{}
159+ cls.Ptr = cret
160+ return cls
163 }161 }
164 162
165 var xAnimationPause func(uintptr)163 var xAnimationPause func(uintptr)
M v4/adw/adw-application-window.go +83 -88
@@ -48,16 +48,17 @@ var xNewApplicationWindow func(uintptr) uintptr
48 48
49 // Creates a new `AdwApplicationWindow` for @app.49 // Creates a new `AdwApplicationWindow` for @app.
50 func NewApplicationWindow(AppVar *gtk.Application) *gtk.Widget {50 func NewApplicationWindow(AppVar *gtk.Application) *gtk.Widget {
51- NewApplicationWindowPtr := xNewApplicationWindow(AppVar.GoPointer())51+ var cls *gtk.Widget
52- if NewApplicationWindowPtr == 0 {
53- return nil
54- }
55 52
56- gobject.IncreaseRef(NewApplicationWindowPtr)53+ cret := xNewApplicationWindow(AppVar.GoPointer())
57 54
58- NewApplicationWindowCls := &gtk.Widget{}55+ if cret == 0 {
59- NewApplicationWindowCls.Ptr = NewApplicationWindowPtr56+ return cls
60- return NewApplicationWindowCls57+ }
58+ gobject.IncreaseRef(cret)
59+ cls = &gtk.Widget{}
60+ cls.Ptr = cret
61+ return cls
61 }62 }
62 63
63 var xApplicationWindowGetContent func(uintptr) uintptr64 var xApplicationWindowGetContent func(uintptr) uintptr
@@ -66,18 +67,17 @@ var xApplicationWindowGetContent func(uintptr) uintptr
66 //67 //
67 // This method should always be used instead of [method@Gtk.Window.get_child].68 // This method should always be used instead of [method@Gtk.Window.get_child].
68 func (x *ApplicationWindow) GetContent() *gtk.Widget {69 func (x *ApplicationWindow) GetContent() *gtk.Widget {
70+ var cls *gtk.Widget
69 71
70- GetContentPtr := xApplicationWindowGetContent(x.GoPointer())72+ cret := xApplicationWindowGetContent(x.GoPointer())
71- if GetContentPtr == 0 {
72- return nil
73- }
74-
75- gobject.IncreaseRef(GetContentPtr)
76-
77- GetContentCls := &gtk.Widget{}
78- GetContentCls.Ptr = GetContentPtr
79- return GetContentCls
80 73
74+ if cret == 0 {
75+ return cls
76+ }
77+ gobject.IncreaseRef(cret)
78+ cls = &gtk.Widget{}
79+ cls.Ptr = cret
80+ return cls
81 }81 }
82 82
83 var xApplicationWindowSetContent func(uintptr, uintptr)83 var xApplicationWindowSetContent func(uintptr, uintptr)
@@ -197,8 +197,8 @@ func (x *ApplicationWindow) ChangeActionState(ActionNameVar string, ValueVar *gl
197 // have its state changed from outside callers.197 // have its state changed from outside callers.
198 func (x *ApplicationWindow) GetActionEnabled(ActionNameVar string) bool {198 func (x *ApplicationWindow) GetActionEnabled(ActionNameVar string) bool {
199 199
200- return gio.XGActionGroupGetActionEnabled(x.GoPointer(), ActionNameVar)200+ cret := gio.XGActionGroupGetActionEnabled(x.GoPointer(), ActionNameVar)
201-201+ return cret
202 }202 }
203 203
204 // Queries the type of the parameter that must be given when activating204 // Queries the type of the parameter that must be given when activating
@@ -216,8 +216,8 @@ func (x *ApplicationWindow) GetActionEnabled(ActionNameVar string) bool {
216 // with the same name but a different parameter type.216 // with the same name but a different parameter type.
217 func (x *ApplicationWindow) GetActionParameterType(ActionNameVar string) *glib.VariantType {217 func (x *ApplicationWindow) GetActionParameterType(ActionNameVar string) *glib.VariantType {
218 218
219- return gio.XGActionGroupGetActionParameterType(x.GoPointer(), ActionNameVar)219+ cret := gio.XGActionGroupGetActionParameterType(x.GoPointer(), ActionNameVar)
220-220+ return cret
221 }221 }
222 222
223 // Queries the current state of the named action within @action_group.223 // Queries the current state of the named action within @action_group.
@@ -230,8 +230,8 @@ func (x *ApplicationWindow) GetActionParameterType(ActionNameVar string) *glib.V
230 // g_variant_unref() when it is no longer required.230 // g_variant_unref() when it is no longer required.
231 func (x *ApplicationWindow) GetActionState(ActionNameVar string) *glib.Variant {231 func (x *ApplicationWindow) GetActionState(ActionNameVar string) *glib.Variant {
232 232
233- return gio.XGActionGroupGetActionState(x.GoPointer(), ActionNameVar)233+ cret := gio.XGActionGroupGetActionState(x.GoPointer(), ActionNameVar)
234-234+ return cret
235 }235 }
236 236
237 // Requests a hint about the valid range of values for the state of the237 // Requests a hint about the valid range of values for the state of the
@@ -254,8 +254,8 @@ func (x *ApplicationWindow) GetActionState(ActionNameVar string) *glib.Variant {
254 // g_variant_unref() when it is no longer required.254 // g_variant_unref() when it is no longer required.
255 func (x *ApplicationWindow) GetActionStateHint(ActionNameVar string) *glib.Variant {255 func (x *ApplicationWindow) GetActionStateHint(ActionNameVar string) *glib.Variant {
256 256
257- return gio.XGActionGroupGetActionStateHint(x.GoPointer(), ActionNameVar)257+ cret := gio.XGActionGroupGetActionStateHint(x.GoPointer(), ActionNameVar)
258-258+ return cret
259 }259 }
260 260
261 // Queries the type of the state of the named action within261 // Queries the type of the state of the named action within
@@ -276,15 +276,15 @@ func (x *ApplicationWindow) GetActionStateHint(ActionNameVar string) *glib.Varia
276 // with the same name but a different state type.276 // with the same name but a different state type.
277 func (x *ApplicationWindow) GetActionStateType(ActionNameVar string) *glib.VariantType {277 func (x *ApplicationWindow) GetActionStateType(ActionNameVar string) *glib.VariantType {
278 278
279- return gio.XGActionGroupGetActionStateType(x.GoPointer(), ActionNameVar)279+ cret := gio.XGActionGroupGetActionStateType(x.GoPointer(), ActionNameVar)
280-280+ return cret
281 }281 }
282 282
283 // Checks if the named action exists within @action_group.283 // Checks if the named action exists within @action_group.
284 func (x *ApplicationWindow) HasAction(ActionNameVar string) bool {284 func (x *ApplicationWindow) HasAction(ActionNameVar string) bool {
285 285
286- return gio.XGActionGroupHasAction(x.GoPointer(), ActionNameVar)286+ cret := gio.XGActionGroupHasAction(x.GoPointer(), ActionNameVar)
287-287+ return cret
288 }288 }
289 289
290 // Lists the actions contained within @action_group.290 // Lists the actions contained within @action_group.
@@ -293,8 +293,8 @@ func (x *ApplicationWindow) HasAction(ActionNameVar string) bool {
293 // it is no longer required.293 // it is no longer required.
294 func (x *ApplicationWindow) ListActions() uintptr {294 func (x *ApplicationWindow) ListActions() uintptr {
295 295
296- return gio.XGActionGroupListActions(x.GoPointer())296+ cret := gio.XGActionGroupListActions(x.GoPointer())
297-297+ return cret
298 }298 }
299 299
300 // Queries all aspects of the named action within an @action_group.300 // Queries all aspects of the named action within an @action_group.
@@ -326,8 +326,8 @@ func (x *ApplicationWindow) ListActions() uintptr {
326 // fields may or may not have been modified.326 // fields may or may not have been modified.
327 func (x *ApplicationWindow) QueryAction(ActionNameVar string, EnabledVar bool, ParameterTypeVar **glib.VariantType, StateTypeVar **glib.VariantType, StateHintVar **glib.Variant, StateVar **glib.Variant) bool {327 func (x *ApplicationWindow) QueryAction(ActionNameVar string, EnabledVar bool, ParameterTypeVar **glib.VariantType, StateTypeVar **glib.VariantType, StateHintVar **glib.Variant, StateVar **glib.Variant) bool {
328 328
329- return gio.XGActionGroupQueryAction(x.GoPointer(), ActionNameVar, EnabledVar, ParameterTypeVar, StateTypeVar, StateHintVar, StateVar)329+ cret := gio.XGActionGroupQueryAction(x.GoPointer(), ActionNameVar, EnabledVar, ParameterTypeVar, StateTypeVar, StateHintVar, StateVar)
330-330+ return cret
331 }331 }
332 332
333 // Adds an action to the @action_map.333 // Adds an action to the @action_map.
@@ -395,18 +395,17 @@ func (x *ApplicationWindow) AddActionEntries(EntriesVar uintptr, NEntriesVar int
395 //395 //
396 // If no such action exists, returns %NULL.396 // If no such action exists, returns %NULL.
397 func (x *ApplicationWindow) LookupAction(ActionNameVar string) *gio.ActionBase {397 func (x *ApplicationWindow) LookupAction(ActionNameVar string) *gio.ActionBase {
398+ var cls *gio.ActionBase
398 399
399- LookupActionPtr := gio.XGActionMapLookupAction(x.GoPointer(), ActionNameVar)400+ cret := gio.XGActionMapLookupAction(x.GoPointer(), ActionNameVar)
400- if LookupActionPtr == 0 {
401- return nil
402- }
403-
404- gobject.IncreaseRef(LookupActionPtr)
405-
406- LookupActionCls := &gio.ActionBase{}
407- LookupActionCls.Ptr = LookupActionPtr
408- return LookupActionCls
409 401
402+ if cret == 0 {
403+ return cls
404+ }
405+ gobject.IncreaseRef(cret)
406+ cls = &gio.ActionBase{}
407+ cls.Ptr = cret
408+ return cls
410 }409 }
411 410
412 // Removes the named action from the action map.411 // Removes the named action from the action map.
@@ -421,8 +420,8 @@ func (x *ApplicationWindow) RemoveAction(ActionNameVar string) {
421 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.420 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
422 func (x *ApplicationWindow) GetAccessibleRole() gtk.AccessibleRole {421 func (x *ApplicationWindow) GetAccessibleRole() gtk.AccessibleRole {
423 422
424- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())423+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
425-424+ return cret
426 }425 }
427 426
428 // Resets the accessible @property to its default value.427 // Resets the accessible @property to its default value.
@@ -557,40 +556,38 @@ func (x *ApplicationWindow) UpdateStateValue(NStatesVar int, StatesVar uintptr,
557 // of the <object> tag used to construct the @buildable.556 // of the <object> tag used to construct the @buildable.
558 func (x *ApplicationWindow) GetBuildableId() string {557 func (x *ApplicationWindow) GetBuildableId() string {
559 558
560- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())559+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
561-560+ return cret
562 }561 }
563 562
564 // Returns the renderer that is used for this `GtkNative`.563 // Returns the renderer that is used for this `GtkNative`.
565 func (x *ApplicationWindow) GetRenderer() *gsk.Renderer {564 func (x *ApplicationWindow) GetRenderer() *gsk.Renderer {
565+ var cls *gsk.Renderer
566 566
567- GetRendererPtr := gtk.XGtkNativeGetRenderer(x.GoPointer())567+ cret := gtk.XGtkNativeGetRenderer(x.GoPointer())
568- if GetRendererPtr == 0 {
569- return nil
570- }
571-
572- gobject.IncreaseRef(GetRendererPtr)
573-
574- GetRendererCls := &gsk.Renderer{}
575- GetRendererCls.Ptr = GetRendererPtr
576- return GetRendererCls
577 568
569+ if cret == 0 {
570+ return cls
571+ }
572+ gobject.IncreaseRef(cret)
573+ cls = &gsk.Renderer{}
574+ cls.Ptr = cret
575+ return cls
578 }576 }
579 577
580 // Returns the surface of this `GtkNative`.578 // Returns the surface of this `GtkNative`.
581 func (x *ApplicationWindow) GetSurface() *gdk.Surface {579 func (x *ApplicationWindow) GetSurface() *gdk.Surface {
580+ var cls *gdk.Surface
582 581
583- GetSurfacePtr := gtk.XGtkNativeGetSurface(x.GoPointer())582+ cret := gtk.XGtkNativeGetSurface(x.GoPointer())
584- if GetSurfacePtr == 0 {
585- return nil
586- }
587-
588- gobject.IncreaseRef(GetSurfacePtr)
589-
590- GetSurfaceCls := &gdk.Surface{}
591- GetSurfaceCls.Ptr = GetSurfacePtr
592- return GetSurfaceCls
593 583
584+ if cret == 0 {
585+ return cls
586+ }
587+ gobject.IncreaseRef(cret)
588+ cls = &gdk.Surface{}
589+ cls.Ptr = cret
590+ return cls
594 }591 }
595 592
596 // Retrieves the surface transform of @self.593 // Retrieves the surface transform of @self.
@@ -623,18 +620,17 @@ func (x *ApplicationWindow) Unrealize() {
623 620
624 // Returns the display that this `GtkRoot` is on.621 // Returns the display that this `GtkRoot` is on.
625 func (x *ApplicationWindow) GetDisplay() *gdk.Display {622 func (x *ApplicationWindow) GetDisplay() *gdk.Display {
623+ var cls *gdk.Display
626 624
627- GetDisplayPtr := gtk.XGtkRootGetDisplay(x.GoPointer())625+ cret := gtk.XGtkRootGetDisplay(x.GoPointer())
628- if GetDisplayPtr == 0 {
629- return nil
630- }
631-
632- gobject.IncreaseRef(GetDisplayPtr)
633-
634- GetDisplayCls := &gdk.Display{}
635- GetDisplayCls.Ptr = GetDisplayPtr
636- return GetDisplayCls
637 626
627+ if cret == 0 {
628+ return cls
629+ }
630+ gobject.IncreaseRef(cret)
631+ cls = &gdk.Display{}
632+ cls.Ptr = cret
633+ return cls
638 }634 }
639 635
640 // Retrieves the current focused widget within the root.636 // Retrieves the current focused widget within the root.
@@ -644,18 +640,17 @@ func (x *ApplicationWindow) GetDisplay() *gdk.Display {
644 // `gtk_widget_has_focus (widget)` will be %FALSE for the640 // `gtk_widget_has_focus (widget)` will be %FALSE for the
645 // widget.641 // widget.
646 func (x *ApplicationWindow) GetFocus() *gtk.Widget {642 func (x *ApplicationWindow) GetFocus() *gtk.Widget {
643+ var cls *gtk.Widget
647 644
648- GetFocusPtr := gtk.XGtkRootGetFocus(x.GoPointer())645+ cret := gtk.XGtkRootGetFocus(x.GoPointer())
649- if GetFocusPtr == 0 {
650- return nil
651- }
652-
653- gobject.IncreaseRef(GetFocusPtr)
654-
655- GetFocusCls := &gtk.Widget{}
656- GetFocusCls.Ptr = GetFocusPtr
657- return GetFocusCls
658 646
647+ if cret == 0 {
648+ return cls
649+ }
650+ gobject.IncreaseRef(cret)
651+ cls = &gtk.Widget{}
652+ cls.Ptr = cret
653+ return cls
659 }654 }
660 655
661 // If @focus is not the current focus widget, and is focusable, sets656 // If @focus is not the current focus widget, and is focusable, sets
M v4/adw/adw-application.go +43 -43
@@ -62,14 +62,16 @@ var xNewApplication func(string, gio.ApplicationFlags) uintptr
62 // If no application ID is given then some features (most notably application62 // If no application ID is given then some features (most notably application
63 // uniqueness) will be disabled.63 // uniqueness) will be disabled.
64 func NewApplication(ApplicationIdVar string, FlagsVar gio.ApplicationFlags) *Application {64 func NewApplication(ApplicationIdVar string, FlagsVar gio.ApplicationFlags) *Application {
65- NewApplicationPtr := xNewApplication(ApplicationIdVar, FlagsVar)65+ var cls *Application
66- if NewApplicationPtr == 0 {66+
67- return nil67+ cret := xNewApplication(ApplicationIdVar, FlagsVar)
68- }
69 68
70- NewApplicationCls := &Application{}69+ if cret == 0 {
71- NewApplicationCls.Ptr = NewApplicationPtr70+ return cls
72- return NewApplicationCls71+ }
72+ cls = &Application{}
73+ cls.Ptr = cret
74+ return cls
73 }75 }
74 76
75 var xApplicationGetStyleManager func(uintptr) uintptr77 var xApplicationGetStyleManager func(uintptr) uintptr
@@ -79,18 +81,17 @@ var xApplicationGetStyleManager func(uintptr) uintptr
79 // This is a convenience property allowing to access `AdwStyleManager` through81 // This is a convenience property allowing to access `AdwStyleManager` through
80 // property bindings or expressions.82 // property bindings or expressions.
81 func (x *Application) GetStyleManager() *StyleManager {83 func (x *Application) GetStyleManager() *StyleManager {
84+ var cls *StyleManager
82 85
83- GetStyleManagerPtr := xApplicationGetStyleManager(x.GoPointer())86+ cret := xApplicationGetStyleManager(x.GoPointer())
84- if GetStyleManagerPtr == 0 {
85- return nil
86- }
87-
88- gobject.IncreaseRef(GetStyleManagerPtr)
89-
90- GetStyleManagerCls := &StyleManager{}
91- GetStyleManagerCls.Ptr = GetStyleManagerPtr
92- return GetStyleManagerCls
93 87
88+ if cret == 0 {
89+ return cls
90+ }
91+ gobject.IncreaseRef(cret)
92+ cls = &StyleManager{}
93+ cls.Ptr = cret
94+ return cls
94 }95 }
95 96
96 func (c *Application) GoPointer() uintptr {97 func (c *Application) GoPointer() uintptr {
@@ -199,8 +200,8 @@ func (x *Application) ChangeActionState(ActionNameVar string, ValueVar *glib.Var
199 // have its state changed from outside callers.200 // have its state changed from outside callers.
200 func (x *Application) GetActionEnabled(ActionNameVar string) bool {201 func (x *Application) GetActionEnabled(ActionNameVar string) bool {
201 202
202- return gio.XGActionGroupGetActionEnabled(x.GoPointer(), ActionNameVar)203+ cret := gio.XGActionGroupGetActionEnabled(x.GoPointer(), ActionNameVar)
203-204+ return cret
204 }205 }
205 206
206 // Queries the type of the parameter that must be given when activating207 // Queries the type of the parameter that must be given when activating
@@ -218,8 +219,8 @@ func (x *Application) GetActionEnabled(ActionNameVar string) bool {
218 // with the same name but a different parameter type.219 // with the same name but a different parameter type.
219 func (x *Application) GetActionParameterType(ActionNameVar string) *glib.VariantType {220 func (x *Application) GetActionParameterType(ActionNameVar string) *glib.VariantType {
220 221
221- return gio.XGActionGroupGetActionParameterType(x.GoPointer(), ActionNameVar)222+ cret := gio.XGActionGroupGetActionParameterType(x.GoPointer(), ActionNameVar)
222-223+ return cret
223 }224 }
224 225
225 // Queries the current state of the named action within @action_group.226 // Queries the current state of the named action within @action_group.
@@ -232,8 +233,8 @@ func (x *Application) GetActionParameterType(ActionNameVar string) *glib.Variant
232 // g_variant_unref() when it is no longer required.233 // g_variant_unref() when it is no longer required.
233 func (x *Application) GetActionState(ActionNameVar string) *glib.Variant {234 func (x *Application) GetActionState(ActionNameVar string) *glib.Variant {
234 235
235- return gio.XGActionGroupGetActionState(x.GoPointer(), ActionNameVar)236+ cret := gio.XGActionGroupGetActionState(x.GoPointer(), ActionNameVar)
236-237+ return cret
237 }238 }
238 239
239 // Requests a hint about the valid range of values for the state of the240 // Requests a hint about the valid range of values for the state of the
@@ -256,8 +257,8 @@ func (x *Application) GetActionState(ActionNameVar string) *glib.Variant {
256 // g_variant_unref() when it is no longer required.257 // g_variant_unref() when it is no longer required.
257 func (x *Application) GetActionStateHint(ActionNameVar string) *glib.Variant {258 func (x *Application) GetActionStateHint(ActionNameVar string) *glib.Variant {
258 259
259- return gio.XGActionGroupGetActionStateHint(x.GoPointer(), ActionNameVar)260+ cret := gio.XGActionGroupGetActionStateHint(x.GoPointer(), ActionNameVar)
260-261+ return cret
261 }262 }
262 263
263 // Queries the type of the state of the named action within264 // Queries the type of the state of the named action within
@@ -278,15 +279,15 @@ func (x *Application) GetActionStateHint(ActionNameVar string) *glib.Variant {
278 // with the same name but a different state type.279 // with the same name but a different state type.
279 func (x *Application) GetActionStateType(ActionNameVar string) *glib.VariantType {280 func (x *Application) GetActionStateType(ActionNameVar string) *glib.VariantType {
280 281
281- return gio.XGActionGroupGetActionStateType(x.GoPointer(), ActionNameVar)282+ cret := gio.XGActionGroupGetActionStateType(x.GoPointer(), ActionNameVar)
282-283+ return cret
283 }284 }
284 285
285 // Checks if the named action exists within @action_group.286 // Checks if the named action exists within @action_group.
286 func (x *Application) HasAction(ActionNameVar string) bool {287 func (x *Application) HasAction(ActionNameVar string) bool {
287 288
288- return gio.XGActionGroupHasAction(x.GoPointer(), ActionNameVar)289+ cret := gio.XGActionGroupHasAction(x.GoPointer(), ActionNameVar)
289-290+ return cret
290 }291 }
291 292
292 // Lists the actions contained within @action_group.293 // Lists the actions contained within @action_group.
@@ -295,8 +296,8 @@ func (x *Application) HasAction(ActionNameVar string) bool {
295 // it is no longer required.296 // it is no longer required.
296 func (x *Application) ListActions() uintptr {297 func (x *Application) ListActions() uintptr {
297 298
298- return gio.XGActionGroupListActions(x.GoPointer())299+ cret := gio.XGActionGroupListActions(x.GoPointer())
299-300+ return cret
300 }301 }
301 302
302 // Queries all aspects of the named action within an @action_group.303 // Queries all aspects of the named action within an @action_group.
@@ -328,8 +329,8 @@ func (x *Application) ListActions() uintptr {
328 // fields may or may not have been modified.329 // fields may or may not have been modified.
329 func (x *Application) QueryAction(ActionNameVar string, EnabledVar bool, ParameterTypeVar **glib.VariantType, StateTypeVar **glib.VariantType, StateHintVar **glib.Variant, StateVar **glib.Variant) bool {330 func (x *Application) QueryAction(ActionNameVar string, EnabledVar bool, ParameterTypeVar **glib.VariantType, StateTypeVar **glib.VariantType, StateHintVar **glib.Variant, StateVar **glib.Variant) bool {
330 331
331- return gio.XGActionGroupQueryAction(x.GoPointer(), ActionNameVar, EnabledVar, ParameterTypeVar, StateTypeVar, StateHintVar, StateVar)332+ cret := gio.XGActionGroupQueryAction(x.GoPointer(), ActionNameVar, EnabledVar, ParameterTypeVar, StateTypeVar, StateHintVar, StateVar)
332-333+ return cret
333 }334 }
334 335
335 // Adds an action to the @action_map.336 // Adds an action to the @action_map.
@@ -397,18 +398,17 @@ func (x *Application) AddActionEntries(EntriesVar uintptr, NEntriesVar int, User
397 //398 //
398 // If no such action exists, returns %NULL.399 // If no such action exists, returns %NULL.
399 func (x *Application) LookupAction(ActionNameVar string) *gio.ActionBase {400 func (x *Application) LookupAction(ActionNameVar string) *gio.ActionBase {
401+ var cls *gio.ActionBase
400 402
401- LookupActionPtr := gio.XGActionMapLookupAction(x.GoPointer(), ActionNameVar)403+ cret := gio.XGActionMapLookupAction(x.GoPointer(), ActionNameVar)
402- if LookupActionPtr == 0 {
403- return nil
404- }
405-
406- gobject.IncreaseRef(LookupActionPtr)
407-
408- LookupActionCls := &gio.ActionBase{}
409- LookupActionCls.Ptr = LookupActionPtr
410- return LookupActionCls
411 404
405+ if cret == 0 {
406+ return cls
407+ }
408+ gobject.IncreaseRef(cret)
409+ cls = &gio.ActionBase{}
410+ cls.Ptr = cret
411+ return cls
412 }412 }
413 413
414 // Removes the named action from the action map.414 // Removes the named action from the action map.
M v4/adw/adw-avatar.go +38 -38
@@ -52,16 +52,17 @@ var xNewAvatar func(int, string, bool) uintptr
52 52
53 // Creates a new `AdwAvatar`.53 // Creates a new `AdwAvatar`.
54 func NewAvatar(SizeVar int, TextVar string, ShowInitialsVar bool) *gtk.Widget {54 func NewAvatar(SizeVar int, TextVar string, ShowInitialsVar bool) *gtk.Widget {
55- NewAvatarPtr := xNewAvatar(SizeVar, TextVar, ShowInitialsVar)55+ var cls *gtk.Widget
56- if NewAvatarPtr == 0 {
57- return nil
58- }
59 56
60- gobject.IncreaseRef(NewAvatarPtr)57+ cret := xNewAvatar(SizeVar, TextVar, ShowInitialsVar)
61 58
62- NewAvatarCls := &gtk.Widget{}59+ if cret == 0 {
63- NewAvatarCls.Ptr = NewAvatarPtr60+ return cls
64- return NewAvatarCls61+ }
62+ gobject.IncreaseRef(cret)
63+ cls = &gtk.Widget{}
64+ cls.Ptr = cret
65+ return cls
65 }66 }
66 67
67 var xAvatarDrawToTexture func(uintptr, int) uintptr68 var xAvatarDrawToTexture func(uintptr, int) uintptr
@@ -70,34 +71,33 @@ var xAvatarDrawToTexture func(uintptr, int) uintptr
70 //71 //
71 // This can be used to export the fallback avatar.72 // This can be used to export the fallback avatar.
72 func (x *Avatar) DrawToTexture(ScaleFactorVar int) *gdk.Texture {73 func (x *Avatar) DrawToTexture(ScaleFactorVar int) *gdk.Texture {
74+ var cls *gdk.Texture
73 75
74- DrawToTexturePtr := xAvatarDrawToTexture(x.GoPointer(), ScaleFactorVar)76+ cret := xAvatarDrawToTexture(x.GoPointer(), ScaleFactorVar)
75- if DrawToTexturePtr == 0 {
76- return nil
77- }
78-
79- DrawToTextureCls := &gdk.Texture{}
80- DrawToTextureCls.Ptr = DrawToTexturePtr
81- return DrawToTextureCls
82 77
78+ if cret == 0 {
79+ return cls
80+ }
81+ cls = &gdk.Texture{}
82+ cls.Ptr = cret
83+ return cls
83 }84 }
84 85
85 var xAvatarGetCustomImage func(uintptr) uintptr86 var xAvatarGetCustomImage func(uintptr) uintptr
86 87
87 // Gets the custom image paintable.88 // Gets the custom image paintable.
88 func (x *Avatar) GetCustomImage() *gdk.PaintableBase {89 func (x *Avatar) GetCustomImage() *gdk.PaintableBase {
90+ var cls *gdk.PaintableBase
89 91
90- GetCustomImagePtr := xAvatarGetCustomImage(x.GoPointer())92+ cret := xAvatarGetCustomImage(x.GoPointer())
91- if GetCustomImagePtr == 0 {
92- return nil
93- }
94-
95- gobject.IncreaseRef(GetCustomImagePtr)
96-
97- GetCustomImageCls := &gdk.PaintableBase{}
98- GetCustomImageCls.Ptr = GetCustomImagePtr
99- return GetCustomImageCls
100 93
94+ if cret == 0 {
95+ return cls
96+ }
97+ gobject.IncreaseRef(cret)
98+ cls = &gdk.PaintableBase{}
99+ cls.Ptr = cret
100+ return cls
101 }101 }
102 102
103 var xAvatarGetIconName func(uintptr) string103 var xAvatarGetIconName func(uintptr) string
@@ -105,8 +105,8 @@ var xAvatarGetIconName func(uintptr) string
105 // Gets the name of an icon to use as a fallback.105 // Gets the name of an icon to use as a fallback.
106 func (x *Avatar) GetIconName() string {106 func (x *Avatar) GetIconName() string {
107 107
108- return xAvatarGetIconName(x.GoPointer())108+ cret := xAvatarGetIconName(x.GoPointer())
109-109+ return cret
110 }110 }
111 111
112 var xAvatarGetShowInitials func(uintptr) bool112 var xAvatarGetShowInitials func(uintptr) bool
@@ -114,8 +114,8 @@ var xAvatarGetShowInitials func(uintptr) bool
114 // Gets whether initials are used instead of an icon on the fallback avatar.114 // Gets whether initials are used instead of an icon on the fallback avatar.
115 func (x *Avatar) GetShowInitials() bool {115 func (x *Avatar) GetShowInitials() bool {
116 116
117- return xAvatarGetShowInitials(x.GoPointer())117+ cret := xAvatarGetShowInitials(x.GoPointer())
118-118+ return cret
119 }119 }
120 120
121 var xAvatarGetSize func(uintptr) int121 var xAvatarGetSize func(uintptr) int
@@ -123,8 +123,8 @@ var xAvatarGetSize func(uintptr) int
123 // Gets the size of the avatar.123 // Gets the size of the avatar.
124 func (x *Avatar) GetSize() int {124 func (x *Avatar) GetSize() int {
125 125
126- return xAvatarGetSize(x.GoPointer())126+ cret := xAvatarGetSize(x.GoPointer())
127-127+ return cret
128 }128 }
129 129
130 var xAvatarGetText func(uintptr) string130 var xAvatarGetText func(uintptr) string
@@ -132,8 +132,8 @@ var xAvatarGetText func(uintptr) string
132 // Gets the text used to generate the fallback initials and color.132 // Gets the text used to generate the fallback initials and color.
133 func (x *Avatar) GetText() string {133 func (x *Avatar) GetText() string {
134 134
135- return xAvatarGetText(x.GoPointer())135+ cret := xAvatarGetText(x.GoPointer())
136-136+ return cret
137 }137 }
138 138
139 var xAvatarSetCustomImage func(uintptr, uintptr)139 var xAvatarSetCustomImage func(uintptr, uintptr)
@@ -201,8 +201,8 @@ func (c *Avatar) SetGoPointer(ptr uintptr) {
201 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.201 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
202 func (x *Avatar) GetAccessibleRole() gtk.AccessibleRole {202 func (x *Avatar) GetAccessibleRole() gtk.AccessibleRole {
203 203
204- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())204+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
205-205+ return cret
206 }206 }
207 207
208 // Resets the accessible @property to its default value.208 // Resets the accessible @property to its default value.
@@ -337,8 +337,8 @@ func (x *Avatar) UpdateStateValue(NStatesVar int, StatesVar uintptr, ValuesVar u
337 // of the <object> tag used to construct the @buildable.337 // of the <object> tag used to construct the @buildable.
338 func (x *Avatar) GetBuildableId() string {338 func (x *Avatar) GetBuildableId() string {
339 339
340- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())340+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
341-341+ return cret
342 }342 }
343 343
344 func init() {344 func init() {
M v4/adw/adw-banner.go +25 -24
@@ -51,16 +51,17 @@ var xNewBanner func(string) uintptr
51 51
52 // Creates a new `AdwBanner`.52 // Creates a new `AdwBanner`.
53 func NewBanner(TitleVar string) *gtk.Widget {53 func NewBanner(TitleVar string) *gtk.Widget {
54- NewBannerPtr := xNewBanner(TitleVar)54+ var cls *gtk.Widget
55- if NewBannerPtr == 0 {
56- return nil
57- }
58 55
59- gobject.IncreaseRef(NewBannerPtr)56+ cret := xNewBanner(TitleVar)
60 57
61- NewBannerCls := &gtk.Widget{}58+ if cret == 0 {
62- NewBannerCls.Ptr = NewBannerPtr59+ return cls
63- return NewBannerCls60+ }
61+ gobject.IncreaseRef(cret)
62+ cls = &gtk.Widget{}
63+ cls.Ptr = cret
64+ return cls
64 }65 }
65 66
66 var xBannerGetButtonLabel func(uintptr) string67 var xBannerGetButtonLabel func(uintptr) string
@@ -68,8 +69,8 @@ var xBannerGetButtonLabel func(uintptr) string
68 // Gets the button label for @self.69 // Gets the button label for @self.
69 func (x *Banner) GetButtonLabel() string {70 func (x *Banner) GetButtonLabel() string {
70 71
71- return xBannerGetButtonLabel(x.GoPointer())72+ cret := xBannerGetButtonLabel(x.GoPointer())
72-73+ return cret
73 }74 }
74 75
75 var xBannerGetRevealed func(uintptr) bool76 var xBannerGetRevealed func(uintptr) bool
@@ -77,8 +78,8 @@ var xBannerGetRevealed func(uintptr) bool
77 // Gets if a banner is revealed78 // Gets if a banner is revealed
78 func (x *Banner) GetRevealed() bool {79 func (x *Banner) GetRevealed() bool {
79 80
80- return xBannerGetRevealed(x.GoPointer())81+ cret := xBannerGetRevealed(x.GoPointer())
81-82+ return cret
82 }83 }
83 84
84 var xBannerGetTitle func(uintptr) string85 var xBannerGetTitle func(uintptr) string
@@ -86,8 +87,8 @@ var xBannerGetTitle func(uintptr) string
86 // Gets the title for @self.87 // Gets the title for @self.
87 func (x *Banner) GetTitle() string {88 func (x *Banner) GetTitle() string {
88 89
89- return xBannerGetTitle(x.GoPointer())90+ cret := xBannerGetTitle(x.GoPointer())
90-91+ return cret
91 }92 }
92 93
93 var xBannerGetUseMarkup func(uintptr) bool94 var xBannerGetUseMarkup func(uintptr) bool
@@ -95,8 +96,8 @@ var xBannerGetUseMarkup func(uintptr) bool
95 // Gets whether to use Pango markup for the banner title.96 // Gets whether to use Pango markup for the banner title.
96 func (x *Banner) GetUseMarkup() bool {97 func (x *Banner) GetUseMarkup() bool {
97 98
98- return xBannerGetUseMarkup(x.GoPointer())99+ cret := xBannerGetUseMarkup(x.GoPointer())
99-100+ return cret
100 }101 }
101 102
102 var xBannerSetButtonLabel func(uintptr, string)103 var xBannerSetButtonLabel func(uintptr, string)
@@ -169,8 +170,8 @@ func (x *Banner) ConnectButtonClicked(cb func(Banner)) {
169 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.170 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
170 func (x *Banner) GetAccessibleRole() gtk.AccessibleRole {171 func (x *Banner) GetAccessibleRole() gtk.AccessibleRole {
171 172
172- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())173+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
173-174+ return cret
174 }175 }
175 176
176 // Resets the accessible @property to its default value.177 // Resets the accessible @property to its default value.
@@ -302,15 +303,15 @@ func (x *Banner) UpdateStateValue(NStatesVar int, StatesVar uintptr, ValuesVar u
302 // Gets the action name for @actionable.303 // Gets the action name for @actionable.
303 func (x *Banner) GetActionName() string {304 func (x *Banner) GetActionName() string {
304 305
305- return gtk.XGtkActionableGetActionName(x.GoPointer())306+ cret := gtk.XGtkActionableGetActionName(x.GoPointer())
306-307+ return cret
307 }308 }
308 309
309 // Gets the current target value of @actionable.310 // Gets the current target value of @actionable.
310 func (x *Banner) GetActionTargetValue() *glib.Variant {311 func (x *Banner) GetActionTargetValue() *glib.Variant {
311 312
312- return gtk.XGtkActionableGetActionTargetValue(x.GoPointer())313+ cret := gtk.XGtkActionableGetActionTargetValue(x.GoPointer())
313-314+ return cret
314 }315 }
315 316
316 // Specifies the name of the action with which this widget should be317 // Specifies the name of the action with which this widget should be
@@ -388,8 +389,8 @@ func (x *Banner) SetDetailedActionName(DetailedActionNameVar string) {
388 // of the <object> tag used to construct the @buildable.389 // of the <object> tag used to construct the @buildable.
389 func (x *Banner) GetBuildableId() string {390 func (x *Banner) GetBuildableId() string {
390 391
391- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())392+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
392-393+ return cret
393 }394 }
394 395
395 func init() {396 func init() {
M v4/adw/adw-bin.go +22 -22
@@ -40,34 +40,34 @@ var xNewBin func() uintptr
40 40
41 // Creates a new `AdwBin`.41 // Creates a new `AdwBin`.
42 func NewBin() *gtk.Widget {42 func NewBin() *gtk.Widget {
43- NewBinPtr := xNewBin()43+ var cls *gtk.Widget
44- if NewBinPtr == 0 {
45- return nil
46- }
47 44
48- gobject.IncreaseRef(NewBinPtr)45+ cret := xNewBin()
49 46
50- NewBinCls := &gtk.Widget{}47+ if cret == 0 {
51- NewBinCls.Ptr = NewBinPtr48+ return cls
52- return NewBinCls49+ }
50+ gobject.IncreaseRef(cret)
51+ cls = &gtk.Widget{}
52+ cls.Ptr = cret
53+ return cls
53 }54 }
54 55
55 var xBinGetChild func(uintptr) uintptr56 var xBinGetChild func(uintptr) uintptr
56 57
57 // Gets the child widget of @self.58 // Gets the child widget of @self.
58 func (x *Bin) GetChild() *gtk.Widget {59 func (x *Bin) GetChild() *gtk.Widget {
60+ var cls *gtk.Widget
59 61
60- GetChildPtr := xBinGetChild(x.GoPointer())62+ cret := xBinGetChild(x.GoPointer())
61- if GetChildPtr == 0 {
62- return nil
63- }
64-
65- gobject.IncreaseRef(GetChildPtr)
66-
67- GetChildCls := &gtk.Widget{}
68- GetChildCls.Ptr = GetChildPtr
69- return GetChildCls
70 63
64+ if cret == 0 {
65+ return cls
66+ }
67+ gobject.IncreaseRef(cret)
68+ cls = &gtk.Widget{}
69+ cls.Ptr = cret
70+ return cls
71 }71 }
72 72
73 var xBinSetChild func(uintptr, uintptr)73 var xBinSetChild func(uintptr, uintptr)
@@ -90,8 +90,8 @@ func (c *Bin) SetGoPointer(ptr uintptr) {
90 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.90 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
91 func (x *Bin) GetAccessibleRole() gtk.AccessibleRole {91 func (x *Bin) GetAccessibleRole() gtk.AccessibleRole {
92 92
93- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())93+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
94-94+ return cret
95 }95 }
96 96
97 // Resets the accessible @property to its default value.97 // Resets the accessible @property to its default value.
@@ -226,8 +226,8 @@ func (x *Bin) UpdateStateValue(NStatesVar int, StatesVar uintptr, ValuesVar uint
226 // of the <object> tag used to construct the @buildable.226 // of the <object> tag used to construct the @buildable.
227 func (x *Bin) GetBuildableId() string {227 func (x *Bin) GetBuildableId() string {
228 228
229- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())229+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
230-230+ return cret
231 }231 }
232 232
233 func init() {233 func init() {
M v4/adw/adw-button-content.go +19 -18
@@ -76,16 +76,17 @@ var xNewButtonContent func() uintptr
76 76
77 // Creates a new `AdwButtonContent`.77 // Creates a new `AdwButtonContent`.
78 func NewButtonContent() *gtk.Widget {78 func NewButtonContent() *gtk.Widget {
79- NewButtonContentPtr := xNewButtonContent()79+ var cls *gtk.Widget
80- if NewButtonContentPtr == 0 {
81- return nil
82- }
83 80
84- gobject.IncreaseRef(NewButtonContentPtr)81+ cret := xNewButtonContent()
85 82
86- NewButtonContentCls := &gtk.Widget{}83+ if cret == 0 {
87- NewButtonContentCls.Ptr = NewButtonContentPtr84+ return cls
88- return NewButtonContentCls85+ }
86+ gobject.IncreaseRef(cret)
87+ cls = &gtk.Widget{}
88+ cls.Ptr = cret
89+ return cls
89 }90 }
90 91
91 var xButtonContentGetIconName func(uintptr) string92 var xButtonContentGetIconName func(uintptr) string
@@ -93,8 +94,8 @@ var xButtonContentGetIconName func(uintptr) string
93 // Gets the name of the displayed icon.94 // Gets the name of the displayed icon.
94 func (x *ButtonContent) GetIconName() string {95 func (x *ButtonContent) GetIconName() string {
95 96
96- return xButtonContentGetIconName(x.GoPointer())97+ cret := xButtonContentGetIconName(x.GoPointer())
97-98+ return cret
98 }99 }
99 100
100 var xButtonContentGetLabel func(uintptr) string101 var xButtonContentGetLabel func(uintptr) string
@@ -102,8 +103,8 @@ var xButtonContentGetLabel func(uintptr) string
102 // Gets the displayed label.103 // Gets the displayed label.
103 func (x *ButtonContent) GetLabel() string {104 func (x *ButtonContent) GetLabel() string {
104 105
105- return xButtonContentGetLabel(x.GoPointer())106+ cret := xButtonContentGetLabel(x.GoPointer())
106-107+ return cret
107 }108 }
108 109
109 var xButtonContentGetUseUnderline func(uintptr) bool110 var xButtonContentGetUseUnderline func(uintptr) bool
@@ -111,8 +112,8 @@ var xButtonContentGetUseUnderline func(uintptr) bool
111 // Gets whether an underline in the text indicates a mnemonic.112 // Gets whether an underline in the text indicates a mnemonic.
112 func (x *ButtonContent) GetUseUnderline() bool {113 func (x *ButtonContent) GetUseUnderline() bool {
113 114
114- return xButtonContentGetUseUnderline(x.GoPointer())115+ cret := xButtonContentGetUseUnderline(x.GoPointer())
115-116+ return cret
116 }117 }
117 118
118 var xButtonContentSetIconName func(uintptr, string)119 var xButtonContentSetIconName func(uintptr, string)
@@ -159,8 +160,8 @@ func (c *ButtonContent) SetGoPointer(ptr uintptr) {
159 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.160 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
160 func (x *ButtonContent) GetAccessibleRole() gtk.AccessibleRole {161 func (x *ButtonContent) GetAccessibleRole() gtk.AccessibleRole {
161 162
162- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())163+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
163-164+ return cret
164 }165 }
165 166
166 // Resets the accessible @property to its default value.167 // Resets the accessible @property to its default value.
@@ -295,8 +296,8 @@ func (x *ButtonContent) UpdateStateValue(NStatesVar int, StatesVar uintptr, Valu
295 // of the <object> tag used to construct the @buildable.296 // of the <object> tag used to construct the @buildable.
296 func (x *ButtonContent) GetBuildableId() string {297 func (x *ButtonContent) GetBuildableId() string {
297 298
298- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())299+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
299-300+ return cret
300 }301 }
301 302
302 func init() {303 func init() {
M v4/adw/adw-carousel-indicator-dots.go +24 -24
@@ -46,34 +46,34 @@ var xNewCarouselIndicatorDots func() uintptr
46 46
47 // Creates a new `AdwCarouselIndicatorDots`.47 // Creates a new `AdwCarouselIndicatorDots`.
48 func NewCarouselIndicatorDots() *gtk.Widget {48 func NewCarouselIndicatorDots() *gtk.Widget {
49- NewCarouselIndicatorDotsPtr := xNewCarouselIndicatorDots()49+ var cls *gtk.Widget
50- if NewCarouselIndicatorDotsPtr == 0 {
51- return nil
52- }
53 50
54- gobject.IncreaseRef(NewCarouselIndicatorDotsPtr)51+ cret := xNewCarouselIndicatorDots()
55 52
56- NewCarouselIndicatorDotsCls := &gtk.Widget{}53+ if cret == 0 {
57- NewCarouselIndicatorDotsCls.Ptr = NewCarouselIndicatorDotsPtr54+ return cls
58- return NewCarouselIndicatorDotsCls55+ }
56+ gobject.IncreaseRef(cret)
57+ cls = &gtk.Widget{}
58+ cls.Ptr = cret
59+ return cls
59 }60 }
60 61
61 var xCarouselIndicatorDotsGetCarousel func(uintptr) uintptr62 var xCarouselIndicatorDotsGetCarousel func(uintptr) uintptr
62 63
63 // Gets the displayed carousel.64 // Gets the displayed carousel.
64 func (x *CarouselIndicatorDots) GetCarousel() *Carousel {65 func (x *CarouselIndicatorDots) GetCarousel() *Carousel {
66+ var cls *Carousel
65 67
66- GetCarouselPtr := xCarouselIndicatorDotsGetCarousel(x.GoPointer())68+ cret := xCarouselIndicatorDotsGetCarousel(x.GoPointer())
67- if GetCarouselPtr == 0 {
68- return nil
69- }
70-
71- gobject.IncreaseRef(GetCarouselPtr)
72-
73- GetCarouselCls := &Carousel{}
74- GetCarouselCls.Ptr = GetCarouselPtr
75- return GetCarouselCls
76 69
70+ if cret == 0 {
71+ return cls
72+ }
73+ gobject.IncreaseRef(cret)
74+ cls = &Carousel{}
75+ cls.Ptr = cret
76+ return cls
77 }77 }
78 78
79 var xCarouselIndicatorDotsSetCarousel func(uintptr, uintptr)79 var xCarouselIndicatorDotsSetCarousel func(uintptr, uintptr)
@@ -96,8 +96,8 @@ func (c *CarouselIndicatorDots) SetGoPointer(ptr uintptr) {
96 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.96 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
97 func (x *CarouselIndicatorDots) GetAccessibleRole() gtk.AccessibleRole {97 func (x *CarouselIndicatorDots) GetAccessibleRole() gtk.AccessibleRole {
98 98
99- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())99+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
100-100+ return cret
101 }101 }
102 102
103 // Resets the accessible @property to its default value.103 // Resets the accessible @property to its default value.
@@ -232,15 +232,15 @@ func (x *CarouselIndicatorDots) UpdateStateValue(NStatesVar int, StatesVar uintp
232 // of the <object> tag used to construct the @buildable.232 // of the <object> tag used to construct the @buildable.
233 func (x *CarouselIndicatorDots) GetBuildableId() string {233 func (x *CarouselIndicatorDots) GetBuildableId() string {
234 234
235- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())235+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
236-236+ return cret
237 }237 }
238 238
239 // Retrieves the orientation of the @orientable.239 // Retrieves the orientation of the @orientable.
240 func (x *CarouselIndicatorDots) GetOrientation() gtk.Orientation {240 func (x *CarouselIndicatorDots) GetOrientation() gtk.Orientation {
241 241
242- return gtk.XGtkOrientableGetOrientation(x.GoPointer())242+ cret := gtk.XGtkOrientableGetOrientation(x.GoPointer())
243-243+ return cret
244 }244 }
245 245
246 // Sets the orientation of the @orientable.246 // Sets the orientation of the @orientable.
M v4/adw/adw-carousel-indicator-lines.go +24 -24
@@ -45,34 +45,34 @@ var xNewCarouselIndicatorLines func() uintptr
45 45
46 // Creates a new `AdwCarouselIndicatorLines`.46 // Creates a new `AdwCarouselIndicatorLines`.
47 func NewCarouselIndicatorLines() *gtk.Widget {47 func NewCarouselIndicatorLines() *gtk.Widget {
48- NewCarouselIndicatorLinesPtr := xNewCarouselIndicatorLines()48+ var cls *gtk.Widget
49- if NewCarouselIndicatorLinesPtr == 0 {
50- return nil
51- }
52 49
53- gobject.IncreaseRef(NewCarouselIndicatorLinesPtr)50+ cret := xNewCarouselIndicatorLines()
54 51
55- NewCarouselIndicatorLinesCls := &gtk.Widget{}52+ if cret == 0 {
56- NewCarouselIndicatorLinesCls.Ptr = NewCarouselIndicatorLinesPtr53+ return cls
57- return NewCarouselIndicatorLinesCls54+ }
55+ gobject.IncreaseRef(cret)
56+ cls = &gtk.Widget{}
57+ cls.Ptr = cret
58+ return cls
58 }59 }
59 60
60 var xCarouselIndicatorLinesGetCarousel func(uintptr) uintptr61 var xCarouselIndicatorLinesGetCarousel func(uintptr) uintptr
61 62
62 // Gets the displayed carousel.63 // Gets the displayed carousel.
63 func (x *CarouselIndicatorLines) GetCarousel() *Carousel {64 func (x *CarouselIndicatorLines) GetCarousel() *Carousel {
65+ var cls *Carousel
64 66
65- GetCarouselPtr := xCarouselIndicatorLinesGetCarousel(x.GoPointer())67+ cret := xCarouselIndicatorLinesGetCarousel(x.GoPointer())
66- if GetCarouselPtr == 0 {
67- return nil
68- }
69-
70- gobject.IncreaseRef(GetCarouselPtr)
71-
72- GetCarouselCls := &Carousel{}
73- GetCarouselCls.Ptr = GetCarouselPtr
74- return GetCarouselCls
75 68
69+ if cret == 0 {
70+ return cls
71+ }
72+ gobject.IncreaseRef(cret)
73+ cls = &Carousel{}
74+ cls.Ptr = cret
75+ return cls
76 }76 }
77 77
78 var xCarouselIndicatorLinesSetCarousel func(uintptr, uintptr)78 var xCarouselIndicatorLinesSetCarousel func(uintptr, uintptr)
@@ -95,8 +95,8 @@ func (c *CarouselIndicatorLines) SetGoPointer(ptr uintptr) {
95 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.95 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
96 func (x *CarouselIndicatorLines) GetAccessibleRole() gtk.AccessibleRole {96 func (x *CarouselIndicatorLines) GetAccessibleRole() gtk.AccessibleRole {
97 97
98- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())98+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
99-99+ return cret
100 }100 }
101 101
102 // Resets the accessible @property to its default value.102 // Resets the accessible @property to its default value.
@@ -231,15 +231,15 @@ func (x *CarouselIndicatorLines) UpdateStateValue(NStatesVar int, StatesVar uint
231 // of the <object> tag used to construct the @buildable.231 // of the <object> tag used to construct the @buildable.
232 func (x *CarouselIndicatorLines) GetBuildableId() string {232 func (x *CarouselIndicatorLines) GetBuildableId() string {
233 233
234- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())234+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
235-235+ return cret
236 }236 }
237 237
238 // Retrieves the orientation of the @orientable.238 // Retrieves the orientation of the @orientable.
239 func (x *CarouselIndicatorLines) GetOrientation() gtk.Orientation {239 func (x *CarouselIndicatorLines) GetOrientation() gtk.Orientation {
240 240
241- return gtk.XGtkOrientableGetOrientation(x.GoPointer())241+ cret := gtk.XGtkOrientableGetOrientation(x.GoPointer())
242-242+ return cret
243 }243 }
244 244
245 // Sets the orientation of the @orientable.245 // Sets the orientation of the @orientable.
M v4/adw/adw-carousel.go +50 -50
@@ -45,16 +45,17 @@ var xNewCarousel func() uintptr
45 45
46 // Creates a new `AdwCarousel`.46 // Creates a new `AdwCarousel`.
47 func NewCarousel() *gtk.Widget {47 func NewCarousel() *gtk.Widget {
48- NewCarouselPtr := xNewCarousel()48+ var cls *gtk.Widget
49- if NewCarouselPtr == 0 {
50- return nil
51- }
52 49
53- gobject.IncreaseRef(NewCarouselPtr)50+ cret := xNewCarousel()
54 51
55- NewCarouselCls := &gtk.Widget{}52+ if cret == 0 {
56- NewCarouselCls.Ptr = NewCarouselPtr53+ return cls
57- return NewCarouselCls54+ }
55+ gobject.IncreaseRef(cret)
56+ cls = &gtk.Widget{}
57+ cls.Ptr = cret
58+ return cls
58 }59 }
59 60
60 var xCarouselAppend func(uintptr, uintptr)61 var xCarouselAppend func(uintptr, uintptr)
@@ -71,8 +72,8 @@ var xCarouselGetAllowLongSwipes func(uintptr) bool
71 // Gets whether to allow swiping for more than one page at a time.72 // Gets whether to allow swiping for more than one page at a time.
72 func (x *Carousel) GetAllowLongSwipes() bool {73 func (x *Carousel) GetAllowLongSwipes() bool {
73 74
74- return xCarouselGetAllowLongSwipes(x.GoPointer())75+ cret := xCarouselGetAllowLongSwipes(x.GoPointer())
75-76+ return cret
76 }77 }
77 78
78 var xCarouselGetAllowMouseDrag func(uintptr) bool79 var xCarouselGetAllowMouseDrag func(uintptr) bool
@@ -80,8 +81,8 @@ var xCarouselGetAllowMouseDrag func(uintptr) bool
80 // Sets whether @self can be dragged with mouse pointer.81 // Sets whether @self can be dragged with mouse pointer.
81 func (x *Carousel) GetAllowMouseDrag() bool {82 func (x *Carousel) GetAllowMouseDrag() bool {
82 83
83- return xCarouselGetAllowMouseDrag(x.GoPointer())84+ cret := xCarouselGetAllowMouseDrag(x.GoPointer())
84-85+ return cret
85 }86 }
86 87
87 var xCarouselGetAllowScrollWheel func(uintptr) bool88 var xCarouselGetAllowScrollWheel func(uintptr) bool
@@ -89,8 +90,8 @@ var xCarouselGetAllowScrollWheel func(uintptr) bool
89 // Gets whether @self will respond to scroll wheel events.90 // Gets whether @self will respond to scroll wheel events.
90 func (x *Carousel) GetAllowScrollWheel() bool {91 func (x *Carousel) GetAllowScrollWheel() bool {
91 92
92- return xCarouselGetAllowScrollWheel(x.GoPointer())93+ cret := xCarouselGetAllowScrollWheel(x.GoPointer())
93-94+ return cret
94 }95 }
95 96
96 var xCarouselGetInteractive func(uintptr) bool97 var xCarouselGetInteractive func(uintptr) bool
@@ -98,8 +99,8 @@ var xCarouselGetInteractive func(uintptr) bool
98 // Gets whether @self can be navigated.99 // Gets whether @self can be navigated.
99 func (x *Carousel) GetInteractive() bool {100 func (x *Carousel) GetInteractive() bool {
100 101
101- return xCarouselGetInteractive(x.GoPointer())102+ cret := xCarouselGetInteractive(x.GoPointer())
102-103+ return cret
103 }104 }
104 105
105 var xCarouselGetNPages func(uintptr) uint106 var xCarouselGetNPages func(uintptr) uint
@@ -107,26 +108,25 @@ var xCarouselGetNPages func(uintptr) uint
107 // Gets the number of pages in @self.108 // Gets the number of pages in @self.
108 func (x *Carousel) GetNPages() uint {109 func (x *Carousel) GetNPages() uint {
109 110
110- return xCarouselGetNPages(x.GoPointer())111+ cret := xCarouselGetNPages(x.GoPointer())
111-112+ return cret
112 }113 }
113 114
114 var xCarouselGetNthPage func(uintptr, uint) uintptr115 var xCarouselGetNthPage func(uintptr, uint) uintptr
115 116
116 // Gets the page at position @n.117 // Gets the page at position @n.
117 func (x *Carousel) GetNthPage(NVar uint) *gtk.Widget {118 func (x *Carousel) GetNthPage(NVar uint) *gtk.Widget {
119+ var cls *gtk.Widget
118 120
119- GetNthPagePtr := xCarouselGetNthPage(x.GoPointer(), NVar)121+ cret := xCarouselGetNthPage(x.GoPointer(), NVar)
120- if GetNthPagePtr == 0 {
121- return nil
122- }
123-
124- gobject.IncreaseRef(GetNthPagePtr)
125-
126- GetNthPageCls := &gtk.Widget{}
127- GetNthPageCls.Ptr = GetNthPagePtr
128- return GetNthPageCls
129 122
123+ if cret == 0 {
124+ return cls
125+ }
126+ gobject.IncreaseRef(cret)
127+ cls = &gtk.Widget{}
128+ cls.Ptr = cret
129+ return cls
130 }130 }
131 131
132 var xCarouselGetPosition func(uintptr) float64132 var xCarouselGetPosition func(uintptr) float64
@@ -136,8 +136,8 @@ var xCarouselGetPosition func(uintptr) float64
136 // 1 matches 1 page. Use [method@Carousel.scroll_to] for changing it.136 // 1 matches 1 page. Use [method@Carousel.scroll_to] for changing it.
137 func (x *Carousel) GetPosition() float64 {137 func (x *Carousel) GetPosition() float64 {
138 138
139- return xCarouselGetPosition(x.GoPointer())139+ cret := xCarouselGetPosition(x.GoPointer())
140-140+ return cret
141 }141 }
142 142
143 var xCarouselGetRevealDuration func(uintptr) uint143 var xCarouselGetRevealDuration func(uintptr) uint
@@ -145,8 +145,8 @@ var xCarouselGetRevealDuration func(uintptr) uint
145 // Gets the page reveal duration, in milliseconds.145 // Gets the page reveal duration, in milliseconds.
146 func (x *Carousel) GetRevealDuration() uint {146 func (x *Carousel) GetRevealDuration() uint {
147 147
148- return xCarouselGetRevealDuration(x.GoPointer())148+ cret := xCarouselGetRevealDuration(x.GoPointer())
149-149+ return cret
150 }150 }
151 151
152 var xCarouselGetScrollParams func(uintptr) *SpringParams152 var xCarouselGetScrollParams func(uintptr) *SpringParams
@@ -154,8 +154,8 @@ var xCarouselGetScrollParams func(uintptr) *SpringParams
154 // Gets the scroll animation spring parameters for @self.154 // Gets the scroll animation spring parameters for @self.
155 func (x *Carousel) GetScrollParams() *SpringParams {155 func (x *Carousel) GetScrollParams() *SpringParams {
156 156
157- return xCarouselGetScrollParams(x.GoPointer())157+ cret := xCarouselGetScrollParams(x.GoPointer())
158-158+ return cret
159 }159 }
160 160
161 var xCarouselGetSpacing func(uintptr) uint161 var xCarouselGetSpacing func(uintptr) uint
@@ -163,8 +163,8 @@ var xCarouselGetSpacing func(uintptr) uint
163 // Gets spacing between pages in pixels.163 // Gets spacing between pages in pixels.
164 func (x *Carousel) GetSpacing() uint {164 func (x *Carousel) GetSpacing() uint {
165 165
166- return xCarouselGetSpacing(x.GoPointer())166+ cret := xCarouselGetSpacing(x.GoPointer())
167-167+ return cret
168 }168 }
169 169
170 var xCarouselInsert func(uintptr, uintptr, int)170 var xCarouselInsert func(uintptr, uintptr, int)
@@ -328,8 +328,8 @@ func (x *Carousel) ConnectPageChanged(cb func(Carousel, uint)) {
328 // Gets the progress @self will snap back to after the gesture is canceled.328 // Gets the progress @self will snap back to after the gesture is canceled.
329 func (x *Carousel) GetCancelProgress() float64 {329 func (x *Carousel) GetCancelProgress() float64 {
330 330
331- return XAdwSwipeableGetCancelProgress(x.GoPointer())331+ cret := XAdwSwipeableGetCancelProgress(x.GoPointer())
332-332+ return cret
333 }333 }
334 334
335 // Gets the swipe distance of @self.335 // Gets the swipe distance of @self.
@@ -337,15 +337,15 @@ func (x *Carousel) GetCancelProgress() float64 {
337 // This corresponds to how many pixels 1 unit represents.337 // This corresponds to how many pixels 1 unit represents.
338 func (x *Carousel) GetDistance() float64 {338 func (x *Carousel) GetDistance() float64 {
339 339
340- return XAdwSwipeableGetDistance(x.GoPointer())340+ cret := XAdwSwipeableGetDistance(x.GoPointer())
341-341+ return cret
342 }342 }
343 343
344 // Gets the current progress of @self.344 // Gets the current progress of @self.
345 func (x *Carousel) GetProgress() float64 {345 func (x *Carousel) GetProgress() float64 {
346 346
347- return XAdwSwipeableGetProgress(x.GoPointer())347+ cret := XAdwSwipeableGetProgress(x.GoPointer())
348-348+ return cret
349 }349 }
350 350
351 // Gets the snap points of @self.351 // Gets the snap points of @self.
@@ -354,8 +354,8 @@ func (x *Carousel) GetProgress() float64 {
354 // end the swipe on.354 // end the swipe on.
355 func (x *Carousel) GetSnapPoints(NSnapPointsVar int) uintptr {355 func (x *Carousel) GetSnapPoints(NSnapPointsVar int) uintptr {
356 356
357- return XAdwSwipeableGetSnapPoints(x.GoPointer(), NSnapPointsVar)357+ cret := XAdwSwipeableGetSnapPoints(x.GoPointer(), NSnapPointsVar)
358-358+ return cret
359 }359 }
360 360
361 // Gets the area @self can start a swipe from for the given direction and361 // Gets the area @self can start a swipe from for the given direction and
@@ -376,8 +376,8 @@ func (x *Carousel) GetSwipeArea(NavigationDirectionVar NavigationDirection, IsDr
376 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.376 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
377 func (x *Carousel) GetAccessibleRole() gtk.AccessibleRole {377 func (x *Carousel) GetAccessibleRole() gtk.AccessibleRole {
378 378
379- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())379+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
380-380+ return cret
381 }381 }
382 382
383 // Resets the accessible @property to its default value.383 // Resets the accessible @property to its default value.
@@ -512,15 +512,15 @@ func (x *Carousel) UpdateStateValue(NStatesVar int, StatesVar uintptr, ValuesVar
512 // of the <object> tag used to construct the @buildable.512 // of the <object> tag used to construct the @buildable.
513 func (x *Carousel) GetBuildableId() string {513 func (x *Carousel) GetBuildableId() string {
514 514
515- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())515+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
516-516+ return cret
517 }517 }
518 518
519 // Retrieves the orientation of the @orientable.519 // Retrieves the orientation of the @orientable.
520 func (x *Carousel) GetOrientation() gtk.Orientation {520 func (x *Carousel) GetOrientation() gtk.Orientation {
521 521
522- return gtk.XGtkOrientableGetOrientation(x.GoPointer())522+ cret := gtk.XGtkOrientableGetOrientation(x.GoPointer())
523-523+ return cret
524 }524 }
525 525
526 // Sets the orientation of the @orientable.526 // Sets the orientation of the @orientable.
M v4/adw/adw-clamp-layout.go +15 -13
@@ -51,14 +51,16 @@ var xNewClampLayout func() uintptr
51 51
52 // Creates a new `AdwClampLayout`.52 // Creates a new `AdwClampLayout`.
53 func NewClampLayout() *gtk.LayoutManager {53 func NewClampLayout() *gtk.LayoutManager {
54- NewClampLayoutPtr := xNewClampLayout()54+ var cls *gtk.LayoutManager
55- if NewClampLayoutPtr == 0 {55+
56- return nil56+ cret := xNewClampLayout()
57- }
58 57
59- NewClampLayoutCls := &gtk.LayoutManager{}58+ if cret == 0 {
60- NewClampLayoutCls.Ptr = NewClampLayoutPtr59+ return cls
61- return NewClampLayoutCls60+ }
61+ cls = &gtk.LayoutManager{}
62+ cls.Ptr = cret
63+ return cls
62 }64 }
63 65
64 var xClampLayoutGetMaximumSize func(uintptr) int66 var xClampLayoutGetMaximumSize func(uintptr) int
@@ -66,8 +68,8 @@ var xClampLayoutGetMaximumSize func(uintptr) int
66 // Gets the maximum size allocated to the children.68 // Gets the maximum size allocated to the children.
67 func (x *ClampLayout) GetMaximumSize() int {69 func (x *ClampLayout) GetMaximumSize() int {
68 70
69- return xClampLayoutGetMaximumSize(x.GoPointer())71+ cret := xClampLayoutGetMaximumSize(x.GoPointer())
70-72+ return cret
71 }73 }
72 74
73 var xClampLayoutGetTighteningThreshold func(uintptr) int75 var xClampLayoutGetTighteningThreshold func(uintptr) int
@@ -75,8 +77,8 @@ var xClampLayoutGetTighteningThreshold func(uintptr) int
75 // Gets the size above which the children are clamped.77 // Gets the size above which the children are clamped.
76 func (x *ClampLayout) GetTighteningThreshold() int {78 func (x *ClampLayout) GetTighteningThreshold() int {
77 79
78- return xClampLayoutGetTighteningThreshold(x.GoPointer())80+ cret := xClampLayoutGetTighteningThreshold(x.GoPointer())
79-81+ return cret
80 }82 }
81 83
82 var xClampLayoutSetMaximumSize func(uintptr, int)84 var xClampLayoutSetMaximumSize func(uintptr, int)
@@ -123,8 +125,8 @@ func (c *ClampLayout) SetGoPointer(ptr uintptr) {
123 // Retrieves the orientation of the @orientable.125 // Retrieves the orientation of the @orientable.
124 func (x *ClampLayout) GetOrientation() gtk.Orientation {126 func (x *ClampLayout) GetOrientation() gtk.Orientation {
125 127
126- return gtk.XGtkOrientableGetOrientation(x.GoPointer())128+ cret := gtk.XGtkOrientableGetOrientation(x.GoPointer())
127-129+ return cret
128 }130 }
129 131
130 // Sets the orientation of the @orientable.132 // Sets the orientation of the @orientable.
M v4/adw/adw-clamp-scrollable.go +52 -54
@@ -33,34 +33,34 @@ var xNewClampScrollable func() uintptr
33 33
34 // Creates a new `AdwClampScrollable`.34 // Creates a new `AdwClampScrollable`.
35 func NewClampScrollable() *gtk.Widget {35 func NewClampScrollable() *gtk.Widget {
36- NewClampScrollablePtr := xNewClampScrollable()36+ var cls *gtk.Widget
37- if NewClampScrollablePtr == 0 {
38- return nil
39- }
40 37
41- gobject.IncreaseRef(NewClampScrollablePtr)38+ cret := xNewClampScrollable()
42 39
43- NewClampScrollableCls := &gtk.Widget{}40+ if cret == 0 {
44- NewClampScrollableCls.Ptr = NewClampScrollablePtr41+ return cls
45- return NewClampScrollableCls42+ }
43+ gobject.IncreaseRef(cret)
44+ cls = &gtk.Widget{}
45+ cls.Ptr = cret
46+ return cls
46 }47 }
47 48
48 var xClampScrollableGetChild func(uintptr) uintptr49 var xClampScrollableGetChild func(uintptr) uintptr
49 50
50 // Gets the child widget of @self.51 // Gets the child widget of @self.
51 func (x *ClampScrollable) GetChild() *gtk.Widget {52 func (x *ClampScrollable) GetChild() *gtk.Widget {
53+ var cls *gtk.Widget
52 54
53- GetChildPtr := xClampScrollableGetChild(x.GoPointer())55+ cret := xClampScrollableGetChild(x.GoPointer())
54- if GetChildPtr == 0 {
55- return nil
56- }
57-
58- gobject.IncreaseRef(GetChildPtr)
59-
60- GetChildCls := &gtk.Widget{}
61- GetChildCls.Ptr = GetChildPtr
62- return GetChildCls
63 56
57+ if cret == 0 {
58+ return cls
59+ }
60+ gobject.IncreaseRef(cret)
61+ cls = &gtk.Widget{}
62+ cls.Ptr = cret
63+ return cls
64 }64 }
65 65
66 var xClampScrollableGetMaximumSize func(uintptr) int66 var xClampScrollableGetMaximumSize func(uintptr) int
@@ -68,8 +68,8 @@ var xClampScrollableGetMaximumSize func(uintptr) int
68 // Gets the maximum size allocated to the child.68 // Gets the maximum size allocated to the child.
69 func (x *ClampScrollable) GetMaximumSize() int {69 func (x *ClampScrollable) GetMaximumSize() int {
70 70
71- return xClampScrollableGetMaximumSize(x.GoPointer())71+ cret := xClampScrollableGetMaximumSize(x.GoPointer())
72-72+ return cret
73 }73 }
74 74
75 var xClampScrollableGetTighteningThreshold func(uintptr) int75 var xClampScrollableGetTighteningThreshold func(uintptr) int
@@ -77,8 +77,8 @@ var xClampScrollableGetTighteningThreshold func(uintptr) int
77 // Gets the size above which the child is clamped.77 // Gets the size above which the child is clamped.
78 func (x *ClampScrollable) GetTighteningThreshold() int {78 func (x *ClampScrollable) GetTighteningThreshold() int {
79 79
80- return xClampScrollableGetTighteningThreshold(x.GoPointer())80+ cret := xClampScrollableGetTighteningThreshold(x.GoPointer())
81-81+ return cret
82 }82 }
83 83
84 var xClampScrollableSetChild func(uintptr, uintptr)84 var xClampScrollableSetChild func(uintptr, uintptr)
@@ -134,8 +134,8 @@ func (c *ClampScrollable) SetGoPointer(ptr uintptr) {
134 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.134 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
135 func (x *ClampScrollable) GetAccessibleRole() gtk.AccessibleRole {135 func (x *ClampScrollable) GetAccessibleRole() gtk.AccessibleRole {
136 136
137- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())137+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
138-138+ return cret
139 }139 }
140 140
141 // Resets the accessible @property to its default value.141 // Resets the accessible @property to its default value.
@@ -270,15 +270,15 @@ func (x *ClampScrollable) UpdateStateValue(NStatesVar int, StatesVar uintptr, Va
270 // of the <object> tag used to construct the @buildable.270 // of the <object> tag used to construct the @buildable.
271 func (x *ClampScrollable) GetBuildableId() string {271 func (x *ClampScrollable) GetBuildableId() string {
272 272
273- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())273+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
274-274+ return cret
275 }275 }
276 276
277 // Retrieves the orientation of the @orientable.277 // Retrieves the orientation of the @orientable.
278 func (x *ClampScrollable) GetOrientation() gtk.Orientation {278 func (x *ClampScrollable) GetOrientation() gtk.Orientation {
279 279
280- return gtk.XGtkOrientableGetOrientation(x.GoPointer())280+ cret := gtk.XGtkOrientableGetOrientation(x.GoPointer())
281-281+ return cret
282 }282 }
283 283
284 // Sets the orientation of the @orientable.284 // Sets the orientation of the @orientable.
@@ -296,54 +296,52 @@ func (x *ClampScrollable) SetOrientation(OrientationVar gtk.Orientation) {
296 // overshoot indication, at the right position.296 // overshoot indication, at the right position.
297 func (x *ClampScrollable) GetBorder(BorderVar *gtk.Border) bool {297 func (x *ClampScrollable) GetBorder(BorderVar *gtk.Border) bool {
298 298
299- return gtk.XGtkScrollableGetBorder(x.GoPointer(), BorderVar)299+ cret := gtk.XGtkScrollableGetBorder(x.GoPointer(), BorderVar)
300-300+ return cret
301 }301 }
302 302
303 // Retrieves the `GtkAdjustment` used for horizontal scrolling.303 // Retrieves the `GtkAdjustment` used for horizontal scrolling.
304 func (x *ClampScrollable) GetHadjustment() *gtk.Adjustment {304 func (x *ClampScrollable) GetHadjustment() *gtk.Adjustment {
305+ var cls *gtk.Adjustment
305 306
306- GetHadjustmentPtr := gtk.XGtkScrollableGetHadjustment(x.GoPointer())307+ cret := gtk.XGtkScrollableGetHadjustment(x.GoPointer())
307- if GetHadjustmentPtr == 0 {
308- return nil
309- }
310-
311- gobject.IncreaseRef(GetHadjustmentPtr)
312-
313- GetHadjustmentCls := &gtk.Adjustment{}
314- GetHadjustmentCls.Ptr = GetHadjustmentPtr
315- return GetHadjustmentCls
316 308
309+ if cret == 0 {
310+ return cls
311+ }
312+ gobject.IncreaseRef(cret)
313+ cls = &gtk.Adjustment{}
314+ cls.Ptr = cret
315+ return cls
317 }316 }
318 317
319 // Gets the horizontal `GtkScrollablePolicy`.318 // Gets the horizontal `GtkScrollablePolicy`.
320 func (x *ClampScrollable) GetHscrollPolicy() gtk.ScrollablePolicy {319 func (x *ClampScrollable) GetHscrollPolicy() gtk.ScrollablePolicy {
321 320
322- return gtk.XGtkScrollableGetHscrollPolicy(x.GoPointer())321+ cret := gtk.XGtkScrollableGetHscrollPolicy(x.GoPointer())
323-322+ return cret
324 }323 }
325 324
326 // Retrieves the `GtkAdjustment` used for vertical scrolling.325 // Retrieves the `GtkAdjustment` used for vertical scrolling.
327 func (x *ClampScrollable) GetVadjustment() *gtk.Adjustment {326 func (x *ClampScrollable) GetVadjustment() *gtk.Adjustment {
327+ var cls *gtk.Adjustment
328 328
329- GetVadjustmentPtr := gtk.XGtkScrollableGetVadjustment(x.GoPointer())329+ cret := gtk.XGtkScrollableGetVadjustment(x.GoPointer())
330- if GetVadjustmentPtr == 0 {
331- return nil
332- }
333-
334- gobject.IncreaseRef(GetVadjustmentPtr)
335-
336- GetVadjustmentCls := &gtk.Adjustment{}
337- GetVadjustmentCls.Ptr = GetVadjustmentPtr
338- return GetVadjustmentCls
339 330
331+ if cret == 0 {
332+ return cls
333+ }
334+ gobject.IncreaseRef(cret)
335+ cls = &gtk.Adjustment{}
336+ cls.Ptr = cret
337+ return cls
340 }338 }
341 339
342 // Gets the vertical `GtkScrollablePolicy`.340 // Gets the vertical `GtkScrollablePolicy`.
343 func (x *ClampScrollable) GetVscrollPolicy() gtk.ScrollablePolicy {341 func (x *ClampScrollable) GetVscrollPolicy() gtk.ScrollablePolicy {
344 342
345- return gtk.XGtkScrollableGetVscrollPolicy(x.GoPointer())343+ cret := gtk.XGtkScrollableGetVscrollPolicy(x.GoPointer())
346-344+ return cret
347 }345 }
348 346
349 // Sets the horizontal adjustment of the `GtkScrollable`.347 // Sets the horizontal adjustment of the `GtkScrollable`.
M v4/adw/adw-clamp.go +28 -28
@@ -56,34 +56,34 @@ var xNewClamp func() uintptr
56 56
57 // Creates a new `AdwClamp`.57 // Creates a new `AdwClamp`.
58 func NewClamp() *gtk.Widget {58 func NewClamp() *gtk.Widget {
59- NewClampPtr := xNewClamp()59+ var cls *gtk.Widget
60- if NewClampPtr == 0 {
61- return nil
62- }
63 60
64- gobject.IncreaseRef(NewClampPtr)61+ cret := xNewClamp()
65 62
66- NewClampCls := &gtk.Widget{}63+ if cret == 0 {
67- NewClampCls.Ptr = NewClampPtr64+ return cls
68- return NewClampCls65+ }
66+ gobject.IncreaseRef(cret)
67+ cls = &gtk.Widget{}
68+ cls.Ptr = cret
69+ return cls
69 }70 }
70 71
71 var xClampGetChild func(uintptr) uintptr72 var xClampGetChild func(uintptr) uintptr
72 73
73 // Gets the child widget of @self.74 // Gets the child widget of @self.
74 func (x *Clamp) GetChild() *gtk.Widget {75 func (x *Clamp) GetChild() *gtk.Widget {
76+ var cls *gtk.Widget
75 77
76- GetChildPtr := xClampGetChild(x.GoPointer())78+ cret := xClampGetChild(x.GoPointer())
77- if GetChildPtr == 0 {
78- return nil
79- }
80-
81- gobject.IncreaseRef(GetChildPtr)
82-
83- GetChildCls := &gtk.Widget{}
84- GetChildCls.Ptr = GetChildPtr
85- return GetChildCls
86 79
80+ if cret == 0 {
81+ return cls
82+ }
83+ gobject.IncreaseRef(cret)
84+ cls = &gtk.Widget{}
85+ cls.Ptr = cret
86+ return cls
87 }87 }
88 88
89 var xClampGetMaximumSize func(uintptr) int89 var xClampGetMaximumSize func(uintptr) int
@@ -91,8 +91,8 @@ var xClampGetMaximumSize func(uintptr) int
91 // Gets the maximum size allocated to the child.91 // Gets the maximum size allocated to the child.
92 func (x *Clamp) GetMaximumSize() int {92 func (x *Clamp) GetMaximumSize() int {
93 93
94- return xClampGetMaximumSize(x.GoPointer())94+ cret := xClampGetMaximumSize(x.GoPointer())
95-95+ return cret
96 }96 }
97 97
98 var xClampGetTighteningThreshold func(uintptr) int98 var xClampGetTighteningThreshold func(uintptr) int
@@ -100,8 +100,8 @@ var xClampGetTighteningThreshold func(uintptr) int
100 // Gets the size above which the child is clamped.100 // Gets the size above which the child is clamped.
101 func (x *Clamp) GetTighteningThreshold() int {101 func (x *Clamp) GetTighteningThreshold() int {
102 102
103- return xClampGetTighteningThreshold(x.GoPointer())103+ cret := xClampGetTighteningThreshold(x.GoPointer())
104-104+ return cret
105 }105 }
106 106
107 var xClampSetChild func(uintptr, uintptr)107 var xClampSetChild func(uintptr, uintptr)
@@ -157,8 +157,8 @@ func (c *Clamp) SetGoPointer(ptr uintptr) {
157 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.157 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
158 func (x *Clamp) GetAccessibleRole() gtk.AccessibleRole {158 func (x *Clamp) GetAccessibleRole() gtk.AccessibleRole {
159 159
160- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())160+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
161-161+ return cret
162 }162 }
163 163
164 // Resets the accessible @property to its default value.164 // Resets the accessible @property to its default value.
@@ -293,15 +293,15 @@ func (x *Clamp) UpdateStateValue(NStatesVar int, StatesVar uintptr, ValuesVar ui
293 // of the <object> tag used to construct the @buildable.293 // of the <object> tag used to construct the @buildable.
294 func (x *Clamp) GetBuildableId() string {294 func (x *Clamp) GetBuildableId() string {
295 295
296- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())296+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
297-297+ return cret
298 }298 }
299 299
300 // Retrieves the orientation of the @orientable.300 // Retrieves the orientation of the @orientable.
301 func (x *Clamp) GetOrientation() gtk.Orientation {301 func (x *Clamp) GetOrientation() gtk.Orientation {
302 302
303- return gtk.XGtkOrientableGetOrientation(x.GoPointer())303+ cret := gtk.XGtkOrientableGetOrientation(x.GoPointer())
304-304+ return cret
305 }305 }
306 306
307 // Sets the orientation of the @orientable.307 // Sets the orientation of the @orientable.
M v4/adw/adw-combo-row.go +66 -70
@@ -81,88 +81,85 @@ var xNewComboRow func() uintptr
81 81
82 // Creates a new `AdwComboRow`.82 // Creates a new `AdwComboRow`.
83 func NewComboRow() *gtk.Widget {83 func NewComboRow() *gtk.Widget {
84- NewComboRowPtr := xNewComboRow()84+ var cls *gtk.Widget
85- if NewComboRowPtr == 0 {
86- return nil
87- }
88 85
89- gobject.IncreaseRef(NewComboRowPtr)86+ cret := xNewComboRow()
90 87
91- NewComboRowCls := &gtk.Widget{}88+ if cret == 0 {
92- NewComboRowCls.Ptr = NewComboRowPtr89+ return cls
93- return NewComboRowCls90+ }
91+ gobject.IncreaseRef(cret)
92+ cls = &gtk.Widget{}
93+ cls.Ptr = cret
94+ return cls
94 }95 }
95 96
96 var xComboRowGetExpression func(uintptr) uintptr97 var xComboRowGetExpression func(uintptr) uintptr
97 98
98 // Gets the expression used to obtain strings from items.99 // Gets the expression used to obtain strings from items.
99 func (x *ComboRow) GetExpression() *gtk.Expression {100 func (x *ComboRow) GetExpression() *gtk.Expression {
101+ var cls *gtk.Expression
100 102
101- GetExpressionPtr := xComboRowGetExpression(x.GoPointer())103+ cret := xComboRowGetExpression(x.GoPointer())
102- if GetExpressionPtr == 0 {
103- return nil
104- }
105-
106- gobject.IncreaseRef(GetExpressionPtr)
107-
108- GetExpressionCls := &gtk.Expression{}
109- GetExpressionCls.Ptr = GetExpressionPtr
110- return GetExpressionCls
111 104
105+ if cret == 0 {
106+ return cls
107+ }
108+ gobject.IncreaseRef(cret)
109+ cls = &gtk.Expression{}
110+ cls.Ptr = cret
111+ return cls
112 }112 }
113 113
114 var xComboRowGetFactory func(uintptr) uintptr114 var xComboRowGetFactory func(uintptr) uintptr
115 115
116 // Gets the factory for populating list items.116 // Gets the factory for populating list items.
117 func (x *ComboRow) GetFactory() *gtk.ListItemFactory {117 func (x *ComboRow) GetFactory() *gtk.ListItemFactory {
118+ var cls *gtk.ListItemFactory
118 119
119- GetFactoryPtr := xComboRowGetFactory(x.GoPointer())120+ cret := xComboRowGetFactory(x.GoPointer())
120- if GetFactoryPtr == 0 {
121- return nil
122- }
123-
124- gobject.IncreaseRef(GetFactoryPtr)
125-
126- GetFactoryCls := &gtk.ListItemFactory{}
127- GetFactoryCls.Ptr = GetFactoryPtr
128- return GetFactoryCls
129 121
122+ if cret == 0 {
123+ return cls
124+ }
125+ gobject.IncreaseRef(cret)
126+ cls = &gtk.ListItemFactory{}
127+ cls.Ptr = cret
128+ return cls
130 }129 }
131 130
132 var xComboRowGetListFactory func(uintptr) uintptr131 var xComboRowGetListFactory func(uintptr) uintptr
133 132
134 // Gets the factory for populating list items in the popup.133 // Gets the factory for populating list items in the popup.
135 func (x *ComboRow) GetListFactory() *gtk.ListItemFactory {134 func (x *ComboRow) GetListFactory() *gtk.ListItemFactory {
135+ var cls *gtk.ListItemFactory
136 136
137- GetListFactoryPtr := xComboRowGetListFactory(x.GoPointer())137+ cret := xComboRowGetListFactory(x.GoPointer())
138- if GetListFactoryPtr == 0 {
139- return nil
140- }
141-
142- gobject.IncreaseRef(GetListFactoryPtr)
143-
144- GetListFactoryCls := &gtk.ListItemFactory{}
145- GetListFactoryCls.Ptr = GetListFactoryPtr
146- return GetListFactoryCls
147 138
139+ if cret == 0 {
140+ return cls
141+ }
142+ gobject.IncreaseRef(cret)
143+ cls = &gtk.ListItemFactory{}
144+ cls.Ptr = cret
145+ return cls
148 }146 }
149 147
150 var xComboRowGetModel func(uintptr) uintptr148 var xComboRowGetModel func(uintptr) uintptr
151 149
152 // Gets the model that provides the displayed items.150 // Gets the model that provides the displayed items.
153 func (x *ComboRow) GetModel() *gio.ListModelBase {151 func (x *ComboRow) GetModel() *gio.ListModelBase {
152+ var cls *gio.ListModelBase
154 153
155- GetModelPtr := xComboRowGetModel(x.GoPointer())154+ cret := xComboRowGetModel(x.GoPointer())
156- if GetModelPtr == 0 {
157- return nil
158- }
159-
160- gobject.IncreaseRef(GetModelPtr)
161-
162- GetModelCls := &gio.ListModelBase{}
163- GetModelCls.Ptr = GetModelPtr
164- return GetModelCls
165 155
156+ if cret == 0 {
157+ return cls
158+ }
159+ gobject.IncreaseRef(cret)
160+ cls = &gio.ListModelBase{}
161+ cls.Ptr = cret
162+ return cls
166 }163 }
167 164
168 var xComboRowGetSelected func(uintptr) uint165 var xComboRowGetSelected func(uintptr) uint
@@ -170,26 +167,25 @@ var xComboRowGetSelected func(uintptr) uint
170 // Gets the position of the selected item.167 // Gets the position of the selected item.
171 func (x *ComboRow) GetSelected() uint {168 func (x *ComboRow) GetSelected() uint {
172 169
173- return xComboRowGetSelected(x.GoPointer())170+ cret := xComboRowGetSelected(x.GoPointer())
174-171+ return cret
175 }172 }
176 173
177 var xComboRowGetSelectedItem func(uintptr) uintptr174 var xComboRowGetSelectedItem func(uintptr) uintptr
178 175
179 // Gets the selected item.176 // Gets the selected item.
180 func (x *ComboRow) GetSelectedItem() *gobject.Object {177 func (x *ComboRow) GetSelectedItem() *gobject.Object {
178+ var cls *gobject.Object
181 179
182- GetSelectedItemPtr := xComboRowGetSelectedItem(x.GoPointer())180+ cret := xComboRowGetSelectedItem(x.GoPointer())
183- if GetSelectedItemPtr == 0 {
184- return nil
185- }
186-
187- gobject.IncreaseRef(GetSelectedItemPtr)
188-
189- GetSelectedItemCls := &gobject.Object{}
190- GetSelectedItemCls.Ptr = GetSelectedItemPtr
191- return GetSelectedItemCls
192 181
182+ if cret == 0 {
183+ return cls
184+ }
185+ gobject.IncreaseRef(cret)
186+ cls = &gobject.Object{}
187+ cls.Ptr = cret
188+ return cls
193 }189 }
194 190
195 var xComboRowGetUseSubtitle func(uintptr) bool191 var xComboRowGetUseSubtitle func(uintptr) bool
@@ -197,8 +193,8 @@ var xComboRowGetUseSubtitle func(uintptr) bool
197 // Gets whether to use the current value as the subtitle.193 // Gets whether to use the current value as the subtitle.
198 func (x *ComboRow) GetUseSubtitle() bool {194 func (x *ComboRow) GetUseSubtitle() bool {
199 195
200- return xComboRowGetUseSubtitle(x.GoPointer())196+ cret := xComboRowGetUseSubtitle(x.GoPointer())
201-197+ return cret
202 }198 }
203 199
204 var xComboRowSetExpression func(uintptr, uintptr)200 var xComboRowSetExpression func(uintptr, uintptr)
@@ -285,8 +281,8 @@ func (c *ComboRow) SetGoPointer(ptr uintptr) {
285 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.281 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
286 func (x *ComboRow) GetAccessibleRole() gtk.AccessibleRole {282 func (x *ComboRow) GetAccessibleRole() gtk.AccessibleRole {
287 283
288- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())284+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
289-285+ return cret
290 }286 }
291 287
292 // Resets the accessible @property to its default value.288 // Resets the accessible @property to its default value.
@@ -418,15 +414,15 @@ func (x *ComboRow) UpdateStateValue(NStatesVar int, StatesVar uintptr, ValuesVar
418 // Gets the action name for @actionable.414 // Gets the action name for @actionable.
419 func (x *ComboRow) GetActionName() string {415 func (x *ComboRow) GetActionName() string {
420 416
421- return gtk.XGtkActionableGetActionName(x.GoPointer())417+ cret := gtk.XGtkActionableGetActionName(x.GoPointer())
422-418+ return cret
423 }419 }
424 420
425 // Gets the current target value of @actionable.421 // Gets the current target value of @actionable.
426 func (x *ComboRow) GetActionTargetValue() *glib.Variant {422 func (x *ComboRow) GetActionTargetValue() *glib.Variant {
427 423
428- return gtk.XGtkActionableGetActionTargetValue(x.GoPointer())424+ cret := gtk.XGtkActionableGetActionTargetValue(x.GoPointer())
429-425+ return cret
430 }426 }
431 427
432 // Specifies the name of the action with which this widget should be428 // Specifies the name of the action with which this widget should be
@@ -504,8 +500,8 @@ func (x *ComboRow) SetDetailedActionName(DetailedActionNameVar string) {
504 // of the <object> tag used to construct the @buildable.500 // of the <object> tag used to construct the @buildable.
505 func (x *ComboRow) GetBuildableId() string {501 func (x *ComboRow) GetBuildableId() string {
506 502
507- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())503+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
508-504+ return cret
509 }505 }
510 506
511 func init() {507 func init() {
M v4/adw/adw-easing.go +2 -2
@@ -100,8 +100,8 @@ var xEasingEase func(Easing, float64) float64
100 // @value should generally be in the [0, 1] range.100 // @value should generally be in the [0, 1] range.
101 func EasingEase(SelfVar Easing, ValueVar float64) float64 {101 func EasingEase(SelfVar Easing, ValueVar float64) float64 {
102 102
103- return xEasingEase(SelfVar, ValueVar)103+ cret := xEasingEase(SelfVar, ValueVar)
104-104+ return cret
105 }105 }
106 106
107 func init() {107 func init() {
M v4/adw/adw-entry-row.go +58 -58
@@ -64,16 +64,17 @@ var xNewEntryRow func() uintptr
64 64
65 // Creates a new `AdwEntryRow`.65 // Creates a new `AdwEntryRow`.
66 func NewEntryRow() *gtk.Widget {66 func NewEntryRow() *gtk.Widget {
67- NewEntryRowPtr := xNewEntryRow()67+ var cls *gtk.Widget
68- if NewEntryRowPtr == 0 {
69- return nil
70- }
71 68
72- gobject.IncreaseRef(NewEntryRowPtr)69+ cret := xNewEntryRow()
73 70
74- NewEntryRowCls := &gtk.Widget{}71+ if cret == 0 {
75- NewEntryRowCls.Ptr = NewEntryRowPtr72+ return cls
76- return NewEntryRowCls73+ }
74+ gobject.IncreaseRef(cret)
75+ cls = &gtk.Widget{}
76+ cls.Ptr = cret
77+ return cls
77 }78 }
78 79
79 var xEntryRowAddPrefix func(uintptr, uintptr)80 var xEntryRowAddPrefix func(uintptr, uintptr)
@@ -99,8 +100,8 @@ var xEntryRowGetActivatesDefault func(uintptr) bool
99 // Gets whether activating the embedded entry can activate the default widget.100 // Gets whether activating the embedded entry can activate the default widget.
100 func (x *EntryRow) GetActivatesDefault() bool {101 func (x *EntryRow) GetActivatesDefault() bool {
101 102
102- return xEntryRowGetActivatesDefault(x.GoPointer())103+ cret := xEntryRowGetActivatesDefault(x.GoPointer())
103-104+ return cret
104 }105 }
105 106
106 var xEntryRowGetAttributes func(uintptr) *pango.AttrList107 var xEntryRowGetAttributes func(uintptr) *pango.AttrList
@@ -108,8 +109,8 @@ var xEntryRowGetAttributes func(uintptr) *pango.AttrList
108 // Gets Pango attributes applied to the text of the embedded entry.109 // Gets Pango attributes applied to the text of the embedded entry.
109 func (x *EntryRow) GetAttributes() *pango.AttrList {110 func (x *EntryRow) GetAttributes() *pango.AttrList {
110 111
111- return xEntryRowGetAttributes(x.GoPointer())112+ cret := xEntryRowGetAttributes(x.GoPointer())
112-113+ return cret
113 }114 }
114 115
115 var xEntryRowGetEnableEmojiCompletion func(uintptr) bool116 var xEntryRowGetEnableEmojiCompletion func(uintptr) bool
@@ -117,8 +118,8 @@ var xEntryRowGetEnableEmojiCompletion func(uintptr) bool
117 // Gets whether to suggest emoji replacements on @self.118 // Gets whether to suggest emoji replacements on @self.
118 func (x *EntryRow) GetEnableEmojiCompletion() bool {119 func (x *EntryRow) GetEnableEmojiCompletion() bool {
119 120
120- return xEntryRowGetEnableEmojiCompletion(x.GoPointer())121+ cret := xEntryRowGetEnableEmojiCompletion(x.GoPointer())
121-122+ return cret
122 }123 }
123 124
124 var xEntryRowGetInputHints func(uintptr) gtk.InputHints125 var xEntryRowGetInputHints func(uintptr) gtk.InputHints
@@ -126,8 +127,8 @@ var xEntryRowGetInputHints func(uintptr) gtk.InputHints
126 // Gets the additional input hints of @self.127 // Gets the additional input hints of @self.
127 func (x *EntryRow) GetInputHints() gtk.InputHints {128 func (x *EntryRow) GetInputHints() gtk.InputHints {
128 129
129- return xEntryRowGetInputHints(x.GoPointer())130+ cret := xEntryRowGetInputHints(x.GoPointer())
130-131+ return cret
131 }132 }
132 133
133 var xEntryRowGetInputPurpose func(uintptr) gtk.InputPurpose134 var xEntryRowGetInputPurpose func(uintptr) gtk.InputPurpose
@@ -135,8 +136,8 @@ var xEntryRowGetInputPurpose func(uintptr) gtk.InputPurpose
135 // Gets the input purpose of @self.136 // Gets the input purpose of @self.
136 func (x *EntryRow) GetInputPurpose() gtk.InputPurpose {137 func (x *EntryRow) GetInputPurpose() gtk.InputPurpose {
137 138
138- return xEntryRowGetInputPurpose(x.GoPointer())139+ cret := xEntryRowGetInputPurpose(x.GoPointer())
139-140+ return cret
140 }141 }
141 142
142 var xEntryRowGetShowApplyButton func(uintptr) bool143 var xEntryRowGetShowApplyButton func(uintptr) bool
@@ -144,8 +145,8 @@ var xEntryRowGetShowApplyButton func(uintptr) bool
144 // Gets whether @self can show the apply button.145 // Gets whether @self can show the apply button.
145 func (x *EntryRow) GetShowApplyButton() bool {146 func (x *EntryRow) GetShowApplyButton() bool {
146 147
147- return xEntryRowGetShowApplyButton(x.GoPointer())148+ cret := xEntryRowGetShowApplyButton(x.GoPointer())
148-149+ return cret
149 }150 }
150 151
151 var xEntryRowGrabFocusWithoutSelecting func(uintptr) bool152 var xEntryRowGrabFocusWithoutSelecting func(uintptr) bool
@@ -155,8 +156,8 @@ var xEntryRowGrabFocusWithoutSelecting func(uintptr) bool
155 // See [method@Gtk.Text.grab_focus_without_selecting] for more information.156 // See [method@Gtk.Text.grab_focus_without_selecting] for more information.
156 func (x *EntryRow) GrabFocusWithoutSelecting() bool {157 func (x *EntryRow) GrabFocusWithoutSelecting() bool {
157 158
158- return xEntryRowGrabFocusWithoutSelecting(x.GoPointer())159+ cret := xEntryRowGrabFocusWithoutSelecting(x.GoPointer())
159-160+ return cret
160 }161 }
161 162
162 var xEntryRowRemove func(uintptr, uintptr)163 var xEntryRowRemove func(uintptr, uintptr)
@@ -278,8 +279,8 @@ func (x *EntryRow) ConnectEntryActivated(cb func(EntryRow)) {
278 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.279 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
279 func (x *EntryRow) GetAccessibleRole() gtk.AccessibleRole {280 func (x *EntryRow) GetAccessibleRole() gtk.AccessibleRole {
280 281
281- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())282+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
282-283+ return cret
283 }284 }
284 285
285 // Resets the accessible @property to its default value.286 // Resets the accessible @property to its default value.
@@ -411,15 +412,15 @@ func (x *EntryRow) UpdateStateValue(NStatesVar int, StatesVar uintptr, ValuesVar
411 // Gets the action name for @actionable.412 // Gets the action name for @actionable.
412 func (x *EntryRow) GetActionName() string {413 func (x *EntryRow) GetActionName() string {
413 414
414- return gtk.XGtkActionableGetActionName(x.GoPointer())415+ cret := gtk.XGtkActionableGetActionName(x.GoPointer())
415-416+ return cret
416 }417 }
417 418
418 // Gets the current target value of @actionable.419 // Gets the current target value of @actionable.
419 func (x *EntryRow) GetActionTargetValue() *glib.Variant {420 func (x *EntryRow) GetActionTargetValue() *glib.Variant {
420 421
421- return gtk.XGtkActionableGetActionTargetValue(x.GoPointer())422+ cret := gtk.XGtkActionableGetActionTargetValue(x.GoPointer())
422-423+ return cret
423 }424 }
424 425
425 // Specifies the name of the action with which this widget should be426 // Specifies the name of the action with which this widget should be
@@ -497,8 +498,8 @@ func (x *EntryRow) SetDetailedActionName(DetailedActionNameVar string) {
497 // of the <object> tag used to construct the @buildable.498 // of the <object> tag used to construct the @buildable.
498 func (x *EntryRow) GetBuildableId() string {499 func (x *EntryRow) GetBuildableId() string {
499 500
500- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())501+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
501-502+ return cret
502 }503 }
503 504
504 // Deletes the currently selected text of the editable.505 // Deletes the currently selected text of the editable.
@@ -537,8 +538,8 @@ func (x *EntryRow) FinishDelegate() {
537 // Gets the alignment of the editable.538 // Gets the alignment of the editable.
538 func (x *EntryRow) GetAlignment() float32 {539 func (x *EntryRow) GetAlignment() float32 {
539 540
540- return gtk.XGtkEditableGetAlignment(x.GoPointer())541+ cret := gtk.XGtkEditableGetAlignment(x.GoPointer())
541-542+ return cret
542 }543 }
543 544
544 // Retrieves a sequence of characters.545 // Retrieves a sequence of characters.
@@ -551,8 +552,8 @@ func (x *EntryRow) GetAlignment() float32 {
551 // Note that positions are specified in characters, not bytes.552 // Note that positions are specified in characters, not bytes.
552 func (x *EntryRow) GetChars(StartPosVar int, EndPosVar int) string {553 func (x *EntryRow) GetChars(StartPosVar int, EndPosVar int) string {
553 554
554- return gtk.XGtkEditableGetChars(x.GoPointer(), StartPosVar, EndPosVar)555+ cret := gtk.XGtkEditableGetChars(x.GoPointer(), StartPosVar, EndPosVar)
555-556+ return cret
556 }557 }
557 558
558 // Gets the `GtkEditable` that @editable is delegating its559 // Gets the `GtkEditable` that @editable is delegating its
@@ -560,39 +561,38 @@ func (x *EntryRow) GetChars(StartPosVar int, EndPosVar int) string {
560 //561 //
561 // Typically, the delegate is a [class@Gtk.Text] widget.562 // Typically, the delegate is a [class@Gtk.Text] widget.
562 func (x *EntryRow) GetDelegate() *gtk.EditableBase {563 func (x *EntryRow) GetDelegate() *gtk.EditableBase {
564+ var cls *gtk.EditableBase
563 565
564- GetDelegatePtr := gtk.XGtkEditableGetDelegate(x.GoPointer())566+ cret := gtk.XGtkEditableGetDelegate(x.GoPointer())
565- if GetDelegatePtr == 0 {
566- return nil
567- }
568-
569- gobject.IncreaseRef(GetDelegatePtr)
570-
571- GetDelegateCls := &gtk.EditableBase{}
572- GetDelegateCls.Ptr = GetDelegatePtr
573- return GetDelegateCls
574 567
568+ if cret == 0 {
569+ return cls
570+ }
571+ gobject.IncreaseRef(cret)
572+ cls = &gtk.EditableBase{}
573+ cls.Ptr = cret
574+ return cls
575 }575 }
576 576
577 // Retrieves whether @editable is editable.577 // Retrieves whether @editable is editable.
578 func (x *EntryRow) GetEditable() bool {578 func (x *EntryRow) GetEditable() bool {
579 579
580- return gtk.XGtkEditableGetEditable(x.GoPointer())580+ cret := gtk.XGtkEditableGetEditable(x.GoPointer())
581-581+ return cret
582 }582 }
583 583
584 // Gets if undo/redo actions are enabled for @editable584 // Gets if undo/redo actions are enabled for @editable
585 func (x *EntryRow) GetEnableUndo() bool {585 func (x *EntryRow) GetEnableUndo() bool {
586 586
587- return gtk.XGtkEditableGetEnableUndo(x.GoPointer())587+ cret := gtk.XGtkEditableGetEnableUndo(x.GoPointer())
588-588+ return cret
589 }589 }
590 590
591 // Retrieves the desired maximum width of @editable, in characters.591 // Retrieves the desired maximum width of @editable, in characters.
592 func (x *EntryRow) GetMaxWidthChars() int {592 func (x *EntryRow) GetMaxWidthChars() int {
593 593
594- return gtk.XGtkEditableGetMaxWidthChars(x.GoPointer())594+ cret := gtk.XGtkEditableGetMaxWidthChars(x.GoPointer())
595-595+ return cret
596 }596 }
597 597
598 // Retrieves the current position of the cursor relative598 // Retrieves the current position of the cursor relative
@@ -601,8 +601,8 @@ func (x *EntryRow) GetMaxWidthChars() int {
601 // Note that this position is in characters, not in bytes.601 // Note that this position is in characters, not in bytes.
602 func (x *EntryRow) GetPosition() int {602 func (x *EntryRow) GetPosition() int {
603 603
604- return gtk.XGtkEditableGetPosition(x.GoPointer())604+ cret := gtk.XGtkEditableGetPosition(x.GoPointer())
605-605+ return cret
606 }606 }
607 607
608 // Retrieves the selection bound of the editable.608 // Retrieves the selection bound of the editable.
@@ -614,8 +614,8 @@ func (x *EntryRow) GetPosition() int {
614 // Note that positions are specified in characters, not bytes.614 // Note that positions are specified in characters, not bytes.
615 func (x *EntryRow) GetSelectionBounds(StartPosVar int, EndPosVar int) bool {615 func (x *EntryRow) GetSelectionBounds(StartPosVar int, EndPosVar int) bool {
616 616
617- return gtk.XGtkEditableGetSelectionBounds(x.GoPointer(), StartPosVar, EndPosVar)617+ cret := gtk.XGtkEditableGetSelectionBounds(x.GoPointer(), StartPosVar, EndPosVar)
618-618+ return cret
619 }619 }
620 620
621 // Retrieves the contents of @editable.621 // Retrieves the contents of @editable.
@@ -623,16 +623,16 @@ func (x *EntryRow) GetSelectionBounds(StartPosVar int, EndPosVar int) bool {
623 // The returned string is owned by GTK and must not be modified or freed.623 // The returned string is owned by GTK and must not be modified or freed.
624 func (x *EntryRow) GetText() string {624 func (x *EntryRow) GetText() string {
625 625
626- return gtk.XGtkEditableGetText(x.GoPointer())626+ cret := gtk.XGtkEditableGetText(x.GoPointer())
627-627+ return cret
628 }628 }
629 629
630 // Gets the number of characters of space reserved630 // Gets the number of characters of space reserved
631 // for the contents of the editable.631 // for the contents of the editable.
632 func (x *EntryRow) GetWidthChars() int {632 func (x *EntryRow) GetWidthChars() int {
633 633
634- return gtk.XGtkEditableGetWidthChars(x.GoPointer())634+ cret := gtk.XGtkEditableGetWidthChars(x.GoPointer())
635-635+ return cret
636 }636 }
637 637
638 // Sets up a delegate for `GtkEditable`.638 // Sets up a delegate for `GtkEditable`.
M v4/adw/adw-enum-list-model.go +33 -31
@@ -32,8 +32,8 @@ var xEnumListItemGetName func(uintptr) string
32 // Gets the enum value name.32 // Gets the enum value name.
33 func (x *EnumListItem) GetName() string {33 func (x *EnumListItem) GetName() string {
34 34
35- return xEnumListItemGetName(x.GoPointer())35+ cret := xEnumListItemGetName(x.GoPointer())
36-36+ return cret
37 }37 }
38 38
39 var xEnumListItemGetNick func(uintptr) string39 var xEnumListItemGetNick func(uintptr) string
@@ -41,8 +41,8 @@ var xEnumListItemGetNick func(uintptr) string
41 // Gets the enum value nick.41 // Gets the enum value nick.
42 func (x *EnumListItem) GetNick() string {42 func (x *EnumListItem) GetNick() string {
43 43
44- return xEnumListItemGetNick(x.GoPointer())44+ cret := xEnumListItemGetNick(x.GoPointer())
45-45+ return cret
46 }46 }
47 47
48 var xEnumListItemGetValue func(uintptr) int48 var xEnumListItemGetValue func(uintptr) int
@@ -50,8 +50,8 @@ var xEnumListItemGetValue func(uintptr) int
50 // Gets the enum value.50 // Gets the enum value.
51 func (x *EnumListItem) GetValue() int {51 func (x *EnumListItem) GetValue() int {
52 52
53- return xEnumListItemGetValue(x.GoPointer())53+ cret := xEnumListItemGetValue(x.GoPointer())
54-54+ return cret
55 }55 }
56 56
57 func (c *EnumListItem) GoPointer() uintptr {57 func (c *EnumListItem) GoPointer() uintptr {
@@ -79,14 +79,16 @@ var xNewEnumListModel func([]interface{}) uintptr
79 79
80 // Creates a new `AdwEnumListModel` for @enum_type.80 // Creates a new `AdwEnumListModel` for @enum_type.
81 func NewEnumListModel(EnumTypeVar []interface{}) *EnumListModel {81 func NewEnumListModel(EnumTypeVar []interface{}) *EnumListModel {
82- NewEnumListModelPtr := xNewEnumListModel(EnumTypeVar)82+ var cls *EnumListModel
83- if NewEnumListModelPtr == 0 {
84- return nil
85- }
86 83
87- NewEnumListModelCls := &EnumListModel{}84+ cret := xNewEnumListModel(EnumTypeVar)
88- NewEnumListModelCls.Ptr = NewEnumListModelPtr85+
89- return NewEnumListModelCls86+ if cret == 0 {
87+ return cls
88+ }
89+ cls = &EnumListModel{}
90+ cls.Ptr = cret
91+ return cls
90 }92 }
91 93
92 var xEnumListModelFindPosition func(uintptr, int) uint94 var xEnumListModelFindPosition func(uintptr, int) uint
@@ -94,8 +96,8 @@ var xEnumListModelFindPosition func(uintptr, int) uint
94 // Finds the position of a given enum value in @self.96 // Finds the position of a given enum value in @self.
95 func (x *EnumListModel) FindPosition(ValueVar int) uint {97 func (x *EnumListModel) FindPosition(ValueVar int) uint {
96 98
97- return xEnumListModelFindPosition(x.GoPointer(), ValueVar)99+ cret := xEnumListModelFindPosition(x.GoPointer(), ValueVar)
98-100+ return cret
99 }101 }
100 102
101 var xEnumListModelGetEnumType func(uintptr) []interface{}103 var xEnumListModelGetEnumType func(uintptr) []interface{}
@@ -103,8 +105,8 @@ var xEnumListModelGetEnumType func(uintptr) []interface{}
103 // Gets the type of the enum represented by @self.105 // Gets the type of the enum represented by @self.
104 func (x *EnumListModel) GetEnumType() []interface{} {106 func (x *EnumListModel) GetEnumType() []interface{} {
105 107
106- return xEnumListModelGetEnumType(x.GoPointer())108+ cret := xEnumListModelGetEnumType(x.GoPointer())
107-109+ return cret
108 }110 }
109 111
110 func (c *EnumListModel) GoPointer() uintptr {112 func (c *EnumListModel) GoPointer() uintptr {
@@ -126,8 +128,8 @@ func (c *EnumListModel) SetGoPointer(ptr uintptr) {
126 // See also: g_list_model_get_n_items()128 // See also: g_list_model_get_n_items()
127 func (x *EnumListModel) GetItem(PositionVar uint) uintptr {129 func (x *EnumListModel) GetItem(PositionVar uint) uintptr {
128 130
129- return gio.XGListModelGetItem(x.GoPointer(), PositionVar)131+ cret := gio.XGListModelGetItem(x.GoPointer(), PositionVar)
130-132+ return cret
131 }133 }
132 134
133 // Gets the type of the items in @list.135 // Gets the type of the items in @list.
@@ -140,8 +142,8 @@ func (x *EnumListModel) GetItem(PositionVar uint) uintptr {
140 // model.142 // model.
141 func (x *EnumListModel) GetItemType() []interface{} {143 func (x *EnumListModel) GetItemType() []interface{} {
142 144
143- return gio.XGListModelGetItemType(x.GoPointer())145+ cret := gio.XGListModelGetItemType(x.GoPointer())
144-146+ return cret
145 }147 }
146 148
147 // Gets the number of items in @list.149 // Gets the number of items in @list.
@@ -151,8 +153,8 @@ func (x *EnumListModel) GetItemType() []interface{} {
151 // @position until g_list_model_get_item() returns %NULL.153 // @position until g_list_model_get_item() returns %NULL.
152 func (x *EnumListModel) GetNItems() uint {154 func (x *EnumListModel) GetNItems() uint {
153 155
154- return gio.XGListModelGetNItems(x.GoPointer())156+ cret := gio.XGListModelGetNItems(x.GoPointer())
155-157+ return cret
156 }158 }
157 159
158 // Get the item at @position.160 // Get the item at @position.
@@ -168,16 +170,16 @@ func (x *EnumListModel) GetNItems() uint {
168 //170 //
169 // See also: g_list_model_get_n_items()171 // See also: g_list_model_get_n_items()
170 func (x *EnumListModel) GetObject(PositionVar uint) *gobject.Object {172 func (x *EnumListModel) GetObject(PositionVar uint) *gobject.Object {
173+ var cls *gobject.Object
171 174
172- GetObjectPtr := gio.XGListModelGetObject(x.GoPointer(), PositionVar)175+ cret := gio.XGListModelGetObject(x.GoPointer(), PositionVar)
173- if GetObjectPtr == 0 {
174- return nil
175- }
176-
177- GetObjectCls := &gobject.Object{}
178- GetObjectCls.Ptr = GetObjectPtr
179- return GetObjectCls
180 176
177+ if cret == 0 {
178+ return cls
179+ }
180+ cls = &gobject.Object{}
181+ cls.Ptr = cret
182+ return cls
181 }183 }
182 184
183 // Emits the #GListModel::items-changed signal on @list.185 // Emits the #GListModel::items-changed signal on @list.
M v4/adw/adw-expander-row.go +31 -30
@@ -59,16 +59,17 @@ var xNewExpanderRow func() uintptr
59 59
60 // Creates a new `AdwExpanderRow`.60 // Creates a new `AdwExpanderRow`.
61 func NewExpanderRow() *gtk.Widget {61 func NewExpanderRow() *gtk.Widget {
62- NewExpanderRowPtr := xNewExpanderRow()62+ var cls *gtk.Widget
63- if NewExpanderRowPtr == 0 {
64- return nil
65- }
66 63
67- gobject.IncreaseRef(NewExpanderRowPtr)64+ cret := xNewExpanderRow()
68 65
69- NewExpanderRowCls := &gtk.Widget{}66+ if cret == 0 {
70- NewExpanderRowCls.Ptr = NewExpanderRowPtr67+ return cls
71- return NewExpanderRowCls68+ }
69+ gobject.IncreaseRef(cret)
70+ cls = &gtk.Widget{}
71+ cls.Ptr = cret
72+ return cls
72 }73 }
73 74
74 var xExpanderRowAddAction func(uintptr, uintptr)75 var xExpanderRowAddAction func(uintptr, uintptr)
@@ -105,8 +106,8 @@ var xExpanderRowGetEnableExpansion func(uintptr) bool
105 // Gets whether the expansion of @self is enabled.106 // Gets whether the expansion of @self is enabled.
106 func (x *ExpanderRow) GetEnableExpansion() bool {107 func (x *ExpanderRow) GetEnableExpansion() bool {
107 108
108- return xExpanderRowGetEnableExpansion(x.GoPointer())109+ cret := xExpanderRowGetEnableExpansion(x.GoPointer())
109-110+ return cret
110 }111 }
111 112
112 var xExpanderRowGetExpanded func(uintptr) bool113 var xExpanderRowGetExpanded func(uintptr) bool
@@ -114,8 +115,8 @@ var xExpanderRowGetExpanded func(uintptr) bool
114 // Gets whether @self is expanded.115 // Gets whether @self is expanded.
115 func (x *ExpanderRow) GetExpanded() bool {116 func (x *ExpanderRow) GetExpanded() bool {
116 117
117- return xExpanderRowGetExpanded(x.GoPointer())118+ cret := xExpanderRowGetExpanded(x.GoPointer())
118-119+ return cret
119 }120 }
120 121
121 var xExpanderRowGetIconName func(uintptr) string122 var xExpanderRowGetIconName func(uintptr) string
@@ -123,8 +124,8 @@ var xExpanderRowGetIconName func(uintptr) string
123 // Gets the icon name for @self.124 // Gets the icon name for @self.
124 func (x *ExpanderRow) GetIconName() string {125 func (x *ExpanderRow) GetIconName() string {
125 126
126- return xExpanderRowGetIconName(x.GoPointer())127+ cret := xExpanderRowGetIconName(x.GoPointer())
127-128+ return cret
128 }129 }
129 130
130 var xExpanderRowGetShowEnableSwitch func(uintptr) bool131 var xExpanderRowGetShowEnableSwitch func(uintptr) bool
@@ -132,8 +133,8 @@ var xExpanderRowGetShowEnableSwitch func(uintptr) bool
132 // Gets whether the switch enabling the expansion of @self is visible.133 // Gets whether the switch enabling the expansion of @self is visible.
133 func (x *ExpanderRow) GetShowEnableSwitch() bool {134 func (x *ExpanderRow) GetShowEnableSwitch() bool {
134 135
135- return xExpanderRowGetShowEnableSwitch(x.GoPointer())136+ cret := xExpanderRowGetShowEnableSwitch(x.GoPointer())
136-137+ return cret
137 }138 }
138 139
139 var xExpanderRowGetSubtitle func(uintptr) string140 var xExpanderRowGetSubtitle func(uintptr) string
@@ -141,8 +142,8 @@ var xExpanderRowGetSubtitle func(uintptr) string
141 // Gets the subtitle for @self.142 // Gets the subtitle for @self.
142 func (x *ExpanderRow) GetSubtitle() string {143 func (x *ExpanderRow) GetSubtitle() string {
143 144
144- return xExpanderRowGetSubtitle(x.GoPointer())145+ cret := xExpanderRowGetSubtitle(x.GoPointer())
145-146+ return cret
146 }147 }
147 148
148 var xExpanderRowGetSubtitleLines func(uintptr) bool149 var xExpanderRowGetSubtitleLines func(uintptr) bool
@@ -151,8 +152,8 @@ var xExpanderRowGetSubtitleLines func(uintptr) bool
151 // ellipsized.152 // ellipsized.
152 func (x *ExpanderRow) GetSubtitleLines() bool {153 func (x *ExpanderRow) GetSubtitleLines() bool {
153 154
154- return xExpanderRowGetSubtitleLines(x.GoPointer())155+ cret := xExpanderRowGetSubtitleLines(x.GoPointer())
155-156+ return cret
156 }157 }
157 158
158 var xExpanderRowGetTitleLines func(uintptr) bool159 var xExpanderRowGetTitleLines func(uintptr) bool
@@ -161,8 +162,8 @@ var xExpanderRowGetTitleLines func(uintptr) bool
161 // ellipsized.162 // ellipsized.
162 func (x *ExpanderRow) GetTitleLines() bool {163 func (x *ExpanderRow) GetTitleLines() bool {
163 164
164- return xExpanderRowGetTitleLines(x.GoPointer())165+ cret := xExpanderRowGetTitleLines(x.GoPointer())
165-166+ return cret
166 }167 }
167 168
168 var xExpanderRowRemove func(uintptr, uintptr)169 var xExpanderRowRemove func(uintptr, uintptr)
@@ -256,8 +257,8 @@ func (c *ExpanderRow) SetGoPointer(ptr uintptr) {
256 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.257 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
257 func (x *ExpanderRow) GetAccessibleRole() gtk.AccessibleRole {258 func (x *ExpanderRow) GetAccessibleRole() gtk.AccessibleRole {
258 259
259- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())260+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
260-261+ return cret
261 }262 }
262 263
263 // Resets the accessible @property to its default value.264 // Resets the accessible @property to its default value.
@@ -389,15 +390,15 @@ func (x *ExpanderRow) UpdateStateValue(NStatesVar int, StatesVar uintptr, Values
389 // Gets the action name for @actionable.390 // Gets the action name for @actionable.
390 func (x *ExpanderRow) GetActionName() string {391 func (x *ExpanderRow) GetActionName() string {
391 392
392- return gtk.XGtkActionableGetActionName(x.GoPointer())393+ cret := gtk.XGtkActionableGetActionName(x.GoPointer())
393-394+ return cret
394 }395 }
395 396
396 // Gets the current target value of @actionable.397 // Gets the current target value of @actionable.
397 func (x *ExpanderRow) GetActionTargetValue() *glib.Variant {398 func (x *ExpanderRow) GetActionTargetValue() *glib.Variant {
398 399
399- return gtk.XGtkActionableGetActionTargetValue(x.GoPointer())400+ cret := gtk.XGtkActionableGetActionTargetValue(x.GoPointer())
400-401+ return cret
401 }402 }
402 403
403 // Specifies the name of the action with which this widget should be404 // Specifies the name of the action with which this widget should be
@@ -475,8 +476,8 @@ func (x *ExpanderRow) SetDetailedActionName(DetailedActionNameVar string) {
475 // of the <object> tag used to construct the @buildable.476 // of the <object> tag used to construct the @buildable.
476 func (x *ExpanderRow) GetBuildableId() string {477 func (x *ExpanderRow) GetBuildableId() string {
477 478
478- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())479+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
479-480+ return cret
480 }481 }
481 482
482 func init() {483 func init() {
M v4/adw/adw-flap.go +76 -78
@@ -126,52 +126,51 @@ var xNewFlap func() uintptr
126 126
127 // Creates a new `AdwFlap`.127 // Creates a new `AdwFlap`.
128 func NewFlap() *gtk.Widget {128 func NewFlap() *gtk.Widget {
129- NewFlapPtr := xNewFlap()129+ var cls *gtk.Widget
130- if NewFlapPtr == 0 {
131- return nil
132- }
133 130
134- gobject.IncreaseRef(NewFlapPtr)131+ cret := xNewFlap()
135 132
136- NewFlapCls := &gtk.Widget{}133+ if cret == 0 {
137- NewFlapCls.Ptr = NewFlapPtr134+ return cls
138- return NewFlapCls135+ }
136+ gobject.IncreaseRef(cret)
137+ cls = &gtk.Widget{}
138+ cls.Ptr = cret
139+ return cls
139 }140 }
140 141
141 var xFlapGetContent func(uintptr) uintptr142 var xFlapGetContent func(uintptr) uintptr
142 143
143 // Gets the content widget for @self.144 // Gets the content widget for @self.
144 func (x *Flap) GetContent() *gtk.Widget {145 func (x *Flap) GetContent() *gtk.Widget {
146+ var cls *gtk.Widget
145 147
146- GetContentPtr := xFlapGetContent(x.GoPointer())148+ cret := xFlapGetContent(x.GoPointer())
147- if GetContentPtr == 0 {
148- return nil
149- }
150-
151- gobject.IncreaseRef(GetContentPtr)
152-
153- GetContentCls := &gtk.Widget{}
154- GetContentCls.Ptr = GetContentPtr
155- return GetContentCls
156 149
150+ if cret == 0 {
151+ return cls
152+ }
153+ gobject.IncreaseRef(cret)
154+ cls = &gtk.Widget{}
155+ cls.Ptr = cret
156+ return cls
157 }157 }
158 158
159 var xFlapGetFlap func(uintptr) uintptr159 var xFlapGetFlap func(uintptr) uintptr
160 160
161 // Gets the flap widget for @self.161 // Gets the flap widget for @self.
162 func (x *Flap) GetFlap() *gtk.Widget {162 func (x *Flap) GetFlap() *gtk.Widget {
163+ var cls *gtk.Widget
163 164
164- GetFlapPtr := xFlapGetFlap(x.GoPointer())165+ cret := xFlapGetFlap(x.GoPointer())
165- if GetFlapPtr == 0 {
166- return nil
167- }
168-
169- gobject.IncreaseRef(GetFlapPtr)
170-
171- GetFlapCls := &gtk.Widget{}
172- GetFlapCls.Ptr = GetFlapPtr
173- return GetFlapCls
174 166
167+ if cret == 0 {
168+ return cls
169+ }
170+ gobject.IncreaseRef(cret)
171+ cls = &gtk.Widget{}
172+ cls.Ptr = cret
173+ return cls
175 }174 }
176 175
177 var xFlapGetFlapPosition func(uintptr) gtk.PackType176 var xFlapGetFlapPosition func(uintptr) gtk.PackType
@@ -179,8 +178,8 @@ var xFlapGetFlapPosition func(uintptr) gtk.PackType
179 // Gets the flap position for @self.178 // Gets the flap position for @self.
180 func (x *Flap) GetFlapPosition() gtk.PackType {179 func (x *Flap) GetFlapPosition() gtk.PackType {
181 180
182- return xFlapGetFlapPosition(x.GoPointer())181+ cret := xFlapGetFlapPosition(x.GoPointer())
183-182+ return cret
184 }183 }
185 184
186 var xFlapGetFoldDuration func(uintptr) uint185 var xFlapGetFoldDuration func(uintptr) uint
@@ -188,8 +187,8 @@ var xFlapGetFoldDuration func(uintptr) uint
188 // Gets the fold transition animation duration for @self, in milliseconds.187 // Gets the fold transition animation duration for @self, in milliseconds.
189 func (x *Flap) GetFoldDuration() uint {188 func (x *Flap) GetFoldDuration() uint {
190 189
191- return xFlapGetFoldDuration(x.GoPointer())190+ cret := xFlapGetFoldDuration(x.GoPointer())
192-191+ return cret
193 }192 }
194 193
195 var xFlapGetFoldPolicy func(uintptr) FlapFoldPolicy194 var xFlapGetFoldPolicy func(uintptr) FlapFoldPolicy
@@ -197,8 +196,8 @@ var xFlapGetFoldPolicy func(uintptr) FlapFoldPolicy
197 // Gets the fold policy for @self.196 // Gets the fold policy for @self.
198 func (x *Flap) GetFoldPolicy() FlapFoldPolicy {197 func (x *Flap) GetFoldPolicy() FlapFoldPolicy {
199 198
200- return xFlapGetFoldPolicy(x.GoPointer())199+ cret := xFlapGetFoldPolicy(x.GoPointer())
201-200+ return cret
202 }201 }
203 202
204 var xFlapGetFoldThresholdPolicy func(uintptr) FoldThresholdPolicy203 var xFlapGetFoldThresholdPolicy func(uintptr) FoldThresholdPolicy
@@ -206,8 +205,8 @@ var xFlapGetFoldThresholdPolicy func(uintptr) FoldThresholdPolicy
206 // Gets the fold threshold policy for @self.205 // Gets the fold threshold policy for @self.
207 func (x *Flap) GetFoldThresholdPolicy() FoldThresholdPolicy {206 func (x *Flap) GetFoldThresholdPolicy() FoldThresholdPolicy {
208 207
209- return xFlapGetFoldThresholdPolicy(x.GoPointer())208+ cret := xFlapGetFoldThresholdPolicy(x.GoPointer())
210-209+ return cret
211 }210 }
212 211
213 var xFlapGetFolded func(uintptr) bool212 var xFlapGetFolded func(uintptr) bool
@@ -217,8 +216,8 @@ var xFlapGetFolded func(uintptr) bool
217 // See [property@Flap:fold-policy].216 // See [property@Flap:fold-policy].
218 func (x *Flap) GetFolded() bool {217 func (x *Flap) GetFolded() bool {
219 218
220- return xFlapGetFolded(x.GoPointer())219+ cret := xFlapGetFolded(x.GoPointer())
221-220+ return cret
222 }221 }
223 222
224 var xFlapGetLocked func(uintptr) bool223 var xFlapGetLocked func(uintptr) bool
@@ -226,8 +225,8 @@ var xFlapGetLocked func(uintptr) bool
226 // Gets whether @self is locked.225 // Gets whether @self is locked.
227 func (x *Flap) GetLocked() bool {226 func (x *Flap) GetLocked() bool {
228 227
229- return xFlapGetLocked(x.GoPointer())228+ cret := xFlapGetLocked(x.GoPointer())
230-229+ return cret
231 }230 }
232 231
233 var xFlapGetModal func(uintptr) bool232 var xFlapGetModal func(uintptr) bool
@@ -235,8 +234,8 @@ var xFlapGetModal func(uintptr) bool
235 // Gets whether @self is modal.234 // Gets whether @self is modal.
236 func (x *Flap) GetModal() bool {235 func (x *Flap) GetModal() bool {
237 236
238- return xFlapGetModal(x.GoPointer())237+ cret := xFlapGetModal(x.GoPointer())
239-238+ return cret
240 }239 }
241 240
242 var xFlapGetRevealFlap func(uintptr) bool241 var xFlapGetRevealFlap func(uintptr) bool
@@ -244,8 +243,8 @@ var xFlapGetRevealFlap func(uintptr) bool
244 // Gets whether the flap widget is revealed for @self.243 // Gets whether the flap widget is revealed for @self.
245 func (x *Flap) GetRevealFlap() bool {244 func (x *Flap) GetRevealFlap() bool {
246 245
247- return xFlapGetRevealFlap(x.GoPointer())246+ cret := xFlapGetRevealFlap(x.GoPointer())
248-247+ return cret
249 }248 }
250 249
251 var xFlapGetRevealParams func(uintptr) *SpringParams250 var xFlapGetRevealParams func(uintptr) *SpringParams
@@ -253,8 +252,8 @@ var xFlapGetRevealParams func(uintptr) *SpringParams
253 // Gets the reveal animation spring parameters for @self.252 // Gets the reveal animation spring parameters for @self.
254 func (x *Flap) GetRevealParams() *SpringParams {253 func (x *Flap) GetRevealParams() *SpringParams {
255 254
256- return xFlapGetRevealParams(x.GoPointer())255+ cret := xFlapGetRevealParams(x.GoPointer())
257-256+ return cret
258 }257 }
259 258
260 var xFlapGetRevealProgress func(uintptr) float64259 var xFlapGetRevealProgress func(uintptr) float64
@@ -266,26 +265,25 @@ var xFlapGetRevealProgress func(uintptr) float64
266 // See [property@Flap:reveal-flap].265 // See [property@Flap:reveal-flap].
267 func (x *Flap) GetRevealProgress() float64 {266 func (x *Flap) GetRevealProgress() float64 {
268 267
269- return xFlapGetRevealProgress(x.GoPointer())268+ cret := xFlapGetRevealProgress(x.GoPointer())
270-269+ return cret
271 }270 }
272 271
273 var xFlapGetSeparator func(uintptr) uintptr272 var xFlapGetSeparator func(uintptr) uintptr
274 273
275 // Gets the separator widget for @self.274 // Gets the separator widget for @self.
276 func (x *Flap) GetSeparator() *gtk.Widget {275 func (x *Flap) GetSeparator() *gtk.Widget {
276+ var cls *gtk.Widget
277 277
278- GetSeparatorPtr := xFlapGetSeparator(x.GoPointer())278+ cret := xFlapGetSeparator(x.GoPointer())
279- if GetSeparatorPtr == 0 {
280- return nil
281- }
282-
283- gobject.IncreaseRef(GetSeparatorPtr)
284-
285- GetSeparatorCls := &gtk.Widget{}
286- GetSeparatorCls.Ptr = GetSeparatorPtr
287- return GetSeparatorCls
288 279
280+ if cret == 0 {
281+ return cls
282+ }
283+ gobject.IncreaseRef(cret)
284+ cls = &gtk.Widget{}
285+ cls.Ptr = cret
286+ return cls
289 }287 }
290 288
291 var xFlapGetSwipeToClose func(uintptr) bool289 var xFlapGetSwipeToClose func(uintptr) bool
@@ -293,8 +291,8 @@ var xFlapGetSwipeToClose func(uintptr) bool
293 // Gets whether @self can be closed with a swipe gesture.291 // Gets whether @self can be closed with a swipe gesture.
294 func (x *Flap) GetSwipeToClose() bool {292 func (x *Flap) GetSwipeToClose() bool {
295 293
296- return xFlapGetSwipeToClose(x.GoPointer())294+ cret := xFlapGetSwipeToClose(x.GoPointer())
297-295+ return cret
298 }296 }
299 297
300 var xFlapGetSwipeToOpen func(uintptr) bool298 var xFlapGetSwipeToOpen func(uintptr) bool
@@ -302,8 +300,8 @@ var xFlapGetSwipeToOpen func(uintptr) bool
302 // Gets whether @self can be opened with a swipe gesture.300 // Gets whether @self can be opened with a swipe gesture.
303 func (x *Flap) GetSwipeToOpen() bool {301 func (x *Flap) GetSwipeToOpen() bool {
304 302
305- return xFlapGetSwipeToOpen(x.GoPointer())303+ cret := xFlapGetSwipeToOpen(x.GoPointer())
306-304+ return cret
307 }305 }
308 306
309 var xFlapGetTransitionType func(uintptr) FlapTransitionType307 var xFlapGetTransitionType func(uintptr) FlapTransitionType
@@ -311,8 +309,8 @@ var xFlapGetTransitionType func(uintptr) FlapTransitionType
311 // Gets the type of animation used for reveal and fold transitions in @self.309 // Gets the type of animation used for reveal and fold transitions in @self.
312 func (x *Flap) GetTransitionType() FlapTransitionType {310 func (x *Flap) GetTransitionType() FlapTransitionType {
313 311
314- return xFlapGetTransitionType(x.GoPointer())312+ cret := xFlapGetTransitionType(x.GoPointer())
315-313+ return cret
316 }314 }
317 315
318 var xFlapSetContent func(uintptr, uintptr)316 var xFlapSetContent func(uintptr, uintptr)
@@ -495,8 +493,8 @@ func (c *Flap) SetGoPointer(ptr uintptr) {
495 // Gets the progress @self will snap back to after the gesture is canceled.493 // Gets the progress @self will snap back to after the gesture is canceled.
496 func (x *Flap) GetCancelProgress() float64 {494 func (x *Flap) GetCancelProgress() float64 {
497 495
498- return XAdwSwipeableGetCancelProgress(x.GoPointer())496+ cret := XAdwSwipeableGetCancelProgress(x.GoPointer())
499-497+ return cret
500 }498 }
501 499
502 // Gets the swipe distance of @self.500 // Gets the swipe distance of @self.
@@ -504,15 +502,15 @@ func (x *Flap) GetCancelProgress() float64 {
504 // This corresponds to how many pixels 1 unit represents.502 // This corresponds to how many pixels 1 unit represents.
505 func (x *Flap) GetDistance() float64 {503 func (x *Flap) GetDistance() float64 {
506 504
507- return XAdwSwipeableGetDistance(x.GoPointer())505+ cret := XAdwSwipeableGetDistance(x.GoPointer())
508-506+ return cret
509 }507 }
510 508
511 // Gets the current progress of @self.509 // Gets the current progress of @self.
512 func (x *Flap) GetProgress() float64 {510 func (x *Flap) GetProgress() float64 {
513 511
514- return XAdwSwipeableGetProgress(x.GoPointer())512+ cret := XAdwSwipeableGetProgress(x.GoPointer())
515-513+ return cret
516 }514 }
517 515
518 // Gets the snap points of @self.516 // Gets the snap points of @self.
@@ -521,8 +519,8 @@ func (x *Flap) GetProgress() float64 {
521 // end the swipe on.519 // end the swipe on.
522 func (x *Flap) GetSnapPoints(NSnapPointsVar int) uintptr {520 func (x *Flap) GetSnapPoints(NSnapPointsVar int) uintptr {
523 521
524- return XAdwSwipeableGetSnapPoints(x.GoPointer(), NSnapPointsVar)522+ cret := XAdwSwipeableGetSnapPoints(x.GoPointer(), NSnapPointsVar)
525-523+ return cret
526 }524 }
527 525
528 // Gets the area @self can start a swipe from for the given direction and526 // Gets the area @self can start a swipe from for the given direction and
@@ -543,8 +541,8 @@ func (x *Flap) GetSwipeArea(NavigationDirectionVar NavigationDirection, IsDragVa
543 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.541 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
544 func (x *Flap) GetAccessibleRole() gtk.AccessibleRole {542 func (x *Flap) GetAccessibleRole() gtk.AccessibleRole {
545 543
546- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())544+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
547-545+ return cret
548 }546 }
549 547
550 // Resets the accessible @property to its default value.548 // Resets the accessible @property to its default value.
@@ -679,15 +677,15 @@ func (x *Flap) UpdateStateValue(NStatesVar int, StatesVar uintptr, ValuesVar uin
679 // of the <object> tag used to construct the @buildable.677 // of the <object> tag used to construct the @buildable.
680 func (x *Flap) GetBuildableId() string {678 func (x *Flap) GetBuildableId() string {
681 679
682- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())680+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
683-681+ return cret
684 }682 }
685 683
686 // Retrieves the orientation of the @orientable.684 // Retrieves the orientation of the @orientable.
687 func (x *Flap) GetOrientation() gtk.Orientation {685 func (x *Flap) GetOrientation() gtk.Orientation {
688 686
689- return gtk.XGtkOrientableGetOrientation(x.GoPointer())687+ cret := gtk.XGtkOrientableGetOrientation(x.GoPointer())
690-688+ return cret
691 }689 }
692 690
693 // Sets the orientation of the @orientable.691 // Sets the orientation of the @orientable.
M v4/adw/adw-header-bar.go +30 -30
@@ -129,16 +129,17 @@ var xNewHeaderBar func() uintptr
129 129
130 // Creates a new `AdwHeaderBar`.130 // Creates a new `AdwHeaderBar`.
131 func NewHeaderBar() *gtk.Widget {131 func NewHeaderBar() *gtk.Widget {
132- NewHeaderBarPtr := xNewHeaderBar()132+ var cls *gtk.Widget
133- if NewHeaderBarPtr == 0 {
134- return nil
135- }
136 133
137- gobject.IncreaseRef(NewHeaderBarPtr)134+ cret := xNewHeaderBar()
138 135
139- NewHeaderBarCls := &gtk.Widget{}136+ if cret == 0 {
140- NewHeaderBarCls.Ptr = NewHeaderBarPtr137+ return cls
141- return NewHeaderBarCls138+ }
139+ gobject.IncreaseRef(cret)
140+ cls = &gtk.Widget{}
141+ cls.Ptr = cret
142+ return cls
142 }143 }
143 144
144 var xHeaderBarGetCenteringPolicy func(uintptr) CenteringPolicy145 var xHeaderBarGetCenteringPolicy func(uintptr) CenteringPolicy
@@ -146,8 +147,8 @@ var xHeaderBarGetCenteringPolicy func(uintptr) CenteringPolicy
146 // Gets the policy for aligning the center widget.147 // Gets the policy for aligning the center widget.
147 func (x *HeaderBar) GetCenteringPolicy() CenteringPolicy {148 func (x *HeaderBar) GetCenteringPolicy() CenteringPolicy {
148 149
149- return xHeaderBarGetCenteringPolicy(x.GoPointer())150+ cret := xHeaderBarGetCenteringPolicy(x.GoPointer())
150-151+ return cret
151 }152 }
152 153
153 var xHeaderBarGetDecorationLayout func(uintptr) string154 var xHeaderBarGetDecorationLayout func(uintptr) string
@@ -155,8 +156,8 @@ var xHeaderBarGetDecorationLayout func(uintptr) string
155 // Gets the decoration layout for @self.156 // Gets the decoration layout for @self.
156 func (x *HeaderBar) GetDecorationLayout() string {157 func (x *HeaderBar) GetDecorationLayout() string {
157 158
158- return xHeaderBarGetDecorationLayout(x.GoPointer())159+ cret := xHeaderBarGetDecorationLayout(x.GoPointer())
159-160+ return cret
160 }161 }
161 162
162 var xHeaderBarGetShowEndTitleButtons func(uintptr) bool163 var xHeaderBarGetShowEndTitleButtons func(uintptr) bool
@@ -164,8 +165,8 @@ var xHeaderBarGetShowEndTitleButtons func(uintptr) bool
164 // Gets whether to show title buttons at the end of @self.165 // Gets whether to show title buttons at the end of @self.
165 func (x *HeaderBar) GetShowEndTitleButtons() bool {166 func (x *HeaderBar) GetShowEndTitleButtons() bool {
166 167
167- return xHeaderBarGetShowEndTitleButtons(x.GoPointer())168+ cret := xHeaderBarGetShowEndTitleButtons(x.GoPointer())
168-169+ return cret
169 }170 }
170 171
171 var xHeaderBarGetShowStartTitleButtons func(uintptr) bool172 var xHeaderBarGetShowStartTitleButtons func(uintptr) bool
@@ -173,26 +174,25 @@ var xHeaderBarGetShowStartTitleButtons func(uintptr) bool
173 // Gets whether to show title buttons at the start of @self.174 // Gets whether to show title buttons at the start of @self.
174 func (x *HeaderBar) GetShowStartTitleButtons() bool {175 func (x *HeaderBar) GetShowStartTitleButtons() bool {
175 176
176- return xHeaderBarGetShowStartTitleButtons(x.GoPointer())177+ cret := xHeaderBarGetShowStartTitleButtons(x.GoPointer())
177-178+ return cret
178 }179 }
179 180
180 var xHeaderBarGetTitleWidget func(uintptr) uintptr181 var xHeaderBarGetTitleWidget func(uintptr) uintptr
181 182
182 // Gets the title widget widget of @self.183 // Gets the title widget widget of @self.
183 func (x *HeaderBar) GetTitleWidget() *gtk.Widget {184 func (x *HeaderBar) GetTitleWidget() *gtk.Widget {
185+ var cls *gtk.Widget
184 186
185- GetTitleWidgetPtr := xHeaderBarGetTitleWidget(x.GoPointer())187+ cret := xHeaderBarGetTitleWidget(x.GoPointer())
186- if GetTitleWidgetPtr == 0 {
187- return nil
188- }
189-
190- gobject.IncreaseRef(GetTitleWidgetPtr)
191-
192- GetTitleWidgetCls := &gtk.Widget{}
193- GetTitleWidgetCls.Ptr = GetTitleWidgetPtr
194- return GetTitleWidgetCls
195 188
189+ if cret == 0 {
190+ return cls
191+ }
192+ gobject.IncreaseRef(cret)
193+ cls = &gtk.Widget{}
194+ cls.Ptr = cret
195+ return cls
196 }196 }
197 197
198 var xHeaderBarPackEnd func(uintptr, uintptr)198 var xHeaderBarPackEnd func(uintptr, uintptr)
@@ -321,8 +321,8 @@ func (c *HeaderBar) SetGoPointer(ptr uintptr) {
321 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.321 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
322 func (x *HeaderBar) GetAccessibleRole() gtk.AccessibleRole {322 func (x *HeaderBar) GetAccessibleRole() gtk.AccessibleRole {
323 323
324- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())324+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
325-325+ return cret
326 }326 }
327 327
328 // Resets the accessible @property to its default value.328 // Resets the accessible @property to its default value.
@@ -457,8 +457,8 @@ func (x *HeaderBar) UpdateStateValue(NStatesVar int, StatesVar uintptr, ValuesVa
457 // of the <object> tag used to construct the @buildable.457 // of the <object> tag used to construct the @buildable.
458 func (x *HeaderBar) GetBuildableId() string {458 func (x *HeaderBar) GetBuildableId() string {
459 459
460- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())460+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
461-461+ return cret
462 }462 }
463 463
464 func init() {464 func init() {
M v4/adw/adw-leaflet.go +131 -138
@@ -81,34 +81,34 @@ var xNewLeaflet func() uintptr
81 81
82 // Creates a new `AdwLeaflet`.82 // Creates a new `AdwLeaflet`.
83 func NewLeaflet() *gtk.Widget {83 func NewLeaflet() *gtk.Widget {
84- NewLeafletPtr := xNewLeaflet()84+ var cls *gtk.Widget
85- if NewLeafletPtr == 0 {
86- return nil
87- }
88 85
89- gobject.IncreaseRef(NewLeafletPtr)86+ cret := xNewLeaflet()
90 87
91- NewLeafletCls := &gtk.Widget{}88+ if cret == 0 {
92- NewLeafletCls.Ptr = NewLeafletPtr89+ return cls
93- return NewLeafletCls90+ }
91+ gobject.IncreaseRef(cret)
92+ cls = &gtk.Widget{}
93+ cls.Ptr = cret
94+ return cls
94 }95 }
95 96
96 var xLeafletAppend func(uintptr, uintptr) uintptr97 var xLeafletAppend func(uintptr, uintptr) uintptr
97 98
98 // Adds a child to @self.99 // Adds a child to @self.
99 func (x *Leaflet) Append(ChildVar *gtk.Widget) *LeafletPage {100 func (x *Leaflet) Append(ChildVar *gtk.Widget) *LeafletPage {
101+ var cls *LeafletPage
100 102
101- AppendPtr := xLeafletAppend(x.GoPointer(), ChildVar.GoPointer())103+ cret := xLeafletAppend(x.GoPointer(), ChildVar.GoPointer())
102- if AppendPtr == 0 {
103- return nil
104- }
105-
106- gobject.IncreaseRef(AppendPtr)
107-
108- AppendCls := &LeafletPage{}
109- AppendCls.Ptr = AppendPtr
110- return AppendCls
111 104
105+ if cret == 0 {
106+ return cls
107+ }
108+ gobject.IncreaseRef(cret)
109+ cls = &LeafletPage{}
110+ cls.Ptr = cret
111+ return cls
112 }112 }
113 113
114 var xLeafletGetAdjacentChild func(uintptr, NavigationDirection) uintptr114 var xLeafletGetAdjacentChild func(uintptr, NavigationDirection) uintptr
@@ -122,18 +122,17 @@ var xLeafletGetAdjacentChild func(uintptr, NavigationDirection) uintptr
122 //122 //
123 // See [property@LeafletPage:navigatable].123 // See [property@LeafletPage:navigatable].
124 func (x *Leaflet) GetAdjacentChild(DirectionVar NavigationDirection) *gtk.Widget {124 func (x *Leaflet) GetAdjacentChild(DirectionVar NavigationDirection) *gtk.Widget {
125+ var cls *gtk.Widget
125 126
126- GetAdjacentChildPtr := xLeafletGetAdjacentChild(x.GoPointer(), DirectionVar)127+ cret := xLeafletGetAdjacentChild(x.GoPointer(), DirectionVar)
127- if GetAdjacentChildPtr == 0 {
128- return nil
129- }
130-
131- gobject.IncreaseRef(GetAdjacentChildPtr)
132-
133- GetAdjacentChildCls := &gtk.Widget{}
134- GetAdjacentChildCls.Ptr = GetAdjacentChildPtr
135- return GetAdjacentChildCls
136 128
129+ if cret == 0 {
130+ return cls
131+ }
132+ gobject.IncreaseRef(cret)
133+ cls = &gtk.Widget{}
134+ cls.Ptr = cret
135+ return cls
137 }136 }
138 137
139 var xLeafletGetCanNavigateBack func(uintptr) bool138 var xLeafletGetCanNavigateBack func(uintptr) bool
@@ -141,8 +140,8 @@ var xLeafletGetCanNavigateBack func(uintptr) bool
141 // Gets whether gestures and shortcuts for navigating backward are enabled.140 // Gets whether gestures and shortcuts for navigating backward are enabled.
142 func (x *Leaflet) GetCanNavigateBack() bool {141 func (x *Leaflet) GetCanNavigateBack() bool {
143 142
144- return xLeafletGetCanNavigateBack(x.GoPointer())143+ cret := xLeafletGetCanNavigateBack(x.GoPointer())
145-144+ return cret
146 }145 }
147 146
148 var xLeafletGetCanNavigateForward func(uintptr) bool147 var xLeafletGetCanNavigateForward func(uintptr) bool
@@ -150,8 +149,8 @@ var xLeafletGetCanNavigateForward func(uintptr) bool
150 // Gets whether gestures and shortcuts for navigating forward are enabled.149 // Gets whether gestures and shortcuts for navigating forward are enabled.
151 func (x *Leaflet) GetCanNavigateForward() bool {150 func (x *Leaflet) GetCanNavigateForward() bool {
152 151
153- return xLeafletGetCanNavigateForward(x.GoPointer())152+ cret := xLeafletGetCanNavigateForward(x.GoPointer())
154-153+ return cret
155 }154 }
156 155
157 var xLeafletGetCanUnfold func(uintptr) bool156 var xLeafletGetCanUnfold func(uintptr) bool
@@ -159,8 +158,8 @@ var xLeafletGetCanUnfold func(uintptr) bool
159 // Gets whether @self can unfold.158 // Gets whether @self can unfold.
160 func (x *Leaflet) GetCanUnfold() bool {159 func (x *Leaflet) GetCanUnfold() bool {
161 160
162- return xLeafletGetCanUnfold(x.GoPointer())161+ cret := xLeafletGetCanUnfold(x.GoPointer())
163-162+ return cret
164 }163 }
165 164
166 var xLeafletGetChildByName func(uintptr, string) uintptr165 var xLeafletGetChildByName func(uintptr, string) uintptr
@@ -171,18 +170,17 @@ var xLeafletGetChildByName func(uintptr, string) uintptr
171 //170 //
172 // See [property@LeafletPage:name].171 // See [property@LeafletPage:name].
173 func (x *Leaflet) GetChildByName(NameVar string) *gtk.Widget {172 func (x *Leaflet) GetChildByName(NameVar string) *gtk.Widget {
173+ var cls *gtk.Widget
174 174
175- GetChildByNamePtr := xLeafletGetChildByName(x.GoPointer(), NameVar)175+ cret := xLeafletGetChildByName(x.GoPointer(), NameVar)
176- if GetChildByNamePtr == 0 {
177- return nil
178- }
179-
180- gobject.IncreaseRef(GetChildByNamePtr)
181-
182- GetChildByNameCls := &gtk.Widget{}
183- GetChildByNameCls.Ptr = GetChildByNamePtr
184- return GetChildByNameCls
185 176
177+ if cret == 0 {
178+ return cls
179+ }
180+ gobject.IncreaseRef(cret)
181+ cls = &gtk.Widget{}
182+ cls.Ptr = cret
183+ return cls
186 }184 }
187 185
188 var xLeafletGetChildTransitionParams func(uintptr) *SpringParams186 var xLeafletGetChildTransitionParams func(uintptr) *SpringParams
@@ -190,8 +188,8 @@ var xLeafletGetChildTransitionParams func(uintptr) *SpringParams
190 // Gets the child transition spring parameters for @self.188 // Gets the child transition spring parameters for @self.
191 func (x *Leaflet) GetChildTransitionParams() *SpringParams {189 func (x *Leaflet) GetChildTransitionParams() *SpringParams {
192 190
193- return xLeafletGetChildTransitionParams(x.GoPointer())191+ cret := xLeafletGetChildTransitionParams(x.GoPointer())
194-192+ return cret
195 }193 }
196 194
197 var xLeafletGetChildTransitionRunning func(uintptr) bool195 var xLeafletGetChildTransitionRunning func(uintptr) bool
@@ -199,8 +197,8 @@ var xLeafletGetChildTransitionRunning func(uintptr) bool
199 // Gets whether a child transition is currently running for @self.197 // Gets whether a child transition is currently running for @self.
200 func (x *Leaflet) GetChildTransitionRunning() bool {198 func (x *Leaflet) GetChildTransitionRunning() bool {
201 199
202- return xLeafletGetChildTransitionRunning(x.GoPointer())200+ cret := xLeafletGetChildTransitionRunning(x.GoPointer())
203-201+ return cret
204 }202 }
205 203
206 var xLeafletGetFoldThresholdPolicy func(uintptr) FoldThresholdPolicy204 var xLeafletGetFoldThresholdPolicy func(uintptr) FoldThresholdPolicy
@@ -208,8 +206,8 @@ var xLeafletGetFoldThresholdPolicy func(uintptr) FoldThresholdPolicy
208 // Gets the fold threshold policy for @self.206 // Gets the fold threshold policy for @self.
209 func (x *Leaflet) GetFoldThresholdPolicy() FoldThresholdPolicy {207 func (x *Leaflet) GetFoldThresholdPolicy() FoldThresholdPolicy {
210 208
211- return xLeafletGetFoldThresholdPolicy(x.GoPointer())209+ cret := xLeafletGetFoldThresholdPolicy(x.GoPointer())
212-210+ return cret
213 }211 }
214 212
215 var xLeafletGetFolded func(uintptr) bool213 var xLeafletGetFolded func(uintptr) bool
@@ -221,8 +219,8 @@ var xLeafletGetFolded func(uintptr) bool
221 // [property@Leaflet:fold-threshold-policy]), it will be unfolded otherwise.219 // [property@Leaflet:fold-threshold-policy]), it will be unfolded otherwise.
222 func (x *Leaflet) GetFolded() bool {220 func (x *Leaflet) GetFolded() bool {
223 221
224- return xLeafletGetFolded(x.GoPointer())222+ cret := xLeafletGetFolded(x.GoPointer())
225-223+ return cret
226 }224 }
227 225
228 var xLeafletGetHomogeneous func(uintptr) bool226 var xLeafletGetHomogeneous func(uintptr) bool
@@ -230,8 +228,8 @@ var xLeafletGetHomogeneous func(uintptr) bool
230 // Gets whether @self is homogeneous.228 // Gets whether @self is homogeneous.
231 func (x *Leaflet) GetHomogeneous() bool {229 func (x *Leaflet) GetHomogeneous() bool {
232 230
233- return xLeafletGetHomogeneous(x.GoPointer())231+ cret := xLeafletGetHomogeneous(x.GoPointer())
234-232+ return cret
235 }233 }
236 234
237 var xLeafletGetModeTransitionDuration func(uintptr) uint235 var xLeafletGetModeTransitionDuration func(uintptr) uint
@@ -239,26 +237,25 @@ var xLeafletGetModeTransitionDuration func(uintptr) uint
239 // Gets the mode transition animation duration for @self.237 // Gets the mode transition animation duration for @self.
240 func (x *Leaflet) GetModeTransitionDuration() uint {238 func (x *Leaflet) GetModeTransitionDuration() uint {
241 239
242- return xLeafletGetModeTransitionDuration(x.GoPointer())240+ cret := xLeafletGetModeTransitionDuration(x.GoPointer())
243-241+ return cret
244 }242 }
245 243
246 var xLeafletGetPage func(uintptr, uintptr) uintptr244 var xLeafletGetPage func(uintptr, uintptr) uintptr
247 245
248 // Returns the [class@LeafletPage] object for @child.246 // Returns the [class@LeafletPage] object for @child.
249 func (x *Leaflet) GetPage(ChildVar *gtk.Widget) *LeafletPage {247 func (x *Leaflet) GetPage(ChildVar *gtk.Widget) *LeafletPage {
248+ var cls *LeafletPage
250 249
251- GetPagePtr := xLeafletGetPage(x.GoPointer(), ChildVar.GoPointer())250+ cret := xLeafletGetPage(x.GoPointer(), ChildVar.GoPointer())
252- if GetPagePtr == 0 {
253- return nil
254- }
255-
256- gobject.IncreaseRef(GetPagePtr)
257-
258- GetPageCls := &LeafletPage{}
259- GetPageCls.Ptr = GetPagePtr
260- return GetPageCls
261 251
252+ if cret == 0 {
253+ return cls
254+ }
255+ gobject.IncreaseRef(cret)
256+ cls = &LeafletPage{}
257+ cls.Ptr = cret
258+ return cls
262 }259 }
263 260
264 var xLeafletGetPages func(uintptr) uintptr261 var xLeafletGetPages func(uintptr) uintptr
@@ -269,16 +266,16 @@ var xLeafletGetPages func(uintptr) uintptr
269 // [iface@Gtk.SelectionModel] and can be used to track and change the visible266 // [iface@Gtk.SelectionModel] and can be used to track and change the visible
270 // page.267 // page.
271 func (x *Leaflet) GetPages() *gtk.SelectionModelBase {268 func (x *Leaflet) GetPages() *gtk.SelectionModelBase {
269+ var cls *gtk.SelectionModelBase
272 270
273- GetPagesPtr := xLeafletGetPages(x.GoPointer())271+ cret := xLeafletGetPages(x.GoPointer())
274- if GetPagesPtr == 0 {
275- return nil
276- }
277-
278- GetPagesCls := &gtk.SelectionModelBase{}
279- GetPagesCls.Ptr = GetPagesPtr
280- return GetPagesCls
281 272
273+ if cret == 0 {
274+ return cls
275+ }
276+ cls = &gtk.SelectionModelBase{}
277+ cls.Ptr = cret
278+ return cls
282 }279 }
283 280
284 var xLeafletGetTransitionType func(uintptr) LeafletTransitionType281 var xLeafletGetTransitionType func(uintptr) LeafletTransitionType
@@ -286,26 +283,25 @@ var xLeafletGetTransitionType func(uintptr) LeafletTransitionType
286 // Gets the type of animation used for transitions between modes and children.283 // Gets the type of animation used for transitions between modes and children.
287 func (x *Leaflet) GetTransitionType() LeafletTransitionType {284 func (x *Leaflet) GetTransitionType() LeafletTransitionType {
288 285
289- return xLeafletGetTransitionType(x.GoPointer())286+ cret := xLeafletGetTransitionType(x.GoPointer())
290-287+ return cret
291 }288 }
292 289
293 var xLeafletGetVisibleChild func(uintptr) uintptr290 var xLeafletGetVisibleChild func(uintptr) uintptr
294 291
295 // Gets the widget currently visible when the leaflet is folded.292 // Gets the widget currently visible when the leaflet is folded.
296 func (x *Leaflet) GetVisibleChild() *gtk.Widget {293 func (x *Leaflet) GetVisibleChild() *gtk.Widget {
294+ var cls *gtk.Widget
297 295
298- GetVisibleChildPtr := xLeafletGetVisibleChild(x.GoPointer())296+ cret := xLeafletGetVisibleChild(x.GoPointer())
299- if GetVisibleChildPtr == 0 {
300- return nil
301- }
302-
303- gobject.IncreaseRef(GetVisibleChildPtr)
304-
305- GetVisibleChildCls := &gtk.Widget{}
306- GetVisibleChildCls.Ptr = GetVisibleChildPtr
307- return GetVisibleChildCls
308 297
298+ if cret == 0 {
299+ return cls
300+ }
301+ gobject.IncreaseRef(cret)
302+ cls = &gtk.Widget{}
303+ cls.Ptr = cret
304+ return cls
309 }305 }
310 306
311 var xLeafletGetVisibleChildName func(uintptr) string307 var xLeafletGetVisibleChildName func(uintptr) string
@@ -313,8 +309,8 @@ var xLeafletGetVisibleChildName func(uintptr) string
313 // Gets the name of the currently visible child widget.309 // Gets the name of the currently visible child widget.
314 func (x *Leaflet) GetVisibleChildName() string {310 func (x *Leaflet) GetVisibleChildName() string {
315 311
316- return xLeafletGetVisibleChildName(x.GoPointer())312+ cret := xLeafletGetVisibleChildName(x.GoPointer())
317-313+ return cret
318 }314 }
319 315
320 var xLeafletInsertChildAfter func(uintptr, uintptr, uintptr) uintptr316 var xLeafletInsertChildAfter func(uintptr, uintptr, uintptr) uintptr
@@ -323,18 +319,17 @@ var xLeafletInsertChildAfter func(uintptr, uintptr, uintptr) uintptr
323 //319 //
324 // If @sibling is `NULL`, inserts @child at the first position.320 // If @sibling is `NULL`, inserts @child at the first position.
325 func (x *Leaflet) InsertChildAfter(ChildVar *gtk.Widget, SiblingVar *gtk.Widget) *LeafletPage {321 func (x *Leaflet) InsertChildAfter(ChildVar *gtk.Widget, SiblingVar *gtk.Widget) *LeafletPage {
322+ var cls *LeafletPage
326 323
327- InsertChildAfterPtr := xLeafletInsertChildAfter(x.GoPointer(), ChildVar.GoPointer(), SiblingVar.GoPointer())324+ cret := xLeafletInsertChildAfter(x.GoPointer(), ChildVar.GoPointer(), SiblingVar.GoPointer())
328- if InsertChildAfterPtr == 0 {
329- return nil
330- }
331-
332- gobject.IncreaseRef(InsertChildAfterPtr)
333-
334- InsertChildAfterCls := &LeafletPage{}
335- InsertChildAfterCls.Ptr = InsertChildAfterPtr
336- return InsertChildAfterCls
337 325
326+ if cret == 0 {
327+ return cls
328+ }
329+ gobject.IncreaseRef(cret)
330+ cls = &LeafletPage{}
331+ cls.Ptr = cret
332+ return cls
338 }333 }
339 334
340 var xLeafletNavigate func(uintptr, NavigationDirection) bool335 var xLeafletNavigate func(uintptr, NavigationDirection) bool
@@ -348,26 +343,25 @@ var xLeafletNavigate func(uintptr, NavigationDirection) bool
348 // [method@Leaflet.get_adjacent_child] or navigated to via swipe gestures.343 // [method@Leaflet.get_adjacent_child] or navigated to via swipe gestures.
349 func (x *Leaflet) Navigate(DirectionVar NavigationDirection) bool {344 func (x *Leaflet) Navigate(DirectionVar NavigationDirection) bool {
350 345
351- return xLeafletNavigate(x.GoPointer(), DirectionVar)346+ cret := xLeafletNavigate(x.GoPointer(), DirectionVar)
352-347+ return cret
353 }348 }
354 349
355 var xLeafletPrepend func(uintptr, uintptr) uintptr350 var xLeafletPrepend func(uintptr, uintptr) uintptr
356 351
357 // Inserts @child at the first position in @self.352 // Inserts @child at the first position in @self.
358 func (x *Leaflet) Prepend(ChildVar *gtk.Widget) *LeafletPage {353 func (x *Leaflet) Prepend(ChildVar *gtk.Widget) *LeafletPage {
354+ var cls *LeafletPage
359 355
360- PrependPtr := xLeafletPrepend(x.GoPointer(), ChildVar.GoPointer())356+ cret := xLeafletPrepend(x.GoPointer(), ChildVar.GoPointer())
361- if PrependPtr == 0 {
362- return nil
363- }
364-
365- gobject.IncreaseRef(PrependPtr)
366-
367- PrependCls := &LeafletPage{}
368- PrependCls.Ptr = PrependPtr
369- return PrependCls
370 357
358+ if cret == 0 {
359+ return cls
360+ }
361+ gobject.IncreaseRef(cret)
362+ cls = &LeafletPage{}
363+ cls.Ptr = cret
364+ return cls
371 }365 }
372 366
373 var xLeafletRemove func(uintptr, uintptr)367 var xLeafletRemove func(uintptr, uintptr)
@@ -550,8 +544,8 @@ func (c *Leaflet) SetGoPointer(ptr uintptr) {
550 // Gets the progress @self will snap back to after the gesture is canceled.544 // Gets the progress @self will snap back to after the gesture is canceled.
551 func (x *Leaflet) GetCancelProgress() float64 {545 func (x *Leaflet) GetCancelProgress() float64 {
552 546
553- return XAdwSwipeableGetCancelProgress(x.GoPointer())547+ cret := XAdwSwipeableGetCancelProgress(x.GoPointer())
554-548+ return cret
555 }549 }
556 550
557 // Gets the swipe distance of @self.551 // Gets the swipe distance of @self.
@@ -559,15 +553,15 @@ func (x *Leaflet) GetCancelProgress() float64 {
559 // This corresponds to how many pixels 1 unit represents.553 // This corresponds to how many pixels 1 unit represents.
560 func (x *Leaflet) GetDistance() float64 {554 func (x *Leaflet) GetDistance() float64 {
561 555
562- return XAdwSwipeableGetDistance(x.GoPointer())556+ cret := XAdwSwipeableGetDistance(x.GoPointer())
563-557+ return cret
564 }558 }
565 559
566 // Gets the current progress of @self.560 // Gets the current progress of @self.
567 func (x *Leaflet) GetProgress() float64 {561 func (x *Leaflet) GetProgress() float64 {
568 562
569- return XAdwSwipeableGetProgress(x.GoPointer())563+ cret := XAdwSwipeableGetProgress(x.GoPointer())
570-564+ return cret
571 }565 }
572 566
573 // Gets the snap points of @self.567 // Gets the snap points of @self.
@@ -576,8 +570,8 @@ func (x *Leaflet) GetProgress() float64 {
576 // end the swipe on.570 // end the swipe on.
577 func (x *Leaflet) GetSnapPoints(NSnapPointsVar int) uintptr {571 func (x *Leaflet) GetSnapPoints(NSnapPointsVar int) uintptr {
578 572
579- return XAdwSwipeableGetSnapPoints(x.GoPointer(), NSnapPointsVar)573+ cret := XAdwSwipeableGetSnapPoints(x.GoPointer(), NSnapPointsVar)
580-574+ return cret
581 }575 }
582 576
583 // Gets the area @self can start a swipe from for the given direction and577 // Gets the area @self can start a swipe from for the given direction and
@@ -598,8 +592,8 @@ func (x *Leaflet) GetSwipeArea(NavigationDirectionVar NavigationDirection, IsDra
598 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.592 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
599 func (x *Leaflet) GetAccessibleRole() gtk.AccessibleRole {593 func (x *Leaflet) GetAccessibleRole() gtk.AccessibleRole {
600 594
601- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())595+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
602-596+ return cret
603 }597 }
604 598
605 // Resets the accessible @property to its default value.599 // Resets the accessible @property to its default value.
@@ -734,15 +728,15 @@ func (x *Leaflet) UpdateStateValue(NStatesVar int, StatesVar uintptr, ValuesVar
734 // of the <object> tag used to construct the @buildable.728 // of the <object> tag used to construct the @buildable.
735 func (x *Leaflet) GetBuildableId() string {729 func (x *Leaflet) GetBuildableId() string {
736 730
737- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())731+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
738-732+ return cret
739 }733 }
740 734
741 // Retrieves the orientation of the @orientable.735 // Retrieves the orientation of the @orientable.
742 func (x *Leaflet) GetOrientation() gtk.Orientation {736 func (x *Leaflet) GetOrientation() gtk.Orientation {
743 737
744- return gtk.XGtkOrientableGetOrientation(x.GoPointer())738+ cret := gtk.XGtkOrientableGetOrientation(x.GoPointer())
745-739+ return cret
746 }740 }
747 741
748 // Sets the orientation of the @orientable.742 // Sets the orientation of the @orientable.
@@ -767,18 +761,17 @@ var xLeafletPageGetChild func(uintptr) uintptr
767 761
768 // Gets the leaflet child to which @self belongs.762 // Gets the leaflet child to which @self belongs.
769 func (x *LeafletPage) GetChild() *gtk.Widget {763 func (x *LeafletPage) GetChild() *gtk.Widget {
764+ var cls *gtk.Widget
770 765
771- GetChildPtr := xLeafletPageGetChild(x.GoPointer())766+ cret := xLeafletPageGetChild(x.GoPointer())
772- if GetChildPtr == 0 {
773- return nil
774- }
775-
776- gobject.IncreaseRef(GetChildPtr)
777-
778- GetChildCls := &gtk.Widget{}
779- GetChildCls.Ptr = GetChildPtr
780- return GetChildCls
781 767
768+ if cret == 0 {
769+ return cls
770+ }
771+ gobject.IncreaseRef(cret)
772+ cls = &gtk.Widget{}
773+ cls.Ptr = cret
774+ return cls
782 }775 }
783 776
784 var xLeafletPageGetName func(uintptr) string777 var xLeafletPageGetName func(uintptr) string
@@ -786,8 +779,8 @@ var xLeafletPageGetName func(uintptr) string
786 // Gets the name of @self.779 // Gets the name of @self.
787 func (x *LeafletPage) GetName() string {780 func (x *LeafletPage) GetName() string {
788 781
789- return xLeafletPageGetName(x.GoPointer())782+ cret := xLeafletPageGetName(x.GoPointer())
790-783+ return cret
791 }784 }
792 785
793 var xLeafletPageGetNavigatable func(uintptr) bool786 var xLeafletPageGetNavigatable func(uintptr) bool
@@ -795,8 +788,8 @@ var xLeafletPageGetNavigatable func(uintptr) bool
795 // Gets whether the child can be navigated to when folded.788 // Gets whether the child can be navigated to when folded.
796 func (x *LeafletPage) GetNavigatable() bool {789 func (x *LeafletPage) GetNavigatable() bool {
797 790
798- return xLeafletPageGetNavigatable(x.GoPointer())791+ cret := xLeafletPageGetNavigatable(x.GoPointer())
799-792+ return cret
800 }793 }
801 794
802 var xLeafletPageSetName func(uintptr, string)795 var xLeafletPageSetName func(uintptr, string)
M v4/adw/adw-main.go +2 -2
@@ -31,8 +31,8 @@ var xIsInitialized func() bool
31 // [func@init].31 // [func@init].
32 func IsInitialized() bool {32 func IsInitialized() bool {
33 33
34- return xIsInitialized()34+ cret := xIsInitialized()
35-35+ return cret
36 }36 }
37 37
38 func init() {38 func init() {
M v4/adw/adw-message-dialog.go +80 -84
@@ -204,16 +204,17 @@ var xNewMessageDialog func(uintptr, string, string) uintptr
204 //204 //
205 // ```205 // ```
206 func NewMessageDialog(ParentVar *gtk.Window, HeadingVar string, BodyVar string) *gtk.Widget {206 func NewMessageDialog(ParentVar *gtk.Window, HeadingVar string, BodyVar string) *gtk.Widget {
207- NewMessageDialogPtr := xNewMessageDialog(ParentVar.GoPointer(), HeadingVar, BodyVar)207+ var cls *gtk.Widget
208- if NewMessageDialogPtr == 0 {
209- return nil
210- }
211 208
212- gobject.IncreaseRef(NewMessageDialogPtr)209+ cret := xNewMessageDialog(ParentVar.GoPointer(), HeadingVar, BodyVar)
213 210
214- NewMessageDialogCls := &gtk.Widget{}211+ if cret == 0 {
215- NewMessageDialogCls.Ptr = NewMessageDialogPtr212+ return cls
216- return NewMessageDialogCls213+ }
214+ gobject.IncreaseRef(cret)
215+ cls = &gtk.Widget{}
216+ cls.Ptr = cret
217+ return cls
217 }218 }
218 219
219 var xMessageDialogAddResponse func(uintptr, string, string)220 var xMessageDialogAddResponse func(uintptr, string, string)
@@ -282,8 +283,8 @@ var xMessageDialogChooseFinish func(uintptr, uintptr) string
282 // Finishes the [method@MessageDialog.choose] call and returns the response ID.283 // Finishes the [method@MessageDialog.choose] call and returns the response ID.
283 func (x *MessageDialog) ChooseFinish(ResultVar gio.AsyncResult) string {284 func (x *MessageDialog) ChooseFinish(ResultVar gio.AsyncResult) string {
284 285
285- return xMessageDialogChooseFinish(x.GoPointer(), ResultVar.GoPointer())286+ cret := xMessageDialogChooseFinish(x.GoPointer(), ResultVar.GoPointer())
286-287+ return cret
287 }288 }
288 289
289 var xMessageDialogFormatBody func(uintptr, string, ...interface{})290 var xMessageDialogFormatBody func(uintptr, string, ...interface{})
@@ -347,8 +348,8 @@ var xMessageDialogGetBody func(uintptr) string
347 // Gets the body text of @self.348 // Gets the body text of @self.
348 func (x *MessageDialog) GetBody() string {349 func (x *MessageDialog) GetBody() string {
349 350
350- return xMessageDialogGetBody(x.GoPointer())351+ cret := xMessageDialogGetBody(x.GoPointer())
351-352+ return cret
352 }353 }
353 354
354 var xMessageDialogGetBodyUseMarkup func(uintptr) bool355 var xMessageDialogGetBodyUseMarkup func(uintptr) bool
@@ -356,8 +357,8 @@ var xMessageDialogGetBodyUseMarkup func(uintptr) bool
356 // Gets whether the body text of @self includes Pango markup.357 // Gets whether the body text of @self includes Pango markup.
357 func (x *MessageDialog) GetBodyUseMarkup() bool {358 func (x *MessageDialog) GetBodyUseMarkup() bool {
358 359
359- return xMessageDialogGetBodyUseMarkup(x.GoPointer())360+ cret := xMessageDialogGetBodyUseMarkup(x.GoPointer())
360-361+ return cret
361 }362 }
362 363
363 var xMessageDialogGetCloseResponse func(uintptr) string364 var xMessageDialogGetCloseResponse func(uintptr) string
@@ -365,8 +366,8 @@ var xMessageDialogGetCloseResponse func(uintptr) string
365 // Gets the ID of the close response of @self.366 // Gets the ID of the close response of @self.
366 func (x *MessageDialog) GetCloseResponse() string {367 func (x *MessageDialog) GetCloseResponse() string {
367 368
368- return xMessageDialogGetCloseResponse(x.GoPointer())369+ cret := xMessageDialogGetCloseResponse(x.GoPointer())
369-370+ return cret
370 }371 }
371 372
372 var xMessageDialogGetDefaultResponse func(uintptr) string373 var xMessageDialogGetDefaultResponse func(uintptr) string
@@ -374,26 +375,25 @@ var xMessageDialogGetDefaultResponse func(uintptr) string
374 // Gets the ID of the default response of @self.375 // Gets the ID of the default response of @self.
375 func (x *MessageDialog) GetDefaultResponse() string {376 func (x *MessageDialog) GetDefaultResponse() string {
376 377
377- return xMessageDialogGetDefaultResponse(x.GoPointer())378+ cret := xMessageDialogGetDefaultResponse(x.GoPointer())
378-379+ return cret
379 }380 }
380 381
381 var xMessageDialogGetExtraChild func(uintptr) uintptr382 var xMessageDialogGetExtraChild func(uintptr) uintptr
382 383
383 // Gets the child widget of @self.384 // Gets the child widget of @self.
384 func (x *MessageDialog) GetExtraChild() *gtk.Widget {385 func (x *MessageDialog) GetExtraChild() *gtk.Widget {
386+ var cls *gtk.Widget
385 387
386- GetExtraChildPtr := xMessageDialogGetExtraChild(x.GoPointer())388+ cret := xMessageDialogGetExtraChild(x.GoPointer())
387- if GetExtraChildPtr == 0 {
388- return nil
389- }
390-
391- gobject.IncreaseRef(GetExtraChildPtr)
392-
393- GetExtraChildCls := &gtk.Widget{}
394- GetExtraChildCls.Ptr = GetExtraChildPtr
395- return GetExtraChildCls
396 389
390+ if cret == 0 {
391+ return cls
392+ }
393+ gobject.IncreaseRef(cret)
394+ cls = &gtk.Widget{}
395+ cls.Ptr = cret
396+ return cls
397 }397 }
398 398
399 var xMessageDialogGetHeading func(uintptr) string399 var xMessageDialogGetHeading func(uintptr) string
@@ -401,8 +401,8 @@ var xMessageDialogGetHeading func(uintptr) string
401 // Gets the heading of @self.401 // Gets the heading of @self.
402 func (x *MessageDialog) GetHeading() string {402 func (x *MessageDialog) GetHeading() string {
403 403
404- return xMessageDialogGetHeading(x.GoPointer())404+ cret := xMessageDialogGetHeading(x.GoPointer())
405-405+ return cret
406 }406 }
407 407
408 var xMessageDialogGetHeadingUseMarkup func(uintptr) bool408 var xMessageDialogGetHeadingUseMarkup func(uintptr) bool
@@ -410,8 +410,8 @@ var xMessageDialogGetHeadingUseMarkup func(uintptr) bool
410 // Gets whether the heading of @self includes Pango markup.410 // Gets whether the heading of @self includes Pango markup.
411 func (x *MessageDialog) GetHeadingUseMarkup() bool {411 func (x *MessageDialog) GetHeadingUseMarkup() bool {
412 412
413- return xMessageDialogGetHeadingUseMarkup(x.GoPointer())413+ cret := xMessageDialogGetHeadingUseMarkup(x.GoPointer())
414-414+ return cret
415 }415 }
416 416
417 var xMessageDialogGetResponseAppearance func(uintptr, string) ResponseAppearance417 var xMessageDialogGetResponseAppearance func(uintptr, string) ResponseAppearance
@@ -421,8 +421,8 @@ var xMessageDialogGetResponseAppearance func(uintptr, string) ResponseAppearance
421 // See [method@MessageDialog.set_response_appearance].421 // See [method@MessageDialog.set_response_appearance].
422 func (x *MessageDialog) GetResponseAppearance(ResponseVar string) ResponseAppearance {422 func (x *MessageDialog) GetResponseAppearance(ResponseVar string) ResponseAppearance {
423 423
424- return xMessageDialogGetResponseAppearance(x.GoPointer(), ResponseVar)424+ cret := xMessageDialogGetResponseAppearance(x.GoPointer(), ResponseVar)
425-425+ return cret
426 }426 }
427 427
428 var xMessageDialogGetResponseEnabled func(uintptr, string) bool428 var xMessageDialogGetResponseEnabled func(uintptr, string) bool
@@ -432,8 +432,8 @@ var xMessageDialogGetResponseEnabled func(uintptr, string) bool
432 // See [method@MessageDialog.set_response_enabled].432 // See [method@MessageDialog.set_response_enabled].
433 func (x *MessageDialog) GetResponseEnabled(ResponseVar string) bool {433 func (x *MessageDialog) GetResponseEnabled(ResponseVar string) bool {
434 434
435- return xMessageDialogGetResponseEnabled(x.GoPointer(), ResponseVar)435+ cret := xMessageDialogGetResponseEnabled(x.GoPointer(), ResponseVar)
436-436+ return cret
437 }437 }
438 438
439 var xMessageDialogGetResponseLabel func(uintptr, string) string439 var xMessageDialogGetResponseLabel func(uintptr, string) string
@@ -443,8 +443,8 @@ var xMessageDialogGetResponseLabel func(uintptr, string) string
443 // See [method@MessageDialog.set_response_label].443 // See [method@MessageDialog.set_response_label].
444 func (x *MessageDialog) GetResponseLabel(ResponseVar string) string {444 func (x *MessageDialog) GetResponseLabel(ResponseVar string) string {
445 445
446- return xMessageDialogGetResponseLabel(x.GoPointer(), ResponseVar)446+ cret := xMessageDialogGetResponseLabel(x.GoPointer(), ResponseVar)
447-447+ return cret
448 }448 }
449 449
450 var xMessageDialogHasResponse func(uintptr, string) bool450 var xMessageDialogHasResponse func(uintptr, string) bool
@@ -452,8 +452,8 @@ var xMessageDialogHasResponse func(uintptr, string) bool
452 // Gets whether @self has a response with the ID @response.452 // Gets whether @self has a response with the ID @response.
453 func (x *MessageDialog) HasResponse(ResponseVar string) bool {453 func (x *MessageDialog) HasResponse(ResponseVar string) bool {
454 454
455- return xMessageDialogHasResponse(x.GoPointer(), ResponseVar)455+ cret := xMessageDialogHasResponse(x.GoPointer(), ResponseVar)
456-456+ return cret
457 }457 }
458 458
459 var xMessageDialogResponse func(uintptr, string)459 var xMessageDialogResponse func(uintptr, string)
@@ -635,8 +635,8 @@ func (x *MessageDialog) ConnectResponse(cb func(MessageDialog, string)) {
635 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.635 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
636 func (x *MessageDialog) GetAccessibleRole() gtk.AccessibleRole {636 func (x *MessageDialog) GetAccessibleRole() gtk.AccessibleRole {
637 637
638- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())638+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
639-639+ return cret
640 }640 }
641 641
642 // Resets the accessible @property to its default value.642 // Resets the accessible @property to its default value.
@@ -771,40 +771,38 @@ func (x *MessageDialog) UpdateStateValue(NStatesVar int, StatesVar uintptr, Valu
771 // of the <object> tag used to construct the @buildable.771 // of the <object> tag used to construct the @buildable.
772 func (x *MessageDialog) GetBuildableId() string {772 func (x *MessageDialog) GetBuildableId() string {
773 773
774- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())774+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
775-775+ return cret
776 }776 }
777 777
778 // Returns the renderer that is used for this `GtkNative`.778 // Returns the renderer that is used for this `GtkNative`.
779 func (x *MessageDialog) GetRenderer() *gsk.Renderer {779 func (x *MessageDialog) GetRenderer() *gsk.Renderer {
780+ var cls *gsk.Renderer
780 781
781- GetRendererPtr := gtk.XGtkNativeGetRenderer(x.GoPointer())782+ cret := gtk.XGtkNativeGetRenderer(x.GoPointer())
782- if GetRendererPtr == 0 {
783- return nil
784- }
785-
786- gobject.IncreaseRef(GetRendererPtr)
787-
788- GetRendererCls := &gsk.Renderer{}
789- GetRendererCls.Ptr = GetRendererPtr
790- return GetRendererCls
791 783
784+ if cret == 0 {
785+ return cls
786+ }
787+ gobject.IncreaseRef(cret)
788+ cls = &gsk.Renderer{}
789+ cls.Ptr = cret
790+ return cls
792 }791 }
793 792
794 // Returns the surface of this `GtkNative`.793 // Returns the surface of this `GtkNative`.
795 func (x *MessageDialog) GetSurface() *gdk.Surface {794 func (x *MessageDialog) GetSurface() *gdk.Surface {
795+ var cls *gdk.Surface
796 796
797- GetSurfacePtr := gtk.XGtkNativeGetSurface(x.GoPointer())797+ cret := gtk.XGtkNativeGetSurface(x.GoPointer())
798- if GetSurfacePtr == 0 {
799- return nil
800- }
801-
802- gobject.IncreaseRef(GetSurfacePtr)
803-
804- GetSurfaceCls := &gdk.Surface{}
805- GetSurfaceCls.Ptr = GetSurfacePtr
806- return GetSurfaceCls
807 798
799+ if cret == 0 {
800+ return cls
801+ }
802+ gobject.IncreaseRef(cret)
803+ cls = &gdk.Surface{}
804+ cls.Ptr = cret
805+ return cls
808 }806 }
809 807
810 // Retrieves the surface transform of @self.808 // Retrieves the surface transform of @self.
@@ -837,18 +835,17 @@ func (x *MessageDialog) Unrealize() {
837 835
838 // Returns the display that this `GtkRoot` is on.836 // Returns the display that this `GtkRoot` is on.
839 func (x *MessageDialog) GetDisplay() *gdk.Display {837 func (x *MessageDialog) GetDisplay() *gdk.Display {
838+ var cls *gdk.Display
840 839
841- GetDisplayPtr := gtk.XGtkRootGetDisplay(x.GoPointer())840+ cret := gtk.XGtkRootGetDisplay(x.GoPointer())
842- if GetDisplayPtr == 0 {
843- return nil
844- }
845-
846- gobject.IncreaseRef(GetDisplayPtr)
847-
848- GetDisplayCls := &gdk.Display{}
849- GetDisplayCls.Ptr = GetDisplayPtr
850- return GetDisplayCls
851 841
842+ if cret == 0 {
843+ return cls
844+ }
845+ gobject.IncreaseRef(cret)
846+ cls = &gdk.Display{}
847+ cls.Ptr = cret
848+ return cls
852 }849 }
853 850
854 // Retrieves the current focused widget within the root.851 // Retrieves the current focused widget within the root.
@@ -858,18 +855,17 @@ func (x *MessageDialog) GetDisplay() *gdk.Display {
858 // `gtk_widget_has_focus (widget)` will be %FALSE for the855 // `gtk_widget_has_focus (widget)` will be %FALSE for the
859 // widget.856 // widget.
860 func (x *MessageDialog) GetFocus() *gtk.Widget {857 func (x *MessageDialog) GetFocus() *gtk.Widget {
858+ var cls *gtk.Widget
861 859
862- GetFocusPtr := gtk.XGtkRootGetFocus(x.GoPointer())860+ cret := gtk.XGtkRootGetFocus(x.GoPointer())
863- if GetFocusPtr == 0 {
864- return nil
865- }
866-
867- gobject.IncreaseRef(GetFocusPtr)
868-
869- GetFocusCls := &gtk.Widget{}
870- GetFocusCls.Ptr = GetFocusPtr
871- return GetFocusCls
872 861
862+ if cret == 0 {
863+ return cls
864+ }
865+ gobject.IncreaseRef(cret)
866+ cls = &gtk.Widget{}
867+ cls.Ptr = cret
868+ return cls
873 }869 }
874 870
875 // If @focus is not the current focus widget, and is focusable, sets871 // If @focus is not the current focus widget, and is focusable, sets
M v4/adw/adw-password-entry-row.go +44 -44
@@ -48,16 +48,17 @@ var xNewPasswordEntryRow func() uintptr
48 48
49 // Creates a new `AdwPasswordEntryRow`.49 // Creates a new `AdwPasswordEntryRow`.
50 func NewPasswordEntryRow() *gtk.Widget {50 func NewPasswordEntryRow() *gtk.Widget {
51- NewPasswordEntryRowPtr := xNewPasswordEntryRow()51+ var cls *gtk.Widget
52- if NewPasswordEntryRowPtr == 0 {
53- return nil
54- }
55 52
56- gobject.IncreaseRef(NewPasswordEntryRowPtr)53+ cret := xNewPasswordEntryRow()
57 54
58- NewPasswordEntryRowCls := &gtk.Widget{}55+ if cret == 0 {
59- NewPasswordEntryRowCls.Ptr = NewPasswordEntryRowPtr56+ return cls
60- return NewPasswordEntryRowCls57+ }
58+ gobject.IncreaseRef(cret)
59+ cls = &gtk.Widget{}
60+ cls.Ptr = cret
61+ return cls
61 }62 }
62 63
63 func (c *PasswordEntryRow) GoPointer() uintptr {64 func (c *PasswordEntryRow) GoPointer() uintptr {
@@ -71,8 +72,8 @@ func (c *PasswordEntryRow) SetGoPointer(ptr uintptr) {
71 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.72 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
72 func (x *PasswordEntryRow) GetAccessibleRole() gtk.AccessibleRole {73 func (x *PasswordEntryRow) GetAccessibleRole() gtk.AccessibleRole {
73 74
74- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())75+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
75-76+ return cret
76 }77 }
77 78
78 // Resets the accessible @property to its default value.79 // Resets the accessible @property to its default value.
@@ -204,15 +205,15 @@ func (x *PasswordEntryRow) UpdateStateValue(NStatesVar int, StatesVar uintptr, V
204 // Gets the action name for @actionable.205 // Gets the action name for @actionable.
205 func (x *PasswordEntryRow) GetActionName() string {206 func (x *PasswordEntryRow) GetActionName() string {
206 207
207- return gtk.XGtkActionableGetActionName(x.GoPointer())208+ cret := gtk.XGtkActionableGetActionName(x.GoPointer())
208-209+ return cret
209 }210 }
210 211
211 // Gets the current target value of @actionable.212 // Gets the current target value of @actionable.
212 func (x *PasswordEntryRow) GetActionTargetValue() *glib.Variant {213 func (x *PasswordEntryRow) GetActionTargetValue() *glib.Variant {
213 214
214- return gtk.XGtkActionableGetActionTargetValue(x.GoPointer())215+ cret := gtk.XGtkActionableGetActionTargetValue(x.GoPointer())
215-216+ return cret
216 }217 }
217 218
218 // Specifies the name of the action with which this widget should be219 // Specifies the name of the action with which this widget should be
@@ -290,8 +291,8 @@ func (x *PasswordEntryRow) SetDetailedActionName(DetailedActionNameVar string) {
290 // of the <object> tag used to construct the @buildable.291 // of the <object> tag used to construct the @buildable.
291 func (x *PasswordEntryRow) GetBuildableId() string {292 func (x *PasswordEntryRow) GetBuildableId() string {
292 293
293- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())294+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
294-295+ return cret
295 }296 }
296 297
297 // Deletes the currently selected text of the editable.298 // Deletes the currently selected text of the editable.
@@ -330,8 +331,8 @@ func (x *PasswordEntryRow) FinishDelegate() {
330 // Gets the alignment of the editable.331 // Gets the alignment of the editable.
331 func (x *PasswordEntryRow) GetAlignment() float32 {332 func (x *PasswordEntryRow) GetAlignment() float32 {
332 333
333- return gtk.XGtkEditableGetAlignment(x.GoPointer())334+ cret := gtk.XGtkEditableGetAlignment(x.GoPointer())
334-335+ return cret
335 }336 }
336 337
337 // Retrieves a sequence of characters.338 // Retrieves a sequence of characters.
@@ -344,8 +345,8 @@ func (x *PasswordEntryRow) GetAlignment() float32 {
344 // Note that positions are specified in characters, not bytes.345 // Note that positions are specified in characters, not bytes.
345 func (x *PasswordEntryRow) GetChars(StartPosVar int, EndPosVar int) string {346 func (x *PasswordEntryRow) GetChars(StartPosVar int, EndPosVar int) string {
346 347
347- return gtk.XGtkEditableGetChars(x.GoPointer(), StartPosVar, EndPosVar)348+ cret := gtk.XGtkEditableGetChars(x.GoPointer(), StartPosVar, EndPosVar)
348-349+ return cret
349 }350 }
350 351
351 // Gets the `GtkEditable` that @editable is delegating its352 // Gets the `GtkEditable` that @editable is delegating its
@@ -353,39 +354,38 @@ func (x *PasswordEntryRow) GetChars(StartPosVar int, EndPosVar int) string {
353 //354 //
354 // Typically, the delegate is a [class@Gtk.Text] widget.355 // Typically, the delegate is a [class@Gtk.Text] widget.
355 func (x *PasswordEntryRow) GetDelegate() *gtk.EditableBase {356 func (x *PasswordEntryRow) GetDelegate() *gtk.EditableBase {
357+ var cls *gtk.EditableBase
356 358
357- GetDelegatePtr := gtk.XGtkEditableGetDelegate(x.GoPointer())359+ cret := gtk.XGtkEditableGetDelegate(x.GoPointer())
358- if GetDelegatePtr == 0 {
359- return nil
360- }
361-
362- gobject.IncreaseRef(GetDelegatePtr)
363-
364- GetDelegateCls := &gtk.EditableBase{}
365- GetDelegateCls.Ptr = GetDelegatePtr
366- return GetDelegateCls
367 360
361+ if cret == 0 {
362+ return cls
363+ }
364+ gobject.IncreaseRef(cret)
365+ cls = &gtk.EditableBase{}
366+ cls.Ptr = cret
367+ return cls
368 }368 }
369 369
370 // Retrieves whether @editable is editable.370 // Retrieves whether @editable is editable.
371 func (x *PasswordEntryRow) GetEditable() bool {371 func (x *PasswordEntryRow) GetEditable() bool {
372 372
373- return gtk.XGtkEditableGetEditable(x.GoPointer())373+ cret := gtk.XGtkEditableGetEditable(x.GoPointer())
374-374+ return cret
375 }375 }
376 376
377 // Gets if undo/redo actions are enabled for @editable377 // Gets if undo/redo actions are enabled for @editable
378 func (x *PasswordEntryRow) GetEnableUndo() bool {378 func (x *PasswordEntryRow) GetEnableUndo() bool {
379 379
380- return gtk.XGtkEditableGetEnableUndo(x.GoPointer())380+ cret := gtk.XGtkEditableGetEnableUndo(x.GoPointer())
381-381+ return cret
382 }382 }
383 383
384 // Retrieves the desired maximum width of @editable, in characters.384 // Retrieves the desired maximum width of @editable, in characters.
385 func (x *PasswordEntryRow) GetMaxWidthChars() int {385 func (x *PasswordEntryRow) GetMaxWidthChars() int {
386 386
387- return gtk.XGtkEditableGetMaxWidthChars(x.GoPointer())387+ cret := gtk.XGtkEditableGetMaxWidthChars(x.GoPointer())
388-388+ return cret
389 }389 }
390 390
391 // Retrieves the current position of the cursor relative391 // Retrieves the current position of the cursor relative
@@ -394,8 +394,8 @@ func (x *PasswordEntryRow) GetMaxWidthChars() int {
394 // Note that this position is in characters, not in bytes.394 // Note that this position is in characters, not in bytes.
395 func (x *PasswordEntryRow) GetPosition() int {395 func (x *PasswordEntryRow) GetPosition() int {
396 396
397- return gtk.XGtkEditableGetPosition(x.GoPointer())397+ cret := gtk.XGtkEditableGetPosition(x.GoPointer())
398-398+ return cret
399 }399 }
400 400
401 // Retrieves the selection bound of the editable.401 // Retrieves the selection bound of the editable.
@@ -407,8 +407,8 @@ func (x *PasswordEntryRow) GetPosition() int {
407 // Note that positions are specified in characters, not bytes.407 // Note that positions are specified in characters, not bytes.
408 func (x *PasswordEntryRow) GetSelectionBounds(StartPosVar int, EndPosVar int) bool {408 func (x *PasswordEntryRow) GetSelectionBounds(StartPosVar int, EndPosVar int) bool {
409 409
410- return gtk.XGtkEditableGetSelectionBounds(x.GoPointer(), StartPosVar, EndPosVar)410+ cret := gtk.XGtkEditableGetSelectionBounds(x.GoPointer(), StartPosVar, EndPosVar)
411-411+ return cret
412 }412 }
413 413
414 // Retrieves the contents of @editable.414 // Retrieves the contents of @editable.
@@ -416,16 +416,16 @@ func (x *PasswordEntryRow) GetSelectionBounds(StartPosVar int, EndPosVar int) bo
416 // The returned string is owned by GTK and must not be modified or freed.416 // The returned string is owned by GTK and must not be modified or freed.
417 func (x *PasswordEntryRow) GetText() string {417 func (x *PasswordEntryRow) GetText() string {
418 418
419- return gtk.XGtkEditableGetText(x.GoPointer())419+ cret := gtk.XGtkEditableGetText(x.GoPointer())
420-420+ return cret
421 }421 }
422 422
423 // Gets the number of characters of space reserved423 // Gets the number of characters of space reserved
424 // for the contents of the editable.424 // for the contents of the editable.
425 func (x *PasswordEntryRow) GetWidthChars() int {425 func (x *PasswordEntryRow) GetWidthChars() int {
426 426
427- return gtk.XGtkEditableGetWidthChars(x.GoPointer())427+ cret := gtk.XGtkEditableGetWidthChars(x.GoPointer())
428-428+ return cret
429 }429 }
430 430
431 // Sets up a delegate for `GtkEditable`.431 // Sets up a delegate for `GtkEditable`.
M v4/adw/adw-preferences-group.go +26 -26
@@ -61,16 +61,17 @@ var xNewPreferencesGroup func() uintptr
61 61
62 // Creates a new `AdwPreferencesGroup`.62 // Creates a new `AdwPreferencesGroup`.
63 func NewPreferencesGroup() *gtk.Widget {63 func NewPreferencesGroup() *gtk.Widget {
64- NewPreferencesGroupPtr := xNewPreferencesGroup()64+ var cls *gtk.Widget
65- if NewPreferencesGroupPtr == 0 {
66- return nil
67- }
68 65
69- gobject.IncreaseRef(NewPreferencesGroupPtr)66+ cret := xNewPreferencesGroup()
70 67
71- NewPreferencesGroupCls := &gtk.Widget{}68+ if cret == 0 {
72- NewPreferencesGroupCls.Ptr = NewPreferencesGroupPtr69+ return cls
73- return NewPreferencesGroupCls70+ }
71+ gobject.IncreaseRef(cret)
72+ cls = &gtk.Widget{}
73+ cls.Ptr = cret
74+ return cls
74 }75 }
75 76
76 var xPreferencesGroupAdd func(uintptr, uintptr)77 var xPreferencesGroupAdd func(uintptr, uintptr)
@@ -87,26 +88,25 @@ var xPreferencesGroupGetDescription func(uintptr) string
87 // Gets the description of @self.88 // Gets the description of @self.
88 func (x *PreferencesGroup) GetDescription() string {89 func (x *PreferencesGroup) GetDescription() string {
89 90
90- return xPreferencesGroupGetDescription(x.GoPointer())91+ cret := xPreferencesGroupGetDescription(x.GoPointer())
91-92+ return cret
92 }93 }
93 94
94 var xPreferencesGroupGetHeaderSuffix func(uintptr) uintptr95 var xPreferencesGroupGetHeaderSuffix func(uintptr) uintptr
95 96
96 // Gets the suffix for @self's header.97 // Gets the suffix for @self's header.
97 func (x *PreferencesGroup) GetHeaderSuffix() *gtk.Widget {98 func (x *PreferencesGroup) GetHeaderSuffix() *gtk.Widget {
99+ var cls *gtk.Widget
98 100
99- GetHeaderSuffixPtr := xPreferencesGroupGetHeaderSuffix(x.GoPointer())101+ cret := xPreferencesGroupGetHeaderSuffix(x.GoPointer())
100- if GetHeaderSuffixPtr == 0 {
101- return nil
102- }
103-
104- gobject.IncreaseRef(GetHeaderSuffixPtr)
105-
106- GetHeaderSuffixCls := &gtk.Widget{}
107- GetHeaderSuffixCls.Ptr = GetHeaderSuffixPtr
108- return GetHeaderSuffixCls
109 102
103+ if cret == 0 {
104+ return cls
105+ }
106+ gobject.IncreaseRef(cret)
107+ cls = &gtk.Widget{}
108+ cls.Ptr = cret
109+ return cls
110 }110 }
111 111
112 var xPreferencesGroupGetTitle func(uintptr) string112 var xPreferencesGroupGetTitle func(uintptr) string
@@ -114,8 +114,8 @@ var xPreferencesGroupGetTitle func(uintptr) string
114 // Gets the title of @self.114 // Gets the title of @self.
115 func (x *PreferencesGroup) GetTitle() string {115 func (x *PreferencesGroup) GetTitle() string {
116 116
117- return xPreferencesGroupGetTitle(x.GoPointer())117+ cret := xPreferencesGroupGetTitle(x.GoPointer())
118-118+ return cret
119 }119 }
120 120
121 var xPreferencesGroupRemove func(uintptr, uintptr)121 var xPreferencesGroupRemove func(uintptr, uintptr)
@@ -169,8 +169,8 @@ func (c *PreferencesGroup) SetGoPointer(ptr uintptr) {
169 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.169 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
170 func (x *PreferencesGroup) GetAccessibleRole() gtk.AccessibleRole {170 func (x *PreferencesGroup) GetAccessibleRole() gtk.AccessibleRole {
171 171
172- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())172+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
173-173+ return cret
174 }174 }
175 175
176 // Resets the accessible @property to its default value.176 // Resets the accessible @property to its default value.
@@ -305,8 +305,8 @@ func (x *PreferencesGroup) UpdateStateValue(NStatesVar int, StatesVar uintptr, V
305 // of the <object> tag used to construct the @buildable.305 // of the <object> tag used to construct the @buildable.
306 func (x *PreferencesGroup) GetBuildableId() string {306 func (x *PreferencesGroup) GetBuildableId() string {
307 307
308- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())308+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
309-309+ return cret
310 }310 }
311 311
312 func init() {312 func init() {
M v4/adw/adw-preferences-page.go +21 -20
@@ -47,16 +47,17 @@ var xNewPreferencesPage func() uintptr
47 47
48 // Creates a new `AdwPreferencesPage`.48 // Creates a new `AdwPreferencesPage`.
49 func NewPreferencesPage() *gtk.Widget {49 func NewPreferencesPage() *gtk.Widget {
50- NewPreferencesPagePtr := xNewPreferencesPage()50+ var cls *gtk.Widget
51- if NewPreferencesPagePtr == 0 {
52- return nil
53- }
54 51
55- gobject.IncreaseRef(NewPreferencesPagePtr)52+ cret := xNewPreferencesPage()
56 53
57- NewPreferencesPageCls := &gtk.Widget{}54+ if cret == 0 {
58- NewPreferencesPageCls.Ptr = NewPreferencesPagePtr55+ return cls
59- return NewPreferencesPageCls56+ }
57+ gobject.IncreaseRef(cret)
58+ cls = &gtk.Widget{}
59+ cls.Ptr = cret
60+ return cls
60 }61 }
61 62
62 var xPreferencesPageAdd func(uintptr, uintptr)63 var xPreferencesPageAdd func(uintptr, uintptr)
@@ -73,8 +74,8 @@ var xPreferencesPageGetIconName func(uintptr) string
73 // Gets the icon name for @self.74 // Gets the icon name for @self.
74 func (x *PreferencesPage) GetIconName() string {75 func (x *PreferencesPage) GetIconName() string {
75 76
76- return xPreferencesPageGetIconName(x.GoPointer())77+ cret := xPreferencesPageGetIconName(x.GoPointer())
77-78+ return cret
78 }79 }
79 80
80 var xPreferencesPageGetName func(uintptr) string81 var xPreferencesPageGetName func(uintptr) string
@@ -82,8 +83,8 @@ var xPreferencesPageGetName func(uintptr) string
82 // Gets the name of @self.83 // Gets the name of @self.
83 func (x *PreferencesPage) GetName() string {84 func (x *PreferencesPage) GetName() string {
84 85
85- return xPreferencesPageGetName(x.GoPointer())86+ cret := xPreferencesPageGetName(x.GoPointer())
86-87+ return cret
87 }88 }
88 89
89 var xPreferencesPageGetTitle func(uintptr) string90 var xPreferencesPageGetTitle func(uintptr) string
@@ -91,8 +92,8 @@ var xPreferencesPageGetTitle func(uintptr) string
91 // Gets the title of @self.92 // Gets the title of @self.
92 func (x *PreferencesPage) GetTitle() string {93 func (x *PreferencesPage) GetTitle() string {
93 94
94- return xPreferencesPageGetTitle(x.GoPointer())95+ cret := xPreferencesPageGetTitle(x.GoPointer())
95-96+ return cret
96 }97 }
97 98
98 var xPreferencesPageGetUseUnderline func(uintptr) bool99 var xPreferencesPageGetUseUnderline func(uintptr) bool
@@ -100,8 +101,8 @@ var xPreferencesPageGetUseUnderline func(uintptr) bool
100 // Gets whether an embedded underline in the title indicates a mnemonic.101 // Gets whether an embedded underline in the title indicates a mnemonic.
101 func (x *PreferencesPage) GetUseUnderline() bool {102 func (x *PreferencesPage) GetUseUnderline() bool {
102 103
103- return xPreferencesPageGetUseUnderline(x.GoPointer())104+ cret := xPreferencesPageGetUseUnderline(x.GoPointer())
104-105+ return cret
105 }106 }
106 107
107 var xPreferencesPageRemove func(uintptr, uintptr)108 var xPreferencesPageRemove func(uintptr, uintptr)
@@ -169,8 +170,8 @@ func (c *PreferencesPage) SetGoPointer(ptr uintptr) {
169 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.170 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
170 func (x *PreferencesPage) GetAccessibleRole() gtk.AccessibleRole {171 func (x *PreferencesPage) GetAccessibleRole() gtk.AccessibleRole {
171 172
172- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())173+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
173-174+ return cret
174 }175 }
175 176
176 // Resets the accessible @property to its default value.177 // Resets the accessible @property to its default value.
@@ -305,8 +306,8 @@ func (x *PreferencesPage) UpdateStateValue(NStatesVar int, StatesVar uintptr, Va
305 // of the <object> tag used to construct the @buildable.306 // of the <object> tag used to construct the @buildable.
306 func (x *PreferencesPage) GetBuildableId() string {307 func (x *PreferencesPage) GetBuildableId() string {
307 308
308- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())309+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
309-310+ return cret
310 }311 }
311 312
312 func init() {313 func init() {
M v4/adw/adw-preferences-row.go +25 -24
@@ -38,16 +38,17 @@ var xNewPreferencesRow func() uintptr
38 38
39 // Creates a new `AdwPreferencesRow`.39 // Creates a new `AdwPreferencesRow`.
40 func NewPreferencesRow() *gtk.Widget {40 func NewPreferencesRow() *gtk.Widget {
41- NewPreferencesRowPtr := xNewPreferencesRow()41+ var cls *gtk.Widget
42- if NewPreferencesRowPtr == 0 {
43- return nil
44- }
45 42
46- gobject.IncreaseRef(NewPreferencesRowPtr)43+ cret := xNewPreferencesRow()
47 44
48- NewPreferencesRowCls := &gtk.Widget{}45+ if cret == 0 {
49- NewPreferencesRowCls.Ptr = NewPreferencesRowPtr46+ return cls
50- return NewPreferencesRowCls47+ }
48+ gobject.IncreaseRef(cret)
49+ cls = &gtk.Widget{}
50+ cls.Ptr = cret
51+ return cls
51 }52 }
52 53
53 var xPreferencesRowGetTitle func(uintptr) string54 var xPreferencesRowGetTitle func(uintptr) string
@@ -55,8 +56,8 @@ var xPreferencesRowGetTitle func(uintptr) string
55 // Gets the title of the preference represented by @self.56 // Gets the title of the preference represented by @self.
56 func (x *PreferencesRow) GetTitle() string {57 func (x *PreferencesRow) GetTitle() string {
57 58
58- return xPreferencesRowGetTitle(x.GoPointer())59+ cret := xPreferencesRowGetTitle(x.GoPointer())
59-60+ return cret
60 }61 }
61 62
62 var xPreferencesRowGetTitleSelectable func(uintptr) bool63 var xPreferencesRowGetTitleSelectable func(uintptr) bool
@@ -64,8 +65,8 @@ var xPreferencesRowGetTitleSelectable func(uintptr) bool
64 // Gets whether the user can copy the title from the label65 // Gets whether the user can copy the title from the label
65 func (x *PreferencesRow) GetTitleSelectable() bool {66 func (x *PreferencesRow) GetTitleSelectable() bool {
66 67
67- return xPreferencesRowGetTitleSelectable(x.GoPointer())68+ cret := xPreferencesRowGetTitleSelectable(x.GoPointer())
68-69+ return cret
69 }70 }
70 71
71 var xPreferencesRowGetUseMarkup func(uintptr) bool72 var xPreferencesRowGetUseMarkup func(uintptr) bool
@@ -73,8 +74,8 @@ var xPreferencesRowGetUseMarkup func(uintptr) bool
73 // Gets whether to use Pango markup for the title label.74 // Gets whether to use Pango markup for the title label.
74 func (x *PreferencesRow) GetUseMarkup() bool {75 func (x *PreferencesRow) GetUseMarkup() bool {
75 76
76- return xPreferencesRowGetUseMarkup(x.GoPointer())77+ cret := xPreferencesRowGetUseMarkup(x.GoPointer())
77-78+ return cret
78 }79 }
79 80
80 var xPreferencesRowGetUseUnderline func(uintptr) bool81 var xPreferencesRowGetUseUnderline func(uintptr) bool
@@ -82,8 +83,8 @@ var xPreferencesRowGetUseUnderline func(uintptr) bool
82 // Gets whether an embedded underline in the title indicates a mnemonic.83 // Gets whether an embedded underline in the title indicates a mnemonic.
83 func (x *PreferencesRow) GetUseUnderline() bool {84 func (x *PreferencesRow) GetUseUnderline() bool {
84 85
85- return xPreferencesRowGetUseUnderline(x.GoPointer())86+ cret := xPreferencesRowGetUseUnderline(x.GoPointer())
86-87+ return cret
87 }88 }
88 89
89 var xPreferencesRowSetTitle func(uintptr, string)90 var xPreferencesRowSetTitle func(uintptr, string)
@@ -142,8 +143,8 @@ func (c *PreferencesRow) SetGoPointer(ptr uintptr) {
142 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.143 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
143 func (x *PreferencesRow) GetAccessibleRole() gtk.AccessibleRole {144 func (x *PreferencesRow) GetAccessibleRole() gtk.AccessibleRole {
144 145
145- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())146+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
146-147+ return cret
147 }148 }
148 149
149 // Resets the accessible @property to its default value.150 // Resets the accessible @property to its default value.
@@ -275,15 +276,15 @@ func (x *PreferencesRow) UpdateStateValue(NStatesVar int, StatesVar uintptr, Val
275 // Gets the action name for @actionable.276 // Gets the action name for @actionable.
276 func (x *PreferencesRow) GetActionName() string {277 func (x *PreferencesRow) GetActionName() string {
277 278
278- return gtk.XGtkActionableGetActionName(x.GoPointer())279+ cret := gtk.XGtkActionableGetActionName(x.GoPointer())
279-280+ return cret
280 }281 }
281 282
282 // Gets the current target value of @actionable.283 // Gets the current target value of @actionable.
283 func (x *PreferencesRow) GetActionTargetValue() *glib.Variant {284 func (x *PreferencesRow) GetActionTargetValue() *glib.Variant {
284 285
285- return gtk.XGtkActionableGetActionTargetValue(x.GoPointer())286+ cret := gtk.XGtkActionableGetActionTargetValue(x.GoPointer())
286-287+ return cret
287 }288 }
288 289
289 // Specifies the name of the action with which this widget should be290 // Specifies the name of the action with which this widget should be
@@ -361,8 +362,8 @@ func (x *PreferencesRow) SetDetailedActionName(DetailedActionNameVar string) {
361 // of the <object> tag used to construct the @buildable.362 // of the <object> tag used to construct the @buildable.
362 func (x *PreferencesRow) GetBuildableId() string {363 func (x *PreferencesRow) GetBuildableId() string {
363 364
364- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())365+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
365-366+ return cret
366 }367 }
367 368
368 func init() {369 func init() {
M v4/adw/adw-preferences-window.go +64 -68
@@ -46,16 +46,17 @@ var xNewPreferencesWindow func() uintptr
46 46
47 // Creates a new `AdwPreferencesWindow`.47 // Creates a new `AdwPreferencesWindow`.
48 func NewPreferencesWindow() *gtk.Widget {48 func NewPreferencesWindow() *gtk.Widget {
49- NewPreferencesWindowPtr := xNewPreferencesWindow()49+ var cls *gtk.Widget
50- if NewPreferencesWindowPtr == 0 {
51- return nil
52- }
53 50
54- gobject.IncreaseRef(NewPreferencesWindowPtr)51+ cret := xNewPreferencesWindow()
55 52
56- NewPreferencesWindowCls := &gtk.Widget{}53+ if cret == 0 {
57- NewPreferencesWindowCls.Ptr = NewPreferencesWindowPtr54+ return cls
58- return NewPreferencesWindowCls55+ }
56+ gobject.IncreaseRef(cret)
57+ cls = &gtk.Widget{}
58+ cls.Ptr = cret
59+ return cls
59 }60 }
60 61
61 var xPreferencesWindowAdd func(uintptr, uintptr)62 var xPreferencesWindowAdd func(uintptr, uintptr)
@@ -94,8 +95,8 @@ var xPreferencesWindowGetCanNavigateBack func(uintptr) bool
94 // Gets whether gestures and shortcuts for closing subpages are enabled.95 // Gets whether gestures and shortcuts for closing subpages are enabled.
95 func (x *PreferencesWindow) GetCanNavigateBack() bool {96 func (x *PreferencesWindow) GetCanNavigateBack() bool {
96 97
97- return xPreferencesWindowGetCanNavigateBack(x.GoPointer())98+ cret := xPreferencesWindowGetCanNavigateBack(x.GoPointer())
98-99+ return cret
99 }100 }
100 101
101 var xPreferencesWindowGetSearchEnabled func(uintptr) bool102 var xPreferencesWindowGetSearchEnabled func(uintptr) bool
@@ -103,26 +104,25 @@ var xPreferencesWindowGetSearchEnabled func(uintptr) bool
103 // Gets whether search is enabled for @self.104 // Gets whether search is enabled for @self.
104 func (x *PreferencesWindow) GetSearchEnabled() bool {105 func (x *PreferencesWindow) GetSearchEnabled() bool {
105 106
106- return xPreferencesWindowGetSearchEnabled(x.GoPointer())107+ cret := xPreferencesWindowGetSearchEnabled(x.GoPointer())
107-108+ return cret
108 }109 }
109 110
110 var xPreferencesWindowGetVisiblePage func(uintptr) uintptr111 var xPreferencesWindowGetVisiblePage func(uintptr) uintptr
111 112
112 // Gets the currently visible page of @self.113 // Gets the currently visible page of @self.
113 func (x *PreferencesWindow) GetVisiblePage() *PreferencesPage {114 func (x *PreferencesWindow) GetVisiblePage() *PreferencesPage {
115+ var cls *PreferencesPage
114 116
115- GetVisiblePagePtr := xPreferencesWindowGetVisiblePage(x.GoPointer())117+ cret := xPreferencesWindowGetVisiblePage(x.GoPointer())
116- if GetVisiblePagePtr == 0 {
117- return nil
118- }
119-
120- gobject.IncreaseRef(GetVisiblePagePtr)
121-
122- GetVisiblePageCls := &PreferencesPage{}
123- GetVisiblePageCls.Ptr = GetVisiblePagePtr
124- return GetVisiblePageCls
125 118
119+ if cret == 0 {
120+ return cls
121+ }
122+ gobject.IncreaseRef(cret)
123+ cls = &PreferencesPage{}
124+ cls.Ptr = cret
125+ return cls
126 }126 }
127 127
128 var xPreferencesWindowGetVisiblePageName func(uintptr) string128 var xPreferencesWindowGetVisiblePageName func(uintptr) string
@@ -130,8 +130,8 @@ var xPreferencesWindowGetVisiblePageName func(uintptr) string
130 // Gets the name of currently visible page of @self.130 // Gets the name of currently visible page of @self.
131 func (x *PreferencesWindow) GetVisiblePageName() string {131 func (x *PreferencesWindow) GetVisiblePageName() string {
132 132
133- return xPreferencesWindowGetVisiblePageName(x.GoPointer())133+ cret := xPreferencesWindowGetVisiblePageName(x.GoPointer())
134-134+ return cret
135 }135 }
136 136
137 var xPreferencesWindowPresentSubpage func(uintptr, uintptr)137 var xPreferencesWindowPresentSubpage func(uintptr, uintptr)
@@ -215,8 +215,8 @@ func (c *PreferencesWindow) SetGoPointer(ptr uintptr) {
215 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.215 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
216 func (x *PreferencesWindow) GetAccessibleRole() gtk.AccessibleRole {216 func (x *PreferencesWindow) GetAccessibleRole() gtk.AccessibleRole {
217 217
218- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())218+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
219-219+ return cret
220 }220 }
221 221
222 // Resets the accessible @property to its default value.222 // Resets the accessible @property to its default value.
@@ -351,40 +351,38 @@ func (x *PreferencesWindow) UpdateStateValue(NStatesVar int, StatesVar uintptr,
351 // of the <object> tag used to construct the @buildable.351 // of the <object> tag used to construct the @buildable.
352 func (x *PreferencesWindow) GetBuildableId() string {352 func (x *PreferencesWindow) GetBuildableId() string {
353 353
354- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())354+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
355-355+ return cret
356 }356 }
357 357
358 // Returns the renderer that is used for this `GtkNative`.358 // Returns the renderer that is used for this `GtkNative`.
359 func (x *PreferencesWindow) GetRenderer() *gsk.Renderer {359 func (x *PreferencesWindow) GetRenderer() *gsk.Renderer {
360+ var cls *gsk.Renderer
360 361
361- GetRendererPtr := gtk.XGtkNativeGetRenderer(x.GoPointer())362+ cret := gtk.XGtkNativeGetRenderer(x.GoPointer())
362- if GetRendererPtr == 0 {
363- return nil
364- }
365-
366- gobject.IncreaseRef(GetRendererPtr)
367-
368- GetRendererCls := &gsk.Renderer{}
369- GetRendererCls.Ptr = GetRendererPtr
370- return GetRendererCls
371 363
364+ if cret == 0 {
365+ return cls
366+ }
367+ gobject.IncreaseRef(cret)
368+ cls = &gsk.Renderer{}
369+ cls.Ptr = cret
370+ return cls
372 }371 }
373 372
374 // Returns the surface of this `GtkNative`.373 // Returns the surface of this `GtkNative`.
375 func (x *PreferencesWindow) GetSurface() *gdk.Surface {374 func (x *PreferencesWindow) GetSurface() *gdk.Surface {
375+ var cls *gdk.Surface
376 376
377- GetSurfacePtr := gtk.XGtkNativeGetSurface(x.GoPointer())377+ cret := gtk.XGtkNativeGetSurface(x.GoPointer())
378- if GetSurfacePtr == 0 {
379- return nil
380- }
381-
382- gobject.IncreaseRef(GetSurfacePtr)
383-
384- GetSurfaceCls := &gdk.Surface{}
385- GetSurfaceCls.Ptr = GetSurfacePtr
386- return GetSurfaceCls
387 378
379+ if cret == 0 {
380+ return cls
381+ }
382+ gobject.IncreaseRef(cret)
383+ cls = &gdk.Surface{}
384+ cls.Ptr = cret
385+ return cls
388 }386 }
389 387
390 // Retrieves the surface transform of @self.388 // Retrieves the surface transform of @self.
@@ -417,18 +415,17 @@ func (x *PreferencesWindow) Unrealize() {
417 415
418 // Returns the display that this `GtkRoot` is on.416 // Returns the display that this `GtkRoot` is on.
419 func (x *PreferencesWindow) GetDisplay() *gdk.Display {417 func (x *PreferencesWindow) GetDisplay() *gdk.Display {
418+ var cls *gdk.Display
420 419
421- GetDisplayPtr := gtk.XGtkRootGetDisplay(x.GoPointer())420+ cret := gtk.XGtkRootGetDisplay(x.GoPointer())
422- if GetDisplayPtr == 0 {
423- return nil
424- }
425-
426- gobject.IncreaseRef(GetDisplayPtr)
427-
428- GetDisplayCls := &gdk.Display{}
429- GetDisplayCls.Ptr = GetDisplayPtr
430- return GetDisplayCls
431 421
422+ if cret == 0 {
423+ return cls
424+ }
425+ gobject.IncreaseRef(cret)
426+ cls = &gdk.Display{}
427+ cls.Ptr = cret
428+ return cls
432 }429 }
433 430
434 // Retrieves the current focused widget within the root.431 // Retrieves the current focused widget within the root.
@@ -438,18 +435,17 @@ func (x *PreferencesWindow) GetDisplay() *gdk.Display {
438 // `gtk_widget_has_focus (widget)` will be %FALSE for the435 // `gtk_widget_has_focus (widget)` will be %FALSE for the
439 // widget.436 // widget.
440 func (x *PreferencesWindow) GetFocus() *gtk.Widget {437 func (x *PreferencesWindow) GetFocus() *gtk.Widget {
438+ var cls *gtk.Widget
441 439
442- GetFocusPtr := gtk.XGtkRootGetFocus(x.GoPointer())440+ cret := gtk.XGtkRootGetFocus(x.GoPointer())
443- if GetFocusPtr == 0 {
444- return nil
445- }
446-
447- gobject.IncreaseRef(GetFocusPtr)
448-
449- GetFocusCls := &gtk.Widget{}
450- GetFocusCls.Ptr = GetFocusPtr
451- return GetFocusCls
452 441
442+ if cret == 0 {
443+ return cls
444+ }
445+ gobject.IncreaseRef(cret)
446+ cls = &gtk.Widget{}
447+ cls.Ptr = cret
448+ return cls
453 }449 }
454 450
455 // If @focus is not the current focus widget, and is focusable, sets451 // If @focus is not the current focus widget, and is focusable, sets
M v4/adw/adw-split-button.go +54 -56
@@ -68,34 +68,34 @@ var xNewSplitButton func() uintptr
68 68
69 // Creates a new `AdwSplitButton`.69 // Creates a new `AdwSplitButton`.
70 func NewSplitButton() *gtk.Widget {70 func NewSplitButton() *gtk.Widget {
71- NewSplitButtonPtr := xNewSplitButton()71+ var cls *gtk.Widget
72- if NewSplitButtonPtr == 0 {
73- return nil
74- }
75 72
76- gobject.IncreaseRef(NewSplitButtonPtr)73+ cret := xNewSplitButton()
77 74
78- NewSplitButtonCls := &gtk.Widget{}75+ if cret == 0 {
79- NewSplitButtonCls.Ptr = NewSplitButtonPtr76+ return cls
80- return NewSplitButtonCls77+ }
78+ gobject.IncreaseRef(cret)
79+ cls = &gtk.Widget{}
80+ cls.Ptr = cret
81+ return cls
81 }82 }
82 83
83 var xSplitButtonGetChild func(uintptr) uintptr84 var xSplitButtonGetChild func(uintptr) uintptr
84 85
85 // Gets the child widget.86 // Gets the child widget.
86 func (x *SplitButton) GetChild() *gtk.Widget {87 func (x *SplitButton) GetChild() *gtk.Widget {
88+ var cls *gtk.Widget
87 89
88- GetChildPtr := xSplitButtonGetChild(x.GoPointer())90+ cret := xSplitButtonGetChild(x.GoPointer())
89- if GetChildPtr == 0 {
90- return nil
91- }
92-
93- gobject.IncreaseRef(GetChildPtr)
94-
95- GetChildCls := &gtk.Widget{}
96- GetChildCls.Ptr = GetChildPtr
97- return GetChildCls
98 91
92+ if cret == 0 {
93+ return cls
94+ }
95+ gobject.IncreaseRef(cret)
96+ cls = &gtk.Widget{}
97+ cls.Ptr = cret
98+ return cls
99 }99 }
100 100
101 var xSplitButtonGetDirection func(uintptr) gtk.ArrowType101 var xSplitButtonGetDirection func(uintptr) gtk.ArrowType
@@ -103,8 +103,8 @@ var xSplitButtonGetDirection func(uintptr) gtk.ArrowType
103 // Gets the direction in which the popup will be popped up.103 // Gets the direction in which the popup will be popped up.
104 func (x *SplitButton) GetDirection() gtk.ArrowType {104 func (x *SplitButton) GetDirection() gtk.ArrowType {
105 105
106- return xSplitButtonGetDirection(x.GoPointer())106+ cret := xSplitButtonGetDirection(x.GoPointer())
107-107+ return cret
108 }108 }
109 109
110 var xSplitButtonGetDropdownTooltip func(uintptr) string110 var xSplitButtonGetDropdownTooltip func(uintptr) string
@@ -112,8 +112,8 @@ var xSplitButtonGetDropdownTooltip func(uintptr) string
112 // Gets the tooltip of the dropdown button of @self.112 // Gets the tooltip of the dropdown button of @self.
113 func (x *SplitButton) GetDropdownTooltip() string {113 func (x *SplitButton) GetDropdownTooltip() string {
114 114
115- return xSplitButtonGetDropdownTooltip(x.GoPointer())115+ cret := xSplitButtonGetDropdownTooltip(x.GoPointer())
116-116+ return cret
117 }117 }
118 118
119 var xSplitButtonGetIconName func(uintptr) string119 var xSplitButtonGetIconName func(uintptr) string
@@ -121,8 +121,8 @@ var xSplitButtonGetIconName func(uintptr) string
121 // Gets the name of the icon used to automatically populate the button.121 // Gets the name of the icon used to automatically populate the button.
122 func (x *SplitButton) GetIconName() string {122 func (x *SplitButton) GetIconName() string {
123 123
124- return xSplitButtonGetIconName(x.GoPointer())124+ cret := xSplitButtonGetIconName(x.GoPointer())
125-125+ return cret
126 }126 }
127 127
128 var xSplitButtonGetLabel func(uintptr) string128 var xSplitButtonGetLabel func(uintptr) string
@@ -130,44 +130,42 @@ var xSplitButtonGetLabel func(uintptr) string
130 // Gets the label for @self.130 // Gets the label for @self.
131 func (x *SplitButton) GetLabel() string {131 func (x *SplitButton) GetLabel() string {
132 132
133- return xSplitButtonGetLabel(x.GoPointer())133+ cret := xSplitButtonGetLabel(x.GoPointer())
134-134+ return cret
135 }135 }
136 136
137 var xSplitButtonGetMenuModel func(uintptr) uintptr137 var xSplitButtonGetMenuModel func(uintptr) uintptr
138 138
139 // Gets the menu model from which the popup will be created.139 // Gets the menu model from which the popup will be created.
140 func (x *SplitButton) GetMenuModel() *gio.MenuModel {140 func (x *SplitButton) GetMenuModel() *gio.MenuModel {
141+ var cls *gio.MenuModel
141 142
142- GetMenuModelPtr := xSplitButtonGetMenuModel(x.GoPointer())143+ cret := xSplitButtonGetMenuModel(x.GoPointer())
143- if GetMenuModelPtr == 0 {
144- return nil
145- }
146-
147- gobject.IncreaseRef(GetMenuModelPtr)
148-
149- GetMenuModelCls := &gio.MenuModel{}
150- GetMenuModelCls.Ptr = GetMenuModelPtr
151- return GetMenuModelCls
152 144
145+ if cret == 0 {
146+ return cls
147+ }
148+ gobject.IncreaseRef(cret)
149+ cls = &gio.MenuModel{}
150+ cls.Ptr = cret
151+ return cls
153 }152 }
154 153
155 var xSplitButtonGetPopover func(uintptr) uintptr154 var xSplitButtonGetPopover func(uintptr) uintptr
156 155
157 // Gets the popover that will be popped up when the dropdown is clicked.156 // Gets the popover that will be popped up when the dropdown is clicked.
158 func (x *SplitButton) GetPopover() *gtk.Popover {157 func (x *SplitButton) GetPopover() *gtk.Popover {
158+ var cls *gtk.Popover
159 159
160- GetPopoverPtr := xSplitButtonGetPopover(x.GoPointer())160+ cret := xSplitButtonGetPopover(x.GoPointer())
161- if GetPopoverPtr == 0 {
162- return nil
163- }
164-
165- gobject.IncreaseRef(GetPopoverPtr)
166-
167- GetPopoverCls := &gtk.Popover{}
168- GetPopoverCls.Ptr = GetPopoverPtr
169- return GetPopoverCls
170 161
162+ if cret == 0 {
163+ return cls
164+ }
165+ gobject.IncreaseRef(cret)
166+ cls = &gtk.Popover{}
167+ cls.Ptr = cret
168+ return cls
171 }169 }
172 170
173 var xSplitButtonGetUseUnderline func(uintptr) bool171 var xSplitButtonGetUseUnderline func(uintptr) bool
@@ -175,8 +173,8 @@ var xSplitButtonGetUseUnderline func(uintptr) bool
175 // Gets whether an underline in the text indicates a mnemonic.173 // Gets whether an underline in the text indicates a mnemonic.
176 func (x *SplitButton) GetUseUnderline() bool {174 func (x *SplitButton) GetUseUnderline() bool {
177 175
178- return xSplitButtonGetUseUnderline(x.GoPointer())176+ cret := xSplitButtonGetUseUnderline(x.GoPointer())
179-177+ return cret
180 }178 }
181 179
182 var xSplitButtonPopdown func(uintptr)180 var xSplitButtonPopdown func(uintptr)
@@ -341,8 +339,8 @@ func (x *SplitButton) ConnectClicked(cb func(SplitButton)) {
341 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.339 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
342 func (x *SplitButton) GetAccessibleRole() gtk.AccessibleRole {340 func (x *SplitButton) GetAccessibleRole() gtk.AccessibleRole {
343 341
344- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())342+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
345-343+ return cret
346 }344 }
347 345
348 // Resets the accessible @property to its default value.346 // Resets the accessible @property to its default value.
@@ -474,15 +472,15 @@ func (x *SplitButton) UpdateStateValue(NStatesVar int, StatesVar uintptr, Values
474 // Gets the action name for @actionable.472 // Gets the action name for @actionable.
475 func (x *SplitButton) GetActionName() string {473 func (x *SplitButton) GetActionName() string {
476 474
477- return gtk.XGtkActionableGetActionName(x.GoPointer())475+ cret := gtk.XGtkActionableGetActionName(x.GoPointer())
478-476+ return cret
479 }477 }
480 478
481 // Gets the current target value of @actionable.479 // Gets the current target value of @actionable.
482 func (x *SplitButton) GetActionTargetValue() *glib.Variant {480 func (x *SplitButton) GetActionTargetValue() *glib.Variant {
483 481
484- return gtk.XGtkActionableGetActionTargetValue(x.GoPointer())482+ cret := gtk.XGtkActionableGetActionTargetValue(x.GoPointer())
485-483+ return cret
486 }484 }
487 485
488 // Specifies the name of the action with which this widget should be486 // Specifies the name of the action with which this widget should be
@@ -560,8 +558,8 @@ func (x *SplitButton) SetDetailedActionName(DetailedActionNameVar string) {
560 // of the <object> tag used to construct the @buildable.558 // of the <object> tag used to construct the @buildable.
561 func (x *SplitButton) GetBuildableId() string {559 func (x *SplitButton) GetBuildableId() string {
562 560
563- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())561+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
564-562+ return cret
565 }563 }
566 564
567 func init() {565 func init() {
M v4/adw/adw-spring-animation.go +29 -28
@@ -59,16 +59,17 @@ var xNewSpringAnimation func(uintptr, float64, float64, *SpringParams, uintptr)
59 // The animation will animate @target from @from to @to with the dynamics of a59 // The animation will animate @target from @from to @to with the dynamics of a
60 // spring described by @spring_params.60 // spring described by @spring_params.
61 func NewSpringAnimation(WidgetVar *gtk.Widget, FromVar float64, ToVar float64, SpringParamsVar *SpringParams, TargetVar *AnimationTarget) *Animation {61 func NewSpringAnimation(WidgetVar *gtk.Widget, FromVar float64, ToVar float64, SpringParamsVar *SpringParams, TargetVar *AnimationTarget) *Animation {
62- NewSpringAnimationPtr := xNewSpringAnimation(WidgetVar.GoPointer(), FromVar, ToVar, SpringParamsVar, TargetVar.GoPointer())62+ var cls *Animation
63- if NewSpringAnimationPtr == 0 {
64- return nil
65- }
66 63
67- gobject.IncreaseRef(NewSpringAnimationPtr)64+ cret := xNewSpringAnimation(WidgetVar.GoPointer(), FromVar, ToVar, SpringParamsVar, TargetVar.GoPointer())
68 65
69- NewSpringAnimationCls := &Animation{}66+ if cret == 0 {
70- NewSpringAnimationCls.Ptr = NewSpringAnimationPtr67+ return cls
71- return NewSpringAnimationCls68+ }
69+ gobject.IncreaseRef(cret)
70+ cls = &Animation{}
71+ cls.Ptr = cret
72+ return cls
72 }73 }
73 74
74 var xSpringAnimationCalculateValue func(uintptr, uint) float6475 var xSpringAnimationCalculateValue func(uintptr, uint) float64
@@ -81,8 +82,8 @@ var xSpringAnimationCalculateValue func(uintptr, uint) float64
81 // See also [method@SpringAnimation.calculate_velocity].82 // See also [method@SpringAnimation.calculate_velocity].
82 func (x *SpringAnimation) CalculateValue(TimeVar uint) float64 {83 func (x *SpringAnimation) CalculateValue(TimeVar uint) float64 {
83 84
84- return xSpringAnimationCalculateValue(x.GoPointer(), TimeVar)85+ cret := xSpringAnimationCalculateValue(x.GoPointer(), TimeVar)
85-86+ return cret
86 }87 }
87 88
88 var xSpringAnimationCalculateVelocity func(uintptr, uint) float6489 var xSpringAnimationCalculateVelocity func(uintptr, uint) float64
@@ -95,8 +96,8 @@ var xSpringAnimationCalculateVelocity func(uintptr, uint) float64
95 // See also [method@SpringAnimation.calculate_value].96 // See also [method@SpringAnimation.calculate_value].
96 func (x *SpringAnimation) CalculateVelocity(TimeVar uint) float64 {97 func (x *SpringAnimation) CalculateVelocity(TimeVar uint) float64 {
97 98
98- return xSpringAnimationCalculateVelocity(x.GoPointer(), TimeVar)99+ cret := xSpringAnimationCalculateVelocity(x.GoPointer(), TimeVar)
99-100+ return cret
100 }101 }
101 102
102 var xSpringAnimationGetClamp func(uintptr) bool103 var xSpringAnimationGetClamp func(uintptr) bool
@@ -104,8 +105,8 @@ var xSpringAnimationGetClamp func(uintptr) bool
104 // Gets whether @self should be clamped.105 // Gets whether @self should be clamped.
105 func (x *SpringAnimation) GetClamp() bool {106 func (x *SpringAnimation) GetClamp() bool {
106 107
107- return xSpringAnimationGetClamp(x.GoPointer())108+ cret := xSpringAnimationGetClamp(x.GoPointer())
108-109+ return cret
109 }110 }
110 111
111 var xSpringAnimationGetEpsilon func(uintptr) float64112 var xSpringAnimationGetEpsilon func(uintptr) float64
@@ -113,8 +114,8 @@ var xSpringAnimationGetEpsilon func(uintptr) float64
113 // Gets the precision of the spring.114 // Gets the precision of the spring.
114 func (x *SpringAnimation) GetEpsilon() float64 {115 func (x *SpringAnimation) GetEpsilon() float64 {
115 116
116- return xSpringAnimationGetEpsilon(x.GoPointer())117+ cret := xSpringAnimationGetEpsilon(x.GoPointer())
117-118+ return cret
118 }119 }
119 120
120 var xSpringAnimationGetEstimatedDuration func(uintptr) uint121 var xSpringAnimationGetEstimatedDuration func(uintptr) uint
@@ -124,8 +125,8 @@ var xSpringAnimationGetEstimatedDuration func(uintptr) uint
124 // Can be [const@DURATION_INFINITE] if the spring damping is set to 0.125 // Can be [const@DURATION_INFINITE] if the spring damping is set to 0.
125 func (x *SpringAnimation) GetEstimatedDuration() uint {126 func (x *SpringAnimation) GetEstimatedDuration() uint {
126 127
127- return xSpringAnimationGetEstimatedDuration(x.GoPointer())128+ cret := xSpringAnimationGetEstimatedDuration(x.GoPointer())
128-129+ return cret
129 }130 }
130 131
131 var xSpringAnimationGetInitialVelocity func(uintptr) float64132 var xSpringAnimationGetInitialVelocity func(uintptr) float64
@@ -133,8 +134,8 @@ var xSpringAnimationGetInitialVelocity func(uintptr) float64
133 // Gets the initial velocity of @self.134 // Gets the initial velocity of @self.
134 func (x *SpringAnimation) GetInitialVelocity() float64 {135 func (x *SpringAnimation) GetInitialVelocity() float64 {
135 136
136- return xSpringAnimationGetInitialVelocity(x.GoPointer())137+ cret := xSpringAnimationGetInitialVelocity(x.GoPointer())
137-138+ return cret
138 }139 }
139 140
140 var xSpringAnimationGetSpringParams func(uintptr) *SpringParams141 var xSpringAnimationGetSpringParams func(uintptr) *SpringParams
@@ -142,8 +143,8 @@ var xSpringAnimationGetSpringParams func(uintptr) *SpringParams
142 // Gets the physical parameters of the spring of @self.143 // Gets the physical parameters of the spring of @self.
143 func (x *SpringAnimation) GetSpringParams() *SpringParams {144 func (x *SpringAnimation) GetSpringParams() *SpringParams {
144 145
145- return xSpringAnimationGetSpringParams(x.GoPointer())146+ cret := xSpringAnimationGetSpringParams(x.GoPointer())
146-147+ return cret
147 }148 }
148 149
149 var xSpringAnimationGetValueFrom func(uintptr) float64150 var xSpringAnimationGetValueFrom func(uintptr) float64
@@ -151,8 +152,8 @@ var xSpringAnimationGetValueFrom func(uintptr) float64
151 // Gets the value @self will animate from.152 // Gets the value @self will animate from.
152 func (x *SpringAnimation) GetValueFrom() float64 {153 func (x *SpringAnimation) GetValueFrom() float64 {
153 154
154- return xSpringAnimationGetValueFrom(x.GoPointer())155+ cret := xSpringAnimationGetValueFrom(x.GoPointer())
155-156+ return cret
156 }157 }
157 158
158 var xSpringAnimationGetValueTo func(uintptr) float64159 var xSpringAnimationGetValueTo func(uintptr) float64
@@ -160,8 +161,8 @@ var xSpringAnimationGetValueTo func(uintptr) float64
160 // Gets the value @self will animate to.161 // Gets the value @self will animate to.
161 func (x *SpringAnimation) GetValueTo() float64 {162 func (x *SpringAnimation) GetValueTo() float64 {
162 163
163- return xSpringAnimationGetValueTo(x.GoPointer())164+ cret := xSpringAnimationGetValueTo(x.GoPointer())
164-165+ return cret
165 }166 }
166 167
167 var xSpringAnimationGetVelocity func(uintptr) float64168 var xSpringAnimationGetVelocity func(uintptr) float64
@@ -169,8 +170,8 @@ var xSpringAnimationGetVelocity func(uintptr) float64
169 // Gets the current velocity of @self.170 // Gets the current velocity of @self.
170 func (x *SpringAnimation) GetVelocity() float64 {171 func (x *SpringAnimation) GetVelocity() float64 {
171 172
172- return xSpringAnimationGetVelocity(x.GoPointer())173+ cret := xSpringAnimationGetVelocity(x.GoPointer())
173-174+ return cret
174 }175 }
175 176
176 var xSpringAnimationSetClamp func(uintptr, bool)177 var xSpringAnimationSetClamp func(uintptr, bool)
M v4/adw/adw-squeezer.go +79 -82
@@ -67,34 +67,34 @@ var xNewSqueezer func() uintptr
67 67
68 // Creates a new `AdwSqueezer`.68 // Creates a new `AdwSqueezer`.
69 func NewSqueezer() *gtk.Widget {69 func NewSqueezer() *gtk.Widget {
70- NewSqueezerPtr := xNewSqueezer()70+ var cls *gtk.Widget
71- if NewSqueezerPtr == 0 {
72- return nil
73- }
74 71
75- gobject.IncreaseRef(NewSqueezerPtr)72+ cret := xNewSqueezer()
76 73
77- NewSqueezerCls := &gtk.Widget{}74+ if cret == 0 {
78- NewSqueezerCls.Ptr = NewSqueezerPtr75+ return cls
79- return NewSqueezerCls76+ }
77+ gobject.IncreaseRef(cret)
78+ cls = &gtk.Widget{}
79+ cls.Ptr = cret
80+ return cls
80 }81 }
81 82
82 var xSqueezerAdd func(uintptr, uintptr) uintptr83 var xSqueezerAdd func(uintptr, uintptr) uintptr
83 84
84 // Adds a child to @self.85 // Adds a child to @self.
85 func (x *Squeezer) Add(ChildVar *gtk.Widget) *SqueezerPage {86 func (x *Squeezer) Add(ChildVar *gtk.Widget) *SqueezerPage {
87+ var cls *SqueezerPage
86 88
87- AddPtr := xSqueezerAdd(x.GoPointer(), ChildVar.GoPointer())89+ cret := xSqueezerAdd(x.GoPointer(), ChildVar.GoPointer())
88- if AddPtr == 0 {
89- return nil
90- }
91-
92- gobject.IncreaseRef(AddPtr)
93-
94- AddCls := &SqueezerPage{}
95- AddCls.Ptr = AddPtr
96- return AddCls
97 90
91+ if cret == 0 {
92+ return cls
93+ }
94+ gobject.IncreaseRef(cret)
95+ cls = &SqueezerPage{}
96+ cls.Ptr = cret
97+ return cls
98 }98 }
99 99
100 var xSqueezerGetAllowNone func(uintptr) bool100 var xSqueezerGetAllowNone func(uintptr) bool
@@ -102,8 +102,8 @@ var xSqueezerGetAllowNone func(uintptr) bool
102 // Gets whether to allow squeezing beyond the last child's minimum size.102 // Gets whether to allow squeezing beyond the last child's minimum size.
103 func (x *Squeezer) GetAllowNone() bool {103 func (x *Squeezer) GetAllowNone() bool {
104 104
105- return xSqueezerGetAllowNone(x.GoPointer())105+ cret := xSqueezerGetAllowNone(x.GoPointer())
106-106+ return cret
107 }107 }
108 108
109 var xSqueezerGetHomogeneous func(uintptr) bool109 var xSqueezerGetHomogeneous func(uintptr) bool
@@ -111,8 +111,8 @@ var xSqueezerGetHomogeneous func(uintptr) bool
111 // Gets whether all children have the same size for the opposite orientation.111 // Gets whether all children have the same size for the opposite orientation.
112 func (x *Squeezer) GetHomogeneous() bool {112 func (x *Squeezer) GetHomogeneous() bool {
113 113
114- return xSqueezerGetHomogeneous(x.GoPointer())114+ cret := xSqueezerGetHomogeneous(x.GoPointer())
115-115+ return cret
116 }116 }
117 117
118 var xSqueezerGetInterpolateSize func(uintptr) bool118 var xSqueezerGetInterpolateSize func(uintptr) bool
@@ -120,26 +120,25 @@ var xSqueezerGetInterpolateSize func(uintptr) bool
120 // Gets whether @self interpolates its size when changing the visible child.120 // Gets whether @self interpolates its size when changing the visible child.
121 func (x *Squeezer) GetInterpolateSize() bool {121 func (x *Squeezer) GetInterpolateSize() bool {
122 122
123- return xSqueezerGetInterpolateSize(x.GoPointer())123+ cret := xSqueezerGetInterpolateSize(x.GoPointer())
124-124+ return cret
125 }125 }
126 126
127 var xSqueezerGetPage func(uintptr, uintptr) uintptr127 var xSqueezerGetPage func(uintptr, uintptr) uintptr
128 128
129 // Returns the [class@SqueezerPage] object for @child.129 // Returns the [class@SqueezerPage] object for @child.
130 func (x *Squeezer) GetPage(ChildVar *gtk.Widget) *SqueezerPage {130 func (x *Squeezer) GetPage(ChildVar *gtk.Widget) *SqueezerPage {
131+ var cls *SqueezerPage
131 132
132- GetPagePtr := xSqueezerGetPage(x.GoPointer(), ChildVar.GoPointer())133+ cret := xSqueezerGetPage(x.GoPointer(), ChildVar.GoPointer())
133- if GetPagePtr == 0 {
134- return nil
135- }
136-
137- gobject.IncreaseRef(GetPagePtr)
138-
139- GetPageCls := &SqueezerPage{}
140- GetPageCls.Ptr = GetPagePtr
141- return GetPageCls
142 134
135+ if cret == 0 {
136+ return cls
137+ }
138+ gobject.IncreaseRef(cret)
139+ cls = &SqueezerPage{}
140+ cls.Ptr = cret
141+ return cls
143 }142 }
144 143
145 var xSqueezerGetPages func(uintptr) uintptr144 var xSqueezerGetPages func(uintptr) uintptr
@@ -149,16 +148,16 @@ var xSqueezerGetPages func(uintptr) uintptr
149 // This can be used to keep an up-to-date view. The model also implements148 // This can be used to keep an up-to-date view. The model also implements
150 // [iface@Gtk.SelectionModel] and can be used to track the visible page.149 // [iface@Gtk.SelectionModel] and can be used to track the visible page.
151 func (x *Squeezer) GetPages() *gtk.SelectionModelBase {150 func (x *Squeezer) GetPages() *gtk.SelectionModelBase {
151+ var cls *gtk.SelectionModelBase
152 152
153- GetPagesPtr := xSqueezerGetPages(x.GoPointer())153+ cret := xSqueezerGetPages(x.GoPointer())
154- if GetPagesPtr == 0 {
155- return nil
156- }
157-
158- GetPagesCls := &gtk.SelectionModelBase{}
159- GetPagesCls.Ptr = GetPagesPtr
160- return GetPagesCls
161 154
155+ if cret == 0 {
156+ return cls
157+ }
158+ cls = &gtk.SelectionModelBase{}
159+ cls.Ptr = cret
160+ return cls
162 }161 }
163 162
164 var xSqueezerGetSwitchThresholdPolicy func(uintptr) FoldThresholdPolicy163 var xSqueezerGetSwitchThresholdPolicy func(uintptr) FoldThresholdPolicy
@@ -166,8 +165,8 @@ var xSqueezerGetSwitchThresholdPolicy func(uintptr) FoldThresholdPolicy
166 // Gets the switch threshold policy for @self.165 // Gets the switch threshold policy for @self.
167 func (x *Squeezer) GetSwitchThresholdPolicy() FoldThresholdPolicy {166 func (x *Squeezer) GetSwitchThresholdPolicy() FoldThresholdPolicy {
168 167
169- return xSqueezerGetSwitchThresholdPolicy(x.GoPointer())168+ cret := xSqueezerGetSwitchThresholdPolicy(x.GoPointer())
170-169+ return cret
171 }170 }
172 171
173 var xSqueezerGetTransitionDuration func(uintptr) uint172 var xSqueezerGetTransitionDuration func(uintptr) uint
@@ -175,8 +174,8 @@ var xSqueezerGetTransitionDuration func(uintptr) uint
175 // Gets the transition animation duration for @self.174 // Gets the transition animation duration for @self.
176 func (x *Squeezer) GetTransitionDuration() uint {175 func (x *Squeezer) GetTransitionDuration() uint {
177 176
178- return xSqueezerGetTransitionDuration(x.GoPointer())177+ cret := xSqueezerGetTransitionDuration(x.GoPointer())
179-178+ return cret
180 }179 }
181 180
182 var xSqueezerGetTransitionRunning func(uintptr) bool181 var xSqueezerGetTransitionRunning func(uintptr) bool
@@ -188,8 +187,8 @@ var xSqueezerGetTransitionRunning func(uintptr) bool
188 // to know that a transition has happened.187 // to know that a transition has happened.
189 func (x *Squeezer) GetTransitionRunning() bool {188 func (x *Squeezer) GetTransitionRunning() bool {
190 189
191- return xSqueezerGetTransitionRunning(x.GoPointer())190+ cret := xSqueezerGetTransitionRunning(x.GoPointer())
192-191+ return cret
193 }192 }
194 193
195 var xSqueezerGetTransitionType func(uintptr) SqueezerTransitionType194 var xSqueezerGetTransitionType func(uintptr) SqueezerTransitionType
@@ -197,26 +196,25 @@ var xSqueezerGetTransitionType func(uintptr) SqueezerTransitionType
197 // Gets the type of animation used for transitions between children in @self.196 // Gets the type of animation used for transitions between children in @self.
198 func (x *Squeezer) GetTransitionType() SqueezerTransitionType {197 func (x *Squeezer) GetTransitionType() SqueezerTransitionType {
199 198
200- return xSqueezerGetTransitionType(x.GoPointer())199+ cret := xSqueezerGetTransitionType(x.GoPointer())
201-200+ return cret
202 }201 }
203 202
204 var xSqueezerGetVisibleChild func(uintptr) uintptr203 var xSqueezerGetVisibleChild func(uintptr) uintptr
205 204
206 // Gets the currently visible child of @self.205 // Gets the currently visible child of @self.
207 func (x *Squeezer) GetVisibleChild() *gtk.Widget {206 func (x *Squeezer) GetVisibleChild() *gtk.Widget {
207+ var cls *gtk.Widget
208 208
209- GetVisibleChildPtr := xSqueezerGetVisibleChild(x.GoPointer())209+ cret := xSqueezerGetVisibleChild(x.GoPointer())
210- if GetVisibleChildPtr == 0 {
211- return nil
212- }
213-
214- gobject.IncreaseRef(GetVisibleChildPtr)
215-
216- GetVisibleChildCls := &gtk.Widget{}
217- GetVisibleChildCls.Ptr = GetVisibleChildPtr
218- return GetVisibleChildCls
219 210
211+ if cret == 0 {
212+ return cls
213+ }
214+ gobject.IncreaseRef(cret)
215+ cls = &gtk.Widget{}
216+ cls.Ptr = cret
217+ return cls
220 }218 }
221 219
222 var xSqueezerGetXalign func(uintptr) float32220 var xSqueezerGetXalign func(uintptr) float32
@@ -224,8 +222,8 @@ var xSqueezerGetXalign func(uintptr) float32
224 // Gets the horizontal alignment, from 0 (start) to 1 (end).222 // Gets the horizontal alignment, from 0 (start) to 1 (end).
225 func (x *Squeezer) GetXalign() float32 {223 func (x *Squeezer) GetXalign() float32 {
226 224
227- return xSqueezerGetXalign(x.GoPointer())225+ cret := xSqueezerGetXalign(x.GoPointer())
228-226+ return cret
229 }227 }
230 228
231 var xSqueezerGetYalign func(uintptr) float32229 var xSqueezerGetYalign func(uintptr) float32
@@ -233,8 +231,8 @@ var xSqueezerGetYalign func(uintptr) float32
233 // Gets the vertical alignment, from 0 (top) to 1 (bottom).231 // Gets the vertical alignment, from 0 (top) to 1 (bottom).
234 func (x *Squeezer) GetYalign() float32 {232 func (x *Squeezer) GetYalign() float32 {
235 233
236- return xSqueezerGetYalign(x.GoPointer())234+ cret := xSqueezerGetYalign(x.GoPointer())
237-235+ return cret
238 }236 }
239 237
240 var xSqueezerRemove func(uintptr, uintptr)238 var xSqueezerRemove func(uintptr, uintptr)
@@ -363,8 +361,8 @@ func (c *Squeezer) SetGoPointer(ptr uintptr) {
363 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.361 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
364 func (x *Squeezer) GetAccessibleRole() gtk.AccessibleRole {362 func (x *Squeezer) GetAccessibleRole() gtk.AccessibleRole {
365 363
366- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())364+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
367-365+ return cret
368 }366 }
369 367
370 // Resets the accessible @property to its default value.368 // Resets the accessible @property to its default value.
@@ -499,15 +497,15 @@ func (x *Squeezer) UpdateStateValue(NStatesVar int, StatesVar uintptr, ValuesVar
499 // of the <object> tag used to construct the @buildable.497 // of the <object> tag used to construct the @buildable.
500 func (x *Squeezer) GetBuildableId() string {498 func (x *Squeezer) GetBuildableId() string {
501 499
502- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())500+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
503-501+ return cret
504 }502 }
505 503
506 // Retrieves the orientation of the @orientable.504 // Retrieves the orientation of the @orientable.
507 func (x *Squeezer) GetOrientation() gtk.Orientation {505 func (x *Squeezer) GetOrientation() gtk.Orientation {
508 506
509- return gtk.XGtkOrientableGetOrientation(x.GoPointer())507+ cret := gtk.XGtkOrientableGetOrientation(x.GoPointer())
510-508+ return cret
511 }509 }
512 510
513 // Sets the orientation of the @orientable.511 // Sets the orientation of the @orientable.
@@ -532,18 +530,17 @@ var xSqueezerPageGetChild func(uintptr) uintptr
532 530
533 // Returns the squeezer child to which @self belongs.531 // Returns the squeezer child to which @self belongs.
534 func (x *SqueezerPage) GetChild() *gtk.Widget {532 func (x *SqueezerPage) GetChild() *gtk.Widget {
533+ var cls *gtk.Widget
535 534
536- GetChildPtr := xSqueezerPageGetChild(x.GoPointer())535+ cret := xSqueezerPageGetChild(x.GoPointer())
537- if GetChildPtr == 0 {
538- return nil
539- }
540-
541- gobject.IncreaseRef(GetChildPtr)
542-
543- GetChildCls := &gtk.Widget{}
544- GetChildCls.Ptr = GetChildPtr
545- return GetChildCls
546 536
537+ if cret == 0 {
538+ return cls
539+ }
540+ gobject.IncreaseRef(cret)
541+ cls = &gtk.Widget{}
542+ cls.Ptr = cret
543+ return cls
547 }544 }
548 545
549 var xSqueezerPageGetEnabled func(uintptr) bool546 var xSqueezerPageGetEnabled func(uintptr) bool
@@ -551,8 +548,8 @@ var xSqueezerPageGetEnabled func(uintptr) bool
551 // Gets whether @self is enabled.548 // Gets whether @self is enabled.
552 func (x *SqueezerPage) GetEnabled() bool {549 func (x *SqueezerPage) GetEnabled() bool {
553 550
554- return xSqueezerPageGetEnabled(x.GoPointer())551+ cret := xSqueezerPageGetEnabled(x.GoPointer())
555-552+ return cret
556 }553 }
557 554
558 var xSqueezerPageSetEnabled func(uintptr, bool)555 var xSqueezerPageSetEnabled func(uintptr, bool)
M v4/adw/adw-status-page.go +37 -38
@@ -46,34 +46,34 @@ var xNewStatusPage func() uintptr
46 46
47 // Creates a new `AdwStatusPage`.47 // Creates a new `AdwStatusPage`.
48 func NewStatusPage() *gtk.Widget {48 func NewStatusPage() *gtk.Widget {
49- NewStatusPagePtr := xNewStatusPage()49+ var cls *gtk.Widget
50- if NewStatusPagePtr == 0 {
51- return nil
52- }
53 50
54- gobject.IncreaseRef(NewStatusPagePtr)51+ cret := xNewStatusPage()
55 52
56- NewStatusPageCls := &gtk.Widget{}53+ if cret == 0 {
57- NewStatusPageCls.Ptr = NewStatusPagePtr54+ return cls
58- return NewStatusPageCls55+ }
56+ gobject.IncreaseRef(cret)
57+ cls = &gtk.Widget{}
58+ cls.Ptr = cret
59+ return cls
59 }60 }
60 61
61 var xStatusPageGetChild func(uintptr) uintptr62 var xStatusPageGetChild func(uintptr) uintptr
62 63
63 // Gets the child widget of @self.64 // Gets the child widget of @self.
64 func (x *StatusPage) GetChild() *gtk.Widget {65 func (x *StatusPage) GetChild() *gtk.Widget {
66+ var cls *gtk.Widget
65 67
66- GetChildPtr := xStatusPageGetChild(x.GoPointer())68+ cret := xStatusPageGetChild(x.GoPointer())
67- if GetChildPtr == 0 {
68- return nil
69- }
70-
71- gobject.IncreaseRef(GetChildPtr)
72-
73- GetChildCls := &gtk.Widget{}
74- GetChildCls.Ptr = GetChildPtr
75- return GetChildCls
76 69
70+ if cret == 0 {
71+ return cls
72+ }
73+ gobject.IncreaseRef(cret)
74+ cls = &gtk.Widget{}
75+ cls.Ptr = cret
76+ return cls
77 }77 }
78 78
79 var xStatusPageGetDescription func(uintptr) string79 var xStatusPageGetDescription func(uintptr) string
@@ -81,8 +81,8 @@ var xStatusPageGetDescription func(uintptr) string
81 // Gets the description for @self.81 // Gets the description for @self.
82 func (x *StatusPage) GetDescription() string {82 func (x *StatusPage) GetDescription() string {
83 83
84- return xStatusPageGetDescription(x.GoPointer())84+ cret := xStatusPageGetDescription(x.GoPointer())
85-85+ return cret
86 }86 }
87 87
88 var xStatusPageGetIconName func(uintptr) string88 var xStatusPageGetIconName func(uintptr) string
@@ -90,26 +90,25 @@ var xStatusPageGetIconName func(uintptr) string
90 // Gets the icon name for @self.90 // Gets the icon name for @self.
91 func (x *StatusPage) GetIconName() string {91 func (x *StatusPage) GetIconName() string {
92 92
93- return xStatusPageGetIconName(x.GoPointer())93+ cret := xStatusPageGetIconName(x.GoPointer())
94-94+ return cret
95 }95 }
96 96
97 var xStatusPageGetPaintable func(uintptr) uintptr97 var xStatusPageGetPaintable func(uintptr) uintptr
98 98
99 // Gets the paintable for @self.99 // Gets the paintable for @self.
100 func (x *StatusPage) GetPaintable() *gdk.PaintableBase {100 func (x *StatusPage) GetPaintable() *gdk.PaintableBase {
101+ var cls *gdk.PaintableBase
101 102
102- GetPaintablePtr := xStatusPageGetPaintable(x.GoPointer())103+ cret := xStatusPageGetPaintable(x.GoPointer())
103- if GetPaintablePtr == 0 {
104- return nil
105- }
106-
107- gobject.IncreaseRef(GetPaintablePtr)
108-
109- GetPaintableCls := &gdk.PaintableBase{}
110- GetPaintableCls.Ptr = GetPaintablePtr
111- return GetPaintableCls
112 104
105+ if cret == 0 {
106+ return cls
107+ }
108+ gobject.IncreaseRef(cret)
109+ cls = &gdk.PaintableBase{}
110+ cls.Ptr = cret
111+ return cls
113 }112 }
114 113
115 var xStatusPageGetTitle func(uintptr) string114 var xStatusPageGetTitle func(uintptr) string
@@ -117,8 +116,8 @@ var xStatusPageGetTitle func(uintptr) string
117 // Gets the title for @self.116 // Gets the title for @self.
118 func (x *StatusPage) GetTitle() string {117 func (x *StatusPage) GetTitle() string {
119 118
120- return xStatusPageGetTitle(x.GoPointer())119+ cret := xStatusPageGetTitle(x.GoPointer())
121-120+ return cret
122 }121 }
123 122
124 var xStatusPageSetChild func(uintptr, uintptr)123 var xStatusPageSetChild func(uintptr, uintptr)
@@ -185,8 +184,8 @@ func (c *StatusPage) SetGoPointer(ptr uintptr) {
185 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.184 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
186 func (x *StatusPage) GetAccessibleRole() gtk.AccessibleRole {185 func (x *StatusPage) GetAccessibleRole() gtk.AccessibleRole {
187 186
188- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())187+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
189-188+ return cret
190 }189 }
191 190
192 // Resets the accessible @property to its default value.191 // Resets the accessible @property to its default value.
@@ -321,8 +320,8 @@ func (x *StatusPage) UpdateStateValue(NStatesVar int, StatesVar uintptr, ValuesV
321 // of the <object> tag used to construct the @buildable.320 // of the <object> tag used to construct the @buildable.
322 func (x *StatusPage) GetBuildableId() string {321 func (x *StatusPage) GetBuildableId() string {
323 322
324- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())323+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
325-324+ return cret
326 }325 }
327 326
328 func init() {327 func init() {
M v4/adw/adw-style-manager.go +17 -18
@@ -56,8 +56,8 @@ var xStyleManagerGetColorScheme func(uintptr) ColorScheme
56 // Gets the requested application color scheme.56 // Gets the requested application color scheme.
57 func (x *StyleManager) GetColorScheme() ColorScheme {57 func (x *StyleManager) GetColorScheme() ColorScheme {
58 58
59- return xStyleManagerGetColorScheme(x.GoPointer())59+ cret := xStyleManagerGetColorScheme(x.GoPointer())
60-60+ return cret
61 }61 }
62 62
63 var xStyleManagerGetDark func(uintptr) bool63 var xStyleManagerGetDark func(uintptr) bool
@@ -68,8 +68,8 @@ var xStyleManagerGetDark func(uintptr) bool
68 // [property@StyleManager:color-scheme].68 // [property@StyleManager:color-scheme].
69 func (x *StyleManager) GetDark() bool {69 func (x *StyleManager) GetDark() bool {
70 70
71- return xStyleManagerGetDark(x.GoPointer())71+ cret := xStyleManagerGetDark(x.GoPointer())
72-72+ return cret
73 }73 }
74 74
75 var xStyleManagerGetDisplay func(uintptr) uintptr75 var xStyleManagerGetDisplay func(uintptr) uintptr
@@ -79,18 +79,17 @@ var xStyleManagerGetDisplay func(uintptr) uintptr
79 // The display will be `NULL` for the style manager returned by79 // The display will be `NULL` for the style manager returned by
80 // [func@StyleManager.get_default].80 // [func@StyleManager.get_default].
81 func (x *StyleManager) GetDisplay() *gdk.Display {81 func (x *StyleManager) GetDisplay() *gdk.Display {
82+ var cls *gdk.Display
82 83
83- GetDisplayPtr := xStyleManagerGetDisplay(x.GoPointer())84+ cret := xStyleManagerGetDisplay(x.GoPointer())
84- if GetDisplayPtr == 0 {
85- return nil
86- }
87-
88- gobject.IncreaseRef(GetDisplayPtr)
89-
90- GetDisplayCls := &gdk.Display{}
91- GetDisplayCls.Ptr = GetDisplayPtr
92- return GetDisplayCls
93 85
86+ if cret == 0 {
87+ return cls
88+ }
89+ gobject.IncreaseRef(cret)
90+ cls = &gdk.Display{}
91+ cls.Ptr = cret
92+ return cls
94 }93 }
95 94
96 var xStyleManagerGetHighContrast func(uintptr) bool95 var xStyleManagerGetHighContrast func(uintptr) bool
@@ -100,8 +99,8 @@ var xStyleManagerGetHighContrast func(uintptr) bool
100 // This cannot be overridden by applications.99 // This cannot be overridden by applications.
101 func (x *StyleManager) GetHighContrast() bool {100 func (x *StyleManager) GetHighContrast() bool {
102 101
103- return xStyleManagerGetHighContrast(x.GoPointer())102+ cret := xStyleManagerGetHighContrast(x.GoPointer())
104-103+ return cret
105 }104 }
106 105
107 var xStyleManagerGetSystemSupportsColorSchemes func(uintptr) bool106 var xStyleManagerGetSystemSupportsColorSchemes func(uintptr) bool
@@ -113,8 +112,8 @@ var xStyleManagerGetSystemSupportsColorSchemes func(uintptr) bool
113 // appearance switcher if it's set to `FALSE`.112 // appearance switcher if it's set to `FALSE`.
114 func (x *StyleManager) GetSystemSupportsColorSchemes() bool {113 func (x *StyleManager) GetSystemSupportsColorSchemes() bool {
115 114
116- return xStyleManagerGetSystemSupportsColorSchemes(x.GoPointer())115+ cret := xStyleManagerGetSystemSupportsColorSchemes(x.GoPointer())
117-116+ return cret
118 }117 }
119 118
120 var xStyleManagerSetColorScheme func(uintptr, ColorScheme)119 var xStyleManagerSetColorScheme func(uintptr, ColorScheme)
M v4/adw/adw-swipe-tracker.go +28 -27
@@ -36,14 +36,16 @@ var xNewSwipeTracker func(uintptr) uintptr
36 36
37 // Creates a new `AdwSwipeTracker` for @widget.37 // Creates a new `AdwSwipeTracker` for @widget.
38 func NewSwipeTracker(SwipeableVar Swipeable) *SwipeTracker {38 func NewSwipeTracker(SwipeableVar Swipeable) *SwipeTracker {
39- NewSwipeTrackerPtr := xNewSwipeTracker(SwipeableVar.GoPointer())39+ var cls *SwipeTracker
40- if NewSwipeTrackerPtr == 0 {40+
41- return nil41+ cret := xNewSwipeTracker(SwipeableVar.GoPointer())
42- }
43 42
44- NewSwipeTrackerCls := &SwipeTracker{}43+ if cret == 0 {
45- NewSwipeTrackerCls.Ptr = NewSwipeTrackerPtr44+ return cls
46- return NewSwipeTrackerCls45+ }
46+ cls = &SwipeTracker{}
47+ cls.Ptr = cret
48+ return cls
47 }49 }
48 50
49 var xSwipeTrackerGetAllowLongSwipes func(uintptr) bool51 var xSwipeTrackerGetAllowLongSwipes func(uintptr) bool
@@ -51,8 +53,8 @@ var xSwipeTrackerGetAllowLongSwipes func(uintptr) bool
51 // Gets whether to allow swiping for more than one snap point at a time.53 // Gets whether to allow swiping for more than one snap point at a time.
52 func (x *SwipeTracker) GetAllowLongSwipes() bool {54 func (x *SwipeTracker) GetAllowLongSwipes() bool {
53 55
54- return xSwipeTrackerGetAllowLongSwipes(x.GoPointer())56+ cret := xSwipeTrackerGetAllowLongSwipes(x.GoPointer())
55-57+ return cret
56 }58 }
57 59
58 var xSwipeTrackerGetAllowMouseDrag func(uintptr) bool60 var xSwipeTrackerGetAllowMouseDrag func(uintptr) bool
@@ -60,8 +62,8 @@ var xSwipeTrackerGetAllowMouseDrag func(uintptr) bool
60 // Gets whether @self can be dragged with mouse pointer.62 // Gets whether @self can be dragged with mouse pointer.
61 func (x *SwipeTracker) GetAllowMouseDrag() bool {63 func (x *SwipeTracker) GetAllowMouseDrag() bool {
62 64
63- return xSwipeTrackerGetAllowMouseDrag(x.GoPointer())65+ cret := xSwipeTrackerGetAllowMouseDrag(x.GoPointer())
64-66+ return cret
65 }67 }
66 68
67 var xSwipeTrackerGetEnabled func(uintptr) bool69 var xSwipeTrackerGetEnabled func(uintptr) bool
@@ -69,8 +71,8 @@ var xSwipeTrackerGetEnabled func(uintptr) bool
69 // Gets whether @self is enabled.71 // Gets whether @self is enabled.
70 func (x *SwipeTracker) GetEnabled() bool {72 func (x *SwipeTracker) GetEnabled() bool {
71 73
72- return xSwipeTrackerGetEnabled(x.GoPointer())74+ cret := xSwipeTrackerGetEnabled(x.GoPointer())
73-75+ return cret
74 }76 }
75 77
76 var xSwipeTrackerGetReversed func(uintptr) bool78 var xSwipeTrackerGetReversed func(uintptr) bool
@@ -78,26 +80,25 @@ var xSwipeTrackerGetReversed func(uintptr) bool
78 // Gets whether @self is reversing the swipe direction.80 // Gets whether @self is reversing the swipe direction.
79 func (x *SwipeTracker) GetReversed() bool {81 func (x *SwipeTracker) GetReversed() bool {
80 82
81- return xSwipeTrackerGetReversed(x.GoPointer())83+ cret := xSwipeTrackerGetReversed(x.GoPointer())
82-84+ return cret
83 }85 }
84 86
85 var xSwipeTrackerGetSwipeable func(uintptr) uintptr87 var xSwipeTrackerGetSwipeable func(uintptr) uintptr
86 88
87 // Get the widget @self is attached to.89 // Get the widget @self is attached to.
88 func (x *SwipeTracker) GetSwipeable() *SwipeableBase {90 func (x *SwipeTracker) GetSwipeable() *SwipeableBase {
91+ var cls *SwipeableBase
89 92
90- GetSwipeablePtr := xSwipeTrackerGetSwipeable(x.GoPointer())93+ cret := xSwipeTrackerGetSwipeable(x.GoPointer())
91- if GetSwipeablePtr == 0 {
92- return nil
93- }
94-
95- gobject.IncreaseRef(GetSwipeablePtr)
96-
97- GetSwipeableCls := &SwipeableBase{}
98- GetSwipeableCls.Ptr = GetSwipeablePtr
99- return GetSwipeableCls
100 94
95+ if cret == 0 {
96+ return cls
97+ }
98+ gobject.IncreaseRef(cret)
99+ cls = &SwipeableBase{}
100+ cls.Ptr = cret
101+ return cls
101 }102 }
102 103
103 var xSwipeTrackerSetAllowLongSwipes func(uintptr, bool)104 var xSwipeTrackerSetAllowLongSwipes func(uintptr, bool)
@@ -225,8 +226,8 @@ func (x *SwipeTracker) ConnectUpdateSwipe(cb func(SwipeTracker, float64)) {
225 // Retrieves the orientation of the @orientable.226 // Retrieves the orientation of the @orientable.
226 func (x *SwipeTracker) GetOrientation() gtk.Orientation {227 func (x *SwipeTracker) GetOrientation() gtk.Orientation {
227 228
228- return gtk.XGtkOrientableGetOrientation(x.GoPointer())229+ cret := gtk.XGtkOrientableGetOrientation(x.GoPointer())
229-230+ return cret
230 }231 }
231 232
232 // Sets the orientation of the @orientable.233 // Sets the orientation of the @orientable.
M v4/adw/adw-swipeable.go +8 -8
@@ -43,8 +43,8 @@ func (x *SwipeableBase) SetGoPointer(ptr uintptr) {
43 // Gets the progress @self will snap back to after the gesture is canceled.43 // Gets the progress @self will snap back to after the gesture is canceled.
44 func (x *SwipeableBase) GetCancelProgress() float64 {44 func (x *SwipeableBase) GetCancelProgress() float64 {
45 45
46- return XAdwSwipeableGetCancelProgress(x.GoPointer())46+ cret := XAdwSwipeableGetCancelProgress(x.GoPointer())
47-47+ return cret
48 }48 }
49 49
50 // Gets the swipe distance of @self.50 // Gets the swipe distance of @self.
@@ -52,15 +52,15 @@ func (x *SwipeableBase) GetCancelProgress() float64 {
52 // This corresponds to how many pixels 1 unit represents.52 // This corresponds to how many pixels 1 unit represents.
53 func (x *SwipeableBase) GetDistance() float64 {53 func (x *SwipeableBase) GetDistance() float64 {
54 54
55- return XAdwSwipeableGetDistance(x.GoPointer())55+ cret := XAdwSwipeableGetDistance(x.GoPointer())
56-56+ return cret
57 }57 }
58 58
59 // Gets the current progress of @self.59 // Gets the current progress of @self.
60 func (x *SwipeableBase) GetProgress() float64 {60 func (x *SwipeableBase) GetProgress() float64 {
61 61
62- return XAdwSwipeableGetProgress(x.GoPointer())62+ cret := XAdwSwipeableGetProgress(x.GoPointer())
63-63+ return cret
64 }64 }
65 65
66 // Gets the snap points of @self.66 // Gets the snap points of @self.
@@ -69,8 +69,8 @@ func (x *SwipeableBase) GetProgress() float64 {
69 // end the swipe on.69 // end the swipe on.
70 func (x *SwipeableBase) GetSnapPoints(NSnapPointsVar int) uintptr {70 func (x *SwipeableBase) GetSnapPoints(NSnapPointsVar int) uintptr {
71 71
72- return XAdwSwipeableGetSnapPoints(x.GoPointer(), NSnapPointsVar)72+ cret := XAdwSwipeableGetSnapPoints(x.GoPointer(), NSnapPointsVar)
73-73+ return cret
74 }74 }
75 75
76 // Gets the area @self can start a swipe from for the given direction and76 // Gets the area @self can start a swipe from for the given direction and
M v4/adw/adw-tab-bar.go +52 -54
@@ -49,16 +49,17 @@ var xNewTabBar func() uintptr
49 49
50 // Creates a new `AdwTabBar`.50 // Creates a new `AdwTabBar`.
51 func NewTabBar() *TabBar {51 func NewTabBar() *TabBar {
52- NewTabBarPtr := xNewTabBar()52+ var cls *TabBar
53- if NewTabBarPtr == 0 {
54- return nil
55- }
56 53
57- gobject.IncreaseRef(NewTabBarPtr)54+ cret := xNewTabBar()
58 55
59- NewTabBarCls := &TabBar{}56+ if cret == 0 {
60- NewTabBarCls.Ptr = NewTabBarPtr57+ return cls
61- return NewTabBarCls58+ }
59+ gobject.IncreaseRef(cret)
60+ cls = &TabBar{}
61+ cls.Ptr = cret
62+ return cls
62 }63 }
63 64
64 var xTabBarGetAutohide func(uintptr) bool65 var xTabBarGetAutohide func(uintptr) bool
@@ -66,26 +67,25 @@ var xTabBarGetAutohide func(uintptr) bool
66 // Gets whether the tabs automatically hide.67 // Gets whether the tabs automatically hide.
67 func (x *TabBar) GetAutohide() bool {68 func (x *TabBar) GetAutohide() bool {
68 69
69- return xTabBarGetAutohide(x.GoPointer())70+ cret := xTabBarGetAutohide(x.GoPointer())
70-71+ return cret
71 }72 }
72 73
73 var xTabBarGetEndActionWidget func(uintptr) uintptr74 var xTabBarGetEndActionWidget func(uintptr) uintptr
74 75
75 // Gets the widget shown after the tabs.76 // Gets the widget shown after the tabs.
76 func (x *TabBar) GetEndActionWidget() *gtk.Widget {77 func (x *TabBar) GetEndActionWidget() *gtk.Widget {
78+ var cls *gtk.Widget
77 79
78- GetEndActionWidgetPtr := xTabBarGetEndActionWidget(x.GoPointer())80+ cret := xTabBarGetEndActionWidget(x.GoPointer())
79- if GetEndActionWidgetPtr == 0 {
80- return nil
81- }
82-
83- gobject.IncreaseRef(GetEndActionWidgetPtr)
84-
85- GetEndActionWidgetCls := &gtk.Widget{}
86- GetEndActionWidgetCls.Ptr = GetEndActionWidgetPtr
87- return GetEndActionWidgetCls
88 81
82+ if cret == 0 {
83+ return cls
84+ }
85+ gobject.IncreaseRef(cret)
86+ cls = &gtk.Widget{}
87+ cls.Ptr = cret
88+ return cls
89 }89 }
90 90
91 var xTabBarGetExpandTabs func(uintptr) bool91 var xTabBarGetExpandTabs func(uintptr) bool
@@ -93,8 +93,8 @@ var xTabBarGetExpandTabs func(uintptr) bool
93 // Gets whether tabs expand to full width.93 // Gets whether tabs expand to full width.
94 func (x *TabBar) GetExpandTabs() bool {94 func (x *TabBar) GetExpandTabs() bool {
95 95
96- return xTabBarGetExpandTabs(x.GoPointer())96+ cret := xTabBarGetExpandTabs(x.GoPointer())
97-97+ return cret
98 }98 }
99 99
100 var xTabBarGetExtraDragPreload func(uintptr) bool100 var xTabBarGetExtraDragPreload func(uintptr) bool
@@ -102,8 +102,8 @@ var xTabBarGetExtraDragPreload func(uintptr) bool
102 // Gets whether drop data should be preloaded on hover.102 // Gets whether drop data should be preloaded on hover.
103 func (x *TabBar) GetExtraDragPreload() bool {103 func (x *TabBar) GetExtraDragPreload() bool {
104 104
105- return xTabBarGetExtraDragPreload(x.GoPointer())105+ cret := xTabBarGetExtraDragPreload(x.GoPointer())
106-106+ return cret
107 }107 }
108 108
109 var xTabBarGetInverted func(uintptr) bool109 var xTabBarGetInverted func(uintptr) bool
@@ -111,8 +111,8 @@ var xTabBarGetInverted func(uintptr) bool
111 // Gets whether tabs use inverted layout.111 // Gets whether tabs use inverted layout.
112 func (x *TabBar) GetInverted() bool {112 func (x *TabBar) GetInverted() bool {
113 113
114- return xTabBarGetInverted(x.GoPointer())114+ cret := xTabBarGetInverted(x.GoPointer())
115-115+ return cret
116 }116 }
117 117
118 var xTabBarGetIsOverflowing func(uintptr) bool118 var xTabBarGetIsOverflowing func(uintptr) bool
@@ -122,26 +122,25 @@ var xTabBarGetIsOverflowing func(uintptr) bool
122 // If `TRUE`, all tabs cannot be displayed at once and require scrolling.122 // If `TRUE`, all tabs cannot be displayed at once and require scrolling.
123 func (x *TabBar) GetIsOverflowing() bool {123 func (x *TabBar) GetIsOverflowing() bool {
124 124
125- return xTabBarGetIsOverflowing(x.GoPointer())125+ cret := xTabBarGetIsOverflowing(x.GoPointer())
126-126+ return cret
127 }127 }
128 128
129 var xTabBarGetStartActionWidget func(uintptr) uintptr129 var xTabBarGetStartActionWidget func(uintptr) uintptr
130 130
131 // Gets the widget shown before the tabs.131 // Gets the widget shown before the tabs.
132 func (x *TabBar) GetStartActionWidget() *gtk.Widget {132 func (x *TabBar) GetStartActionWidget() *gtk.Widget {
133+ var cls *gtk.Widget
133 134
134- GetStartActionWidgetPtr := xTabBarGetStartActionWidget(x.GoPointer())135+ cret := xTabBarGetStartActionWidget(x.GoPointer())
135- if GetStartActionWidgetPtr == 0 {
136- return nil
137- }
138-
139- gobject.IncreaseRef(GetStartActionWidgetPtr)
140-
141- GetStartActionWidgetCls := &gtk.Widget{}
142- GetStartActionWidgetCls.Ptr = GetStartActionWidgetPtr
143- return GetStartActionWidgetCls
144 136
137+ if cret == 0 {
138+ return cls
139+ }
140+ gobject.IncreaseRef(cret)
141+ cls = &gtk.Widget{}
142+ cls.Ptr = cret
143+ return cls
145 }144 }
146 145
147 var xTabBarGetTabsRevealed func(uintptr) bool146 var xTabBarGetTabsRevealed func(uintptr) bool
@@ -151,26 +150,25 @@ var xTabBarGetTabsRevealed func(uintptr) bool
151 // See [property@TabBar:autohide].150 // See [property@TabBar:autohide].
152 func (x *TabBar) GetTabsRevealed() bool {151 func (x *TabBar) GetTabsRevealed() bool {
153 152
154- return xTabBarGetTabsRevealed(x.GoPointer())153+ cret := xTabBarGetTabsRevealed(x.GoPointer())
155-154+ return cret
156 }155 }
157 156
158 var xTabBarGetView func(uintptr) uintptr157 var xTabBarGetView func(uintptr) uintptr
159 158
160 // Gets the tab view @self controls.159 // Gets the tab view @self controls.
161 func (x *TabBar) GetView() *TabView {160 func (x *TabBar) GetView() *TabView {
161+ var cls *TabView
162 162
163- GetViewPtr := xTabBarGetView(x.GoPointer())163+ cret := xTabBarGetView(x.GoPointer())
164- if GetViewPtr == 0 {
165- return nil
166- }
167-
168- gobject.IncreaseRef(GetViewPtr)
169-
170- GetViewCls := &TabView{}
171- GetViewCls.Ptr = GetViewPtr
172- return GetViewCls
173 164
165+ if cret == 0 {
166+ return cls
167+ }
168+ gobject.IncreaseRef(cret)
169+ cls = &TabView{}
170+ cls.Ptr = cret
171+ return cls
174 }172 }
175 173
176 var xTabBarSetAutohide func(uintptr, bool)174 var xTabBarSetAutohide func(uintptr, bool)
@@ -316,8 +314,8 @@ func (x *TabBar) ConnectExtraDragValue(cb func(TabBar, uintptr, uintptr) gdk.Dra
316 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.314 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
317 func (x *TabBar) GetAccessibleRole() gtk.AccessibleRole {315 func (x *TabBar) GetAccessibleRole() gtk.AccessibleRole {
318 316
319- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())317+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
320-318+ return cret
321 }319 }
322 320
323 // Resets the accessible @property to its default value.321 // Resets the accessible @property to its default value.
@@ -452,8 +450,8 @@ func (x *TabBar) UpdateStateValue(NStatesVar int, StatesVar uintptr, ValuesVar u
452 // of the <object> tag used to construct the @buildable.450 // of the <object> tag used to construct the @buildable.
453 func (x *TabBar) GetBuildableId() string {451 func (x *TabBar) GetBuildableId() string {
454 452
455- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())453+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
456-454+ return cret
457 }455 }
458 456
459 func init() {457 func init() {
M v4/adw/adw-tab-button.go +26 -26
@@ -59,34 +59,34 @@ var xNewTabButton func() uintptr
59 59
60 // Creates a new `AdwTabButton`.60 // Creates a new `AdwTabButton`.
61 func NewTabButton() *gtk.Widget {61 func NewTabButton() *gtk.Widget {
62- NewTabButtonPtr := xNewTabButton()62+ var cls *gtk.Widget
63- if NewTabButtonPtr == 0 {
64- return nil
65- }
66 63
67- gobject.IncreaseRef(NewTabButtonPtr)64+ cret := xNewTabButton()
68 65
69- NewTabButtonCls := &gtk.Widget{}66+ if cret == 0 {
70- NewTabButtonCls.Ptr = NewTabButtonPtr67+ return cls
71- return NewTabButtonCls68+ }
69+ gobject.IncreaseRef(cret)
70+ cls = &gtk.Widget{}
71+ cls.Ptr = cret
72+ return cls
72 }73 }
73 74
74 var xTabButtonGetView func(uintptr) uintptr75 var xTabButtonGetView func(uintptr) uintptr
75 76
76 // Gets the tab view @self displays.77 // Gets the tab view @self displays.
77 func (x *TabButton) GetView() *TabView {78 func (x *TabButton) GetView() *TabView {
79+ var cls *TabView
78 80
79- GetViewPtr := xTabButtonGetView(x.GoPointer())81+ cret := xTabButtonGetView(x.GoPointer())
80- if GetViewPtr == 0 {
81- return nil
82- }
83-
84- gobject.IncreaseRef(GetViewPtr)
85-
86- GetViewCls := &TabView{}
87- GetViewCls.Ptr = GetViewPtr
88- return GetViewCls
89 82
83+ if cret == 0 {
84+ return cls
85+ }
86+ gobject.IncreaseRef(cret)
87+ cls = &TabView{}
88+ cls.Ptr = cret
89+ return cls
90 }90 }
91 91
92 var xTabButtonSetView func(uintptr, uintptr)92 var xTabButtonSetView func(uintptr, uintptr)
@@ -136,8 +136,8 @@ func (x *TabButton) ConnectClicked(cb func(TabButton)) {
136 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.136 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
137 func (x *TabButton) GetAccessibleRole() gtk.AccessibleRole {137 func (x *TabButton) GetAccessibleRole() gtk.AccessibleRole {
138 138
139- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())139+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
140-140+ return cret
141 }141 }
142 142
143 // Resets the accessible @property to its default value.143 // Resets the accessible @property to its default value.
@@ -269,15 +269,15 @@ func (x *TabButton) UpdateStateValue(NStatesVar int, StatesVar uintptr, ValuesVa
269 // Gets the action name for @actionable.269 // Gets the action name for @actionable.
270 func (x *TabButton) GetActionName() string {270 func (x *TabButton) GetActionName() string {
271 271
272- return gtk.XGtkActionableGetActionName(x.GoPointer())272+ cret := gtk.XGtkActionableGetActionName(x.GoPointer())
273-273+ return cret
274 }274 }
275 275
276 // Gets the current target value of @actionable.276 // Gets the current target value of @actionable.
277 func (x *TabButton) GetActionTargetValue() *glib.Variant {277 func (x *TabButton) GetActionTargetValue() *glib.Variant {
278 278
279- return gtk.XGtkActionableGetActionTargetValue(x.GoPointer())279+ cret := gtk.XGtkActionableGetActionTargetValue(x.GoPointer())
280-280+ return cret
281 }281 }
282 282
283 // Specifies the name of the action with which this widget should be283 // Specifies the name of the action with which this widget should be
@@ -355,8 +355,8 @@ func (x *TabButton) SetDetailedActionName(DetailedActionNameVar string) {
355 // of the <object> tag used to construct the @buildable.355 // of the <object> tag used to construct the @buildable.
356 func (x *TabButton) GetBuildableId() string {356 func (x *TabButton) GetBuildableId() string {
357 357
358- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())358+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
359-359+ return cret
360 }360 }
361 361
362 func init() {362 func init() {
M v4/adw/adw-tab-overview.go +56 -58
@@ -86,34 +86,34 @@ var xNewTabOverview func() uintptr
86 86
87 // Creates a new `AdwTabOverview`.87 // Creates a new `AdwTabOverview`.
88 func NewTabOverview() *gtk.Widget {88 func NewTabOverview() *gtk.Widget {
89- NewTabOverviewPtr := xNewTabOverview()89+ var cls *gtk.Widget
90- if NewTabOverviewPtr == 0 {
91- return nil
92- }
93 90
94- gobject.IncreaseRef(NewTabOverviewPtr)91+ cret := xNewTabOverview()
95 92
96- NewTabOverviewCls := &gtk.Widget{}93+ if cret == 0 {
97- NewTabOverviewCls.Ptr = NewTabOverviewPtr94+ return cls
98- return NewTabOverviewCls95+ }
96+ gobject.IncreaseRef(cret)
97+ cls = &gtk.Widget{}
98+ cls.Ptr = cret
99+ return cls
99 }100 }
100 101
101 var xTabOverviewGetChild func(uintptr) uintptr102 var xTabOverviewGetChild func(uintptr) uintptr
102 103
103 // Gets the child widget of @self.104 // Gets the child widget of @self.
104 func (x *TabOverview) GetChild() *gtk.Widget {105 func (x *TabOverview) GetChild() *gtk.Widget {
106+ var cls *gtk.Widget
105 107
106- GetChildPtr := xTabOverviewGetChild(x.GoPointer())108+ cret := xTabOverviewGetChild(x.GoPointer())
107- if GetChildPtr == 0 {
108- return nil
109- }
110-
111- gobject.IncreaseRef(GetChildPtr)
112-
113- GetChildCls := &gtk.Widget{}
114- GetChildCls.Ptr = GetChildPtr
115- return GetChildCls
116 109
110+ if cret == 0 {
111+ return cls
112+ }
113+ gobject.IncreaseRef(cret)
114+ cls = &gtk.Widget{}
115+ cls.Ptr = cret
116+ return cls
117 }117 }
118 118
119 var xTabOverviewGetEnableNewTab func(uintptr) bool119 var xTabOverviewGetEnableNewTab func(uintptr) bool
@@ -121,8 +121,8 @@ var xTabOverviewGetEnableNewTab func(uintptr) bool
121 // Gets whether to new tab button is enabled for @self.121 // Gets whether to new tab button is enabled for @self.
122 func (x *TabOverview) GetEnableNewTab() bool {122 func (x *TabOverview) GetEnableNewTab() bool {
123 123
124- return xTabOverviewGetEnableNewTab(x.GoPointer())124+ cret := xTabOverviewGetEnableNewTab(x.GoPointer())
125-125+ return cret
126 }126 }
127 127
128 var xTabOverviewGetEnableSearch func(uintptr) bool128 var xTabOverviewGetEnableSearch func(uintptr) bool
@@ -130,8 +130,8 @@ var xTabOverviewGetEnableSearch func(uintptr) bool
130 // Gets whether search in tabs is enabled for @self.130 // Gets whether search in tabs is enabled for @self.
131 func (x *TabOverview) GetEnableSearch() bool {131 func (x *TabOverview) GetEnableSearch() bool {
132 132
133- return xTabOverviewGetEnableSearch(x.GoPointer())133+ cret := xTabOverviewGetEnableSearch(x.GoPointer())
134-134+ return cret
135 }135 }
136 136
137 var xTabOverviewGetExtraDragPreload func(uintptr) bool137 var xTabOverviewGetExtraDragPreload func(uintptr) bool
@@ -139,8 +139,8 @@ var xTabOverviewGetExtraDragPreload func(uintptr) bool
139 // Gets whether drop data should be preloaded on hover.139 // Gets whether drop data should be preloaded on hover.
140 func (x *TabOverview) GetExtraDragPreload() bool {140 func (x *TabOverview) GetExtraDragPreload() bool {
141 141
142- return xTabOverviewGetExtraDragPreload(x.GoPointer())142+ cret := xTabOverviewGetExtraDragPreload(x.GoPointer())
143-143+ return cret
144 }144 }
145 145
146 var xTabOverviewGetInverted func(uintptr) bool146 var xTabOverviewGetInverted func(uintptr) bool
@@ -148,8 +148,8 @@ var xTabOverviewGetInverted func(uintptr) bool
148 // Gets whether thumbnails use inverted layout.148 // Gets whether thumbnails use inverted layout.
149 func (x *TabOverview) GetInverted() bool {149 func (x *TabOverview) GetInverted() bool {
150 150
151- return xTabOverviewGetInverted(x.GoPointer())151+ cret := xTabOverviewGetInverted(x.GoPointer())
152-152+ return cret
153 }153 }
154 154
155 var xTabOverviewGetOpen func(uintptr) bool155 var xTabOverviewGetOpen func(uintptr) bool
@@ -157,8 +157,8 @@ var xTabOverviewGetOpen func(uintptr) bool
157 // Gets whether @self is open.157 // Gets whether @self is open.
158 func (x *TabOverview) GetOpen() bool {158 func (x *TabOverview) GetOpen() bool {
159 159
160- return xTabOverviewGetOpen(x.GoPointer())160+ cret := xTabOverviewGetOpen(x.GoPointer())
161-161+ return cret
162 }162 }
163 163
164 var xTabOverviewGetSearchActive func(uintptr) bool164 var xTabOverviewGetSearchActive func(uintptr) bool
@@ -168,26 +168,25 @@ var xTabOverviewGetSearchActive func(uintptr) bool
168 // See [property@TabOverview:enable-search].168 // See [property@TabOverview:enable-search].
169 func (x *TabOverview) GetSearchActive() bool {169 func (x *TabOverview) GetSearchActive() bool {
170 170
171- return xTabOverviewGetSearchActive(x.GoPointer())171+ cret := xTabOverviewGetSearchActive(x.GoPointer())
172-172+ return cret
173 }173 }
174 174
175 var xTabOverviewGetSecondaryMenu func(uintptr) uintptr175 var xTabOverviewGetSecondaryMenu func(uintptr) uintptr
176 176
177 // Gets the secondary menu model for @self.177 // Gets the secondary menu model for @self.
178 func (x *TabOverview) GetSecondaryMenu() *gio.MenuModel {178 func (x *TabOverview) GetSecondaryMenu() *gio.MenuModel {
179+ var cls *gio.MenuModel
179 180
180- GetSecondaryMenuPtr := xTabOverviewGetSecondaryMenu(x.GoPointer())181+ cret := xTabOverviewGetSecondaryMenu(x.GoPointer())
181- if GetSecondaryMenuPtr == 0 {
182- return nil
183- }
184-
185- gobject.IncreaseRef(GetSecondaryMenuPtr)
186-
187- GetSecondaryMenuCls := &gio.MenuModel{}
188- GetSecondaryMenuCls.Ptr = GetSecondaryMenuPtr
189- return GetSecondaryMenuCls
190 182
183+ if cret == 0 {
184+ return cls
185+ }
186+ gobject.IncreaseRef(cret)
187+ cls = &gio.MenuModel{}
188+ cls.Ptr = cret
189+ return cls
191 }190 }
192 191
193 var xTabOverviewGetShowEndTitleButtons func(uintptr) bool192 var xTabOverviewGetShowEndTitleButtons func(uintptr) bool
@@ -195,8 +194,8 @@ var xTabOverviewGetShowEndTitleButtons func(uintptr) bool
195 // Gets whether end title buttons are shown in @self's header bar.194 // Gets whether end title buttons are shown in @self's header bar.
196 func (x *TabOverview) GetShowEndTitleButtons() bool {195 func (x *TabOverview) GetShowEndTitleButtons() bool {
197 196
198- return xTabOverviewGetShowEndTitleButtons(x.GoPointer())197+ cret := xTabOverviewGetShowEndTitleButtons(x.GoPointer())
199-198+ return cret
200 }199 }
201 200
202 var xTabOverviewGetShowStartTitleButtons func(uintptr) bool201 var xTabOverviewGetShowStartTitleButtons func(uintptr) bool
@@ -204,26 +203,25 @@ var xTabOverviewGetShowStartTitleButtons func(uintptr) bool
204 // Gets whether start title buttons are shown in @self's header bar.203 // Gets whether start title buttons are shown in @self's header bar.
205 func (x *TabOverview) GetShowStartTitleButtons() bool {204 func (x *TabOverview) GetShowStartTitleButtons() bool {
206 205
207- return xTabOverviewGetShowStartTitleButtons(x.GoPointer())206+ cret := xTabOverviewGetShowStartTitleButtons(x.GoPointer())
208-207+ return cret
209 }208 }
210 209
211 var xTabOverviewGetView func(uintptr) uintptr210 var xTabOverviewGetView func(uintptr) uintptr
212 211
213 // Gets the tab view @self controls.212 // Gets the tab view @self controls.
214 func (x *TabOverview) GetView() *TabView {213 func (x *TabOverview) GetView() *TabView {
214+ var cls *TabView
215 215
216- GetViewPtr := xTabOverviewGetView(x.GoPointer())216+ cret := xTabOverviewGetView(x.GoPointer())
217- if GetViewPtr == 0 {
218- return nil
219- }
220-
221- gobject.IncreaseRef(GetViewPtr)
222-
223- GetViewCls := &TabView{}
224- GetViewCls.Ptr = GetViewPtr
225- return GetViewCls
226 217
218+ if cret == 0 {
219+ return cls
220+ }
221+ gobject.IncreaseRef(cret)
222+ cls = &TabView{}
223+ cls.Ptr = cret
224+ return cls
227 }225 }
228 226
229 var xTabOverviewSetChild func(uintptr, uintptr)227 var xTabOverviewSetChild func(uintptr, uintptr)
@@ -427,8 +425,8 @@ func (x *TabOverview) ConnectExtraDragValue(cb func(TabOverview, uintptr, uintpt
427 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.425 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
428 func (x *TabOverview) GetAccessibleRole() gtk.AccessibleRole {426 func (x *TabOverview) GetAccessibleRole() gtk.AccessibleRole {
429 427
430- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())428+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
431-429+ return cret
432 }430 }
433 431
434 // Resets the accessible @property to its default value.432 // Resets the accessible @property to its default value.
@@ -563,8 +561,8 @@ func (x *TabOverview) UpdateStateValue(NStatesVar int, StatesVar uintptr, Values
563 // of the <object> tag used to construct the @buildable.561 // of the <object> tag used to construct the @buildable.
564 func (x *TabOverview) GetBuildableId() string {562 func (x *TabOverview) GetBuildableId() string {
565 563
566- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())564+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
567-565+ return cret
568 }566 }
569 567
570 func init() {568 func init() {
M v4/adw/adw-tab-view.go +215 -230
@@ -78,36 +78,34 @@ var xTabPageGetChild func(uintptr) uintptr
78 78
79 // Gets the child of @self.79 // Gets the child of @self.
80 func (x *TabPage) GetChild() *gtk.Widget {80 func (x *TabPage) GetChild() *gtk.Widget {
81+ var cls *gtk.Widget
81 82
82- GetChildPtr := xTabPageGetChild(x.GoPointer())83+ cret := xTabPageGetChild(x.GoPointer())
83- if GetChildPtr == 0 {
84- return nil
85- }
86-
87- gobject.IncreaseRef(GetChildPtr)
88-
89- GetChildCls := &gtk.Widget{}
90- GetChildCls.Ptr = GetChildPtr
91- return GetChildCls
92 84
85+ if cret == 0 {
86+ return cls
87+ }
88+ gobject.IncreaseRef(cret)
89+ cls = &gtk.Widget{}
90+ cls.Ptr = cret
91+ return cls
93 }92 }
94 93
95 var xTabPageGetIcon func(uintptr) uintptr94 var xTabPageGetIcon func(uintptr) uintptr
96 95
97 // Gets the icon of @self.96 // Gets the icon of @self.
98 func (x *TabPage) GetIcon() *gio.IconBase {97 func (x *TabPage) GetIcon() *gio.IconBase {
98+ var cls *gio.IconBase
99 99
100- GetIconPtr := xTabPageGetIcon(x.GoPointer())100+ cret := xTabPageGetIcon(x.GoPointer())
101- if GetIconPtr == 0 {
102- return nil
103- }
104-
105- gobject.IncreaseRef(GetIconPtr)
106-
107- GetIconCls := &gio.IconBase{}
108- GetIconCls.Ptr = GetIconPtr
109- return GetIconCls
110 101
102+ if cret == 0 {
103+ return cls
104+ }
105+ gobject.IncreaseRef(cret)
106+ cls = &gio.IconBase{}
107+ cls.Ptr = cret
108+ return cls
111 }109 }
112 110
113 var xTabPageGetIndicatorActivatable func(uintptr) bool111 var xTabPageGetIndicatorActivatable func(uintptr) bool
@@ -115,26 +113,25 @@ var xTabPageGetIndicatorActivatable func(uintptr) bool
115 // Gets whether the indicator of @self is activatable.113 // Gets whether the indicator of @self is activatable.
116 func (x *TabPage) GetIndicatorActivatable() bool {114 func (x *TabPage) GetIndicatorActivatable() bool {
117 115
118- return xTabPageGetIndicatorActivatable(x.GoPointer())116+ cret := xTabPageGetIndicatorActivatable(x.GoPointer())
119-117+ return cret
120 }118 }
121 119
122 var xTabPageGetIndicatorIcon func(uintptr) uintptr120 var xTabPageGetIndicatorIcon func(uintptr) uintptr
123 121
124 // Gets the indicator icon of @self.122 // Gets the indicator icon of @self.
125 func (x *TabPage) GetIndicatorIcon() *gio.IconBase {123 func (x *TabPage) GetIndicatorIcon() *gio.IconBase {
124+ var cls *gio.IconBase
126 125
127- GetIndicatorIconPtr := xTabPageGetIndicatorIcon(x.GoPointer())126+ cret := xTabPageGetIndicatorIcon(x.GoPointer())
128- if GetIndicatorIconPtr == 0 {
129- return nil
130- }
131-
132- gobject.IncreaseRef(GetIndicatorIconPtr)
133-
134- GetIndicatorIconCls := &gio.IconBase{}
135- GetIndicatorIconCls.Ptr = GetIndicatorIconPtr
136- return GetIndicatorIconCls
137 127
128+ if cret == 0 {
129+ return cls
130+ }
131+ gobject.IncreaseRef(cret)
132+ cls = &gio.IconBase{}
133+ cls.Ptr = cret
134+ return cls
138 }135 }
139 136
140 var xTabPageGetIndicatorTooltip func(uintptr) string137 var xTabPageGetIndicatorTooltip func(uintptr) string
@@ -142,8 +139,8 @@ var xTabPageGetIndicatorTooltip func(uintptr) string
142 // Gets the tooltip of the indicator icon of @self.139 // Gets the tooltip of the indicator icon of @self.
143 func (x *TabPage) GetIndicatorTooltip() string {140 func (x *TabPage) GetIndicatorTooltip() string {
144 141
145- return xTabPageGetIndicatorTooltip(x.GoPointer())142+ cret := xTabPageGetIndicatorTooltip(x.GoPointer())
146-143+ return cret
147 }144 }
148 145
149 var xTabPageGetKeyword func(uintptr) string146 var xTabPageGetKeyword func(uintptr) string
@@ -151,8 +148,8 @@ var xTabPageGetKeyword func(uintptr) string
151 // Gets the search keyword of @self.148 // Gets the search keyword of @self.
152 func (x *TabPage) GetKeyword() string {149 func (x *TabPage) GetKeyword() string {
153 150
154- return xTabPageGetKeyword(x.GoPointer())151+ cret := xTabPageGetKeyword(x.GoPointer())
155-152+ return cret
156 }153 }
157 154
158 var xTabPageGetLiveThumbnail func(uintptr) bool155 var xTabPageGetLiveThumbnail func(uintptr) bool
@@ -160,8 +157,8 @@ var xTabPageGetLiveThumbnail func(uintptr) bool
160 // Gets whether to live thumbnail is enabled @self.157 // Gets whether to live thumbnail is enabled @self.
161 func (x *TabPage) GetLiveThumbnail() bool {158 func (x *TabPage) GetLiveThumbnail() bool {
162 159
163- return xTabPageGetLiveThumbnail(x.GoPointer())160+ cret := xTabPageGetLiveThumbnail(x.GoPointer())
164-161+ return cret
165 }162 }
166 163
167 var xTabPageGetLoading func(uintptr) bool164 var xTabPageGetLoading func(uintptr) bool
@@ -169,8 +166,8 @@ var xTabPageGetLoading func(uintptr) bool
169 // Gets whether @self is loading.166 // Gets whether @self is loading.
170 func (x *TabPage) GetLoading() bool {167 func (x *TabPage) GetLoading() bool {
171 168
172- return xTabPageGetLoading(x.GoPointer())169+ cret := xTabPageGetLoading(x.GoPointer())
173-170+ return cret
174 }171 }
175 172
176 var xTabPageGetNeedsAttention func(uintptr) bool173 var xTabPageGetNeedsAttention func(uintptr) bool
@@ -178,8 +175,8 @@ var xTabPageGetNeedsAttention func(uintptr) bool
178 // Gets whether @self needs attention.175 // Gets whether @self needs attention.
179 func (x *TabPage) GetNeedsAttention() bool {176 func (x *TabPage) GetNeedsAttention() bool {
180 177
181- return xTabPageGetNeedsAttention(x.GoPointer())178+ cret := xTabPageGetNeedsAttention(x.GoPointer())
182-179+ return cret
183 }180 }
184 181
185 var xTabPageGetParent func(uintptr) uintptr182 var xTabPageGetParent func(uintptr) uintptr
@@ -188,18 +185,17 @@ var xTabPageGetParent func(uintptr) uintptr
188 //185 //
189 // See [method@TabView.add_page] and [method@TabView.close_page].186 // See [method@TabView.add_page] and [method@TabView.close_page].
190 func (x *TabPage) GetParent() *TabPage {187 func (x *TabPage) GetParent() *TabPage {
188+ var cls *TabPage
191 189
192- GetParentPtr := xTabPageGetParent(x.GoPointer())190+ cret := xTabPageGetParent(x.GoPointer())
193- if GetParentPtr == 0 {
194- return nil
195- }
196-
197- gobject.IncreaseRef(GetParentPtr)
198-
199- GetParentCls := &TabPage{}
200- GetParentCls.Ptr = GetParentPtr
201- return GetParentCls
202 191
192+ if cret == 0 {
193+ return cls
194+ }
195+ gobject.IncreaseRef(cret)
196+ cls = &TabPage{}
197+ cls.Ptr = cret
198+ return cls
203 }199 }
204 200
205 var xTabPageGetPinned func(uintptr) bool201 var xTabPageGetPinned func(uintptr) bool
@@ -209,8 +205,8 @@ var xTabPageGetPinned func(uintptr) bool
209 // See [method@TabView.set_page_pinned].205 // See [method@TabView.set_page_pinned].
210 func (x *TabPage) GetPinned() bool {206 func (x *TabPage) GetPinned() bool {
211 207
212- return xTabPageGetPinned(x.GoPointer())208+ cret := xTabPageGetPinned(x.GoPointer())
213-209+ return cret
214 }210 }
215 211
216 var xTabPageGetSelected func(uintptr) bool212 var xTabPageGetSelected func(uintptr) bool
@@ -218,8 +214,8 @@ var xTabPageGetSelected func(uintptr) bool
218 // Gets whether @self is selected.214 // Gets whether @self is selected.
219 func (x *TabPage) GetSelected() bool {215 func (x *TabPage) GetSelected() bool {
220 216
221- return xTabPageGetSelected(x.GoPointer())217+ cret := xTabPageGetSelected(x.GoPointer())
222-218+ return cret
223 }219 }
224 220
225 var xTabPageGetThumbnailXalign func(uintptr) float32221 var xTabPageGetThumbnailXalign func(uintptr) float32
@@ -227,8 +223,8 @@ var xTabPageGetThumbnailXalign func(uintptr) float32
227 // Gets the horizontal alignment of the thumbnail for @self.223 // Gets the horizontal alignment of the thumbnail for @self.
228 func (x *TabPage) GetThumbnailXalign() float32 {224 func (x *TabPage) GetThumbnailXalign() float32 {
229 225
230- return xTabPageGetThumbnailXalign(x.GoPointer())226+ cret := xTabPageGetThumbnailXalign(x.GoPointer())
231-227+ return cret
232 }228 }
233 229
234 var xTabPageGetThumbnailYalign func(uintptr) float32230 var xTabPageGetThumbnailYalign func(uintptr) float32
@@ -236,8 +232,8 @@ var xTabPageGetThumbnailYalign func(uintptr) float32
236 // Gets the vertical alignment of the thumbnail for @self.232 // Gets the vertical alignment of the thumbnail for @self.
237 func (x *TabPage) GetThumbnailYalign() float32 {233 func (x *TabPage) GetThumbnailYalign() float32 {
238 234
239- return xTabPageGetThumbnailYalign(x.GoPointer())235+ cret := xTabPageGetThumbnailYalign(x.GoPointer())
240-236+ return cret
241 }237 }
242 238
243 var xTabPageGetTitle func(uintptr) string239 var xTabPageGetTitle func(uintptr) string
@@ -245,8 +241,8 @@ var xTabPageGetTitle func(uintptr) string
245 // Gets the title of @self.241 // Gets the title of @self.
246 func (x *TabPage) GetTitle() string {242 func (x *TabPage) GetTitle() string {
247 243
248- return xTabPageGetTitle(x.GoPointer())244+ cret := xTabPageGetTitle(x.GoPointer())
249-245+ return cret
250 }246 }
251 247
252 var xTabPageGetTooltip func(uintptr) string248 var xTabPageGetTooltip func(uintptr) string
@@ -254,8 +250,8 @@ var xTabPageGetTooltip func(uintptr) string
254 // Gets the tooltip of @self.250 // Gets the tooltip of @self.
255 func (x *TabPage) GetTooltip() string {251 func (x *TabPage) GetTooltip() string {
256 252
257- return xTabPageGetTooltip(x.GoPointer())253+ cret := xTabPageGetTooltip(x.GoPointer())
258-254+ return cret
259 }255 }
260 256
261 var xTabPageInvalidateThumbnail func(uintptr)257 var xTabPageInvalidateThumbnail func(uintptr)
@@ -483,8 +479,8 @@ func (c *TabPage) SetGoPointer(ptr uintptr) {
483 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.479 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
484 func (x *TabPage) GetAccessibleRole() gtk.AccessibleRole {480 func (x *TabPage) GetAccessibleRole() gtk.AccessibleRole {
485 481
486- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())482+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
487-483+ return cret
488 }484 }
489 485
490 // Resets the accessible @property to its default value.486 // Resets the accessible @property to its default value.
@@ -670,16 +666,17 @@ var xNewTabView func() uintptr
670 666
671 // Creates a new `AdwTabView`.667 // Creates a new `AdwTabView`.
672 func NewTabView() *TabView {668 func NewTabView() *TabView {
673- NewTabViewPtr := xNewTabView()669+ var cls *TabView
674- if NewTabViewPtr == 0 {
675- return nil
676- }
677 670
678- gobject.IncreaseRef(NewTabViewPtr)671+ cret := xNewTabView()
679 672
680- NewTabViewCls := &TabView{}673+ if cret == 0 {
681- NewTabViewCls.Ptr = NewTabViewPtr674+ return cls
682- return NewTabViewCls675+ }
676+ gobject.IncreaseRef(cret)
677+ cls = &TabView{}
678+ cls.Ptr = cret
679+ return cls
683 }680 }
684 681
685 var xTabViewAddPage func(uintptr, uintptr, uintptr) uintptr682 var xTabViewAddPage func(uintptr, uintptr, uintptr) uintptr
@@ -692,18 +689,17 @@ var xTabViewAddPage func(uintptr, uintptr, uintptr) uintptr
692 //689 //
693 // If @parent is `NULL`, this function is equivalent to [method@TabView.append].690 // If @parent is `NULL`, this function is equivalent to [method@TabView.append].
694 func (x *TabView) AddPage(ChildVar *gtk.Widget, ParentVar *TabPage) *TabPage {691 func (x *TabView) AddPage(ChildVar *gtk.Widget, ParentVar *TabPage) *TabPage {
692+ var cls *TabPage
695 693
696- AddPagePtr := xTabViewAddPage(x.GoPointer(), ChildVar.GoPointer(), ParentVar.GoPointer())694+ cret := xTabViewAddPage(x.GoPointer(), ChildVar.GoPointer(), ParentVar.GoPointer())
697- if AddPagePtr == 0 {
698- return nil
699- }
700-
701- gobject.IncreaseRef(AddPagePtr)
702-
703- AddPageCls := &TabPage{}
704- AddPageCls.Ptr = AddPagePtr
705- return AddPageCls
706 695
696+ if cret == 0 {
697+ return cls
698+ }
699+ gobject.IncreaseRef(cret)
700+ cls = &TabPage{}
701+ cls.Ptr = cret
702+ return cls
707 }703 }
708 704
709 var xTabViewAddShortcuts func(uintptr, TabViewShortcuts)705 var xTabViewAddShortcuts func(uintptr, TabViewShortcuts)
@@ -721,36 +717,34 @@ var xTabViewAppend func(uintptr, uintptr) uintptr
721 717
722 // Inserts @child as the last non-pinned page.718 // Inserts @child as the last non-pinned page.
723 func (x *TabView) Append(ChildVar *gtk.Widget) *TabPage {719 func (x *TabView) Append(ChildVar *gtk.Widget) *TabPage {
720+ var cls *TabPage
724 721
725- AppendPtr := xTabViewAppend(x.GoPointer(), ChildVar.GoPointer())722+ cret := xTabViewAppend(x.GoPointer(), ChildVar.GoPointer())
726- if AppendPtr == 0 {
727- return nil
728- }
729-
730- gobject.IncreaseRef(AppendPtr)
731-
732- AppendCls := &TabPage{}
733- AppendCls.Ptr = AppendPtr
734- return AppendCls
735 723
724+ if cret == 0 {
725+ return cls
726+ }
727+ gobject.IncreaseRef(cret)
728+ cls = &TabPage{}
729+ cls.Ptr = cret
730+ return cls
736 }731 }
737 732
738 var xTabViewAppendPinned func(uintptr, uintptr) uintptr733 var xTabViewAppendPinned func(uintptr, uintptr) uintptr
739 734
740 // Inserts @child as the last pinned page.735 // Inserts @child as the last pinned page.
741 func (x *TabView) AppendPinned(ChildVar *gtk.Widget) *TabPage {736 func (x *TabView) AppendPinned(ChildVar *gtk.Widget) *TabPage {
737+ var cls *TabPage
742 738
743- AppendPinnedPtr := xTabViewAppendPinned(x.GoPointer(), ChildVar.GoPointer())739+ cret := xTabViewAppendPinned(x.GoPointer(), ChildVar.GoPointer())
744- if AppendPinnedPtr == 0 {
745- return nil
746- }
747-
748- gobject.IncreaseRef(AppendPinnedPtr)
749-
750- AppendPinnedCls := &TabPage{}
751- AppendPinnedCls.Ptr = AppendPinnedPtr
752- return AppendPinnedCls
753 740
741+ if cret == 0 {
742+ return cls
743+ }
744+ gobject.IncreaseRef(cret)
745+ cls = &TabPage{}
746+ cls.Ptr = cret
747+ return cls
754 }748 }
755 749
756 var xTabViewCloseOtherPages func(uintptr, uintptr)750 var xTabViewCloseOtherPages func(uintptr, uintptr)
@@ -830,18 +824,17 @@ var xTabViewGetDefaultIcon func(uintptr) uintptr
830 824
831 // Gets the default icon of @self.825 // Gets the default icon of @self.
832 func (x *TabView) GetDefaultIcon() *gio.IconBase {826 func (x *TabView) GetDefaultIcon() *gio.IconBase {
827+ var cls *gio.IconBase
833 828
834- GetDefaultIconPtr := xTabViewGetDefaultIcon(x.GoPointer())829+ cret := xTabViewGetDefaultIcon(x.GoPointer())
835- if GetDefaultIconPtr == 0 {
836- return nil
837- }
838-
839- gobject.IncreaseRef(GetDefaultIconPtr)
840-
841- GetDefaultIconCls := &gio.IconBase{}
842- GetDefaultIconCls.Ptr = GetDefaultIconPtr
843- return GetDefaultIconCls
844 830
831+ if cret == 0 {
832+ return cls
833+ }
834+ gobject.IncreaseRef(cret)
835+ cls = &gio.IconBase{}
836+ cls.Ptr = cret
837+ return cls
845 }838 }
846 839
847 var xTabViewGetIsTransferringPage func(uintptr) bool840 var xTabViewGetIsTransferringPage func(uintptr) bool
@@ -855,26 +848,25 @@ var xTabViewGetIsTransferringPage func(uintptr) bool
855 // be safely dropped on the tab view.848 // be safely dropped on the tab view.
856 func (x *TabView) GetIsTransferringPage() bool {849 func (x *TabView) GetIsTransferringPage() bool {
857 850
858- return xTabViewGetIsTransferringPage(x.GoPointer())851+ cret := xTabViewGetIsTransferringPage(x.GoPointer())
859-852+ return cret
860 }853 }
861 854
862 var xTabViewGetMenuModel func(uintptr) uintptr855 var xTabViewGetMenuModel func(uintptr) uintptr
863 856
864 // Gets the tab context menu model for @self.857 // Gets the tab context menu model for @self.
865 func (x *TabView) GetMenuModel() *gio.MenuModel {858 func (x *TabView) GetMenuModel() *gio.MenuModel {
859+ var cls *gio.MenuModel
866 860
867- GetMenuModelPtr := xTabViewGetMenuModel(x.GoPointer())861+ cret := xTabViewGetMenuModel(x.GoPointer())
868- if GetMenuModelPtr == 0 {
869- return nil
870- }
871-
872- gobject.IncreaseRef(GetMenuModelPtr)
873-
874- GetMenuModelCls := &gio.MenuModel{}
875- GetMenuModelCls.Ptr = GetMenuModelPtr
876- return GetMenuModelCls
877 862
863+ if cret == 0 {
864+ return cls
865+ }
866+ gobject.IncreaseRef(cret)
867+ cls = &gio.MenuModel{}
868+ cls.Ptr = cret
869+ return cls
878 }870 }
879 871
880 var xTabViewGetNPages func(uintptr) int872 var xTabViewGetNPages func(uintptr) int
@@ -882,8 +874,8 @@ var xTabViewGetNPages func(uintptr) int
882 // Gets the number of pages in @self.874 // Gets the number of pages in @self.
883 func (x *TabView) GetNPages() int {875 func (x *TabView) GetNPages() int {
884 876
885- return xTabViewGetNPages(x.GoPointer())877+ cret := xTabViewGetNPages(x.GoPointer())
886-878+ return cret
887 }879 }
888 880
889 var xTabViewGetNPinnedPages func(uintptr) int881 var xTabViewGetNPinnedPages func(uintptr) int
@@ -893,44 +885,42 @@ var xTabViewGetNPinnedPages func(uintptr) int
893 // See [method@TabView.set_page_pinned].885 // See [method@TabView.set_page_pinned].
894 func (x *TabView) GetNPinnedPages() int {886 func (x *TabView) GetNPinnedPages() int {
895 887
896- return xTabViewGetNPinnedPages(x.GoPointer())888+ cret := xTabViewGetNPinnedPages(x.GoPointer())
897-889+ return cret
898 }890 }
899 891
900 var xTabViewGetNthPage func(uintptr, int) uintptr892 var xTabViewGetNthPage func(uintptr, int) uintptr
901 893
902 // Gets the [class@TabPage] representing the child at @position.894 // Gets the [class@TabPage] representing the child at @position.
903 func (x *TabView) GetNthPage(PositionVar int) *TabPage {895 func (x *TabView) GetNthPage(PositionVar int) *TabPage {
896+ var cls *TabPage
904 897
905- GetNthPagePtr := xTabViewGetNthPage(x.GoPointer(), PositionVar)898+ cret := xTabViewGetNthPage(x.GoPointer(), PositionVar)
906- if GetNthPagePtr == 0 {
907- return nil
908- }
909-
910- gobject.IncreaseRef(GetNthPagePtr)
911-
912- GetNthPageCls := &TabPage{}
913- GetNthPageCls.Ptr = GetNthPagePtr
914- return GetNthPageCls
915 899
900+ if cret == 0 {
901+ return cls
902+ }
903+ gobject.IncreaseRef(cret)
904+ cls = &TabPage{}
905+ cls.Ptr = cret
906+ return cls
916 }907 }
917 908
918 var xTabViewGetPage func(uintptr, uintptr) uintptr909 var xTabViewGetPage func(uintptr, uintptr) uintptr
919 910
920 // Gets the [class@TabPage] object representing @child.911 // Gets the [class@TabPage] object representing @child.
921 func (x *TabView) GetPage(ChildVar *gtk.Widget) *TabPage {912 func (x *TabView) GetPage(ChildVar *gtk.Widget) *TabPage {
913+ var cls *TabPage
922 914
923- GetPagePtr := xTabViewGetPage(x.GoPointer(), ChildVar.GoPointer())915+ cret := xTabViewGetPage(x.GoPointer(), ChildVar.GoPointer())
924- if GetPagePtr == 0 {
925- return nil
926- }
927-
928- gobject.IncreaseRef(GetPagePtr)
929-
930- GetPageCls := &TabPage{}
931- GetPageCls.Ptr = GetPagePtr
932- return GetPageCls
933 916
917+ if cret == 0 {
918+ return cls
919+ }
920+ gobject.IncreaseRef(cret)
921+ cls = &TabPage{}
922+ cls.Ptr = cret
923+ return cls
934 }924 }
935 925
936 var xTabViewGetPagePosition func(uintptr, uintptr) int926 var xTabViewGetPagePosition func(uintptr, uintptr) int
@@ -938,8 +928,8 @@ var xTabViewGetPagePosition func(uintptr, uintptr) int
938 // Finds the position of @page in @self, starting from 0.928 // Finds the position of @page in @self, starting from 0.
939 func (x *TabView) GetPagePosition(PageVar *TabPage) int {929 func (x *TabView) GetPagePosition(PageVar *TabPage) int {
940 930
941- return xTabViewGetPagePosition(x.GoPointer(), PageVar.GoPointer())931+ cret := xTabViewGetPagePosition(x.GoPointer(), PageVar.GoPointer())
942-932+ return cret
943 }933 }
944 934
945 var xTabViewGetPages func(uintptr) uintptr935 var xTabViewGetPages func(uintptr) uintptr
@@ -950,34 +940,33 @@ var xTabViewGetPages func(uintptr) uintptr
950 // [iface@Gtk.SelectionModel] and can be used to track and change the selected940 // [iface@Gtk.SelectionModel] and can be used to track and change the selected
951 // page.941 // page.
952 func (x *TabView) GetPages() *gtk.SelectionModelBase {942 func (x *TabView) GetPages() *gtk.SelectionModelBase {
943+ var cls *gtk.SelectionModelBase
953 944
954- GetPagesPtr := xTabViewGetPages(x.GoPointer())945+ cret := xTabViewGetPages(x.GoPointer())
955- if GetPagesPtr == 0 {
956- return nil
957- }
958-
959- GetPagesCls := &gtk.SelectionModelBase{}
960- GetPagesCls.Ptr = GetPagesPtr
961- return GetPagesCls
962 946
947+ if cret == 0 {
948+ return cls
949+ }
950+ cls = &gtk.SelectionModelBase{}
951+ cls.Ptr = cret
952+ return cls
963 }953 }
964 954
965 var xTabViewGetSelectedPage func(uintptr) uintptr955 var xTabViewGetSelectedPage func(uintptr) uintptr
966 956
967 // Gets the currently selected page in @self.957 // Gets the currently selected page in @self.
968 func (x *TabView) GetSelectedPage() *TabPage {958 func (x *TabView) GetSelectedPage() *TabPage {
959+ var cls *TabPage
969 960
970- GetSelectedPagePtr := xTabViewGetSelectedPage(x.GoPointer())961+ cret := xTabViewGetSelectedPage(x.GoPointer())
971- if GetSelectedPagePtr == 0 {
972- return nil
973- }
974-
975- gobject.IncreaseRef(GetSelectedPagePtr)
976-
977- GetSelectedPageCls := &TabPage{}
978- GetSelectedPageCls.Ptr = GetSelectedPagePtr
979- return GetSelectedPageCls
980 962
963+ if cret == 0 {
964+ return cls
965+ }
966+ gobject.IncreaseRef(cret)
967+ cls = &TabPage{}
968+ cls.Ptr = cret
969+ return cls
981 }970 }
982 971
983 var xTabViewGetShortcuts func(uintptr) TabViewShortcuts972 var xTabViewGetShortcuts func(uintptr) TabViewShortcuts
@@ -985,8 +974,8 @@ var xTabViewGetShortcuts func(uintptr) TabViewShortcuts
985 // Gets the enabled shortcuts for @self.974 // Gets the enabled shortcuts for @self.
986 func (x *TabView) GetShortcuts() TabViewShortcuts {975 func (x *TabView) GetShortcuts() TabViewShortcuts {
987 976
988- return xTabViewGetShortcuts(x.GoPointer())977+ cret := xTabViewGetShortcuts(x.GoPointer())
989-978+ return cret
990 }979 }
991 980
992 var xTabViewInsert func(uintptr, uintptr, int) uintptr981 var xTabViewInsert func(uintptr, uintptr, int) uintptr
@@ -996,18 +985,17 @@ var xTabViewInsert func(uintptr, uintptr, int) uintptr
996 // It's an error to try to insert a page before a pinned page, in that case985 // It's an error to try to insert a page before a pinned page, in that case
997 // [method@TabView.insert_pinned] should be used instead.986 // [method@TabView.insert_pinned] should be used instead.
998 func (x *TabView) Insert(ChildVar *gtk.Widget, PositionVar int) *TabPage {987 func (x *TabView) Insert(ChildVar *gtk.Widget, PositionVar int) *TabPage {
988+ var cls *TabPage
999 989
1000- InsertPtr := xTabViewInsert(x.GoPointer(), ChildVar.GoPointer(), PositionVar)990+ cret := xTabViewInsert(x.GoPointer(), ChildVar.GoPointer(), PositionVar)
1001- if InsertPtr == 0 {
1002- return nil
1003- }
1004-
1005- gobject.IncreaseRef(InsertPtr)
1006-
1007- InsertCls := &TabPage{}
1008- InsertCls.Ptr = InsertPtr
1009- return InsertCls
1010 991
992+ if cret == 0 {
993+ return cls
994+ }
995+ gobject.IncreaseRef(cret)
996+ cls = &TabPage{}
997+ cls.Ptr = cret
998+ return cls
1011 }999 }
1012 1000
1013 var xTabViewInsertPinned func(uintptr, uintptr, int) uintptr1001 var xTabViewInsertPinned func(uintptr, uintptr, int) uintptr
@@ -1017,18 +1005,17 @@ var xTabViewInsertPinned func(uintptr, uintptr, int) uintptr
1017 // It's an error to try to insert a pinned page after a non-pinned page, in1005 // It's an error to try to insert a pinned page after a non-pinned page, in
1018 // that case [method@TabView.insert] should be used instead.1006 // that case [method@TabView.insert] should be used instead.
1019 func (x *TabView) InsertPinned(ChildVar *gtk.Widget, PositionVar int) *TabPage {1007 func (x *TabView) InsertPinned(ChildVar *gtk.Widget, PositionVar int) *TabPage {
1008+ var cls *TabPage
1020 1009
1021- InsertPinnedPtr := xTabViewInsertPinned(x.GoPointer(), ChildVar.GoPointer(), PositionVar)1010+ cret := xTabViewInsertPinned(x.GoPointer(), ChildVar.GoPointer(), PositionVar)
1022- if InsertPinnedPtr == 0 {
1023- return nil
1024- }
1025-
1026- gobject.IncreaseRef(InsertPinnedPtr)
1027-
1028- InsertPinnedCls := &TabPage{}
1029- InsertPinnedCls.Ptr = InsertPinnedPtr
1030- return InsertPinnedCls
1031 1011
1012+ if cret == 0 {
1013+ return cls
1014+ }
1015+ gobject.IncreaseRef(cret)
1016+ cls = &TabPage{}
1017+ cls.Ptr = cret
1018+ return cls
1032 }1019 }
1033 1020
1034 var xTabViewInvalidateThumbnails func(uintptr)1021 var xTabViewInvalidateThumbnails func(uintptr)
@@ -1047,36 +1034,34 @@ var xTabViewPrepend func(uintptr, uintptr) uintptr
1047 1034
1048 // Inserts @child as the first non-pinned page.1035 // Inserts @child as the first non-pinned page.
1049 func (x *TabView) Prepend(ChildVar *gtk.Widget) *TabPage {1036 func (x *TabView) Prepend(ChildVar *gtk.Widget) *TabPage {
1037+ var cls *TabPage
1050 1038
1051- PrependPtr := xTabViewPrepend(x.GoPointer(), ChildVar.GoPointer())1039+ cret := xTabViewPrepend(x.GoPointer(), ChildVar.GoPointer())
1052- if PrependPtr == 0 {
1053- return nil
1054- }
1055-
1056- gobject.IncreaseRef(PrependPtr)
1057-
1058- PrependCls := &TabPage{}
1059- PrependCls.Ptr = PrependPtr
1060- return PrependCls
1061 1040
1041+ if cret == 0 {
1042+ return cls
1043+ }
1044+ gobject.IncreaseRef(cret)
1045+ cls = &TabPage{}
1046+ cls.Ptr = cret
1047+ return cls
1062 }1048 }
1063 1049
1064 var xTabViewPrependPinned func(uintptr, uintptr) uintptr1050 var xTabViewPrependPinned func(uintptr, uintptr) uintptr
1065 1051
1066 // Inserts @child as the first pinned page.1052 // Inserts @child as the first pinned page.
1067 func (x *TabView) PrependPinned(ChildVar *gtk.Widget) *TabPage {1053 func (x *TabView) PrependPinned(ChildVar *gtk.Widget) *TabPage {
1054+ var cls *TabPage
1068 1055
1069- PrependPinnedPtr := xTabViewPrependPinned(x.GoPointer(), ChildVar.GoPointer())1056+ cret := xTabViewPrependPinned(x.GoPointer(), ChildVar.GoPointer())
1070- if PrependPinnedPtr == 0 {
1071- return nil
1072- }
1073-
1074- gobject.IncreaseRef(PrependPinnedPtr)
1075-
1076- PrependPinnedCls := &TabPage{}
1077- PrependPinnedCls.Ptr = PrependPinnedPtr
1078- return PrependPinnedCls
1079 1057
1058+ if cret == 0 {
1059+ return cls
1060+ }
1061+ gobject.IncreaseRef(cret)
1062+ cls = &TabPage{}
1063+ cls.Ptr = cret
1064+ return cls
1080 }1065 }
1081 1066
1082 var xTabViewRemoveShortcuts func(uintptr, TabViewShortcuts)1067 var xTabViewRemoveShortcuts func(uintptr, TabViewShortcuts)
@@ -1095,8 +1080,8 @@ var xTabViewReorderBackward func(uintptr, uintptr) bool
1095 // Reorders @page to before its previous page if possible.1080 // Reorders @page to before its previous page if possible.
1096 func (x *TabView) ReorderBackward(PageVar *TabPage) bool {1081 func (x *TabView) ReorderBackward(PageVar *TabPage) bool {
1097 1082
1098- return xTabViewReorderBackward(x.GoPointer(), PageVar.GoPointer())1083+ cret := xTabViewReorderBackward(x.GoPointer(), PageVar.GoPointer())
1099-1084+ return cret
1100 }1085 }
1101 1086
1102 var xTabViewReorderFirst func(uintptr, uintptr) bool1087 var xTabViewReorderFirst func(uintptr, uintptr) bool
@@ -1104,8 +1089,8 @@ var xTabViewReorderFirst func(uintptr, uintptr) bool
1104 // Reorders @page to the first possible position.1089 // Reorders @page to the first possible position.
1105 func (x *TabView) ReorderFirst(PageVar *TabPage) bool {1090 func (x *TabView) ReorderFirst(PageVar *TabPage) bool {
1106 1091
1107- return xTabViewReorderFirst(x.GoPointer(), PageVar.GoPointer())1092+ cret := xTabViewReorderFirst(x.GoPointer(), PageVar.GoPointer())
1108-1093+ return cret
1109 }1094 }
1110 1095
1111 var xTabViewReorderForward func(uintptr, uintptr) bool1096 var xTabViewReorderForward func(uintptr, uintptr) bool
@@ -1113,8 +1098,8 @@ var xTabViewReorderForward func(uintptr, uintptr) bool
1113 // Reorders @page to after its next page if possible.1098 // Reorders @page to after its next page if possible.
1114 func (x *TabView) ReorderForward(PageVar *TabPage) bool {1099 func (x *TabView) ReorderForward(PageVar *TabPage) bool {
1115 1100
1116- return xTabViewReorderForward(x.GoPointer(), PageVar.GoPointer())1101+ cret := xTabViewReorderForward(x.GoPointer(), PageVar.GoPointer())
1117-1102+ return cret
1118 }1103 }
1119 1104
1120 var xTabViewReorderLast func(uintptr, uintptr) bool1105 var xTabViewReorderLast func(uintptr, uintptr) bool
@@ -1122,8 +1107,8 @@ var xTabViewReorderLast func(uintptr, uintptr) bool
1122 // Reorders @page to the last possible position.1107 // Reorders @page to the last possible position.
1123 func (x *TabView) ReorderLast(PageVar *TabPage) bool {1108 func (x *TabView) ReorderLast(PageVar *TabPage) bool {
1124 1109
1125- return xTabViewReorderLast(x.GoPointer(), PageVar.GoPointer())1110+ cret := xTabViewReorderLast(x.GoPointer(), PageVar.GoPointer())
1126-1111+ return cret
1127 }1112 }
1128 1113
1129 var xTabViewReorderPage func(uintptr, uintptr, int) bool1114 var xTabViewReorderPage func(uintptr, uintptr, int) bool
@@ -1134,8 +1119,8 @@ var xTabViewReorderPage func(uintptr, uintptr, int) bool
1134 // one, or a non-pinned page before a pinned one.1119 // one, or a non-pinned page before a pinned one.
1135 func (x *TabView) ReorderPage(PageVar *TabPage, PositionVar int) bool {1120 func (x *TabView) ReorderPage(PageVar *TabPage, PositionVar int) bool {
1136 1121
1137- return xTabViewReorderPage(x.GoPointer(), PageVar.GoPointer(), PositionVar)1122+ cret := xTabViewReorderPage(x.GoPointer(), PageVar.GoPointer(), PositionVar)
1138-1123+ return cret
1139 }1124 }
1140 1125
1141 var xTabViewSelectNextPage func(uintptr) bool1126 var xTabViewSelectNextPage func(uintptr) bool
@@ -1145,8 +1130,8 @@ var xTabViewSelectNextPage func(uintptr) bool
1145 // If the last page was already selected, this function does nothing.1130 // If the last page was already selected, this function does nothing.
1146 func (x *TabView) SelectNextPage() bool {1131 func (x *TabView) SelectNextPage() bool {
1147 1132
1148- return xTabViewSelectNextPage(x.GoPointer())1133+ cret := xTabViewSelectNextPage(x.GoPointer())
1149-1134+ return cret
1150 }1135 }
1151 1136
1152 var xTabViewSelectPreviousPage func(uintptr) bool1137 var xTabViewSelectPreviousPage func(uintptr) bool
@@ -1156,8 +1141,8 @@ var xTabViewSelectPreviousPage func(uintptr) bool
1156 // If the first page was already selected, this function does nothing.1141 // If the first page was already selected, this function does nothing.
1157 func (x *TabView) SelectPreviousPage() bool {1142 func (x *TabView) SelectPreviousPage() bool {
1158 1143
1159- return xTabViewSelectPreviousPage(x.GoPointer())1144+ cret := xTabViewSelectPreviousPage(x.GoPointer())
1160-1145+ return cret
1161 }1146 }
1162 1147
1163 var xTabViewSetDefaultIcon func(uintptr, uintptr)1148 var xTabViewSetDefaultIcon func(uintptr, uintptr)
@@ -1416,8 +1401,8 @@ func (x *TabView) ConnectSetupMenu(cb func(TabView, uintptr)) {
1416 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.1401 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
1417 func (x *TabView) GetAccessibleRole() gtk.AccessibleRole {1402 func (x *TabView) GetAccessibleRole() gtk.AccessibleRole {
1418 1403
1419- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())1404+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
1420-1405+ return cret
1421 }1406 }
1422 1407
1423 // Resets the accessible @property to its default value.1408 // Resets the accessible @property to its default value.
@@ -1552,8 +1537,8 @@ func (x *TabView) UpdateStateValue(NStatesVar int, StatesVar uintptr, ValuesVar
1552 // of the <object> tag used to construct the @buildable.1537 // of the <object> tag used to construct the @buildable.
1553 func (x *TabView) GetBuildableId() string {1538 func (x *TabView) GetBuildableId() string {
1554 1539
1555- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())1540+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
1556-1541+ return cret
1557 }1542 }
1558 1543
1559 func init() {1544 func init() {
M v4/adw/adw-timed-animation.go +23 -22
@@ -42,16 +42,17 @@ var xNewTimedAnimation func(uintptr, float64, float64, uint, uintptr) uintptr
42 // Creates a new `AdwTimedAnimation` on @widget to animate @target from @from42 // Creates a new `AdwTimedAnimation` on @widget to animate @target from @from
43 // to @to.43 // to @to.
44 func NewTimedAnimation(WidgetVar *gtk.Widget, FromVar float64, ToVar float64, DurationVar uint, TargetVar *AnimationTarget) *Animation {44 func NewTimedAnimation(WidgetVar *gtk.Widget, FromVar float64, ToVar float64, DurationVar uint, TargetVar *AnimationTarget) *Animation {
45- NewTimedAnimationPtr := xNewTimedAnimation(WidgetVar.GoPointer(), FromVar, ToVar, DurationVar, TargetVar.GoPointer())45+ var cls *Animation
46- if NewTimedAnimationPtr == 0 {
47- return nil
48- }
49 46
50- gobject.IncreaseRef(NewTimedAnimationPtr)47+ cret := xNewTimedAnimation(WidgetVar.GoPointer(), FromVar, ToVar, DurationVar, TargetVar.GoPointer())
51 48
52- NewTimedAnimationCls := &Animation{}49+ if cret == 0 {
53- NewTimedAnimationCls.Ptr = NewTimedAnimationPtr50+ return cls
54- return NewTimedAnimationCls51+ }
52+ gobject.IncreaseRef(cret)
53+ cls = &Animation{}
54+ cls.Ptr = cret
55+ return cls
55 }56 }
56 57
57 var xTimedAnimationGetAlternate func(uintptr) bool58 var xTimedAnimationGetAlternate func(uintptr) bool
@@ -59,8 +60,8 @@ var xTimedAnimationGetAlternate func(uintptr) bool
59 // Gets whether @self changes direction on every iteration.60 // Gets whether @self changes direction on every iteration.
60 func (x *TimedAnimation) GetAlternate() bool {61 func (x *TimedAnimation) GetAlternate() bool {
61 62
62- return xTimedAnimationGetAlternate(x.GoPointer())63+ cret := xTimedAnimationGetAlternate(x.GoPointer())
63-64+ return cret
64 }65 }
65 66
66 var xTimedAnimationGetDuration func(uintptr) uint67 var xTimedAnimationGetDuration func(uintptr) uint
@@ -68,8 +69,8 @@ var xTimedAnimationGetDuration func(uintptr) uint
68 // Gets the duration of @self.69 // Gets the duration of @self.
69 func (x *TimedAnimation) GetDuration() uint {70 func (x *TimedAnimation) GetDuration() uint {
70 71
71- return xTimedAnimationGetDuration(x.GoPointer())72+ cret := xTimedAnimationGetDuration(x.GoPointer())
72-73+ return cret
73 }74 }
74 75
75 var xTimedAnimationGetEasing func(uintptr) Easing76 var xTimedAnimationGetEasing func(uintptr) Easing
@@ -77,8 +78,8 @@ var xTimedAnimationGetEasing func(uintptr) Easing
77 // Gets the easing function @self uses.78 // Gets the easing function @self uses.
78 func (x *TimedAnimation) GetEasing() Easing {79 func (x *TimedAnimation) GetEasing() Easing {
79 80
80- return xTimedAnimationGetEasing(x.GoPointer())81+ cret := xTimedAnimationGetEasing(x.GoPointer())
81-82+ return cret
82 }83 }
83 84
84 var xTimedAnimationGetRepeatCount func(uintptr) uint85 var xTimedAnimationGetRepeatCount func(uintptr) uint
@@ -86,8 +87,8 @@ var xTimedAnimationGetRepeatCount func(uintptr) uint
86 // Gets the number of times @self will play.87 // Gets the number of times @self will play.
87 func (x *TimedAnimation) GetRepeatCount() uint {88 func (x *TimedAnimation) GetRepeatCount() uint {
88 89
89- return xTimedAnimationGetRepeatCount(x.GoPointer())90+ cret := xTimedAnimationGetRepeatCount(x.GoPointer())
90-91+ return cret
91 }92 }
92 93
93 var xTimedAnimationGetReverse func(uintptr) bool94 var xTimedAnimationGetReverse func(uintptr) bool
@@ -95,8 +96,8 @@ var xTimedAnimationGetReverse func(uintptr) bool
95 // Gets whether @self plays backwards.96 // Gets whether @self plays backwards.
96 func (x *TimedAnimation) GetReverse() bool {97 func (x *TimedAnimation) GetReverse() bool {
97 98
98- return xTimedAnimationGetReverse(x.GoPointer())99+ cret := xTimedAnimationGetReverse(x.GoPointer())
99-100+ return cret
100 }101 }
101 102
102 var xTimedAnimationGetValueFrom func(uintptr) float64103 var xTimedAnimationGetValueFrom func(uintptr) float64
@@ -104,8 +105,8 @@ var xTimedAnimationGetValueFrom func(uintptr) float64
104 // Gets the value @self will animate from.105 // Gets the value @self will animate from.
105 func (x *TimedAnimation) GetValueFrom() float64 {106 func (x *TimedAnimation) GetValueFrom() float64 {
106 107
107- return xTimedAnimationGetValueFrom(x.GoPointer())108+ cret := xTimedAnimationGetValueFrom(x.GoPointer())
108-109+ return cret
109 }110 }
110 111
111 var xTimedAnimationGetValueTo func(uintptr) float64112 var xTimedAnimationGetValueTo func(uintptr) float64
@@ -113,8 +114,8 @@ var xTimedAnimationGetValueTo func(uintptr) float64
113 // Gets the value @self will animate to.114 // Gets the value @self will animate to.
114 func (x *TimedAnimation) GetValueTo() float64 {115 func (x *TimedAnimation) GetValueTo() float64 {
115 116
116- return xTimedAnimationGetValueTo(x.GoPointer())117+ cret := xTimedAnimationGetValueTo(x.GoPointer())
117-118+ return cret
118 }119 }
119 120
120 var xTimedAnimationSetAlternate func(uintptr, bool)121 var xTimedAnimationSetAlternate func(uintptr, bool)
M v4/adw/adw-toast-overlay.go +22 -22
@@ -69,16 +69,17 @@ var xNewToastOverlay func() uintptr
69 69
70 // Creates a new `AdwToastOverlay`.70 // Creates a new `AdwToastOverlay`.
71 func NewToastOverlay() *gtk.Widget {71 func NewToastOverlay() *gtk.Widget {
72- NewToastOverlayPtr := xNewToastOverlay()72+ var cls *gtk.Widget
73- if NewToastOverlayPtr == 0 {
74- return nil
75- }
76 73
77- gobject.IncreaseRef(NewToastOverlayPtr)74+ cret := xNewToastOverlay()
78 75
79- NewToastOverlayCls := &gtk.Widget{}76+ if cret == 0 {
80- NewToastOverlayCls.Ptr = NewToastOverlayPtr77+ return cls
81- return NewToastOverlayCls78+ }
79+ gobject.IncreaseRef(cret)
80+ cls = &gtk.Widget{}
81+ cls.Ptr = cret
82+ return cls
82 }83 }
83 84
84 var xToastOverlayAddToast func(uintptr, uintptr)85 var xToastOverlayAddToast func(uintptr, uintptr)
@@ -103,18 +104,17 @@ var xToastOverlayGetChild func(uintptr) uintptr
103 104
104 // Gets the child widget of @self.105 // Gets the child widget of @self.
105 func (x *ToastOverlay) GetChild() *gtk.Widget {106 func (x *ToastOverlay) GetChild() *gtk.Widget {
107+ var cls *gtk.Widget
106 108
107- GetChildPtr := xToastOverlayGetChild(x.GoPointer())109+ cret := xToastOverlayGetChild(x.GoPointer())
108- if GetChildPtr == 0 {
109- return nil
110- }
111-
112- gobject.IncreaseRef(GetChildPtr)
113-
114- GetChildCls := &gtk.Widget{}
115- GetChildCls.Ptr = GetChildPtr
116- return GetChildCls
117 110
111+ if cret == 0 {
112+ return cls
113+ }
114+ gobject.IncreaseRef(cret)
115+ cls = &gtk.Widget{}
116+ cls.Ptr = cret
117+ return cls
118 }118 }
119 119
120 var xToastOverlaySetChild func(uintptr, uintptr)120 var xToastOverlaySetChild func(uintptr, uintptr)
@@ -137,8 +137,8 @@ func (c *ToastOverlay) SetGoPointer(ptr uintptr) {
137 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.137 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
138 func (x *ToastOverlay) GetAccessibleRole() gtk.AccessibleRole {138 func (x *ToastOverlay) GetAccessibleRole() gtk.AccessibleRole {
139 139
140- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())140+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
141-141+ return cret
142 }142 }
143 143
144 // Resets the accessible @property to its default value.144 // Resets the accessible @property to its default value.
@@ -273,8 +273,8 @@ func (x *ToastOverlay) UpdateStateValue(NStatesVar int, StatesVar uintptr, Value
273 // of the <object> tag used to construct the @buildable.273 // of the <object> tag used to construct the @buildable.
274 func (x *ToastOverlay) GetBuildableId() string {274 func (x *ToastOverlay) GetBuildableId() string {
275 275
276- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())276+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
277-277+ return cret
278 }278 }
279 279
280 func init() {280 func init() {
M v4/adw/adw-toast.go +39 -36
@@ -175,14 +175,16 @@ var xNewToast func(string) uintptr
175 //175 //
176 // @title can be marked up with the Pango text markup language.176 // @title can be marked up with the Pango text markup language.
177 func NewToast(TitleVar string) *Toast {177 func NewToast(TitleVar string) *Toast {
178- NewToastPtr := xNewToast(TitleVar)178+ var cls *Toast
179- if NewToastPtr == 0 {179+
180- return nil180+ cret := xNewToast(TitleVar)
181- }
182 181
183- NewToastCls := &Toast{}182+ if cret == 0 {
184- NewToastCls.Ptr = NewToastPtr183+ return cls
185- return NewToastCls184+ }
185+ cls = &Toast{}
186+ cls.Ptr = cret
187+ return cls
186 }188 }
187 189
188 var xNewFormatToast func(string, ...interface{}) uintptr190 var xNewFormatToast func(string, ...interface{}) uintptr
@@ -193,14 +195,16 @@ var xNewFormatToast func(string, ...interface{}) uintptr
193 //195 //
194 // See also: [ctor@Toast.new]196 // See also: [ctor@Toast.new]
195 func NewFormatToast(FormatVar string, varArgs ...interface{}) *Toast {197 func NewFormatToast(FormatVar string, varArgs ...interface{}) *Toast {
196- NewFormatToastPtr := xNewFormatToast(FormatVar, varArgs...)198+ var cls *Toast
197- if NewFormatToastPtr == 0 {
198- return nil
199- }
200 199
201- NewFormatToastCls := &Toast{}200+ cret := xNewFormatToast(FormatVar, varArgs...)
202- NewFormatToastCls.Ptr = NewFormatToastPtr201+
203- return NewFormatToastCls202+ if cret == 0 {
203+ return cls
204+ }
205+ cls = &Toast{}
206+ cls.Ptr = cret
207+ return cls
204 }208 }
205 209
206 var xToastDismiss func(uintptr)210 var xToastDismiss func(uintptr)
@@ -220,8 +224,8 @@ var xToastGetActionName func(uintptr) string
220 // Gets the name of the associated action.224 // Gets the name of the associated action.
221 func (x *Toast) GetActionName() string {225 func (x *Toast) GetActionName() string {
222 226
223- return xToastGetActionName(x.GoPointer())227+ cret := xToastGetActionName(x.GoPointer())
224-228+ return cret
225 }229 }
226 230
227 var xToastGetActionTargetValue func(uintptr) *glib.Variant231 var xToastGetActionTargetValue func(uintptr) *glib.Variant
@@ -229,8 +233,8 @@ var xToastGetActionTargetValue func(uintptr) *glib.Variant
229 // Gets the parameter for action invocations.233 // Gets the parameter for action invocations.
230 func (x *Toast) GetActionTargetValue() *glib.Variant {234 func (x *Toast) GetActionTargetValue() *glib.Variant {
231 235
232- return xToastGetActionTargetValue(x.GoPointer())236+ cret := xToastGetActionTargetValue(x.GoPointer())
233-237+ return cret
234 }238 }
235 239
236 var xToastGetButtonLabel func(uintptr) string240 var xToastGetButtonLabel func(uintptr) string
@@ -238,26 +242,25 @@ var xToastGetButtonLabel func(uintptr) string
238 // Gets the label to show on the button.242 // Gets the label to show on the button.
239 func (x *Toast) GetButtonLabel() string {243 func (x *Toast) GetButtonLabel() string {
240 244
241- return xToastGetButtonLabel(x.GoPointer())245+ cret := xToastGetButtonLabel(x.GoPointer())
242-246+ return cret
243 }247 }
244 248
245 var xToastGetCustomTitle func(uintptr) uintptr249 var xToastGetCustomTitle func(uintptr) uintptr
246 250
247 // Gets the custom title widget of @self.251 // Gets the custom title widget of @self.
248 func (x *Toast) GetCustomTitle() *gtk.Widget {252 func (x *Toast) GetCustomTitle() *gtk.Widget {
253+ var cls *gtk.Widget
249 254
250- GetCustomTitlePtr := xToastGetCustomTitle(x.GoPointer())255+ cret := xToastGetCustomTitle(x.GoPointer())
251- if GetCustomTitlePtr == 0 {
252- return nil
253- }
254-
255- gobject.IncreaseRef(GetCustomTitlePtr)
256-
257- GetCustomTitleCls := &gtk.Widget{}
258- GetCustomTitleCls.Ptr = GetCustomTitlePtr
259- return GetCustomTitleCls
260 256
257+ if cret == 0 {
258+ return cls
259+ }
260+ gobject.IncreaseRef(cret)
261+ cls = &gtk.Widget{}
262+ cls.Ptr = cret
263+ return cls
261 }264 }
262 265
263 var xToastGetPriority func(uintptr) ToastPriority266 var xToastGetPriority func(uintptr) ToastPriority
@@ -265,8 +268,8 @@ var xToastGetPriority func(uintptr) ToastPriority
265 // Gets priority for @self.268 // Gets priority for @self.
266 func (x *Toast) GetPriority() ToastPriority {269 func (x *Toast) GetPriority() ToastPriority {
267 270
268- return xToastGetPriority(x.GoPointer())271+ cret := xToastGetPriority(x.GoPointer())
269-272+ return cret
270 }273 }
271 274
272 var xToastGetTimeout func(uintptr) uint275 var xToastGetTimeout func(uintptr) uint
@@ -274,8 +277,8 @@ var xToastGetTimeout func(uintptr) uint
274 // Gets timeout for @self.277 // Gets timeout for @self.
275 func (x *Toast) GetTimeout() uint {278 func (x *Toast) GetTimeout() uint {
276 279
277- return xToastGetTimeout(x.GoPointer())280+ cret := xToastGetTimeout(x.GoPointer())
278-281+ return cret
279 }282 }
280 283
281 var xToastGetTitle func(uintptr) string284 var xToastGetTitle func(uintptr) string
@@ -286,8 +289,8 @@ var xToastGetTitle func(uintptr) string
286 // the return value will be %NULL.289 // the return value will be %NULL.
287 func (x *Toast) GetTitle() string {290 func (x *Toast) GetTitle() string {
288 291
289- return xToastGetTitle(x.GoPointer())292+ cret := xToastGetTitle(x.GoPointer())
290-293+ return cret
291 }294 }
292 295
293 var xToastSetActionName func(uintptr, string)296 var xToastSetActionName func(uintptr, string)
M v4/adw/adw-version.go +6 -6
@@ -18,8 +18,8 @@ var xGetMajorVersion func() uint
18 // included when compiling your code.18 // included when compiling your code.
19 func GetMajorVersion() uint {19 func GetMajorVersion() uint {
20 20
21- return xGetMajorVersion()21+ cret := xGetMajorVersion()
22-22+ return cret
23 }23 }
24 24
25 var xGetMicroVersion func() uint25 var xGetMicroVersion func() uint
@@ -34,8 +34,8 @@ var xGetMicroVersion func() uint
34 // included when compiling your code.34 // included when compiling your code.
35 func GetMicroVersion() uint {35 func GetMicroVersion() uint {
36 36
37- return xGetMicroVersion()37+ cret := xGetMicroVersion()
38-38+ return cret
39 }39 }
40 40
41 var xGetMinorVersion func() uint41 var xGetMinorVersion func() uint
@@ -50,8 +50,8 @@ var xGetMinorVersion func() uint
50 // included when compiling your code.50 // included when compiling your code.
51 func GetMinorVersion() uint {51 func GetMinorVersion() uint {
52 52
53- return xGetMinorVersion()53+ cret := xGetMinorVersion()
54-54+ return cret
55 }55 }
56 56
57 func init() {57 func init() {
M v4/adw/adw-view-stack.go +115 -122
@@ -86,34 +86,34 @@ var xNewViewStack func() uintptr
86 86
87 // Creates a new `AdwViewStack`.87 // Creates a new `AdwViewStack`.
88 func NewViewStack() *gtk.Widget {88 func NewViewStack() *gtk.Widget {
89- NewViewStackPtr := xNewViewStack()89+ var cls *gtk.Widget
90- if NewViewStackPtr == 0 {
91- return nil
92- }
93 90
94- gobject.IncreaseRef(NewViewStackPtr)91+ cret := xNewViewStack()
95 92
96- NewViewStackCls := &gtk.Widget{}93+ if cret == 0 {
97- NewViewStackCls.Ptr = NewViewStackPtr94+ return cls
98- return NewViewStackCls95+ }
96+ gobject.IncreaseRef(cret)
97+ cls = &gtk.Widget{}
98+ cls.Ptr = cret
99+ return cls
99 }100 }
100 101
101 var xViewStackAdd func(uintptr, uintptr) uintptr102 var xViewStackAdd func(uintptr, uintptr) uintptr
102 103
103 // Adds a child to @self.104 // Adds a child to @self.
104 func (x *ViewStack) Add(ChildVar *gtk.Widget) *ViewStackPage {105 func (x *ViewStack) Add(ChildVar *gtk.Widget) *ViewStackPage {
106+ var cls *ViewStackPage
105 107
106- AddPtr := xViewStackAdd(x.GoPointer(), ChildVar.GoPointer())108+ cret := xViewStackAdd(x.GoPointer(), ChildVar.GoPointer())
107- if AddPtr == 0 {
108- return nil
109- }
110-
111- gobject.IncreaseRef(AddPtr)
112-
113- AddCls := &ViewStackPage{}
114- AddCls.Ptr = AddPtr
115- return AddCls
116 109
110+ if cret == 0 {
111+ return cls
112+ }
113+ gobject.IncreaseRef(cret)
114+ cls = &ViewStackPage{}
115+ cls.Ptr = cret
116+ return cls
117 }117 }
118 118
119 var xViewStackAddNamed func(uintptr, uintptr, string) uintptr119 var xViewStackAddNamed func(uintptr, uintptr, string) uintptr
@@ -122,18 +122,17 @@ var xViewStackAddNamed func(uintptr, uintptr, string) uintptr
122 //122 //
123 // The child is identified by the @name.123 // The child is identified by the @name.
124 func (x *ViewStack) AddNamed(ChildVar *gtk.Widget, NameVar string) *ViewStackPage {124 func (x *ViewStack) AddNamed(ChildVar *gtk.Widget, NameVar string) *ViewStackPage {
125+ var cls *ViewStackPage
125 126
126- AddNamedPtr := xViewStackAddNamed(x.GoPointer(), ChildVar.GoPointer(), NameVar)127+ cret := xViewStackAddNamed(x.GoPointer(), ChildVar.GoPointer(), NameVar)
127- if AddNamedPtr == 0 {
128- return nil
129- }
130-
131- gobject.IncreaseRef(AddNamedPtr)
132-
133- AddNamedCls := &ViewStackPage{}
134- AddNamedCls.Ptr = AddNamedPtr
135- return AddNamedCls
136 128
129+ if cret == 0 {
130+ return cls
131+ }
132+ gobject.IncreaseRef(cret)
133+ cls = &ViewStackPage{}
134+ cls.Ptr = cret
135+ return cls
137 }136 }
138 137
139 var xViewStackAddTitled func(uintptr, uintptr, string, string) uintptr138 var xViewStackAddTitled func(uintptr, uintptr, string, string) uintptr
@@ -143,18 +142,17 @@ var xViewStackAddTitled func(uintptr, uintptr, string, string) uintptr
143 // The child is identified by the @name. The @title will be used by142 // The child is identified by the @name. The @title will be used by
144 // [class@ViewSwitcher] to represent @child, so it should be short.143 // [class@ViewSwitcher] to represent @child, so it should be short.
145 func (x *ViewStack) AddTitled(ChildVar *gtk.Widget, NameVar string, TitleVar string) *ViewStackPage {144 func (x *ViewStack) AddTitled(ChildVar *gtk.Widget, NameVar string, TitleVar string) *ViewStackPage {
145+ var cls *ViewStackPage
146 146
147- AddTitledPtr := xViewStackAddTitled(x.GoPointer(), ChildVar.GoPointer(), NameVar, TitleVar)147+ cret := xViewStackAddTitled(x.GoPointer(), ChildVar.GoPointer(), NameVar, TitleVar)
148- if AddTitledPtr == 0 {
149- return nil
150- }
151-
152- gobject.IncreaseRef(AddTitledPtr)
153-
154- AddTitledCls := &ViewStackPage{}
155- AddTitledCls.Ptr = AddTitledPtr
156- return AddTitledCls
157 148
149+ if cret == 0 {
150+ return cls
151+ }
152+ gobject.IncreaseRef(cret)
153+ cls = &ViewStackPage{}
154+ cls.Ptr = cret
155+ return cls
158 }156 }
159 157
160 var xViewStackAddTitledWithIcon func(uintptr, uintptr, string, string, string) uintptr158 var xViewStackAddTitledWithIcon func(uintptr, uintptr, string, string, string) uintptr
@@ -164,36 +162,34 @@ var xViewStackAddTitledWithIcon func(uintptr, uintptr, string, string, string) u
164 // The child is identified by the @name. The @title and @icon_name will be used162 // The child is identified by the @name. The @title and @icon_name will be used
165 // by [class@ViewSwitcher] to represent @child.163 // by [class@ViewSwitcher] to represent @child.
166 func (x *ViewStack) AddTitledWithIcon(ChildVar *gtk.Widget, NameVar string, TitleVar string, IconNameVar string) *ViewStackPage {164 func (x *ViewStack) AddTitledWithIcon(ChildVar *gtk.Widget, NameVar string, TitleVar string, IconNameVar string) *ViewStackPage {
165+ var cls *ViewStackPage
167 166
168- AddTitledWithIconPtr := xViewStackAddTitledWithIcon(x.GoPointer(), ChildVar.GoPointer(), NameVar, TitleVar, IconNameVar)167+ cret := xViewStackAddTitledWithIcon(x.GoPointer(), ChildVar.GoPointer(), NameVar, TitleVar, IconNameVar)
169- if AddTitledWithIconPtr == 0 {
170- return nil
171- }
172-
173- gobject.IncreaseRef(AddTitledWithIconPtr)
174-
175- AddTitledWithIconCls := &ViewStackPage{}
176- AddTitledWithIconCls.Ptr = AddTitledWithIconPtr
177- return AddTitledWithIconCls
178 168
169+ if cret == 0 {
170+ return cls
171+ }
172+ gobject.IncreaseRef(cret)
173+ cls = &ViewStackPage{}
174+ cls.Ptr = cret
175+ return cls
179 }176 }
180 177
181 var xViewStackGetChildByName func(uintptr, string) uintptr178 var xViewStackGetChildByName func(uintptr, string) uintptr
182 179
183 // Finds the child with @name in @self.180 // Finds the child with @name in @self.
184 func (x *ViewStack) GetChildByName(NameVar string) *gtk.Widget {181 func (x *ViewStack) GetChildByName(NameVar string) *gtk.Widget {
182+ var cls *gtk.Widget
185 183
186- GetChildByNamePtr := xViewStackGetChildByName(x.GoPointer(), NameVar)184+ cret := xViewStackGetChildByName(x.GoPointer(), NameVar)
187- if GetChildByNamePtr == 0 {
188- return nil
189- }
190-
191- gobject.IncreaseRef(GetChildByNamePtr)
192-
193- GetChildByNameCls := &gtk.Widget{}
194- GetChildByNameCls.Ptr = GetChildByNamePtr
195- return GetChildByNameCls
196 185
186+ if cret == 0 {
187+ return cls
188+ }
189+ gobject.IncreaseRef(cret)
190+ cls = &gtk.Widget{}
191+ cls.Ptr = cret
192+ return cls
197 }193 }
198 194
199 var xViewStackGetHhomogeneous func(uintptr) bool195 var xViewStackGetHhomogeneous func(uintptr) bool
@@ -201,26 +197,25 @@ var xViewStackGetHhomogeneous func(uintptr) bool
201 // Gets whether @self is horizontally homogeneous.197 // Gets whether @self is horizontally homogeneous.
202 func (x *ViewStack) GetHhomogeneous() bool {198 func (x *ViewStack) GetHhomogeneous() bool {
203 199
204- return xViewStackGetHhomogeneous(x.GoPointer())200+ cret := xViewStackGetHhomogeneous(x.GoPointer())
205-201+ return cret
206 }202 }
207 203
208 var xViewStackGetPage func(uintptr, uintptr) uintptr204 var xViewStackGetPage func(uintptr, uintptr) uintptr
209 205
210 // Gets the [class@ViewStackPage] object for @child.206 // Gets the [class@ViewStackPage] object for @child.
211 func (x *ViewStack) GetPage(ChildVar *gtk.Widget) *ViewStackPage {207 func (x *ViewStack) GetPage(ChildVar *gtk.Widget) *ViewStackPage {
208+ var cls *ViewStackPage
212 209
213- GetPagePtr := xViewStackGetPage(x.GoPointer(), ChildVar.GoPointer())210+ cret := xViewStackGetPage(x.GoPointer(), ChildVar.GoPointer())
214- if GetPagePtr == 0 {
215- return nil
216- }
217-
218- gobject.IncreaseRef(GetPagePtr)
219-
220- GetPageCls := &ViewStackPage{}
221- GetPageCls.Ptr = GetPagePtr
222- return GetPageCls
223 211
212+ if cret == 0 {
213+ return cls
214+ }
215+ gobject.IncreaseRef(cret)
216+ cls = &ViewStackPage{}
217+ cls.Ptr = cret
218+ return cls
224 }219 }
225 220
226 var xViewStackGetPages func(uintptr) uintptr221 var xViewStackGetPages func(uintptr) uintptr
@@ -231,16 +226,16 @@ var xViewStackGetPages func(uintptr) uintptr
231 // [iface@Gtk.SelectionModel] and can be used to track and change the visible226 // [iface@Gtk.SelectionModel] and can be used to track and change the visible
232 // page.227 // page.
233 func (x *ViewStack) GetPages() *gtk.SelectionModelBase {228 func (x *ViewStack) GetPages() *gtk.SelectionModelBase {
229+ var cls *gtk.SelectionModelBase
234 230
235- GetPagesPtr := xViewStackGetPages(x.GoPointer())231+ cret := xViewStackGetPages(x.GoPointer())
236- if GetPagesPtr == 0 {
237- return nil
238- }
239-
240- GetPagesCls := &gtk.SelectionModelBase{}
241- GetPagesCls.Ptr = GetPagesPtr
242- return GetPagesCls
243 232
233+ if cret == 0 {
234+ return cls
235+ }
236+ cls = &gtk.SelectionModelBase{}
237+ cls.Ptr = cret
238+ return cls
244 }239 }
245 240
246 var xViewStackGetVhomogeneous func(uintptr) bool241 var xViewStackGetVhomogeneous func(uintptr) bool
@@ -248,26 +243,25 @@ var xViewStackGetVhomogeneous func(uintptr) bool
248 // Gets whether @self is vertically homogeneous.243 // Gets whether @self is vertically homogeneous.
249 func (x *ViewStack) GetVhomogeneous() bool {244 func (x *ViewStack) GetVhomogeneous() bool {
250 245
251- return xViewStackGetVhomogeneous(x.GoPointer())246+ cret := xViewStackGetVhomogeneous(x.GoPointer())
252-247+ return cret
253 }248 }
254 249
255 var xViewStackGetVisibleChild func(uintptr) uintptr250 var xViewStackGetVisibleChild func(uintptr) uintptr
256 251
257 // Gets the currently visible child of @self, .252 // Gets the currently visible child of @self, .
258 func (x *ViewStack) GetVisibleChild() *gtk.Widget {253 func (x *ViewStack) GetVisibleChild() *gtk.Widget {
254+ var cls *gtk.Widget
259 255
260- GetVisibleChildPtr := xViewStackGetVisibleChild(x.GoPointer())256+ cret := xViewStackGetVisibleChild(x.GoPointer())
261- if GetVisibleChildPtr == 0 {
262- return nil
263- }
264-
265- gobject.IncreaseRef(GetVisibleChildPtr)
266-
267- GetVisibleChildCls := &gtk.Widget{}
268- GetVisibleChildCls.Ptr = GetVisibleChildPtr
269- return GetVisibleChildCls
270 257
258+ if cret == 0 {
259+ return cls
260+ }
261+ gobject.IncreaseRef(cret)
262+ cls = &gtk.Widget{}
263+ cls.Ptr = cret
264+ return cls
271 }265 }
272 266
273 var xViewStackGetVisibleChildName func(uintptr) string267 var xViewStackGetVisibleChildName func(uintptr) string
@@ -275,8 +269,8 @@ var xViewStackGetVisibleChildName func(uintptr) string
275 // Returns the name of the currently visible child of @self.269 // Returns the name of the currently visible child of @self.
276 func (x *ViewStack) GetVisibleChildName() string {270 func (x *ViewStack) GetVisibleChildName() string {
277 271
278- return xViewStackGetVisibleChildName(x.GoPointer())272+ cret := xViewStackGetVisibleChildName(x.GoPointer())
279-273+ return cret
280 }274 }
281 275
282 var xViewStackRemove func(uintptr, uintptr)276 var xViewStackRemove func(uintptr, uintptr)
@@ -349,8 +343,8 @@ func (c *ViewStack) SetGoPointer(ptr uintptr) {
349 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.343 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
350 func (x *ViewStack) GetAccessibleRole() gtk.AccessibleRole {344 func (x *ViewStack) GetAccessibleRole() gtk.AccessibleRole {
351 345
352- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())346+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
353-347+ return cret
354 }348 }
355 349
356 // Resets the accessible @property to its default value.350 // Resets the accessible @property to its default value.
@@ -485,8 +479,8 @@ func (x *ViewStack) UpdateStateValue(NStatesVar int, StatesVar uintptr, ValuesVa
485 // of the <object> tag used to construct the @buildable.479 // of the <object> tag used to construct the @buildable.
486 func (x *ViewStack) GetBuildableId() string {480 func (x *ViewStack) GetBuildableId() string {
487 481
488- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())482+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
489-483+ return cret
490 }484 }
491 485
492 // An auxiliary class used by [class@ViewStack].486 // An auxiliary class used by [class@ViewStack].
@@ -505,26 +499,25 @@ var xViewStackPageGetBadgeNumber func(uintptr) uint
505 // Gets the badge number for this page.499 // Gets the badge number for this page.
506 func (x *ViewStackPage) GetBadgeNumber() uint {500 func (x *ViewStackPage) GetBadgeNumber() uint {
507 501
508- return xViewStackPageGetBadgeNumber(x.GoPointer())502+ cret := xViewStackPageGetBadgeNumber(x.GoPointer())
509-503+ return cret
510 }504 }
511 505
512 var xViewStackPageGetChild func(uintptr) uintptr506 var xViewStackPageGetChild func(uintptr) uintptr
513 507
514 // Gets the stack child to which @self belongs.508 // Gets the stack child to which @self belongs.
515 func (x *ViewStackPage) GetChild() *gtk.Widget {509 func (x *ViewStackPage) GetChild() *gtk.Widget {
510+ var cls *gtk.Widget
516 511
517- GetChildPtr := xViewStackPageGetChild(x.GoPointer())512+ cret := xViewStackPageGetChild(x.GoPointer())
518- if GetChildPtr == 0 {
519- return nil
520- }
521-
522- gobject.IncreaseRef(GetChildPtr)
523-
524- GetChildCls := &gtk.Widget{}
525- GetChildCls.Ptr = GetChildPtr
526- return GetChildCls
527 513
514+ if cret == 0 {
515+ return cls
516+ }
517+ gobject.IncreaseRef(cret)
518+ cls = &gtk.Widget{}
519+ cls.Ptr = cret
520+ return cls
528 }521 }
529 522
530 var xViewStackPageGetIconName func(uintptr) string523 var xViewStackPageGetIconName func(uintptr) string
@@ -532,8 +525,8 @@ var xViewStackPageGetIconName func(uintptr) string
532 // Gets the icon name of the page.525 // Gets the icon name of the page.
533 func (x *ViewStackPage) GetIconName() string {526 func (x *ViewStackPage) GetIconName() string {
534 527
535- return xViewStackPageGetIconName(x.GoPointer())528+ cret := xViewStackPageGetIconName(x.GoPointer())
536-529+ return cret
537 }530 }
538 531
539 var xViewStackPageGetName func(uintptr) string532 var xViewStackPageGetName func(uintptr) string
@@ -541,8 +534,8 @@ var xViewStackPageGetName func(uintptr) string
541 // Gets the name of the page.534 // Gets the name of the page.
542 func (x *ViewStackPage) GetName() string {535 func (x *ViewStackPage) GetName() string {
543 536
544- return xViewStackPageGetName(x.GoPointer())537+ cret := xViewStackPageGetName(x.GoPointer())
545-538+ return cret
546 }539 }
547 540
548 var xViewStackPageGetNeedsAttention func(uintptr) bool541 var xViewStackPageGetNeedsAttention func(uintptr) bool
@@ -550,8 +543,8 @@ var xViewStackPageGetNeedsAttention func(uintptr) bool
550 // Gets whether the page requires the user attention.543 // Gets whether the page requires the user attention.
551 func (x *ViewStackPage) GetNeedsAttention() bool {544 func (x *ViewStackPage) GetNeedsAttention() bool {
552 545
553- return xViewStackPageGetNeedsAttention(x.GoPointer())546+ cret := xViewStackPageGetNeedsAttention(x.GoPointer())
554-547+ return cret
555 }548 }
556 549
557 var xViewStackPageGetTitle func(uintptr) string550 var xViewStackPageGetTitle func(uintptr) string
@@ -559,8 +552,8 @@ var xViewStackPageGetTitle func(uintptr) string
559 // Gets the page title.552 // Gets the page title.
560 func (x *ViewStackPage) GetTitle() string {553 func (x *ViewStackPage) GetTitle() string {
561 554
562- return xViewStackPageGetTitle(x.GoPointer())555+ cret := xViewStackPageGetTitle(x.GoPointer())
563-556+ return cret
564 }557 }
565 558
566 var xViewStackPageGetUseUnderline func(uintptr) bool559 var xViewStackPageGetUseUnderline func(uintptr) bool
@@ -568,8 +561,8 @@ var xViewStackPageGetUseUnderline func(uintptr) bool
568 // Gets whether underlines in the page title indicate mnemonics.561 // Gets whether underlines in the page title indicate mnemonics.
569 func (x *ViewStackPage) GetUseUnderline() bool {562 func (x *ViewStackPage) GetUseUnderline() bool {
570 563
571- return xViewStackPageGetUseUnderline(x.GoPointer())564+ cret := xViewStackPageGetUseUnderline(x.GoPointer())
572-565+ return cret
573 }566 }
574 567
575 var xViewStackPageGetVisible func(uintptr) bool568 var xViewStackPageGetVisible func(uintptr) bool
@@ -580,8 +573,8 @@ var xViewStackPageGetVisible func(uintptr) bool
580 // property of its widget.573 // property of its widget.
581 func (x *ViewStackPage) GetVisible() bool {574 func (x *ViewStackPage) GetVisible() bool {
582 575
583- return xViewStackPageGetVisible(x.GoPointer())576+ cret := xViewStackPageGetVisible(x.GoPointer())
584-577+ return cret
585 }578 }
586 579
587 var xViewStackPageSetBadgeNumber func(uintptr, uint)580 var xViewStackPageSetBadgeNumber func(uintptr, uint)
@@ -668,8 +661,8 @@ func (c *ViewStackPage) SetGoPointer(ptr uintptr) {
668 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.661 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
669 func (x *ViewStackPage) GetAccessibleRole() gtk.AccessibleRole {662 func (x *ViewStackPage) GetAccessibleRole() gtk.AccessibleRole {
670 663
671- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())664+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
672-665+ return cret
673 }666 }
674 667
675 // Resets the accessible @property to its default value.668 // Resets the accessible @property to its default value.
M v4/adw/adw-view-switcher-bar.go +24 -24
@@ -84,16 +84,17 @@ var xNewViewSwitcherBar func() uintptr
84 84
85 // Creates a new `AdwViewSwitcherBar`.85 // Creates a new `AdwViewSwitcherBar`.
86 func NewViewSwitcherBar() *gtk.Widget {86 func NewViewSwitcherBar() *gtk.Widget {
87- NewViewSwitcherBarPtr := xNewViewSwitcherBar()87+ var cls *gtk.Widget
88- if NewViewSwitcherBarPtr == 0 {
89- return nil
90- }
91 88
92- gobject.IncreaseRef(NewViewSwitcherBarPtr)89+ cret := xNewViewSwitcherBar()
93 90
94- NewViewSwitcherBarCls := &gtk.Widget{}91+ if cret == 0 {
95- NewViewSwitcherBarCls.Ptr = NewViewSwitcherBarPtr92+ return cls
96- return NewViewSwitcherBarCls93+ }
94+ gobject.IncreaseRef(cret)
95+ cls = &gtk.Widget{}
96+ cls.Ptr = cret
97+ return cls
97 }98 }
98 99
99 var xViewSwitcherBarGetReveal func(uintptr) bool100 var xViewSwitcherBarGetReveal func(uintptr) bool
@@ -101,26 +102,25 @@ var xViewSwitcherBarGetReveal func(uintptr) bool
101 // Gets whether @self should be revealed or hidden.102 // Gets whether @self should be revealed or hidden.
102 func (x *ViewSwitcherBar) GetReveal() bool {103 func (x *ViewSwitcherBar) GetReveal() bool {
103 104
104- return xViewSwitcherBarGetReveal(x.GoPointer())105+ cret := xViewSwitcherBarGetReveal(x.GoPointer())
105-106+ return cret
106 }107 }
107 108
108 var xViewSwitcherBarGetStack func(uintptr) uintptr109 var xViewSwitcherBarGetStack func(uintptr) uintptr
109 110
110 // Gets the stack controlled by @self.111 // Gets the stack controlled by @self.
111 func (x *ViewSwitcherBar) GetStack() *ViewStack {112 func (x *ViewSwitcherBar) GetStack() *ViewStack {
113+ var cls *ViewStack
112 114
113- GetStackPtr := xViewSwitcherBarGetStack(x.GoPointer())115+ cret := xViewSwitcherBarGetStack(x.GoPointer())
114- if GetStackPtr == 0 {
115- return nil
116- }
117-
118- gobject.IncreaseRef(GetStackPtr)
119-
120- GetStackCls := &ViewStack{}
121- GetStackCls.Ptr = GetStackPtr
122- return GetStackCls
123 116
117+ if cret == 0 {
118+ return cls
119+ }
120+ gobject.IncreaseRef(cret)
121+ cls = &ViewStack{}
122+ cls.Ptr = cret
123+ return cls
124 }124 }
125 125
126 var xViewSwitcherBarSetReveal func(uintptr, bool)126 var xViewSwitcherBarSetReveal func(uintptr, bool)
@@ -152,8 +152,8 @@ func (c *ViewSwitcherBar) SetGoPointer(ptr uintptr) {
152 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.152 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
153 func (x *ViewSwitcherBar) GetAccessibleRole() gtk.AccessibleRole {153 func (x *ViewSwitcherBar) GetAccessibleRole() gtk.AccessibleRole {
154 154
155- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())155+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
156-156+ return cret
157 }157 }
158 158
159 // Resets the accessible @property to its default value.159 // Resets the accessible @property to its default value.
@@ -288,8 +288,8 @@ func (x *ViewSwitcherBar) UpdateStateValue(NStatesVar int, StatesVar uintptr, Va
288 // of the <object> tag used to construct the @buildable.288 // of the <object> tag used to construct the @buildable.
289 func (x *ViewSwitcherBar) GetBuildableId() string {289 func (x *ViewSwitcherBar) GetBuildableId() string {
290 290
291- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())291+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
292-292+ return cret
293 }293 }
294 294
295 func init() {295 func init() {
M v4/adw/adw-view-switcher-title.go +30 -30
@@ -90,34 +90,34 @@ var xNewViewSwitcherTitle func() uintptr
90 90
91 // Creates a new `AdwViewSwitcherTitle`.91 // Creates a new `AdwViewSwitcherTitle`.
92 func NewViewSwitcherTitle() *gtk.Widget {92 func NewViewSwitcherTitle() *gtk.Widget {
93- NewViewSwitcherTitlePtr := xNewViewSwitcherTitle()93+ var cls *gtk.Widget
94- if NewViewSwitcherTitlePtr == 0 {
95- return nil
96- }
97 94
98- gobject.IncreaseRef(NewViewSwitcherTitlePtr)95+ cret := xNewViewSwitcherTitle()
99 96
100- NewViewSwitcherTitleCls := &gtk.Widget{}97+ if cret == 0 {
101- NewViewSwitcherTitleCls.Ptr = NewViewSwitcherTitlePtr98+ return cls
102- return NewViewSwitcherTitleCls99+ }
100+ gobject.IncreaseRef(cret)
101+ cls = &gtk.Widget{}
102+ cls.Ptr = cret
103+ return cls
103 }104 }
104 105
105 var xViewSwitcherTitleGetStack func(uintptr) uintptr106 var xViewSwitcherTitleGetStack func(uintptr) uintptr
106 107
107 // Gets the stack controlled by @self.108 // Gets the stack controlled by @self.
108 func (x *ViewSwitcherTitle) GetStack() *ViewStack {109 func (x *ViewSwitcherTitle) GetStack() *ViewStack {
110+ var cls *ViewStack
109 111
110- GetStackPtr := xViewSwitcherTitleGetStack(x.GoPointer())112+ cret := xViewSwitcherTitleGetStack(x.GoPointer())
111- if GetStackPtr == 0 {
112- return nil
113- }
114-
115- gobject.IncreaseRef(GetStackPtr)
116-
117- GetStackCls := &ViewStack{}
118- GetStackCls.Ptr = GetStackPtr
119- return GetStackCls
120 113
114+ if cret == 0 {
115+ return cls
116+ }
117+ gobject.IncreaseRef(cret)
118+ cls = &ViewStack{}
119+ cls.Ptr = cret
120+ return cls
121 }121 }
122 122
123 var xViewSwitcherTitleGetSubtitle func(uintptr) string123 var xViewSwitcherTitleGetSubtitle func(uintptr) string
@@ -125,8 +125,8 @@ var xViewSwitcherTitleGetSubtitle func(uintptr) string
125 // Gets the subtitle of @self.125 // Gets the subtitle of @self.
126 func (x *ViewSwitcherTitle) GetSubtitle() string {126 func (x *ViewSwitcherTitle) GetSubtitle() string {
127 127
128- return xViewSwitcherTitleGetSubtitle(x.GoPointer())128+ cret := xViewSwitcherTitleGetSubtitle(x.GoPointer())
129-129+ return cret
130 }130 }
131 131
132 var xViewSwitcherTitleGetTitle func(uintptr) string132 var xViewSwitcherTitleGetTitle func(uintptr) string
@@ -134,8 +134,8 @@ var xViewSwitcherTitleGetTitle func(uintptr) string
134 // Gets the title of @self.134 // Gets the title of @self.
135 func (x *ViewSwitcherTitle) GetTitle() string {135 func (x *ViewSwitcherTitle) GetTitle() string {
136 136
137- return xViewSwitcherTitleGetTitle(x.GoPointer())137+ cret := xViewSwitcherTitleGetTitle(x.GoPointer())
138-138+ return cret
139 }139 }
140 140
141 var xViewSwitcherTitleGetTitleVisible func(uintptr) bool141 var xViewSwitcherTitleGetTitleVisible func(uintptr) bool
@@ -146,8 +146,8 @@ var xViewSwitcherTitleGetTitleVisible func(uintptr) bool
146 // wanted to show an alternative switcher, e.g. a [class@ViewSwitcherBar].146 // wanted to show an alternative switcher, e.g. a [class@ViewSwitcherBar].
147 func (x *ViewSwitcherTitle) GetTitleVisible() bool {147 func (x *ViewSwitcherTitle) GetTitleVisible() bool {
148 148
149- return xViewSwitcherTitleGetTitleVisible(x.GoPointer())149+ cret := xViewSwitcherTitleGetTitleVisible(x.GoPointer())
150-150+ return cret
151 }151 }
152 152
153 var xViewSwitcherTitleGetViewSwitcherEnabled func(uintptr) bool153 var xViewSwitcherTitleGetViewSwitcherEnabled func(uintptr) bool
@@ -155,8 +155,8 @@ var xViewSwitcherTitleGetViewSwitcherEnabled func(uintptr) bool
155 // Gets whether @self's view switcher is enabled.155 // Gets whether @self's view switcher is enabled.
156 func (x *ViewSwitcherTitle) GetViewSwitcherEnabled() bool {156 func (x *ViewSwitcherTitle) GetViewSwitcherEnabled() bool {
157 157
158- return xViewSwitcherTitleGetViewSwitcherEnabled(x.GoPointer())158+ cret := xViewSwitcherTitleGetViewSwitcherEnabled(x.GoPointer())
159-159+ return cret
160 }160 }
161 161
162 var xViewSwitcherTitleSetStack func(uintptr, uintptr)162 var xViewSwitcherTitleSetStack func(uintptr, uintptr)
@@ -218,8 +218,8 @@ func (c *ViewSwitcherTitle) SetGoPointer(ptr uintptr) {
218 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.218 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
219 func (x *ViewSwitcherTitle) GetAccessibleRole() gtk.AccessibleRole {219 func (x *ViewSwitcherTitle) GetAccessibleRole() gtk.AccessibleRole {
220 220
221- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())221+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
222-222+ return cret
223 }223 }
224 224
225 // Resets the accessible @property to its default value.225 // Resets the accessible @property to its default value.
@@ -354,8 +354,8 @@ func (x *ViewSwitcherTitle) UpdateStateValue(NStatesVar int, StatesVar uintptr,
354 // of the <object> tag used to construct the @buildable.354 // of the <object> tag used to construct the @buildable.
355 func (x *ViewSwitcherTitle) GetBuildableId() string {355 func (x *ViewSwitcherTitle) GetBuildableId() string {
356 356
357- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())357+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
358-358+ return cret
359 }359 }
360 360
361 func init() {361 func init() {
M v4/adw/adw-view-switcher.go +24 -24
@@ -66,16 +66,17 @@ var xNewViewSwitcher func() uintptr
66 66
67 // Creates a new `AdwViewSwitcher`.67 // Creates a new `AdwViewSwitcher`.
68 func NewViewSwitcher() *gtk.Widget {68 func NewViewSwitcher() *gtk.Widget {
69- NewViewSwitcherPtr := xNewViewSwitcher()69+ var cls *gtk.Widget
70- if NewViewSwitcherPtr == 0 {
71- return nil
72- }
73 70
74- gobject.IncreaseRef(NewViewSwitcherPtr)71+ cret := xNewViewSwitcher()
75 72
76- NewViewSwitcherCls := &gtk.Widget{}73+ if cret == 0 {
77- NewViewSwitcherCls.Ptr = NewViewSwitcherPtr74+ return cls
78- return NewViewSwitcherCls75+ }
76+ gobject.IncreaseRef(cret)
77+ cls = &gtk.Widget{}
78+ cls.Ptr = cret
79+ return cls
79 }80 }
80 81
81 var xViewSwitcherGetPolicy func(uintptr) ViewSwitcherPolicy82 var xViewSwitcherGetPolicy func(uintptr) ViewSwitcherPolicy
@@ -83,26 +84,25 @@ var xViewSwitcherGetPolicy func(uintptr) ViewSwitcherPolicy
83 // Gets the policy of @self.84 // Gets the policy of @self.
84 func (x *ViewSwitcher) GetPolicy() ViewSwitcherPolicy {85 func (x *ViewSwitcher) GetPolicy() ViewSwitcherPolicy {
85 86
86- return xViewSwitcherGetPolicy(x.GoPointer())87+ cret := xViewSwitcherGetPolicy(x.GoPointer())
87-88+ return cret
88 }89 }
89 90
90 var xViewSwitcherGetStack func(uintptr) uintptr91 var xViewSwitcherGetStack func(uintptr) uintptr
91 92
92 // Gets the stack controlled by @self.93 // Gets the stack controlled by @self.
93 func (x *ViewSwitcher) GetStack() *ViewStack {94 func (x *ViewSwitcher) GetStack() *ViewStack {
95+ var cls *ViewStack
94 96
95- GetStackPtr := xViewSwitcherGetStack(x.GoPointer())97+ cret := xViewSwitcherGetStack(x.GoPointer())
96- if GetStackPtr == 0 {
97- return nil
98- }
99-
100- gobject.IncreaseRef(GetStackPtr)
101-
102- GetStackCls := &ViewStack{}
103- GetStackCls.Ptr = GetStackPtr
104- return GetStackCls
105 98
99+ if cret == 0 {
100+ return cls
101+ }
102+ gobject.IncreaseRef(cret)
103+ cls = &ViewStack{}
104+ cls.Ptr = cret
105+ return cls
106 }106 }
107 107
108 var xViewSwitcherSetPolicy func(uintptr, ViewSwitcherPolicy)108 var xViewSwitcherSetPolicy func(uintptr, ViewSwitcherPolicy)
@@ -134,8 +134,8 @@ func (c *ViewSwitcher) SetGoPointer(ptr uintptr) {
134 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.134 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
135 func (x *ViewSwitcher) GetAccessibleRole() gtk.AccessibleRole {135 func (x *ViewSwitcher) GetAccessibleRole() gtk.AccessibleRole {
136 136
137- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())137+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
138-138+ return cret
139 }139 }
140 140
141 // Resets the accessible @property to its default value.141 // Resets the accessible @property to its default value.
@@ -270,8 +270,8 @@ func (x *ViewSwitcher) UpdateStateValue(NStatesVar int, StatesVar uintptr, Value
270 // of the <object> tag used to construct the @buildable.270 // of the <object> tag used to construct the @buildable.
271 func (x *ViewSwitcher) GetBuildableId() string {271 func (x *ViewSwitcher) GetBuildableId() string {
272 272
273- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())273+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
274-274+ return cret
275 }275 }
276 276
277 func init() {277 func init() {
M v4/adw/adw-window-title.go +17 -16
@@ -41,16 +41,17 @@ var xNewWindowTitle func(string, string) uintptr
41 41
42 // Creates a new `AdwWindowTitle`.42 // Creates a new `AdwWindowTitle`.
43 func NewWindowTitle(TitleVar string, SubtitleVar string) *gtk.Widget {43 func NewWindowTitle(TitleVar string, SubtitleVar string) *gtk.Widget {
44- NewWindowTitlePtr := xNewWindowTitle(TitleVar, SubtitleVar)44+ var cls *gtk.Widget
45- if NewWindowTitlePtr == 0 {
46- return nil
47- }
48 45
49- gobject.IncreaseRef(NewWindowTitlePtr)46+ cret := xNewWindowTitle(TitleVar, SubtitleVar)
50 47
51- NewWindowTitleCls := &gtk.Widget{}48+ if cret == 0 {
52- NewWindowTitleCls.Ptr = NewWindowTitlePtr49+ return cls
53- return NewWindowTitleCls50+ }
51+ gobject.IncreaseRef(cret)
52+ cls = &gtk.Widget{}
53+ cls.Ptr = cret
54+ return cls
54 }55 }
55 56
56 var xWindowTitleGetSubtitle func(uintptr) string57 var xWindowTitleGetSubtitle func(uintptr) string
@@ -58,8 +59,8 @@ var xWindowTitleGetSubtitle func(uintptr) string
58 // Gets the subtitle of @self.59 // Gets the subtitle of @self.
59 func (x *WindowTitle) GetSubtitle() string {60 func (x *WindowTitle) GetSubtitle() string {
60 61
61- return xWindowTitleGetSubtitle(x.GoPointer())62+ cret := xWindowTitleGetSubtitle(x.GoPointer())
62-63+ return cret
63 }64 }
64 65
65 var xWindowTitleGetTitle func(uintptr) string66 var xWindowTitleGetTitle func(uintptr) string
@@ -67,8 +68,8 @@ var xWindowTitleGetTitle func(uintptr) string
67 // Gets the title of @self.68 // Gets the title of @self.
68 func (x *WindowTitle) GetTitle() string {69 func (x *WindowTitle) GetTitle() string {
69 70
70- return xWindowTitleGetTitle(x.GoPointer())71+ cret := xWindowTitleGetTitle(x.GoPointer())
71-72+ return cret
72 }73 }
73 74
74 var xWindowTitleSetSubtitle func(uintptr, string)75 var xWindowTitleSetSubtitle func(uintptr, string)
@@ -105,8 +106,8 @@ func (c *WindowTitle) SetGoPointer(ptr uintptr) {
105 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.106 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
106 func (x *WindowTitle) GetAccessibleRole() gtk.AccessibleRole {107 func (x *WindowTitle) GetAccessibleRole() gtk.AccessibleRole {
107 108
108- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())109+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
109-110+ return cret
110 }111 }
111 112
112 // Resets the accessible @property to its default value.113 // Resets the accessible @property to its default value.
@@ -241,8 +242,8 @@ func (x *WindowTitle) UpdateStateValue(NStatesVar int, StatesVar uintptr, Values
241 // of the <object> tag used to construct the @buildable.242 // of the <object> tag used to construct the @buildable.
242 func (x *WindowTitle) GetBuildableId() string {243 func (x *WindowTitle) GetBuildableId() string {
243 244
244- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())245+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
245-246+ return cret
246 }247 }
247 248
248 func init() {249 func init() {
M v4/adw/adw-window.go +58 -62
@@ -63,16 +63,17 @@ var xNewWindow func() uintptr
63 63
64 // Creates a new `AdwWindow`.64 // Creates a new `AdwWindow`.
65 func NewWindow() *gtk.Widget {65 func NewWindow() *gtk.Widget {
66- NewWindowPtr := xNewWindow()66+ var cls *gtk.Widget
67- if NewWindowPtr == 0 {
68- return nil
69- }
70 67
71- gobject.IncreaseRef(NewWindowPtr)68+ cret := xNewWindow()
72 69
73- NewWindowCls := &gtk.Widget{}70+ if cret == 0 {
74- NewWindowCls.Ptr = NewWindowPtr71+ return cls
75- return NewWindowCls72+ }
73+ gobject.IncreaseRef(cret)
74+ cls = &gtk.Widget{}
75+ cls.Ptr = cret
76+ return cls
76 }77 }
77 78
78 var xWindowGetContent func(uintptr) uintptr79 var xWindowGetContent func(uintptr) uintptr
@@ -81,18 +82,17 @@ var xWindowGetContent func(uintptr) uintptr
81 //82 //
82 // This method should always be used instead of [method@Gtk.Window.get_child].83 // This method should always be used instead of [method@Gtk.Window.get_child].
83 func (x *Window) GetContent() *gtk.Widget {84 func (x *Window) GetContent() *gtk.Widget {
85+ var cls *gtk.Widget
84 86
85- GetContentPtr := xWindowGetContent(x.GoPointer())87+ cret := xWindowGetContent(x.GoPointer())
86- if GetContentPtr == 0 {
87- return nil
88- }
89-
90- gobject.IncreaseRef(GetContentPtr)
91-
92- GetContentCls := &gtk.Widget{}
93- GetContentCls.Ptr = GetContentPtr
94- return GetContentCls
95 88
89+ if cret == 0 {
90+ return cls
91+ }
92+ gobject.IncreaseRef(cret)
93+ cls = &gtk.Widget{}
94+ cls.Ptr = cret
95+ return cls
96 }96 }
97 97
98 var xWindowSetContent func(uintptr, uintptr)98 var xWindowSetContent func(uintptr, uintptr)
@@ -117,8 +117,8 @@ func (c *Window) SetGoPointer(ptr uintptr) {
117 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.117 // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`.
118 func (x *Window) GetAccessibleRole() gtk.AccessibleRole {118 func (x *Window) GetAccessibleRole() gtk.AccessibleRole {
119 119
120- return gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())120+ cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
121-121+ return cret
122 }122 }
123 123
124 // Resets the accessible @property to its default value.124 // Resets the accessible @property to its default value.
@@ -253,40 +253,38 @@ func (x *Window) UpdateStateValue(NStatesVar int, StatesVar uintptr, ValuesVar u
253 // of the <object> tag used to construct the @buildable.253 // of the <object> tag used to construct the @buildable.
254 func (x *Window) GetBuildableId() string {254 func (x *Window) GetBuildableId() string {
255 255
256- return gtk.XGtkBuildableGetBuildableId(x.GoPointer())256+ cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
257-257+ return cret
258 }258 }
259 259
260 // Returns the renderer that is used for this `GtkNative`.260 // Returns the renderer that is used for this `GtkNative`.
261 func (x *Window) GetRenderer() *gsk.Renderer {261 func (x *Window) GetRenderer() *gsk.Renderer {
262+ var cls *gsk.Renderer
262 263
263- GetRendererPtr := gtk.XGtkNativeGetRenderer(x.GoPointer())264+ cret := gtk.XGtkNativeGetRenderer(x.GoPointer())
264- if GetRendererPtr == 0 {
265- return nil
266- }
267-
268- gobject.IncreaseRef(GetRendererPtr)
269-
270- GetRendererCls := &gsk.Renderer{}
271- GetRendererCls.Ptr = GetRendererPtr
272- return GetRendererCls
273 265
266+ if cret == 0 {
267+ return cls
268+ }
269+ gobject.IncreaseRef(cret)
270+ cls = &gsk.Renderer{}
271+ cls.Ptr = cret
272+ return cls
274 }273 }
275 274
276 // Returns the surface of this `GtkNative`.275 // Returns the surface of this `GtkNative`.
277 func (x *Window) GetSurface() *gdk.Surface {276 func (x *Window) GetSurface() *gdk.Surface {
277+ var cls *gdk.Surface
278 278
279- GetSurfacePtr := gtk.XGtkNativeGetSurface(x.GoPointer())279+ cret := gtk.XGtkNativeGetSurface(x.GoPointer())
280- if GetSurfacePtr == 0 {
281- return nil
282- }
283-
284- gobject.IncreaseRef(GetSurfacePtr)
285-
286- GetSurfaceCls := &gdk.Surface{}
287- GetSurfaceCls.Ptr = GetSurfacePtr
288- return GetSurfaceCls
289 280
281+ if cret == 0 {
282+ return cls
283+ }
284+ gobject.IncreaseRef(cret)
285+ cls = &gdk.Surface{}
286+ cls.Ptr = cret
287+ return cls
290 }288 }
291 289
292 // Retrieves the surface transform of @self.290 // Retrieves the surface transform of @self.
@@ -319,18 +317,17 @@ func (x *Window) Unrealize() {
319 317
320 // Returns the display that this `GtkRoot` is on.318 // Returns the display that this `GtkRoot` is on.
321 func (x *Window) GetDisplay() *gdk.Display {319 func (x *Window) GetDisplay() *gdk.Display {
320+ var cls *gdk.Display
322 321
323- GetDisplayPtr := gtk.XGtkRootGetDisplay(x.GoPointer())322+ cret := gtk.XGtkRootGetDisplay(x.GoPointer())
324- if GetDisplayPtr == 0 {
325- return nil
326- }
327-
328- gobject.IncreaseRef(GetDisplayPtr)
329-
330- GetDisplayCls := &gdk.Display{}
331- GetDisplayCls.Ptr = GetDisplayPtr
332- return GetDisplayCls
333 323
324+ if cret == 0 {
325+ return cls
326+ }
327+ gobject.IncreaseRef(cret)
328+ cls = &gdk.Display{}
329+ cls.Ptr = cret
330+ return cls
334 }331 }
335 332
336 // Retrieves the current focused widget within the root.333 // Retrieves the current focused widget within the root.
@@ -340,18 +337,17 @@ func (x *Window) GetDisplay() *gdk.Display {
340 // `gtk_widget_has_focus (widget)` will be %FALSE for the337 // `gtk_widget_has_focus (widget)` will be %FALSE for the
341 // widget.338 // widget.
342 func (x *Window) GetFocus() *gtk.Widget {339 func (x *Window) GetFocus() *gtk.Widget {
340+ var cls *gtk.Widget
343 341
344- GetFocusPtr := gtk.XGtkRootGetFocus(x.GoPointer())342+ cret := gtk.XGtkRootGetFocus(x.GoPointer())
345- if GetFocusPtr == 0 {
346- return nil
347- }
348-
349- gobject.IncreaseRef(GetFocusPtr)
350-
351- GetFocusCls := &gtk.Widget{}
352- GetFocusCls.Ptr = GetFocusPtr
353- return GetFocusCls
354 343
344+ if cret == 0 {
345+ return cls
346+ }
347+ gobject.IncreaseRef(cret)
348+ cls = &gtk.Widget{}
349+ cls.Ptr = cret
350+ return cls
355 }351 }
356 352
357 // If @focus is not the current focus widget, and is focusable, sets353 // If @focus is not the current focus widget, and is focusable, sets
M v4/gdk/gdkapplaunchcontext.go +9 -10
@@ -42,18 +42,17 @@ var xAppLaunchContextGetDisplay func(uintptr) uintptr
42 42
43 // Gets the `GdkDisplay` that @context is for.43 // Gets the `GdkDisplay` that @context is for.
44 func (x *AppLaunchContext) GetDisplay() *Display {44 func (x *AppLaunchContext) GetDisplay() *Display {
45+ var cls *Display
45 46
46- GetDisplayPtr := xAppLaunchContextGetDisplay(x.GoPointer())47+ cret := xAppLaunchContextGetDisplay(x.GoPointer())
47- if GetDisplayPtr == 0 {
48- return nil
49- }
50-
51- gobject.IncreaseRef(GetDisplayPtr)
52-
53- GetDisplayCls := &Display{}
54- GetDisplayCls.Ptr = GetDisplayPtr
55- return GetDisplayCls
56 48
49+ if cret == 0 {
50+ return cls
51+ }
52+ gobject.IncreaseRef(cret)
53+ cls = &Display{}
54+ cls.Ptr = cret
55+ return cls
57 }56 }
58 57
59 var xAppLaunchContextSetDesktop func(uintptr, int)58 var xAppLaunchContextSetDesktop func(uintptr, int)
M v4/gdk/gdkcairo.go +2 -2
@@ -61,8 +61,8 @@ var xCairoRegionCreateFromSurface func(*cairo.Surface) *cairo.Region
61 // set with cairo_surface_set_device_offset().61 // set with cairo_surface_set_device_offset().
62 func CairoRegionCreateFromSurface(SurfaceVar *cairo.Surface) *cairo.Region {62 func CairoRegionCreateFromSurface(SurfaceVar *cairo.Surface) *cairo.Region {
63 63
64- return xCairoRegionCreateFromSurface(SurfaceVar)64+ cret := xCairoRegionCreateFromSurface(SurfaceVar)
65-65+ return cret
66 }66 }
67 67
68 var xCairoSetSourcePixbuf func(*cairo.Context, uintptr, float64, float64)68 var xCairoSetSourcePixbuf func(*cairo.Context, uintptr, float64, float64)
M v4/gdk/gdkcairocontext.go +2 -2
@@ -35,8 +35,8 @@ var xCairoContextCairoCreate func(uintptr) *cairo.Context
35 // [method@Gdk.DrawContext.end_frame] is called.35 // [method@Gdk.DrawContext.end_frame] is called.
36 func (x *CairoContext) CairoCreate() *cairo.Context {36 func (x *CairoContext) CairoCreate() *cairo.Context {
37 37
38- return xCairoContextCairoCreate(x.GoPointer())38+ cret := xCairoContextCairoCreate(x.GoPointer())
39-39+ return cret
40 }40 }
41 41
42 func (c *CairoContext) GoPointer() uintptr {42 func (c *CairoContext) GoPointer() uintptr {
M v4/gdk/gdkclipboard.go +77 -53
@@ -5,6 +5,7 @@ import (
5 "github.com/jwijenbergh/purego"5 "github.com/jwijenbergh/purego"
6 "github.com/jwijenbergh/puregotk/internal/core"6 "github.com/jwijenbergh/puregotk/internal/core"
7 "github.com/jwijenbergh/puregotk/v4/gio"7 "github.com/jwijenbergh/puregotk/v4/gio"
8+ "github.com/jwijenbergh/puregotk/v4/glib"
8 "github.com/jwijenbergh/puregotk/v4/gobject"9 "github.com/jwijenbergh/puregotk/v4/gobject"
9 )10 )
10 11
@@ -42,36 +43,34 @@ var xClipboardGetContent func(uintptr) uintptr
42 // If the @clipboard is empty or its contents are not owned by the43 // If the @clipboard is empty or its contents are not owned by the
43 // current process, %NULL will be returned.44 // current process, %NULL will be returned.
44 func (x *Clipboard) GetContent() *ContentProvider {45 func (x *Clipboard) GetContent() *ContentProvider {
46+ var cls *ContentProvider
45 47
46- GetContentPtr := xClipboardGetContent(x.GoPointer())48+ cret := xClipboardGetContent(x.GoPointer())
47- if GetContentPtr == 0 {
48- return nil
49- }
50-
51- gobject.IncreaseRef(GetContentPtr)
52-
53- GetContentCls := &ContentProvider{}
54- GetContentCls.Ptr = GetContentPtr
55- return GetContentCls
56 49
50+ if cret == 0 {
51+ return cls
52+ }
53+ gobject.IncreaseRef(cret)
54+ cls = &ContentProvider{}
55+ cls.Ptr = cret
56+ return cls
57 }57 }
58 58
59 var xClipboardGetDisplay func(uintptr) uintptr59 var xClipboardGetDisplay func(uintptr) uintptr
60 60
61 // Gets the `GdkDisplay` that the clipboard was created for.61 // Gets the `GdkDisplay` that the clipboard was created for.
62 func (x *Clipboard) GetDisplay() *Display {62 func (x *Clipboard) GetDisplay() *Display {
63+ var cls *Display
63 64
64- GetDisplayPtr := xClipboardGetDisplay(x.GoPointer())65+ cret := xClipboardGetDisplay(x.GoPointer())
65- if GetDisplayPtr == 0 {
66- return nil
67- }
68-
69- gobject.IncreaseRef(GetDisplayPtr)
70-
71- GetDisplayCls := &Display{}
72- GetDisplayCls.Ptr = GetDisplayPtr
73- return GetDisplayCls
74 66
67+ if cret == 0 {
68+ return cls
69+ }
70+ gobject.IncreaseRef(cret)
71+ cls = &Display{}
72+ cls.Ptr = cret
73+ return cls
75 }74 }
76 75
77 var xClipboardGetFormats func(uintptr) *ContentFormats76 var xClipboardGetFormats func(uintptr) *ContentFormats
@@ -79,8 +78,8 @@ var xClipboardGetFormats func(uintptr) *ContentFormats
79 // Gets the formats that the clipboard can provide its current contents in.78 // Gets the formats that the clipboard can provide its current contents in.
80 func (x *Clipboard) GetFormats() *ContentFormats {79 func (x *Clipboard) GetFormats() *ContentFormats {
81 80
82- return xClipboardGetFormats(x.GoPointer())81+ cret := xClipboardGetFormats(x.GoPointer())
83-82+ return cret
84 }83 }
85 84
86 var xClipboardIsLocal func(uintptr) bool85 var xClipboardIsLocal func(uintptr) bool
@@ -94,8 +93,8 @@ var xClipboardIsLocal func(uintptr) bool
94 // even on a local clipboard. In this case the clipboard is empty.93 // even on a local clipboard. In this case the clipboard is empty.
95 func (x *Clipboard) IsLocal() bool {94 func (x *Clipboard) IsLocal() bool {
96 95
97- return xClipboardIsLocal(x.GoPointer())96+ cret := xClipboardIsLocal(x.GoPointer())
98-97+ return cret
99 }98 }
100 99
101 var xClipboardReadAsync func(uintptr, uintptr, int, uintptr, uintptr, uintptr)100 var xClipboardReadAsync func(uintptr, uintptr, int, uintptr, uintptr, uintptr)
@@ -114,21 +113,26 @@ func (x *Clipboard) ReadAsync(MimeTypesVar uintptr, IoPriorityVar int, Cancellab
114 113
115 }114 }
116 115
117-var xClipboardReadFinish func(uintptr, uintptr, string) uintptr116+var xClipboardReadFinish func(uintptr, uintptr, string, **glib.Error) uintptr
118 117
119 // Finishes an asynchronous clipboard read.118 // Finishes an asynchronous clipboard read.
120 //119 //
121 // See [method@Gdk.Clipboard.read_async].120 // See [method@Gdk.Clipboard.read_async].
122-func (x *Clipboard) ReadFinish(ResultVar gio.AsyncResult, OutMimeTypeVar string) *gio.InputStream {121+func (x *Clipboard) ReadFinish(ResultVar gio.AsyncResult, OutMimeTypeVar string) (*gio.InputStream, error) {
122+ var cls *gio.InputStream
123+ var cerr *glib.Error
123 124
124- ReadFinishPtr := xClipboardReadFinish(x.GoPointer(), ResultVar.GoPointer(), OutMimeTypeVar)125+ cret := xClipboardReadFinish(x.GoPointer(), ResultVar.GoPointer(), OutMimeTypeVar, &cerr)
125- if ReadFinishPtr == 0 {
126- return nil
127- }
128 126
129- ReadFinishCls := &gio.InputStream{}127+ if cret == 0 {
130- ReadFinishCls.Ptr = ReadFinishPtr128+ return cls, cerr
131- return ReadFinishCls129+ }
130+ cls = &gio.InputStream{}
131+ cls.Ptr = cret
132+ if cerr == nil {
133+ return cls, nil
134+ }
135+ return cls, cerr
132 136
133 }137 }
134 138
@@ -148,14 +152,19 @@ func (x *Clipboard) ReadTextAsync(CancellableVar *gio.Cancellable, CallbackVar g
148 152
149 }153 }
150 154
151-var xClipboardReadTextFinish func(uintptr, uintptr) string155+var xClipboardReadTextFinish func(uintptr, uintptr, **glib.Error) string
152 156
153 // Finishes an asynchronous clipboard read.157 // Finishes an asynchronous clipboard read.
154 //158 //
155 // See [method@Gdk.Clipboard.read_text_async].159 // See [method@Gdk.Clipboard.read_text_async].
156-func (x *Clipboard) ReadTextFinish(ResultVar gio.AsyncResult) string {160+func (x *Clipboard) ReadTextFinish(ResultVar gio.AsyncResult) (string, error) {
161+ var cerr *glib.Error
157 162
158- return xClipboardReadTextFinish(x.GoPointer(), ResultVar.GoPointer())163+ cret := xClipboardReadTextFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
164+ if cerr == nil {
165+ return cret, nil
166+ }
167+ return cret, cerr
159 168
160 }169 }
161 170
@@ -175,21 +184,26 @@ func (x *Clipboard) ReadTextureAsync(CancellableVar *gio.Cancellable, CallbackVa
175 184
176 }185 }
177 186
178-var xClipboardReadTextureFinish func(uintptr, uintptr) uintptr187+var xClipboardReadTextureFinish func(uintptr, uintptr, **glib.Error) uintptr
179 188
180 // Finishes an asynchronous clipboard read.189 // Finishes an asynchronous clipboard read.
181 //190 //
182 // See [method@Gdk.Clipboard.read_texture_async].191 // See [method@Gdk.Clipboard.read_texture_async].
183-func (x *Clipboard) ReadTextureFinish(ResultVar gio.AsyncResult) *Texture {192+func (x *Clipboard) ReadTextureFinish(ResultVar gio.AsyncResult) (*Texture, error) {
193+ var cls *Texture
194+ var cerr *glib.Error
184 195
185- ReadTextureFinishPtr := xClipboardReadTextureFinish(x.GoPointer(), ResultVar.GoPointer())196+ cret := xClipboardReadTextureFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
186- if ReadTextureFinishPtr == 0 {
187- return nil
188- }
189 197
190- ReadTextureFinishCls := &Texture{}198+ if cret == 0 {
191- ReadTextureFinishCls.Ptr = ReadTextureFinishPtr199+ return cls, cerr
192- return ReadTextureFinishCls200+ }
201+ cls = &Texture{}
202+ cls.Ptr = cret
203+ if cerr == nil {
204+ return cls, nil
205+ }
206+ return cls, cerr
193 207
194 }208 }
195 209
@@ -210,14 +224,19 @@ func (x *Clipboard) ReadValueAsync(TypeVar []interface{}, IoPriorityVar int, Can
210 224
211 }225 }
212 226
213-var xClipboardReadValueFinish func(uintptr, uintptr) *gobject.Value227+var xClipboardReadValueFinish func(uintptr, uintptr, **glib.Error) *gobject.Value
214 228
215 // Finishes an asynchronous clipboard read.229 // Finishes an asynchronous clipboard read.
216 //230 //
217 // See [method@Gdk.Clipboard.read_value_async].231 // See [method@Gdk.Clipboard.read_value_async].
218-func (x *Clipboard) ReadValueFinish(ResultVar gio.AsyncResult) *gobject.Value {232+func (x *Clipboard) ReadValueFinish(ResultVar gio.AsyncResult) (*gobject.Value, error) {
233+ var cerr *glib.Error
219 234
220- return xClipboardReadValueFinish(x.GoPointer(), ResultVar.GoPointer())235+ cret := xClipboardReadValueFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
236+ if cerr == nil {
237+ return cret, nil
238+ }
239+ return cret, cerr
221 240
222 }241 }
223 242
@@ -256,8 +275,8 @@ var xClipboardSetContent func(uintptr, uintptr) bool
256 // transfer the contents and then request that format from @provider.275 // transfer the contents and then request that format from @provider.
257 func (x *Clipboard) SetContent(ProviderVar *ContentProvider) bool {276 func (x *Clipboard) SetContent(ProviderVar *ContentProvider) bool {
258 277
259- return xClipboardSetContent(x.GoPointer(), ProviderVar.GoPointer())278+ cret := xClipboardSetContent(x.GoPointer(), ProviderVar.GoPointer())
260-279+ return cret
261 }280 }
262 281
263 var xClipboardSetText func(uintptr, string)282 var xClipboardSetText func(uintptr, string)
@@ -317,14 +336,19 @@ func (x *Clipboard) StoreAsync(IoPriorityVar int, CancellableVar *gio.Cancellabl
317 336
318 }337 }
319 338
320-var xClipboardStoreFinish func(uintptr, uintptr) bool339+var xClipboardStoreFinish func(uintptr, uintptr, **glib.Error) bool
321 340
322 // Finishes an asynchronous clipboard store.341 // Finishes an asynchronous clipboard store.
323 //342 //
324 // See [method@Gdk.Clipboard.store_async].343 // See [method@Gdk.Clipboard.store_async].
325-func (x *Clipboard) StoreFinish(ResultVar gio.AsyncResult) bool {344+func (x *Clipboard) StoreFinish(ResultVar gio.AsyncResult) (bool, error) {
345+ var cerr *glib.Error
326 346
327- return xClipboardStoreFinish(x.GoPointer(), ResultVar.GoPointer())347+ cret := xClipboardStoreFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
348+ if cerr == nil {
349+ return cret, nil
350+ }
351+ return cret, cerr
328 352
329 }353 }
330 354
M v4/gdk/gdkcontentdeserializer.go +55 -47
@@ -31,12 +31,17 @@ func ContentDeserializeAsync(StreamVar *gio.InputStream, MimeTypeVar string, Typ
31 31
32 }32 }
33 33
34-var xContentDeserializeFinish func(uintptr, *gobject.Value) bool34+var xContentDeserializeFinish func(uintptr, *gobject.Value, **glib.Error) bool
35 35
36 // Finishes a content deserialization operation.36 // Finishes a content deserialization operation.
37-func ContentDeserializeFinish(ResultVar gio.AsyncResult, ValueVar *gobject.Value) bool {37+func ContentDeserializeFinish(ResultVar gio.AsyncResult, ValueVar *gobject.Value) (bool, error) {
38+ var cerr *glib.Error
38 39
39- return xContentDeserializeFinish(ResultVar.GoPointer(), ValueVar)40+ cret := xContentDeserializeFinish(ResultVar.GoPointer(), ValueVar, &cerr)
41+ if cerr == nil {
42+ return cret, nil
43+ }
44+ return cret, cerr
40 45
41 }46 }
42 47
@@ -76,18 +81,17 @@ var xContentDeserializerGetCancellable func(uintptr) uintptr
76 //81 //
77 // This is the `GCancellable` that was passed to [func@Gdk.content_deserialize_async].82 // This is the `GCancellable` that was passed to [func@Gdk.content_deserialize_async].
78 func (x *ContentDeserializer) GetCancellable() *gio.Cancellable {83 func (x *ContentDeserializer) GetCancellable() *gio.Cancellable {
84+ var cls *gio.Cancellable
79 85
80- GetCancellablePtr := xContentDeserializerGetCancellable(x.GoPointer())86+ cret := xContentDeserializerGetCancellable(x.GoPointer())
81- if GetCancellablePtr == 0 {
82- return nil
83- }
84-
85- gobject.IncreaseRef(GetCancellablePtr)
86-
87- GetCancellableCls := &gio.Cancellable{}
88- GetCancellableCls.Ptr = GetCancellablePtr
89- return GetCancellableCls
90 87
88+ if cret == 0 {
89+ return cls
90+ }
91+ gobject.IncreaseRef(cret)
92+ cls = &gio.Cancellable{}
93+ cls.Ptr = cret
94+ return cls
91 }95 }
92 96
93 var xContentDeserializerGetGtype func(uintptr) []interface{}97 var xContentDeserializerGetGtype func(uintptr) []interface{}
@@ -95,8 +99,8 @@ var xContentDeserializerGetGtype func(uintptr) []interface{}
95 // Gets the `GType` to create an instance of.99 // Gets the `GType` to create an instance of.
96 func (x *ContentDeserializer) GetGtype() []interface{} {100 func (x *ContentDeserializer) GetGtype() []interface{} {
97 101
98- return xContentDeserializerGetGtype(x.GoPointer())102+ cret := xContentDeserializerGetGtype(x.GoPointer())
99-103+ return cret
100 }104 }
101 105
102 var xContentDeserializerGetInputStream func(uintptr) uintptr106 var xContentDeserializerGetInputStream func(uintptr) uintptr
@@ -105,18 +109,17 @@ var xContentDeserializerGetInputStream func(uintptr) uintptr
105 //109 //
106 // This is the stream that was passed to [func@Gdk.content_deserialize_async].110 // This is the stream that was passed to [func@Gdk.content_deserialize_async].
107 func (x *ContentDeserializer) GetInputStream() *gio.InputStream {111 func (x *ContentDeserializer) GetInputStream() *gio.InputStream {
112+ var cls *gio.InputStream
108 113
109- GetInputStreamPtr := xContentDeserializerGetInputStream(x.GoPointer())114+ cret := xContentDeserializerGetInputStream(x.GoPointer())
110- if GetInputStreamPtr == 0 {
111- return nil
112- }
113-
114- gobject.IncreaseRef(GetInputStreamPtr)
115-
116- GetInputStreamCls := &gio.InputStream{}
117- GetInputStreamCls.Ptr = GetInputStreamPtr
118- return GetInputStreamCls
119 115
116+ if cret == 0 {
117+ return cls
118+ }
119+ gobject.IncreaseRef(cret)
120+ cls = &gio.InputStream{}
121+ cls.Ptr = cret
122+ return cls
120 }123 }
121 124
122 var xContentDeserializerGetMimeType func(uintptr) string125 var xContentDeserializerGetMimeType func(uintptr) string
@@ -124,8 +127,8 @@ var xContentDeserializerGetMimeType func(uintptr) string
124 // Gets the mime type to deserialize from.127 // Gets the mime type to deserialize from.
125 func (x *ContentDeserializer) GetMimeType() string {128 func (x *ContentDeserializer) GetMimeType() string {
126 129
127- return xContentDeserializerGetMimeType(x.GoPointer())130+ cret := xContentDeserializerGetMimeType(x.GoPointer())
128-131+ return cret
129 }132 }
130 133
131 var xContentDeserializerGetPriority func(uintptr) int134 var xContentDeserializerGetPriority func(uintptr) int
@@ -135,8 +138,8 @@ var xContentDeserializerGetPriority func(uintptr) int
135 // This is the priority that was passed to [func@Gdk.content_deserialize_async].138 // This is the priority that was passed to [func@Gdk.content_deserialize_async].
136 func (x *ContentDeserializer) GetPriority() int {139 func (x *ContentDeserializer) GetPriority() int {
137 140
138- return xContentDeserializerGetPriority(x.GoPointer())141+ cret := xContentDeserializerGetPriority(x.GoPointer())
139-142+ return cret
140 }143 }
141 144
142 var xContentDeserializerGetTaskData func(uintptr) uintptr145 var xContentDeserializerGetTaskData func(uintptr) uintptr
@@ -146,8 +149,8 @@ var xContentDeserializerGetTaskData func(uintptr) uintptr
146 // See [method@Gdk.ContentDeserializer.set_task_data].149 // See [method@Gdk.ContentDeserializer.set_task_data].
147 func (x *ContentDeserializer) GetTaskData() uintptr {150 func (x *ContentDeserializer) GetTaskData() uintptr {
148 151
149- return xContentDeserializerGetTaskData(x.GoPointer())152+ cret := xContentDeserializerGetTaskData(x.GoPointer())
150-153+ return cret
151 }154 }
152 155
153 var xContentDeserializerGetUserData func(uintptr) uintptr156 var xContentDeserializerGetUserData func(uintptr) uintptr
@@ -155,8 +158,8 @@ var xContentDeserializerGetUserData func(uintptr) uintptr
155 // Gets the user data that was passed when the deserializer was registered.158 // Gets the user data that was passed when the deserializer was registered.
156 func (x *ContentDeserializer) GetUserData() uintptr {159 func (x *ContentDeserializer) GetUserData() uintptr {
157 160
158- return xContentDeserializerGetUserData(x.GoPointer())161+ cret := xContentDeserializerGetUserData(x.GoPointer())
159-162+ return cret
160 }163 }
161 164
162 var xContentDeserializerGetValue func(uintptr) *gobject.Value165 var xContentDeserializerGetValue func(uintptr) *gobject.Value
@@ -164,8 +167,8 @@ var xContentDeserializerGetValue func(uintptr) *gobject.Value
164 // Gets the `GValue` to store the deserialized object in.167 // Gets the `GValue` to store the deserialized object in.
165 func (x *ContentDeserializer) GetValue() *gobject.Value {168 func (x *ContentDeserializer) GetValue() *gobject.Value {
166 169
167- return xContentDeserializerGetValue(x.GoPointer())170+ cret := xContentDeserializerGetValue(x.GoPointer())
168-171+ return cret
169 }172 }
170 173
171 var xContentDeserializerReturnError func(uintptr, *glib.Error)174 var xContentDeserializerReturnError func(uintptr, *glib.Error)
@@ -207,24 +210,24 @@ func (c *ContentDeserializer) SetGoPointer(ptr uintptr) {
207 210
208 // Gets the source object from a #GAsyncResult.211 // Gets the source object from a #GAsyncResult.
209 func (x *ContentDeserializer) GetSourceObject() *gobject.Object {212 func (x *ContentDeserializer) GetSourceObject() *gobject.Object {
213+ var cls *gobject.Object
210 214
211- GetSourceObjectPtr := gio.XGAsyncResultGetSourceObject(x.GoPointer())215+ cret := gio.XGAsyncResultGetSourceObject(x.GoPointer())
212- if GetSourceObjectPtr == 0 {
213- return nil
214- }
215-
216- GetSourceObjectCls := &gobject.Object{}
217- GetSourceObjectCls.Ptr = GetSourceObjectPtr
218- return GetSourceObjectCls
219 216
217+ if cret == 0 {
218+ return cls
219+ }
220+ cls = &gobject.Object{}
221+ cls.Ptr = cret
222+ return cls
220 }223 }
221 224
222 // Checks if @res has the given @source_tag (generally a function225 // Checks if @res has the given @source_tag (generally a function
223 // pointer indicating the function @res was created by).226 // pointer indicating the function @res was created by).
224 func (x *ContentDeserializer) IsTagged(SourceTagVar uintptr) bool {227 func (x *ContentDeserializer) IsTagged(SourceTagVar uintptr) bool {
225 228
226- return gio.XGAsyncResultIsTagged(x.GoPointer(), SourceTagVar)229+ cret := gio.XGAsyncResultIsTagged(x.GoPointer(), SourceTagVar)
227-230+ return cret
228 }231 }
229 232
230 // If @res is a #GSimpleAsyncResult, this is equivalent to233 // If @res is a #GSimpleAsyncResult, this is equivalent to
@@ -237,9 +240,14 @@ func (x *ContentDeserializer) IsTagged(SourceTagVar uintptr) bool {
237 // This should not be used in new code; #GAsyncResult errors that are240 // This should not be used in new code; #GAsyncResult errors that are
238 // set by virtual methods should also be extracted by virtual methods,241 // set by virtual methods should also be extracted by virtual methods,
239 // to enable subclasses to chain up correctly.242 // to enable subclasses to chain up correctly.
240-func (x *ContentDeserializer) LegacyPropagateError() bool {243+func (x *ContentDeserializer) LegacyPropagateError() (bool, error) {
244+ var cerr *glib.Error
241 245
242- return gio.XGAsyncResultLegacyPropagateError(x.GoPointer())246+ cret := gio.XGAsyncResultLegacyPropagateError(x.GoPointer())
247+ if cerr == nil {
248+ return cret, nil
249+ }
250+ return cret, cerr
243 251
244 }252 }
245 253
M v4/gdk/gdkcontentformats.go +4 -4
@@ -27,8 +27,8 @@ var xContentFormatsParse func(string) *ContentFormats
27 // is returned.27 // is returned.
28 func ContentFormatsParse(StringVar string) *ContentFormats {28 func ContentFormatsParse(StringVar string) *ContentFormats {
29 29
30- return xContentFormatsParse(StringVar)30+ cret := xContentFormatsParse(StringVar)
31-31+ return cret
32 }32 }
33 33
34 var xInternMimeType func(string) string34 var xInternMimeType func(string) string
@@ -39,8 +39,8 @@ var xInternMimeType func(string) string
39 // See RFC 2048 for the syntax if mime types.39 // See RFC 2048 for the syntax if mime types.
40 func InternMimeType(StringVar string) string {40 func InternMimeType(StringVar string) string {
41 41
42- return xInternMimeType(StringVar)42+ cret := xInternMimeType(StringVar)
43-43+ return cret
44 }44 }
45 45
46 func init() {46 func init() {
M v4/gdk/gdkcontentprovider.go +56 -38
@@ -40,28 +40,32 @@ var xNewForBytesContentProvider func(string, *glib.Bytes) uintptr
40 // Create a content provider that provides the given @bytes as data for40 // Create a content provider that provides the given @bytes as data for
41 // the given @mime_type.41 // the given @mime_type.
42 func NewForBytesContentProvider(MimeTypeVar string, BytesVar *glib.Bytes) *ContentProvider {42 func NewForBytesContentProvider(MimeTypeVar string, BytesVar *glib.Bytes) *ContentProvider {
43- NewForBytesContentProviderPtr := xNewForBytesContentProvider(MimeTypeVar, BytesVar)43+ var cls *ContentProvider
44- if NewForBytesContentProviderPtr == 0 {44+
45- return nil45+ cret := xNewForBytesContentProvider(MimeTypeVar, BytesVar)
46- }
47 46
48- NewForBytesContentProviderCls := &ContentProvider{}47+ if cret == 0 {
49- NewForBytesContentProviderCls.Ptr = NewForBytesContentProviderPtr48+ return cls
50- return NewForBytesContentProviderCls49+ }
50+ cls = &ContentProvider{}
51+ cls.Ptr = cret
52+ return cls
51 }53 }
52 54
53 var xNewForValueContentProvider func(*gobject.Value) uintptr55 var xNewForValueContentProvider func(*gobject.Value) uintptr
54 56
55 // Create a content provider that provides the given @value.57 // Create a content provider that provides the given @value.
56 func NewForValueContentProvider(ValueVar *gobject.Value) *ContentProvider {58 func NewForValueContentProvider(ValueVar *gobject.Value) *ContentProvider {
57- NewForValueContentProviderPtr := xNewForValueContentProvider(ValueVar)59+ var cls *ContentProvider
58- if NewForValueContentProviderPtr == 0 {
59- return nil
60- }
61 60
62- NewForValueContentProviderCls := &ContentProvider{}61+ cret := xNewForValueContentProvider(ValueVar)
63- NewForValueContentProviderCls.Ptr = NewForValueContentProviderPtr62+
64- return NewForValueContentProviderCls63+ if cret == 0 {
64+ return cls
65+ }
66+ cls = &ContentProvider{}
67+ cls.Ptr = cret
68+ return cls
65 }69 }
66 70
67 var xNewTypedContentProvider func([]interface{}, ...interface{}) uintptr71 var xNewTypedContentProvider func([]interface{}, ...interface{}) uintptr
@@ -72,14 +76,16 @@ var xNewTypedContentProvider func([]interface{}, ...interface{}) uintptr
72 // The value is provided using G_VALUE_COLLECT(), so the same rules76 // The value is provided using G_VALUE_COLLECT(), so the same rules
73 // apply as when calling g_object_new() or g_object_set().77 // apply as when calling g_object_new() or g_object_set().
74 func NewTypedContentProvider(TypeVar []interface{}, varArgs ...interface{}) *ContentProvider {78 func NewTypedContentProvider(TypeVar []interface{}, varArgs ...interface{}) *ContentProvider {
75- NewTypedContentProviderPtr := xNewTypedContentProvider(TypeVar, varArgs...)79+ var cls *ContentProvider
76- if NewTypedContentProviderPtr == 0 {80+
77- return nil81+ cret := xNewTypedContentProvider(TypeVar, varArgs...)
78- }
79 82
80- NewTypedContentProviderCls := &ContentProvider{}83+ if cret == 0 {
81- NewTypedContentProviderCls.Ptr = NewTypedContentProviderPtr84+ return cls
82- return NewTypedContentProviderCls85+ }
86+ cls = &ContentProvider{}
87+ cls.Ptr = cret
88+ return cls
83 }89 }
84 90
85 var xNewUnionContentProvider func(uintptr, uint) uintptr91 var xNewUnionContentProvider func(uintptr, uint) uintptr
@@ -102,14 +108,16 @@ var xNewUnionContentProvider func(uintptr, uint) uintptr
102 //108 //
103 // ```109 // ```
104 func NewUnionContentProvider(ProvidersVar uintptr, NProvidersVar uint) *ContentProvider {110 func NewUnionContentProvider(ProvidersVar uintptr, NProvidersVar uint) *ContentProvider {
105- NewUnionContentProviderPtr := xNewUnionContentProvider(ProvidersVar, NProvidersVar)111+ var cls *ContentProvider
106- if NewUnionContentProviderPtr == 0 {
107- return nil
108- }
109 112
110- NewUnionContentProviderCls := &ContentProvider{}113+ cret := xNewUnionContentProvider(ProvidersVar, NProvidersVar)
111- NewUnionContentProviderCls.Ptr = NewUnionContentProviderPtr114+
112- return NewUnionContentProviderCls115+ if cret == 0 {
116+ return cls
117+ }
118+ cls = &ContentProvider{}
119+ cls.Ptr = cret
120+ return cls
113 }121 }
114 122
115 var xContentProviderContentChanged func(uintptr)123 var xContentProviderContentChanged func(uintptr)
@@ -121,7 +129,7 @@ func (x *ContentProvider) ContentChanged() {
121 129
122 }130 }
123 131
124-var xContentProviderGetValue func(uintptr, *gobject.Value) bool132+var xContentProviderGetValue func(uintptr, *gobject.Value, **glib.Error) bool
125 133
126 // Gets the contents of @provider stored in @value.134 // Gets the contents of @provider stored in @value.
127 //135 //
@@ -130,9 +138,14 @@ var xContentProviderGetValue func(uintptr, *gobject.Value) bool
130 // returned by [method@Gdk.ContentProvider.ref_formats]. However, if the138 // returned by [method@Gdk.ContentProvider.ref_formats]. However, if the
131 // given `GType` is not supported, this operation can fail and139 // given `GType` is not supported, this operation can fail and
132 // `G_IO_ERROR_NOT_SUPPORTED` will be reported.140 // `G_IO_ERROR_NOT_SUPPORTED` will be reported.
133-func (x *ContentProvider) GetValue(ValueVar *gobject.Value) bool {141+func (x *ContentProvider) GetValue(ValueVar *gobject.Value) (bool, error) {
142+ var cerr *glib.Error
134 143
135- return xContentProviderGetValue(x.GoPointer(), ValueVar)144+ cret := xContentProviderGetValue(x.GoPointer(), ValueVar, &cerr)
145+ if cerr == nil {
146+ return cret, nil
147+ }
148+ return cret, cerr
136 149
137 }150 }
138 151
@@ -141,8 +154,8 @@ var xContentProviderRefFormats func(uintptr) *ContentFormats
141 // Gets the formats that the provider can provide its current contents in.154 // Gets the formats that the provider can provide its current contents in.
142 func (x *ContentProvider) RefFormats() *ContentFormats {155 func (x *ContentProvider) RefFormats() *ContentFormats {
143 156
144- return xContentProviderRefFormats(x.GoPointer())157+ cret := xContentProviderRefFormats(x.GoPointer())
145-158+ return cret
146 }159 }
147 160
148 var xContentProviderRefStorableFormats func(uintptr) *ContentFormats161 var xContentProviderRefStorableFormats func(uintptr) *ContentFormats
@@ -155,8 +168,8 @@ var xContentProviderRefStorableFormats func(uintptr) *ContentFormats
155 // This can be assumed to be a subset of [method@Gdk.ContentProvider.ref_formats].168 // This can be assumed to be a subset of [method@Gdk.ContentProvider.ref_formats].
156 func (x *ContentProvider) RefStorableFormats() *ContentFormats {169 func (x *ContentProvider) RefStorableFormats() *ContentFormats {
157 170
158- return xContentProviderRefStorableFormats(x.GoPointer())171+ cret := xContentProviderRefStorableFormats(x.GoPointer())
159-172+ return cret
160 }173 }
161 174
162 var xContentProviderWriteMimeTypeAsync func(uintptr, string, uintptr, int, uintptr, uintptr, uintptr)175 var xContentProviderWriteMimeTypeAsync func(uintptr, string, uintptr, int, uintptr, uintptr, uintptr)
@@ -179,14 +192,19 @@ func (x *ContentProvider) WriteMimeTypeAsync(MimeTypeVar string, StreamVar *gio.
179 192
180 }193 }
181 194
182-var xContentProviderWriteMimeTypeFinish func(uintptr, uintptr) bool195+var xContentProviderWriteMimeTypeFinish func(uintptr, uintptr, **glib.Error) bool
183 196
184 // Finishes an asynchronous write operation.197 // Finishes an asynchronous write operation.
185 //198 //
186 // See [method@Gdk.ContentProvider.write_mime_type_async].199 // See [method@Gdk.ContentProvider.write_mime_type_async].
187-func (x *ContentProvider) WriteMimeTypeFinish(ResultVar gio.AsyncResult) bool {200+func (x *ContentProvider) WriteMimeTypeFinish(ResultVar gio.AsyncResult) (bool, error) {
201+ var cerr *glib.Error
188 202
189- return xContentProviderWriteMimeTypeFinish(x.GoPointer(), ResultVar.GoPointer())203+ cret := xContentProviderWriteMimeTypeFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
204+ if cerr == nil {
205+ return cret, nil
206+ }
207+ return cret, cerr
190 208
191 }209 }
192 210
M v4/gdk/gdkcontentserializer.go +55 -47
@@ -40,12 +40,17 @@ func ContentSerializeAsync(StreamVar *gio.OutputStream, MimeTypeVar string, Valu
40 40
41 }41 }
42 42
43-var xContentSerializeFinish func(uintptr) bool43+var xContentSerializeFinish func(uintptr, **glib.Error) bool
44 44
45 // Finishes a content serialization operation.45 // Finishes a content serialization operation.
46-func ContentSerializeFinish(ResultVar gio.AsyncResult) bool {46+func ContentSerializeFinish(ResultVar gio.AsyncResult) (bool, error) {
47+ var cerr *glib.Error
47 48
48- return xContentSerializeFinish(ResultVar.GoPointer())49+ cret := xContentSerializeFinish(ResultVar.GoPointer(), &cerr)
50+ if cerr == nil {
51+ return cret, nil
52+ }
53+ return cret, cerr
49 54
50 }55 }
51 56
@@ -77,18 +82,17 @@ var xContentSerializerGetCancellable func(uintptr) uintptr
77 //82 //
78 // This is the `GCancellable` that was passed to [func@content_serialize_async].83 // This is the `GCancellable` that was passed to [func@content_serialize_async].
79 func (x *ContentSerializer) GetCancellable() *gio.Cancellable {84 func (x *ContentSerializer) GetCancellable() *gio.Cancellable {
85+ var cls *gio.Cancellable
80 86
81- GetCancellablePtr := xContentSerializerGetCancellable(x.GoPointer())87+ cret := xContentSerializerGetCancellable(x.GoPointer())
82- if GetCancellablePtr == 0 {
83- return nil
84- }
85-
86- gobject.IncreaseRef(GetCancellablePtr)
87-
88- GetCancellableCls := &gio.Cancellable{}
89- GetCancellableCls.Ptr = GetCancellablePtr
90- return GetCancellableCls
91 88
89+ if cret == 0 {
90+ return cls
91+ }
92+ gobject.IncreaseRef(cret)
93+ cls = &gio.Cancellable{}
94+ cls.Ptr = cret
95+ return cls
92 }96 }
93 97
94 var xContentSerializerGetGtype func(uintptr) []interface{}98 var xContentSerializerGetGtype func(uintptr) []interface{}
@@ -96,8 +100,8 @@ var xContentSerializerGetGtype func(uintptr) []interface{}
96 // Gets the `GType` to of the object to serialize.100 // Gets the `GType` to of the object to serialize.
97 func (x *ContentSerializer) GetGtype() []interface{} {101 func (x *ContentSerializer) GetGtype() []interface{} {
98 102
99- return xContentSerializerGetGtype(x.GoPointer())103+ cret := xContentSerializerGetGtype(x.GoPointer())
100-104+ return cret
101 }105 }
102 106
103 var xContentSerializerGetMimeType func(uintptr) string107 var xContentSerializerGetMimeType func(uintptr) string
@@ -105,8 +109,8 @@ var xContentSerializerGetMimeType func(uintptr) string
105 // Gets the mime type to serialize to.109 // Gets the mime type to serialize to.
106 func (x *ContentSerializer) GetMimeType() string {110 func (x *ContentSerializer) GetMimeType() string {
107 111
108- return xContentSerializerGetMimeType(x.GoPointer())112+ cret := xContentSerializerGetMimeType(x.GoPointer())
109-113+ return cret
110 }114 }
111 115
112 var xContentSerializerGetOutputStream func(uintptr) uintptr116 var xContentSerializerGetOutputStream func(uintptr) uintptr
@@ -115,18 +119,17 @@ var xContentSerializerGetOutputStream func(uintptr) uintptr
115 //119 //
116 // This is the stream that was passed to [func@content_serialize_async].120 // This is the stream that was passed to [func@content_serialize_async].
117 func (x *ContentSerializer) GetOutputStream() *gio.OutputStream {121 func (x *ContentSerializer) GetOutputStream() *gio.OutputStream {
122+ var cls *gio.OutputStream
118 123
119- GetOutputStreamPtr := xContentSerializerGetOutputStream(x.GoPointer())124+ cret := xContentSerializerGetOutputStream(x.GoPointer())
120- if GetOutputStreamPtr == 0 {
121- return nil
122- }
123-
124- gobject.IncreaseRef(GetOutputStreamPtr)
125-
126- GetOutputStreamCls := &gio.OutputStream{}
127- GetOutputStreamCls.Ptr = GetOutputStreamPtr
128- return GetOutputStreamCls
129 125
126+ if cret == 0 {
127+ return cls
128+ }
129+ gobject.IncreaseRef(cret)
130+ cls = &gio.OutputStream{}
131+ cls.Ptr = cret
132+ return cls
130 }133 }
131 134
132 var xContentSerializerGetPriority func(uintptr) int135 var xContentSerializerGetPriority func(uintptr) int
@@ -136,8 +139,8 @@ var xContentSerializerGetPriority func(uintptr) int
136 // This is the priority that was passed to [func@content_serialize_async].139 // This is the priority that was passed to [func@content_serialize_async].
137 func (x *ContentSerializer) GetPriority() int {140 func (x *ContentSerializer) GetPriority() int {
138 141
139- return xContentSerializerGetPriority(x.GoPointer())142+ cret := xContentSerializerGetPriority(x.GoPointer())
140-143+ return cret
141 }144 }
142 145
143 var xContentSerializerGetTaskData func(uintptr) uintptr146 var xContentSerializerGetTaskData func(uintptr) uintptr
@@ -147,8 +150,8 @@ var xContentSerializerGetTaskData func(uintptr) uintptr
147 // See [method@Gdk.ContentSerializer.set_task_data].150 // See [method@Gdk.ContentSerializer.set_task_data].
148 func (x *ContentSerializer) GetTaskData() uintptr {151 func (x *ContentSerializer) GetTaskData() uintptr {
149 152
150- return xContentSerializerGetTaskData(x.GoPointer())153+ cret := xContentSerializerGetTaskData(x.GoPointer())
151-154+ return cret
152 }155 }
153 156
154 var xContentSerializerGetUserData func(uintptr) uintptr157 var xContentSerializerGetUserData func(uintptr) uintptr
@@ -156,8 +159,8 @@ var xContentSerializerGetUserData func(uintptr) uintptr
156 // Gets the user data that was passed when the serializer was registered.159 // Gets the user data that was passed when the serializer was registered.
157 func (x *ContentSerializer) GetUserData() uintptr {160 func (x *ContentSerializer) GetUserData() uintptr {
158 161
159- return xContentSerializerGetUserData(x.GoPointer())162+ cret := xContentSerializerGetUserData(x.GoPointer())
160-163+ return cret
161 }164 }
162 165
163 var xContentSerializerGetValue func(uintptr) *gobject.Value166 var xContentSerializerGetValue func(uintptr) *gobject.Value
@@ -165,8 +168,8 @@ var xContentSerializerGetValue func(uintptr) *gobject.Value
165 // Gets the `GValue` to read the object to serialize from.168 // Gets the `GValue` to read the object to serialize from.
166 func (x *ContentSerializer) GetValue() *gobject.Value {169 func (x *ContentSerializer) GetValue() *gobject.Value {
167 170
168- return xContentSerializerGetValue(x.GoPointer())171+ cret := xContentSerializerGetValue(x.GoPointer())
169-172+ return cret
170 }173 }
171 174
172 var xContentSerializerReturnError func(uintptr, *glib.Error)175 var xContentSerializerReturnError func(uintptr, *glib.Error)
@@ -208,24 +211,24 @@ func (c *ContentSerializer) SetGoPointer(ptr uintptr) {
208 211
209 // Gets the source object from a #GAsyncResult.212 // Gets the source object from a #GAsyncResult.
210 func (x *ContentSerializer) GetSourceObject() *gobject.Object {213 func (x *ContentSerializer) GetSourceObject() *gobject.Object {
214+ var cls *gobject.Object
211 215
212- GetSourceObjectPtr := gio.XGAsyncResultGetSourceObject(x.GoPointer())216+ cret := gio.XGAsyncResultGetSourceObject(x.GoPointer())
213- if GetSourceObjectPtr == 0 {
214- return nil
215- }
216-
217- GetSourceObjectCls := &gobject.Object{}
218- GetSourceObjectCls.Ptr = GetSourceObjectPtr
219- return GetSourceObjectCls
220 217
218+ if cret == 0 {
219+ return cls
220+ }
221+ cls = &gobject.Object{}
222+ cls.Ptr = cret
223+ return cls
221 }224 }
222 225
223 // Checks if @res has the given @source_tag (generally a function226 // Checks if @res has the given @source_tag (generally a function
224 // pointer indicating the function @res was created by).227 // pointer indicating the function @res was created by).
225 func (x *ContentSerializer) IsTagged(SourceTagVar uintptr) bool {228 func (x *ContentSerializer) IsTagged(SourceTagVar uintptr) bool {
226 229
227- return gio.XGAsyncResultIsTagged(x.GoPointer(), SourceTagVar)230+ cret := gio.XGAsyncResultIsTagged(x.GoPointer(), SourceTagVar)
228-231+ return cret
229 }232 }
230 233
231 // If @res is a #GSimpleAsyncResult, this is equivalent to234 // If @res is a #GSimpleAsyncResult, this is equivalent to
@@ -238,9 +241,14 @@ func (x *ContentSerializer) IsTagged(SourceTagVar uintptr) bool {
238 // This should not be used in new code; #GAsyncResult errors that are241 // This should not be used in new code; #GAsyncResult errors that are
239 // set by virtual methods should also be extracted by virtual methods,242 // set by virtual methods should also be extracted by virtual methods,
240 // to enable subclasses to chain up correctly.243 // to enable subclasses to chain up correctly.
241-func (x *ContentSerializer) LegacyPropagateError() bool {244+func (x *ContentSerializer) LegacyPropagateError() (bool, error) {
245+ var cerr *glib.Error
242 246
243- return gio.XGAsyncResultLegacyPropagateError(x.GoPointer())247+ cret := gio.XGAsyncResultLegacyPropagateError(x.GoPointer())
248+ if cerr == nil {
249+ return cret, nil
250+ }
251+ return cret, cerr
244 252
245 }253 }
246 254
M v4/gdk/gdkcursor.go +42 -40
@@ -70,28 +70,32 @@ var xNewFromNameCursor func(string, uintptr) uintptr
70 // | ![](se_resize_cursor.png) "se-resize" | ![](ew_resize_cursor.png) "ew-resize" | ![](ns_resize_cursor.png) "ns-resize" | ![](nesw_resize_cursor.png) "nesw-resize" |70 // | ![](se_resize_cursor.png) "se-resize" | ![](ew_resize_cursor.png) "ew-resize" | ![](ns_resize_cursor.png) "ns-resize" | ![](nesw_resize_cursor.png) "nesw-resize" |
71 // | ![](nwse_resize_cursor.png) "nwse-resize" | ![](zoom_in_cursor.png) "zoom-in" | ![](zoom_out_cursor.png) "zoom-out" | |71 // | ![](nwse_resize_cursor.png) "nwse-resize" | ![](zoom_in_cursor.png) "zoom-in" | ![](zoom_out_cursor.png) "zoom-out" | |
72 func NewFromNameCursor(NameVar string, FallbackVar *Cursor) *Cursor {72 func NewFromNameCursor(NameVar string, FallbackVar *Cursor) *Cursor {
73- NewFromNameCursorPtr := xNewFromNameCursor(NameVar, FallbackVar.GoPointer())73+ var cls *Cursor
74- if NewFromNameCursorPtr == 0 {74+
75- return nil75+ cret := xNewFromNameCursor(NameVar, FallbackVar.GoPointer())
76- }
77 76
78- NewFromNameCursorCls := &Cursor{}77+ if cret == 0 {
79- NewFromNameCursorCls.Ptr = NewFromNameCursorPtr78+ return cls
80- return NewFromNameCursorCls79+ }
80+ cls = &Cursor{}
81+ cls.Ptr = cret
82+ return cls
81 }83 }
82 84
83 var xNewFromTextureCursor func(uintptr, int, int, uintptr) uintptr85 var xNewFromTextureCursor func(uintptr, int, int, uintptr) uintptr
84 86
85 // Creates a new cursor from a `GdkTexture`.87 // Creates a new cursor from a `GdkTexture`.
86 func NewFromTextureCursor(TextureVar *Texture, HotspotXVar int, HotspotYVar int, FallbackVar *Cursor) *Cursor {88 func NewFromTextureCursor(TextureVar *Texture, HotspotXVar int, HotspotYVar int, FallbackVar *Cursor) *Cursor {
87- NewFromTextureCursorPtr := xNewFromTextureCursor(TextureVar.GoPointer(), HotspotXVar, HotspotYVar, FallbackVar.GoPointer())89+ var cls *Cursor
88- if NewFromTextureCursorPtr == 0 {90+
89- return nil91+ cret := xNewFromTextureCursor(TextureVar.GoPointer(), HotspotXVar, HotspotYVar, FallbackVar.GoPointer())
90- }
91 92
92- NewFromTextureCursorCls := &Cursor{}93+ if cret == 0 {
93- NewFromTextureCursorCls.Ptr = NewFromTextureCursorPtr94+ return cls
94- return NewFromTextureCursorCls95+ }
96+ cls = &Cursor{}
97+ cls.Ptr = cret
98+ return cls
95 }99 }
96 100
97 var xCursorGetFallback func(uintptr) uintptr101 var xCursorGetFallback func(uintptr) uintptr
@@ -104,18 +108,17 @@ var xCursorGetFallback func(uintptr) uintptr
104 // this can happen when the texture is too large or when the `GdkDisplay`108 // this can happen when the texture is too large or when the `GdkDisplay`
105 // it is used on does not support textured cursors.109 // it is used on does not support textured cursors.
106 func (x *Cursor) GetFallback() *Cursor {110 func (x *Cursor) GetFallback() *Cursor {
111+ var cls *Cursor
107 112
108- GetFallbackPtr := xCursorGetFallback(x.GoPointer())113+ cret := xCursorGetFallback(x.GoPointer())
109- if GetFallbackPtr == 0 {
110- return nil
111- }
112-
113- gobject.IncreaseRef(GetFallbackPtr)
114-
115- GetFallbackCls := &Cursor{}
116- GetFallbackCls.Ptr = GetFallbackPtr
117- return GetFallbackCls
118 114
115+ if cret == 0 {
116+ return cls
117+ }
118+ gobject.IncreaseRef(cret)
119+ cls = &Cursor{}
120+ cls.Ptr = cret
121+ return cls
119 }122 }
120 123
121 var xCursorGetHotspotX func(uintptr) int124 var xCursorGetHotspotX func(uintptr) int
@@ -129,8 +132,8 @@ var xCursorGetHotspotX func(uintptr) int
129 // [ctor@Gdk.Cursor.new_from_texture].132 // [ctor@Gdk.Cursor.new_from_texture].
130 func (x *Cursor) GetHotspotX() int {133 func (x *Cursor) GetHotspotX() int {
131 134
132- return xCursorGetHotspotX(x.GoPointer())135+ cret := xCursorGetHotspotX(x.GoPointer())
133-136+ return cret
134 }137 }
135 138
136 var xCursorGetHotspotY func(uintptr) int139 var xCursorGetHotspotY func(uintptr) int
@@ -144,8 +147,8 @@ var xCursorGetHotspotY func(uintptr) int
144 // [ctor@Gdk.Cursor.new_from_texture].147 // [ctor@Gdk.Cursor.new_from_texture].
145 func (x *Cursor) GetHotspotY() int {148 func (x *Cursor) GetHotspotY() int {
146 149
147- return xCursorGetHotspotY(x.GoPointer())150+ cret := xCursorGetHotspotY(x.GoPointer())
148-151+ return cret
149 }152 }
150 153
151 var xCursorGetName func(uintptr) string154 var xCursorGetName func(uintptr) string
@@ -155,8 +158,8 @@ var xCursorGetName func(uintptr) string
155 // If the cursor is not a named cursor, %NULL will be returned.158 // If the cursor is not a named cursor, %NULL will be returned.
156 func (x *Cursor) GetName() string {159 func (x *Cursor) GetName() string {
157 160
158- return xCursorGetName(x.GoPointer())161+ cret := xCursorGetName(x.GoPointer())
159-162+ return cret
160 }163 }
161 164
162 var xCursorGetTexture func(uintptr) uintptr165 var xCursorGetTexture func(uintptr) uintptr
@@ -165,18 +168,17 @@ var xCursorGetTexture func(uintptr) uintptr
165 //168 //
166 // If the cursor is a named cursor, %NULL will be returned.169 // If the cursor is a named cursor, %NULL will be returned.
167 func (x *Cursor) GetTexture() *Texture {170 func (x *Cursor) GetTexture() *Texture {
171+ var cls *Texture
168 172
169- GetTexturePtr := xCursorGetTexture(x.GoPointer())173+ cret := xCursorGetTexture(x.GoPointer())
170- if GetTexturePtr == 0 {
171- return nil
172- }
173-
174- gobject.IncreaseRef(GetTexturePtr)
175-
176- GetTextureCls := &Texture{}
177- GetTextureCls.Ptr = GetTexturePtr
178- return GetTextureCls
179 174
175+ if cret == 0 {
176+ return cls
177+ }
178+ gobject.IncreaseRef(cret)
179+ cls = &Texture{}
180+ cls.Ptr = cret
181+ return cls
180 }182 }
181 183
182 func (c *Cursor) GoPointer() uintptr {184 func (c *Cursor) GoPointer() uintptr {
M v4/gdk/gdkdevice.go +62 -66
@@ -69,26 +69,25 @@ var xDeviceGetCapsLockState func(uintptr) bool
69 // This is only relevant for keyboard devices.69 // This is only relevant for keyboard devices.
70 func (x *Device) GetCapsLockState() bool {70 func (x *Device) GetCapsLockState() bool {
71 71
72- return xDeviceGetCapsLockState(x.GoPointer())72+ cret := xDeviceGetCapsLockState(x.GoPointer())
73-73+ return cret
74 }74 }
75 75
76 var xDeviceGetDeviceTool func(uintptr) uintptr76 var xDeviceGetDeviceTool func(uintptr) uintptr
77 77
78 // Retrieves the current tool for @device.78 // Retrieves the current tool for @device.
79 func (x *Device) GetDeviceTool() *DeviceTool {79 func (x *Device) GetDeviceTool() *DeviceTool {
80+ var cls *DeviceTool
80 81
81- GetDeviceToolPtr := xDeviceGetDeviceTool(x.GoPointer())82+ cret := xDeviceGetDeviceTool(x.GoPointer())
82- if GetDeviceToolPtr == 0 {
83- return nil
84- }
85-
86- gobject.IncreaseRef(GetDeviceToolPtr)
87-
88- GetDeviceToolCls := &DeviceTool{}
89- GetDeviceToolCls.Ptr = GetDeviceToolPtr
90- return GetDeviceToolCls
91 83
84+ if cret == 0 {
85+ return cls
86+ }
87+ gobject.IncreaseRef(cret)
88+ cls = &DeviceTool{}
89+ cls.Ptr = cret
90+ return cls
92 }91 }
93 92
94 var xDeviceGetDirection func(uintptr) pango.Direction93 var xDeviceGetDirection func(uintptr) pango.Direction
@@ -101,26 +100,25 @@ var xDeviceGetDirection func(uintptr) pango.Direction
101 // of its symbols. See [func@Pango.unichar_direction].100 // of its symbols. See [func@Pango.unichar_direction].
102 func (x *Device) GetDirection() pango.Direction {101 func (x *Device) GetDirection() pango.Direction {
103 102
104- return xDeviceGetDirection(x.GoPointer())103+ cret := xDeviceGetDirection(x.GoPointer())
105-104+ return cret
106 }105 }
107 106
108 var xDeviceGetDisplay func(uintptr) uintptr107 var xDeviceGetDisplay func(uintptr) uintptr
109 108
110 // Returns the `GdkDisplay` to which @device pertains.109 // Returns the `GdkDisplay` to which @device pertains.
111 func (x *Device) GetDisplay() *Display {110 func (x *Device) GetDisplay() *Display {
111+ var cls *Display
112 112
113- GetDisplayPtr := xDeviceGetDisplay(x.GoPointer())113+ cret := xDeviceGetDisplay(x.GoPointer())
114- if GetDisplayPtr == 0 {
115- return nil
116- }
117-
118- gobject.IncreaseRef(GetDisplayPtr)
119-
120- GetDisplayCls := &Display{}
121- GetDisplayCls.Ptr = GetDisplayPtr
122- return GetDisplayCls
123 114
115+ if cret == 0 {
116+ return cls
117+ }
118+ gobject.IncreaseRef(cret)
119+ cls = &Display{}
120+ cls.Ptr = cret
121+ return cls
124 }122 }
125 123
126 var xDeviceGetHasCursor func(uintptr) bool124 var xDeviceGetHasCursor func(uintptr) bool
@@ -131,8 +129,8 @@ var xDeviceGetHasCursor func(uintptr) bool
131 // don't have a pointer.129 // don't have a pointer.
132 func (x *Device) GetHasCursor() bool {130 func (x *Device) GetHasCursor() bool {
133 131
134- return xDeviceGetHasCursor(x.GoPointer())132+ cret := xDeviceGetHasCursor(x.GoPointer())
135-133+ return cret
136 }134 }
137 135
138 var xDeviceGetModifierState func(uintptr) ModifierType136 var xDeviceGetModifierState func(uintptr) ModifierType
@@ -142,8 +140,8 @@ var xDeviceGetModifierState func(uintptr) ModifierType
142 // This is only relevant for keyboard devices.140 // This is only relevant for keyboard devices.
143 func (x *Device) GetModifierState() ModifierType {141 func (x *Device) GetModifierState() ModifierType {
144 142
145- return xDeviceGetModifierState(x.GoPointer())143+ cret := xDeviceGetModifierState(x.GoPointer())
146-144+ return cret
147 }145 }
148 146
149 var xDeviceGetName func(uintptr) string147 var xDeviceGetName func(uintptr) string
@@ -151,8 +149,8 @@ var xDeviceGetName func(uintptr) string
151 // The name of the device, suitable for showing in a user interface.149 // The name of the device, suitable for showing in a user interface.
152 func (x *Device) GetName() string {150 func (x *Device) GetName() string {
153 151
154- return xDeviceGetName(x.GoPointer())152+ cret := xDeviceGetName(x.GoPointer())
155-153+ return cret
156 }154 }
157 155
158 var xDeviceGetNumLockState func(uintptr) bool156 var xDeviceGetNumLockState func(uintptr) bool
@@ -162,8 +160,8 @@ var xDeviceGetNumLockState func(uintptr) bool
162 // This is only relevant for keyboard devices.160 // This is only relevant for keyboard devices.
163 func (x *Device) GetNumLockState() bool {161 func (x *Device) GetNumLockState() bool {
164 162
165- return xDeviceGetNumLockState(x.GoPointer())163+ cret := xDeviceGetNumLockState(x.GoPointer())
166-164+ return cret
167 }165 }
168 166
169 var xDeviceGetNumTouches func(uintptr) uint167 var xDeviceGetNumTouches func(uintptr) uint
@@ -171,8 +169,8 @@ var xDeviceGetNumTouches func(uintptr) uint
171 // Retrieves the number of touch points associated to @device.169 // Retrieves the number of touch points associated to @device.
172 func (x *Device) GetNumTouches() uint {170 func (x *Device) GetNumTouches() uint {
173 171
174- return xDeviceGetNumTouches(x.GoPointer())172+ cret := xDeviceGetNumTouches(x.GoPointer())
175-173+ return cret
176 }174 }
177 175
178 var xDeviceGetProductId func(uintptr) string176 var xDeviceGetProductId func(uintptr) string
@@ -183,8 +181,8 @@ var xDeviceGetProductId func(uintptr) string
183 // See [method@Gdk.Device.get_vendor_id] for more information.181 // See [method@Gdk.Device.get_vendor_id] for more information.
184 func (x *Device) GetProductId() string {182 func (x *Device) GetProductId() string {
185 183
186- return xDeviceGetProductId(x.GoPointer())184+ cret := xDeviceGetProductId(x.GoPointer())
187-185+ return cret
188 }186 }
189 187
190 var xDeviceGetScrollLockState func(uintptr) bool188 var xDeviceGetScrollLockState func(uintptr) bool
@@ -194,26 +192,25 @@ var xDeviceGetScrollLockState func(uintptr) bool
194 // This is only relevant for keyboard devices.192 // This is only relevant for keyboard devices.
195 func (x *Device) GetScrollLockState() bool {193 func (x *Device) GetScrollLockState() bool {
196 194
197- return xDeviceGetScrollLockState(x.GoPointer())195+ cret := xDeviceGetScrollLockState(x.GoPointer())
198-196+ return cret
199 }197 }
200 198
201 var xDeviceGetSeat func(uintptr) uintptr199 var xDeviceGetSeat func(uintptr) uintptr
202 200
203 // Returns the `GdkSeat` the device belongs to.201 // Returns the `GdkSeat` the device belongs to.
204 func (x *Device) GetSeat() *Seat {202 func (x *Device) GetSeat() *Seat {
203+ var cls *Seat
205 204
206- GetSeatPtr := xDeviceGetSeat(x.GoPointer())205+ cret := xDeviceGetSeat(x.GoPointer())
207- if GetSeatPtr == 0 {
208- return nil
209- }
210-
211- gobject.IncreaseRef(GetSeatPtr)
212-
213- GetSeatCls := &Seat{}
214- GetSeatCls.Ptr = GetSeatPtr
215- return GetSeatCls
216 206
207+ if cret == 0 {
208+ return cls
209+ }
210+ gobject.IncreaseRef(cret)
211+ cls = &Seat{}
212+ cls.Ptr = cret
213+ return cls
217 }214 }
218 215
219 var xDeviceGetSource func(uintptr) InputSource216 var xDeviceGetSource func(uintptr) InputSource
@@ -221,8 +218,8 @@ var xDeviceGetSource func(uintptr) InputSource
221 // Determines the type of the device.218 // Determines the type of the device.
222 func (x *Device) GetSource() InputSource {219 func (x *Device) GetSource() InputSource {
223 220
224- return xDeviceGetSource(x.GoPointer())221+ cret := xDeviceGetSource(x.GoPointer())
225-222+ return cret
226 }223 }
227 224
228 var xDeviceGetSurfaceAtPosition func(uintptr, float64, float64) uintptr225 var xDeviceGetSurfaceAtPosition func(uintptr, float64, float64) uintptr
@@ -233,18 +230,17 @@ var xDeviceGetSurfaceAtPosition func(uintptr, float64, float64) uintptr
233 // Returns %NULL if the surface tree under @device is not known to GDK230 // Returns %NULL if the surface tree under @device is not known to GDK
234 // (for example, belongs to another application).231 // (for example, belongs to another application).
235 func (x *Device) GetSurfaceAtPosition(WinXVar float64, WinYVar float64) *Surface {232 func (x *Device) GetSurfaceAtPosition(WinXVar float64, WinYVar float64) *Surface {
233+ var cls *Surface
236 234
237- GetSurfaceAtPositionPtr := xDeviceGetSurfaceAtPosition(x.GoPointer(), WinXVar, WinYVar)235+ cret := xDeviceGetSurfaceAtPosition(x.GoPointer(), WinXVar, WinYVar)
238- if GetSurfaceAtPositionPtr == 0 {
239- return nil
240- }
241-
242- gobject.IncreaseRef(GetSurfaceAtPositionPtr)
243-
244- GetSurfaceAtPositionCls := &Surface{}
245- GetSurfaceAtPositionCls.Ptr = GetSurfaceAtPositionPtr
246- return GetSurfaceAtPositionCls
247 236
237+ if cret == 0 {
238+ return cls
239+ }
240+ gobject.IncreaseRef(cret)
241+ cls = &Surface{}
242+ cls.Ptr = cret
243+ return cls
248 }244 }
249 245
250 var xDeviceGetTimestamp func(uintptr) uint32246 var xDeviceGetTimestamp func(uintptr) uint32
@@ -257,8 +253,8 @@ var xDeviceGetTimestamp func(uintptr) uint32
257 // update the timestamp).253 // update the timestamp).
258 func (x *Device) GetTimestamp() uint32 {254 func (x *Device) GetTimestamp() uint32 {
259 255
260- return xDeviceGetTimestamp(x.GoPointer())256+ cret := xDeviceGetTimestamp(x.GoPointer())
261-257+ return cret
262 }258 }
263 259
264 var xDeviceGetVendorId func(uintptr) string260 var xDeviceGetVendorId func(uintptr) string
@@ -294,8 +290,8 @@ var xDeviceGetVendorId func(uintptr) string
294 // ```290 // ```
295 func (x *Device) GetVendorId() string {291 func (x *Device) GetVendorId() string {
296 292
297- return xDeviceGetVendorId(x.GoPointer())293+ cret := xDeviceGetVendorId(x.GoPointer())
298-294+ return cret
299 }295 }
300 296
301 var xDeviceHasBidiLayouts func(uintptr) bool297 var xDeviceHasBidiLayouts func(uintptr) bool
@@ -306,8 +302,8 @@ var xDeviceHasBidiLayouts func(uintptr) bool
306 // This is only relevant for keyboard devices.302 // This is only relevant for keyboard devices.
307 func (x *Device) HasBidiLayouts() bool {303 func (x *Device) HasBidiLayouts() bool {
308 304
309- return xDeviceHasBidiLayouts(x.GoPointer())305+ cret := xDeviceHasBidiLayouts(x.GoPointer())
310-306+ return cret
311 }307 }
312 308
313 func (c *Device) GoPointer() uintptr {309 func (c *Device) GoPointer() uintptr {
M v4/gdk/gdkdevicepad.go +8 -8
@@ -51,22 +51,22 @@ func (x *DevicePadBase) SetGoPointer(ptr uintptr) {
51 // f the feature or index do not exist in @pad, -1 is returned.51 // f the feature or index do not exist in @pad, -1 is returned.
52 func (x *DevicePadBase) GetFeatureGroup(FeatureVar DevicePadFeature, FeatureIdxVar int) int {52 func (x *DevicePadBase) GetFeatureGroup(FeatureVar DevicePadFeature, FeatureIdxVar int) int {
53 53
54- return XGdkDevicePadGetFeatureGroup(x.GoPointer(), FeatureVar, FeatureIdxVar)54+ cret := XGdkDevicePadGetFeatureGroup(x.GoPointer(), FeatureVar, FeatureIdxVar)
55-55+ return cret
56 }56 }
57 57
58 // Returns the number of modes that @group may have.58 // Returns the number of modes that @group may have.
59 func (x *DevicePadBase) GetGroupNModes(GroupIdxVar int) int {59 func (x *DevicePadBase) GetGroupNModes(GroupIdxVar int) int {
60 60
61- return XGdkDevicePadGetGroupNModes(x.GoPointer(), GroupIdxVar)61+ cret := XGdkDevicePadGetGroupNModes(x.GoPointer(), GroupIdxVar)
62-62+ return cret
63 }63 }
64 64
65 // Returns the number of features a tablet pad has.65 // Returns the number of features a tablet pad has.
66 func (x *DevicePadBase) GetNFeatures(FeatureVar DevicePadFeature) int {66 func (x *DevicePadBase) GetNFeatures(FeatureVar DevicePadFeature) int {
67 67
68- return XGdkDevicePadGetNFeatures(x.GoPointer(), FeatureVar)68+ cret := XGdkDevicePadGetNFeatures(x.GoPointer(), FeatureVar)
69-69+ return cret
70 }70 }
71 71
72 // Returns the number of groups this pad device has.72 // Returns the number of groups this pad device has.
@@ -76,8 +76,8 @@ func (x *DevicePadBase) GetNFeatures(FeatureVar DevicePadFeature) int {
76 // current mode.76 // current mode.
77 func (x *DevicePadBase) GetNGroups() int {77 func (x *DevicePadBase) GetNGroups() int {
78 78
79- return XGdkDevicePadGetNGroups(x.GoPointer())79+ cret := XGdkDevicePadGetNGroups(x.GoPointer())
80-80+ return cret
81 }81 }
82 82
83 var XGdkDevicePadGetFeatureGroup func(uintptr, DevicePadFeature, int) int83 var XGdkDevicePadGetFeatureGroup func(uintptr, DevicePadFeature, int) int
M v4/gdk/gdkdevicetool.go +8 -8
@@ -47,8 +47,8 @@ var xDeviceToolGetAxes func(uintptr) AxisFlags
47 // Gets the axes of the tool.47 // Gets the axes of the tool.
48 func (x *DeviceTool) GetAxes() AxisFlags {48 func (x *DeviceTool) GetAxes() AxisFlags {
49 49
50- return xDeviceToolGetAxes(x.GoPointer())50+ cret := xDeviceToolGetAxes(x.GoPointer())
51-51+ return cret
52 }52 }
53 53
54 var xDeviceToolGetHardwareId func(uintptr) uint6454 var xDeviceToolGetHardwareId func(uintptr) uint64
@@ -66,8 +66,8 @@ var xDeviceToolGetHardwareId func(uintptr) uint64
66 // `GdkDeviceToolType`, but different hardware identificators.66 // `GdkDeviceToolType`, but different hardware identificators.
67 func (x *DeviceTool) GetHardwareId() uint64 {67 func (x *DeviceTool) GetHardwareId() uint64 {
68 68
69- return xDeviceToolGetHardwareId(x.GoPointer())69+ cret := xDeviceToolGetHardwareId(x.GoPointer())
70-70+ return cret
71 }71 }
72 72
73 var xDeviceToolGetSerial func(uintptr) uint6473 var xDeviceToolGetSerial func(uintptr) uint64
@@ -78,8 +78,8 @@ var xDeviceToolGetSerial func(uintptr) uint64
78 // (eg. a tablet pen) across program executions.78 // (eg. a tablet pen) across program executions.
79 func (x *DeviceTool) GetSerial() uint64 {79 func (x *DeviceTool) GetSerial() uint64 {
80 80
81- return xDeviceToolGetSerial(x.GoPointer())81+ cret := xDeviceToolGetSerial(x.GoPointer())
82-82+ return cret
83 }83 }
84 84
85 var xDeviceToolGetToolType func(uintptr) DeviceToolType85 var xDeviceToolGetToolType func(uintptr) DeviceToolType
@@ -87,8 +87,8 @@ var xDeviceToolGetToolType func(uintptr) DeviceToolType
87 // Gets the `GdkDeviceToolType` of the tool.87 // Gets the `GdkDeviceToolType` of the tool.
88 func (x *DeviceTool) GetToolType() DeviceToolType {88 func (x *DeviceTool) GetToolType() DeviceToolType {
89 89
90- return xDeviceToolGetToolType(x.GoPointer())90+ cret := xDeviceToolGetToolType(x.GoPointer())
91-91+ return cret
92 }92 }
93 93
94 func (c *DeviceTool) GoPointer() uintptr {94 func (c *DeviceTool) GoPointer() uintptr {
M v4/gdk/gdkdisplay.go +97 -92
@@ -64,16 +64,21 @@ var xDisplayCreateGlContext func(uintptr) uintptr
64 // If the creation of the `GdkGLContext` failed, @error will be set.64 // If the creation of the `GdkGLContext` failed, @error will be set.
65 // Before using the returned `GdkGLContext`, you will need to65 // Before using the returned `GdkGLContext`, you will need to
66 // call [method@Gdk.GLContext.make_current] or [method@Gdk.GLContext.realize].66 // call [method@Gdk.GLContext.make_current] or [method@Gdk.GLContext.realize].
67-func (x *Display) CreateGlContext() *GLContext {67+func (x *Display) CreateGlContext() (*GLContext, error) {
68+ var cls *GLContext
69+ var cerr *glib.Error
68 70
69- CreateGlContextPtr := xDisplayCreateGlContext(x.GoPointer())71+ cret := xDisplayCreateGlContext(x.GoPointer())
70- if CreateGlContextPtr == 0 {
71- return nil
72- }
73 72
74- CreateGlContextCls := &GLContext{}73+ if cret == 0 {
75- CreateGlContextCls.Ptr = CreateGlContextPtr74+ return cls, cerr
76- return CreateGlContextCls75+ }
76+ cls = &GLContext{}
77+ cls.Ptr = cret
78+ if cerr == nil {
79+ return cls, nil
80+ }
81+ return cls, cerr
77 82
78 }83 }
79 84
@@ -82,8 +87,8 @@ var xDisplayDeviceIsGrabbed func(uintptr, uintptr) bool
82 // Returns %TRUE if there is an ongoing grab on @device for @display.87 // Returns %TRUE if there is an ongoing grab on @device for @display.
83 func (x *Display) DeviceIsGrabbed(DeviceVar *Device) bool {88 func (x *Display) DeviceIsGrabbed(DeviceVar *Device) bool {
84 89
85- return xDisplayDeviceIsGrabbed(x.GoPointer(), DeviceVar.GoPointer())90+ cret := xDisplayDeviceIsGrabbed(x.GoPointer(), DeviceVar.GoPointer())
86-91+ return cret
87 }92 }
88 93
89 var xDisplayFlush func(uintptr)94 var xDisplayFlush func(uintptr)
@@ -109,34 +114,33 @@ var xDisplayGetAppLaunchContext func(uintptr) uintptr
109 // Returns a `GdkAppLaunchContext` suitable for launching114 // Returns a `GdkAppLaunchContext` suitable for launching
110 // applications on the given display.115 // applications on the given display.
111 func (x *Display) GetAppLaunchContext() *AppLaunchContext {116 func (x *Display) GetAppLaunchContext() *AppLaunchContext {
117+ var cls *AppLaunchContext
112 118
113- GetAppLaunchContextPtr := xDisplayGetAppLaunchContext(x.GoPointer())119+ cret := xDisplayGetAppLaunchContext(x.GoPointer())
114- if GetAppLaunchContextPtr == 0 {
115- return nil
116- }
117-
118- GetAppLaunchContextCls := &AppLaunchContext{}
119- GetAppLaunchContextCls.Ptr = GetAppLaunchContextPtr
120- return GetAppLaunchContextCls
121 120
121+ if cret == 0 {
122+ return cls
123+ }
124+ cls = &AppLaunchContext{}
125+ cls.Ptr = cret
126+ return cls
122 }127 }
123 128
124 var xDisplayGetClipboard func(uintptr) uintptr129 var xDisplayGetClipboard func(uintptr) uintptr
125 130
126 // Gets the clipboard used for copy/paste operations.131 // Gets the clipboard used for copy/paste operations.
127 func (x *Display) GetClipboard() *Clipboard {132 func (x *Display) GetClipboard() *Clipboard {
133+ var cls *Clipboard
128 134
129- GetClipboardPtr := xDisplayGetClipboard(x.GoPointer())135+ cret := xDisplayGetClipboard(x.GoPointer())
130- if GetClipboardPtr == 0 {
131- return nil
132- }
133-
134- gobject.IncreaseRef(GetClipboardPtr)
135-
136- GetClipboardCls := &Clipboard{}
137- GetClipboardCls.Ptr = GetClipboardPtr
138- return GetClipboardCls
139 136
137+ if cret == 0 {
138+ return cls
139+ }
140+ gobject.IncreaseRef(cret)
141+ cls = &Clipboard{}
142+ cls.Ptr = cret
143+ return cls
140 }144 }
141 145
142 var xDisplayGetDefaultSeat func(uintptr) uintptr146 var xDisplayGetDefaultSeat func(uintptr) uintptr
@@ -146,18 +150,17 @@ var xDisplayGetDefaultSeat func(uintptr) uintptr
146 // Note that a display may not have a seat. In this case,150 // Note that a display may not have a seat. In this case,
147 // this function will return %NULL.151 // this function will return %NULL.
148 func (x *Display) GetDefaultSeat() *Seat {152 func (x *Display) GetDefaultSeat() *Seat {
153+ var cls *Seat
149 154
150- GetDefaultSeatPtr := xDisplayGetDefaultSeat(x.GoPointer())155+ cret := xDisplayGetDefaultSeat(x.GoPointer())
151- if GetDefaultSeatPtr == 0 {
152- return nil
153- }
154-
155- gobject.IncreaseRef(GetDefaultSeatPtr)
156-
157- GetDefaultSeatCls := &Seat{}
158- GetDefaultSeatCls.Ptr = GetDefaultSeatPtr
159- return GetDefaultSeatCls
160 156
157+ if cret == 0 {
158+ return cls
159+ }
160+ gobject.IncreaseRef(cret)
161+ cls = &Seat{}
162+ cls.Ptr = cret
163+ return cls
161 }164 }
162 165
163 var xDisplayGetMonitorAtSurface func(uintptr, uintptr) uintptr166 var xDisplayGetMonitorAtSurface func(uintptr, uintptr) uintptr
@@ -168,18 +171,17 @@ var xDisplayGetMonitorAtSurface func(uintptr, uintptr) uintptr
168 // Returns a monitor close to @surface if it is outside171 // Returns a monitor close to @surface if it is outside
169 // of all monitors.172 // of all monitors.
170 func (x *Display) GetMonitorAtSurface(SurfaceVar *Surface) *Monitor {173 func (x *Display) GetMonitorAtSurface(SurfaceVar *Surface) *Monitor {
174+ var cls *Monitor
171 175
172- GetMonitorAtSurfacePtr := xDisplayGetMonitorAtSurface(x.GoPointer(), SurfaceVar.GoPointer())176+ cret := xDisplayGetMonitorAtSurface(x.GoPointer(), SurfaceVar.GoPointer())
173- if GetMonitorAtSurfacePtr == 0 {
174- return nil
175- }
176-
177- gobject.IncreaseRef(GetMonitorAtSurfacePtr)
178-
179- GetMonitorAtSurfaceCls := &Monitor{}
180- GetMonitorAtSurfaceCls.Ptr = GetMonitorAtSurfacePtr
181- return GetMonitorAtSurfaceCls
182 177
178+ if cret == 0 {
179+ return cls
180+ }
181+ gobject.IncreaseRef(cret)
182+ cls = &Monitor{}
183+ cls.Ptr = cret
184+ return cls
183 }185 }
184 186
185 var xDisplayGetMonitors func(uintptr) uintptr187 var xDisplayGetMonitors func(uintptr) uintptr
@@ -192,18 +194,17 @@ var xDisplayGetMonitors func(uintptr) uintptr
192 // You can listen to the GListModel::items-changed signal on194 // You can listen to the GListModel::items-changed signal on
193 // this list to monitor changes to the monitor of this display.195 // this list to monitor changes to the monitor of this display.
194 func (x *Display) GetMonitors() *gio.ListModelBase {196 func (x *Display) GetMonitors() *gio.ListModelBase {
197+ var cls *gio.ListModelBase
195 198
196- GetMonitorsPtr := xDisplayGetMonitors(x.GoPointer())199+ cret := xDisplayGetMonitors(x.GoPointer())
197- if GetMonitorsPtr == 0 {
198- return nil
199- }
200-
201- gobject.IncreaseRef(GetMonitorsPtr)
202-
203- GetMonitorsCls := &gio.ListModelBase{}
204- GetMonitorsCls.Ptr = GetMonitorsPtr
205- return GetMonitorsCls
206 200
201+ if cret == 0 {
202+ return cls
203+ }
204+ gobject.IncreaseRef(cret)
205+ cls = &gio.ListModelBase{}
206+ cls.Ptr = cret
207+ return cls
207 }208 }
208 209
209 var xDisplayGetName func(uintptr) string210 var xDisplayGetName func(uintptr) string
@@ -211,8 +212,8 @@ var xDisplayGetName func(uintptr) string
211 // Gets the name of the display.212 // Gets the name of the display.
212 func (x *Display) GetName() string {213 func (x *Display) GetName() string {
213 214
214- return xDisplayGetName(x.GoPointer())215+ cret := xDisplayGetName(x.GoPointer())
215-216+ return cret
216 }217 }
217 218
218 var xDisplayGetPrimaryClipboard func(uintptr) uintptr219 var xDisplayGetPrimaryClipboard func(uintptr) uintptr
@@ -222,18 +223,17 @@ var xDisplayGetPrimaryClipboard func(uintptr) uintptr
222 // On backends where the primary clipboard is not supported natively,223 // On backends where the primary clipboard is not supported natively,
223 // GDK emulates this clipboard locally.224 // GDK emulates this clipboard locally.
224 func (x *Display) GetPrimaryClipboard() *Clipboard {225 func (x *Display) GetPrimaryClipboard() *Clipboard {
226+ var cls *Clipboard
225 227
226- GetPrimaryClipboardPtr := xDisplayGetPrimaryClipboard(x.GoPointer())228+ cret := xDisplayGetPrimaryClipboard(x.GoPointer())
227- if GetPrimaryClipboardPtr == 0 {
228- return nil
229- }
230-
231- gobject.IncreaseRef(GetPrimaryClipboardPtr)
232-
233- GetPrimaryClipboardCls := &Clipboard{}
234- GetPrimaryClipboardCls.Ptr = GetPrimaryClipboardPtr
235- return GetPrimaryClipboardCls
236 229
230+ if cret == 0 {
231+ return cls
232+ }
233+ gobject.IncreaseRef(cret)
234+ cls = &Clipboard{}
235+ cls.Ptr = cret
236+ return cls
237 }237 }
238 238
239 var xDisplayGetSetting func(uintptr, string, *gobject.Value) bool239 var xDisplayGetSetting func(uintptr, string, *gobject.Value) bool
@@ -242,8 +242,8 @@ var xDisplayGetSetting func(uintptr, string, *gobject.Value) bool
242 // for the @display.242 // for the @display.
243 func (x *Display) GetSetting(NameVar string, ValueVar *gobject.Value) bool {243 func (x *Display) GetSetting(NameVar string, ValueVar *gobject.Value) bool {
244 244
245- return xDisplayGetSetting(x.GoPointer(), NameVar, ValueVar)245+ cret := xDisplayGetSetting(x.GoPointer(), NameVar, ValueVar)
246-246+ return cret
247 }247 }
248 248
249 var xDisplayGetStartupNotificationId func(uintptr) string249 var xDisplayGetStartupNotificationId func(uintptr) string
@@ -252,8 +252,8 @@ var xDisplayGetStartupNotificationId func(uintptr) string
252 // if no ID has been defined.252 // if no ID has been defined.
253 func (x *Display) GetStartupNotificationId() string {253 func (x *Display) GetStartupNotificationId() string {
254 254
255- return xDisplayGetStartupNotificationId(x.GoPointer())255+ cret := xDisplayGetStartupNotificationId(x.GoPointer())
256-256+ return cret
257 }257 }
258 258
259 var xDisplayIsClosed func(uintptr) bool259 var xDisplayIsClosed func(uintptr) bool
@@ -261,8 +261,8 @@ var xDisplayIsClosed func(uintptr) bool
261 // Finds out if the display has been closed.261 // Finds out if the display has been closed.
262 func (x *Display) IsClosed() bool {262 func (x *Display) IsClosed() bool {
263 263
264- return xDisplayIsClosed(x.GoPointer())264+ cret := xDisplayIsClosed(x.GoPointer())
265-265+ return cret
266 }266 }
267 267
268 var xDisplayIsComposited func(uintptr) bool268 var xDisplayIsComposited func(uintptr) bool
@@ -279,8 +279,8 @@ var xDisplayIsComposited func(uintptr) bool
279 // On modern displays, this value is always %TRUE.279 // On modern displays, this value is always %TRUE.
280 func (x *Display) IsComposited() bool {280 func (x *Display) IsComposited() bool {
281 281
282- return xDisplayIsComposited(x.GoPointer())282+ cret := xDisplayIsComposited(x.GoPointer())
283-283+ return cret
284 }284 }
285 285
286 var xDisplayIsRgba func(uintptr) bool286 var xDisplayIsRgba func(uintptr) bool
@@ -298,8 +298,8 @@ var xDisplayIsRgba func(uintptr) bool
298 // On modern displays, this value is always %TRUE.298 // On modern displays, this value is always %TRUE.
299 func (x *Display) IsRgba() bool {299 func (x *Display) IsRgba() bool {
300 300
301- return xDisplayIsRgba(x.GoPointer())301+ cret := xDisplayIsRgba(x.GoPointer())
302-302+ return cret
303 }303 }
304 304
305 var xDisplayListSeats func(uintptr) *glib.List305 var xDisplayListSeats func(uintptr) *glib.List
@@ -307,8 +307,8 @@ var xDisplayListSeats func(uintptr) *glib.List
307 // Returns the list of seats known to @display.307 // Returns the list of seats known to @display.
308 func (x *Display) ListSeats() *glib.List {308 func (x *Display) ListSeats() *glib.List {
309 309
310- return xDisplayListSeats(x.GoPointer())310+ cret := xDisplayListSeats(x.GoPointer())
311-311+ return cret
312 }312 }
313 313
314 var xDisplayMapKeycode func(uintptr, uint, uintptr, uintptr, int) bool314 var xDisplayMapKeycode func(uintptr, uint, uintptr, uintptr, int) bool
@@ -324,8 +324,8 @@ var xDisplayMapKeycode func(uintptr, uint, uintptr, uintptr, int) bool
324 // Free the returned arrays with g_free().324 // Free the returned arrays with g_free().
325 func (x *Display) MapKeycode(KeycodeVar uint, KeysVar uintptr, KeyvalsVar uintptr, NEntriesVar int) bool {325 func (x *Display) MapKeycode(KeycodeVar uint, KeysVar uintptr, KeyvalsVar uintptr, NEntriesVar int) bool {
326 326
327- return xDisplayMapKeycode(x.GoPointer(), KeycodeVar, KeysVar, KeyvalsVar, NEntriesVar)327+ cret := xDisplayMapKeycode(x.GoPointer(), KeycodeVar, KeysVar, KeyvalsVar, NEntriesVar)
328-328+ return cret
329 }329 }
330 330
331 var xDisplayMapKeyval func(uintptr, uint, uintptr, int) bool331 var xDisplayMapKeyval func(uintptr, uint, uintptr, int) bool
@@ -347,8 +347,8 @@ var xDisplayMapKeyval func(uintptr, uint, uintptr, int) bool
347 // The returned array should be freed with g_free().347 // The returned array should be freed with g_free().
348 func (x *Display) MapKeyval(KeyvalVar uint, KeysVar uintptr, NKeysVar int) bool {348 func (x *Display) MapKeyval(KeyvalVar uint, KeysVar uintptr, NKeysVar int) bool {
349 349
350- return xDisplayMapKeyval(x.GoPointer(), KeyvalVar, KeysVar, NKeysVar)350+ cret := xDisplayMapKeyval(x.GoPointer(), KeyvalVar, KeysVar, NKeysVar)
351-351+ return cret
352 }352 }
353 353
354 var xDisplayNotifyStartupComplete func(uintptr, string)354 var xDisplayNotifyStartupComplete func(uintptr, string)
@@ -382,9 +382,14 @@ var xDisplayPrepareGl func(uintptr) bool
382 // You never need to call this function, GDK will call it automatically382 // You never need to call this function, GDK will call it automatically
383 // as needed. But you can use it as a check when setting up code that383 // as needed. But you can use it as a check when setting up code that
384 // might make use of OpenGL.384 // might make use of OpenGL.
385-func (x *Display) PrepareGl() bool {385+func (x *Display) PrepareGl() (bool, error) {
386+ var cerr *glib.Error
386 387
387- return xDisplayPrepareGl(x.GoPointer())388+ cret := xDisplayPrepareGl(x.GoPointer())
389+ if cerr == nil {
390+ return cret, nil
391+ }
392+ return cret, cerr
388 393
389 }394 }
390 395
@@ -411,8 +416,8 @@ var xDisplaySupportsInputShapes func(uintptr) bool
411 // On modern displays, this value is always %TRUE.416 // On modern displays, this value is always %TRUE.
412 func (x *Display) SupportsInputShapes() bool {417 func (x *Display) SupportsInputShapes() bool {
413 418
414- return xDisplaySupportsInputShapes(x.GoPointer())419+ cret := xDisplaySupportsInputShapes(x.GoPointer())
415-420+ return cret
416 }421 }
417 422
418 var xDisplaySync func(uintptr)423 var xDisplaySync func(uintptr)
@@ -456,8 +461,8 @@ var xDisplayTranslateKey func(uintptr, uint, ModifierType, int, uint, int, int,
456 // virtualized test environments.461 // virtualized test environments.
457 func (x *Display) TranslateKey(KeycodeVar uint, StateVar ModifierType, GroupVar int, KeyvalVar uint, EffectiveGroupVar int, LevelVar int, ConsumedVar *ModifierType) bool {462 func (x *Display) TranslateKey(KeycodeVar uint, StateVar ModifierType, GroupVar int, KeyvalVar uint, EffectiveGroupVar int, LevelVar int, ConsumedVar *ModifierType) bool {
458 463
459- return xDisplayTranslateKey(x.GoPointer(), KeycodeVar, StateVar, GroupVar, KeyvalVar, EffectiveGroupVar, LevelVar, ConsumedVar)464+ cret := xDisplayTranslateKey(x.GoPointer(), KeycodeVar, StateVar, GroupVar, KeyvalVar, EffectiveGroupVar, LevelVar, ConsumedVar)
460-465+ return cret
461 }466 }
462 467
463 func (c *Display) GoPointer() uintptr {468 func (c *Display) GoPointer() uintptr {
M v4/gdk/gdkdisplaymanager.go +20 -22
@@ -111,18 +111,17 @@ var xDisplayManagerGetDefaultDisplay func(uintptr) uintptr
111 111
112 // Gets the default `GdkDisplay`.112 // Gets the default `GdkDisplay`.
113 func (x *DisplayManager) GetDefaultDisplay() *Display {113 func (x *DisplayManager) GetDefaultDisplay() *Display {
114+ var cls *Display
114 115
115- GetDefaultDisplayPtr := xDisplayManagerGetDefaultDisplay(x.GoPointer())116+ cret := xDisplayManagerGetDefaultDisplay(x.GoPointer())
116- if GetDefaultDisplayPtr == 0 {
117- return nil
118- }
119-
120- gobject.IncreaseRef(GetDefaultDisplayPtr)
121-
122- GetDefaultDisplayCls := &Display{}
123- GetDefaultDisplayCls.Ptr = GetDefaultDisplayPtr
124- return GetDefaultDisplayCls
125 117
118+ if cret == 0 {
119+ return cls
120+ }
121+ gobject.IncreaseRef(cret)
122+ cls = &Display{}
123+ cls.Ptr = cret
124+ return cls
126 }125 }
127 126
128 var xDisplayManagerListDisplays func(uintptr) *glib.SList127 var xDisplayManagerListDisplays func(uintptr) *glib.SList
@@ -130,26 +129,25 @@ var xDisplayManagerListDisplays func(uintptr) *glib.SList
130 // List all currently open displays.129 // List all currently open displays.
131 func (x *DisplayManager) ListDisplays() *glib.SList {130 func (x *DisplayManager) ListDisplays() *glib.SList {
132 131
133- return xDisplayManagerListDisplays(x.GoPointer())132+ cret := xDisplayManagerListDisplays(x.GoPointer())
134-133+ return cret
135 }134 }
136 135
137 var xDisplayManagerOpenDisplay func(uintptr, string) uintptr136 var xDisplayManagerOpenDisplay func(uintptr, string) uintptr
138 137
139 // Opens a display.138 // Opens a display.
140 func (x *DisplayManager) OpenDisplay(NameVar string) *Display {139 func (x *DisplayManager) OpenDisplay(NameVar string) *Display {
140+ var cls *Display
141 141
142- OpenDisplayPtr := xDisplayManagerOpenDisplay(x.GoPointer(), NameVar)142+ cret := xDisplayManagerOpenDisplay(x.GoPointer(), NameVar)
143- if OpenDisplayPtr == 0 {
144- return nil
145- }
146-
147- gobject.IncreaseRef(OpenDisplayPtr)
148-
149- OpenDisplayCls := &Display{}
150- OpenDisplayCls.Ptr = OpenDisplayPtr
151- return OpenDisplayCls
152 143
144+ if cret == 0 {
145+ return cls
146+ }
147+ gobject.IncreaseRef(cret)
148+ cls = &Display{}
149+ cls.Ptr = cret
150+ return cls
153 }151 }
154 152
155 var xDisplayManagerSetDefaultDisplay func(uintptr, uintptr)153 var xDisplayManagerSetDefaultDisplay func(uintptr, uintptr)
M v4/gdk/gdkdrag.go +53 -58
@@ -29,8 +29,8 @@ var xDragActionIsUnique func(DragAction) bool
29 // is returned.29 // is returned.
30 func DragActionIsUnique(ActionVar DragAction) bool {30 func DragActionIsUnique(ActionVar DragAction) bool {
31 31
32- return xDragActionIsUnique(ActionVar)32+ cret := xDragActionIsUnique(ActionVar)
33-33+ return cret
34 }34 }
35 35
36 // The `GdkDrag` object represents the source of an ongoing DND operation.36 // The `GdkDrag` object represents the source of an ongoing DND operation.
@@ -77,62 +77,59 @@ var xDragGetActions func(uintptr) DragAction
77 // Determines the bitmask of possible actions proposed by the source.77 // Determines the bitmask of possible actions proposed by the source.
78 func (x *Drag) GetActions() DragAction {78 func (x *Drag) GetActions() DragAction {
79 79
80- return xDragGetActions(x.GoPointer())80+ cret := xDragGetActions(x.GoPointer())
81-81+ return cret
82 }82 }
83 83
84 var xDragGetContent func(uintptr) uintptr84 var xDragGetContent func(uintptr) uintptr
85 85
86 // Returns the `GdkContentProvider` associated to the `GdkDrag` object.86 // Returns the `GdkContentProvider` associated to the `GdkDrag` object.
87 func (x *Drag) GetContent() *ContentProvider {87 func (x *Drag) GetContent() *ContentProvider {
88+ var cls *ContentProvider
88 89
89- GetContentPtr := xDragGetContent(x.GoPointer())90+ cret := xDragGetContent(x.GoPointer())
90- if GetContentPtr == 0 {
91- return nil
92- }
93-
94- gobject.IncreaseRef(GetContentPtr)
95-
96- GetContentCls := &ContentProvider{}
97- GetContentCls.Ptr = GetContentPtr
98- return GetContentCls
99 91
92+ if cret == 0 {
93+ return cls
94+ }
95+ gobject.IncreaseRef(cret)
96+ cls = &ContentProvider{}
97+ cls.Ptr = cret
98+ return cls
100 }99 }
101 100
102 var xDragGetDevice func(uintptr) uintptr101 var xDragGetDevice func(uintptr) uintptr
103 102
104 // Returns the `GdkDevice` associated to the `GdkDrag` object.103 // Returns the `GdkDevice` associated to the `GdkDrag` object.
105 func (x *Drag) GetDevice() *Device {104 func (x *Drag) GetDevice() *Device {
105+ var cls *Device
106 106
107- GetDevicePtr := xDragGetDevice(x.GoPointer())107+ cret := xDragGetDevice(x.GoPointer())
108- if GetDevicePtr == 0 {
109- return nil
110- }
111-
112- gobject.IncreaseRef(GetDevicePtr)
113-
114- GetDeviceCls := &Device{}
115- GetDeviceCls.Ptr = GetDevicePtr
116- return GetDeviceCls
117 108
109+ if cret == 0 {
110+ return cls
111+ }
112+ gobject.IncreaseRef(cret)
113+ cls = &Device{}
114+ cls.Ptr = cret
115+ return cls
118 }116 }
119 117
120 var xDragGetDisplay func(uintptr) uintptr118 var xDragGetDisplay func(uintptr) uintptr
121 119
122 // Gets the `GdkDisplay` that the drag object was created for.120 // Gets the `GdkDisplay` that the drag object was created for.
123 func (x *Drag) GetDisplay() *Display {121 func (x *Drag) GetDisplay() *Display {
122+ var cls *Display
124 123
125- GetDisplayPtr := xDragGetDisplay(x.GoPointer())124+ cret := xDragGetDisplay(x.GoPointer())
126- if GetDisplayPtr == 0 {
127- return nil
128- }
129-
130- gobject.IncreaseRef(GetDisplayPtr)
131-
132- GetDisplayCls := &Display{}
133- GetDisplayCls.Ptr = GetDisplayPtr
134- return GetDisplayCls
135 125
126+ if cret == 0 {
127+ return cls
128+ }
129+ gobject.IncreaseRef(cret)
130+ cls = &Display{}
131+ cls.Ptr = cret
132+ return cls
136 }133 }
137 134
138 var xDragGetDragSurface func(uintptr) uintptr135 var xDragGetDragSurface func(uintptr) uintptr
@@ -145,18 +142,17 @@ var xDragGetDragSurface func(uintptr) uintptr
145 // drag operation. The surface is owned by @drag and will be destroyed142 // drag operation. The surface is owned by @drag and will be destroyed
146 // when the drag operation is over.143 // when the drag operation is over.
147 func (x *Drag) GetDragSurface() *Surface {144 func (x *Drag) GetDragSurface() *Surface {
145+ var cls *Surface
148 146
149- GetDragSurfacePtr := xDragGetDragSurface(x.GoPointer())147+ cret := xDragGetDragSurface(x.GoPointer())
150- if GetDragSurfacePtr == 0 {
151- return nil
152- }
153-
154- gobject.IncreaseRef(GetDragSurfacePtr)
155-
156- GetDragSurfaceCls := &Surface{}
157- GetDragSurfaceCls.Ptr = GetDragSurfacePtr
158- return GetDragSurfaceCls
159 148
149+ if cret == 0 {
150+ return cls
151+ }
152+ gobject.IncreaseRef(cret)
153+ cls = &Surface{}
154+ cls.Ptr = cret
155+ return cls
160 }156 }
161 157
162 var xDragGetFormats func(uintptr) *ContentFormats158 var xDragGetFormats func(uintptr) *ContentFormats
@@ -164,8 +160,8 @@ var xDragGetFormats func(uintptr) *ContentFormats
164 // Retrieves the formats supported by this `GdkDrag` object.160 // Retrieves the formats supported by this `GdkDrag` object.
165 func (x *Drag) GetFormats() *ContentFormats {161 func (x *Drag) GetFormats() *ContentFormats {
166 162
167- return xDragGetFormats(x.GoPointer())163+ cret := xDragGetFormats(x.GoPointer())
168-164+ return cret
169 }165 }
170 166
171 var xDragGetSelectedAction func(uintptr) DragAction167 var xDragGetSelectedAction func(uintptr) DragAction
@@ -173,26 +169,25 @@ var xDragGetSelectedAction func(uintptr) DragAction
173 // Determines the action chosen by the drag destination.169 // Determines the action chosen by the drag destination.
174 func (x *Drag) GetSelectedAction() DragAction {170 func (x *Drag) GetSelectedAction() DragAction {
175 171
176- return xDragGetSelectedAction(x.GoPointer())172+ cret := xDragGetSelectedAction(x.GoPointer())
177-173+ return cret
178 }174 }
179 175
180 var xDragGetSurface func(uintptr) uintptr176 var xDragGetSurface func(uintptr) uintptr
181 177
182 // Returns the `GdkSurface` where the drag originates.178 // Returns the `GdkSurface` where the drag originates.
183 func (x *Drag) GetSurface() *Surface {179 func (x *Drag) GetSurface() *Surface {
180+ var cls *Surface
184 181
185- GetSurfacePtr := xDragGetSurface(x.GoPointer())182+ cret := xDragGetSurface(x.GoPointer())
186- if GetSurfacePtr == 0 {
187- return nil
188- }
189-
190- gobject.IncreaseRef(GetSurfacePtr)
191-
192- GetSurfaceCls := &Surface{}
193- GetSurfaceCls.Ptr = GetSurfacePtr
194- return GetSurfaceCls
195 183
184+ if cret == 0 {
185+ return cls
186+ }
187+ gobject.IncreaseRef(cret)
188+ cls = &Surface{}
189+ cls.Ptr = cret
190+ return cls
196 }191 }
197 192
198 var xDragSetHotspot func(uintptr, int, int)193 var xDragSetHotspot func(uintptr, int, int)
M v4/gdk/gdkdragsurface.go +2 -2
@@ -31,8 +31,8 @@ func (x *DragSurfaceBase) SetGoPointer(ptr uintptr) {
31 // Present @drag_surface.31 // Present @drag_surface.
32 func (x *DragSurfaceBase) Present(WidthVar int, HeightVar int) bool {32 func (x *DragSurfaceBase) Present(WidthVar int, HeightVar int) bool {
33 33
34- return XGdkDragSurfacePresent(x.GoPointer(), WidthVar, HeightVar)34+ cret := XGdkDragSurfacePresent(x.GoPointer(), WidthVar, HeightVar)
35-35+ return cret
36 }36 }
37 37
38 var XGdkDragSurfacePresent func(uintptr, int, int) bool38 var XGdkDragSurfacePresent func(uintptr, int, int) bool
M v4/gdk/gdkdrawcontext.go +22 -24
@@ -79,18 +79,17 @@ var xDrawContextGetDisplay func(uintptr) uintptr
79 79
80 // Retrieves the `GdkDisplay` the @context is created for80 // Retrieves the `GdkDisplay` the @context is created for
81 func (x *DrawContext) GetDisplay() *Display {81 func (x *DrawContext) GetDisplay() *Display {
82+ var cls *Display
82 83
83- GetDisplayPtr := xDrawContextGetDisplay(x.GoPointer())84+ cret := xDrawContextGetDisplay(x.GoPointer())
84- if GetDisplayPtr == 0 {
85- return nil
86- }
87-
88- gobject.IncreaseRef(GetDisplayPtr)
89-
90- GetDisplayCls := &Display{}
91- GetDisplayCls.Ptr = GetDisplayPtr
92- return GetDisplayCls
93 85
86+ if cret == 0 {
87+ return cls
88+ }
89+ gobject.IncreaseRef(cret)
90+ cls = &Display{}
91+ cls.Ptr = cret
92+ return cls
94 }93 }
95 94
96 var xDrawContextGetFrameRegion func(uintptr) *cairo.Region95 var xDrawContextGetFrameRegion func(uintptr) *cairo.Region
@@ -105,26 +104,25 @@ var xDrawContextGetFrameRegion func(uintptr) *cairo.Region
105 // and [method@Gdk.DrawContext.end_frame], %NULL will be returned.104 // and [method@Gdk.DrawContext.end_frame], %NULL will be returned.
106 func (x *DrawContext) GetFrameRegion() *cairo.Region {105 func (x *DrawContext) GetFrameRegion() *cairo.Region {
107 106
108- return xDrawContextGetFrameRegion(x.GoPointer())107+ cret := xDrawContextGetFrameRegion(x.GoPointer())
109-108+ return cret
110 }109 }
111 110
112 var xDrawContextGetSurface func(uintptr) uintptr111 var xDrawContextGetSurface func(uintptr) uintptr
113 112
114 // Retrieves the surface that @context is bound to.113 // Retrieves the surface that @context is bound to.
115 func (x *DrawContext) GetSurface() *Surface {114 func (x *DrawContext) GetSurface() *Surface {
115+ var cls *Surface
116 116
117- GetSurfacePtr := xDrawContextGetSurface(x.GoPointer())117+ cret := xDrawContextGetSurface(x.GoPointer())
118- if GetSurfacePtr == 0 {
119- return nil
120- }
121-
122- gobject.IncreaseRef(GetSurfacePtr)
123-
124- GetSurfaceCls := &Surface{}
125- GetSurfaceCls.Ptr = GetSurfacePtr
126- return GetSurfaceCls
127 118
119+ if cret == 0 {
120+ return cls
121+ }
122+ gobject.IncreaseRef(cret)
123+ cls = &Surface{}
124+ cls.Ptr = cret
125+ return cls
128 }126 }
129 127
130 var xDrawContextIsInFrame func(uintptr) bool128 var xDrawContextIsInFrame func(uintptr) bool
@@ -136,8 +134,8 @@ var xDrawContextIsInFrame func(uintptr) bool
136 // may be effecting the contents of the @context's surface.134 // may be effecting the contents of the @context's surface.
137 func (x *DrawContext) IsInFrame() bool {135 func (x *DrawContext) IsInFrame() bool {
138 136
139- return xDrawContextIsInFrame(x.GoPointer())137+ cret := xDrawContextIsInFrame(x.GoPointer())
140-138+ return cret
141 }139 }
142 140
143 func (c *DrawContext) GoPointer() uintptr {141 func (c *DrawContext) GoPointer() uintptr {
M v4/gdk/gdkdrop.go +63 -56
@@ -5,6 +5,7 @@ import (
5 "github.com/jwijenbergh/purego"5 "github.com/jwijenbergh/purego"
6 "github.com/jwijenbergh/puregotk/internal/core"6 "github.com/jwijenbergh/puregotk/internal/core"
7 "github.com/jwijenbergh/puregotk/v4/gio"7 "github.com/jwijenbergh/puregotk/v4/gio"
8+ "github.com/jwijenbergh/puregotk/v4/glib"
8 "github.com/jwijenbergh/puregotk/v4/gobject"9 "github.com/jwijenbergh/puregotk/v4/gobject"
9 )10 )
10 11
@@ -62,44 +63,42 @@ var xDropGetActions func(uintptr) DragAction
62 // side will not change this value anymore once a drop has started.63 // side will not change this value anymore once a drop has started.
63 func (x *Drop) GetActions() DragAction {64 func (x *Drop) GetActions() DragAction {
64 65
65- return xDropGetActions(x.GoPointer())66+ cret := xDropGetActions(x.GoPointer())
66-67+ return cret
67 }68 }
68 69
69 var xDropGetDevice func(uintptr) uintptr70 var xDropGetDevice func(uintptr) uintptr
70 71
71 // Returns the `GdkDevice` performing the drop.72 // Returns the `GdkDevice` performing the drop.
72 func (x *Drop) GetDevice() *Device {73 func (x *Drop) GetDevice() *Device {
74+ var cls *Device
73 75
74- GetDevicePtr := xDropGetDevice(x.GoPointer())76+ cret := xDropGetDevice(x.GoPointer())
75- if GetDevicePtr == 0 {
76- return nil
77- }
78-
79- gobject.IncreaseRef(GetDevicePtr)
80-
81- GetDeviceCls := &Device{}
82- GetDeviceCls.Ptr = GetDevicePtr
83- return GetDeviceCls
84 77
78+ if cret == 0 {
79+ return cls
80+ }
81+ gobject.IncreaseRef(cret)
82+ cls = &Device{}
83+ cls.Ptr = cret
84+ return cls
85 }85 }
86 86
87 var xDropGetDisplay func(uintptr) uintptr87 var xDropGetDisplay func(uintptr) uintptr
88 88
89 // Gets the `GdkDisplay` that @self was created for.89 // Gets the `GdkDisplay` that @self was created for.
90 func (x *Drop) GetDisplay() *Display {90 func (x *Drop) GetDisplay() *Display {
91+ var cls *Display
91 92
92- GetDisplayPtr := xDropGetDisplay(x.GoPointer())93+ cret := xDropGetDisplay(x.GoPointer())
93- if GetDisplayPtr == 0 {
94- return nil
95- }
96-
97- gobject.IncreaseRef(GetDisplayPtr)
98-
99- GetDisplayCls := &Display{}
100- GetDisplayCls.Ptr = GetDisplayPtr
101- return GetDisplayCls
102 94
95+ if cret == 0 {
96+ return cls
97+ }
98+ gobject.IncreaseRef(cret)
99+ cls = &Display{}
100+ cls.Ptr = cret
101+ return cls
103 }102 }
104 103
105 var xDropGetDrag func(uintptr) uintptr104 var xDropGetDrag func(uintptr) uintptr
@@ -109,18 +108,17 @@ var xDropGetDrag func(uintptr) uintptr
109 //108 //
110 // If it is not, %NULL is returned.109 // If it is not, %NULL is returned.
111 func (x *Drop) GetDrag() *Drag {110 func (x *Drop) GetDrag() *Drag {
111+ var cls *Drag
112 112
113- GetDragPtr := xDropGetDrag(x.GoPointer())113+ cret := xDropGetDrag(x.GoPointer())
114- if GetDragPtr == 0 {
115- return nil
116- }
117-
118- gobject.IncreaseRef(GetDragPtr)
119-
120- GetDragCls := &Drag{}
121- GetDragCls.Ptr = GetDragPtr
122- return GetDragCls
123 114
115+ if cret == 0 {
116+ return cls
117+ }
118+ gobject.IncreaseRef(cret)
119+ cls = &Drag{}
120+ cls.Ptr = cret
121+ return cls
124 }122 }
125 123
126 var xDropGetFormats func(uintptr) *ContentFormats124 var xDropGetFormats func(uintptr) *ContentFormats
@@ -129,26 +127,25 @@ var xDropGetFormats func(uintptr) *ContentFormats
129 // to be read in.127 // to be read in.
130 func (x *Drop) GetFormats() *ContentFormats {128 func (x *Drop) GetFormats() *ContentFormats {
131 129
132- return xDropGetFormats(x.GoPointer())130+ cret := xDropGetFormats(x.GoPointer())
133-131+ return cret
134 }132 }
135 133
136 var xDropGetSurface func(uintptr) uintptr134 var xDropGetSurface func(uintptr) uintptr
137 135
138 // Returns the `GdkSurface` performing the drop.136 // Returns the `GdkSurface` performing the drop.
139 func (x *Drop) GetSurface() *Surface {137 func (x *Drop) GetSurface() *Surface {
138+ var cls *Surface
140 139
141- GetSurfacePtr := xDropGetSurface(x.GoPointer())140+ cret := xDropGetSurface(x.GoPointer())
142- if GetSurfacePtr == 0 {
143- return nil
144- }
145-
146- gobject.IncreaseRef(GetSurfacePtr)
147-
148- GetSurfaceCls := &Surface{}
149- GetSurfaceCls.Ptr = GetSurfacePtr
150- return GetSurfaceCls
151 141
142+ if cret == 0 {
143+ return cls
144+ }
145+ gobject.IncreaseRef(cret)
146+ cls = &Surface{}
147+ cls.Ptr = cret
148+ return cls
152 }149 }
153 150
154 var xDropReadAsync func(uintptr, uintptr, int, uintptr, uintptr, uintptr)151 var xDropReadAsync func(uintptr, uintptr, int, uintptr, uintptr, uintptr)
@@ -161,7 +158,7 @@ func (x *Drop) ReadAsync(MimeTypesVar uintptr, IoPriorityVar int, CancellableVar
161 158
162 }159 }
163 160
164-var xDropReadFinish func(uintptr, uintptr, string) uintptr161+var xDropReadFinish func(uintptr, uintptr, string, **glib.Error) uintptr
165 162
166 // Finishes an async drop read operation.163 // Finishes an async drop read operation.
167 //164 //
@@ -171,16 +168,21 @@ var xDropReadFinish func(uintptr, uintptr, string) uintptr
171 // g_input_stream_read_bytes_async().168 // g_input_stream_read_bytes_async().
172 //169 //
173 // See [method@Gdk.Drop.read_async].170 // See [method@Gdk.Drop.read_async].
174-func (x *Drop) ReadFinish(ResultVar gio.AsyncResult, OutMimeTypeVar string) *gio.InputStream {171+func (x *Drop) ReadFinish(ResultVar gio.AsyncResult, OutMimeTypeVar string) (*gio.InputStream, error) {
172+ var cls *gio.InputStream
173+ var cerr *glib.Error
175 174
176- ReadFinishPtr := xDropReadFinish(x.GoPointer(), ResultVar.GoPointer(), OutMimeTypeVar)175+ cret := xDropReadFinish(x.GoPointer(), ResultVar.GoPointer(), OutMimeTypeVar, &cerr)
177- if ReadFinishPtr == 0 {
178- return nil
179- }
180 176
181- ReadFinishCls := &gio.InputStream{}177+ if cret == 0 {
182- ReadFinishCls.Ptr = ReadFinishPtr178+ return cls, cerr
183- return ReadFinishCls179+ }
180+ cls = &gio.InputStream{}
181+ cls.Ptr = cret
182+ if cerr == nil {
183+ return cls, nil
184+ }
185+ return cls, cerr
184 186
185 }187 }
186 188
@@ -202,14 +204,19 @@ func (x *Drop) ReadValueAsync(TypeVar []interface{}, IoPriorityVar int, Cancella
202 204
203 }205 }
204 206
205-var xDropReadValueFinish func(uintptr, uintptr) *gobject.Value207+var xDropReadValueFinish func(uintptr, uintptr, **glib.Error) *gobject.Value
206 208
207 // Finishes an async drop read.209 // Finishes an async drop read.
208 //210 //
209 // See [method@Gdk.Drop.read_value_async].211 // See [method@Gdk.Drop.read_value_async].
210-func (x *Drop) ReadValueFinish(ResultVar gio.AsyncResult) *gobject.Value {212+func (x *Drop) ReadValueFinish(ResultVar gio.AsyncResult) (*gobject.Value, error) {
213+ var cerr *glib.Error
211 214
212- return xDropReadValueFinish(x.GoPointer(), ResultVar.GoPointer())215+ cret := xDropReadValueFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
216+ if cerr == nil {
217+ return cret, nil
218+ }
219+ return cret, cerr
213 220
214 }221 }
215 222
M v4/gdk/gdkevents.go +149 -156
@@ -253,8 +253,8 @@ var xEventsGetAngle func(uintptr, uintptr, float64) bool
253 // If not, this function returns %FALSE.253 // If not, this function returns %FALSE.
254 func EventsGetAngle(Event1Var *Event, Event2Var *Event, AngleVar float64) bool {254 func EventsGetAngle(Event1Var *Event, Event2Var *Event, AngleVar float64) bool {
255 255
256- return xEventsGetAngle(Event1Var.GoPointer(), Event2Var.GoPointer(), AngleVar)256+ cret := xEventsGetAngle(Event1Var.GoPointer(), Event2Var.GoPointer(), AngleVar)
257-257+ return cret
258 }258 }
259 259
260 var xEventsGetCenter func(uintptr, uintptr, float64, float64) bool260 var xEventsGetCenter func(uintptr, uintptr, float64, float64) bool
@@ -265,8 +265,8 @@ var xEventsGetCenter func(uintptr, uintptr, float64, float64) bool
265 // If not, this function returns %FALSE.265 // If not, this function returns %FALSE.
266 func EventsGetCenter(Event1Var *Event, Event2Var *Event, XVar float64, YVar float64) bool {266 func EventsGetCenter(Event1Var *Event, Event2Var *Event, XVar float64, YVar float64) bool {
267 267
268- return xEventsGetCenter(Event1Var.GoPointer(), Event2Var.GoPointer(), XVar, YVar)268+ cret := xEventsGetCenter(Event1Var.GoPointer(), Event2Var.GoPointer(), XVar, YVar)
269-269+ return cret
270 }270 }
271 271
272 var xEventsGetDistance func(uintptr, uintptr, float64) bool272 var xEventsGetDistance func(uintptr, uintptr, float64) bool
@@ -277,8 +277,8 @@ var xEventsGetDistance func(uintptr, uintptr, float64) bool
277 // If not, this function returns %FALSE.277 // If not, this function returns %FALSE.
278 func EventsGetDistance(Event1Var *Event, Event2Var *Event, DistanceVar float64) bool {278 func EventsGetDistance(Event1Var *Event, Event2Var *Event, DistanceVar float64) bool {
279 279
280- return xEventsGetDistance(Event1Var.GoPointer(), Event2Var.GoPointer(), DistanceVar)280+ cret := xEventsGetDistance(Event1Var.GoPointer(), Event2Var.GoPointer(), DistanceVar)
281-281+ return cret
282 }282 }
283 283
284 // An event related to a button on a pointer device.284 // An event related to a button on a pointer device.
@@ -297,8 +297,8 @@ var xButtonEventGetButton func(uintptr) uint
297 // Extract the button number from a button event.297 // Extract the button number from a button event.
298 func (x *ButtonEvent) GetButton() uint {298 func (x *ButtonEvent) GetButton() uint {
299 299
300- return xButtonEventGetButton(x.GoPointer())300+ cret := xButtonEventGetButton(x.GoPointer())
301-301+ return cret
302 }302 }
303 303
304 func (c *ButtonEvent) GoPointer() uintptr {304 func (c *ButtonEvent) GoPointer() uintptr {
@@ -325,8 +325,8 @@ var xCrossingEventGetDetail func(uintptr) NotifyType
325 // Extracts the notify detail from a crossing event.325 // Extracts the notify detail from a crossing event.
326 func (x *CrossingEvent) GetDetail() NotifyType {326 func (x *CrossingEvent) GetDetail() NotifyType {
327 327
328- return xCrossingEventGetDetail(x.GoPointer())328+ cret := xCrossingEventGetDetail(x.GoPointer())
329-329+ return cret
330 }330 }
331 331
332 var xCrossingEventGetFocus func(uintptr) bool332 var xCrossingEventGetFocus func(uintptr) bool
@@ -334,8 +334,8 @@ var xCrossingEventGetFocus func(uintptr) bool
334 // Checks if the @event surface is the focus surface.334 // Checks if the @event surface is the focus surface.
335 func (x *CrossingEvent) GetFocus() bool {335 func (x *CrossingEvent) GetFocus() bool {
336 336
337- return xCrossingEventGetFocus(x.GoPointer())337+ cret := xCrossingEventGetFocus(x.GoPointer())
338-338+ return cret
339 }339 }
340 340
341 var xCrossingEventGetMode func(uintptr) CrossingMode341 var xCrossingEventGetMode func(uintptr) CrossingMode
@@ -343,8 +343,8 @@ var xCrossingEventGetMode func(uintptr) CrossingMode
343 // Extracts the crossing mode from a crossing event.343 // Extracts the crossing mode from a crossing event.
344 func (x *CrossingEvent) GetMode() CrossingMode {344 func (x *CrossingEvent) GetMode() CrossingMode {
345 345
346- return xCrossingEventGetMode(x.GoPointer())346+ cret := xCrossingEventGetMode(x.GoPointer())
347-347+ return cret
348 }348 }
349 349
350 func (c *CrossingEvent) GoPointer() uintptr {350 func (c *CrossingEvent) GoPointer() uintptr {
@@ -370,18 +370,17 @@ var xDNDEventGetDrop func(uintptr) uintptr
370 370
371 // Gets the `GdkDrop` object from a DND event.371 // Gets the `GdkDrop` object from a DND event.
372 func (x *DNDEvent) GetDrop() *Drop {372 func (x *DNDEvent) GetDrop() *Drop {
373+ var cls *Drop
373 374
374- GetDropPtr := xDNDEventGetDrop(x.GoPointer())375+ cret := xDNDEventGetDrop(x.GoPointer())
375- if GetDropPtr == 0 {
376- return nil
377- }
378-
379- gobject.IncreaseRef(GetDropPtr)
380-
381- GetDropCls := &Drop{}
382- GetDropCls.Ptr = GetDropPtr
383- return GetDropCls
384 376
377+ if cret == 0 {
378+ return cls
379+ }
380+ gobject.IncreaseRef(cret)
381+ cls = &Drop{}
382+ cls.Ptr = cret
383+ return cls
385 }384 }
386 385
387 func (c *DNDEvent) GoPointer() uintptr {386 func (c *DNDEvent) GoPointer() uintptr {
@@ -439,8 +438,8 @@ var xEventGetAngle func(uintptr, uintptr, float64) bool
439 // If not, this function returns %FALSE.438 // If not, this function returns %FALSE.
440 func (x *Event) GetAngle(Event2Var *Event, AngleVar float64) bool {439 func (x *Event) GetAngle(Event2Var *Event, AngleVar float64) bool {
441 440
442- return xEventGetAngle(x.GoPointer(), Event2Var.GoPointer(), AngleVar)441+ cret := xEventGetAngle(x.GoPointer(), Event2Var.GoPointer(), AngleVar)
443-442+ return cret
444 }443 }
445 444
446 var xEventGetCenter func(uintptr, uintptr, float64, float64) bool445 var xEventGetCenter func(uintptr, uintptr, float64, float64) bool
@@ -451,8 +450,8 @@ var xEventGetCenter func(uintptr, uintptr, float64, float64) bool
451 // If not, this function returns %FALSE.450 // If not, this function returns %FALSE.
452 func (x *Event) GetCenter(Event2Var *Event, XVar float64, YVar float64) bool {451 func (x *Event) GetCenter(Event2Var *Event, XVar float64, YVar float64) bool {
453 452
454- return xEventGetCenter(x.GoPointer(), Event2Var.GoPointer(), XVar, YVar)453+ cret := xEventGetCenter(x.GoPointer(), Event2Var.GoPointer(), XVar, YVar)
455-454+ return cret
456 }455 }
457 456
458 var xEventGetDistance func(uintptr, uintptr, float64) bool457 var xEventGetDistance func(uintptr, uintptr, float64) bool
@@ -463,8 +462,8 @@ var xEventGetDistance func(uintptr, uintptr, float64) bool
463 // If not, this function returns %FALSE.462 // If not, this function returns %FALSE.
464 func (x *Event) GetDistance(Event2Var *Event, DistanceVar float64) bool {463 func (x *Event) GetDistance(Event2Var *Event, DistanceVar float64) bool {
465 464
466- return xEventGetDistance(x.GoPointer(), Event2Var.GoPointer(), DistanceVar)465+ cret := xEventGetDistance(x.GoPointer(), Event2Var.GoPointer(), DistanceVar)
467-466+ return cret
468 }467 }
469 468
470 var xEventGetAxes func(uintptr, uintptr, uint) bool469 var xEventGetAxes func(uintptr, uintptr, uint) bool
@@ -475,8 +474,8 @@ var xEventGetAxes func(uintptr, uintptr, uint) bool
475 // on the device tool returned by [method@Gdk.Event.get_device_tool].474 // on the device tool returned by [method@Gdk.Event.get_device_tool].
476 func (x *Event) GetAxes(AxesVar uintptr, NAxesVar uint) bool {475 func (x *Event) GetAxes(AxesVar uintptr, NAxesVar uint) bool {
477 476
478- return xEventGetAxes(x.GoPointer(), AxesVar, NAxesVar)477+ cret := xEventGetAxes(x.GoPointer(), AxesVar, NAxesVar)
479-478+ return cret
480 }479 }
481 480
482 var xEventGetAxis func(uintptr, AxisUse, float64) bool481 var xEventGetAxis func(uintptr, AxisUse, float64) bool
@@ -488,26 +487,25 @@ var xEventGetAxis func(uintptr, AxisUse, float64) bool
488 // on the device tool returned by [method@Gdk.Event.get_device_tool].487 // on the device tool returned by [method@Gdk.Event.get_device_tool].
489 func (x *Event) GetAxis(AxisUseVar AxisUse, ValueVar float64) bool {488 func (x *Event) GetAxis(AxisUseVar AxisUse, ValueVar float64) bool {
490 489
491- return xEventGetAxis(x.GoPointer(), AxisUseVar, ValueVar)490+ cret := xEventGetAxis(x.GoPointer(), AxisUseVar, ValueVar)
492-491+ return cret
493 }492 }
494 493
495 var xEventGetDevice func(uintptr) uintptr494 var xEventGetDevice func(uintptr) uintptr
496 495
497 // Returns the device of an event.496 // Returns the device of an event.
498 func (x *Event) GetDevice() *Device {497 func (x *Event) GetDevice() *Device {
498+ var cls *Device
499 499
500- GetDevicePtr := xEventGetDevice(x.GoPointer())500+ cret := xEventGetDevice(x.GoPointer())
501- if GetDevicePtr == 0 {
502- return nil
503- }
504-
505- gobject.IncreaseRef(GetDevicePtr)
506-
507- GetDeviceCls := &Device{}
508- GetDeviceCls.Ptr = GetDevicePtr
509- return GetDeviceCls
510 501
502+ if cret == 0 {
503+ return cls
504+ }
505+ gobject.IncreaseRef(cret)
506+ cls = &Device{}
507+ cls.Ptr = cret
508+ return cls
511 }509 }
512 510
513 var xEventGetDeviceTool func(uintptr) uintptr511 var xEventGetDeviceTool func(uintptr) uintptr
@@ -523,36 +521,34 @@ var xEventGetDeviceTool func(uintptr) uintptr
523 // the application lifetime, if settings must be stored521 // the application lifetime, if settings must be stored
524 // persistently across runs, see [method@Gdk.DeviceTool.get_serial].522 // persistently across runs, see [method@Gdk.DeviceTool.get_serial].
525 func (x *Event) GetDeviceTool() *DeviceTool {523 func (x *Event) GetDeviceTool() *DeviceTool {
524+ var cls *DeviceTool
526 525
527- GetDeviceToolPtr := xEventGetDeviceTool(x.GoPointer())526+ cret := xEventGetDeviceTool(x.GoPointer())
528- if GetDeviceToolPtr == 0 {
529- return nil
530- }
531-
532- gobject.IncreaseRef(GetDeviceToolPtr)
533-
534- GetDeviceToolCls := &DeviceTool{}
535- GetDeviceToolCls.Ptr = GetDeviceToolPtr
536- return GetDeviceToolCls
537 527
528+ if cret == 0 {
529+ return cls
530+ }
531+ gobject.IncreaseRef(cret)
532+ cls = &DeviceTool{}
533+ cls.Ptr = cret
534+ return cls
538 }535 }
539 536
540 var xEventGetDisplay func(uintptr) uintptr537 var xEventGetDisplay func(uintptr) uintptr
541 538
542 // Retrieves the display associated to the @event.539 // Retrieves the display associated to the @event.
543 func (x *Event) GetDisplay() *Display {540 func (x *Event) GetDisplay() *Display {
541+ var cls *Display
544 542
545- GetDisplayPtr := xEventGetDisplay(x.GoPointer())543+ cret := xEventGetDisplay(x.GoPointer())
546- if GetDisplayPtr == 0 {
547- return nil
548- }
549-
550- gobject.IncreaseRef(GetDisplayPtr)
551-
552- GetDisplayCls := &Display{}
553- GetDisplayCls.Ptr = GetDisplayPtr
554- return GetDisplayCls
555 544
545+ if cret == 0 {
546+ return cls
547+ }
548+ gobject.IncreaseRef(cret)
549+ cls = &Display{}
550+ cls.Ptr = cret
551+ return cls
556 }552 }
557 553
558 var xEventGetEventSequence func(uintptr) *EventSequence554 var xEventGetEventSequence func(uintptr) *EventSequence
@@ -563,8 +559,8 @@ var xEventGetEventSequence func(uintptr) *EventSequence
563 // events typically don't have event sequence information.559 // events typically don't have event sequence information.
564 func (x *Event) GetEventSequence() *EventSequence {560 func (x *Event) GetEventSequence() *EventSequence {
565 561
566- return xEventGetEventSequence(x.GoPointer())562+ cret := xEventGetEventSequence(x.GoPointer())
567-563+ return cret
568 }564 }
569 565
570 var xEventGetEventType func(uintptr) EventType566 var xEventGetEventType func(uintptr) EventType
@@ -572,8 +568,8 @@ var xEventGetEventType func(uintptr) EventType
572 // Retrieves the type of the event.568 // Retrieves the type of the event.
573 func (x *Event) GetEventType() EventType {569 func (x *Event) GetEventType() EventType {
574 570
575- return xEventGetEventType(x.GoPointer())571+ cret := xEventGetEventType(x.GoPointer())
576-572+ return cret
577 }573 }
578 574
579 var xEventGetHistory func(uintptr, uint) uintptr575 var xEventGetHistory func(uintptr, uint) uintptr
@@ -589,8 +585,8 @@ var xEventGetHistory func(uintptr, uint) uintptr
589 // has a tool.585 // has a tool.
590 func (x *Event) GetHistory(OutNCoordsVar uint) uintptr {586 func (x *Event) GetHistory(OutNCoordsVar uint) uintptr {
591 587
592- return xEventGetHistory(x.GoPointer(), OutNCoordsVar)588+ cret := xEventGetHistory(x.GoPointer(), OutNCoordsVar)
593-589+ return cret
594 }590 }
595 591
596 var xEventGetModifierState func(uintptr) ModifierType592 var xEventGetModifierState func(uintptr) ModifierType
@@ -598,8 +594,8 @@ var xEventGetModifierState func(uintptr) ModifierType
598 // Returns the modifier state field of an event.594 // Returns the modifier state field of an event.
599 func (x *Event) GetModifierState() ModifierType {595 func (x *Event) GetModifierState() ModifierType {
600 596
601- return xEventGetModifierState(x.GoPointer())597+ cret := xEventGetModifierState(x.GoPointer())
602-598+ return cret
603 }599 }
604 600
605 var xEventGetPointerEmulated func(uintptr) bool601 var xEventGetPointerEmulated func(uintptr) bool
@@ -609,8 +605,8 @@ var xEventGetPointerEmulated func(uintptr) bool
609 // Emulated pointer events typically originate from a touch events.605 // Emulated pointer events typically originate from a touch events.
610 func (x *Event) GetPointerEmulated() bool {606 func (x *Event) GetPointerEmulated() bool {
611 607
612- return xEventGetPointerEmulated(x.GoPointer())608+ cret := xEventGetPointerEmulated(x.GoPointer())
613-609+ return cret
614 }610 }
615 611
616 var xEventGetPosition func(uintptr, float64, float64) bool612 var xEventGetPosition func(uintptr, float64, float64) bool
@@ -618,44 +614,42 @@ var xEventGetPosition func(uintptr, float64, float64) bool
618 // Extract the event surface relative x/y coordinates from an event.614 // Extract the event surface relative x/y coordinates from an event.
619 func (x *Event) GetPosition(XVar float64, YVar float64) bool {615 func (x *Event) GetPosition(XVar float64, YVar float64) bool {
620 616
621- return xEventGetPosition(x.GoPointer(), XVar, YVar)617+ cret := xEventGetPosition(x.GoPointer(), XVar, YVar)
622-618+ return cret
623 }619 }
624 620
625 var xEventGetSeat func(uintptr) uintptr621 var xEventGetSeat func(uintptr) uintptr
626 622
627 // Returns the seat that originated the event.623 // Returns the seat that originated the event.
628 func (x *Event) GetSeat() *Seat {624 func (x *Event) GetSeat() *Seat {
625+ var cls *Seat
629 626
630- GetSeatPtr := xEventGetSeat(x.GoPointer())627+ cret := xEventGetSeat(x.GoPointer())
631- if GetSeatPtr == 0 {
632- return nil
633- }
634-
635- gobject.IncreaseRef(GetSeatPtr)
636-
637- GetSeatCls := &Seat{}
638- GetSeatCls.Ptr = GetSeatPtr
639- return GetSeatCls
640 628
629+ if cret == 0 {
630+ return cls
631+ }
632+ gobject.IncreaseRef(cret)
633+ cls = &Seat{}
634+ cls.Ptr = cret
635+ return cls
641 }636 }
642 637
643 var xEventGetSurface func(uintptr) uintptr638 var xEventGetSurface func(uintptr) uintptr
644 639
645 // Extracts the surface associated with an event.640 // Extracts the surface associated with an event.
646 func (x *Event) GetSurface() *Surface {641 func (x *Event) GetSurface() *Surface {
642+ var cls *Surface
647 643
648- GetSurfacePtr := xEventGetSurface(x.GoPointer())644+ cret := xEventGetSurface(x.GoPointer())
649- if GetSurfacePtr == 0 {
650- return nil
651- }
652-
653- gobject.IncreaseRef(GetSurfacePtr)
654-
655- GetSurfaceCls := &Surface{}
656- GetSurfaceCls.Ptr = GetSurfacePtr
657- return GetSurfaceCls
658 645
646+ if cret == 0 {
647+ return cls
648+ }
649+ gobject.IncreaseRef(cret)
650+ cls = &Surface{}
651+ cls.Ptr = cret
652+ return cls
659 }653 }
660 654
661 var xEventGetTime func(uintptr) uint32655 var xEventGetTime func(uintptr) uint32
@@ -666,24 +660,24 @@ var xEventGetTime func(uintptr) uint32
666 // returns %GDK_CURRENT_TIME.660 // returns %GDK_CURRENT_TIME.
667 func (x *Event) GetTime() uint32 {661 func (x *Event) GetTime() uint32 {
668 662
669- return xEventGetTime(x.GoPointer())663+ cret := xEventGetTime(x.GoPointer())
670-664+ return cret
671 }665 }
672 666
673 var xEventRef func(uintptr) uintptr667 var xEventRef func(uintptr) uintptr
674 668
675 // Increase the ref count of @event.669 // Increase the ref count of @event.
676 func (x *Event) Ref() *Event {670 func (x *Event) Ref() *Event {
671+ var cls *Event
677 672
678- RefPtr := xEventRef(x.GoPointer())673+ cret := xEventRef(x.GoPointer())
679- if RefPtr == 0 {
680- return nil
681- }
682-
683- RefCls := &Event{}
684- RefCls.Ptr = RefPtr
685- return RefCls
686 674
675+ if cret == 0 {
676+ return cls
677+ }
678+ cls = &Event{}
679+ cls.Ptr = cret
680+ return cls
687 }681 }
688 682
689 var xEventTriggersContextMenu func(uintptr) bool683 var xEventTriggersContextMenu func(uintptr) bool
@@ -697,8 +691,8 @@ var xEventTriggersContextMenu func(uintptr) bool
697 // event->button == %GDK_BUTTON_SECONDARY.691 // event->button == %GDK_BUTTON_SECONDARY.
698 func (x *Event) TriggersContextMenu() bool {692 func (x *Event) TriggersContextMenu() bool {
699 693
700- return xEventTriggersContextMenu(x.GoPointer())694+ cret := xEventTriggersContextMenu(x.GoPointer())
701-695+ return cret
702 }696 }
703 697
704 var xEventUnref func(uintptr)698 var xEventUnref func(uintptr)
@@ -737,8 +731,8 @@ var xFocusEventGetIn func(uintptr) bool
737 // leaving the surface.731 // leaving the surface.
738 func (x *FocusEvent) GetIn() bool {732 func (x *FocusEvent) GetIn() bool {
739 733
740- return xFocusEventGetIn(x.GoPointer())734+ cret := xFocusEventGetIn(x.GoPointer())
741-735+ return cret
742 }736 }
743 737
744 func (c *FocusEvent) GoPointer() uintptr {738 func (c *FocusEvent) GoPointer() uintptr {
@@ -764,18 +758,17 @@ var xGrabBrokenEventGetGrabSurface func(uintptr) uintptr
764 758
765 // Extracts the grab surface from a grab broken event.759 // Extracts the grab surface from a grab broken event.
766 func (x *GrabBrokenEvent) GetGrabSurface() *Surface {760 func (x *GrabBrokenEvent) GetGrabSurface() *Surface {
761+ var cls *Surface
767 762
768- GetGrabSurfacePtr := xGrabBrokenEventGetGrabSurface(x.GoPointer())763+ cret := xGrabBrokenEventGetGrabSurface(x.GoPointer())
769- if GetGrabSurfacePtr == 0 {
770- return nil
771- }
772-
773- gobject.IncreaseRef(GetGrabSurfacePtr)
774-
775- GetGrabSurfaceCls := &Surface{}
776- GetGrabSurfaceCls.Ptr = GetGrabSurfacePtr
777- return GetGrabSurfaceCls
778 764
765+ if cret == 0 {
766+ return cls
767+ }
768+ gobject.IncreaseRef(cret)
769+ cls = &Surface{}
770+ cls.Ptr = cret
771+ return cls
779 }772 }
780 773
781 var xGrabBrokenEventGetImplicit func(uintptr) bool774 var xGrabBrokenEventGetImplicit func(uintptr) bool
@@ -783,8 +776,8 @@ var xGrabBrokenEventGetImplicit func(uintptr) bool
783 // Checks whether the grab broken event is for an implicit grab.776 // Checks whether the grab broken event is for an implicit grab.
784 func (x *GrabBrokenEvent) GetImplicit() bool {777 func (x *GrabBrokenEvent) GetImplicit() bool {
785 778
786- return xGrabBrokenEventGetImplicit(x.GoPointer())779+ cret := xGrabBrokenEventGetImplicit(x.GoPointer())
787-780+ return cret
788 }781 }
789 782
790 func (c *GrabBrokenEvent) GoPointer() uintptr {783 func (c *GrabBrokenEvent) GoPointer() uintptr {
@@ -811,8 +804,8 @@ var xKeyEventGetConsumedModifiers func(uintptr) ModifierType
811 // Extracts the consumed modifiers from a key event.804 // Extracts the consumed modifiers from a key event.
812 func (x *KeyEvent) GetConsumedModifiers() ModifierType {805 func (x *KeyEvent) GetConsumedModifiers() ModifierType {
813 806
814- return xKeyEventGetConsumedModifiers(x.GoPointer())807+ cret := xKeyEventGetConsumedModifiers(x.GoPointer())
815-808+ return cret
816 }809 }
817 810
818 var xKeyEventGetKeycode func(uintptr) uint811 var xKeyEventGetKeycode func(uintptr) uint
@@ -820,8 +813,8 @@ var xKeyEventGetKeycode func(uintptr) uint
820 // Extracts the keycode from a key event.813 // Extracts the keycode from a key event.
821 func (x *KeyEvent) GetKeycode() uint {814 func (x *KeyEvent) GetKeycode() uint {
822 815
823- return xKeyEventGetKeycode(x.GoPointer())816+ cret := xKeyEventGetKeycode(x.GoPointer())
824-817+ return cret
825 }818 }
826 819
827 var xKeyEventGetKeyval func(uintptr) uint820 var xKeyEventGetKeyval func(uintptr) uint
@@ -829,8 +822,8 @@ var xKeyEventGetKeyval func(uintptr) uint
829 // Extracts the keyval from a key event.822 // Extracts the keyval from a key event.
830 func (x *KeyEvent) GetKeyval() uint {823 func (x *KeyEvent) GetKeyval() uint {
831 824
832- return xKeyEventGetKeyval(x.GoPointer())825+ cret := xKeyEventGetKeyval(x.GoPointer())
833-826+ return cret
834 }827 }
835 828
836 var xKeyEventGetLayout func(uintptr) uint829 var xKeyEventGetLayout func(uintptr) uint
@@ -838,8 +831,8 @@ var xKeyEventGetLayout func(uintptr) uint
838 // Extracts the layout from a key event.831 // Extracts the layout from a key event.
839 func (x *KeyEvent) GetLayout() uint {832 func (x *KeyEvent) GetLayout() uint {
840 833
841- return xKeyEventGetLayout(x.GoPointer())834+ cret := xKeyEventGetLayout(x.GoPointer())
842-835+ return cret
843 }836 }
844 837
845 var xKeyEventGetLevel func(uintptr) uint838 var xKeyEventGetLevel func(uintptr) uint
@@ -847,8 +840,8 @@ var xKeyEventGetLevel func(uintptr) uint
847 // Extracts the shift level from a key event.840 // Extracts the shift level from a key event.
848 func (x *KeyEvent) GetLevel() uint {841 func (x *KeyEvent) GetLevel() uint {
849 842
850- return xKeyEventGetLevel(x.GoPointer())843+ cret := xKeyEventGetLevel(x.GoPointer())
851-844+ return cret
852 }845 }
853 846
854 var xKeyEventGetMatch func(uintptr, uint, *ModifierType) bool847 var xKeyEventGetMatch func(uintptr, uint, *ModifierType) bool
@@ -859,8 +852,8 @@ var xKeyEventGetMatch func(uintptr, uint, *ModifierType) bool
859 // See [method@Gdk.KeyEvent.matches].852 // See [method@Gdk.KeyEvent.matches].
860 func (x *KeyEvent) GetMatch(KeyvalVar uint, ModifiersVar *ModifierType) bool {853 func (x *KeyEvent) GetMatch(KeyvalVar uint, ModifiersVar *ModifierType) bool {
861 854
862- return xKeyEventGetMatch(x.GoPointer(), KeyvalVar, ModifiersVar)855+ cret := xKeyEventGetMatch(x.GoPointer(), KeyvalVar, ModifiersVar)
863-856+ return cret
864 }857 }
865 858
866 var xKeyEventIsModifier func(uintptr) bool859 var xKeyEventIsModifier func(uintptr) bool
@@ -868,8 +861,8 @@ var xKeyEventIsModifier func(uintptr) bool
868 // Extracts whether the key event is for a modifier key.861 // Extracts whether the key event is for a modifier key.
869 func (x *KeyEvent) IsModifier() bool {862 func (x *KeyEvent) IsModifier() bool {
870 863
871- return xKeyEventIsModifier(x.GoPointer())864+ cret := xKeyEventIsModifier(x.GoPointer())
872-865+ return cret
873 }866 }
874 867
875 var xKeyEventMatches func(uintptr, uint, ModifierType) KeyMatch868 var xKeyEventMatches func(uintptr, uint, ModifierType) KeyMatch
@@ -884,8 +877,8 @@ var xKeyEventMatches func(uintptr, uint, ModifierType) KeyMatch
884 // Note that we ignore Caps Lock for matching.877 // Note that we ignore Caps Lock for matching.
885 func (x *KeyEvent) Matches(KeyvalVar uint, ModifiersVar ModifierType) KeyMatch {878 func (x *KeyEvent) Matches(KeyvalVar uint, ModifiersVar ModifierType) KeyMatch {
886 879
887- return xKeyEventMatches(x.GoPointer(), KeyvalVar, ModifiersVar)880+ cret := xKeyEventMatches(x.GoPointer(), KeyvalVar, ModifiersVar)
888-881+ return cret
889 }882 }
890 883
891 func (c *KeyEvent) GoPointer() uintptr {884 func (c *KeyEvent) GoPointer() uintptr {
@@ -941,8 +934,8 @@ var xPadEventGetButton func(uintptr) uint
941 // a pad event.934 // a pad event.
942 func (x *PadEvent) GetButton() uint {935 func (x *PadEvent) GetButton() uint {
943 936
944- return xPadEventGetButton(x.GoPointer())937+ cret := xPadEventGetButton(x.GoPointer())
945-938+ return cret
946 }939 }
947 940
948 var xPadEventGetGroupMode func(uintptr, uint, uint)941 var xPadEventGetGroupMode func(uintptr, uint, uint)
@@ -1012,8 +1005,8 @@ var xScrollEventGetDirection func(uintptr) ScrollDirection
1012 // Extracts the direction of a scroll event.1005 // Extracts the direction of a scroll event.
1013 func (x *ScrollEvent) GetDirection() ScrollDirection {1006 func (x *ScrollEvent) GetDirection() ScrollDirection {
1014 1007
1015- return xScrollEventGetDirection(x.GoPointer())1008+ cret := xScrollEventGetDirection(x.GoPointer())
1016-1009+ return cret
1017 }1010 }
1018 1011
1019 var xScrollEventGetUnit func(uintptr) ScrollUnit1012 var xScrollEventGetUnit func(uintptr) ScrollUnit
@@ -1024,8 +1017,8 @@ var xScrollEventGetUnit func(uintptr) ScrollUnit
1024 // %GDK_SCROLL_SMOOTH.1017 // %GDK_SCROLL_SMOOTH.
1025 func (x *ScrollEvent) GetUnit() ScrollUnit {1018 func (x *ScrollEvent) GetUnit() ScrollUnit {
1026 1019
1027- return xScrollEventGetUnit(x.GoPointer())1020+ cret := xScrollEventGetUnit(x.GoPointer())
1028-1021+ return cret
1029 }1022 }
1030 1023
1031 var xScrollEventIsStop func(uintptr) bool1024 var xScrollEventIsStop func(uintptr) bool
@@ -1041,8 +1034,8 @@ var xScrollEventIsStop func(uintptr) bool
1041 // Stop scroll events always have a delta of 0/0.1034 // Stop scroll events always have a delta of 0/0.
1042 func (x *ScrollEvent) IsStop() bool {1035 func (x *ScrollEvent) IsStop() bool {
1043 1036
1044- return xScrollEventIsStop(x.GoPointer())1037+ cret := xScrollEventIsStop(x.GoPointer())
1045-1038+ return cret
1046 }1039 }
1047 1040
1048 func (c *ScrollEvent) GoPointer() uintptr {1041 func (c *ScrollEvent) GoPointer() uintptr {
@@ -1069,8 +1062,8 @@ var xTouchEventGetEmulatingPointer func(uintptr) bool
1069 // Extracts whether a touch event is emulating a pointer event.1062 // Extracts whether a touch event is emulating a pointer event.
1070 func (x *TouchEvent) GetEmulatingPointer() bool {1063 func (x *TouchEvent) GetEmulatingPointer() bool {
1071 1064
1072- return xTouchEventGetEmulatingPointer(x.GoPointer())1065+ cret := xTouchEventGetEmulatingPointer(x.GoPointer())
1073-1066+ return cret
1074 }1067 }
1075 1068
1076 func (c *TouchEvent) GoPointer() uintptr {1069 func (c *TouchEvent) GoPointer() uintptr {
@@ -1111,8 +1104,8 @@ var xTouchpadEventGetGesturePhase func(uintptr) TouchpadGesturePhase
1111 // Extracts the touchpad gesture phase from a touchpad event.1104 // Extracts the touchpad gesture phase from a touchpad event.
1112 func (x *TouchpadEvent) GetGesturePhase() TouchpadGesturePhase {1105 func (x *TouchpadEvent) GetGesturePhase() TouchpadGesturePhase {
1113 1106
1114- return xTouchpadEventGetGesturePhase(x.GoPointer())1107+ cret := xTouchpadEventGetGesturePhase(x.GoPointer())
1115-1108+ return cret
1116 }1109 }
1117 1110
1118 var xTouchpadEventGetNFingers func(uintptr) uint1111 var xTouchpadEventGetNFingers func(uintptr) uint
@@ -1120,8 +1113,8 @@ var xTouchpadEventGetNFingers func(uintptr) uint
1120 // Extracts the number of fingers from a touchpad event.1113 // Extracts the number of fingers from a touchpad event.
1121 func (x *TouchpadEvent) GetNFingers() uint {1114 func (x *TouchpadEvent) GetNFingers() uint {
1122 1115
1123- return xTouchpadEventGetNFingers(x.GoPointer())1116+ cret := xTouchpadEventGetNFingers(x.GoPointer())
1124-1117+ return cret
1125 }1118 }
1126 1119
1127 var xTouchpadEventGetPinchAngleDelta func(uintptr) float641120 var xTouchpadEventGetPinchAngleDelta func(uintptr) float64
@@ -1129,8 +1122,8 @@ var xTouchpadEventGetPinchAngleDelta func(uintptr) float64
1129 // Extracts the angle delta from a touchpad pinch event.1122 // Extracts the angle delta from a touchpad pinch event.
1130 func (x *TouchpadEvent) GetPinchAngleDelta() float64 {1123 func (x *TouchpadEvent) GetPinchAngleDelta() float64 {
1131 1124
1132- return xTouchpadEventGetPinchAngleDelta(x.GoPointer())1125+ cret := xTouchpadEventGetPinchAngleDelta(x.GoPointer())
1133-1126+ return cret
1134 }1127 }
1135 1128
1136 var xTouchpadEventGetPinchScale func(uintptr) float641129 var xTouchpadEventGetPinchScale func(uintptr) float64
@@ -1138,8 +1131,8 @@ var xTouchpadEventGetPinchScale func(uintptr) float64
1138 // Extracts the scale from a touchpad pinch event.1131 // Extracts the scale from a touchpad pinch event.
1139 func (x *TouchpadEvent) GetPinchScale() float64 {1132 func (x *TouchpadEvent) GetPinchScale() float64 {
1140 1133
1141- return xTouchpadEventGetPinchScale(x.GoPointer())1134+ cret := xTouchpadEventGetPinchScale(x.GoPointer())
1142-1135+ return cret
1143 }1136 }
1144 1137
1145 func (c *TouchpadEvent) GoPointer() uintptr {1138 func (c *TouchpadEvent) GoPointer() uintptr {
M v4/gdk/gdkframeclock.go +12 -12
@@ -112,8 +112,8 @@ var xFrameClockGetCurrentTimings func(uintptr) *FrameTimings
112 // Gets the frame timings for the current frame.112 // Gets the frame timings for the current frame.
113 func (x *FrameClock) GetCurrentTimings() *FrameTimings {113 func (x *FrameClock) GetCurrentTimings() *FrameTimings {
114 114
115- return xFrameClockGetCurrentTimings(x.GoPointer())115+ cret := xFrameClockGetCurrentTimings(x.GoPointer())
116-116+ return cret
117 }117 }
118 118
119 var xFrameClockGetFps func(uintptr) float64119 var xFrameClockGetFps func(uintptr) float64
@@ -122,8 +122,8 @@ var xFrameClockGetFps func(uintptr) float64
122 // frame timings of @frame_clock.122 // frame timings of @frame_clock.
123 func (x *FrameClock) GetFps() float64 {123 func (x *FrameClock) GetFps() float64 {
124 124
125- return xFrameClockGetFps(x.GoPointer())125+ cret := xFrameClockGetFps(x.GoPointer())
126-126+ return cret
127 }127 }
128 128
129 var xFrameClockGetFrameCounter func(uintptr) int64129 var xFrameClockGetFrameCounter func(uintptr) int64
@@ -132,8 +132,8 @@ var xFrameClockGetFrameCounter func(uintptr) int64
132 // each frame drawn.132 // each frame drawn.
133 func (x *FrameClock) GetFrameCounter() int64 {133 func (x *FrameClock) GetFrameCounter() int64 {
134 134
135- return xFrameClockGetFrameCounter(x.GoPointer())135+ cret := xFrameClockGetFrameCounter(x.GoPointer())
136-136+ return cret
137 }137 }
138 138
139 var xFrameClockGetFrameTime func(uintptr) int64139 var xFrameClockGetFrameTime func(uintptr) int64
@@ -147,8 +147,8 @@ var xFrameClockGetFrameTime func(uintptr) int64
147 // time.147 // time.
148 func (x *FrameClock) GetFrameTime() int64 {148 func (x *FrameClock) GetFrameTime() int64 {
149 149
150- return xFrameClockGetFrameTime(x.GoPointer())150+ cret := xFrameClockGetFrameTime(x.GoPointer())
151-151+ return cret
152 }152 }
153 153
154 var xFrameClockGetHistoryStart func(uintptr) int64154 var xFrameClockGetHistoryStart func(uintptr) int64
@@ -163,8 +163,8 @@ var xFrameClockGetHistoryStart func(uintptr) int64
163 // [method@Gdk.FrameClock.get_frame_counter], inclusive.163 // [method@Gdk.FrameClock.get_frame_counter], inclusive.
164 func (x *FrameClock) GetHistoryStart() int64 {164 func (x *FrameClock) GetHistoryStart() int64 {
165 165
166- return xFrameClockGetHistoryStart(x.GoPointer())166+ cret := xFrameClockGetHistoryStart(x.GoPointer())
167-167+ return cret
168 }168 }
169 169
170 var xFrameClockGetRefreshInfo func(uintptr, int64, int64, int64)170 var xFrameClockGetRefreshInfo func(uintptr, int64, int64, int64)
@@ -192,8 +192,8 @@ var xFrameClockGetTimings func(uintptr, int64) *FrameTimings
192 // [method@Gdk.FrameClock.get_history_start].192 // [method@Gdk.FrameClock.get_history_start].
193 func (x *FrameClock) GetTimings(FrameCounterVar int64) *FrameTimings {193 func (x *FrameClock) GetTimings(FrameCounterVar int64) *FrameTimings {
194 194
195- return xFrameClockGetTimings(x.GoPointer(), FrameCounterVar)195+ cret := xFrameClockGetTimings(x.GoPointer(), FrameCounterVar)
196-196+ return cret
197 }197 }
198 198
199 var xFrameClockRequestPhase func(uintptr, FrameClockPhase)199 var xFrameClockRequestPhase func(uintptr, FrameClockPhase)
M v4/gdk/gdkglcontext.go +49 -46
@@ -4,6 +4,7 @@ package gdk
4 import (4 import (
5 "github.com/jwijenbergh/purego"5 "github.com/jwijenbergh/purego"
6 "github.com/jwijenbergh/puregotk/internal/core"6 "github.com/jwijenbergh/puregotk/internal/core"
7+ "github.com/jwijenbergh/puregotk/v4/glib"
7 "github.com/jwijenbergh/puregotk/v4/gobject"8 "github.com/jwijenbergh/puregotk/v4/gobject"
8 )9 )
9 10
@@ -82,8 +83,8 @@ var xGLContextGetAllowedApis func(uintptr) GLAPI
82 // Gets the allowed APIs set via gdk_gl_context_set_allowed_apis().83 // Gets the allowed APIs set via gdk_gl_context_set_allowed_apis().
83 func (x *GLContext) GetAllowedApis() GLAPI {84 func (x *GLContext) GetAllowedApis() GLAPI {
84 85
85- return xGLContextGetAllowedApis(x.GoPointer())86+ cret := xGLContextGetAllowedApis(x.GoPointer())
86-87+ return cret
87 }88 }
88 89
89 var xGLContextGetApi func(uintptr) GLAPI90 var xGLContextGetApi func(uintptr) GLAPI
@@ -93,8 +94,8 @@ var xGLContextGetApi func(uintptr) GLAPI
93 // If the renderer has not been realized yet, 0 is returned.94 // If the renderer has not been realized yet, 0 is returned.
94 func (x *GLContext) GetApi() GLAPI {95 func (x *GLContext) GetApi() GLAPI {
95 96
96- return xGLContextGetApi(x.GoPointer())97+ cret := xGLContextGetApi(x.GoPointer())
97-98+ return cret
98 }99 }
99 100
100 var xGLContextGetDebugEnabled func(uintptr) bool101 var xGLContextGetDebugEnabled func(uintptr) bool
@@ -104,26 +105,25 @@ var xGLContextGetDebugEnabled func(uintptr) bool
104 // See [method@Gdk.GLContext.set_debug_enabled].105 // See [method@Gdk.GLContext.set_debug_enabled].
105 func (x *GLContext) GetDebugEnabled() bool {106 func (x *GLContext) GetDebugEnabled() bool {
106 107
107- return xGLContextGetDebugEnabled(x.GoPointer())108+ cret := xGLContextGetDebugEnabled(x.GoPointer())
108-109+ return cret
109 }110 }
110 111
111 var xGLContextGetDisplay func(uintptr) uintptr112 var xGLContextGetDisplay func(uintptr) uintptr
112 113
113 // Retrieves the display the @context is created for114 // Retrieves the display the @context is created for
114 func (x *GLContext) GetDisplay() *Display {115 func (x *GLContext) GetDisplay() *Display {
116+ var cls *Display
115 117
116- GetDisplayPtr := xGLContextGetDisplay(x.GoPointer())118+ cret := xGLContextGetDisplay(x.GoPointer())
117- if GetDisplayPtr == 0 {
118- return nil
119- }
120-
121- gobject.IncreaseRef(GetDisplayPtr)
122-
123- GetDisplayCls := &Display{}
124- GetDisplayCls.Ptr = GetDisplayPtr
125- return GetDisplayCls
126 119
120+ if cret == 0 {
121+ return cls
122+ }
123+ gobject.IncreaseRef(cret)
124+ cls = &Display{}
125+ cls.Ptr = cret
126+ return cls
127 }127 }
128 128
129 var xGLContextGetForwardCompatible func(uintptr) bool129 var xGLContextGetForwardCompatible func(uintptr) bool
@@ -133,8 +133,8 @@ var xGLContextGetForwardCompatible func(uintptr) bool
133 // See [method@Gdk.GLContext.set_forward_compatible].133 // See [method@Gdk.GLContext.set_forward_compatible].
134 func (x *GLContext) GetForwardCompatible() bool {134 func (x *GLContext) GetForwardCompatible() bool {
135 135
136- return xGLContextGetForwardCompatible(x.GoPointer())136+ cret := xGLContextGetForwardCompatible(x.GoPointer())
137-137+ return cret
138 }138 }
139 139
140 var xGLContextGetRequiredVersion func(uintptr, int, int)140 var xGLContextGetRequiredVersion func(uintptr, int, int)
@@ -158,36 +158,34 @@ var xGLContextGetSharedContext func(uintptr) uintptr
158 // As many contexts can share data now and no single shared context exists158 // As many contexts can share data now and no single shared context exists
159 // anymore, this function has been deprecated and now always returns %NULL.159 // anymore, this function has been deprecated and now always returns %NULL.
160 func (x *GLContext) GetSharedContext() *GLContext {160 func (x *GLContext) GetSharedContext() *GLContext {
161+ var cls *GLContext
161 162
162- GetSharedContextPtr := xGLContextGetSharedContext(x.GoPointer())163+ cret := xGLContextGetSharedContext(x.GoPointer())
163- if GetSharedContextPtr == 0 {
164- return nil
165- }
166-
167- gobject.IncreaseRef(GetSharedContextPtr)
168-
169- GetSharedContextCls := &GLContext{}
170- GetSharedContextCls.Ptr = GetSharedContextPtr
171- return GetSharedContextCls
172 164
165+ if cret == 0 {
166+ return cls
167+ }
168+ gobject.IncreaseRef(cret)
169+ cls = &GLContext{}
170+ cls.Ptr = cret
171+ return cls
173 }172 }
174 173
175 var xGLContextGetSurface func(uintptr) uintptr174 var xGLContextGetSurface func(uintptr) uintptr
176 175
177 // Retrieves the surface used by the @context.176 // Retrieves the surface used by the @context.
178 func (x *GLContext) GetSurface() *Surface {177 func (x *GLContext) GetSurface() *Surface {
178+ var cls *Surface
179 179
180- GetSurfacePtr := xGLContextGetSurface(x.GoPointer())180+ cret := xGLContextGetSurface(x.GoPointer())
181- if GetSurfacePtr == 0 {
182- return nil
183- }
184-
185- gobject.IncreaseRef(GetSurfacePtr)
186-
187- GetSurfaceCls := &Surface{}
188- GetSurfaceCls.Ptr = GetSurfacePtr
189- return GetSurfaceCls
190 181
182+ if cret == 0 {
183+ return cls
184+ }
185+ gobject.IncreaseRef(cret)
186+ cls = &Surface{}
187+ cls.Ptr = cret
188+ return cls
191 }189 }
192 190
193 var xGLContextGetUseEs func(uintptr) bool191 var xGLContextGetUseEs func(uintptr) bool
@@ -195,8 +193,8 @@ var xGLContextGetUseEs func(uintptr) bool
195 // Checks whether the @context is using an OpenGL or OpenGL ES profile.193 // Checks whether the @context is using an OpenGL or OpenGL ES profile.
196 func (x *GLContext) GetUseEs() bool {194 func (x *GLContext) GetUseEs() bool {
197 195
198- return xGLContextGetUseEs(x.GoPointer())196+ cret := xGLContextGetUseEs(x.GoPointer())
199-197+ return cret
200 }198 }
201 199
202 var xGLContextGetVersion func(uintptr, int, int)200 var xGLContextGetVersion func(uintptr, int, int)
@@ -233,8 +231,8 @@ var xGLContextIsLegacy func(uintptr) bool
233 // kind of shader programs to load.231 // kind of shader programs to load.
234 func (x *GLContext) IsLegacy() bool {232 func (x *GLContext) IsLegacy() bool {
235 233
236- return xGLContextIsLegacy(x.GoPointer())234+ cret := xGLContextIsLegacy(x.GoPointer())
237-235+ return cret
238 }236 }
239 237
240 var xGLContextIsShared func(uintptr, uintptr) bool238 var xGLContextIsShared func(uintptr, uintptr) bool
@@ -253,8 +251,8 @@ var xGLContextIsShared func(uintptr, uintptr) bool
253 // is not, this function will return %FALSE.251 // is not, this function will return %FALSE.
254 func (x *GLContext) IsShared(OtherVar *GLContext) bool {252 func (x *GLContext) IsShared(OtherVar *GLContext) bool {
255 253
256- return xGLContextIsShared(x.GoPointer(), OtherVar.GoPointer())254+ cret := xGLContextIsShared(x.GoPointer(), OtherVar.GoPointer())
257-255+ return cret
258 }256 }
259 257
260 var xGLContextMakeCurrent func(uintptr)258 var xGLContextMakeCurrent func(uintptr)
@@ -271,9 +269,14 @@ var xGLContextRealize func(uintptr) bool
271 // Realizes the given `GdkGLContext`.269 // Realizes the given `GdkGLContext`.
272 //270 //
273 // It is safe to call this function on a realized `GdkGLContext`.271 // It is safe to call this function on a realized `GdkGLContext`.
274-func (x *GLContext) Realize() bool {272+func (x *GLContext) Realize() (bool, error) {
273+ var cerr *glib.Error
275 274
276- return xGLContextRealize(x.GoPointer())275+ cret := xGLContextRealize(x.GoPointer())
276+ if cerr == nil {
277+ return cret, nil
278+ }
279+ return cret, cerr
277 280
278 }281 }
279 282
M v4/gdk/gdkgltexture.go +57 -45
@@ -30,14 +30,16 @@ var xNewGLTexture func(uintptr, uint, int, int, uintptr, uintptr) uintptr
30 // which will happen when the GdkTexture object is finalized, or due to30 // which will happen when the GdkTexture object is finalized, or due to
31 // an explicit call of [method@Gdk.GLTexture.release].31 // an explicit call of [method@Gdk.GLTexture.release].
32 func NewGLTexture(ContextVar *GLContext, IdVar uint, WidthVar int, HeightVar int, DestroyVar glib.DestroyNotify, DataVar uintptr) *GLTexture {32 func NewGLTexture(ContextVar *GLContext, IdVar uint, WidthVar int, HeightVar int, DestroyVar glib.DestroyNotify, DataVar uintptr) *GLTexture {
33- NewGLTexturePtr := xNewGLTexture(ContextVar.GoPointer(), IdVar, WidthVar, HeightVar, purego.NewCallback(DestroyVar), DataVar)33+ var cls *GLTexture
34- if NewGLTexturePtr == 0 {34+
35- return nil35+ cret := xNewGLTexture(ContextVar.GoPointer(), IdVar, WidthVar, HeightVar, purego.NewCallback(DestroyVar), DataVar)
36- }
37 36
38- NewGLTextureCls := &GLTexture{}37+ if cret == 0 {
39- NewGLTextureCls.Ptr = NewGLTexturePtr38+ return cls
40- return NewGLTextureCls39+ }
40+ cls = &GLTexture{}
41+ cls.Ptr = cret
42+ return cls
41 }43 }
42 44
43 var xGLTextureRelease func(uintptr)45 var xGLTextureRelease func(uintptr)
@@ -84,16 +86,16 @@ func (x *GLTexture) ComputeConcreteSize(SpecifiedWidthVar float64, SpecifiedHeig
84 //86 //
85 // If the @paintable is already immutable, it will return itself.87 // If the @paintable is already immutable, it will return itself.
86 func (x *GLTexture) GetCurrentImage() *PaintableBase {88 func (x *GLTexture) GetCurrentImage() *PaintableBase {
89+ var cls *PaintableBase
87 90
88- GetCurrentImagePtr := XGdkPaintableGetCurrentImage(x.GoPointer())91+ cret := XGdkPaintableGetCurrentImage(x.GoPointer())
89- if GetCurrentImagePtr == 0 {
90- return nil
91- }
92-
93- GetCurrentImageCls := &PaintableBase{}
94- GetCurrentImageCls.Ptr = GetCurrentImagePtr
95- return GetCurrentImageCls
96 92
93+ if cret == 0 {
94+ return cls
95+ }
96+ cls = &PaintableBase{}
97+ cls.Ptr = cret
98+ return cls
97 }99 }
98 100
99 // Get flags for the paintable.101 // Get flags for the paintable.
@@ -103,8 +105,8 @@ func (x *GLTexture) GetCurrentImage() *PaintableBase {
103 // See [flags@Gdk.PaintableFlags] for the flags and what they mean.105 // See [flags@Gdk.PaintableFlags] for the flags and what they mean.
104 func (x *GLTexture) GetFlags() PaintableFlags {106 func (x *GLTexture) GetFlags() PaintableFlags {
105 107
106- return XGdkPaintableGetFlags(x.GoPointer())108+ cret := XGdkPaintableGetFlags(x.GoPointer())
107-109+ return cret
108 }110 }
109 111
110 // Gets the preferred aspect ratio the @paintable would like to be displayed at.112 // Gets the preferred aspect ratio the @paintable would like to be displayed at.
@@ -126,8 +128,8 @@ func (x *GLTexture) GetFlags() PaintableFlags {
126 // it returns 0. Negative values are never returned.128 // it returns 0. Negative values are never returned.
127 func (x *GLTexture) GetIntrinsicAspectRatio() float64 {129 func (x *GLTexture) GetIntrinsicAspectRatio() float64 {
128 130
129- return XGdkPaintableGetIntrinsicAspectRatio(x.GoPointer())131+ cret := XGdkPaintableGetIntrinsicAspectRatio(x.GoPointer())
130-132+ return cret
131 }133 }
132 134
133 // Gets the preferred height the @paintable would like to be displayed at.135 // Gets the preferred height the @paintable would like to be displayed at.
@@ -142,8 +144,8 @@ func (x *GLTexture) GetIntrinsicAspectRatio() float64 {
142 // Negative values are never returned.144 // Negative values are never returned.
143 func (x *GLTexture) GetIntrinsicHeight() int {145 func (x *GLTexture) GetIntrinsicHeight() int {
144 146
145- return XGdkPaintableGetIntrinsicHeight(x.GoPointer())147+ cret := XGdkPaintableGetIntrinsicHeight(x.GoPointer())
146-148+ return cret
147 }149 }
148 150
149 // Gets the preferred width the @paintable would like to be displayed at.151 // Gets the preferred width the @paintable would like to be displayed at.
@@ -158,8 +160,8 @@ func (x *GLTexture) GetIntrinsicHeight() int {
158 // Negative values are never returned.160 // Negative values are never returned.
159 func (x *GLTexture) GetIntrinsicWidth() int {161 func (x *GLTexture) GetIntrinsicWidth() int {
160 162
161- return XGdkPaintableGetIntrinsicWidth(x.GoPointer())163+ cret := XGdkPaintableGetIntrinsicWidth(x.GoPointer())
162-164+ return cret
163 }165 }
164 166
165 // Called by implementations of `GdkPaintable` to invalidate their contents.167 // Called by implementations of `GdkPaintable` to invalidate their contents.
@@ -208,8 +210,8 @@ func (x *GLTexture) Snapshot(SnapshotVar *Snapshot, WidthVar float64, HeightVar
208 // Checks if two icons are equal.210 // Checks if two icons are equal.
209 func (x *GLTexture) Equal(Icon2Var gio.Icon) bool {211 func (x *GLTexture) Equal(Icon2Var gio.Icon) bool {
210 212
211- return gio.XGIconEqual(x.GoPointer(), Icon2Var.GoPointer())213+ cret := gio.XGIconEqual(x.GoPointer(), Icon2Var.GoPointer())
212-214+ return cret
213 }215 }
214 216
215 // Serializes a #GIcon into a #GVariant. An equivalent #GIcon can be retrieved217 // Serializes a #GIcon into a #GVariant. An equivalent #GIcon can be retrieved
@@ -219,8 +221,8 @@ func (x *GLTexture) Equal(Icon2Var gio.Icon) bool {
219 // (as opposed to over the network), and within the same file system namespace.221 // (as opposed to over the network), and within the same file system namespace.
220 func (x *GLTexture) Serialize() *glib.Variant {222 func (x *GLTexture) Serialize() *glib.Variant {
221 223
222- return gio.XGIconSerialize(x.GoPointer())224+ cret := gio.XGIconSerialize(x.GoPointer())
223-225+ return cret
224 }226 }
225 227
226 // Generates a textual representation of @icon that can be used for228 // Generates a textual representation of @icon that can be used for
@@ -241,22 +243,27 @@ func (x *GLTexture) Serialize() *glib.Variant {
241 // the encoding is simply the name (such as `network-server`).243 // the encoding is simply the name (such as `network-server`).
242 func (x *GLTexture) ToString() string {244 func (x *GLTexture) ToString() string {
243 245
244- return gio.XGIconToString(x.GoPointer())246+ cret := gio.XGIconToString(x.GoPointer())
245-247+ return cret
246 }248 }
247 249
248 // Loads a loadable icon. For the asynchronous version of this function,250 // Loads a loadable icon. For the asynchronous version of this function,
249 // see g_loadable_icon_load_async().251 // see g_loadable_icon_load_async().
250-func (x *GLTexture) Load(SizeVar int, TypeVar string, CancellableVar *gio.Cancellable) *gio.InputStream {252+func (x *GLTexture) Load(SizeVar int, TypeVar string, CancellableVar *gio.Cancellable) (*gio.InputStream, error) {
253+ var cls *gio.InputStream
254+ var cerr *glib.Error
251 255
252- LoadPtr := gio.XGLoadableIconLoad(x.GoPointer(), SizeVar, TypeVar, CancellableVar.GoPointer())256+ cret := gio.XGLoadableIconLoad(x.GoPointer(), SizeVar, TypeVar, CancellableVar.GoPointer(), &cerr)
253- if LoadPtr == 0 {
254- return nil
255- }
256 257
257- LoadCls := &gio.InputStream{}258+ if cret == 0 {
258- LoadCls.Ptr = LoadPtr259+ return cls, cerr
259- return LoadCls260+ }
261+ cls = &gio.InputStream{}
262+ cls.Ptr = cret
263+ if cerr == nil {
264+ return cls, nil
265+ }
266+ return cls, cerr
260 267
261 }268 }
262 269
@@ -270,16 +277,21 @@ func (x *GLTexture) LoadAsync(SizeVar int, CancellableVar *gio.Cancellable, Call
270 }277 }
271 278
272 // Finishes an asynchronous icon load started in g_loadable_icon_load_async().279 // Finishes an asynchronous icon load started in g_loadable_icon_load_async().
273-func (x *GLTexture) LoadFinish(ResVar gio.AsyncResult, TypeVar string) *gio.InputStream {280+func (x *GLTexture) LoadFinish(ResVar gio.AsyncResult, TypeVar string) (*gio.InputStream, error) {
281+ var cls *gio.InputStream
282+ var cerr *glib.Error
274 283
275- LoadFinishPtr := gio.XGLoadableIconLoadFinish(x.GoPointer(), ResVar.GoPointer(), TypeVar)284+ cret := gio.XGLoadableIconLoadFinish(x.GoPointer(), ResVar.GoPointer(), TypeVar, &cerr)
276- if LoadFinishPtr == 0 {
277- return nil
278- }
279 285
280- LoadFinishCls := &gio.InputStream{}286+ if cret == 0 {
281- LoadFinishCls.Ptr = LoadFinishPtr287+ return cls, cerr
282- return LoadFinishCls288+ }
289+ cls = &gio.InputStream{}
290+ cls.Ptr = cret
291+ if cerr == nil {
292+ return cls, nil
293+ }
294+ return cls, cerr
283 295
284 }296 }
285 297
M v4/gdk/gdkkeys.go +16 -16
@@ -26,8 +26,8 @@ var xKeyvalFromName func(string) uint
26 // but without the leading “GDK_KEY_”.26 // but without the leading “GDK_KEY_”.
27 func KeyvalFromName(KeyvalNameVar string) uint {27 func KeyvalFromName(KeyvalNameVar string) uint {
28 28
29- return xKeyvalFromName(KeyvalNameVar)29+ cret := xKeyvalFromName(KeyvalNameVar)
30-30+ return cret
31 }31 }
32 32
33 var xKeyvalIsLower func(uint) bool33 var xKeyvalIsLower func(uint) bool
@@ -35,8 +35,8 @@ var xKeyvalIsLower func(uint) bool
35 // Returns %TRUE if the given key value is in lower case.35 // Returns %TRUE if the given key value is in lower case.
36 func KeyvalIsLower(KeyvalVar uint) bool {36 func KeyvalIsLower(KeyvalVar uint) bool {
37 37
38- return xKeyvalIsLower(KeyvalVar)38+ cret := xKeyvalIsLower(KeyvalVar)
39-39+ return cret
40 }40 }
41 41
42 var xKeyvalIsUpper func(uint) bool42 var xKeyvalIsUpper func(uint) bool
@@ -44,8 +44,8 @@ var xKeyvalIsUpper func(uint) bool
44 // Returns %TRUE if the given key value is in upper case.44 // Returns %TRUE if the given key value is in upper case.
45 func KeyvalIsUpper(KeyvalVar uint) bool {45 func KeyvalIsUpper(KeyvalVar uint) bool {
46 46
47- return xKeyvalIsUpper(KeyvalVar)47+ cret := xKeyvalIsUpper(KeyvalVar)
48-48+ return cret
49 }49 }
50 50
51 var xKeyvalName func(uint) string51 var xKeyvalName func(uint) string
@@ -57,8 +57,8 @@ var xKeyvalName func(uint) string
57 // but without the leading “GDK_KEY_”.57 // but without the leading “GDK_KEY_”.
58 func KeyvalName(KeyvalVar uint) string {58 func KeyvalName(KeyvalVar uint) string {
59 59
60- return xKeyvalName(KeyvalVar)60+ cret := xKeyvalName(KeyvalVar)
61-61+ return cret
62 }62 }
63 63
64 var xKeyvalToLower func(uint) uint64 var xKeyvalToLower func(uint) uint
@@ -66,8 +66,8 @@ var xKeyvalToLower func(uint) uint
66 // Converts a key value to lower case, if applicable.66 // Converts a key value to lower case, if applicable.
67 func KeyvalToLower(KeyvalVar uint) uint {67 func KeyvalToLower(KeyvalVar uint) uint {
68 68
69- return xKeyvalToLower(KeyvalVar)69+ cret := xKeyvalToLower(KeyvalVar)
70-70+ return cret
71 }71 }
72 72
73 var xKeyvalToUnicode func(uint) uint3273 var xKeyvalToUnicode func(uint) uint32
@@ -80,8 +80,8 @@ var xKeyvalToUnicode func(uint) uint32
80 // keyvals, such as %GDK_KEY_KP_Decimal.80 // keyvals, such as %GDK_KEY_KP_Decimal.
81 func KeyvalToUnicode(KeyvalVar uint) uint32 {81 func KeyvalToUnicode(KeyvalVar uint) uint32 {
82 82
83- return xKeyvalToUnicode(KeyvalVar)83+ cret := xKeyvalToUnicode(KeyvalVar)
84-84+ return cret
85 }85 }
86 86
87 var xKeyvalToUpper func(uint) uint87 var xKeyvalToUpper func(uint) uint
@@ -89,8 +89,8 @@ var xKeyvalToUpper func(uint) uint
89 // Converts a key value to upper case, if applicable.89 // Converts a key value to upper case, if applicable.
90 func KeyvalToUpper(KeyvalVar uint) uint {90 func KeyvalToUpper(KeyvalVar uint) uint {
91 91
92- return xKeyvalToUpper(KeyvalVar)92+ cret := xKeyvalToUpper(KeyvalVar)
93-93+ return cret
94 }94 }
95 95
96 var xUnicodeToKeyval func(uint32) uint96 var xUnicodeToKeyval func(uint32) uint
@@ -98,8 +98,8 @@ var xUnicodeToKeyval func(uint32) uint
98 // Convert from a Unicode character to a key symbol.98 // Convert from a Unicode character to a key symbol.
99 func UnicodeToKeyval(WcVar uint32) uint {99 func UnicodeToKeyval(WcVar uint32) uint {
100 100
101- return xUnicodeToKeyval(WcVar)101+ cret := xUnicodeToKeyval(WcVar)
102-102+ return cret
103 }103 }
104 104
105 func init() {105 func init() {
M v4/gdk/gdkmemorytexture.go +57 -45
@@ -29,14 +29,16 @@ var xNewMemoryTexture func(int, int, MemoryFormat, *glib.Bytes, uint) uintptr
29 // The `GBytes` must contain @stride × @height pixels29 // The `GBytes` must contain @stride × @height pixels
30 // in the given format.30 // in the given format.
31 func NewMemoryTexture(WidthVar int, HeightVar int, FormatVar MemoryFormat, BytesVar *glib.Bytes, StrideVar uint) *MemoryTexture {31 func NewMemoryTexture(WidthVar int, HeightVar int, FormatVar MemoryFormat, BytesVar *glib.Bytes, StrideVar uint) *MemoryTexture {
32- NewMemoryTexturePtr := xNewMemoryTexture(WidthVar, HeightVar, FormatVar, BytesVar, StrideVar)32+ var cls *MemoryTexture
33- if NewMemoryTexturePtr == 0 {33+
34- return nil34+ cret := xNewMemoryTexture(WidthVar, HeightVar, FormatVar, BytesVar, StrideVar)
35- }
36 35
37- NewMemoryTextureCls := &MemoryTexture{}36+ if cret == 0 {
38- NewMemoryTextureCls.Ptr = NewMemoryTexturePtr37+ return cls
39- return NewMemoryTextureCls38+ }
39+ cls = &MemoryTexture{}
40+ cls.Ptr = cret
41+ return cls
40 }42 }
41 43
42 func (c *MemoryTexture) GoPointer() uintptr {44 func (c *MemoryTexture) GoPointer() uintptr {
@@ -70,16 +72,16 @@ func (x *MemoryTexture) ComputeConcreteSize(SpecifiedWidthVar float64, Specified
70 //72 //
71 // If the @paintable is already immutable, it will return itself.73 // If the @paintable is already immutable, it will return itself.
72 func (x *MemoryTexture) GetCurrentImage() *PaintableBase {74 func (x *MemoryTexture) GetCurrentImage() *PaintableBase {
75+ var cls *PaintableBase
73 76
74- GetCurrentImagePtr := XGdkPaintableGetCurrentImage(x.GoPointer())77+ cret := XGdkPaintableGetCurrentImage(x.GoPointer())
75- if GetCurrentImagePtr == 0 {
76- return nil
77- }
78-
79- GetCurrentImageCls := &PaintableBase{}
80- GetCurrentImageCls.Ptr = GetCurrentImagePtr
81- return GetCurrentImageCls
82 78
79+ if cret == 0 {
80+ return cls
81+ }
82+ cls = &PaintableBase{}
83+ cls.Ptr = cret
84+ return cls
83 }85 }
84 86
85 // Get flags for the paintable.87 // Get flags for the paintable.
@@ -89,8 +91,8 @@ func (x *MemoryTexture) GetCurrentImage() *PaintableBase {
89 // See [flags@Gdk.PaintableFlags] for the flags and what they mean.91 // See [flags@Gdk.PaintableFlags] for the flags and what they mean.
90 func (x *MemoryTexture) GetFlags() PaintableFlags {92 func (x *MemoryTexture) GetFlags() PaintableFlags {
91 93
92- return XGdkPaintableGetFlags(x.GoPointer())94+ cret := XGdkPaintableGetFlags(x.GoPointer())
93-95+ return cret
94 }96 }
95 97
96 // Gets the preferred aspect ratio the @paintable would like to be displayed at.98 // Gets the preferred aspect ratio the @paintable would like to be displayed at.
@@ -112,8 +114,8 @@ func (x *MemoryTexture) GetFlags() PaintableFlags {
112 // it returns 0. Negative values are never returned.114 // it returns 0. Negative values are never returned.
113 func (x *MemoryTexture) GetIntrinsicAspectRatio() float64 {115 func (x *MemoryTexture) GetIntrinsicAspectRatio() float64 {
114 116
115- return XGdkPaintableGetIntrinsicAspectRatio(x.GoPointer())117+ cret := XGdkPaintableGetIntrinsicAspectRatio(x.GoPointer())
116-118+ return cret
117 }119 }
118 120
119 // Gets the preferred height the @paintable would like to be displayed at.121 // Gets the preferred height the @paintable would like to be displayed at.
@@ -128,8 +130,8 @@ func (x *MemoryTexture) GetIntrinsicAspectRatio() float64 {
128 // Negative values are never returned.130 // Negative values are never returned.
129 func (x *MemoryTexture) GetIntrinsicHeight() int {131 func (x *MemoryTexture) GetIntrinsicHeight() int {
130 132
131- return XGdkPaintableGetIntrinsicHeight(x.GoPointer())133+ cret := XGdkPaintableGetIntrinsicHeight(x.GoPointer())
132-134+ return cret
133 }135 }
134 136
135 // Gets the preferred width the @paintable would like to be displayed at.137 // Gets the preferred width the @paintable would like to be displayed at.
@@ -144,8 +146,8 @@ func (x *MemoryTexture) GetIntrinsicHeight() int {
144 // Negative values are never returned.146 // Negative values are never returned.
145 func (x *MemoryTexture) GetIntrinsicWidth() int {147 func (x *MemoryTexture) GetIntrinsicWidth() int {
146 148
147- return XGdkPaintableGetIntrinsicWidth(x.GoPointer())149+ cret := XGdkPaintableGetIntrinsicWidth(x.GoPointer())
148-150+ return cret
149 }151 }
150 152
151 // Called by implementations of `GdkPaintable` to invalidate their contents.153 // Called by implementations of `GdkPaintable` to invalidate their contents.
@@ -194,8 +196,8 @@ func (x *MemoryTexture) Snapshot(SnapshotVar *Snapshot, WidthVar float64, Height
194 // Checks if two icons are equal.196 // Checks if two icons are equal.
195 func (x *MemoryTexture) Equal(Icon2Var gio.Icon) bool {197 func (x *MemoryTexture) Equal(Icon2Var gio.Icon) bool {
196 198
197- return gio.XGIconEqual(x.GoPointer(), Icon2Var.GoPointer())199+ cret := gio.XGIconEqual(x.GoPointer(), Icon2Var.GoPointer())
198-200+ return cret
199 }201 }
200 202
201 // Serializes a #GIcon into a #GVariant. An equivalent #GIcon can be retrieved203 // Serializes a #GIcon into a #GVariant. An equivalent #GIcon can be retrieved
@@ -205,8 +207,8 @@ func (x *MemoryTexture) Equal(Icon2Var gio.Icon) bool {
205 // (as opposed to over the network), and within the same file system namespace.207 // (as opposed to over the network), and within the same file system namespace.
206 func (x *MemoryTexture) Serialize() *glib.Variant {208 func (x *MemoryTexture) Serialize() *glib.Variant {
207 209
208- return gio.XGIconSerialize(x.GoPointer())210+ cret := gio.XGIconSerialize(x.GoPointer())
209-211+ return cret
210 }212 }
211 213
212 // Generates a textual representation of @icon that can be used for214 // Generates a textual representation of @icon that can be used for
@@ -227,22 +229,27 @@ func (x *MemoryTexture) Serialize() *glib.Variant {
227 // the encoding is simply the name (such as `network-server`).229 // the encoding is simply the name (such as `network-server`).
228 func (x *MemoryTexture) ToString() string {230 func (x *MemoryTexture) ToString() string {
229 231
230- return gio.XGIconToString(x.GoPointer())232+ cret := gio.XGIconToString(x.GoPointer())
231-233+ return cret
232 }234 }
233 235
234 // Loads a loadable icon. For the asynchronous version of this function,236 // Loads a loadable icon. For the asynchronous version of this function,
235 // see g_loadable_icon_load_async().237 // see g_loadable_icon_load_async().
236-func (x *MemoryTexture) Load(SizeVar int, TypeVar string, CancellableVar *gio.Cancellable) *gio.InputStream {238+func (x *MemoryTexture) Load(SizeVar int, TypeVar string, CancellableVar *gio.Cancellable) (*gio.InputStream, error) {
239+ var cls *gio.InputStream
240+ var cerr *glib.Error
237 241
238- LoadPtr := gio.XGLoadableIconLoad(x.GoPointer(), SizeVar, TypeVar, CancellableVar.GoPointer())242+ cret := gio.XGLoadableIconLoad(x.GoPointer(), SizeVar, TypeVar, CancellableVar.GoPointer(), &cerr)
239- if LoadPtr == 0 {
240- return nil
241- }
242 243
243- LoadCls := &gio.InputStream{}244+ if cret == 0 {
244- LoadCls.Ptr = LoadPtr245+ return cls, cerr
245- return LoadCls246+ }
247+ cls = &gio.InputStream{}
248+ cls.Ptr = cret
249+ if cerr == nil {
250+ return cls, nil
251+ }
252+ return cls, cerr
246 253
247 }254 }
248 255
@@ -256,16 +263,21 @@ func (x *MemoryTexture) LoadAsync(SizeVar int, CancellableVar *gio.Cancellable,
256 }263 }
257 264
258 // Finishes an asynchronous icon load started in g_loadable_icon_load_async().265 // Finishes an asynchronous icon load started in g_loadable_icon_load_async().
259-func (x *MemoryTexture) LoadFinish(ResVar gio.AsyncResult, TypeVar string) *gio.InputStream {266+func (x *MemoryTexture) LoadFinish(ResVar gio.AsyncResult, TypeVar string) (*gio.InputStream, error) {
267+ var cls *gio.InputStream
268+ var cerr *glib.Error
260 269
261- LoadFinishPtr := gio.XGLoadableIconLoadFinish(x.GoPointer(), ResVar.GoPointer(), TypeVar)270+ cret := gio.XGLoadableIconLoadFinish(x.GoPointer(), ResVar.GoPointer(), TypeVar, &cerr)
262- if LoadFinishPtr == 0 {
263- return nil
264- }
265 271
266- LoadFinishCls := &gio.InputStream{}272+ if cret == 0 {
267- LoadFinishCls.Ptr = LoadFinishPtr273+ return cls, cerr
268- return LoadFinishCls274+ }
275+ cls = &gio.InputStream{}
276+ cls.Ptr = cret
277+ if cerr == nil {
278+ return cls, nil
279+ }
280+ return cls, cerr
269 281
270 }282 }
271 283
M v4/gdk/gdkmonitor.go +27 -28
@@ -52,26 +52,25 @@ var xMonitorGetConnector func(uintptr) string
52 // Gets the name of the monitor's connector, if available.52 // Gets the name of the monitor's connector, if available.
53 func (x *Monitor) GetConnector() string {53 func (x *Monitor) GetConnector() string {
54 54
55- return xMonitorGetConnector(x.GoPointer())55+ cret := xMonitorGetConnector(x.GoPointer())
56-56+ return cret
57 }57 }
58 58
59 var xMonitorGetDisplay func(uintptr) uintptr59 var xMonitorGetDisplay func(uintptr) uintptr
60 60
61 // Gets the display that this monitor belongs to.61 // Gets the display that this monitor belongs to.
62 func (x *Monitor) GetDisplay() *Display {62 func (x *Monitor) GetDisplay() *Display {
63+ var cls *Display
63 64
64- GetDisplayPtr := xMonitorGetDisplay(x.GoPointer())65+ cret := xMonitorGetDisplay(x.GoPointer())
65- if GetDisplayPtr == 0 {
66- return nil
67- }
68-
69- gobject.IncreaseRef(GetDisplayPtr)
70-
71- GetDisplayCls := &Display{}
72- GetDisplayCls.Ptr = GetDisplayPtr
73- return GetDisplayCls
74 66
67+ if cret == 0 {
68+ return cls
69+ }
70+ gobject.IncreaseRef(cret)
71+ cls = &Display{}
72+ cls.Ptr = cret
73+ return cls
75 }74 }
76 75
77 var xMonitorGetGeometry func(uintptr, *Rectangle)76 var xMonitorGetGeometry func(uintptr, *Rectangle)
@@ -92,8 +91,8 @@ var xMonitorGetHeightMm func(uintptr) int
92 // Gets the height in millimeters of the monitor.91 // Gets the height in millimeters of the monitor.
93 func (x *Monitor) GetHeightMm() int {92 func (x *Monitor) GetHeightMm() int {
94 93
95- return xMonitorGetHeightMm(x.GoPointer())94+ cret := xMonitorGetHeightMm(x.GoPointer())
96-95+ return cret
97 }96 }
98 97
99 var xMonitorGetManufacturer func(uintptr) string98 var xMonitorGetManufacturer func(uintptr) string
@@ -107,8 +106,8 @@ var xMonitorGetManufacturer func(uintptr) string
107 // [https://uefi.org/pnp_id_list](https://uefi.org/pnp_id_list).106 // [https://uefi.org/pnp_id_list](https://uefi.org/pnp_id_list).
108 func (x *Monitor) GetManufacturer() string {107 func (x *Monitor) GetManufacturer() string {
109 108
110- return xMonitorGetManufacturer(x.GoPointer())109+ cret := xMonitorGetManufacturer(x.GoPointer())
111-110+ return cret
112 }111 }
113 112
114 var xMonitorGetModel func(uintptr) string113 var xMonitorGetModel func(uintptr) string
@@ -116,8 +115,8 @@ var xMonitorGetModel func(uintptr) string
116 // Gets the string identifying the monitor model, if available.115 // Gets the string identifying the monitor model, if available.
117 func (x *Monitor) GetModel() string {116 func (x *Monitor) GetModel() string {
118 117
119- return xMonitorGetModel(x.GoPointer())118+ cret := xMonitorGetModel(x.GoPointer())
120-119+ return cret
121 }120 }
122 121
123 var xMonitorGetRefreshRate func(uintptr) int122 var xMonitorGetRefreshRate func(uintptr) int
@@ -128,8 +127,8 @@ var xMonitorGetRefreshRate func(uintptr) int
128 // is returned as 60000.127 // is returned as 60000.
129 func (x *Monitor) GetRefreshRate() int {128 func (x *Monitor) GetRefreshRate() int {
130 129
131- return xMonitorGetRefreshRate(x.GoPointer())130+ cret := xMonitorGetRefreshRate(x.GoPointer())
132-131+ return cret
133 }132 }
134 133
135 var xMonitorGetScaleFactor func(uintptr) int134 var xMonitorGetScaleFactor func(uintptr) int
@@ -145,8 +144,8 @@ var xMonitorGetScaleFactor func(uintptr) int
145 // where it is better to use [method@Gdk.Surface.get_scale_factor] instead.144 // where it is better to use [method@Gdk.Surface.get_scale_factor] instead.
146 func (x *Monitor) GetScaleFactor() int {145 func (x *Monitor) GetScaleFactor() int {
147 146
148- return xMonitorGetScaleFactor(x.GoPointer())147+ cret := xMonitorGetScaleFactor(x.GoPointer())
149-148+ return cret
150 }149 }
151 150
152 var xMonitorGetSubpixelLayout func(uintptr) SubpixelLayout151 var xMonitorGetSubpixelLayout func(uintptr) SubpixelLayout
@@ -155,8 +154,8 @@ var xMonitorGetSubpixelLayout func(uintptr) SubpixelLayout
155 // primaries for pixels.154 // primaries for pixels.
156 func (x *Monitor) GetSubpixelLayout() SubpixelLayout {155 func (x *Monitor) GetSubpixelLayout() SubpixelLayout {
157 156
158- return xMonitorGetSubpixelLayout(x.GoPointer())157+ cret := xMonitorGetSubpixelLayout(x.GoPointer())
159-158+ return cret
160 }159 }
161 160
162 var xMonitorGetWidthMm func(uintptr) int161 var xMonitorGetWidthMm func(uintptr) int
@@ -164,8 +163,8 @@ var xMonitorGetWidthMm func(uintptr) int
164 // Gets the width in millimeters of the monitor.163 // Gets the width in millimeters of the monitor.
165 func (x *Monitor) GetWidthMm() int {164 func (x *Monitor) GetWidthMm() int {
166 165
167- return xMonitorGetWidthMm(x.GoPointer())166+ cret := xMonitorGetWidthMm(x.GoPointer())
168-167+ return cret
169 }168 }
170 169
171 var xMonitorIsValid func(uintptr) bool170 var xMonitorIsValid func(uintptr) bool
@@ -177,8 +176,8 @@ var xMonitorIsValid func(uintptr) bool
177 // is unplugged or removed.176 // is unplugged or removed.
178 func (x *Monitor) IsValid() bool {177 func (x *Monitor) IsValid() bool {
179 178
180- return xMonitorIsValid(x.GoPointer())179+ cret := xMonitorIsValid(x.GoPointer())
181-180+ return cret
182 }181 }
183 182
184 func (c *Monitor) GoPointer() uintptr {183 func (c *Monitor) GoPointer() uintptr {
M v4/gdk/gdkpaintable.go +24 -24
@@ -112,16 +112,16 @@ func (x *PaintableBase) ComputeConcreteSize(SpecifiedWidthVar float64, Specified
112 //112 //
113 // If the @paintable is already immutable, it will return itself.113 // If the @paintable is already immutable, it will return itself.
114 func (x *PaintableBase) GetCurrentImage() *PaintableBase {114 func (x *PaintableBase) GetCurrentImage() *PaintableBase {
115+ var cls *PaintableBase
115 116
116- GetCurrentImagePtr := XGdkPaintableGetCurrentImage(x.GoPointer())117+ cret := XGdkPaintableGetCurrentImage(x.GoPointer())
117- if GetCurrentImagePtr == 0 {
118- return nil
119- }
120-
121- GetCurrentImageCls := &PaintableBase{}
122- GetCurrentImageCls.Ptr = GetCurrentImagePtr
123- return GetCurrentImageCls
124 118
119+ if cret == 0 {
120+ return cls
121+ }
122+ cls = &PaintableBase{}
123+ cls.Ptr = cret
124+ return cls
125 }125 }
126 126
127 // Get flags for the paintable.127 // Get flags for the paintable.
@@ -131,8 +131,8 @@ func (x *PaintableBase) GetCurrentImage() *PaintableBase {
131 // See [flags@Gdk.PaintableFlags] for the flags and what they mean.131 // See [flags@Gdk.PaintableFlags] for the flags and what they mean.
132 func (x *PaintableBase) GetFlags() PaintableFlags {132 func (x *PaintableBase) GetFlags() PaintableFlags {
133 133
134- return XGdkPaintableGetFlags(x.GoPointer())134+ cret := XGdkPaintableGetFlags(x.GoPointer())
135-135+ return cret
136 }136 }
137 137
138 // Gets the preferred aspect ratio the @paintable would like to be displayed at.138 // Gets the preferred aspect ratio the @paintable would like to be displayed at.
@@ -154,8 +154,8 @@ func (x *PaintableBase) GetFlags() PaintableFlags {
154 // it returns 0. Negative values are never returned.154 // it returns 0. Negative values are never returned.
155 func (x *PaintableBase) GetIntrinsicAspectRatio() float64 {155 func (x *PaintableBase) GetIntrinsicAspectRatio() float64 {
156 156
157- return XGdkPaintableGetIntrinsicAspectRatio(x.GoPointer())157+ cret := XGdkPaintableGetIntrinsicAspectRatio(x.GoPointer())
158-158+ return cret
159 }159 }
160 160
161 // Gets the preferred height the @paintable would like to be displayed at.161 // Gets the preferred height the @paintable would like to be displayed at.
@@ -170,8 +170,8 @@ func (x *PaintableBase) GetIntrinsicAspectRatio() float64 {
170 // Negative values are never returned.170 // Negative values are never returned.
171 func (x *PaintableBase) GetIntrinsicHeight() int {171 func (x *PaintableBase) GetIntrinsicHeight() int {
172 172
173- return XGdkPaintableGetIntrinsicHeight(x.GoPointer())173+ cret := XGdkPaintableGetIntrinsicHeight(x.GoPointer())
174-174+ return cret
175 }175 }
176 176
177 // Gets the preferred width the @paintable would like to be displayed at.177 // Gets the preferred width the @paintable would like to be displayed at.
@@ -186,8 +186,8 @@ func (x *PaintableBase) GetIntrinsicHeight() int {
186 // Negative values are never returned.186 // Negative values are never returned.
187 func (x *PaintableBase) GetIntrinsicWidth() int {187 func (x *PaintableBase) GetIntrinsicWidth() int {
188 188
189- return XGdkPaintableGetIntrinsicWidth(x.GoPointer())189+ cret := XGdkPaintableGetIntrinsicWidth(x.GoPointer())
190-190+ return cret
191 }191 }
192 192
193 // Called by implementations of `GdkPaintable` to invalidate their contents.193 // Called by implementations of `GdkPaintable` to invalidate their contents.
@@ -269,16 +269,16 @@ var xPaintableNewEmpty func(int, int) uintptr
269 // when the paintable is in an incomplete state (like a269 // when the paintable is in an incomplete state (like a
270 // [class@Gtk.MediaStream] before receiving the first frame).270 // [class@Gtk.MediaStream] before receiving the first frame).
271 func PaintableNewEmpty(IntrinsicWidthVar int, IntrinsicHeightVar int) *PaintableBase {271 func PaintableNewEmpty(IntrinsicWidthVar int, IntrinsicHeightVar int) *PaintableBase {
272+ var cls *PaintableBase
272 273
273- PaintableNewEmptyPtr := xPaintableNewEmpty(IntrinsicWidthVar, IntrinsicHeightVar)274+ cret := xPaintableNewEmpty(IntrinsicWidthVar, IntrinsicHeightVar)
274- if PaintableNewEmptyPtr == 0 {
275- return nil
276- }
277-
278- PaintableNewEmptyCls := &PaintableBase{}
279- PaintableNewEmptyCls.Ptr = PaintableNewEmptyPtr
280- return PaintableNewEmptyCls
281 275
276+ if cret == 0 {
277+ return cls
278+ }
279+ cls = &PaintableBase{}
280+ cls.Ptr = cret
281+ return cls
282 }282 }
283 283
284 func init() {284 func init() {
M v4/gdk/gdkpango.go +4 -4
@@ -22,8 +22,8 @@ var xPangoLayoutGetClipRegion func(uintptr, int, int, int, int) *cairo.Region
22 // of text, such as when text is selected.22 // of text, such as when text is selected.
23 func PangoLayoutGetClipRegion(LayoutVar *pango.Layout, XOriginVar int, YOriginVar int, IndexRangesVar int, NRangesVar int) *cairo.Region {23 func PangoLayoutGetClipRegion(LayoutVar *pango.Layout, XOriginVar int, YOriginVar int, IndexRangesVar int, NRangesVar int) *cairo.Region {
24 24
25- return xPangoLayoutGetClipRegion(LayoutVar.GoPointer(), XOriginVar, YOriginVar, IndexRangesVar, NRangesVar)25+ cret := xPangoLayoutGetClipRegion(LayoutVar.GoPointer(), XOriginVar, YOriginVar, IndexRangesVar, NRangesVar)
26-26+ return cret
27 }27 }
28 28
29 var xPangoLayoutLineGetClipRegion func(*pango.LayoutLine, int, int, uintptr, int) *cairo.Region29 var xPangoLayoutLineGetClipRegion func(*pango.LayoutLine, int, int, uintptr, int) *cairo.Region
@@ -45,8 +45,8 @@ var xPangoLayoutLineGetClipRegion func(*pango.LayoutLine, int, int, uintptr, int
45 // of text, such as when text is selected.45 // of text, such as when text is selected.
46 func PangoLayoutLineGetClipRegion(LineVar *pango.LayoutLine, XOriginVar int, YOriginVar int, IndexRangesVar uintptr, NRangesVar int) *cairo.Region {46 func PangoLayoutLineGetClipRegion(LineVar *pango.LayoutLine, XOriginVar int, YOriginVar int, IndexRangesVar uintptr, NRangesVar int) *cairo.Region {
47 47
48- return xPangoLayoutLineGetClipRegion(LineVar, XOriginVar, YOriginVar, IndexRangesVar, NRangesVar)48+ cret := xPangoLayoutLineGetClipRegion(LineVar, XOriginVar, YOriginVar, IndexRangesVar, NRangesVar)
49-49+ return cret
50 }50 }
51 51
52 func init() {52 func init() {
M v4/gdk/gdkpixbuf.go +16 -16
@@ -18,16 +18,16 @@ var xPixbufGetFromSurface func(*cairo.Surface, int, int, int, int) uintptr
18 // This function will create an RGB pixbuf with 8 bits per channel.18 // This function will create an RGB pixbuf with 8 bits per channel.
19 // The pixbuf will contain an alpha channel if the @surface contains one.19 // The pixbuf will contain an alpha channel if the @surface contains one.
20 func PixbufGetFromSurface(SurfaceVar *cairo.Surface, SrcXVar int, SrcYVar int, WidthVar int, HeightVar int) *gdkpixbuf.Pixbuf {20 func PixbufGetFromSurface(SurfaceVar *cairo.Surface, SrcXVar int, SrcYVar int, WidthVar int, HeightVar int) *gdkpixbuf.Pixbuf {
21+ var cls *gdkpixbuf.Pixbuf
21 22
22- PixbufGetFromSurfacePtr := xPixbufGetFromSurface(SurfaceVar, SrcXVar, SrcYVar, WidthVar, HeightVar)23+ cret := xPixbufGetFromSurface(SurfaceVar, SrcXVar, SrcYVar, WidthVar, HeightVar)
23- if PixbufGetFromSurfacePtr == 0 {
24- return nil
25- }
26-
27- PixbufGetFromSurfaceCls := &gdkpixbuf.Pixbuf{}
28- PixbufGetFromSurfaceCls.Ptr = PixbufGetFromSurfacePtr
29- return PixbufGetFromSurfaceCls
30 24
25+ if cret == 0 {
26+ return cls
27+ }
28+ cls = &gdkpixbuf.Pixbuf{}
29+ cls.Ptr = cret
30+ return cls
31 }31 }
32 32
33 var xPixbufGetFromTexture func(uintptr) uintptr33 var xPixbufGetFromTexture func(uintptr) uintptr
@@ -38,16 +38,16 @@ var xPixbufGetFromTexture func(uintptr) uintptr
38 // stages will almost certainly convert the pixbuf back into a texture38 // stages will almost certainly convert the pixbuf back into a texture
39 // to draw it on screen.39 // to draw it on screen.
40 func PixbufGetFromTexture(TextureVar *Texture) *gdkpixbuf.Pixbuf {40 func PixbufGetFromTexture(TextureVar *Texture) *gdkpixbuf.Pixbuf {
41+ var cls *gdkpixbuf.Pixbuf
41 42
42- PixbufGetFromTexturePtr := xPixbufGetFromTexture(TextureVar.GoPointer())43+ cret := xPixbufGetFromTexture(TextureVar.GoPointer())
43- if PixbufGetFromTexturePtr == 0 {
44- return nil
45- }
46-
47- PixbufGetFromTextureCls := &gdkpixbuf.Pixbuf{}
48- PixbufGetFromTextureCls.Ptr = PixbufGetFromTexturePtr
49- return PixbufGetFromTextureCls
50 44
45+ if cret == 0 {
46+ return cls
47+ }
48+ cls = &gdkpixbuf.Pixbuf{}
49+ cls.Ptr = cret
50+ return cls
51 }51 }
52 52
53 func init() {53 func init() {
M v4/gdk/gdkpopup.go +21 -22
@@ -43,38 +43,37 @@ func (x *PopupBase) SetGoPointer(ptr uintptr) {
43 // Returns whether this popup is set to hide on outside clicks.43 // Returns whether this popup is set to hide on outside clicks.
44 func (x *PopupBase) GetAutohide() bool {44 func (x *PopupBase) GetAutohide() bool {
45 45
46- return XGdkPopupGetAutohide(x.GoPointer())46+ cret := XGdkPopupGetAutohide(x.GoPointer())
47-47+ return cret
48 }48 }
49 49
50 // Returns the parent surface of a popup.50 // Returns the parent surface of a popup.
51 func (x *PopupBase) GetParent() *Surface {51 func (x *PopupBase) GetParent() *Surface {
52+ var cls *Surface
52 53
53- GetParentPtr := XGdkPopupGetParent(x.GoPointer())54+ cret := XGdkPopupGetParent(x.GoPointer())
54- if GetParentPtr == 0 {
55- return nil
56- }
57-
58- gobject.IncreaseRef(GetParentPtr)
59-
60- GetParentCls := &Surface{}
61- GetParentCls.Ptr = GetParentPtr
62- return GetParentCls
63 55
56+ if cret == 0 {
57+ return cls
58+ }
59+ gobject.IncreaseRef(cret)
60+ cls = &Surface{}
61+ cls.Ptr = cret
62+ return cls
64 }63 }
65 64
66 // Obtains the position of the popup relative to its parent.65 // Obtains the position of the popup relative to its parent.
67 func (x *PopupBase) GetPositionX() int {66 func (x *PopupBase) GetPositionX() int {
68 67
69- return XGdkPopupGetPositionX(x.GoPointer())68+ cret := XGdkPopupGetPositionX(x.GoPointer())
70-69+ return cret
71 }70 }
72 71
73 // Obtains the position of the popup relative to its parent.72 // Obtains the position of the popup relative to its parent.
74 func (x *PopupBase) GetPositionY() int {73 func (x *PopupBase) GetPositionY() int {
75 74
76- return XGdkPopupGetPositionY(x.GoPointer())75+ cret := XGdkPopupGetPositionY(x.GoPointer())
77-76+ return cret
78 }77 }
79 78
80 // Gets the current popup rectangle anchor.79 // Gets the current popup rectangle anchor.
@@ -83,8 +82,8 @@ func (x *PopupBase) GetPositionY() int {
83 // or after the [signal@Gdk.Surface::layout] signal is emitted.82 // or after the [signal@Gdk.Surface::layout] signal is emitted.
84 func (x *PopupBase) GetRectAnchor() Gravity {83 func (x *PopupBase) GetRectAnchor() Gravity {
85 84
86- return XGdkPopupGetRectAnchor(x.GoPointer())85+ cret := XGdkPopupGetRectAnchor(x.GoPointer())
87-86+ return cret
88 }87 }
89 88
90 // Gets the current popup surface anchor.89 // Gets the current popup surface anchor.
@@ -93,8 +92,8 @@ func (x *PopupBase) GetRectAnchor() Gravity {
93 // or after the [signal@Gdk.Surface::layout] signal is emitted.92 // or after the [signal@Gdk.Surface::layout] signal is emitted.
94 func (x *PopupBase) GetSurfaceAnchor() Gravity {93 func (x *PopupBase) GetSurfaceAnchor() Gravity {
95 94
96- return XGdkPopupGetSurfaceAnchor(x.GoPointer())95+ cret := XGdkPopupGetSurfaceAnchor(x.GoPointer())
97-96+ return cret
98 }97 }
99 98
100 // Present @popup after having processed the `GdkPopupLayout` rules.99 // Present @popup after having processed the `GdkPopupLayout` rules.
@@ -114,8 +113,8 @@ func (x *PopupBase) GetSurfaceAnchor() Gravity {
114 // the [signal@Gdk.Surface::layout] signal will not me emitted.113 // the [signal@Gdk.Surface::layout] signal will not me emitted.
115 func (x *PopupBase) Present(WidthVar int, HeightVar int, LayoutVar *PopupLayout) bool {114 func (x *PopupBase) Present(WidthVar int, HeightVar int, LayoutVar *PopupLayout) bool {
116 115
117- return XGdkPopupPresent(x.GoPointer(), WidthVar, HeightVar, LayoutVar)116+ cret := XGdkPopupPresent(x.GoPointer(), WidthVar, HeightVar, LayoutVar)
118-117+ return cret
119 }118 }
120 119
121 var XGdkPopupGetAutohide func(uintptr) bool120 var XGdkPopupGetAutohide func(uintptr) bool
M v4/gdk/gdkseat.go +33 -36
@@ -48,8 +48,8 @@ var xSeatGetCapabilities func(uintptr) SeatCapabilities
48 // Returns the capabilities this `GdkSeat` currently has.48 // Returns the capabilities this `GdkSeat` currently has.
49 func (x *Seat) GetCapabilities() SeatCapabilities {49 func (x *Seat) GetCapabilities() SeatCapabilities {
50 50
51- return xSeatGetCapabilities(x.GoPointer())51+ cret := xSeatGetCapabilities(x.GoPointer())
52-52+ return cret
53 }53 }
54 54
55 var xSeatGetDevices func(uintptr, SeatCapabilities) *glib.List55 var xSeatGetDevices func(uintptr, SeatCapabilities) *glib.List
@@ -57,62 +57,59 @@ var xSeatGetDevices func(uintptr, SeatCapabilities) *glib.List
57 // Returns the devices that match the given capabilities.57 // Returns the devices that match the given capabilities.
58 func (x *Seat) GetDevices(CapabilitiesVar SeatCapabilities) *glib.List {58 func (x *Seat) GetDevices(CapabilitiesVar SeatCapabilities) *glib.List {
59 59
60- return xSeatGetDevices(x.GoPointer(), CapabilitiesVar)60+ cret := xSeatGetDevices(x.GoPointer(), CapabilitiesVar)
61-61+ return cret
62 }62 }
63 63
64 var xSeatGetDisplay func(uintptr) uintptr64 var xSeatGetDisplay func(uintptr) uintptr
65 65
66 // Returns the `GdkDisplay` this seat belongs to.66 // Returns the `GdkDisplay` this seat belongs to.
67 func (x *Seat) GetDisplay() *Display {67 func (x *Seat) GetDisplay() *Display {
68+ var cls *Display
68 69
69- GetDisplayPtr := xSeatGetDisplay(x.GoPointer())70+ cret := xSeatGetDisplay(x.GoPointer())
70- if GetDisplayPtr == 0 {
71- return nil
72- }
73-
74- gobject.IncreaseRef(GetDisplayPtr)
75-
76- GetDisplayCls := &Display{}
77- GetDisplayCls.Ptr = GetDisplayPtr
78- return GetDisplayCls
79 71
72+ if cret == 0 {
73+ return cls
74+ }
75+ gobject.IncreaseRef(cret)
76+ cls = &Display{}
77+ cls.Ptr = cret
78+ return cls
80 }79 }
81 80
82 var xSeatGetKeyboard func(uintptr) uintptr81 var xSeatGetKeyboard func(uintptr) uintptr
83 82
84 // Returns the device that routes keyboard events.83 // Returns the device that routes keyboard events.
85 func (x *Seat) GetKeyboard() *Device {84 func (x *Seat) GetKeyboard() *Device {
85+ var cls *Device
86 86
87- GetKeyboardPtr := xSeatGetKeyboard(x.GoPointer())87+ cret := xSeatGetKeyboard(x.GoPointer())
88- if GetKeyboardPtr == 0 {
89- return nil
90- }
91-
92- gobject.IncreaseRef(GetKeyboardPtr)
93-
94- GetKeyboardCls := &Device{}
95- GetKeyboardCls.Ptr = GetKeyboardPtr
96- return GetKeyboardCls
97 88
89+ if cret == 0 {
90+ return cls
91+ }
92+ gobject.IncreaseRef(cret)
93+ cls = &Device{}
94+ cls.Ptr = cret
95+ return cls
98 }96 }
99 97
100 var xSeatGetPointer func(uintptr) uintptr98 var xSeatGetPointer func(uintptr) uintptr
101 99
102 // Returns the device that routes pointer events.100 // Returns the device that routes pointer events.
103 func (x *Seat) GetPointer() *Device {101 func (x *Seat) GetPointer() *Device {
102+ var cls *Device
104 103
105- GetPointerPtr := xSeatGetPointer(x.GoPointer())104+ cret := xSeatGetPointer(x.GoPointer())
106- if GetPointerPtr == 0 {
107- return nil
108- }
109-
110- gobject.IncreaseRef(GetPointerPtr)
111-
112- GetPointerCls := &Device{}
113- GetPointerCls.Ptr = GetPointerPtr
114- return GetPointerCls
115 105
106+ if cret == 0 {
107+ return cls
108+ }
109+ gobject.IncreaseRef(cret)
110+ cls = &Device{}
111+ cls.Ptr = cret
112+ return cls
116 }113 }
117 114
118 var xSeatGetTools func(uintptr) *glib.List115 var xSeatGetTools func(uintptr) *glib.List
@@ -120,8 +117,8 @@ var xSeatGetTools func(uintptr) *glib.List
120 // Returns all `GdkDeviceTools` that are known to the application.117 // Returns all `GdkDeviceTools` that are known to the application.
121 func (x *Seat) GetTools() *glib.List {118 func (x *Seat) GetTools() *glib.List {
122 119
123- return xSeatGetTools(x.GoPointer())120+ cret := xSeatGetTools(x.GoPointer())
124-121+ return cret
125 }122 }
126 123
127 func (c *Seat) GoPointer() uintptr {124 func (c *Seat) GoPointer() uintptr {
M v4/gdk/gdksurface.go +105 -94
@@ -5,6 +5,7 @@ import (
5 "github.com/jwijenbergh/purego"5 "github.com/jwijenbergh/purego"
6 "github.com/jwijenbergh/puregotk/internal/core"6 "github.com/jwijenbergh/puregotk/internal/core"
7 "github.com/jwijenbergh/puregotk/v4/cairo"7 "github.com/jwijenbergh/puregotk/v4/cairo"
8+ "github.com/jwijenbergh/puregotk/v4/glib"
8 "github.com/jwijenbergh/puregotk/v4/gobject"9 "github.com/jwijenbergh/puregotk/v4/gobject"
9 )10 )
10 11
@@ -37,28 +38,32 @@ var xNewPopupSurface func(uintptr, bool) uintptr
37 // The surface will be attached to @parent and can be positioned38 // The surface will be attached to @parent and can be positioned
38 // relative to it using [method@Gdk.Popup.present].39 // relative to it using [method@Gdk.Popup.present].
39 func NewPopupSurface(ParentVar *Surface, AutohideVar bool) *Surface {40 func NewPopupSurface(ParentVar *Surface, AutohideVar bool) *Surface {
40- NewPopupSurfacePtr := xNewPopupSurface(ParentVar.GoPointer(), AutohideVar)41+ var cls *Surface
41- if NewPopupSurfacePtr == 0 {42+
42- return nil43+ cret := xNewPopupSurface(ParentVar.GoPointer(), AutohideVar)
43- }
44 44
45- NewPopupSurfaceCls := &Surface{}45+ if cret == 0 {
46- NewPopupSurfaceCls.Ptr = NewPopupSurfacePtr46+ return cls
47- return NewPopupSurfaceCls47+ }
48+ cls = &Surface{}
49+ cls.Ptr = cret
50+ return cls
48 }51 }
49 52
50 var xNewToplevelSurface func(uintptr) uintptr53 var xNewToplevelSurface func(uintptr) uintptr
51 54
52 // Creates a new toplevel surface.55 // Creates a new toplevel surface.
53 func NewToplevelSurface(DisplayVar *Display) *Surface {56 func NewToplevelSurface(DisplayVar *Display) *Surface {
54- NewToplevelSurfacePtr := xNewToplevelSurface(DisplayVar.GoPointer())57+ var cls *Surface
55- if NewToplevelSurfacePtr == 0 {58+
56- return nil59+ cret := xNewToplevelSurface(DisplayVar.GoPointer())
57- }
58 60
59- NewToplevelSurfaceCls := &Surface{}61+ if cret == 0 {
60- NewToplevelSurfaceCls.Ptr = NewToplevelSurfacePtr62+ return cls
61- return NewToplevelSurfaceCls63+ }
64+ cls = &Surface{}
65+ cls.Ptr = cret
66+ return cls
62 }67 }
63 68
64 var xSurfaceBeep func(uintptr)69 var xSurfaceBeep func(uintptr)
@@ -77,16 +82,16 @@ var xSurfaceCreateCairoContext func(uintptr) uintptr
77 82
78 // Creates a new `GdkCairoContext` for rendering on @surface.83 // Creates a new `GdkCairoContext` for rendering on @surface.
79 func (x *Surface) CreateCairoContext() *CairoContext {84 func (x *Surface) CreateCairoContext() *CairoContext {
85+ var cls *CairoContext
80 86
81- CreateCairoContextPtr := xSurfaceCreateCairoContext(x.GoPointer())87+ cret := xSurfaceCreateCairoContext(x.GoPointer())
82- if CreateCairoContextPtr == 0 {
83- return nil
84- }
85-
86- CreateCairoContextCls := &CairoContext{}
87- CreateCairoContextCls.Ptr = CreateCairoContextPtr
88- return CreateCairoContextCls
89 88
89+ if cret == 0 {
90+ return cls
91+ }
92+ cls = &CairoContext{}
93+ cls.Ptr = cret
94+ return cls
90 }95 }
91 96
92 var xSurfaceCreateGlContext func(uintptr) uintptr97 var xSurfaceCreateGlContext func(uintptr) uintptr
@@ -97,16 +102,21 @@ var xSurfaceCreateGlContext func(uintptr) uintptr
97 // If the creation of the `GdkGLContext` failed, @error will be set.102 // If the creation of the `GdkGLContext` failed, @error will be set.
98 // Before using the returned `GdkGLContext`, you will need to103 // Before using the returned `GdkGLContext`, you will need to
99 // call [method@Gdk.GLContext.make_current] or [method@Gdk.GLContext.realize].104 // call [method@Gdk.GLContext.make_current] or [method@Gdk.GLContext.realize].
100-func (x *Surface) CreateGlContext() *GLContext {105+func (x *Surface) CreateGlContext() (*GLContext, error) {
106+ var cls *GLContext
107+ var cerr *glib.Error
101 108
102- CreateGlContextPtr := xSurfaceCreateGlContext(x.GoPointer())109+ cret := xSurfaceCreateGlContext(x.GoPointer())
103- if CreateGlContextPtr == 0 {
104- return nil
105- }
106 110
107- CreateGlContextCls := &GLContext{}111+ if cret == 0 {
108- CreateGlContextCls.Ptr = CreateGlContextPtr112+ return cls, cerr
109- return CreateGlContextCls113+ }
114+ cls = &GLContext{}
115+ cls.Ptr = cret
116+ if cerr == nil {
117+ return cls, nil
118+ }
119+ return cls, cerr
110 120
111 }121 }
112 122
@@ -129,8 +139,8 @@ var xSurfaceCreateSimilarSurface func(uintptr, cairo.Content, int, int) *cairo.S
129 // or any other error occurs.139 // or any other error occurs.
130 func (x *Surface) CreateSimilarSurface(ContentVar cairo.Content, WidthVar int, HeightVar int) *cairo.Surface {140 func (x *Surface) CreateSimilarSurface(ContentVar cairo.Content, WidthVar int, HeightVar int) *cairo.Surface {
131 141
132- return xSurfaceCreateSimilarSurface(x.GoPointer(), ContentVar, WidthVar, HeightVar)142+ cret := xSurfaceCreateSimilarSurface(x.GoPointer(), ContentVar, WidthVar, HeightVar)
133-143+ return cret
134 }144 }
135 145
136 var xSurfaceCreateVulkanContext func(uintptr) uintptr146 var xSurfaceCreateVulkanContext func(uintptr) uintptr
@@ -138,16 +148,21 @@ var xSurfaceCreateVulkanContext func(uintptr) uintptr
138 // Creates a new `GdkVulkanContext` for rendering on @surface.148 // Creates a new `GdkVulkanContext` for rendering on @surface.
139 //149 //
140 // If the creation of the `GdkVulkanContext` failed, @error will be set.150 // If the creation of the `GdkVulkanContext` failed, @error will be set.
141-func (x *Surface) CreateVulkanContext() *VulkanContext {151+func (x *Surface) CreateVulkanContext() (*VulkanContext, error) {
152+ var cls *VulkanContext
153+ var cerr *glib.Error
142 154
143- CreateVulkanContextPtr := xSurfaceCreateVulkanContext(x.GoPointer())155+ cret := xSurfaceCreateVulkanContext(x.GoPointer())
144- if CreateVulkanContextPtr == 0 {
145- return nil
146- }
147 156
148- CreateVulkanContextCls := &VulkanContext{}157+ if cret == 0 {
149- CreateVulkanContextCls.Ptr = CreateVulkanContextPtr158+ return cls, cerr
150- return CreateVulkanContextCls159+ }
160+ cls = &VulkanContext{}
161+ cls.Ptr = cret
162+ if cerr == nil {
163+ return cls, nil
164+ }
165+ return cls, cerr
151 166
152 }167 }
153 168
@@ -178,18 +193,17 @@ var xSurfaceGetCursor func(uintptr) uintptr
178 //193 //
179 // Use [method@Gdk.Surface.set_cursor] to unset the cursor of the surface.194 // Use [method@Gdk.Surface.set_cursor] to unset the cursor of the surface.
180 func (x *Surface) GetCursor() *Cursor {195 func (x *Surface) GetCursor() *Cursor {
196+ var cls *Cursor
181 197
182- GetCursorPtr := xSurfaceGetCursor(x.GoPointer())198+ cret := xSurfaceGetCursor(x.GoPointer())
183- if GetCursorPtr == 0 {
184- return nil
185- }
186-
187- gobject.IncreaseRef(GetCursorPtr)
188-
189- GetCursorCls := &Cursor{}
190- GetCursorCls.Ptr = GetCursorPtr
191- return GetCursorCls
192 199
200+ if cret == 0 {
201+ return cls
202+ }
203+ gobject.IncreaseRef(cret)
204+ cls = &Cursor{}
205+ cls.Ptr = cret
206+ return cls
193 }207 }
194 208
195 var xSurfaceGetDeviceCursor func(uintptr, uintptr) uintptr209 var xSurfaceGetDeviceCursor func(uintptr, uintptr) uintptr
@@ -202,18 +216,17 @@ var xSurfaceGetDeviceCursor func(uintptr, uintptr) uintptr
202 //216 //
203 // Use [method@Gdk.Surface.set_cursor] to unset the cursor of the surface.217 // Use [method@Gdk.Surface.set_cursor] to unset the cursor of the surface.
204 func (x *Surface) GetDeviceCursor(DeviceVar *Device) *Cursor {218 func (x *Surface) GetDeviceCursor(DeviceVar *Device) *Cursor {
219+ var cls *Cursor
205 220
206- GetDeviceCursorPtr := xSurfaceGetDeviceCursor(x.GoPointer(), DeviceVar.GoPointer())221+ cret := xSurfaceGetDeviceCursor(x.GoPointer(), DeviceVar.GoPointer())
207- if GetDeviceCursorPtr == 0 {
208- return nil
209- }
210-
211- gobject.IncreaseRef(GetDeviceCursorPtr)
212-
213- GetDeviceCursorCls := &Cursor{}
214- GetDeviceCursorCls.Ptr = GetDeviceCursorPtr
215- return GetDeviceCursorCls
216 222
223+ if cret == 0 {
224+ return cls
225+ }
226+ gobject.IncreaseRef(cret)
227+ cls = &Cursor{}
228+ cls.Ptr = cret
229+ return cls
217 }230 }
218 231
219 var xSurfaceGetDevicePosition func(uintptr, uintptr, float64, float64, *ModifierType) bool232 var xSurfaceGetDevicePosition func(uintptr, uintptr, float64, float64, *ModifierType) bool
@@ -224,26 +237,25 @@ var xSurfaceGetDevicePosition func(uintptr, uintptr, float64, float64, *Modifier
224 // left corner of @surface.237 // left corner of @surface.
225 func (x *Surface) GetDevicePosition(DeviceVar *Device, XVar float64, YVar float64, MaskVar *ModifierType) bool {238 func (x *Surface) GetDevicePosition(DeviceVar *Device, XVar float64, YVar float64, MaskVar *ModifierType) bool {
226 239
227- return xSurfaceGetDevicePosition(x.GoPointer(), DeviceVar.GoPointer(), XVar, YVar, MaskVar)240+ cret := xSurfaceGetDevicePosition(x.GoPointer(), DeviceVar.GoPointer(), XVar, YVar, MaskVar)
228-241+ return cret
229 }242 }
230 243
231 var xSurfaceGetDisplay func(uintptr) uintptr244 var xSurfaceGetDisplay func(uintptr) uintptr
232 245
233 // Gets the `GdkDisplay` associated with a `GdkSurface`.246 // Gets the `GdkDisplay` associated with a `GdkSurface`.
234 func (x *Surface) GetDisplay() *Display {247 func (x *Surface) GetDisplay() *Display {
248+ var cls *Display
235 249
236- GetDisplayPtr := xSurfaceGetDisplay(x.GoPointer())250+ cret := xSurfaceGetDisplay(x.GoPointer())
237- if GetDisplayPtr == 0 {
238- return nil
239- }
240-
241- gobject.IncreaseRef(GetDisplayPtr)
242-
243- GetDisplayCls := &Display{}
244- GetDisplayCls.Ptr = GetDisplayPtr
245- return GetDisplayCls
246 251
252+ if cret == 0 {
253+ return cls
254+ }
255+ gobject.IncreaseRef(cret)
256+ cls = &Display{}
257+ cls.Ptr = cret
258+ return cls
247 }259 }
248 260
249 var xSurfaceGetFrameClock func(uintptr) uintptr261 var xSurfaceGetFrameClock func(uintptr) uintptr
@@ -253,18 +265,17 @@ var xSurfaceGetFrameClock func(uintptr) uintptr
253 // The frame clock for a surface never changes unless the surface is265 // The frame clock for a surface never changes unless the surface is
254 // reparented to a new toplevel surface.266 // reparented to a new toplevel surface.
255 func (x *Surface) GetFrameClock() *FrameClock {267 func (x *Surface) GetFrameClock() *FrameClock {
268+ var cls *FrameClock
256 269
257- GetFrameClockPtr := xSurfaceGetFrameClock(x.GoPointer())270+ cret := xSurfaceGetFrameClock(x.GoPointer())
258- if GetFrameClockPtr == 0 {
259- return nil
260- }
261-
262- gobject.IncreaseRef(GetFrameClockPtr)
263-
264- GetFrameClockCls := &FrameClock{}
265- GetFrameClockCls.Ptr = GetFrameClockPtr
266- return GetFrameClockCls
267 271
272+ if cret == 0 {
273+ return cls
274+ }
275+ gobject.IncreaseRef(cret)
276+ cls = &FrameClock{}
277+ cls.Ptr = cret
278+ return cls
268 }279 }
269 280
270 var xSurfaceGetHeight func(uintptr) int281 var xSurfaceGetHeight func(uintptr) int
@@ -275,8 +286,8 @@ var xSurfaceGetHeight func(uintptr) int
275 // ”device pixels” (see [method@Gdk.Surface.get_scale_factor]).286 // ”device pixels” (see [method@Gdk.Surface.get_scale_factor]).
276 func (x *Surface) GetHeight() int {287 func (x *Surface) GetHeight() int {
277 288
278- return xSurfaceGetHeight(x.GoPointer())289+ cret := xSurfaceGetHeight(x.GoPointer())
279-290+ return cret
280 }291 }
281 292
282 var xSurfaceGetMapped func(uintptr) bool293 var xSurfaceGetMapped func(uintptr) bool
@@ -287,8 +298,8 @@ var xSurfaceGetMapped func(uintptr) bool
287 // or [method@Gdk.Popup.present].298 // or [method@Gdk.Popup.present].
288 func (x *Surface) GetMapped() bool {299 func (x *Surface) GetMapped() bool {
289 300
290- return xSurfaceGetMapped(x.GoPointer())301+ cret := xSurfaceGetMapped(x.GoPointer())
291-302+ return cret
292 }303 }
293 304
294 var xSurfaceGetScaleFactor func(uintptr) int305 var xSurfaceGetScaleFactor func(uintptr) int
@@ -306,8 +317,8 @@ var xSurfaceGetScaleFactor func(uintptr) int
306 // The scale of a surface may change during runtime.317 // The scale of a surface may change during runtime.
307 func (x *Surface) GetScaleFactor() int {318 func (x *Surface) GetScaleFactor() int {
308 319
309- return xSurfaceGetScaleFactor(x.GoPointer())320+ cret := xSurfaceGetScaleFactor(x.GoPointer())
310-321+ return cret
311 }322 }
312 323
313 var xSurfaceGetWidth func(uintptr) int324 var xSurfaceGetWidth func(uintptr) int
@@ -318,8 +329,8 @@ var xSurfaceGetWidth func(uintptr) int
318 // ”device pixels” (see [method@Gdk.Surface.get_scale_factor]).329 // ”device pixels” (see [method@Gdk.Surface.get_scale_factor]).
319 func (x *Surface) GetWidth() int {330 func (x *Surface) GetWidth() int {
320 331
321- return xSurfaceGetWidth(x.GoPointer())332+ cret := xSurfaceGetWidth(x.GoPointer())
322-333+ return cret
323 }334 }
324 335
325 var xSurfaceHide func(uintptr)336 var xSurfaceHide func(uintptr)
@@ -341,8 +352,8 @@ var xSurfaceIsDestroyed func(uintptr) bool
341 // Check to see if a surface is destroyed.352 // Check to see if a surface is destroyed.
342 func (x *Surface) IsDestroyed() bool {353 func (x *Surface) IsDestroyed() bool {
343 354
344- return xSurfaceIsDestroyed(x.GoPointer())355+ cret := xSurfaceIsDestroyed(x.GoPointer())
345-356+ return cret
346 }357 }
347 358
348 var xSurfaceQueueRender func(uintptr)359 var xSurfaceQueueRender func(uintptr)
@@ -453,8 +464,8 @@ var xSurfaceTranslateCoordinates func(uintptr, uintptr, float64, float64) bool
453 // transient-for to the same toplevel (directly or indirectly).464 // transient-for to the same toplevel (directly or indirectly).
454 func (x *Surface) TranslateCoordinates(ToVar *Surface, XVar float64, YVar float64) bool {465 func (x *Surface) TranslateCoordinates(ToVar *Surface, XVar float64, YVar float64) bool {
455 466
456- return xSurfaceTranslateCoordinates(x.GoPointer(), ToVar.GoPointer(), XVar, YVar)467+ cret := xSurfaceTranslateCoordinates(x.GoPointer(), ToVar.GoPointer(), XVar, YVar)
457-468+ return cret
458 }469 }
459 470
460 func (c *Surface) GoPointer() uintptr {471 func (c *Surface) GoPointer() uintptr {
M v4/gdk/gdktexture.go +123 -88
@@ -61,17 +61,19 @@ var xNewForPixbufTexture func(uintptr) uintptr
61 // and [method@Gio.Task.run_in_thread] to avoid blocking the main thread61 // and [method@Gio.Task.run_in_thread] to avoid blocking the main thread
62 // while loading a big image.62 // while loading a big image.
63 func NewForPixbufTexture(PixbufVar *gdkpixbuf.Pixbuf) *Texture {63 func NewForPixbufTexture(PixbufVar *gdkpixbuf.Pixbuf) *Texture {
64- NewForPixbufTexturePtr := xNewForPixbufTexture(PixbufVar.GoPointer())64+ var cls *Texture
65- if NewForPixbufTexturePtr == 0 {65+
66- return nil66+ cret := xNewForPixbufTexture(PixbufVar.GoPointer())
67- }
68 67
69- NewForPixbufTextureCls := &Texture{}68+ if cret == 0 {
70- NewForPixbufTextureCls.Ptr = NewForPixbufTexturePtr69+ return cls
71- return NewForPixbufTextureCls70+ }
71+ cls = &Texture{}
72+ cls.Ptr = cret
73+ return cls
72 }74 }
73 75
74-var xNewFromBytesTexture func(*glib.Bytes) uintptr76+var xNewFromBytesTexture func(*glib.Bytes, **glib.Error) uintptr
75 77
76 // Creates a new texture by loading an image from memory,78 // Creates a new texture by loading an image from memory,
77 //79 //
@@ -83,18 +85,25 @@ var xNewFromBytesTexture func(*glib.Bytes) uintptr
83 // This function is threadsafe, so that you can e.g. use GTask85 // This function is threadsafe, so that you can e.g. use GTask
84 // and [method@Gio.Task.run_in_thread] to avoid blocking the main thread86 // and [method@Gio.Task.run_in_thread] to avoid blocking the main thread
85 // while loading a big image.87 // while loading a big image.
86-func NewFromBytesTexture(BytesVar *glib.Bytes) *Texture {88+func NewFromBytesTexture(BytesVar *glib.Bytes) (*Texture, error) {
87- NewFromBytesTexturePtr := xNewFromBytesTexture(BytesVar)89+ var cls *Texture
88- if NewFromBytesTexturePtr == 0 {90+ var cerr *glib.Error
89- return nil91+
92+ cret := xNewFromBytesTexture(BytesVar, &cerr)
93+
94+ if cret == 0 {
95+ return cls, cerr
96+ }
97+ cls = &Texture{}
98+ cls.Ptr = cret
99+ if cerr == nil {
100+ return cls, nil
90 }101 }
102+ return cls, cerr
91 103
92- NewFromBytesTextureCls := &Texture{}
93- NewFromBytesTextureCls.Ptr = NewFromBytesTexturePtr
94- return NewFromBytesTextureCls
95 }104 }
96 105
97-var xNewFromFileTexture func(uintptr) uintptr106+var xNewFromFileTexture func(uintptr, **glib.Error) uintptr
98 107
99 // Creates a new texture by loading an image from a file.108 // Creates a new texture by loading an image from a file.
100 //109 //
@@ -106,18 +115,25 @@ var xNewFromFileTexture func(uintptr) uintptr
106 // This function is threadsafe, so that you can e.g. use GTask115 // This function is threadsafe, so that you can e.g. use GTask
107 // and [method@Gio.Task.run_in_thread] to avoid blocking the main thread116 // and [method@Gio.Task.run_in_thread] to avoid blocking the main thread
108 // while loading a big image.117 // while loading a big image.
109-func NewFromFileTexture(FileVar gio.File) *Texture {118+func NewFromFileTexture(FileVar gio.File) (*Texture, error) {
110- NewFromFileTexturePtr := xNewFromFileTexture(FileVar.GoPointer())119+ var cls *Texture
111- if NewFromFileTexturePtr == 0 {120+ var cerr *glib.Error
112- return nil121+
122+ cret := xNewFromFileTexture(FileVar.GoPointer(), &cerr)
123+
124+ if cret == 0 {
125+ return cls, cerr
126+ }
127+ cls = &Texture{}
128+ cls.Ptr = cret
129+ if cerr == nil {
130+ return cls, nil
113 }131 }
132+ return cls, cerr
114 133
115- NewFromFileTextureCls := &Texture{}
116- NewFromFileTextureCls.Ptr = NewFromFileTexturePtr
117- return NewFromFileTextureCls
118 }134 }
119 135
120-var xNewFromFilenameTexture func(string) uintptr136+var xNewFromFilenameTexture func(string, **glib.Error) uintptr
121 137
122 // Creates a new texture by loading an image from a file.138 // Creates a new texture by loading an image from a file.
123 //139 //
@@ -129,15 +145,22 @@ var xNewFromFilenameTexture func(string) uintptr
129 // This function is threadsafe, so that you can e.g. use GTask145 // This function is threadsafe, so that you can e.g. use GTask
130 // and [method@Gio.Task.run_in_thread] to avoid blocking the main thread146 // and [method@Gio.Task.run_in_thread] to avoid blocking the main thread
131 // while loading a big image.147 // while loading a big image.
132-func NewFromFilenameTexture(PathVar string) *Texture {148+func NewFromFilenameTexture(PathVar string) (*Texture, error) {
133- NewFromFilenameTexturePtr := xNewFromFilenameTexture(PathVar)149+ var cls *Texture
134- if NewFromFilenameTexturePtr == 0 {150+ var cerr *glib.Error
135- return nil151+
152+ cret := xNewFromFilenameTexture(PathVar, &cerr)
153+
154+ if cret == 0 {
155+ return cls, cerr
156+ }
157+ cls = &Texture{}
158+ cls.Ptr = cret
159+ if cerr == nil {
160+ return cls, nil
136 }161 }
162+ return cls, cerr
137 163
138- NewFromFilenameTextureCls := &Texture{}
139- NewFromFilenameTextureCls.Ptr = NewFromFilenameTexturePtr
140- return NewFromFilenameTextureCls
141 }164 }
142 165
143 var xNewFromResourceTexture func(string) uintptr166 var xNewFromResourceTexture func(string) uintptr
@@ -156,14 +179,16 @@ var xNewFromResourceTexture func(string) uintptr
156 // and [method@Gio.Task.run_in_thread] to avoid blocking the main thread179 // and [method@Gio.Task.run_in_thread] to avoid blocking the main thread
157 // while loading a big image.180 // while loading a big image.
158 func NewFromResourceTexture(ResourcePathVar string) *Texture {181 func NewFromResourceTexture(ResourcePathVar string) *Texture {
159- NewFromResourceTexturePtr := xNewFromResourceTexture(ResourcePathVar)182+ var cls *Texture
160- if NewFromResourceTexturePtr == 0 {183+
161- return nil184+ cret := xNewFromResourceTexture(ResourcePathVar)
162- }
163 185
164- NewFromResourceTextureCls := &Texture{}186+ if cret == 0 {
165- NewFromResourceTextureCls.Ptr = NewFromResourceTexturePtr187+ return cls
166- return NewFromResourceTextureCls188+ }
189+ cls = &Texture{}
190+ cls.Ptr = cret
191+ return cls
167 }192 }
168 193
169 var xTextureDownload func(uintptr, uintptr, uint)194 var xTextureDownload func(uintptr, uintptr, uint)
@@ -202,8 +227,8 @@ var xTextureGetHeight func(uintptr) int
202 // Returns the height of the @texture, in pixels.227 // Returns the height of the @texture, in pixels.
203 func (x *Texture) GetHeight() int {228 func (x *Texture) GetHeight() int {
204 229
205- return xTextureGetHeight(x.GoPointer())230+ cret := xTextureGetHeight(x.GoPointer())
206-231+ return cret
207 }232 }
208 233
209 var xTextureGetWidth func(uintptr) int234 var xTextureGetWidth func(uintptr) int
@@ -211,8 +236,8 @@ var xTextureGetWidth func(uintptr) int
211 // Returns the width of @texture, in pixels.236 // Returns the width of @texture, in pixels.
212 func (x *Texture) GetWidth() int {237 func (x *Texture) GetWidth() int {
213 238
214- return xTextureGetWidth(x.GoPointer())239+ cret := xTextureGetWidth(x.GoPointer())
215-240+ return cret
216 }241 }
217 242
218 var xTextureSaveToPng func(uintptr, string) bool243 var xTextureSaveToPng func(uintptr, string) bool
@@ -226,8 +251,8 @@ var xTextureSaveToPng func(uintptr, string) bool
226 // gdk-pixbuf library.251 // gdk-pixbuf library.
227 func (x *Texture) SaveToPng(FilenameVar string) bool {252 func (x *Texture) SaveToPng(FilenameVar string) bool {
228 253
229- return xTextureSaveToPng(x.GoPointer(), FilenameVar)254+ cret := xTextureSaveToPng(x.GoPointer(), FilenameVar)
230-255+ return cret
231 }256 }
232 257
233 var xTextureSaveToPngBytes func(uintptr) *glib.Bytes258 var xTextureSaveToPngBytes func(uintptr) *glib.Bytes
@@ -248,8 +273,8 @@ var xTextureSaveToPngBytes func(uintptr) *glib.Bytes
248 // instead.273 // instead.
249 func (x *Texture) SaveToPngBytes() *glib.Bytes {274 func (x *Texture) SaveToPngBytes() *glib.Bytes {
250 275
251- return xTextureSaveToPngBytes(x.GoPointer())276+ cret := xTextureSaveToPngBytes(x.GoPointer())
252-277+ return cret
253 }278 }
254 279
255 var xTextureSaveToTiff func(uintptr, string) bool280 var xTextureSaveToTiff func(uintptr, string) bool
@@ -259,8 +284,8 @@ var xTextureSaveToTiff func(uintptr, string) bool
259 // GTK will attempt to store data without loss.284 // GTK will attempt to store data without loss.
260 func (x *Texture) SaveToTiff(FilenameVar string) bool {285 func (x *Texture) SaveToTiff(FilenameVar string) bool {
261 286
262- return xTextureSaveToTiff(x.GoPointer(), FilenameVar)287+ cret := xTextureSaveToTiff(x.GoPointer(), FilenameVar)
263-288+ return cret
264 }289 }
265 290
266 var xTextureSaveToTiffBytes func(uintptr) *glib.Bytes291 var xTextureSaveToTiffBytes func(uintptr) *glib.Bytes
@@ -279,8 +304,8 @@ var xTextureSaveToTiffBytes func(uintptr) *glib.Bytes
279 // use [method@Gdk.Texture.save_to_png_bytes].304 // use [method@Gdk.Texture.save_to_png_bytes].
280 func (x *Texture) SaveToTiffBytes() *glib.Bytes {305 func (x *Texture) SaveToTiffBytes() *glib.Bytes {
281 306
282- return xTextureSaveToTiffBytes(x.GoPointer())307+ cret := xTextureSaveToTiffBytes(x.GoPointer())
283-308+ return cret
284 }309 }
285 310
286 func (c *Texture) GoPointer() uintptr {311 func (c *Texture) GoPointer() uintptr {
@@ -314,16 +339,16 @@ func (x *Texture) ComputeConcreteSize(SpecifiedWidthVar float64, SpecifiedHeight
314 //339 //
315 // If the @paintable is already immutable, it will return itself.340 // If the @paintable is already immutable, it will return itself.
316 func (x *Texture) GetCurrentImage() *PaintableBase {341 func (x *Texture) GetCurrentImage() *PaintableBase {
342+ var cls *PaintableBase
317 343
318- GetCurrentImagePtr := XGdkPaintableGetCurrentImage(x.GoPointer())344+ cret := XGdkPaintableGetCurrentImage(x.GoPointer())
319- if GetCurrentImagePtr == 0 {
320- return nil
321- }
322-
323- GetCurrentImageCls := &PaintableBase{}
324- GetCurrentImageCls.Ptr = GetCurrentImagePtr
325- return GetCurrentImageCls
326 345
346+ if cret == 0 {
347+ return cls
348+ }
349+ cls = &PaintableBase{}
350+ cls.Ptr = cret
351+ return cls
327 }352 }
328 353
329 // Get flags for the paintable.354 // Get flags for the paintable.
@@ -333,8 +358,8 @@ func (x *Texture) GetCurrentImage() *PaintableBase {
333 // See [flags@Gdk.PaintableFlags] for the flags and what they mean.358 // See [flags@Gdk.PaintableFlags] for the flags and what they mean.
334 func (x *Texture) GetFlags() PaintableFlags {359 func (x *Texture) GetFlags() PaintableFlags {
335 360
336- return XGdkPaintableGetFlags(x.GoPointer())361+ cret := XGdkPaintableGetFlags(x.GoPointer())
337-362+ return cret
338 }363 }
339 364
340 // Gets the preferred aspect ratio the @paintable would like to be displayed at.365 // Gets the preferred aspect ratio the @paintable would like to be displayed at.
@@ -356,8 +381,8 @@ func (x *Texture) GetFlags() PaintableFlags {
356 // it returns 0. Negative values are never returned.381 // it returns 0. Negative values are never returned.
357 func (x *Texture) GetIntrinsicAspectRatio() float64 {382 func (x *Texture) GetIntrinsicAspectRatio() float64 {
358 383
359- return XGdkPaintableGetIntrinsicAspectRatio(x.GoPointer())384+ cret := XGdkPaintableGetIntrinsicAspectRatio(x.GoPointer())
360-385+ return cret
361 }386 }
362 387
363 // Gets the preferred height the @paintable would like to be displayed at.388 // Gets the preferred height the @paintable would like to be displayed at.
@@ -372,8 +397,8 @@ func (x *Texture) GetIntrinsicAspectRatio() float64 {
372 // Negative values are never returned.397 // Negative values are never returned.
373 func (x *Texture) GetIntrinsicHeight() int {398 func (x *Texture) GetIntrinsicHeight() int {
374 399
375- return XGdkPaintableGetIntrinsicHeight(x.GoPointer())400+ cret := XGdkPaintableGetIntrinsicHeight(x.GoPointer())
376-401+ return cret
377 }402 }
378 403
379 // Gets the preferred width the @paintable would like to be displayed at.404 // Gets the preferred width the @paintable would like to be displayed at.
@@ -388,8 +413,8 @@ func (x *Texture) GetIntrinsicHeight() int {
388 // Negative values are never returned.413 // Negative values are never returned.
389 func (x *Texture) GetIntrinsicWidth() int {414 func (x *Texture) GetIntrinsicWidth() int {
390 415
391- return XGdkPaintableGetIntrinsicWidth(x.GoPointer())416+ cret := XGdkPaintableGetIntrinsicWidth(x.GoPointer())
392-417+ return cret
393 }418 }
394 419
395 // Called by implementations of `GdkPaintable` to invalidate their contents.420 // Called by implementations of `GdkPaintable` to invalidate their contents.
@@ -438,8 +463,8 @@ func (x *Texture) Snapshot(SnapshotVar *Snapshot, WidthVar float64, HeightVar fl
438 // Checks if two icons are equal.463 // Checks if two icons are equal.
439 func (x *Texture) Equal(Icon2Var gio.Icon) bool {464 func (x *Texture) Equal(Icon2Var gio.Icon) bool {
440 465
441- return gio.XGIconEqual(x.GoPointer(), Icon2Var.GoPointer())466+ cret := gio.XGIconEqual(x.GoPointer(), Icon2Var.GoPointer())
442-467+ return cret
443 }468 }
444 469
445 // Serializes a #GIcon into a #GVariant. An equivalent #GIcon can be retrieved470 // Serializes a #GIcon into a #GVariant. An equivalent #GIcon can be retrieved
@@ -449,8 +474,8 @@ func (x *Texture) Equal(Icon2Var gio.Icon) bool {
449 // (as opposed to over the network), and within the same file system namespace.474 // (as opposed to over the network), and within the same file system namespace.
450 func (x *Texture) Serialize() *glib.Variant {475 func (x *Texture) Serialize() *glib.Variant {
451 476
452- return gio.XGIconSerialize(x.GoPointer())477+ cret := gio.XGIconSerialize(x.GoPointer())
453-478+ return cret
454 }479 }
455 480
456 // Generates a textual representation of @icon that can be used for481 // Generates a textual representation of @icon that can be used for
@@ -471,22 +496,27 @@ func (x *Texture) Serialize() *glib.Variant {
471 // the encoding is simply the name (such as `network-server`).496 // the encoding is simply the name (such as `network-server`).
472 func (x *Texture) ToString() string {497 func (x *Texture) ToString() string {
473 498
474- return gio.XGIconToString(x.GoPointer())499+ cret := gio.XGIconToString(x.GoPointer())
475-500+ return cret
476 }501 }
477 502
478 // Loads a loadable icon. For the asynchronous version of this function,503 // Loads a loadable icon. For the asynchronous version of this function,
479 // see g_loadable_icon_load_async().504 // see g_loadable_icon_load_async().
480-func (x *Texture) Load(SizeVar int, TypeVar string, CancellableVar *gio.Cancellable) *gio.InputStream {505+func (x *Texture) Load(SizeVar int, TypeVar string, CancellableVar *gio.Cancellable) (*gio.InputStream, error) {
506+ var cls *gio.InputStream
507+ var cerr *glib.Error
481 508
482- LoadPtr := gio.XGLoadableIconLoad(x.GoPointer(), SizeVar, TypeVar, CancellableVar.GoPointer())509+ cret := gio.XGLoadableIconLoad(x.GoPointer(), SizeVar, TypeVar, CancellableVar.GoPointer(), &cerr)
483- if LoadPtr == 0 {
484- return nil
485- }
486 510
487- LoadCls := &gio.InputStream{}511+ if cret == 0 {
488- LoadCls.Ptr = LoadPtr512+ return cls, cerr
489- return LoadCls513+ }
514+ cls = &gio.InputStream{}
515+ cls.Ptr = cret
516+ if cerr == nil {
517+ return cls, nil
518+ }
519+ return cls, cerr
490 520
491 }521 }
492 522
@@ -500,16 +530,21 @@ func (x *Texture) LoadAsync(SizeVar int, CancellableVar *gio.Cancellable, Callba
500 }530 }
501 531
502 // Finishes an asynchronous icon load started in g_loadable_icon_load_async().532 // Finishes an asynchronous icon load started in g_loadable_icon_load_async().
503-func (x *Texture) LoadFinish(ResVar gio.AsyncResult, TypeVar string) *gio.InputStream {533+func (x *Texture) LoadFinish(ResVar gio.AsyncResult, TypeVar string) (*gio.InputStream, error) {
534+ var cls *gio.InputStream
535+ var cerr *glib.Error
504 536
505- LoadFinishPtr := gio.XGLoadableIconLoadFinish(x.GoPointer(), ResVar.GoPointer(), TypeVar)537+ cret := gio.XGLoadableIconLoadFinish(x.GoPointer(), ResVar.GoPointer(), TypeVar, &cerr)
506- if LoadFinishPtr == 0 {
507- return nil
508- }
509 538
510- LoadFinishCls := &gio.InputStream{}539+ if cret == 0 {
511- LoadFinishCls.Ptr = LoadFinishPtr540+ return cls, cerr
512- return LoadFinishCls541+ }
542+ cls = &gio.InputStream{}
543+ cls.Ptr = cret
544+ if cerr == nil {
545+ return cls, nil
546+ }
547+ return cls, cerr
513 548
514 }549 }
515 550
M v4/gdk/gdktoplevel.go +12 -12
@@ -82,8 +82,8 @@ func (x *ToplevelBase) Focus(TimestampVar uint32) {
82 // from the `GdkToplevelState` enumeration.82 // from the `GdkToplevelState` enumeration.
83 func (x *ToplevelBase) GetState() ToplevelState {83 func (x *ToplevelBase) GetState() ToplevelState {
84 84
85- return XGdkToplevelGetState(x.GoPointer())85+ cret := XGdkToplevelGetState(x.GoPointer())
86-86+ return cret
87 }87 }
88 88
89 // Requests that the @toplevel inhibit the system shortcuts.89 // Requests that the @toplevel inhibit the system shortcuts.
@@ -118,8 +118,8 @@ func (x *ToplevelBase) InhibitSystemShortcuts(EventVar *Event) {
118 // The windowing system may choose to ignore the request.118 // The windowing system may choose to ignore the request.
119 func (x *ToplevelBase) Lower() bool {119 func (x *ToplevelBase) Lower() bool {
120 120
121- return XGdkToplevelLower(x.GoPointer())121+ cret := XGdkToplevelLower(x.GoPointer())
122-122+ return cret
123 }123 }
124 124
125 // Asks to minimize the @toplevel.125 // Asks to minimize the @toplevel.
@@ -127,8 +127,8 @@ func (x *ToplevelBase) Lower() bool {
127 // The windowing system may choose to ignore the request.127 // The windowing system may choose to ignore the request.
128 func (x *ToplevelBase) Minimize() bool {128 func (x *ToplevelBase) Minimize() bool {
129 129
130- return XGdkToplevelMinimize(x.GoPointer())130+ cret := XGdkToplevelMinimize(x.GoPointer())
131-131+ return cret
132 }132 }
133 133
134 // Present @toplevel after having processed the `GdkToplevelLayout` rules.134 // Present @toplevel after having processed the `GdkToplevelLayout` rules.
@@ -253,22 +253,22 @@ func (x *ToplevelBase) SetTransientFor(ParentVar *Surface) {
253 // right-click on the window decorations.253 // right-click on the window decorations.
254 func (x *ToplevelBase) ShowWindowMenu(EventVar *Event) bool {254 func (x *ToplevelBase) ShowWindowMenu(EventVar *Event) bool {
255 255
256- return XGdkToplevelShowWindowMenu(x.GoPointer(), EventVar.GoPointer())256+ cret := XGdkToplevelShowWindowMenu(x.GoPointer(), EventVar.GoPointer())
257-257+ return cret
258 }258 }
259 259
260 // Returns whether the desktop environment supports260 // Returns whether the desktop environment supports
261 // tiled window states.261 // tiled window states.
262 func (x *ToplevelBase) SupportsEdgeConstraints() bool {262 func (x *ToplevelBase) SupportsEdgeConstraints() bool {
263 263
264- return XGdkToplevelSupportsEdgeConstraints(x.GoPointer())264+ cret := XGdkToplevelSupportsEdgeConstraints(x.GoPointer())
265-265+ return cret
266 }266 }
267 267
268 func (x *ToplevelBase) TitlebarGesture(GestureVar TitlebarGesture) bool {268 func (x *ToplevelBase) TitlebarGesture(GestureVar TitlebarGesture) bool {
269 269
270- return XGdkToplevelTitlebarGesture(x.GoPointer(), GestureVar)270+ cret := XGdkToplevelTitlebarGesture(x.GoPointer(), GestureVar)
271-271+ return cret
272 }272 }
273 273
274 var XGdkToplevelBeginMove func(uintptr, uintptr, int, float64, float64, uint32)274 var XGdkToplevelBeginMove func(uintptr, uintptr, int, float64, float64, uint32)
M v4/gdk/gdktoplevelsize.go +2 -2
@@ -15,8 +15,8 @@ var xToplevelSizeGetType func() []interface{}
15 15
16 func ToplevelSizeGetType() []interface{} {16 func ToplevelSizeGetType() []interface{} {
17 17
18- return xToplevelSizeGetType()18+ cret := xToplevelSizeGetType()
19-19+ return cret
20 }20 }
21 21
22 func init() {22 func init() {
M v4/gdk/gdkvulkancontext.go +8 -2
@@ -4,6 +4,7 @@ package gdk
4 import (4 import (
5 "github.com/jwijenbergh/purego"5 "github.com/jwijenbergh/purego"
6 "github.com/jwijenbergh/puregotk/v4/gio"6 "github.com/jwijenbergh/puregotk/v4/gio"
7+ "github.com/jwijenbergh/puregotk/v4/glib"
7 "github.com/jwijenbergh/puregotk/v4/gobject"8 "github.com/jwijenbergh/puregotk/v4/gobject"
8 )9 )
9 10
@@ -87,8 +88,13 @@ func (x *VulkanContext) ConnectImagesUpdated(cb func(VulkanContext)) {
87 // In this pattern, a caller would expect to be able to call g_initable_init()88 // In this pattern, a caller would expect to be able to call g_initable_init()
88 // on the result of g_object_new(), regardless of whether it is in fact a new89 // on the result of g_object_new(), regardless of whether it is in fact a new
89 // instance.90 // instance.
90-func (x *VulkanContext) Init(CancellableVar *gio.Cancellable) bool {91+func (x *VulkanContext) Init(CancellableVar *gio.Cancellable) (bool, error) {
92+ var cerr *glib.Error
91 93
92- return gio.XGInitableInit(x.GoPointer(), CancellableVar.GoPointer())94+ cret := gio.XGInitableInit(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
95+ if cerr == nil {
96+ return cret, nil
97+ }
98+ return cret, cerr
93 99
94 }100 }
M v4/gdk/main.go +6 -6
@@ -21,24 +21,24 @@ var xGlErrorQuark func() glib.Quark
21 21
22 func GlErrorQuark() glib.Quark {22 func GlErrorQuark() glib.Quark {
23 23
24- return xGlErrorQuark()24+ cret := xGlErrorQuark()
25-25+ return cret
26 }26 }
27 27
28 var xTextureErrorQuark func() glib.Quark28 var xTextureErrorQuark func() glib.Quark
29 29
30 func TextureErrorQuark() glib.Quark {30 func TextureErrorQuark() glib.Quark {
31 31
32- return xTextureErrorQuark()32+ cret := xTextureErrorQuark()
33-33+ return cret
34 }34 }
35 35
36 var xVulkanErrorQuark func() glib.Quark36 var xVulkanErrorQuark func() glib.Quark
37 37
38 func VulkanErrorQuark() glib.Quark {38 func VulkanErrorQuark() glib.Quark {
39 39
40- return xVulkanErrorQuark()40+ cret := xVulkanErrorQuark()
41-41+ return cret
42 }42 }
43 43
44 func init() {44 func init() {
M v4/gdkpixbuf/gdk-pixbuf-animation.go +106 -80
@@ -46,7 +46,7 @@ func PixbufAnimationNewFromInternalPtr(ptr uintptr) *PixbufAnimation {
46 return cls46 return cls
47 }47 }
48 48
49-var xNewFromFilePixbufAnimation func(string) uintptr49+var xNewFromFilePixbufAnimation func(string, **glib.Error) uintptr
50 50
51 // Creates a new animation by loading it from a file.51 // Creates a new animation by loading it from a file.
52 //52 //
@@ -56,35 +56,49 @@ var xNewFromFilePixbufAnimation func(string) uintptr
56 // with a single frame will be created.56 // with a single frame will be created.
57 //57 //
58 // Possible errors are in the `GDK_PIXBUF_ERROR` and `G_FILE_ERROR` domains.58 // Possible errors are in the `GDK_PIXBUF_ERROR` and `G_FILE_ERROR` domains.
59-func NewFromFilePixbufAnimation(FilenameVar string) *PixbufAnimation {59+func NewFromFilePixbufAnimation(FilenameVar string) (*PixbufAnimation, error) {
60- NewFromFilePixbufAnimationPtr := xNewFromFilePixbufAnimation(FilenameVar)60+ var cls *PixbufAnimation
61- if NewFromFilePixbufAnimationPtr == 0 {61+ var cerr *glib.Error
62- return nil62+
63+ cret := xNewFromFilePixbufAnimation(FilenameVar, &cerr)
64+
65+ if cret == 0 {
66+ return cls, cerr
67+ }
68+ cls = &PixbufAnimation{}
69+ cls.Ptr = cret
70+ if cerr == nil {
71+ return cls, nil
63 }72 }
73+ return cls, cerr
64 74
65- NewFromFilePixbufAnimationCls := &PixbufAnimation{}
66- NewFromFilePixbufAnimationCls.Ptr = NewFromFilePixbufAnimationPtr
67- return NewFromFilePixbufAnimationCls
68 }75 }
69 76
70-var xNewFromResourcePixbufAnimation func(string) uintptr77+var xNewFromResourcePixbufAnimation func(string, **glib.Error) uintptr
71 78
72 // Creates a new pixbuf animation by loading an image from an resource.79 // Creates a new pixbuf animation by loading an image from an resource.
73 //80 //
74 // The file format is detected automatically. If `NULL` is returned, then81 // The file format is detected automatically. If `NULL` is returned, then
75 // @error will be set.82 // @error will be set.
76-func NewFromResourcePixbufAnimation(ResourcePathVar string) *PixbufAnimation {83+func NewFromResourcePixbufAnimation(ResourcePathVar string) (*PixbufAnimation, error) {
77- NewFromResourcePixbufAnimationPtr := xNewFromResourcePixbufAnimation(ResourcePathVar)84+ var cls *PixbufAnimation
78- if NewFromResourcePixbufAnimationPtr == 0 {85+ var cerr *glib.Error
79- return nil86+
87+ cret := xNewFromResourcePixbufAnimation(ResourcePathVar, &cerr)
88+
89+ if cret == 0 {
90+ return cls, cerr
80 }91 }
92+ cls = &PixbufAnimation{}
93+ cls.Ptr = cret
94+ if cerr == nil {
95+ return cls, nil
96+ }
97+ return cls, cerr
81 98
82- NewFromResourcePixbufAnimationCls := &PixbufAnimation{}
83- NewFromResourcePixbufAnimationCls.Ptr = NewFromResourcePixbufAnimationPtr
84- return NewFromResourcePixbufAnimationCls
85 }99 }
86 100
87-var xNewFromStreamPixbufAnimation func(uintptr, uintptr) uintptr101+var xNewFromStreamPixbufAnimation func(uintptr, uintptr, **glib.Error) uintptr
88 102
89 // Creates a new animation by loading it from an input stream.103 // Creates a new animation by loading it from an input stream.
90 //104 //
@@ -98,30 +112,44 @@ var xNewFromStreamPixbufAnimation func(uintptr, uintptr) uintptr
98 // `G_IO_ERROR` domains.112 // `G_IO_ERROR` domains.
99 //113 //
100 // The stream is not closed.114 // The stream is not closed.
101-func NewFromStreamPixbufAnimation(StreamVar *gio.InputStream, CancellableVar *gio.Cancellable) *PixbufAnimation {115+func NewFromStreamPixbufAnimation(StreamVar *gio.InputStream, CancellableVar *gio.Cancellable) (*PixbufAnimation, error) {
102- NewFromStreamPixbufAnimationPtr := xNewFromStreamPixbufAnimation(StreamVar.GoPointer(), CancellableVar.GoPointer())116+ var cls *PixbufAnimation
103- if NewFromStreamPixbufAnimationPtr == 0 {117+ var cerr *glib.Error
104- return nil118+
119+ cret := xNewFromStreamPixbufAnimation(StreamVar.GoPointer(), CancellableVar.GoPointer(), &cerr)
120+
121+ if cret == 0 {
122+ return cls, cerr
123+ }
124+ cls = &PixbufAnimation{}
125+ cls.Ptr = cret
126+ if cerr == nil {
127+ return cls, nil
105 }128 }
129+ return cls, cerr
106 130
107- NewFromStreamPixbufAnimationCls := &PixbufAnimation{}
108- NewFromStreamPixbufAnimationCls.Ptr = NewFromStreamPixbufAnimationPtr
109- return NewFromStreamPixbufAnimationCls
110 }131 }
111 132
112-var xNewFromStreamFinishPixbufAnimation func(uintptr) uintptr133+var xNewFromStreamFinishPixbufAnimation func(uintptr, **glib.Error) uintptr
113 134
114 // Finishes an asynchronous pixbuf animation creation operation started with135 // Finishes an asynchronous pixbuf animation creation operation started with
115 // [func@GdkPixbuf.PixbufAnimation.new_from_stream_async].136 // [func@GdkPixbuf.PixbufAnimation.new_from_stream_async].
116-func NewFromStreamFinishPixbufAnimation(AsyncResultVar gio.AsyncResult) *PixbufAnimation {137+func NewFromStreamFinishPixbufAnimation(AsyncResultVar gio.AsyncResult) (*PixbufAnimation, error) {
117- NewFromStreamFinishPixbufAnimationPtr := xNewFromStreamFinishPixbufAnimation(AsyncResultVar.GoPointer())138+ var cls *PixbufAnimation
118- if NewFromStreamFinishPixbufAnimationPtr == 0 {139+ var cerr *glib.Error
119- return nil140+
141+ cret := xNewFromStreamFinishPixbufAnimation(AsyncResultVar.GoPointer(), &cerr)
142+
143+ if cret == 0 {
144+ return cls, cerr
145+ }
146+ cls = &PixbufAnimation{}
147+ cls.Ptr = cret
148+ if cerr == nil {
149+ return cls, nil
120 }150 }
151+ return cls, cerr
121 152
122- NewFromStreamFinishPixbufAnimationCls := &PixbufAnimation{}
123- NewFromStreamFinishPixbufAnimationCls.Ptr = NewFromStreamFinishPixbufAnimationPtr
124- return NewFromStreamFinishPixbufAnimationCls
125 }153 }
126 154
127 var xPixbufAnimationGetHeight func(uintptr) int155 var xPixbufAnimationGetHeight func(uintptr) int
@@ -129,8 +157,8 @@ var xPixbufAnimationGetHeight func(uintptr) int
129 // Queries the height of the bounding box of a pixbuf animation.157 // Queries the height of the bounding box of a pixbuf animation.
130 func (x *PixbufAnimation) GetHeight() int {158 func (x *PixbufAnimation) GetHeight() int {
131 159
132- return xPixbufAnimationGetHeight(x.GoPointer())160+ cret := xPixbufAnimationGetHeight(x.GoPointer())
133-161+ return cret
134 }162 }
135 163
136 var xPixbufAnimationGetIter func(uintptr, *glib.TimeVal) uintptr164 var xPixbufAnimationGetIter func(uintptr, *glib.TimeVal) uintptr
@@ -170,16 +198,16 @@ var xPixbufAnimationGetIter func(uintptr, *glib.TimeVal) uintptr
170 //198 //
171 // A delay time of -1 is possible, indicating "infinite".199 // A delay time of -1 is possible, indicating "infinite".
172 func (x *PixbufAnimation) GetIter(StartTimeVar *glib.TimeVal) *PixbufAnimationIter {200 func (x *PixbufAnimation) GetIter(StartTimeVar *glib.TimeVal) *PixbufAnimationIter {
201+ var cls *PixbufAnimationIter
173 202
174- GetIterPtr := xPixbufAnimationGetIter(x.GoPointer(), StartTimeVar)203+ cret := xPixbufAnimationGetIter(x.GoPointer(), StartTimeVar)
175- if GetIterPtr == 0 {
176- return nil
177- }
178-
179- GetIterCls := &PixbufAnimationIter{}
180- GetIterCls.Ptr = GetIterPtr
181- return GetIterCls
182 204
205+ if cret == 0 {
206+ return cls
207+ }
208+ cls = &PixbufAnimationIter{}
209+ cls.Ptr = cret
210+ return cls
183 }211 }
184 212
185 var xPixbufAnimationGetStaticImage func(uintptr) uintptr213 var xPixbufAnimationGetStaticImage func(uintptr) uintptr
@@ -196,18 +224,17 @@ var xPixbufAnimationGetStaticImage func(uintptr) uintptr
196 // If an animation hasn't loaded any frames yet, this function will224 // If an animation hasn't loaded any frames yet, this function will
197 // return `NULL`.225 // return `NULL`.
198 func (x *PixbufAnimation) GetStaticImage() *Pixbuf {226 func (x *PixbufAnimation) GetStaticImage() *Pixbuf {
227+ var cls *Pixbuf
199 228
200- GetStaticImagePtr := xPixbufAnimationGetStaticImage(x.GoPointer())229+ cret := xPixbufAnimationGetStaticImage(x.GoPointer())
201- if GetStaticImagePtr == 0 {
202- return nil
203- }
204-
205- gobject.IncreaseRef(GetStaticImagePtr)
206-
207- GetStaticImageCls := &Pixbuf{}
208- GetStaticImageCls.Ptr = GetStaticImagePtr
209- return GetStaticImageCls
210 230
231+ if cret == 0 {
232+ return cls
233+ }
234+ gobject.IncreaseRef(cret)
235+ cls = &Pixbuf{}
236+ cls.Ptr = cret
237+ return cls
211 }238 }
212 239
213 var xPixbufAnimationGetWidth func(uintptr) int240 var xPixbufAnimationGetWidth func(uintptr) int
@@ -215,8 +242,8 @@ var xPixbufAnimationGetWidth func(uintptr) int
215 // Queries the width of the bounding box of a pixbuf animation.242 // Queries the width of the bounding box of a pixbuf animation.
216 func (x *PixbufAnimation) GetWidth() int {243 func (x *PixbufAnimation) GetWidth() int {
217 244
218- return xPixbufAnimationGetWidth(x.GoPointer())245+ cret := xPixbufAnimationGetWidth(x.GoPointer())
219-246+ return cret
220 }247 }
221 248
222 var xPixbufAnimationIsStaticImage func(uintptr) bool249 var xPixbufAnimationIsStaticImage func(uintptr) bool
@@ -229,24 +256,24 @@ var xPixbufAnimationIsStaticImage func(uintptr) bool
229 // the image.256 // the image.
230 func (x *PixbufAnimation) IsStaticImage() bool {257 func (x *PixbufAnimation) IsStaticImage() bool {
231 258
232- return xPixbufAnimationIsStaticImage(x.GoPointer())259+ cret := xPixbufAnimationIsStaticImage(x.GoPointer())
233-260+ return cret
234 }261 }
235 262
236 var xPixbufAnimationRef func(uintptr) uintptr263 var xPixbufAnimationRef func(uintptr) uintptr
237 264
238 // Adds a reference to an animation.265 // Adds a reference to an animation.
239 func (x *PixbufAnimation) Ref() *PixbufAnimation {266 func (x *PixbufAnimation) Ref() *PixbufAnimation {
267+ var cls *PixbufAnimation
240 268
241- RefPtr := xPixbufAnimationRef(x.GoPointer())269+ cret := xPixbufAnimationRef(x.GoPointer())
242- if RefPtr == 0 {
243- return nil
244- }
245-
246- RefCls := &PixbufAnimation{}
247- RefCls.Ptr = RefPtr
248- return RefCls
249 270
271+ if cret == 0 {
272+ return cls
273+ }
274+ cls = &PixbufAnimation{}
275+ cls.Ptr = cret
276+ return cls
250 }277 }
251 278
252 var xPixbufAnimationUnref func(uintptr)279 var xPixbufAnimationUnref func(uintptr)
@@ -303,8 +330,8 @@ var xPixbufAnimationIterAdvance func(uintptr, *glib.TimeVal) bool
303 // and update the display with the new pixbuf.330 // and update the display with the new pixbuf.
304 func (x *PixbufAnimationIter) Advance(CurrentTimeVar *glib.TimeVal) bool {331 func (x *PixbufAnimationIter) Advance(CurrentTimeVar *glib.TimeVal) bool {
305 332
306- return xPixbufAnimationIterAdvance(x.GoPointer(), CurrentTimeVar)333+ cret := xPixbufAnimationIterAdvance(x.GoPointer(), CurrentTimeVar)
307-334+ return cret
308 }335 }
309 336
310 var xPixbufAnimationIterGetDelayTime func(uintptr) int337 var xPixbufAnimationIterGetDelayTime func(uintptr) int
@@ -320,8 +347,8 @@ var xPixbufAnimationIterGetDelayTime func(uintptr) int
320 // for GIF images is currently 20 milliseconds.347 // for GIF images is currently 20 milliseconds.
321 func (x *PixbufAnimationIter) GetDelayTime() int {348 func (x *PixbufAnimationIter) GetDelayTime() int {
322 349
323- return xPixbufAnimationIterGetDelayTime(x.GoPointer())350+ cret := xPixbufAnimationIterGetDelayTime(x.GoPointer())
324-351+ return cret
325 }352 }
326 353
327 var xPixbufAnimationIterGetPixbuf func(uintptr) uintptr354 var xPixbufAnimationIterGetPixbuf func(uintptr) uintptr
@@ -342,18 +369,17 @@ var xPixbufAnimationIterGetPixbuf func(uintptr) uintptr
342 // Copy the pixbuf to keep it (don't just add a reference), as it may get369 // Copy the pixbuf to keep it (don't just add a reference), as it may get
343 // recycled as you advance the iterator.370 // recycled as you advance the iterator.
344 func (x *PixbufAnimationIter) GetPixbuf() *Pixbuf {371 func (x *PixbufAnimationIter) GetPixbuf() *Pixbuf {
372+ var cls *Pixbuf
345 373
346- GetPixbufPtr := xPixbufAnimationIterGetPixbuf(x.GoPointer())374+ cret := xPixbufAnimationIterGetPixbuf(x.GoPointer())
347- if GetPixbufPtr == 0 {
348- return nil
349- }
350-
351- gobject.IncreaseRef(GetPixbufPtr)
352-
353- GetPixbufCls := &Pixbuf{}
354- GetPixbufCls.Ptr = GetPixbufPtr
355- return GetPixbufCls
356 375
376+ if cret == 0 {
377+ return cls
378+ }
379+ gobject.IncreaseRef(cret)
380+ cls = &Pixbuf{}
381+ cls.Ptr = cret
382+ return cls
357 }383 }
358 384
359 var xPixbufAnimationIterOnCurrentlyLoadingFrame func(uintptr) bool385 var xPixbufAnimationIterOnCurrentlyLoadingFrame func(uintptr) bool
@@ -366,8 +392,8 @@ var xPixbufAnimationIterOnCurrentlyLoadingFrame func(uintptr) bool
366 // you will need to redraw the screen for the updated area.392 // you will need to redraw the screen for the updated area.
367 func (x *PixbufAnimationIter) OnCurrentlyLoadingFrame() bool {393 func (x *PixbufAnimationIter) OnCurrentlyLoadingFrame() bool {
368 394
369- return xPixbufAnimationIterOnCurrentlyLoadingFrame(x.GoPointer())395+ cret := xPixbufAnimationIterOnCurrentlyLoadingFrame(x.GoPointer())
370-396+ return cret
371 }397 }
372 398
373 func (c *PixbufAnimationIter) GoPointer() uintptr {399 func (c *PixbufAnimationIter) GoPointer() uintptr {
M v4/gdkpixbuf/gdk-pixbuf-io.go +19 -16
@@ -1,7 +1,10 @@
1 // Package gdkpixbuf was automatically generated by github.com/jwijenbergh/puregotk DO NOT EDIT1 // Package gdkpixbuf was automatically generated by github.com/jwijenbergh/puregotk DO NOT EDIT
2 package gdkpixbuf2 package gdkpixbuf
3 3
4-import "github.com/jwijenbergh/puregotk/v4/gmodule"4+import (
5+ "github.com/jwijenbergh/puregotk/v4/glib"
6+ "github.com/jwijenbergh/puregotk/v4/gmodule"
7+)
5 8
6 // Sets up the image loading state.9 // Sets up the image loading state.
7 //10 //
@@ -12,7 +15,7 @@ import "github.com/jwijenbergh/puregotk/v4/gmodule"
12 // from this function; the state object will then be updated from the15 // from this function; the state object will then be updated from the
13 // [callback@GdkPixbuf.PixbufModuleIncrementLoadFunc] callback, and will be freed16 // [callback@GdkPixbuf.PixbufModuleIncrementLoadFunc] callback, and will be freed
14 // by [callback@GdkPixbuf.PixbufModuleStopLoadFunc] callback.17 // by [callback@GdkPixbuf.PixbufModuleStopLoadFunc] callback.
15-type PixbufModuleBeginLoadFunc func(uintptr, uintptr, uintptr, uintptr) uintptr18+type PixbufModuleBeginLoadFunc func(uintptr, uintptr, uintptr, uintptr, **glib.Error) uintptr
16 19
17 // Defines the type of the function used to fill a20 // Defines the type of the function used to fill a
18 // #GdkPixbufFormat structure with information about a module.21 // #GdkPixbufFormat structure with information about a module.
@@ -23,17 +26,17 @@ type PixbufModuleFillInfoFunc func(*PixbufFormat)
23 type PixbufModuleFillVtableFunc func(*PixbufModule)26 type PixbufModuleFillVtableFunc func(*PixbufModule)
24 27
25 // Incrementally loads a buffer into the image data.28 // Incrementally loads a buffer into the image data.
26-type PixbufModuleIncrementLoadFunc func(uintptr, uintptr, uint) bool29+type PixbufModuleIncrementLoadFunc func(uintptr, uintptr, uint, **glib.Error) bool
27 30
28 // Loads a file from a standard C file stream into a new `GdkPixbufAnimation`.31 // Loads a file from a standard C file stream into a new `GdkPixbufAnimation`.
29 //32 //
30 // In case of error, this function should return `NULL` and set the `error` argument.33 // In case of error, this function should return `NULL` and set the `error` argument.
31-type PixbufModuleLoadAnimationFunc func(uintptr) uintptr34+type PixbufModuleLoadAnimationFunc func(uintptr, **glib.Error) uintptr
32 35
33 // Loads a file from a standard C file stream into a new `GdkPixbuf`.36 // Loads a file from a standard C file stream into a new `GdkPixbuf`.
34 //37 //
35 // In case of error, this function should return `NULL` and set the `error` argument.38 // In case of error, this function should return `NULL` and set the `error` argument.
36-type PixbufModuleLoadFunc func(uintptr) uintptr39+type PixbufModuleLoadFunc func(uintptr, **glib.Error) uintptr
37 40
38 // Loads XPM data into a new `GdkPixbuf`.41 // Loads XPM data into a new `GdkPixbuf`.
39 type PixbufModuleLoadXpmDataFunc func(uintptr) uintptr42 type PixbufModuleLoadXpmDataFunc func(uintptr) uintptr
@@ -51,14 +54,14 @@ type PixbufModulePreparedFunc func(uintptr, uintptr, uintptr)
51 // The optional `option_keys` and `option_values` arrays contain the keys and54 // The optional `option_keys` and `option_values` arrays contain the keys and
52 // values (in the same order) for attributes to be saved alongside the image55 // values (in the same order) for attributes to be saved alongside the image
53 // data.56 // data.
54-type PixbufModuleSaveCallbackFunc func(uintptr, uintptr, uintptr, uintptr, uintptr) bool57+type PixbufModuleSaveCallbackFunc func(uintptr, uintptr, uintptr, uintptr, uintptr, **glib.Error) bool
55 58
56 // Saves a `GdkPixbuf` into a standard C file stream.59 // Saves a `GdkPixbuf` into a standard C file stream.
57 //60 //
58 // The optional `param_keys` and `param_values` arrays contain the keys and61 // The optional `param_keys` and `param_values` arrays contain the keys and
59 // values (in the same order) for attributes to be saved alongside the image62 // values (in the same order) for attributes to be saved alongside the image
60 // data.63 // data.
61-type PixbufModuleSaveFunc func(uintptr, uintptr, uintptr, uintptr) bool64+type PixbufModuleSaveFunc func(uintptr, uintptr, uintptr, uintptr, **glib.Error) bool
62 65
63 // Checks whether the given `option_key` is supported when saving.66 // Checks whether the given `option_key` is supported when saving.
64 type PixbufModuleSaveOptionSupportedFunc func(string) bool67 type PixbufModuleSaveOptionSupportedFunc func(string) bool
@@ -81,7 +84,7 @@ type PixbufModuleSizeFunc func(int, int, uintptr)
81 // Finalizes the image loading state.84 // Finalizes the image loading state.
82 //85 //
83 // This function is called on success and error states.86 // This function is called on success and error states.
84-type PixbufModuleStopLoadFunc func(uintptr) bool87+type PixbufModuleStopLoadFunc func(uintptr, **glib.Error) bool
85 88
86 // Defines the type of the function that gets called every time a region89 // Defines the type of the function that gets called every time a region
87 // of @pixbuf is updated.90 // of @pixbuf is updated.
@@ -97,13 +100,13 @@ type PixbufModuleUpdatedFunc func(uintptr, int, int, int, int, uintptr)
97 // Only modules should access the fields directly, applications should100 // Only modules should access the fields directly, applications should
98 // use the `gdk_pixbuf_format_*` family of functions.101 // use the `gdk_pixbuf_format_*` family of functions.
99 type PixbufFormat struct {102 type PixbufFormat struct {
100- Name string103+ Name uintptr
101 104
102 Signature *PixbufModulePattern105 Signature *PixbufModulePattern
103 106
104- Domain string107+ Domain uintptr
105 108
106- Description string109+ Description uintptr
107 110
108 MimeTypes uintptr111 MimeTypes uintptr
109 112
@@ -113,7 +116,7 @@ type PixbufFormat struct {
113 116
114 Disabled bool117 Disabled bool
115 118
116- License string119+ License uintptr
117 }120 }
118 121
119 // A `GdkPixbufModule` contains the necessary functions to load and save122 // A `GdkPixbufModule` contains the necessary functions to load and save
@@ -162,9 +165,9 @@ type PixbufFormat struct {
162 // `$libdir/gdk-pixbuf-2.0/$version/loaders.cache`, unless overridden165 // `$libdir/gdk-pixbuf-2.0/$version/loaders.cache`, unless overridden
163 // by the environment variable `GDK_PIXBUF_MODULE_FILE`)166 // by the environment variable `GDK_PIXBUF_MODULE_FILE`)
164 type PixbufModule struct {167 type PixbufModule struct {
165- ModuleName string168+ ModuleName uintptr
166 169
167- ModulePath string170+ ModulePath uintptr
168 171
169 Module *gmodule.Module172 Module *gmodule.Module
170 173
@@ -222,9 +225,9 @@ type PixbufModule struct {
222 // In the example above, the signature matches e.g. "auud\0" with225 // In the example above, the signature matches e.g. "auud\0" with
223 // relevance 100, and "blau" with relevance 90.226 // relevance 100, and "blau" with relevance 90.
224 type PixbufModulePattern struct {227 type PixbufModulePattern struct {
225- Prefix string228+ Prefix uintptr
226 229
227- Mask string230+ Mask uintptr
228 231
229 Relevance int232 Relevance int
230 }233 }
M v4/gdkpixbuf/gdk-pixbuf-loader.go +82 -53
@@ -71,17 +71,19 @@ var xNewPixbufLoader func() uintptr
71 71
72 // Creates a new pixbuf loader object.72 // Creates a new pixbuf loader object.
73 func NewPixbufLoader() *PixbufLoader {73 func NewPixbufLoader() *PixbufLoader {
74- NewPixbufLoaderPtr := xNewPixbufLoader()74+ var cls *PixbufLoader
75- if NewPixbufLoaderPtr == 0 {75+
76- return nil76+ cret := xNewPixbufLoader()
77- }
78 77
79- NewPixbufLoaderCls := &PixbufLoader{}78+ if cret == 0 {
80- NewPixbufLoaderCls.Ptr = NewPixbufLoaderPtr79+ return cls
81- return NewPixbufLoaderCls80+ }
81+ cls = &PixbufLoader{}
82+ cls.Ptr = cret
83+ return cls
82 }84 }
83 85
84-var xNewWithMimeTypePixbufLoader func(string) uintptr86+var xNewWithMimeTypePixbufLoader func(string, **glib.Error) uintptr
85 87
86 // Creates a new pixbuf loader object that always attempts to parse88 // Creates a new pixbuf loader object that always attempts to parse
87 // image data as if it were an image of MIME type @mime_type, instead of89 // image data as if it were an image of MIME type @mime_type, instead of
@@ -98,18 +100,25 @@ var xNewWithMimeTypePixbufLoader func(string) uintptr
98 // To obtain the full list of supported mime types, call100 // To obtain the full list of supported mime types, call
99 // gdk_pixbuf_format_get_mime_types() on each of the #GdkPixbufFormat101 // gdk_pixbuf_format_get_mime_types() on each of the #GdkPixbufFormat
100 // structs returned by gdk_pixbuf_get_formats().102 // structs returned by gdk_pixbuf_get_formats().
101-func NewWithMimeTypePixbufLoader(MimeTypeVar string) *PixbufLoader {103+func NewWithMimeTypePixbufLoader(MimeTypeVar string) (*PixbufLoader, error) {
102- NewWithMimeTypePixbufLoaderPtr := xNewWithMimeTypePixbufLoader(MimeTypeVar)104+ var cls *PixbufLoader
103- if NewWithMimeTypePixbufLoaderPtr == 0 {105+ var cerr *glib.Error
104- return nil106+
107+ cret := xNewWithMimeTypePixbufLoader(MimeTypeVar, &cerr)
108+
109+ if cret == 0 {
110+ return cls, cerr
105 }111 }
112+ cls = &PixbufLoader{}
113+ cls.Ptr = cret
114+ if cerr == nil {
115+ return cls, nil
116+ }
117+ return cls, cerr
106 118
107- NewWithMimeTypePixbufLoaderCls := &PixbufLoader{}
108- NewWithMimeTypePixbufLoaderCls.Ptr = NewWithMimeTypePixbufLoaderPtr
109- return NewWithMimeTypePixbufLoaderCls
110 }119 }
111 120
112-var xNewWithTypePixbufLoader func(string) uintptr121+var xNewWithTypePixbufLoader func(string, **glib.Error) uintptr
113 122
114 // Creates a new pixbuf loader object that always attempts to parse123 // Creates a new pixbuf loader object that always attempts to parse
115 // image data as if it were an image of type @image_type, instead of124 // image data as if it were an image of type @image_type, instead of
@@ -125,15 +134,22 @@ var xNewWithTypePixbufLoader func(string) uintptr
125 // "xpm" are among the supported formats. To obtain the full list of134 // "xpm" are among the supported formats. To obtain the full list of
126 // supported image formats, call gdk_pixbuf_format_get_name() on each135 // supported image formats, call gdk_pixbuf_format_get_name() on each
127 // of the #GdkPixbufFormat structs returned by gdk_pixbuf_get_formats().136 // of the #GdkPixbufFormat structs returned by gdk_pixbuf_get_formats().
128-func NewWithTypePixbufLoader(ImageTypeVar string) *PixbufLoader {137+func NewWithTypePixbufLoader(ImageTypeVar string) (*PixbufLoader, error) {
129- NewWithTypePixbufLoaderPtr := xNewWithTypePixbufLoader(ImageTypeVar)138+ var cls *PixbufLoader
130- if NewWithTypePixbufLoaderPtr == 0 {139+ var cerr *glib.Error
131- return nil140+
141+ cret := xNewWithTypePixbufLoader(ImageTypeVar, &cerr)
142+
143+ if cret == 0 {
144+ return cls, cerr
132 }145 }
146+ cls = &PixbufLoader{}
147+ cls.Ptr = cret
148+ if cerr == nil {
149+ return cls, nil
150+ }
151+ return cls, cerr
133 152
134- NewWithTypePixbufLoaderCls := &PixbufLoader{}
135- NewWithTypePixbufLoaderCls.Ptr = NewWithTypePixbufLoaderPtr
136- return NewWithTypePixbufLoaderCls
137 }153 }
138 154
139 var xPixbufLoaderClose func(uintptr) bool155 var xPixbufLoaderClose func(uintptr) bool
@@ -153,9 +169,14 @@ var xPixbufLoaderClose func(uintptr) bool
153 //169 //
154 // Remember that this function does not release a reference on the loader, so170 // Remember that this function does not release a reference on the loader, so
155 // you will need to explicitly release any reference you hold.171 // you will need to explicitly release any reference you hold.
156-func (x *PixbufLoader) Close() bool {172+func (x *PixbufLoader) Close() (bool, error) {
173+ var cerr *glib.Error
157 174
158- return xPixbufLoaderClose(x.GoPointer())175+ cret := xPixbufLoaderClose(x.GoPointer())
176+ if cerr == nil {
177+ return cret, nil
178+ }
179+ return cret, cerr
159 180
160 }181 }
161 182
@@ -170,18 +191,17 @@ var xPixbufLoaderGetAnimation func(uintptr) uintptr
170 // If the loader doesn't have enough bytes yet, and hasn't emitted the `area-prepared`191 // If the loader doesn't have enough bytes yet, and hasn't emitted the `area-prepared`
171 // signal, this function will return `NULL`.192 // signal, this function will return `NULL`.
172 func (x *PixbufLoader) GetAnimation() *PixbufAnimation {193 func (x *PixbufLoader) GetAnimation() *PixbufAnimation {
194+ var cls *PixbufAnimation
173 195
174- GetAnimationPtr := xPixbufLoaderGetAnimation(x.GoPointer())196+ cret := xPixbufLoaderGetAnimation(x.GoPointer())
175- if GetAnimationPtr == 0 {
176- return nil
177- }
178-
179- gobject.IncreaseRef(GetAnimationPtr)
180-
181- GetAnimationCls := &PixbufAnimation{}
182- GetAnimationCls.Ptr = GetAnimationPtr
183- return GetAnimationCls
184 197
198+ if cret == 0 {
199+ return cls
200+ }
201+ gobject.IncreaseRef(cret)
202+ cls = &PixbufAnimation{}
203+ cls.Ptr = cret
204+ return cls
185 }205 }
186 206
187 var xPixbufLoaderGetFormat func(uintptr) *PixbufFormat207 var xPixbufLoaderGetFormat func(uintptr) *PixbufFormat
@@ -190,8 +210,8 @@ var xPixbufLoaderGetFormat func(uintptr) *PixbufFormat
190 // currently loading image file.210 // currently loading image file.
191 func (x *PixbufLoader) GetFormat() *PixbufFormat {211 func (x *PixbufLoader) GetFormat() *PixbufFormat {
192 212
193- return xPixbufLoaderGetFormat(x.GoPointer())213+ cret := xPixbufLoaderGetFormat(x.GoPointer())
194-214+ return cret
195 }215 }
196 216
197 var xPixbufLoaderGetPixbuf func(uintptr) uintptr217 var xPixbufLoaderGetPixbuf func(uintptr) uintptr
@@ -212,18 +232,17 @@ var xPixbufLoaderGetPixbuf func(uintptr) uintptr
212 // Additionally, if the loader is an animation, it will return the "static232 // Additionally, if the loader is an animation, it will return the "static
213 // image" of the animation (see gdk_pixbuf_animation_get_static_image()).233 // image" of the animation (see gdk_pixbuf_animation_get_static_image()).
214 func (x *PixbufLoader) GetPixbuf() *Pixbuf {234 func (x *PixbufLoader) GetPixbuf() *Pixbuf {
235+ var cls *Pixbuf
215 236
216- GetPixbufPtr := xPixbufLoaderGetPixbuf(x.GoPointer())237+ cret := xPixbufLoaderGetPixbuf(x.GoPointer())
217- if GetPixbufPtr == 0 {
218- return nil
219- }
220-
221- gobject.IncreaseRef(GetPixbufPtr)
222-
223- GetPixbufCls := &Pixbuf{}
224- GetPixbufCls.Ptr = GetPixbufPtr
225- return GetPixbufCls
226 238
239+ if cret == 0 {
240+ return cls
241+ }
242+ gobject.IncreaseRef(cret)
243+ cls = &Pixbuf{}
244+ cls.Ptr = cret
245+ return cls
227 }246 }
228 247
229 var xPixbufLoaderSetSize func(uintptr, int, int)248 var xPixbufLoaderSetSize func(uintptr, int, int)
@@ -242,21 +261,31 @@ func (x *PixbufLoader) SetSize(WidthVar int, HeightVar int) {
242 261
243 }262 }
244 263
245-var xPixbufLoaderWrite func(uintptr, uintptr, uint) bool264+var xPixbufLoaderWrite func(uintptr, uintptr, uint, **glib.Error) bool
246 265
247 // Parses the next `count` bytes in the given image buffer.266 // Parses the next `count` bytes in the given image buffer.
248-func (x *PixbufLoader) Write(BufVar uintptr, CountVar uint) bool {267+func (x *PixbufLoader) Write(BufVar uintptr, CountVar uint) (bool, error) {
268+ var cerr *glib.Error
249 269
250- return xPixbufLoaderWrite(x.GoPointer(), BufVar, CountVar)270+ cret := xPixbufLoaderWrite(x.GoPointer(), BufVar, CountVar, &cerr)
271+ if cerr == nil {
272+ return cret, nil
273+ }
274+ return cret, cerr
251 275
252 }276 }
253 277
254-var xPixbufLoaderWriteBytes func(uintptr, *glib.Bytes) bool278+var xPixbufLoaderWriteBytes func(uintptr, *glib.Bytes, **glib.Error) bool
255 279
256 // Parses the next contents of the given image buffer.280 // Parses the next contents of the given image buffer.
257-func (x *PixbufLoader) WriteBytes(BufferVar *glib.Bytes) bool {281+func (x *PixbufLoader) WriteBytes(BufferVar *glib.Bytes) (bool, error) {
282+ var cerr *glib.Error
258 283
259- return xPixbufLoaderWriteBytes(x.GoPointer(), BufferVar)284+ cret := xPixbufLoaderWriteBytes(x.GoPointer(), BufferVar, &cerr)
285+ if cerr == nil {
286+ return cret, nil
287+ }
288+ return cret, cerr
260 289
261 }290 }
262 291
M v4/gdkpixbuf/gdk-pixbuf-simple-anim.go +11 -9
@@ -24,14 +24,16 @@ var xNewPixbufSimpleAnim func(int, int, float32) uintptr
24 24
25 // Creates a new, empty animation.25 // Creates a new, empty animation.
26 func NewPixbufSimpleAnim(WidthVar int, HeightVar int, RateVar float32) *PixbufSimpleAnim {26 func NewPixbufSimpleAnim(WidthVar int, HeightVar int, RateVar float32) *PixbufSimpleAnim {
27- NewPixbufSimpleAnimPtr := xNewPixbufSimpleAnim(WidthVar, HeightVar, RateVar)27+ var cls *PixbufSimpleAnim
28- if NewPixbufSimpleAnimPtr == 0 {28+
29- return nil29+ cret := xNewPixbufSimpleAnim(WidthVar, HeightVar, RateVar)
30- }
31 30
32- NewPixbufSimpleAnimCls := &PixbufSimpleAnim{}31+ if cret == 0 {
33- NewPixbufSimpleAnimCls.Ptr = NewPixbufSimpleAnimPtr32+ return cls
34- return NewPixbufSimpleAnimCls33+ }
34+ cls = &PixbufSimpleAnim{}
35+ cls.Ptr = cret
36+ return cls
35 }37 }
36 38
37 var xPixbufSimpleAnimAddFrame func(uintptr, uintptr)39 var xPixbufSimpleAnimAddFrame func(uintptr, uintptr)
@@ -50,8 +52,8 @@ var xPixbufSimpleAnimGetLoop func(uintptr) bool
50 // Gets whether @animation should loop indefinitely when it reaches the end.52 // Gets whether @animation should loop indefinitely when it reaches the end.
51 func (x *PixbufSimpleAnim) GetLoop() bool {53 func (x *PixbufSimpleAnim) GetLoop() bool {
52 54
53- return xPixbufSimpleAnimGetLoop(x.GoPointer())55+ cret := xPixbufSimpleAnimGetLoop(x.GoPointer())
54-56+ return cret
55 }57 }
56 58
57 var xPixbufSimpleAnimSetLoop func(uintptr, bool)59 var xPixbufSimpleAnimSetLoop func(uintptr, bool)
M v4/gdkpixbuf/gdk-pixbuf.go +349 -248
@@ -166,14 +166,16 @@ var xNewPixbuf func(Colorspace, bool, int, int, int) uintptr
166 // The buffer has an optimal rowstride. Note that the buffer is not cleared;166 // The buffer has an optimal rowstride. Note that the buffer is not cleared;
167 // you will have to fill it completely yourself.167 // you will have to fill it completely yourself.
168 func NewPixbuf(ColorspaceVar Colorspace, HasAlphaVar bool, BitsPerSampleVar int, WidthVar int, HeightVar int) *Pixbuf {168 func NewPixbuf(ColorspaceVar Colorspace, HasAlphaVar bool, BitsPerSampleVar int, WidthVar int, HeightVar int) *Pixbuf {
169- NewPixbufPtr := xNewPixbuf(ColorspaceVar, HasAlphaVar, BitsPerSampleVar, WidthVar, HeightVar)169+ var cls *Pixbuf
170- if NewPixbufPtr == 0 {170+
171- return nil171+ cret := xNewPixbuf(ColorspaceVar, HasAlphaVar, BitsPerSampleVar, WidthVar, HeightVar)
172- }
173 172
174- NewPixbufCls := &Pixbuf{}173+ if cret == 0 {
175- NewPixbufCls.Ptr = NewPixbufPtr174+ return cls
176- return NewPixbufCls175+ }
176+ cls = &Pixbuf{}
177+ cls.Ptr = cret
178+ return cls
177 }179 }
178 180
179 var xNewFromBytesPixbuf func(*glib.Bytes, Colorspace, bool, int, int, int, int) uintptr181 var xNewFromBytesPixbuf func(*glib.Bytes, Colorspace, bool, int, int, int, int) uintptr
@@ -185,14 +187,16 @@ var xNewFromBytesPixbuf func(*glib.Bytes, Colorspace, bool, int, int, int, int)
185 // This is the `GBytes` variant of gdk_pixbuf_new_from_data(), useful187 // This is the `GBytes` variant of gdk_pixbuf_new_from_data(), useful
186 // for language bindings.188 // for language bindings.
187 func NewFromBytesPixbuf(DataVar *glib.Bytes, ColorspaceVar Colorspace, HasAlphaVar bool, BitsPerSampleVar int, WidthVar int, HeightVar int, RowstrideVar int) *Pixbuf {189 func NewFromBytesPixbuf(DataVar *glib.Bytes, ColorspaceVar Colorspace, HasAlphaVar bool, BitsPerSampleVar int, WidthVar int, HeightVar int, RowstrideVar int) *Pixbuf {
188- NewFromBytesPixbufPtr := xNewFromBytesPixbuf(DataVar, ColorspaceVar, HasAlphaVar, BitsPerSampleVar, WidthVar, HeightVar, RowstrideVar)190+ var cls *Pixbuf
189- if NewFromBytesPixbufPtr == 0 {191+
190- return nil192+ cret := xNewFromBytesPixbuf(DataVar, ColorspaceVar, HasAlphaVar, BitsPerSampleVar, WidthVar, HeightVar, RowstrideVar)
191- }
192 193
193- NewFromBytesPixbufCls := &Pixbuf{}194+ if cret == 0 {
194- NewFromBytesPixbufCls.Ptr = NewFromBytesPixbufPtr195+ return cls
195- return NewFromBytesPixbufCls196+ }
197+ cls = &Pixbuf{}
198+ cls.Ptr = cret
199+ return cls
196 }200 }
197 201
198 var xNewFromDataPixbuf func(uintptr, Colorspace, bool, int, int, int, int, uintptr, uintptr) uintptr202 var xNewFromDataPixbuf func(uintptr, Colorspace, bool, int, int, int, int, uintptr, uintptr) uintptr
@@ -209,17 +213,19 @@ var xNewFromDataPixbuf func(uintptr, Colorspace, bool, int, int, int, int, uintp
209 //213 //
210 // See also: [ctor@GdkPixbuf.Pixbuf.new_from_bytes]214 // See also: [ctor@GdkPixbuf.Pixbuf.new_from_bytes]
211 func NewFromDataPixbuf(DataVar uintptr, ColorspaceVar Colorspace, HasAlphaVar bool, BitsPerSampleVar int, WidthVar int, HeightVar int, RowstrideVar int, DestroyFnVar PixbufDestroyNotify, DestroyFnDataVar uintptr) *Pixbuf {215 func NewFromDataPixbuf(DataVar uintptr, ColorspaceVar Colorspace, HasAlphaVar bool, BitsPerSampleVar int, WidthVar int, HeightVar int, RowstrideVar int, DestroyFnVar PixbufDestroyNotify, DestroyFnDataVar uintptr) *Pixbuf {
212- NewFromDataPixbufPtr := xNewFromDataPixbuf(DataVar, ColorspaceVar, HasAlphaVar, BitsPerSampleVar, WidthVar, HeightVar, RowstrideVar, purego.NewCallback(DestroyFnVar), DestroyFnDataVar)216+ var cls *Pixbuf
213- if NewFromDataPixbufPtr == 0 {217+
214- return nil218+ cret := xNewFromDataPixbuf(DataVar, ColorspaceVar, HasAlphaVar, BitsPerSampleVar, WidthVar, HeightVar, RowstrideVar, purego.NewCallback(DestroyFnVar), DestroyFnDataVar)
215- }
216 219
217- NewFromDataPixbufCls := &Pixbuf{}220+ if cret == 0 {
218- NewFromDataPixbufCls.Ptr = NewFromDataPixbufPtr221+ return cls
219- return NewFromDataPixbufCls222+ }
223+ cls = &Pixbuf{}
224+ cls.Ptr = cret
225+ return cls
220 }226 }
221 227
222-var xNewFromFilePixbuf func(string) uintptr228+var xNewFromFilePixbuf func(string, **glib.Error) uintptr
223 229
224 // Creates a new pixbuf by loading an image from a file.230 // Creates a new pixbuf by loading an image from a file.
225 //231 //
@@ -233,18 +239,25 @@ var xNewFromFilePixbuf func(string) uintptr
233 // - the image buffer contains invalid data239 // - the image buffer contains invalid data
234 //240 //
235 // The error domains are `GDK_PIXBUF_ERROR` and `G_FILE_ERROR`.241 // The error domains are `GDK_PIXBUF_ERROR` and `G_FILE_ERROR`.
236-func NewFromFilePixbuf(FilenameVar string) *Pixbuf {242+func NewFromFilePixbuf(FilenameVar string) (*Pixbuf, error) {
237- NewFromFilePixbufPtr := xNewFromFilePixbuf(FilenameVar)243+ var cls *Pixbuf
238- if NewFromFilePixbufPtr == 0 {244+ var cerr *glib.Error
239- return nil245+
246+ cret := xNewFromFilePixbuf(FilenameVar, &cerr)
247+
248+ if cret == 0 {
249+ return cls, cerr
250+ }
251+ cls = &Pixbuf{}
252+ cls.Ptr = cret
253+ if cerr == nil {
254+ return cls, nil
240 }255 }
256+ return cls, cerr
241 257
242- NewFromFilePixbufCls := &Pixbuf{}
243- NewFromFilePixbufCls.Ptr = NewFromFilePixbufPtr
244- return NewFromFilePixbufCls
245 }258 }
246 259
247-var xNewFromFileAtScalePixbuf func(string, int, int, bool) uintptr260+var xNewFromFileAtScalePixbuf func(string, int, int, bool, **glib.Error) uintptr
248 261
249 // Creates a new pixbuf by loading an image from a file.262 // Creates a new pixbuf by loading an image from a file.
250 //263 //
@@ -268,18 +281,25 @@ var xNewFromFileAtScalePixbuf func(string, int, int, bool) uintptr
268 // aspect ratio, a `width` or `height` of -1 means to not scale the image281 // aspect ratio, a `width` or `height` of -1 means to not scale the image
269 // at all in that dimension. Negative values for `width` and `height` are282 // at all in that dimension. Negative values for `width` and `height` are
270 // allowed since 2.8.283 // allowed since 2.8.
271-func NewFromFileAtScalePixbuf(FilenameVar string, WidthVar int, HeightVar int, PreserveAspectRatioVar bool) *Pixbuf {284+func NewFromFileAtScalePixbuf(FilenameVar string, WidthVar int, HeightVar int, PreserveAspectRatioVar bool) (*Pixbuf, error) {
272- NewFromFileAtScalePixbufPtr := xNewFromFileAtScalePixbuf(FilenameVar, WidthVar, HeightVar, PreserveAspectRatioVar)285+ var cls *Pixbuf
273- if NewFromFileAtScalePixbufPtr == 0 {286+ var cerr *glib.Error
274- return nil287+
288+ cret := xNewFromFileAtScalePixbuf(FilenameVar, WidthVar, HeightVar, PreserveAspectRatioVar, &cerr)
289+
290+ if cret == 0 {
291+ return cls, cerr
275 }292 }
293+ cls = &Pixbuf{}
294+ cls.Ptr = cret
295+ if cerr == nil {
296+ return cls, nil
297+ }
298+ return cls, cerr
276 299
277- NewFromFileAtScalePixbufCls := &Pixbuf{}
278- NewFromFileAtScalePixbufCls.Ptr = NewFromFileAtScalePixbufPtr
279- return NewFromFileAtScalePixbufCls
280 }300 }
281 301
282-var xNewFromFileAtSizePixbuf func(string, int, int) uintptr302+var xNewFromFileAtSizePixbuf func(string, int, int, **glib.Error) uintptr
283 303
284 // Creates a new pixbuf by loading an image from a file.304 // Creates a new pixbuf by loading an image from a file.
285 //305 //
@@ -299,18 +319,25 @@ var xNewFromFileAtSizePixbuf func(string, int, int) uintptr
299 // than `width` x `height`, if the aspect ratio requires it. To load319 // than `width` x `height`, if the aspect ratio requires it. To load
300 // and image at the requested size, regardless of aspect ratio, use320 // and image at the requested size, regardless of aspect ratio, use
301 // [ctor@GdkPixbuf.Pixbuf.new_from_file_at_scale].321 // [ctor@GdkPixbuf.Pixbuf.new_from_file_at_scale].
302-func NewFromFileAtSizePixbuf(FilenameVar string, WidthVar int, HeightVar int) *Pixbuf {322+func NewFromFileAtSizePixbuf(FilenameVar string, WidthVar int, HeightVar int) (*Pixbuf, error) {
303- NewFromFileAtSizePixbufPtr := xNewFromFileAtSizePixbuf(FilenameVar, WidthVar, HeightVar)323+ var cls *Pixbuf
304- if NewFromFileAtSizePixbufPtr == 0 {324+ var cerr *glib.Error
305- return nil325+
326+ cret := xNewFromFileAtSizePixbuf(FilenameVar, WidthVar, HeightVar, &cerr)
327+
328+ if cret == 0 {
329+ return cls, cerr
330+ }
331+ cls = &Pixbuf{}
332+ cls.Ptr = cret
333+ if cerr == nil {
334+ return cls, nil
306 }335 }
336+ return cls, cerr
307 337
308- NewFromFileAtSizePixbufCls := &Pixbuf{}
309- NewFromFileAtSizePixbufCls.Ptr = NewFromFileAtSizePixbufPtr
310- return NewFromFileAtSizePixbufCls
311 }338 }
312 339
313-var xNewFromInlinePixbuf func(int, uintptr, bool) uintptr340+var xNewFromInlinePixbuf func(int, uintptr, bool, **glib.Error) uintptr
314 341
315 // Creates a `GdkPixbuf` from a flat representation that is suitable for342 // Creates a `GdkPixbuf` from a flat representation that is suitable for
316 // storing as inline data in a program.343 // storing as inline data in a program.
@@ -345,35 +372,49 @@ var xNewFromInlinePixbuf func(int, uintptr, bool) uintptr
345 // For non-const inline data, you could get out of memory. For untrusted372 // For non-const inline data, you could get out of memory. For untrusted
346 // inline data located at runtime, you could have corrupt inline data in373 // inline data located at runtime, you could have corrupt inline data in
347 // addition.374 // addition.
348-func NewFromInlinePixbuf(DataLengthVar int, DataVar uintptr, CopyPixelsVar bool) *Pixbuf {375+func NewFromInlinePixbuf(DataLengthVar int, DataVar uintptr, CopyPixelsVar bool) (*Pixbuf, error) {
349- NewFromInlinePixbufPtr := xNewFromInlinePixbuf(DataLengthVar, DataVar, CopyPixelsVar)376+ var cls *Pixbuf
350- if NewFromInlinePixbufPtr == 0 {377+ var cerr *glib.Error
351- return nil378+
379+ cret := xNewFromInlinePixbuf(DataLengthVar, DataVar, CopyPixelsVar, &cerr)
380+
381+ if cret == 0 {
382+ return cls, cerr
383+ }
384+ cls = &Pixbuf{}
385+ cls.Ptr = cret
386+ if cerr == nil {
387+ return cls, nil
352 }388 }
389+ return cls, cerr
353 390
354- NewFromInlinePixbufCls := &Pixbuf{}
355- NewFromInlinePixbufCls.Ptr = NewFromInlinePixbufPtr
356- return NewFromInlinePixbufCls
357 }391 }
358 392
359-var xNewFromResourcePixbuf func(string) uintptr393+var xNewFromResourcePixbuf func(string, **glib.Error) uintptr
360 394
361 // Creates a new pixbuf by loading an image from an resource.395 // Creates a new pixbuf by loading an image from an resource.
362 //396 //
363 // The file format is detected automatically. If `NULL` is returned, then397 // The file format is detected automatically. If `NULL` is returned, then
364 // @error will be set.398 // @error will be set.
365-func NewFromResourcePixbuf(ResourcePathVar string) *Pixbuf {399+func NewFromResourcePixbuf(ResourcePathVar string) (*Pixbuf, error) {
366- NewFromResourcePixbufPtr := xNewFromResourcePixbuf(ResourcePathVar)400+ var cls *Pixbuf
367- if NewFromResourcePixbufPtr == 0 {401+ var cerr *glib.Error
368- return nil402+
403+ cret := xNewFromResourcePixbuf(ResourcePathVar, &cerr)
404+
405+ if cret == 0 {
406+ return cls, cerr
369 }407 }
408+ cls = &Pixbuf{}
409+ cls.Ptr = cret
410+ if cerr == nil {
411+ return cls, nil
412+ }
413+ return cls, cerr
370 414
371- NewFromResourcePixbufCls := &Pixbuf{}
372- NewFromResourcePixbufCls.Ptr = NewFromResourcePixbufPtr
373- return NewFromResourcePixbufCls
374 }415 }
375 416
376-var xNewFromResourceAtScalePixbuf func(string, int, int, bool) uintptr417+var xNewFromResourceAtScalePixbuf func(string, int, int, bool, **glib.Error) uintptr
377 418
378 // Creates a new pixbuf by loading an image from an resource.419 // Creates a new pixbuf by loading an image from an resource.
379 //420 //
@@ -388,18 +429,25 @@ var xNewFromResourceAtScalePixbuf func(string, int, int, bool) uintptr
388 // @height of -1 means to not scale the image at all in that dimension.429 // @height of -1 means to not scale the image at all in that dimension.
389 //430 //
390 // The stream is not closed.431 // The stream is not closed.
391-func NewFromResourceAtScalePixbuf(ResourcePathVar string, WidthVar int, HeightVar int, PreserveAspectRatioVar bool) *Pixbuf {432+func NewFromResourceAtScalePixbuf(ResourcePathVar string, WidthVar int, HeightVar int, PreserveAspectRatioVar bool) (*Pixbuf, error) {
392- NewFromResourceAtScalePixbufPtr := xNewFromResourceAtScalePixbuf(ResourcePathVar, WidthVar, HeightVar, PreserveAspectRatioVar)433+ var cls *Pixbuf
393- if NewFromResourceAtScalePixbufPtr == 0 {434+ var cerr *glib.Error
394- return nil435+
436+ cret := xNewFromResourceAtScalePixbuf(ResourcePathVar, WidthVar, HeightVar, PreserveAspectRatioVar, &cerr)
437+
438+ if cret == 0 {
439+ return cls, cerr
395 }440 }
441+ cls = &Pixbuf{}
442+ cls.Ptr = cret
443+ if cerr == nil {
444+ return cls, nil
445+ }
446+ return cls, cerr
396 447
397- NewFromResourceAtScalePixbufCls := &Pixbuf{}
398- NewFromResourceAtScalePixbufCls.Ptr = NewFromResourceAtScalePixbufPtr
399- return NewFromResourceAtScalePixbufCls
400 }448 }
401 449
402-var xNewFromStreamPixbuf func(uintptr, uintptr) uintptr450+var xNewFromStreamPixbuf func(uintptr, uintptr, **glib.Error) uintptr
403 451
404 // Creates a new pixbuf by loading an image from an input stream.452 // Creates a new pixbuf by loading an image from an input stream.
405 //453 //
@@ -413,18 +461,25 @@ var xNewFromStreamPixbuf func(uintptr, uintptr) uintptr
413 // `G_IO_ERROR` domains.461 // `G_IO_ERROR` domains.
414 //462 //
415 // The stream is not closed.463 // The stream is not closed.
416-func NewFromStreamPixbuf(StreamVar *gio.InputStream, CancellableVar *gio.Cancellable) *Pixbuf {464+func NewFromStreamPixbuf(StreamVar *gio.InputStream, CancellableVar *gio.Cancellable) (*Pixbuf, error) {
417- NewFromStreamPixbufPtr := xNewFromStreamPixbuf(StreamVar.GoPointer(), CancellableVar.GoPointer())465+ var cls *Pixbuf
418- if NewFromStreamPixbufPtr == 0 {466+ var cerr *glib.Error
419- return nil467+
468+ cret := xNewFromStreamPixbuf(StreamVar.GoPointer(), CancellableVar.GoPointer(), &cerr)
469+
470+ if cret == 0 {
471+ return cls, cerr
472+ }
473+ cls = &Pixbuf{}
474+ cls.Ptr = cret
475+ if cerr == nil {
476+ return cls, nil
420 }477 }
478+ return cls, cerr
421 479
422- NewFromStreamPixbufCls := &Pixbuf{}
423- NewFromStreamPixbufCls.Ptr = NewFromStreamPixbufPtr
424- return NewFromStreamPixbufCls
425 }480 }
426 481
427-var xNewFromStreamAtScalePixbuf func(uintptr, int, int, bool, uintptr) uintptr482+var xNewFromStreamAtScalePixbuf func(uintptr, int, int, bool, uintptr, **glib.Error) uintptr
428 483
429 // Creates a new pixbuf by loading an image from an input stream.484 // Creates a new pixbuf by loading an image from an input stream.
430 //485 //
@@ -447,30 +502,44 @@ var xNewFromStreamAtScalePixbuf func(uintptr, int, int, bool, uintptr) uintptr
447 // scale the image at all in that dimension.502 // scale the image at all in that dimension.
448 //503 //
449 // The stream is not closed.504 // The stream is not closed.
450-func NewFromStreamAtScalePixbuf(StreamVar *gio.InputStream, WidthVar int, HeightVar int, PreserveAspectRatioVar bool, CancellableVar *gio.Cancellable) *Pixbuf {505+func NewFromStreamAtScalePixbuf(StreamVar *gio.InputStream, WidthVar int, HeightVar int, PreserveAspectRatioVar bool, CancellableVar *gio.Cancellable) (*Pixbuf, error) {
451- NewFromStreamAtScalePixbufPtr := xNewFromStreamAtScalePixbuf(StreamVar.GoPointer(), WidthVar, HeightVar, PreserveAspectRatioVar, CancellableVar.GoPointer())506+ var cls *Pixbuf
452- if NewFromStreamAtScalePixbufPtr == 0 {507+ var cerr *glib.Error
453- return nil508+
509+ cret := xNewFromStreamAtScalePixbuf(StreamVar.GoPointer(), WidthVar, HeightVar, PreserveAspectRatioVar, CancellableVar.GoPointer(), &cerr)
510+
511+ if cret == 0 {
512+ return cls, cerr
513+ }
514+ cls = &Pixbuf{}
515+ cls.Ptr = cret
516+ if cerr == nil {
517+ return cls, nil
454 }518 }
519+ return cls, cerr
455 520
456- NewFromStreamAtScalePixbufCls := &Pixbuf{}
457- NewFromStreamAtScalePixbufCls.Ptr = NewFromStreamAtScalePixbufPtr
458- return NewFromStreamAtScalePixbufCls
459 }521 }
460 522
461-var xNewFromStreamFinishPixbuf func(uintptr) uintptr523+var xNewFromStreamFinishPixbuf func(uintptr, **glib.Error) uintptr
462 524
463 // Finishes an asynchronous pixbuf creation operation started with525 // Finishes an asynchronous pixbuf creation operation started with
464 // gdk_pixbuf_new_from_stream_async().526 // gdk_pixbuf_new_from_stream_async().
465-func NewFromStreamFinishPixbuf(AsyncResultVar gio.AsyncResult) *Pixbuf {527+func NewFromStreamFinishPixbuf(AsyncResultVar gio.AsyncResult) (*Pixbuf, error) {
466- NewFromStreamFinishPixbufPtr := xNewFromStreamFinishPixbuf(AsyncResultVar.GoPointer())528+ var cls *Pixbuf
467- if NewFromStreamFinishPixbufPtr == 0 {529+ var cerr *glib.Error
468- return nil530+
531+ cret := xNewFromStreamFinishPixbuf(AsyncResultVar.GoPointer(), &cerr)
532+
533+ if cret == 0 {
534+ return cls, cerr
469 }535 }
536+ cls = &Pixbuf{}
537+ cls.Ptr = cret
538+ if cerr == nil {
539+ return cls, nil
540+ }
541+ return cls, cerr
470 542
471- NewFromStreamFinishPixbufCls := &Pixbuf{}
472- NewFromStreamFinishPixbufCls.Ptr = NewFromStreamFinishPixbufPtr
473- return NewFromStreamFinishPixbufCls
474 }543 }
475 544
476 var xNewFromXpmDataPixbuf func(uintptr) uintptr545 var xNewFromXpmDataPixbuf func(uintptr) uintptr
@@ -480,14 +549,16 @@ var xNewFromXpmDataPixbuf func(uintptr) uintptr
480 // This data is commonly the result of including an XPM file into a549 // This data is commonly the result of including an XPM file into a
481 // program's C source.550 // program's C source.
482 func NewFromXpmDataPixbuf(DataVar uintptr) *Pixbuf {551 func NewFromXpmDataPixbuf(DataVar uintptr) *Pixbuf {
483- NewFromXpmDataPixbufPtr := xNewFromXpmDataPixbuf(DataVar)552+ var cls *Pixbuf
484- if NewFromXpmDataPixbufPtr == 0 {
485- return nil
486- }
487 553
488- NewFromXpmDataPixbufCls := &Pixbuf{}554+ cret := xNewFromXpmDataPixbuf(DataVar)
489- NewFromXpmDataPixbufCls.Ptr = NewFromXpmDataPixbufPtr555+
490- return NewFromXpmDataPixbufCls556+ if cret == 0 {
557+ return cls
558+ }
559+ cls = &Pixbuf{}
560+ cls.Ptr = cret
561+ return cls
491 }562 }
492 563
493 var xPixbufAddAlpha func(uintptr, bool, byte, byte, byte) uintptr564 var xPixbufAddAlpha func(uintptr, bool, byte, byte, byte) uintptr
@@ -506,16 +577,16 @@ var xPixbufAddAlpha func(uintptr, bool, byte, byte, byte) uintptr
506 // If `substitute_color` is `FALSE`, then the (`r`, `g`, `b`) arguments577 // If `substitute_color` is `FALSE`, then the (`r`, `g`, `b`) arguments
507 // will be ignored.578 // will be ignored.
508 func (x *Pixbuf) AddAlpha(SubstituteColorVar bool, RVar byte, GVar byte, BVar byte) *Pixbuf {579 func (x *Pixbuf) AddAlpha(SubstituteColorVar bool, RVar byte, GVar byte, BVar byte) *Pixbuf {
580+ var cls *Pixbuf
509 581
510- AddAlphaPtr := xPixbufAddAlpha(x.GoPointer(), SubstituteColorVar, RVar, GVar, BVar)582+ cret := xPixbufAddAlpha(x.GoPointer(), SubstituteColorVar, RVar, GVar, BVar)
511- if AddAlphaPtr == 0 {
512- return nil
513- }
514-
515- AddAlphaCls := &Pixbuf{}
516- AddAlphaCls.Ptr = AddAlphaPtr
517- return AddAlphaCls
518 583
584+ if cret == 0 {
585+ return cls
586+ }
587+ cls = &Pixbuf{}
588+ cls.Ptr = cret
589+ return cls
519 }590 }
520 591
521 var xPixbufApplyEmbeddedOrientation func(uintptr) uintptr592 var xPixbufApplyEmbeddedOrientation func(uintptr) uintptr
@@ -531,16 +602,16 @@ var xPixbufApplyEmbeddedOrientation func(uintptr) uintptr
531 // If an orientation option/tag is present, the appropriate transform602 // If an orientation option/tag is present, the appropriate transform
532 // will be performed so that the pixbuf is oriented correctly.603 // will be performed so that the pixbuf is oriented correctly.
533 func (x *Pixbuf) ApplyEmbeddedOrientation() *Pixbuf {604 func (x *Pixbuf) ApplyEmbeddedOrientation() *Pixbuf {
605+ var cls *Pixbuf
534 606
535- ApplyEmbeddedOrientationPtr := xPixbufApplyEmbeddedOrientation(x.GoPointer())607+ cret := xPixbufApplyEmbeddedOrientation(x.GoPointer())
536- if ApplyEmbeddedOrientationPtr == 0 {
537- return nil
538- }
539-
540- ApplyEmbeddedOrientationCls := &Pixbuf{}
541- ApplyEmbeddedOrientationCls.Ptr = ApplyEmbeddedOrientationPtr
542- return ApplyEmbeddedOrientationCls
543 608
609+ if cret == 0 {
610+ return cls
611+ }
612+ cls = &Pixbuf{}
613+ cls.Ptr = cret
614+ return cls
544 }615 }
545 616
546 var xPixbufComposite func(uintptr, uintptr, int, int, int, int, float64, float64, float64, float64, InterpType, int)617 var xPixbufComposite func(uintptr, uintptr, int, int, int, int, float64, float64, float64, float64, InterpType, int)
@@ -590,16 +661,16 @@ var xPixbufCompositeColorSimple func(uintptr, int, int, InterpType, int, int, ui
590 // and alpha blending the result with a checkboard of colors `color1`661 // and alpha blending the result with a checkboard of colors `color1`
591 // and `color2`.662 // and `color2`.
592 func (x *Pixbuf) CompositeColorSimple(DestWidthVar int, DestHeightVar int, InterpTypeVar InterpType, OverallAlphaVar int, CheckSizeVar int, Color1Var uint32, Color2Var uint32) *Pixbuf {663 func (x *Pixbuf) CompositeColorSimple(DestWidthVar int, DestHeightVar int, InterpTypeVar InterpType, OverallAlphaVar int, CheckSizeVar int, Color1Var uint32, Color2Var uint32) *Pixbuf {
664+ var cls *Pixbuf
593 665
594- CompositeColorSimplePtr := xPixbufCompositeColorSimple(x.GoPointer(), DestWidthVar, DestHeightVar, InterpTypeVar, OverallAlphaVar, CheckSizeVar, Color1Var, Color2Var)666+ cret := xPixbufCompositeColorSimple(x.GoPointer(), DestWidthVar, DestHeightVar, InterpTypeVar, OverallAlphaVar, CheckSizeVar, Color1Var, Color2Var)
595- if CompositeColorSimplePtr == 0 {
596- return nil
597- }
598-
599- CompositeColorSimpleCls := &Pixbuf{}
600- CompositeColorSimpleCls.Ptr = CompositeColorSimplePtr
601- return CompositeColorSimpleCls
602 667
668+ if cret == 0 {
669+ return cls
670+ }
671+ cls = &Pixbuf{}
672+ cls.Ptr = cret
673+ return cls
603 }674 }
604 675
605 var xPixbufCopy func(uintptr) uintptr676 var xPixbufCopy func(uintptr) uintptr
@@ -610,16 +681,16 @@ var xPixbufCopy func(uintptr) uintptr
610 // Note that this does not copy the options set on the original `GdkPixbuf`,681 // Note that this does not copy the options set on the original `GdkPixbuf`,
611 // use gdk_pixbuf_copy_options() for this.682 // use gdk_pixbuf_copy_options() for this.
612 func (x *Pixbuf) Copy() *Pixbuf {683 func (x *Pixbuf) Copy() *Pixbuf {
684+ var cls *Pixbuf
613 685
614- CopyPtr := xPixbufCopy(x.GoPointer())686+ cret := xPixbufCopy(x.GoPointer())
615- if CopyPtr == 0 {
616- return nil
617- }
618-
619- CopyCls := &Pixbuf{}
620- CopyCls.Ptr = CopyPtr
621- return CopyCls
622 687
688+ if cret == 0 {
689+ return cls
690+ }
691+ cls = &Pixbuf{}
692+ cls.Ptr = cret
693+ return cls
623 }694 }
624 695
625 var xPixbufCopyArea func(uintptr, int, int, int, int, uintptr, int, int)696 var xPixbufCopyArea func(uintptr, int, int, int, int, uintptr, int, int)
@@ -647,8 +718,8 @@ var xPixbufCopyOptions func(uintptr, uintptr) bool
647 // applied, such as the "orientation" option after rotating the image.718 // applied, such as the "orientation" option after rotating the image.
648 func (x *Pixbuf) CopyOptions(DestPixbufVar *Pixbuf) bool {719 func (x *Pixbuf) CopyOptions(DestPixbufVar *Pixbuf) bool {
649 720
650- return xPixbufCopyOptions(x.GoPointer(), DestPixbufVar.GoPointer())721+ cret := xPixbufCopyOptions(x.GoPointer(), DestPixbufVar.GoPointer())
651-722+ return cret
652 }723 }
653 724
654 var xPixbufFill func(uintptr, uint32)725 var xPixbufFill func(uintptr, uint32)
@@ -669,16 +740,16 @@ var xPixbufFlip func(uintptr, bool) uintptr
669 // Flips a pixbuf horizontally or vertically and returns the740 // Flips a pixbuf horizontally or vertically and returns the
670 // result in a new pixbuf.741 // result in a new pixbuf.
671 func (x *Pixbuf) Flip(HorizontalVar bool) *Pixbuf {742 func (x *Pixbuf) Flip(HorizontalVar bool) *Pixbuf {
743+ var cls *Pixbuf
672 744
673- FlipPtr := xPixbufFlip(x.GoPointer(), HorizontalVar)745+ cret := xPixbufFlip(x.GoPointer(), HorizontalVar)
674- if FlipPtr == 0 {
675- return nil
676- }
677-
678- FlipCls := &Pixbuf{}
679- FlipCls.Ptr = FlipPtr
680- return FlipCls
681 746
747+ if cret == 0 {
748+ return cls
749+ }
750+ cls = &Pixbuf{}
751+ cls.Ptr = cret
752+ return cls
682 }753 }
683 754
684 var xPixbufGetBitsPerSample func(uintptr) int755 var xPixbufGetBitsPerSample func(uintptr) int
@@ -686,8 +757,8 @@ var xPixbufGetBitsPerSample func(uintptr) int
686 // Queries the number of bits per color sample in a pixbuf.757 // Queries the number of bits per color sample in a pixbuf.
687 func (x *Pixbuf) GetBitsPerSample() int {758 func (x *Pixbuf) GetBitsPerSample() int {
688 759
689- return xPixbufGetBitsPerSample(x.GoPointer())760+ cret := xPixbufGetBitsPerSample(x.GoPointer())
690-761+ return cret
691 }762 }
692 763
693 var xPixbufGetByteLength func(uintptr) uint764 var xPixbufGetByteLength func(uintptr) uint
@@ -695,8 +766,8 @@ var xPixbufGetByteLength func(uintptr) uint
695 // Returns the length of the pixel data, in bytes.766 // Returns the length of the pixel data, in bytes.
696 func (x *Pixbuf) GetByteLength() uint {767 func (x *Pixbuf) GetByteLength() uint {
697 768
698- return xPixbufGetByteLength(x.GoPointer())769+ cret := xPixbufGetByteLength(x.GoPointer())
699-770+ return cret
700 }771 }
701 772
702 var xPixbufGetColorspace func(uintptr) Colorspace773 var xPixbufGetColorspace func(uintptr) Colorspace
@@ -704,8 +775,8 @@ var xPixbufGetColorspace func(uintptr) Colorspace
704 // Queries the color space of a pixbuf.775 // Queries the color space of a pixbuf.
705 func (x *Pixbuf) GetColorspace() Colorspace {776 func (x *Pixbuf) GetColorspace() Colorspace {
706 777
707- return xPixbufGetColorspace(x.GoPointer())778+ cret := xPixbufGetColorspace(x.GoPointer())
708-779+ return cret
709 }780 }
710 781
711 var xPixbufGetHasAlpha func(uintptr) bool782 var xPixbufGetHasAlpha func(uintptr) bool
@@ -713,8 +784,8 @@ var xPixbufGetHasAlpha func(uintptr) bool
713 // Queries whether a pixbuf has an alpha channel (opacity information).784 // Queries whether a pixbuf has an alpha channel (opacity information).
714 func (x *Pixbuf) GetHasAlpha() bool {785 func (x *Pixbuf) GetHasAlpha() bool {
715 786
716- return xPixbufGetHasAlpha(x.GoPointer())787+ cret := xPixbufGetHasAlpha(x.GoPointer())
717-788+ return cret
718 }789 }
719 790
720 var xPixbufGetHeight func(uintptr) int791 var xPixbufGetHeight func(uintptr) int
@@ -722,8 +793,8 @@ var xPixbufGetHeight func(uintptr) int
722 // Queries the height of a pixbuf.793 // Queries the height of a pixbuf.
723 func (x *Pixbuf) GetHeight() int {794 func (x *Pixbuf) GetHeight() int {
724 795
725- return xPixbufGetHeight(x.GoPointer())796+ cret := xPixbufGetHeight(x.GoPointer())
726-797+ return cret
727 }798 }
728 799
729 var xPixbufGetNChannels func(uintptr) int800 var xPixbufGetNChannels func(uintptr) int
@@ -731,8 +802,8 @@ var xPixbufGetNChannels func(uintptr) int
731 // Queries the number of channels of a pixbuf.802 // Queries the number of channels of a pixbuf.
732 func (x *Pixbuf) GetNChannels() int {803 func (x *Pixbuf) GetNChannels() int {
733 804
734- return xPixbufGetNChannels(x.GoPointer())805+ cret := xPixbufGetNChannels(x.GoPointer())
735-806+ return cret
736 }807 }
737 808
738 var xPixbufGetOption func(uintptr, string) string809 var xPixbufGetOption func(uintptr, string) string
@@ -754,8 +825,8 @@ var xPixbufGetOption func(uintptr, string) string
754 // EXIF tag.825 // EXIF tag.
755 func (x *Pixbuf) GetOption(KeyVar string) string {826 func (x *Pixbuf) GetOption(KeyVar string) string {
756 827
757- return xPixbufGetOption(x.GoPointer(), KeyVar)828+ cret := xPixbufGetOption(x.GoPointer(), KeyVar)
758-829+ return cret
759 }830 }
760 831
761 var xPixbufGetOptions func(uintptr) *glib.HashTable832 var xPixbufGetOptions func(uintptr) *glib.HashTable
@@ -765,8 +836,8 @@ var xPixbufGetOptions func(uintptr) *glib.HashTable
765 // attached by another function using [method@GdkPixbuf.Pixbuf.set_option].836 // attached by another function using [method@GdkPixbuf.Pixbuf.set_option].
766 func (x *Pixbuf) GetOptions() *glib.HashTable {837 func (x *Pixbuf) GetOptions() *glib.HashTable {
767 838
768- return xPixbufGetOptions(x.GoPointer())839+ cret := xPixbufGetOptions(x.GoPointer())
769-840+ return cret
770 }841 }
771 842
772 var xPixbufGetPixels func(uintptr) uintptr843 var xPixbufGetPixels func(uintptr) uintptr
@@ -780,8 +851,8 @@ var xPixbufGetPixels func(uintptr) uintptr
780 // about how the pixel data is stored in memory.851 // about how the pixel data is stored in memory.
781 func (x *Pixbuf) GetPixels() uintptr {852 func (x *Pixbuf) GetPixels() uintptr {
782 853
783- return xPixbufGetPixels(x.GoPointer())854+ cret := xPixbufGetPixels(x.GoPointer())
784-855+ return cret
785 }856 }
786 857
787 var xPixbufGetPixelsWithLength func(uintptr, uint) uintptr858 var xPixbufGetPixelsWithLength func(uintptr, uint) uintptr
@@ -795,8 +866,8 @@ var xPixbufGetPixelsWithLength func(uintptr, uint) uintptr
795 // about how the pixel data is stored in memory.866 // about how the pixel data is stored in memory.
796 func (x *Pixbuf) GetPixelsWithLength(LengthVar uint) uintptr {867 func (x *Pixbuf) GetPixelsWithLength(LengthVar uint) uintptr {
797 868
798- return xPixbufGetPixelsWithLength(x.GoPointer(), LengthVar)869+ cret := xPixbufGetPixelsWithLength(x.GoPointer(), LengthVar)
799-870+ return cret
800 }871 }
801 872
802 var xPixbufGetRowstride func(uintptr) int873 var xPixbufGetRowstride func(uintptr) int
@@ -805,8 +876,8 @@ var xPixbufGetRowstride func(uintptr) int
805 // the start of a row and the start of the next row.876 // the start of a row and the start of the next row.
806 func (x *Pixbuf) GetRowstride() int {877 func (x *Pixbuf) GetRowstride() int {
807 878
808- return xPixbufGetRowstride(x.GoPointer())879+ cret := xPixbufGetRowstride(x.GoPointer())
809-880+ return cret
810 }881 }
811 882
812 var xPixbufGetWidth func(uintptr) int883 var xPixbufGetWidth func(uintptr) int
@@ -814,8 +885,8 @@ var xPixbufGetWidth func(uintptr) int
814 // Queries the width of a pixbuf.885 // Queries the width of a pixbuf.
815 func (x *Pixbuf) GetWidth() int {886 func (x *Pixbuf) GetWidth() int {
816 887
817- return xPixbufGetWidth(x.GoPointer())888+ cret := xPixbufGetWidth(x.GoPointer())
818-889+ return cret
819 }890 }
820 891
821 var xPixbufNewSubpixbuf func(uintptr, int, int, int, int) uintptr892 var xPixbufNewSubpixbuf func(uintptr, int, int, int, int) uintptr
@@ -830,16 +901,16 @@ var xPixbufNewSubpixbuf func(uintptr, int, int, int, int) uintptr
830 // Note that if `src_pixbuf` is read-only, this function will force it901 // Note that if `src_pixbuf` is read-only, this function will force it
831 // to be mutable.902 // to be mutable.
832 func (x *Pixbuf) NewSubpixbuf(SrcXVar int, SrcYVar int, WidthVar int, HeightVar int) *Pixbuf {903 func (x *Pixbuf) NewSubpixbuf(SrcXVar int, SrcYVar int, WidthVar int, HeightVar int) *Pixbuf {
904+ var cls *Pixbuf
833 905
834- NewSubpixbufPtr := xPixbufNewSubpixbuf(x.GoPointer(), SrcXVar, SrcYVar, WidthVar, HeightVar)906+ cret := xPixbufNewSubpixbuf(x.GoPointer(), SrcXVar, SrcYVar, WidthVar, HeightVar)
835- if NewSubpixbufPtr == 0 {
836- return nil
837- }
838-
839- NewSubpixbufCls := &Pixbuf{}
840- NewSubpixbufCls.Ptr = NewSubpixbufPtr
841- return NewSubpixbufCls
842 907
908+ if cret == 0 {
909+ return cls
910+ }
911+ cls = &Pixbuf{}
912+ cls.Ptr = cret
913+ return cls
843 }914 }
844 915
845 var xPixbufReadPixelBytes func(uintptr) *glib.Bytes916 var xPixbufReadPixelBytes func(uintptr) *glib.Bytes
@@ -851,8 +922,8 @@ var xPixbufReadPixelBytes func(uintptr) *glib.Bytes
851 // if gdk_pixbuf_get_pixels() is called on a read-only pixbuf.922 // if gdk_pixbuf_get_pixels() is called on a read-only pixbuf.
852 func (x *Pixbuf) ReadPixelBytes() *glib.Bytes {923 func (x *Pixbuf) ReadPixelBytes() *glib.Bytes {
853 924
854- return xPixbufReadPixelBytes(x.GoPointer())925+ cret := xPixbufReadPixelBytes(x.GoPointer())
855-926+ return cret
856 }927 }
857 928
858 var xPixbufReadPixels func(uintptr) byte929 var xPixbufReadPixels func(uintptr) byte
@@ -863,24 +934,24 @@ var xPixbufReadPixels func(uintptr) byte
863 // if gdk_pixbuf_get_pixels() is called on a read-only pixbuf.934 // if gdk_pixbuf_get_pixels() is called on a read-only pixbuf.
864 func (x *Pixbuf) ReadPixels() byte {935 func (x *Pixbuf) ReadPixels() byte {
865 936
866- return xPixbufReadPixels(x.GoPointer())937+ cret := xPixbufReadPixels(x.GoPointer())
867-938+ return cret
868 }939 }
869 940
870 var xPixbufRef func(uintptr) uintptr941 var xPixbufRef func(uintptr) uintptr
871 942
872 // Adds a reference to a pixbuf.943 // Adds a reference to a pixbuf.
873 func (x *Pixbuf) Ref() *Pixbuf {944 func (x *Pixbuf) Ref() *Pixbuf {
945+ var cls *Pixbuf
874 946
875- RefPtr := xPixbufRef(x.GoPointer())947+ cret := xPixbufRef(x.GoPointer())
876- if RefPtr == 0 {
877- return nil
878- }
879-
880- RefCls := &Pixbuf{}
881- RefCls.Ptr = RefPtr
882- return RefCls
883 948
949+ if cret == 0 {
950+ return cls
951+ }
952+ cls = &Pixbuf{}
953+ cls.Ptr = cret
954+ return cls
884 }955 }
885 956
886 var xPixbufRemoveOption func(uintptr, string) bool957 var xPixbufRemoveOption func(uintptr, string) bool
@@ -888,8 +959,8 @@ var xPixbufRemoveOption func(uintptr, string) bool
888 // Removes the key/value pair option attached to a `GdkPixbuf`.959 // Removes the key/value pair option attached to a `GdkPixbuf`.
889 func (x *Pixbuf) RemoveOption(KeyVar string) bool {960 func (x *Pixbuf) RemoveOption(KeyVar string) bool {
890 961
891- return xPixbufRemoveOption(x.GoPointer(), KeyVar)962+ cret := xPixbufRemoveOption(x.GoPointer(), KeyVar)
892-963+ return cret
893 }964 }
894 965
895 var xPixbufRotateSimple func(uintptr, PixbufRotation) uintptr966 var xPixbufRotateSimple func(uintptr, PixbufRotation) uintptr
@@ -899,16 +970,16 @@ var xPixbufRotateSimple func(uintptr, PixbufRotation) uintptr
899 //970 //
900 // If `angle` is 0, this function will return a copy of `src`.971 // If `angle` is 0, this function will return a copy of `src`.
901 func (x *Pixbuf) RotateSimple(AngleVar PixbufRotation) *Pixbuf {972 func (x *Pixbuf) RotateSimple(AngleVar PixbufRotation) *Pixbuf {
973+ var cls *Pixbuf
902 974
903- RotateSimplePtr := xPixbufRotateSimple(x.GoPointer(), AngleVar)975+ cret := xPixbufRotateSimple(x.GoPointer(), AngleVar)
904- if RotateSimplePtr == 0 {
905- return nil
906- }
907-
908- RotateSimpleCls := &Pixbuf{}
909- RotateSimpleCls.Ptr = RotateSimplePtr
910- return RotateSimpleCls
911 976
977+ if cret == 0 {
978+ return cls
979+ }
980+ cls = &Pixbuf{}
981+ cls.Ptr = cret
982+ return cls
912 }983 }
913 984
914 var xPixbufSaturateAndPixelate func(uintptr, uintptr, float32, bool)985 var xPixbufSaturateAndPixelate func(uintptr, uintptr, float32, bool)
@@ -1009,8 +1080,8 @@ var xPixbufSave func(uintptr, string, string, **glib.Error, ...interface{}) bool
1009 // it produces a CUR instead of an ICO.1080 // it produces a CUR instead of an ICO.
1010 func (x *Pixbuf) Save(FilenameVar string, TypeVar string, ErrorVar **glib.Error, varArgs ...interface{}) bool {1081 func (x *Pixbuf) Save(FilenameVar string, TypeVar string, ErrorVar **glib.Error, varArgs ...interface{}) bool {
1011 1082
1012- return xPixbufSave(x.GoPointer(), FilenameVar, TypeVar, ErrorVar, varArgs...)1083+ cret := xPixbufSave(x.GoPointer(), FilenameVar, TypeVar, ErrorVar, varArgs...)
1013-1084+ return cret
1014 }1085 }
1015 1086
1016 var xPixbufSaveToBuffer func(uintptr, uintptr, uint, string, **glib.Error, ...interface{}) bool1087 var xPixbufSaveToBuffer func(uintptr, uintptr, uint, string, **glib.Error, ...interface{}) bool
@@ -1031,11 +1102,11 @@ var xPixbufSaveToBuffer func(uintptr, uintptr, uint, string, **glib.Error, ...in
1031 // See `gdk_pixbuf_save()` for more details.1102 // See `gdk_pixbuf_save()` for more details.
1032 func (x *Pixbuf) SaveToBuffer(BufferVar uintptr, BufferSizeVar uint, TypeVar string, ErrorVar **glib.Error, varArgs ...interface{}) bool {1103 func (x *Pixbuf) SaveToBuffer(BufferVar uintptr, BufferSizeVar uint, TypeVar string, ErrorVar **glib.Error, varArgs ...interface{}) bool {
1033 1104
1034- return xPixbufSaveToBuffer(x.GoPointer(), BufferVar, BufferSizeVar, TypeVar, ErrorVar, varArgs...)1105+ cret := xPixbufSaveToBuffer(x.GoPointer(), BufferVar, BufferSizeVar, TypeVar, ErrorVar, varArgs...)
1035-1106+ return cret
1036 }1107 }
1037 1108
1038-var xPixbufSaveToBufferv func(uintptr, uintptr, uint, string, []string, []string) bool1109+var xPixbufSaveToBufferv func(uintptr, uintptr, uint, string, []string, []string, **glib.Error) bool
1039 1110
1040 // Vector version of `gdk_pixbuf_save_to_buffer()`.1111 // Vector version of `gdk_pixbuf_save_to_buffer()`.
1041 //1112 //
@@ -1043,9 +1114,14 @@ var xPixbufSaveToBufferv func(uintptr, uintptr, uint, string, []string, []string
1043 // "tiff", "png", "ico" or "bmp".1114 // "tiff", "png", "ico" or "bmp".
1044 //1115 //
1045 // See [method@GdkPixbuf.Pixbuf.save_to_buffer] for more details.1116 // See [method@GdkPixbuf.Pixbuf.save_to_buffer] for more details.
1046-func (x *Pixbuf) SaveToBufferv(BufferVar uintptr, BufferSizeVar uint, TypeVar string, OptionKeysVar []string, OptionValuesVar []string) bool {1117+func (x *Pixbuf) SaveToBufferv(BufferVar uintptr, BufferSizeVar uint, TypeVar string, OptionKeysVar []string, OptionValuesVar []string) (bool, error) {
1118+ var cerr *glib.Error
1047 1119
1048- return xPixbufSaveToBufferv(x.GoPointer(), BufferVar, BufferSizeVar, TypeVar, OptionKeysVar, OptionValuesVar)1120+ cret := xPixbufSaveToBufferv(x.GoPointer(), BufferVar, BufferSizeVar, TypeVar, OptionKeysVar, OptionValuesVar, &cerr)
1121+ if cerr == nil {
1122+ return cret, nil
1123+ }
1124+ return cret, cerr
1049 1125
1050 }1126 }
1051 1127
@@ -1064,11 +1140,11 @@ var xPixbufSaveToCallback func(uintptr, uintptr, uintptr, string, **glib.Error,
1064 // See [method@GdkPixbuf.Pixbuf.save] for more details.1140 // See [method@GdkPixbuf.Pixbuf.save] for more details.
1065 func (x *Pixbuf) SaveToCallback(SaveFuncVar PixbufSaveFunc, UserDataVar uintptr, TypeVar string, ErrorVar **glib.Error, varArgs ...interface{}) bool {1141 func (x *Pixbuf) SaveToCallback(SaveFuncVar PixbufSaveFunc, UserDataVar uintptr, TypeVar string, ErrorVar **glib.Error, varArgs ...interface{}) bool {
1066 1142
1067- return xPixbufSaveToCallback(x.GoPointer(), purego.NewCallback(SaveFuncVar), UserDataVar, TypeVar, ErrorVar, varArgs...)1143+ cret := xPixbufSaveToCallback(x.GoPointer(), purego.NewCallback(SaveFuncVar), UserDataVar, TypeVar, ErrorVar, varArgs...)
1068-1144+ return cret
1069 }1145 }
1070 1146
1071-var xPixbufSaveToCallbackv func(uintptr, uintptr, uintptr, string, []string, []string) bool1147+var xPixbufSaveToCallbackv func(uintptr, uintptr, uintptr, string, []string, []string, **glib.Error) bool
1072 1148
1073 // Vector version of `gdk_pixbuf_save_to_callback()`.1149 // Vector version of `gdk_pixbuf_save_to_callback()`.
1074 //1150 //
@@ -1078,9 +1154,14 @@ var xPixbufSaveToCallbackv func(uintptr, uintptr, uintptr, string, []string, []s
1078 // If @error is set, `FALSE` will be returned.1154 // If @error is set, `FALSE` will be returned.
1079 //1155 //
1080 // See [method@GdkPixbuf.Pixbuf.save_to_callback] for more details.1156 // See [method@GdkPixbuf.Pixbuf.save_to_callback] for more details.
1081-func (x *Pixbuf) SaveToCallbackv(SaveFuncVar PixbufSaveFunc, UserDataVar uintptr, TypeVar string, OptionKeysVar []string, OptionValuesVar []string) bool {1157+func (x *Pixbuf) SaveToCallbackv(SaveFuncVar PixbufSaveFunc, UserDataVar uintptr, TypeVar string, OptionKeysVar []string, OptionValuesVar []string) (bool, error) {
1158+ var cerr *glib.Error
1082 1159
1083- return xPixbufSaveToCallbackv(x.GoPointer(), purego.NewCallback(SaveFuncVar), UserDataVar, TypeVar, OptionKeysVar, OptionValuesVar)1160+ cret := xPixbufSaveToCallbackv(x.GoPointer(), purego.NewCallback(SaveFuncVar), UserDataVar, TypeVar, OptionKeysVar, OptionValuesVar, &cerr)
1161+ if cerr == nil {
1162+ return cret, nil
1163+ }
1164+ return cret, cerr
1084 1165
1085 }1166 }
1086 1167
@@ -1099,8 +1180,8 @@ var xPixbufSaveToStream func(uintptr, uintptr, string, uintptr, **glib.Error, ..
1099 // The stream is not closed at the end of this call.1180 // The stream is not closed at the end of this call.
1100 func (x *Pixbuf) SaveToStream(StreamVar *gio.OutputStream, TypeVar string, CancellableVar *gio.Cancellable, ErrorVar **glib.Error, varArgs ...interface{}) bool {1181 func (x *Pixbuf) SaveToStream(StreamVar *gio.OutputStream, TypeVar string, CancellableVar *gio.Cancellable, ErrorVar **glib.Error, varArgs ...interface{}) bool {
1101 1182
1102- return xPixbufSaveToStream(x.GoPointer(), StreamVar.GoPointer(), TypeVar, CancellableVar.GoPointer(), ErrorVar, varArgs...)1183+ cret := xPixbufSaveToStream(x.GoPointer(), StreamVar.GoPointer(), TypeVar, CancellableVar.GoPointer(), ErrorVar, varArgs...)
1103-1184+ return cret
1104 }1185 }
1105 1186
1106 var xPixbufSaveToStreamAsync func(uintptr, uintptr, string, uintptr, uintptr, uintptr, ...interface{})1187 var xPixbufSaveToStreamAsync func(uintptr, uintptr, string, uintptr, uintptr, uintptr, ...interface{})
@@ -1120,7 +1201,7 @@ func (x *Pixbuf) SaveToStreamAsync(StreamVar *gio.OutputStream, TypeVar string,
1120 1201
1121 }1202 }
1122 1203
1123-var xPixbufSaveToStreamv func(uintptr, uintptr, string, []string, []string, uintptr) bool1204+var xPixbufSaveToStreamv func(uintptr, uintptr, string, []string, []string, uintptr, **glib.Error) bool
1124 1205
1125 // Saves `pixbuf` to an output stream.1206 // Saves `pixbuf` to an output stream.
1126 //1207 //
@@ -1128,9 +1209,14 @@ var xPixbufSaveToStreamv func(uintptr, uintptr, string, []string, []string, uint
1128 // "bmp".1209 // "bmp".
1129 //1210 //
1130 // See [method@GdkPixbuf.Pixbuf.save_to_stream] for more details.1211 // See [method@GdkPixbuf.Pixbuf.save_to_stream] for more details.
1131-func (x *Pixbuf) SaveToStreamv(StreamVar *gio.OutputStream, TypeVar string, OptionKeysVar []string, OptionValuesVar []string, CancellableVar *gio.Cancellable) bool {1212+func (x *Pixbuf) SaveToStreamv(StreamVar *gio.OutputStream, TypeVar string, OptionKeysVar []string, OptionValuesVar []string, CancellableVar *gio.Cancellable) (bool, error) {
1213+ var cerr *glib.Error
1132 1214
1133- return xPixbufSaveToStreamv(x.GoPointer(), StreamVar.GoPointer(), TypeVar, OptionKeysVar, OptionValuesVar, CancellableVar.GoPointer())1215+ cret := xPixbufSaveToStreamv(x.GoPointer(), StreamVar.GoPointer(), TypeVar, OptionKeysVar, OptionValuesVar, CancellableVar.GoPointer(), &cerr)
1216+ if cerr == nil {
1217+ return cret, nil
1218+ }
1219+ return cret, cerr
1134 1220
1135 }1221 }
1136 1222
@@ -1151,7 +1237,7 @@ func (x *Pixbuf) SaveToStreamvAsync(StreamVar *gio.OutputStream, TypeVar string,
1151 1237
1152 }1238 }
1153 1239
1154-var xPixbufSavev func(uintptr, string, string, []string, []string) bool1240+var xPixbufSavev func(uintptr, string, string, []string, []string, **glib.Error) bool
1155 1241
1156 // Vector version of `gdk_pixbuf_save()`.1242 // Vector version of `gdk_pixbuf_save()`.
1157 //1243 //
@@ -1160,9 +1246,14 @@ var xPixbufSavev func(uintptr, string, string, []string, []string) bool
1160 // If @error is set, `FALSE` will be returned.1246 // If @error is set, `FALSE` will be returned.
1161 //1247 //
1162 // See [method@GdkPixbuf.Pixbuf.save] for more details.1248 // See [method@GdkPixbuf.Pixbuf.save] for more details.
1163-func (x *Pixbuf) Savev(FilenameVar string, TypeVar string, OptionKeysVar []string, OptionValuesVar []string) bool {1249+func (x *Pixbuf) Savev(FilenameVar string, TypeVar string, OptionKeysVar []string, OptionValuesVar []string) (bool, error) {
1250+ var cerr *glib.Error
1164 1251
1165- return xPixbufSavev(x.GoPointer(), FilenameVar, TypeVar, OptionKeysVar, OptionValuesVar)1252+ cret := xPixbufSavev(x.GoPointer(), FilenameVar, TypeVar, OptionKeysVar, OptionValuesVar, &cerr)
1253+ if cerr == nil {
1254+ return cret, nil
1255+ }
1256+ return cret, cerr
1166 1257
1167 }1258 }
1168 1259
@@ -1208,16 +1299,16 @@ var xPixbufScaleSimple func(uintptr, int, int, InterpType) uintptr
1208 // For more complicated scaling/alpha blending see [method@GdkPixbuf.Pixbuf.scale]1299 // For more complicated scaling/alpha blending see [method@GdkPixbuf.Pixbuf.scale]
1209 // and [method@GdkPixbuf.Pixbuf.composite].1300 // and [method@GdkPixbuf.Pixbuf.composite].
1210 func (x *Pixbuf) ScaleSimple(DestWidthVar int, DestHeightVar int, InterpTypeVar InterpType) *Pixbuf {1301 func (x *Pixbuf) ScaleSimple(DestWidthVar int, DestHeightVar int, InterpTypeVar InterpType) *Pixbuf {
1302+ var cls *Pixbuf
1211 1303
1212- ScaleSimplePtr := xPixbufScaleSimple(x.GoPointer(), DestWidthVar, DestHeightVar, InterpTypeVar)1304+ cret := xPixbufScaleSimple(x.GoPointer(), DestWidthVar, DestHeightVar, InterpTypeVar)
1213- if ScaleSimplePtr == 0 {
1214- return nil
1215- }
1216-
1217- ScaleSimpleCls := &Pixbuf{}
1218- ScaleSimpleCls.Ptr = ScaleSimplePtr
1219- return ScaleSimpleCls
1220 1305
1306+ if cret == 0 {
1307+ return cls
1308+ }
1309+ cls = &Pixbuf{}
1310+ cls.Ptr = cret
1311+ return cls
1221 }1312 }
1222 1313
1223 var xPixbufSetOption func(uintptr, string, string) bool1314 var xPixbufSetOption func(uintptr, string, string) bool
@@ -1228,8 +1319,8 @@ var xPixbufSetOption func(uintptr, string, string) bool
1228 // the new value is ignored and `FALSE` is returned.1319 // the new value is ignored and `FALSE` is returned.
1229 func (x *Pixbuf) SetOption(KeyVar string, ValueVar string) bool {1320 func (x *Pixbuf) SetOption(KeyVar string, ValueVar string) bool {
1230 1321
1231- return xPixbufSetOption(x.GoPointer(), KeyVar, ValueVar)1322+ cret := xPixbufSetOption(x.GoPointer(), KeyVar, ValueVar)
1232-1323+ return cret
1233 }1324 }
1234 1325
1235 var xPixbufUnref func(uintptr)1326 var xPixbufUnref func(uintptr)
@@ -1252,8 +1343,8 @@ func (c *Pixbuf) SetGoPointer(ptr uintptr) {
1252 // Checks if two icons are equal.1343 // Checks if two icons are equal.
1253 func (x *Pixbuf) Equal(Icon2Var gio.Icon) bool {1344 func (x *Pixbuf) Equal(Icon2Var gio.Icon) bool {
1254 1345
1255- return gio.XGIconEqual(x.GoPointer(), Icon2Var.GoPointer())1346+ cret := gio.XGIconEqual(x.GoPointer(), Icon2Var.GoPointer())
1256-1347+ return cret
1257 }1348 }
1258 1349
1259 // Serializes a #GIcon into a #GVariant. An equivalent #GIcon can be retrieved1350 // Serializes a #GIcon into a #GVariant. An equivalent #GIcon can be retrieved
@@ -1263,8 +1354,8 @@ func (x *Pixbuf) Equal(Icon2Var gio.Icon) bool {
1263 // (as opposed to over the network), and within the same file system namespace.1354 // (as opposed to over the network), and within the same file system namespace.
1264 func (x *Pixbuf) Serialize() *glib.Variant {1355 func (x *Pixbuf) Serialize() *glib.Variant {
1265 1356
1266- return gio.XGIconSerialize(x.GoPointer())1357+ cret := gio.XGIconSerialize(x.GoPointer())
1267-1358+ return cret
1268 }1359 }
1269 1360
1270 // Generates a textual representation of @icon that can be used for1361 // Generates a textual representation of @icon that can be used for
@@ -1285,22 +1376,27 @@ func (x *Pixbuf) Serialize() *glib.Variant {
1285 // the encoding is simply the name (such as `network-server`).1376 // the encoding is simply the name (such as `network-server`).
1286 func (x *Pixbuf) ToString() string {1377 func (x *Pixbuf) ToString() string {
1287 1378
1288- return gio.XGIconToString(x.GoPointer())1379+ cret := gio.XGIconToString(x.GoPointer())
1289-1380+ return cret
1290 }1381 }
1291 1382
1292 // Loads a loadable icon. For the asynchronous version of this function,1383 // Loads a loadable icon. For the asynchronous version of this function,
1293 // see g_loadable_icon_load_async().1384 // see g_loadable_icon_load_async().
1294-func (x *Pixbuf) Load(SizeVar int, TypeVar string, CancellableVar *gio.Cancellable) *gio.InputStream {1385+func (x *Pixbuf) Load(SizeVar int, TypeVar string, CancellableVar *gio.Cancellable) (*gio.InputStream, error) {
1386+ var cls *gio.InputStream
1387+ var cerr *glib.Error
1295 1388
1296- LoadPtr := gio.XGLoadableIconLoad(x.GoPointer(), SizeVar, TypeVar, CancellableVar.GoPointer())1389+ cret := gio.XGLoadableIconLoad(x.GoPointer(), SizeVar, TypeVar, CancellableVar.GoPointer(), &cerr)
1297- if LoadPtr == 0 {
1298- return nil
1299- }
1300 1390
1301- LoadCls := &gio.InputStream{}1391+ if cret == 0 {
1302- LoadCls.Ptr = LoadPtr1392+ return cls, cerr
1303- return LoadCls1393+ }
1394+ cls = &gio.InputStream{}
1395+ cls.Ptr = cret
1396+ if cerr == nil {
1397+ return cls, nil
1398+ }
1399+ return cls, cerr
1304 1400
1305 }1401 }
1306 1402
@@ -1314,16 +1410,21 @@ func (x *Pixbuf) LoadAsync(SizeVar int, CancellableVar *gio.Cancellable, Callbac
1314 }1410 }
1315 1411
1316 // Finishes an asynchronous icon load started in g_loadable_icon_load_async().1412 // Finishes an asynchronous icon load started in g_loadable_icon_load_async().
1317-func (x *Pixbuf) LoadFinish(ResVar gio.AsyncResult, TypeVar string) *gio.InputStream {1413+func (x *Pixbuf) LoadFinish(ResVar gio.AsyncResult, TypeVar string) (*gio.InputStream, error) {
1414+ var cls *gio.InputStream
1415+ var cerr *glib.Error
1318 1416
1319- LoadFinishPtr := gio.XGLoadableIconLoadFinish(x.GoPointer(), ResVar.GoPointer(), TypeVar)1417+ cret := gio.XGLoadableIconLoadFinish(x.GoPointer(), ResVar.GoPointer(), TypeVar, &cerr)
1320- if LoadFinishPtr == 0 {
1321- return nil
1322- }
1323 1418
1324- LoadFinishCls := &gio.InputStream{}1419+ if cret == 0 {
1325- LoadFinishCls.Ptr = LoadFinishPtr1420+ return cls, cerr
1326- return LoadFinishCls1421+ }
1422+ cls = &gio.InputStream{}
1423+ cls.Ptr = cret
1424+ if cerr == nil {
1425+ return cls, nil
1426+ }
1427+ return cls, cerr
1327 1428
1328 }1429 }
1329 1430
M v4/gdkpixbuf/main.go +11 -9
@@ -11,8 +11,8 @@ var xPixbufErrorQuark func() glib.Quark
11 11
12 func PixbufErrorQuark() glib.Quark {12 func PixbufErrorQuark() glib.Quark {
13 13
14- return xPixbufErrorQuark()14+ cret := xPixbufErrorQuark()
15-15+ return cret
16 }16 }
17 17
18 type PixbufNonAnim struct {18 type PixbufNonAnim struct {
@@ -28,14 +28,16 @@ func PixbufNonAnimNewFromInternalPtr(ptr uintptr) *PixbufNonAnim {
28 var xNewPixbufNonAnim func(uintptr) uintptr28 var xNewPixbufNonAnim func(uintptr) uintptr
29 29
30 func NewPixbufNonAnim(PixbufVar *Pixbuf) *PixbufAnimation {30 func NewPixbufNonAnim(PixbufVar *Pixbuf) *PixbufAnimation {
31- NewPixbufNonAnimPtr := xNewPixbufNonAnim(PixbufVar.GoPointer())31+ var cls *PixbufAnimation
32- if NewPixbufNonAnimPtr == 0 {32+
33- return nil33+ cret := xNewPixbufNonAnim(PixbufVar.GoPointer())
34- }
35 34
36- NewPixbufNonAnimCls := &PixbufAnimation{}35+ if cret == 0 {
37- NewPixbufNonAnimCls.Ptr = NewPixbufNonAnimPtr36+ return cls
38- return NewPixbufNonAnimCls37+ }
38+ cls = &PixbufAnimation{}
39+ cls.Ptr = cret
40+ return cls
39 }41 }
40 42
41 func (c *PixbufNonAnim) GoPointer() uintptr {43 func (c *PixbufNonAnim) GoPointer() uintptr {
M v4/gio/gaction.go +24 -19
@@ -100,15 +100,15 @@ func (x *ActionBase) ChangeState(ValueVar *glib.Variant) {
100 // have its state changed from outside callers.100 // have its state changed from outside callers.
101 func (x *ActionBase) GetEnabled() bool {101 func (x *ActionBase) GetEnabled() bool {
102 102
103- return XGActionGetEnabled(x.GoPointer())103+ cret := XGActionGetEnabled(x.GoPointer())
104-104+ return cret
105 }105 }
106 106
107 // Queries the name of @action.107 // Queries the name of @action.
108 func (x *ActionBase) GetName() string {108 func (x *ActionBase) GetName() string {
109 109
110- return XGActionGetName(x.GoPointer())110+ cret := XGActionGetName(x.GoPointer())
111-111+ return cret
112 }112 }
113 113
114 // Queries the type of the parameter that must be given when activating114 // Queries the type of the parameter that must be given when activating
@@ -121,8 +121,8 @@ func (x *ActionBase) GetName() string {
121 // #GVariant, but %NULL instead.121 // #GVariant, but %NULL instead.
122 func (x *ActionBase) GetParameterType() *glib.VariantType {122 func (x *ActionBase) GetParameterType() *glib.VariantType {
123 123
124- return XGActionGetParameterType(x.GoPointer())124+ cret := XGActionGetParameterType(x.GoPointer())
125-125+ return cret
126 }126 }
127 127
128 // Queries the current state of @action.128 // Queries the current state of @action.
@@ -135,8 +135,8 @@ func (x *ActionBase) GetParameterType() *glib.VariantType {
135 // g_variant_unref() when it is no longer required.135 // g_variant_unref() when it is no longer required.
136 func (x *ActionBase) GetState() *glib.Variant {136 func (x *ActionBase) GetState() *glib.Variant {
137 137
138- return XGActionGetState(x.GoPointer())138+ cret := XGActionGetState(x.GoPointer())
139-139+ return cret
140 }140 }
141 141
142 // Requests a hint about the valid range of values for the state of142 // Requests a hint about the valid range of values for the state of
@@ -159,8 +159,8 @@ func (x *ActionBase) GetState() *glib.Variant {
159 // g_variant_unref() when it is no longer required.159 // g_variant_unref() when it is no longer required.
160 func (x *ActionBase) GetStateHint() *glib.Variant {160 func (x *ActionBase) GetStateHint() *glib.Variant {
161 161
162- return XGActionGetStateHint(x.GoPointer())162+ cret := XGActionGetStateHint(x.GoPointer())
163-163+ return cret
164 }164 }
165 165
166 // Queries the type of the state of @action.166 // Queries the type of the state of @action.
@@ -177,8 +177,8 @@ func (x *ActionBase) GetStateHint() *glib.Variant {
177 // will return %NULL and you must not call g_action_change_state().177 // will return %NULL and you must not call g_action_change_state().
178 func (x *ActionBase) GetStateType() *glib.VariantType {178 func (x *ActionBase) GetStateType() *glib.VariantType {
179 179
180- return XGActionGetStateType(x.GoPointer())180+ cret := XGActionGetStateType(x.GoPointer())
181-181+ return cret
182 }182 }
183 183
184 var XGActionActivate func(uintptr, *glib.Variant)184 var XGActionActivate func(uintptr, *glib.Variant)
@@ -201,11 +201,11 @@ var xActionNameIsValid func(string) bool
201 // @action_name must not be %NULL.201 // @action_name must not be %NULL.
202 func ActionNameIsValid(ActionNameVar string) bool {202 func ActionNameIsValid(ActionNameVar string) bool {
203 203
204- return xActionNameIsValid(ActionNameVar)204+ cret := xActionNameIsValid(ActionNameVar)
205-205+ return cret
206 }206 }
207 207
208-var xActionParseDetailedName func(string, string, **glib.Variant) bool208+var xActionParseDetailedName func(string, string, **glib.Variant, **glib.Error) bool
209 209
210 // Parses a detailed action name into its separate name and target210 // Parses a detailed action name into its separate name and target
211 // components.211 // components.
@@ -231,9 +231,14 @@ var xActionParseDetailedName func(string, string, **glib.Variant) bool
231 // target can be specified this way as well: "app.action('target')".231 // target can be specified this way as well: "app.action('target')".
232 // For strings, this third format must be used if * target value is232 // For strings, this third format must be used if * target value is
233 // empty or contains characters other than alphanumerics, '-' and '.'.233 // empty or contains characters other than alphanumerics, '-' and '.'.
234-func ActionParseDetailedName(DetailedNameVar string, ActionNameVar string, TargetValueVar **glib.Variant) bool {234+func ActionParseDetailedName(DetailedNameVar string, ActionNameVar string, TargetValueVar **glib.Variant) (bool, error) {
235+ var cerr *glib.Error
235 236
236- return xActionParseDetailedName(DetailedNameVar, ActionNameVar, TargetValueVar)237+ cret := xActionParseDetailedName(DetailedNameVar, ActionNameVar, TargetValueVar, &cerr)
238+ if cerr == nil {
239+ return cret, nil
240+ }
241+ return cret, cerr
237 242
238 }243 }
239 244
@@ -251,8 +256,8 @@ var xActionPrintDetailedName func(string, *glib.Variant) string
251 // this function.256 // this function.
252 func ActionPrintDetailedName(ActionNameVar string, TargetValueVar *glib.Variant) string {257 func ActionPrintDetailedName(ActionNameVar string, TargetValueVar *glib.Variant) string {
253 258
254- return xActionPrintDetailedName(ActionNameVar, TargetValueVar)259+ cret := xActionPrintDetailedName(ActionNameVar, TargetValueVar)
255-260+ return cret
256 }261 }
257 262
258 func init() {263 func init() {
M v4/gio/gactiongroup.go +16 -16
@@ -185,8 +185,8 @@ func (x *ActionGroupBase) ChangeActionState(ActionNameVar string, ValueVar *glib
185 // have its state changed from outside callers.185 // have its state changed from outside callers.
186 func (x *ActionGroupBase) GetActionEnabled(ActionNameVar string) bool {186 func (x *ActionGroupBase) GetActionEnabled(ActionNameVar string) bool {
187 187
188- return XGActionGroupGetActionEnabled(x.GoPointer(), ActionNameVar)188+ cret := XGActionGroupGetActionEnabled(x.GoPointer(), ActionNameVar)
189-189+ return cret
190 }190 }
191 191
192 // Queries the type of the parameter that must be given when activating192 // Queries the type of the parameter that must be given when activating
@@ -204,8 +204,8 @@ func (x *ActionGroupBase) GetActionEnabled(ActionNameVar string) bool {
204 // with the same name but a different parameter type.204 // with the same name but a different parameter type.
205 func (x *ActionGroupBase) GetActionParameterType(ActionNameVar string) *glib.VariantType {205 func (x *ActionGroupBase) GetActionParameterType(ActionNameVar string) *glib.VariantType {
206 206
207- return XGActionGroupGetActionParameterType(x.GoPointer(), ActionNameVar)207+ cret := XGActionGroupGetActionParameterType(x.GoPointer(), ActionNameVar)
208-208+ return cret
209 }209 }
210 210
211 // Queries the current state of the named action within @action_group.211 // Queries the current state of the named action within @action_group.
@@ -218,8 +218,8 @@ func (x *ActionGroupBase) GetActionParameterType(ActionNameVar string) *glib.Var
218 // g_variant_unref() when it is no longer required.218 // g_variant_unref() when it is no longer required.
219 func (x *ActionGroupBase) GetActionState(ActionNameVar string) *glib.Variant {219 func (x *ActionGroupBase) GetActionState(ActionNameVar string) *glib.Variant {
220 220
221- return XGActionGroupGetActionState(x.GoPointer(), ActionNameVar)221+ cret := XGActionGroupGetActionState(x.GoPointer(), ActionNameVar)
222-222+ return cret
223 }223 }
224 224
225 // Requests a hint about the valid range of values for the state of the225 // Requests a hint about the valid range of values for the state of the
@@ -242,8 +242,8 @@ func (x *ActionGroupBase) GetActionState(ActionNameVar string) *glib.Variant {
242 // g_variant_unref() when it is no longer required.242 // g_variant_unref() when it is no longer required.
243 func (x *ActionGroupBase) GetActionStateHint(ActionNameVar string) *glib.Variant {243 func (x *ActionGroupBase) GetActionStateHint(ActionNameVar string) *glib.Variant {
244 244
245- return XGActionGroupGetActionStateHint(x.GoPointer(), ActionNameVar)245+ cret := XGActionGroupGetActionStateHint(x.GoPointer(), ActionNameVar)
246-246+ return cret
247 }247 }
248 248
249 // Queries the type of the state of the named action within249 // Queries the type of the state of the named action within
@@ -264,15 +264,15 @@ func (x *ActionGroupBase) GetActionStateHint(ActionNameVar string) *glib.Variant
264 // with the same name but a different state type.264 // with the same name but a different state type.
265 func (x *ActionGroupBase) GetActionStateType(ActionNameVar string) *glib.VariantType {265 func (x *ActionGroupBase) GetActionStateType(ActionNameVar string) *glib.VariantType {
266 266
267- return XGActionGroupGetActionStateType(x.GoPointer(), ActionNameVar)267+ cret := XGActionGroupGetActionStateType(x.GoPointer(), ActionNameVar)
268-268+ return cret
269 }269 }
270 270
271 // Checks if the named action exists within @action_group.271 // Checks if the named action exists within @action_group.
272 func (x *ActionGroupBase) HasAction(ActionNameVar string) bool {272 func (x *ActionGroupBase) HasAction(ActionNameVar string) bool {
273 273
274- return XGActionGroupHasAction(x.GoPointer(), ActionNameVar)274+ cret := XGActionGroupHasAction(x.GoPointer(), ActionNameVar)
275-275+ return cret
276 }276 }
277 277
278 // Lists the actions contained within @action_group.278 // Lists the actions contained within @action_group.
@@ -281,8 +281,8 @@ func (x *ActionGroupBase) HasAction(ActionNameVar string) bool {
281 // it is no longer required.281 // it is no longer required.
282 func (x *ActionGroupBase) ListActions() uintptr {282 func (x *ActionGroupBase) ListActions() uintptr {
283 283
284- return XGActionGroupListActions(x.GoPointer())284+ cret := XGActionGroupListActions(x.GoPointer())
285-285+ return cret
286 }286 }
287 287
288 // Queries all aspects of the named action within an @action_group.288 // Queries all aspects of the named action within an @action_group.
@@ -314,8 +314,8 @@ func (x *ActionGroupBase) ListActions() uintptr {
314 // fields may or may not have been modified.314 // fields may or may not have been modified.
315 func (x *ActionGroupBase) QueryAction(ActionNameVar string, EnabledVar bool, ParameterTypeVar **glib.VariantType, StateTypeVar **glib.VariantType, StateHintVar **glib.Variant, StateVar **glib.Variant) bool {315 func (x *ActionGroupBase) QueryAction(ActionNameVar string, EnabledVar bool, ParameterTypeVar **glib.VariantType, StateTypeVar **glib.VariantType, StateHintVar **glib.Variant, StateVar **glib.Variant) bool {
316 316
317- return XGActionGroupQueryAction(x.GoPointer(), ActionNameVar, EnabledVar, ParameterTypeVar, StateTypeVar, StateHintVar, StateVar)317+ cret := XGActionGroupQueryAction(x.GoPointer(), ActionNameVar, EnabledVar, ParameterTypeVar, StateTypeVar, StateHintVar, StateVar)
318-318+ return cret
319 }319 }
320 320
321 var XGActionGroupActionAdded func(uintptr, string)321 var XGActionGroupActionAdded func(uintptr, string)
M v4/gio/gactionmap.go +12 -13
@@ -18,11 +18,11 @@ import (
18 //18 //
19 // See g_action_map_add_action_entries() for an example.19 // See g_action_map_add_action_entries() for an example.
20 type ActionEntry struct {20 type ActionEntry struct {
21- Name string21+ Name uintptr
22 22
23- ParameterType string23+ ParameterType uintptr
24 24
25- State string25+ State uintptr
26 26
27 Padding uintptr27 Padding uintptr
28 }28 }
@@ -126,18 +126,17 @@ func (x *ActionMapBase) AddActionEntries(EntriesVar uintptr, NEntriesVar int, Us
126 //126 //
127 // If no such action exists, returns %NULL.127 // If no such action exists, returns %NULL.
128 func (x *ActionMapBase) LookupAction(ActionNameVar string) *ActionBase {128 func (x *ActionMapBase) LookupAction(ActionNameVar string) *ActionBase {
129+ var cls *ActionBase
129 130
130- LookupActionPtr := XGActionMapLookupAction(x.GoPointer(), ActionNameVar)131+ cret := XGActionMapLookupAction(x.GoPointer(), ActionNameVar)
131- if LookupActionPtr == 0 {
132- return nil
133- }
134-
135- gobject.IncreaseRef(LookupActionPtr)
136-
137- LookupActionCls := &ActionBase{}
138- LookupActionCls.Ptr = LookupActionPtr
139- return LookupActionCls
140 132
133+ if cret == 0 {
134+ return cls
135+ }
136+ gobject.IncreaseRef(cret)
137+ cls = &ActionBase{}
138+ cls.Ptr = cret
139+ return cls
141 }140 }
142 141
143 // Removes the named action from the action map.142 // Removes the named action from the action map.
M v4/gio/gappinfo.go +178 -122
@@ -113,9 +113,14 @@ func (x *AppInfoBase) SetGoPointer(ptr uintptr) {
113 113
114 // Adds a content type to the application information to indicate the114 // Adds a content type to the application information to indicate the
115 // application is capable of opening files with the given content type.115 // application is capable of opening files with the given content type.
116-func (x *AppInfoBase) AddSupportsType(ContentTypeVar string) bool {116+func (x *AppInfoBase) AddSupportsType(ContentTypeVar string) (bool, error) {
117+ var cerr *glib.Error
117 118
118- return XGAppInfoAddSupportsType(x.GoPointer(), ContentTypeVar)119+ cret := XGAppInfoAddSupportsType(x.GoPointer(), ContentTypeVar, &cerr)
120+ if cerr == nil {
121+ return cret, nil
122+ }
123+ return cret, cerr
119 124
120 }125 }
121 126
@@ -123,15 +128,15 @@ func (x *AppInfoBase) AddSupportsType(ContentTypeVar string) bool {
123 // See g_app_info_delete().128 // See g_app_info_delete().
124 func (x *AppInfoBase) CanDelete() bool {129 func (x *AppInfoBase) CanDelete() bool {
125 130
126- return XGAppInfoCanDelete(x.GoPointer())131+ cret := XGAppInfoCanDelete(x.GoPointer())
127-132+ return cret
128 }133 }
129 134
130 // Checks if a supported content type can be removed from an application.135 // Checks if a supported content type can be removed from an application.
131 func (x *AppInfoBase) CanRemoveSupportsType() bool {136 func (x *AppInfoBase) CanRemoveSupportsType() bool {
132 137
133- return XGAppInfoCanRemoveSupportsType(x.GoPointer())138+ cret := XGAppInfoCanRemoveSupportsType(x.GoPointer())
134-139+ return cret
135 }140 }
136 141
137 // Tries to delete a #GAppInfo.142 // Tries to delete a #GAppInfo.
@@ -141,22 +146,22 @@ func (x *AppInfoBase) CanRemoveSupportsType() bool {
141 // See g_app_info_can_delete().146 // See g_app_info_can_delete().
142 func (x *AppInfoBase) Delete() bool {147 func (x *AppInfoBase) Delete() bool {
143 148
144- return XGAppInfoDelete(x.GoPointer())149+ cret := XGAppInfoDelete(x.GoPointer())
145-150+ return cret
146 }151 }
147 152
148 // Creates a duplicate of a #GAppInfo.153 // Creates a duplicate of a #GAppInfo.
149 func (x *AppInfoBase) Dup() *AppInfoBase {154 func (x *AppInfoBase) Dup() *AppInfoBase {
155+ var cls *AppInfoBase
150 156
151- DupPtr := XGAppInfoDup(x.GoPointer())157+ cret := XGAppInfoDup(x.GoPointer())
152- if DupPtr == 0 {
153- return nil
154- }
155-
156- DupCls := &AppInfoBase{}
157- DupCls.Ptr = DupPtr
158- return DupCls
159 158
159+ if cret == 0 {
160+ return cls
161+ }
162+ cls = &AppInfoBase{}
163+ cls.Ptr = cret
164+ return cls
160 }165 }
161 166
162 // Checks if two #GAppInfos are equal.167 // Checks if two #GAppInfos are equal.
@@ -166,54 +171,53 @@ func (x *AppInfoBase) Dup() *AppInfoBase {
166 // contents is needed, program code must additionally compare relevant fields.171 // contents is needed, program code must additionally compare relevant fields.
167 func (x *AppInfoBase) Equal(Appinfo2Var AppInfo) bool {172 func (x *AppInfoBase) Equal(Appinfo2Var AppInfo) bool {
168 173
169- return XGAppInfoEqual(x.GoPointer(), Appinfo2Var.GoPointer())174+ cret := XGAppInfoEqual(x.GoPointer(), Appinfo2Var.GoPointer())
170-175+ return cret
171 }176 }
172 177
173 // Gets the commandline with which the application will be178 // Gets the commandline with which the application will be
174 // started.179 // started.
175 func (x *AppInfoBase) GetCommandline() string {180 func (x *AppInfoBase) GetCommandline() string {
176 181
177- return XGAppInfoGetCommandline(x.GoPointer())182+ cret := XGAppInfoGetCommandline(x.GoPointer())
178-183+ return cret
179 }184 }
180 185
181 // Gets a human-readable description of an installed application.186 // Gets a human-readable description of an installed application.
182 func (x *AppInfoBase) GetDescription() string {187 func (x *AppInfoBase) GetDescription() string {
183 188
184- return XGAppInfoGetDescription(x.GoPointer())189+ cret := XGAppInfoGetDescription(x.GoPointer())
185-190+ return cret
186 }191 }
187 192
188 // Gets the display name of the application. The display name is often more193 // Gets the display name of the application. The display name is often more
189 // descriptive to the user than the name itself.194 // descriptive to the user than the name itself.
190 func (x *AppInfoBase) GetDisplayName() string {195 func (x *AppInfoBase) GetDisplayName() string {
191 196
192- return XGAppInfoGetDisplayName(x.GoPointer())197+ cret := XGAppInfoGetDisplayName(x.GoPointer())
193-198+ return cret
194 }199 }
195 200
196 // Gets the executable's name for the installed application.201 // Gets the executable's name for the installed application.
197 func (x *AppInfoBase) GetExecutable() string {202 func (x *AppInfoBase) GetExecutable() string {
198 203
199- return XGAppInfoGetExecutable(x.GoPointer())204+ cret := XGAppInfoGetExecutable(x.GoPointer())
200-205+ return cret
201 }206 }
202 207
203 // Gets the icon for the application.208 // Gets the icon for the application.
204 func (x *AppInfoBase) GetIcon() *IconBase {209 func (x *AppInfoBase) GetIcon() *IconBase {
210+ var cls *IconBase
205 211
206- GetIconPtr := XGAppInfoGetIcon(x.GoPointer())212+ cret := XGAppInfoGetIcon(x.GoPointer())
207- if GetIconPtr == 0 {
208- return nil
209- }
210-
211- gobject.IncreaseRef(GetIconPtr)
212-
213- GetIconCls := &IconBase{}
214- GetIconCls.Ptr = GetIconPtr
215- return GetIconCls
216 213
214+ if cret == 0 {
215+ return cls
216+ }
217+ gobject.IncreaseRef(cret)
218+ cls = &IconBase{}
219+ cls.Ptr = cret
220+ return cls
217 }221 }
218 222
219 // Gets the ID of an application. An id is a string that223 // Gets the ID of an application. An id is a string that
@@ -225,15 +229,15 @@ func (x *AppInfoBase) GetIcon() *IconBase {
225 // the @appinfo has been constructed.229 // the @appinfo has been constructed.
226 func (x *AppInfoBase) GetId() string {230 func (x *AppInfoBase) GetId() string {
227 231
228- return XGAppInfoGetId(x.GoPointer())232+ cret := XGAppInfoGetId(x.GoPointer())
229-233+ return cret
230 }234 }
231 235
232 // Gets the installed name of the application.236 // Gets the installed name of the application.
233 func (x *AppInfoBase) GetName() string {237 func (x *AppInfoBase) GetName() string {
234 238
235- return XGAppInfoGetName(x.GoPointer())239+ cret := XGAppInfoGetName(x.GoPointer())
236-240+ return cret
237 }241 }
238 242
239 // Retrieves the list of content types that @app_info claims to support.243 // Retrieves the list of content types that @app_info claims to support.
@@ -244,8 +248,8 @@ func (x *AppInfoBase) GetName() string {
244 // the application.248 // the application.
245 func (x *AppInfoBase) GetSupportedTypes() uintptr {249 func (x *AppInfoBase) GetSupportedTypes() uintptr {
246 250
247- return XGAppInfoGetSupportedTypes(x.GoPointer())251+ cret := XGAppInfoGetSupportedTypes(x.GoPointer())
248-252+ return cret
249 }253 }
250 254
251 // Launches the application. Passes @files to the launched application255 // Launches the application. Passes @files to the launched application
@@ -275,9 +279,14 @@ func (x *AppInfoBase) GetSupportedTypes() uintptr {
275 // should it be inherited by further processes. The `DISPLAY` and279 // should it be inherited by further processes. The `DISPLAY` and
276 // `DESKTOP_STARTUP_ID` environment variables are also set, based280 // `DESKTOP_STARTUP_ID` environment variables are also set, based
277 // on information provided in @context.281 // on information provided in @context.
278-func (x *AppInfoBase) Launch(FilesVar *glib.List, ContextVar *AppLaunchContext) bool {282+func (x *AppInfoBase) Launch(FilesVar *glib.List, ContextVar *AppLaunchContext) (bool, error) {
283+ var cerr *glib.Error
279 284
280- return XGAppInfoLaunch(x.GoPointer(), FilesVar, ContextVar.GoPointer())285+ cret := XGAppInfoLaunch(x.GoPointer(), FilesVar, ContextVar.GoPointer(), &cerr)
286+ if cerr == nil {
287+ return cret, nil
288+ }
289+ return cret, cerr
281 290
282 }291 }
283 292
@@ -291,9 +300,14 @@ func (x *AppInfoBase) Launch(FilesVar *glib.List, ContextVar *AppLaunchContext)
291 // Note that even if the launch is successful the application launched300 // Note that even if the launch is successful the application launched
292 // can fail to start if it runs into problems during startup. There is301 // can fail to start if it runs into problems during startup. There is
293 // no way to detect this.302 // no way to detect this.
294-func (x *AppInfoBase) LaunchUris(UrisVar *glib.List, ContextVar *AppLaunchContext) bool {303+func (x *AppInfoBase) LaunchUris(UrisVar *glib.List, ContextVar *AppLaunchContext) (bool, error) {
304+ var cerr *glib.Error
295 305
296- return XGAppInfoLaunchUris(x.GoPointer(), UrisVar, ContextVar.GoPointer())306+ cret := XGAppInfoLaunchUris(x.GoPointer(), UrisVar, ContextVar.GoPointer(), &cerr)
307+ if cerr == nil {
308+ return cret, nil
309+ }
310+ return cret, cerr
297 311
298 }312 }
299 313
@@ -310,30 +324,50 @@ func (x *AppInfoBase) LaunchUrisAsync(UrisVar *glib.List, ContextVar *AppLaunchC
310 }324 }
311 325
312 // Finishes a g_app_info_launch_uris_async() operation.326 // Finishes a g_app_info_launch_uris_async() operation.
313-func (x *AppInfoBase) LaunchUrisFinish(ResultVar AsyncResult) bool {327+func (x *AppInfoBase) LaunchUrisFinish(ResultVar AsyncResult) (bool, error) {
328+ var cerr *glib.Error
314 329
315- return XGAppInfoLaunchUrisFinish(x.GoPointer(), ResultVar.GoPointer())330+ cret := XGAppInfoLaunchUrisFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
331+ if cerr == nil {
332+ return cret, nil
333+ }
334+ return cret, cerr
316 335
317 }336 }
318 337
319 // Removes a supported type from an application, if possible.338 // Removes a supported type from an application, if possible.
320-func (x *AppInfoBase) RemoveSupportsType(ContentTypeVar string) bool {339+func (x *AppInfoBase) RemoveSupportsType(ContentTypeVar string) (bool, error) {
340+ var cerr *glib.Error
321 341
322- return XGAppInfoRemoveSupportsType(x.GoPointer(), ContentTypeVar)342+ cret := XGAppInfoRemoveSupportsType(x.GoPointer(), ContentTypeVar, &cerr)
343+ if cerr == nil {
344+ return cret, nil
345+ }
346+ return cret, cerr
323 347
324 }348 }
325 349
326 // Sets the application as the default handler for the given file extension.350 // Sets the application as the default handler for the given file extension.
327-func (x *AppInfoBase) SetAsDefaultForExtension(ExtensionVar string) bool {351+func (x *AppInfoBase) SetAsDefaultForExtension(ExtensionVar string) (bool, error) {
352+ var cerr *glib.Error
328 353
329- return XGAppInfoSetAsDefaultForExtension(x.GoPointer(), ExtensionVar)354+ cret := XGAppInfoSetAsDefaultForExtension(x.GoPointer(), ExtensionVar, &cerr)
355+ if cerr == nil {
356+ return cret, nil
357+ }
358+ return cret, cerr
330 359
331 }360 }
332 361
333 // Sets the application as the default handler for a given type.362 // Sets the application as the default handler for a given type.
334-func (x *AppInfoBase) SetAsDefaultForType(ContentTypeVar string) bool {363+func (x *AppInfoBase) SetAsDefaultForType(ContentTypeVar string) (bool, error) {
364+ var cerr *glib.Error
335 365
336- return XGAppInfoSetAsDefaultForType(x.GoPointer(), ContentTypeVar)366+ cret := XGAppInfoSetAsDefaultForType(x.GoPointer(), ContentTypeVar, &cerr)
367+ if cerr == nil {
368+ return cret, nil
369+ }
370+ return cret, cerr
337 371
338 }372 }
339 373
@@ -341,9 +375,14 @@ func (x *AppInfoBase) SetAsDefaultForType(ContentTypeVar string) bool {
341 // This will make the application appear as first in the list returned375 // This will make the application appear as first in the list returned
342 // by g_app_info_get_recommended_for_type(), regardless of the default376 // by g_app_info_get_recommended_for_type(), regardless of the default
343 // application for that content type.377 // application for that content type.
344-func (x *AppInfoBase) SetAsLastUsedForType(ContentTypeVar string) bool {378+func (x *AppInfoBase) SetAsLastUsedForType(ContentTypeVar string) (bool, error) {
379+ var cerr *glib.Error
345 380
346- return XGAppInfoSetAsLastUsedForType(x.GoPointer(), ContentTypeVar)381+ cret := XGAppInfoSetAsLastUsedForType(x.GoPointer(), ContentTypeVar, &cerr)
382+ if cerr == nil {
383+ return cret, nil
384+ }
385+ return cret, cerr
347 386
348 }387 }
349 388
@@ -351,25 +390,25 @@ func (x *AppInfoBase) SetAsLastUsedForType(ContentTypeVar string) bool {
351 // list available applications.390 // list available applications.
352 func (x *AppInfoBase) ShouldShow() bool {391 func (x *AppInfoBase) ShouldShow() bool {
353 392
354- return XGAppInfoShouldShow(x.GoPointer())393+ cret := XGAppInfoShouldShow(x.GoPointer())
355-394+ return cret
356 }395 }
357 396
358 // Checks if the application accepts files as arguments.397 // Checks if the application accepts files as arguments.
359 func (x *AppInfoBase) SupportsFiles() bool {398 func (x *AppInfoBase) SupportsFiles() bool {
360 399
361- return XGAppInfoSupportsFiles(x.GoPointer())400+ cret := XGAppInfoSupportsFiles(x.GoPointer())
362-401+ return cret
363 }402 }
364 403
365 // Checks if the application supports reading files and directories from URIs.404 // Checks if the application supports reading files and directories from URIs.
366 func (x *AppInfoBase) SupportsUris() bool {405 func (x *AppInfoBase) SupportsUris() bool {
367 406
368- return XGAppInfoSupportsUris(x.GoPointer())407+ cret := XGAppInfoSupportsUris(x.GoPointer())
369-408+ return cret
370 }409 }
371 410
372-var XGAppInfoAddSupportsType func(uintptr, string) bool411+var XGAppInfoAddSupportsType func(uintptr, string, **glib.Error) bool
373 var XGAppInfoCanDelete func(uintptr) bool412 var XGAppInfoCanDelete func(uintptr) bool
374 var XGAppInfoCanRemoveSupportsType func(uintptr) bool413 var XGAppInfoCanRemoveSupportsType func(uintptr) bool
375 var XGAppInfoDelete func(uintptr) bool414 var XGAppInfoDelete func(uintptr) bool
@@ -383,19 +422,19 @@ var XGAppInfoGetIcon func(uintptr) uintptr
383 var XGAppInfoGetId func(uintptr) string422 var XGAppInfoGetId func(uintptr) string
384 var XGAppInfoGetName func(uintptr) string423 var XGAppInfoGetName func(uintptr) string
385 var XGAppInfoGetSupportedTypes func(uintptr) uintptr424 var XGAppInfoGetSupportedTypes func(uintptr) uintptr
386-var XGAppInfoLaunch func(uintptr, *glib.List, uintptr) bool425+var XGAppInfoLaunch func(uintptr, *glib.List, uintptr, **glib.Error) bool
387-var XGAppInfoLaunchUris func(uintptr, *glib.List, uintptr) bool426+var XGAppInfoLaunchUris func(uintptr, *glib.List, uintptr, **glib.Error) bool
388 var XGAppInfoLaunchUrisAsync func(uintptr, *glib.List, uintptr, uintptr, uintptr, uintptr)427 var XGAppInfoLaunchUrisAsync func(uintptr, *glib.List, uintptr, uintptr, uintptr, uintptr)
389-var XGAppInfoLaunchUrisFinish func(uintptr, uintptr) bool428+var XGAppInfoLaunchUrisFinish func(uintptr, uintptr, **glib.Error) bool
390-var XGAppInfoRemoveSupportsType func(uintptr, string) bool429+var XGAppInfoRemoveSupportsType func(uintptr, string, **glib.Error) bool
391-var XGAppInfoSetAsDefaultForExtension func(uintptr, string) bool430+var XGAppInfoSetAsDefaultForExtension func(uintptr, string, **glib.Error) bool
392-var XGAppInfoSetAsDefaultForType func(uintptr, string) bool431+var XGAppInfoSetAsDefaultForType func(uintptr, string, **glib.Error) bool
393-var XGAppInfoSetAsLastUsedForType func(uintptr, string) bool432+var XGAppInfoSetAsLastUsedForType func(uintptr, string, **glib.Error) bool
394 var XGAppInfoShouldShow func(uintptr) bool433 var XGAppInfoShouldShow func(uintptr) bool
395 var XGAppInfoSupportsFiles func(uintptr) bool434 var XGAppInfoSupportsFiles func(uintptr) bool
396 var XGAppInfoSupportsUris func(uintptr) bool435 var XGAppInfoSupportsUris func(uintptr) bool
397 436
398-var xAppInfoCreateFromCommandline func(string, string, AppInfoCreateFlags) uintptr437+var xAppInfoCreateFromCommandline func(string, string, AppInfoCreateFlags, **glib.Error) uintptr
399 438
400 // Creates a new #GAppInfo from the given information.439 // Creates a new #GAppInfo from the given information.
401 //440 //
@@ -404,16 +443,21 @@ var xAppInfoCreateFromCommandline func(string, string, AppInfoCreateFlags) uintp
404 // are applied. For example, if the @commandline contains443 // are applied. For example, if the @commandline contains
405 // percent-encoded URIs, the percent-character must be doubled in order to prevent it from444 // percent-encoded URIs, the percent-character must be doubled in order to prevent it from
406 // being swallowed by Exec key unquoting. See the specification for exact quoting rules.445 // being swallowed by Exec key unquoting. See the specification for exact quoting rules.
407-func AppInfoCreateFromCommandline(CommandlineVar string, ApplicationNameVar string, FlagsVar AppInfoCreateFlags) *AppInfoBase {446+func AppInfoCreateFromCommandline(CommandlineVar string, ApplicationNameVar string, FlagsVar AppInfoCreateFlags) (*AppInfoBase, error) {
447+ var cls *AppInfoBase
448+ var cerr *glib.Error
408 449
409- AppInfoCreateFromCommandlinePtr := xAppInfoCreateFromCommandline(CommandlineVar, ApplicationNameVar, FlagsVar)450+ cret := xAppInfoCreateFromCommandline(CommandlineVar, ApplicationNameVar, FlagsVar, &cerr)
410- if AppInfoCreateFromCommandlinePtr == 0 {
411- return nil
412- }
413 451
414- AppInfoCreateFromCommandlineCls := &AppInfoBase{}452+ if cret == 0 {
415- AppInfoCreateFromCommandlineCls.Ptr = AppInfoCreateFromCommandlinePtr453+ return cls, cerr
416- return AppInfoCreateFromCommandlineCls454+ }
455+ cls = &AppInfoBase{}
456+ cls.Ptr = cret
457+ if cerr == nil {
458+ return cls, nil
459+ }
460+ return cls, cerr
417 461
418 }462 }
419 463
@@ -429,8 +473,8 @@ var xAppInfoGetAll func() *glib.List
429 // the `Hidden` key set.473 // the `Hidden` key set.
430 func AppInfoGetAll() *glib.List {474 func AppInfoGetAll() *glib.List {
431 475
432- return xAppInfoGetAll()476+ cret := xAppInfoGetAll()
433-477+ return cret
434 }478 }
435 479
436 var xAppInfoGetAllForType func(string) *glib.List480 var xAppInfoGetAllForType func(string) *glib.List
@@ -441,24 +485,24 @@ var xAppInfoGetAllForType func(string) *glib.List
441 // g_app_info_get_fallback_for_type().485 // g_app_info_get_fallback_for_type().
442 func AppInfoGetAllForType(ContentTypeVar string) *glib.List {486 func AppInfoGetAllForType(ContentTypeVar string) *glib.List {
443 487
444- return xAppInfoGetAllForType(ContentTypeVar)488+ cret := xAppInfoGetAllForType(ContentTypeVar)
445-489+ return cret
446 }490 }
447 491
448 var xAppInfoGetDefaultForType func(string, bool) uintptr492 var xAppInfoGetDefaultForType func(string, bool) uintptr
449 493
450 // Gets the default #GAppInfo for a given content type.494 // Gets the default #GAppInfo for a given content type.
451 func AppInfoGetDefaultForType(ContentTypeVar string, MustSupportUrisVar bool) *AppInfoBase {495 func AppInfoGetDefaultForType(ContentTypeVar string, MustSupportUrisVar bool) *AppInfoBase {
496+ var cls *AppInfoBase
452 497
453- AppInfoGetDefaultForTypePtr := xAppInfoGetDefaultForType(ContentTypeVar, MustSupportUrisVar)498+ cret := xAppInfoGetDefaultForType(ContentTypeVar, MustSupportUrisVar)
454- if AppInfoGetDefaultForTypePtr == 0 {
455- return nil
456- }
457-
458- AppInfoGetDefaultForTypeCls := &AppInfoBase{}
459- AppInfoGetDefaultForTypeCls.Ptr = AppInfoGetDefaultForTypePtr
460- return AppInfoGetDefaultForTypeCls
461 499
500+ if cret == 0 {
501+ return cls
502+ }
503+ cls = &AppInfoBase{}
504+ cls.Ptr = cret
505+ return cls
462 }506 }
463 507
464 var xAppInfoGetDefaultForUriScheme func(string) uintptr508 var xAppInfoGetDefaultForUriScheme func(string) uintptr
@@ -468,16 +512,16 @@ var xAppInfoGetDefaultForUriScheme func(string) uintptr
468 // of the URI, up to but not including the ':', e.g. "http",512 // of the URI, up to but not including the ':', e.g. "http",
469 // "ftp" or "sip".513 // "ftp" or "sip".
470 func AppInfoGetDefaultForUriScheme(UriSchemeVar string) *AppInfoBase {514 func AppInfoGetDefaultForUriScheme(UriSchemeVar string) *AppInfoBase {
515+ var cls *AppInfoBase
471 516
472- AppInfoGetDefaultForUriSchemePtr := xAppInfoGetDefaultForUriScheme(UriSchemeVar)517+ cret := xAppInfoGetDefaultForUriScheme(UriSchemeVar)
473- if AppInfoGetDefaultForUriSchemePtr == 0 {
474- return nil
475- }
476-
477- AppInfoGetDefaultForUriSchemeCls := &AppInfoBase{}
478- AppInfoGetDefaultForUriSchemeCls.Ptr = AppInfoGetDefaultForUriSchemePtr
479- return AppInfoGetDefaultForUriSchemeCls
480 518
519+ if cret == 0 {
520+ return cls
521+ }
522+ cls = &AppInfoBase{}
523+ cls.Ptr = cret
524+ return cls
481 }525 }
482 526
483 var xAppInfoGetFallbackForType func(string) *glib.List527 var xAppInfoGetFallbackForType func(string) *glib.List
@@ -487,8 +531,8 @@ var xAppInfoGetFallbackForType func(string) *glib.List
487 // by MIME type subclassing and not directly.531 // by MIME type subclassing and not directly.
488 func AppInfoGetFallbackForType(ContentTypeVar string) *glib.List {532 func AppInfoGetFallbackForType(ContentTypeVar string) *glib.List {
489 533
490- return xAppInfoGetFallbackForType(ContentTypeVar)534+ cret := xAppInfoGetFallbackForType(ContentTypeVar)
491-535+ return cret
492 }536 }
493 537
494 var xAppInfoGetRecommendedForType func(string) *glib.List538 var xAppInfoGetRecommendedForType func(string) *glib.List
@@ -501,11 +545,11 @@ var xAppInfoGetRecommendedForType func(string) *glib.List
501 // called.545 // called.
502 func AppInfoGetRecommendedForType(ContentTypeVar string) *glib.List {546 func AppInfoGetRecommendedForType(ContentTypeVar string) *glib.List {
503 547
504- return xAppInfoGetRecommendedForType(ContentTypeVar)548+ cret := xAppInfoGetRecommendedForType(ContentTypeVar)
505-549+ return cret
506 }550 }
507 551
508-var xAppInfoLaunchDefaultForUri func(string, uintptr) bool552+var xAppInfoLaunchDefaultForUri func(string, uintptr, **glib.Error) bool
509 553
510 // Utility function that launches the default application554 // Utility function that launches the default application
511 // registered to handle the specified uri. Synchronous I/O555 // registered to handle the specified uri. Synchronous I/O
@@ -515,9 +559,14 @@ var xAppInfoLaunchDefaultForUri func(string, uintptr) bool
515 // The D-Bus–activated applications don't have to be started if your application559 // The D-Bus–activated applications don't have to be started if your application
516 // terminates too soon after this function. To prevent this, use560 // terminates too soon after this function. To prevent this, use
517 // g_app_info_launch_default_for_uri_async() instead.561 // g_app_info_launch_default_for_uri_async() instead.
518-func AppInfoLaunchDefaultForUri(UriVar string, ContextVar *AppLaunchContext) bool {562+func AppInfoLaunchDefaultForUri(UriVar string, ContextVar *AppLaunchContext) (bool, error) {
563+ var cerr *glib.Error
519 564
520- return xAppInfoLaunchDefaultForUri(UriVar, ContextVar.GoPointer())565+ cret := xAppInfoLaunchDefaultForUri(UriVar, ContextVar.GoPointer(), &cerr)
566+ if cerr == nil {
567+ return cret, nil
568+ }
569+ return cret, cerr
521 570
522 }571 }
523 572
@@ -539,12 +588,17 @@ func AppInfoLaunchDefaultForUriAsync(UriVar string, ContextVar *AppLaunchContext
539 588
540 }589 }
541 590
542-var xAppInfoLaunchDefaultForUriFinish func(uintptr) bool591+var xAppInfoLaunchDefaultForUriFinish func(uintptr, **glib.Error) bool
543 592
544 // Finishes an asynchronous launch-default-for-uri operation.593 // Finishes an asynchronous launch-default-for-uri operation.
545-func AppInfoLaunchDefaultForUriFinish(ResultVar AsyncResult) bool {594+func AppInfoLaunchDefaultForUriFinish(ResultVar AsyncResult) (bool, error) {
595+ var cerr *glib.Error
546 596
547- return xAppInfoLaunchDefaultForUriFinish(ResultVar.GoPointer())597+ cret := xAppInfoLaunchDefaultForUriFinish(ResultVar.GoPointer(), &cerr)
598+ if cerr == nil {
599+ return cret, nil
600+ }
601+ return cret, cerr
548 602
549 }603 }
550 604
@@ -579,14 +633,16 @@ var xNewAppLaunchContext func() uintptr
579 // Creates a new application launch context. This is not normally used,633 // Creates a new application launch context. This is not normally used,
580 // instead you instantiate a subclass of this, such as #GdkAppLaunchContext.634 // instead you instantiate a subclass of this, such as #GdkAppLaunchContext.
581 func NewAppLaunchContext() *AppLaunchContext {635 func NewAppLaunchContext() *AppLaunchContext {
582- NewAppLaunchContextPtr := xNewAppLaunchContext()636+ var cls *AppLaunchContext
583- if NewAppLaunchContextPtr == 0 {
584- return nil
585- }
586 637
587- NewAppLaunchContextCls := &AppLaunchContext{}638+ cret := xNewAppLaunchContext()
588- NewAppLaunchContextCls.Ptr = NewAppLaunchContextPtr639+
589- return NewAppLaunchContextCls640+ if cret == 0 {
641+ return cls
642+ }
643+ cls = &AppLaunchContext{}
644+ cls.Ptr = cret
645+ return cls
590 }646 }
591 647
592 var xAppLaunchContextGetDisplay func(uintptr, uintptr, *glib.List) string648 var xAppLaunchContextGetDisplay func(uintptr, uintptr, *glib.List) string
@@ -596,8 +652,8 @@ var xAppLaunchContextGetDisplay func(uintptr, uintptr, *glib.List) string
596 // application, by setting the `DISPLAY` environment variable.652 // application, by setting the `DISPLAY` environment variable.
597 func (x *AppLaunchContext) GetDisplay(InfoVar AppInfo, FilesVar *glib.List) string {653 func (x *AppLaunchContext) GetDisplay(InfoVar AppInfo, FilesVar *glib.List) string {
598 654
599- return xAppLaunchContextGetDisplay(x.GoPointer(), InfoVar.GoPointer(), FilesVar)655+ cret := xAppLaunchContextGetDisplay(x.GoPointer(), InfoVar.GoPointer(), FilesVar)
600-656+ return cret
601 }657 }
602 658
603 var xAppLaunchContextGetEnvironment func(uintptr) []string659 var xAppLaunchContextGetEnvironment func(uintptr) []string
@@ -608,8 +664,8 @@ var xAppLaunchContextGetEnvironment func(uintptr) []string
608 // the form `KEY=VALUE`.664 // the form `KEY=VALUE`.
609 func (x *AppLaunchContext) GetEnvironment() []string {665 func (x *AppLaunchContext) GetEnvironment() []string {
610 666
611- return xAppLaunchContextGetEnvironment(x.GoPointer())667+ cret := xAppLaunchContextGetEnvironment(x.GoPointer())
612-668+ return cret
613 }669 }
614 670
615 var xAppLaunchContextGetStartupNotifyId func(uintptr, uintptr, *glib.List) string671 var xAppLaunchContextGetStartupNotifyId func(uintptr, uintptr, *glib.List) string
@@ -621,8 +677,8 @@ var xAppLaunchContextGetStartupNotifyId func(uintptr, uintptr, *glib.List) strin
621 // [FreeDesktop.Org Startup Notifications standard](http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt).677 // [FreeDesktop.Org Startup Notifications standard](http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt).
622 func (x *AppLaunchContext) GetStartupNotifyId(InfoVar AppInfo, FilesVar *glib.List) string {678 func (x *AppLaunchContext) GetStartupNotifyId(InfoVar AppInfo, FilesVar *glib.List) string {
623 679
624- return xAppLaunchContextGetStartupNotifyId(x.GoPointer(), InfoVar.GoPointer(), FilesVar)680+ cret := xAppLaunchContextGetStartupNotifyId(x.GoPointer(), InfoVar.GoPointer(), FilesVar)
625-681+ return cret
626 }682 }
627 683
628 var xAppLaunchContextLaunchFailed func(uintptr, string)684 var xAppLaunchContextLaunchFailed func(uintptr, string)
M v4/gio/gapplication.go +69 -64
@@ -152,14 +152,16 @@ var xNewApplication func(string, ApplicationFlags) uintptr
152 // If no application ID is given then some features of #GApplication152 // If no application ID is given then some features of #GApplication
153 // (most notably application uniqueness) will be disabled.153 // (most notably application uniqueness) will be disabled.
154 func NewApplication(ApplicationIdVar string, FlagsVar ApplicationFlags) *Application {154 func NewApplication(ApplicationIdVar string, FlagsVar ApplicationFlags) *Application {
155- NewApplicationPtr := xNewApplication(ApplicationIdVar, FlagsVar)155+ var cls *Application
156- if NewApplicationPtr == 0 {156+
157- return nil157+ cret := xNewApplication(ApplicationIdVar, FlagsVar)
158- }
159 158
160- NewApplicationCls := &Application{}159+ if cret == 0 {
161- NewApplicationCls.Ptr = NewApplicationPtr160+ return cls
162- return NewApplicationCls161+ }
162+ cls = &Application{}
163+ cls.Ptr = cret
164+ return cls
163 }165 }
164 166
165 var xApplicationActivate func(uintptr)167 var xApplicationActivate func(uintptr)
@@ -311,8 +313,8 @@ var xApplicationGetApplicationId func(uintptr) string
311 // Gets the unique identifier for @application.313 // Gets the unique identifier for @application.
312 func (x *Application) GetApplicationId() string {314 func (x *Application) GetApplicationId() string {
313 315
314- return xApplicationGetApplicationId(x.GoPointer())316+ cret := xApplicationGetApplicationId(x.GoPointer())
315-317+ return cret
316 }318 }
317 319
318 var xApplicationGetDbusConnection func(uintptr) uintptr320 var xApplicationGetDbusConnection func(uintptr) uintptr
@@ -331,18 +333,17 @@ var xApplicationGetDbusConnection func(uintptr) uintptr
331 // This function must not be called before the application has been333 // This function must not be called before the application has been
332 // registered. See g_application_get_is_registered().334 // registered. See g_application_get_is_registered().
333 func (x *Application) GetDbusConnection() *DBusConnection {335 func (x *Application) GetDbusConnection() *DBusConnection {
336+ var cls *DBusConnection
334 337
335- GetDbusConnectionPtr := xApplicationGetDbusConnection(x.GoPointer())338+ cret := xApplicationGetDbusConnection(x.GoPointer())
336- if GetDbusConnectionPtr == 0 {
337- return nil
338- }
339-
340- gobject.IncreaseRef(GetDbusConnectionPtr)
341-
342- GetDbusConnectionCls := &DBusConnection{}
343- GetDbusConnectionCls.Ptr = GetDbusConnectionPtr
344- return GetDbusConnectionCls
345 339
340+ if cret == 0 {
341+ return cls
342+ }
343+ gobject.IncreaseRef(cret)
344+ cls = &DBusConnection{}
345+ cls.Ptr = cret
346+ return cls
346 }347 }
347 348
348 var xApplicationGetDbusObjectPath func(uintptr) string349 var xApplicationGetDbusObjectPath func(uintptr) string
@@ -363,8 +364,8 @@ var xApplicationGetDbusObjectPath func(uintptr) string
363 // registered. See g_application_get_is_registered().364 // registered. See g_application_get_is_registered().
364 func (x *Application) GetDbusObjectPath() string {365 func (x *Application) GetDbusObjectPath() string {
365 366
366- return xApplicationGetDbusObjectPath(x.GoPointer())367+ cret := xApplicationGetDbusObjectPath(x.GoPointer())
367-368+ return cret
368 }369 }
369 370
370 var xApplicationGetFlags func(uintptr) ApplicationFlags371 var xApplicationGetFlags func(uintptr) ApplicationFlags
@@ -374,8 +375,8 @@ var xApplicationGetFlags func(uintptr) ApplicationFlags
374 // See #GApplicationFlags.375 // See #GApplicationFlags.
375 func (x *Application) GetFlags() ApplicationFlags {376 func (x *Application) GetFlags() ApplicationFlags {
376 377
377- return xApplicationGetFlags(x.GoPointer())378+ cret := xApplicationGetFlags(x.GoPointer())
378-379+ return cret
379 }380 }
380 381
381 var xApplicationGetInactivityTimeout func(uintptr) uint382 var xApplicationGetInactivityTimeout func(uintptr) uint
@@ -386,8 +387,8 @@ var xApplicationGetInactivityTimeout func(uintptr) uint
386 // g_application_release() before the application stops running.387 // g_application_release() before the application stops running.
387 func (x *Application) GetInactivityTimeout() uint {388 func (x *Application) GetInactivityTimeout() uint {
388 389
389- return xApplicationGetInactivityTimeout(x.GoPointer())390+ cret := xApplicationGetInactivityTimeout(x.GoPointer())
390-391+ return cret
391 }392 }
392 393
393 var xApplicationGetIsBusy func(uintptr) bool394 var xApplicationGetIsBusy func(uintptr) bool
@@ -396,8 +397,8 @@ var xApplicationGetIsBusy func(uintptr) bool
396 // g_application_mark_busy() or g_application_bind_busy_property().397 // g_application_mark_busy() or g_application_bind_busy_property().
397 func (x *Application) GetIsBusy() bool {398 func (x *Application) GetIsBusy() bool {
398 399
399- return xApplicationGetIsBusy(x.GoPointer())400+ cret := xApplicationGetIsBusy(x.GoPointer())
400-401+ return cret
401 }402 }
402 403
403 var xApplicationGetIsRegistered func(uintptr) bool404 var xApplicationGetIsRegistered func(uintptr) bool
@@ -408,8 +409,8 @@ var xApplicationGetIsRegistered func(uintptr) bool
408 // successfully called.409 // successfully called.
409 func (x *Application) GetIsRegistered() bool {410 func (x *Application) GetIsRegistered() bool {
410 411
411- return xApplicationGetIsRegistered(x.GoPointer())412+ cret := xApplicationGetIsRegistered(x.GoPointer())
412-413+ return cret
413 }414 }
414 415
415 var xApplicationGetIsRemote func(uintptr) bool416 var xApplicationGetIsRemote func(uintptr) bool
@@ -426,8 +427,8 @@ var xApplicationGetIsRemote func(uintptr) bool
426 // g_application_get_is_registered().427 // g_application_get_is_registered().
427 func (x *Application) GetIsRemote() bool {428 func (x *Application) GetIsRemote() bool {
428 429
429- return xApplicationGetIsRemote(x.GoPointer())430+ cret := xApplicationGetIsRemote(x.GoPointer())
430-431+ return cret
431 }432 }
432 433
433 var xApplicationGetResourceBasePath func(uintptr) string434 var xApplicationGetResourceBasePath func(uintptr) string
@@ -437,8 +438,8 @@ var xApplicationGetResourceBasePath func(uintptr) string
437 // See g_application_set_resource_base_path() for more information.438 // See g_application_set_resource_base_path() for more information.
438 func (x *Application) GetResourceBasePath() string {439 func (x *Application) GetResourceBasePath() string {
439 440
440- return xApplicationGetResourceBasePath(x.GoPointer())441+ cret := xApplicationGetResourceBasePath(x.GoPointer())
441-442+ return cret
442 }443 }
443 444
444 var xApplicationHold func(uintptr)445 var xApplicationHold func(uintptr)
@@ -519,7 +520,7 @@ func (x *Application) Quit() {
519 520
520 }521 }
521 522
522-var xApplicationRegister func(uintptr, uintptr) bool523+var xApplicationRegister func(uintptr, uintptr, **glib.Error) bool
523 524
524 // Attempts registration of the application.525 // Attempts registration of the application.
525 //526 //
@@ -551,9 +552,14 @@ var xApplicationRegister func(uintptr, uintptr) bool
551 // Note: the return value of this function is not an indicator that this552 // Note: the return value of this function is not an indicator that this
552 // instance is or is not the primary instance of the application. See553 // instance is or is not the primary instance of the application. See
553 // g_application_get_is_remote() for that.554 // g_application_get_is_remote() for that.
554-func (x *Application) Register(CancellableVar *Cancellable) bool {555+func (x *Application) Register(CancellableVar *Cancellable) (bool, error) {
556+ var cerr *glib.Error
555 557
556- return xApplicationRegister(x.GoPointer(), CancellableVar.GoPointer())558+ cret := xApplicationRegister(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
559+ if cerr == nil {
560+ return cret, nil
561+ }
562+ return cret, cerr
557 563
558 }564 }
559 565
@@ -650,8 +656,8 @@ var xApplicationRun func(uintptr, int, []string) int
650 // what their exit status will be.656 // what their exit status will be.
651 func (x *Application) Run(ArgcVar int, ArgvVar []string) int {657 func (x *Application) Run(ArgcVar int, ArgvVar []string) int {
652 658
653- return xApplicationRun(x.GoPointer(), ArgcVar, ArgvVar)659+ cret := xApplicationRun(x.GoPointer(), ArgcVar, ArgvVar)
654-660+ return cret
655 }661 }
656 662
657 var xApplicationSendNotification func(uintptr, string, uintptr)663 var xApplicationSendNotification func(uintptr, string, uintptr)
@@ -1121,8 +1127,8 @@ func (x *Application) ChangeActionState(ActionNameVar string, ValueVar *glib.Var
1121 // have its state changed from outside callers.1127 // have its state changed from outside callers.
1122 func (x *Application) GetActionEnabled(ActionNameVar string) bool {1128 func (x *Application) GetActionEnabled(ActionNameVar string) bool {
1123 1129
1124- return XGActionGroupGetActionEnabled(x.GoPointer(), ActionNameVar)1130+ cret := XGActionGroupGetActionEnabled(x.GoPointer(), ActionNameVar)
1125-1131+ return cret
1126 }1132 }
1127 1133
1128 // Queries the type of the parameter that must be given when activating1134 // Queries the type of the parameter that must be given when activating
@@ -1140,8 +1146,8 @@ func (x *Application) GetActionEnabled(ActionNameVar string) bool {
1140 // with the same name but a different parameter type.1146 // with the same name but a different parameter type.
1141 func (x *Application) GetActionParameterType(ActionNameVar string) *glib.VariantType {1147 func (x *Application) GetActionParameterType(ActionNameVar string) *glib.VariantType {
1142 1148
1143- return XGActionGroupGetActionParameterType(x.GoPointer(), ActionNameVar)1149+ cret := XGActionGroupGetActionParameterType(x.GoPointer(), ActionNameVar)
1144-1150+ return cret
1145 }1151 }
1146 1152
1147 // Queries the current state of the named action within @action_group.1153 // Queries the current state of the named action within @action_group.
@@ -1154,8 +1160,8 @@ func (x *Application) GetActionParameterType(ActionNameVar string) *glib.Variant
1154 // g_variant_unref() when it is no longer required.1160 // g_variant_unref() when it is no longer required.
1155 func (x *Application) GetActionState(ActionNameVar string) *glib.Variant {1161 func (x *Application) GetActionState(ActionNameVar string) *glib.Variant {
1156 1162
1157- return XGActionGroupGetActionState(x.GoPointer(), ActionNameVar)1163+ cret := XGActionGroupGetActionState(x.GoPointer(), ActionNameVar)
1158-1164+ return cret
1159 }1165 }
1160 1166
1161 // Requests a hint about the valid range of values for the state of the1167 // Requests a hint about the valid range of values for the state of the
@@ -1178,8 +1184,8 @@ func (x *Application) GetActionState(ActionNameVar string) *glib.Variant {
1178 // g_variant_unref() when it is no longer required.1184 // g_variant_unref() when it is no longer required.
1179 func (x *Application) GetActionStateHint(ActionNameVar string) *glib.Variant {1185 func (x *Application) GetActionStateHint(ActionNameVar string) *glib.Variant {
1180 1186
1181- return XGActionGroupGetActionStateHint(x.GoPointer(), ActionNameVar)1187+ cret := XGActionGroupGetActionStateHint(x.GoPointer(), ActionNameVar)
1182-1188+ return cret
1183 }1189 }
1184 1190
1185 // Queries the type of the state of the named action within1191 // Queries the type of the state of the named action within
@@ -1200,15 +1206,15 @@ func (x *Application) GetActionStateHint(ActionNameVar string) *glib.Variant {
1200 // with the same name but a different state type.1206 // with the same name but a different state type.
1201 func (x *Application) GetActionStateType(ActionNameVar string) *glib.VariantType {1207 func (x *Application) GetActionStateType(ActionNameVar string) *glib.VariantType {
1202 1208
1203- return XGActionGroupGetActionStateType(x.GoPointer(), ActionNameVar)1209+ cret := XGActionGroupGetActionStateType(x.GoPointer(), ActionNameVar)
1204-1210+ return cret
1205 }1211 }
1206 1212
1207 // Checks if the named action exists within @action_group.1213 // Checks if the named action exists within @action_group.
1208 func (x *Application) HasAction(ActionNameVar string) bool {1214 func (x *Application) HasAction(ActionNameVar string) bool {
1209 1215
1210- return XGActionGroupHasAction(x.GoPointer(), ActionNameVar)1216+ cret := XGActionGroupHasAction(x.GoPointer(), ActionNameVar)
1211-1217+ return cret
1212 }1218 }
1213 1219
1214 // Lists the actions contained within @action_group.1220 // Lists the actions contained within @action_group.
@@ -1217,8 +1223,8 @@ func (x *Application) HasAction(ActionNameVar string) bool {
1217 // it is no longer required.1223 // it is no longer required.
1218 func (x *Application) ListActions() uintptr {1224 func (x *Application) ListActions() uintptr {
1219 1225
1220- return XGActionGroupListActions(x.GoPointer())1226+ cret := XGActionGroupListActions(x.GoPointer())
1221-1227+ return cret
1222 }1228 }
1223 1229
1224 // Queries all aspects of the named action within an @action_group.1230 // Queries all aspects of the named action within an @action_group.
@@ -1250,8 +1256,8 @@ func (x *Application) ListActions() uintptr {
1250 // fields may or may not have been modified.1256 // fields may or may not have been modified.
1251 func (x *Application) QueryAction(ActionNameVar string, EnabledVar bool, ParameterTypeVar **glib.VariantType, StateTypeVar **glib.VariantType, StateHintVar **glib.Variant, StateVar **glib.Variant) bool {1257 func (x *Application) QueryAction(ActionNameVar string, EnabledVar bool, ParameterTypeVar **glib.VariantType, StateTypeVar **glib.VariantType, StateHintVar **glib.Variant, StateVar **glib.Variant) bool {
1252 1258
1253- return XGActionGroupQueryAction(x.GoPointer(), ActionNameVar, EnabledVar, ParameterTypeVar, StateTypeVar, StateHintVar, StateVar)1259+ cret := XGActionGroupQueryAction(x.GoPointer(), ActionNameVar, EnabledVar, ParameterTypeVar, StateTypeVar, StateHintVar, StateVar)
1254-1260+ return cret
1255 }1261 }
1256 1262
1257 // Adds an action to the @action_map.1263 // Adds an action to the @action_map.
@@ -1319,18 +1325,17 @@ func (x *Application) AddActionEntries(EntriesVar uintptr, NEntriesVar int, User
1319 //1325 //
1320 // If no such action exists, returns %NULL.1326 // If no such action exists, returns %NULL.
1321 func (x *Application) LookupAction(ActionNameVar string) *ActionBase {1327 func (x *Application) LookupAction(ActionNameVar string) *ActionBase {
1328+ var cls *ActionBase
1322 1329
1323- LookupActionPtr := XGActionMapLookupAction(x.GoPointer(), ActionNameVar)1330+ cret := XGActionMapLookupAction(x.GoPointer(), ActionNameVar)
1324- if LookupActionPtr == 0 {
1325- return nil
1326- }
1327-
1328- gobject.IncreaseRef(LookupActionPtr)
1329-
1330- LookupActionCls := &ActionBase{}
1331- LookupActionCls.Ptr = LookupActionPtr
1332- return LookupActionCls
1333 1331
1332+ if cret == 0 {
1333+ return cls
1334+ }
1335+ gobject.IncreaseRef(cret)
1336+ cls = &ActionBase{}
1337+ cls.Ptr = cret
1338+ return cls
1334 }1339 }
1335 1340
1336 // Removes the named action from the action map.1341 // Removes the named action from the action map.
M v4/gio/gapplicationcommandline.go +32 -32
@@ -209,16 +209,16 @@ var xApplicationCommandLineCreateFileForArg func(uintptr, string) uintptr
209 // resolves relative pathnames using the current working directory of209 // resolves relative pathnames using the current working directory of
210 // the invoking process rather than the local process.210 // the invoking process rather than the local process.
211 func (x *ApplicationCommandLine) CreateFileForArg(ArgVar string) *FileBase {211 func (x *ApplicationCommandLine) CreateFileForArg(ArgVar string) *FileBase {
212+ var cls *FileBase
212 213
213- CreateFileForArgPtr := xApplicationCommandLineCreateFileForArg(x.GoPointer(), ArgVar)214+ cret := xApplicationCommandLineCreateFileForArg(x.GoPointer(), ArgVar)
214- if CreateFileForArgPtr == 0 {
215- return nil
216- }
217-
218- CreateFileForArgCls := &FileBase{}
219- CreateFileForArgCls.Ptr = CreateFileForArgPtr
220- return CreateFileForArgCls
221 215
216+ if cret == 0 {
217+ return cls
218+ }
219+ cls = &FileBase{}
220+ cls.Ptr = cret
221+ return cls
222 }222 }
223 223
224 var xApplicationCommandLineGetArguments func(uintptr, int) uintptr224 var xApplicationCommandLineGetArguments func(uintptr, int) uintptr
@@ -236,8 +236,8 @@ var xApplicationCommandLineGetArguments func(uintptr, int) uintptr
236 // g_strfreev().236 // g_strfreev().
237 func (x *ApplicationCommandLine) GetArguments(ArgcVar int) uintptr {237 func (x *ApplicationCommandLine) GetArguments(ArgcVar int) uintptr {
238 238
239- return xApplicationCommandLineGetArguments(x.GoPointer(), ArgcVar)239+ cret := xApplicationCommandLineGetArguments(x.GoPointer(), ArgcVar)
240-240+ return cret
241 }241 }
242 242
243 var xApplicationCommandLineGetCwd func(uintptr) string243 var xApplicationCommandLineGetCwd func(uintptr) string
@@ -252,8 +252,8 @@ var xApplicationCommandLineGetCwd func(uintptr) string
252 // long as @cmdline exists.252 // long as @cmdline exists.
253 func (x *ApplicationCommandLine) GetCwd() string {253 func (x *ApplicationCommandLine) GetCwd() string {
254 254
255- return xApplicationCommandLineGetCwd(x.GoPointer())255+ cret := xApplicationCommandLineGetCwd(x.GoPointer())
256-256+ return cret
257 }257 }
258 258
259 var xApplicationCommandLineGetEnviron func(uintptr) uintptr259 var xApplicationCommandLineGetEnviron func(uintptr) uintptr
@@ -275,8 +275,8 @@ var xApplicationCommandLineGetEnviron func(uintptr) uintptr
275 // in the value of a single environment variable.275 // in the value of a single environment variable.
276 func (x *ApplicationCommandLine) GetEnviron() uintptr {276 func (x *ApplicationCommandLine) GetEnviron() uintptr {
277 277
278- return xApplicationCommandLineGetEnviron(x.GoPointer())278+ cret := xApplicationCommandLineGetEnviron(x.GoPointer())
279-279+ return cret
280 }280 }
281 281
282 var xApplicationCommandLineGetExitStatus func(uintptr) int282 var xApplicationCommandLineGetExitStatus func(uintptr) int
@@ -285,8 +285,8 @@ var xApplicationCommandLineGetExitStatus func(uintptr) int
285 // g_application_command_line_set_exit_status() for more information.285 // g_application_command_line_set_exit_status() for more information.
286 func (x *ApplicationCommandLine) GetExitStatus() int {286 func (x *ApplicationCommandLine) GetExitStatus() int {
287 287
288- return xApplicationCommandLineGetExitStatus(x.GoPointer())288+ cret := xApplicationCommandLineGetExitStatus(x.GoPointer())
289-289+ return cret
290 }290 }
291 291
292 var xApplicationCommandLineGetIsRemote func(uintptr) bool292 var xApplicationCommandLineGetIsRemote func(uintptr) bool
@@ -294,8 +294,8 @@ var xApplicationCommandLineGetIsRemote func(uintptr) bool
294 // Determines if @cmdline represents a remote invocation.294 // Determines if @cmdline represents a remote invocation.
295 func (x *ApplicationCommandLine) GetIsRemote() bool {295 func (x *ApplicationCommandLine) GetIsRemote() bool {
296 296
297- return xApplicationCommandLineGetIsRemote(x.GoPointer())297+ cret := xApplicationCommandLineGetIsRemote(x.GoPointer())
298-298+ return cret
299 }299 }
300 300
301 var xApplicationCommandLineGetOptionsDict func(uintptr) *glib.VariantDict301 var xApplicationCommandLineGetOptionsDict func(uintptr) *glib.VariantDict
@@ -311,8 +311,8 @@ var xApplicationCommandLineGetOptionsDict func(uintptr) *glib.VariantDict
311 // you don't need to check for %NULL.311 // you don't need to check for %NULL.
312 func (x *ApplicationCommandLine) GetOptionsDict() *glib.VariantDict {312 func (x *ApplicationCommandLine) GetOptionsDict() *glib.VariantDict {
313 313
314- return xApplicationCommandLineGetOptionsDict(x.GoPointer())314+ cret := xApplicationCommandLineGetOptionsDict(x.GoPointer())
315-315+ return cret
316 }316 }
317 317
318 var xApplicationCommandLineGetPlatformData func(uintptr) *glib.Variant318 var xApplicationCommandLineGetPlatformData func(uintptr) *glib.Variant
@@ -327,8 +327,8 @@ var xApplicationCommandLineGetPlatformData func(uintptr) *glib.Variant
327 // For local invocation, it will be %NULL.327 // For local invocation, it will be %NULL.
328 func (x *ApplicationCommandLine) GetPlatformData() *glib.Variant {328 func (x *ApplicationCommandLine) GetPlatformData() *glib.Variant {
329 329
330- return xApplicationCommandLineGetPlatformData(x.GoPointer())330+ cret := xApplicationCommandLineGetPlatformData(x.GoPointer())
331-331+ return cret
332 }332 }
333 333
334 var xApplicationCommandLineGetStdin func(uintptr) uintptr334 var xApplicationCommandLineGetStdin func(uintptr) uintptr
@@ -344,16 +344,16 @@ var xApplicationCommandLineGetStdin func(uintptr) uintptr
344 //344 //
345 // You must only call this function once per commandline invocation.345 // You must only call this function once per commandline invocation.
346 func (x *ApplicationCommandLine) GetStdin() *InputStream {346 func (x *ApplicationCommandLine) GetStdin() *InputStream {
347+ var cls *InputStream
347 348
348- GetStdinPtr := xApplicationCommandLineGetStdin(x.GoPointer())349+ cret := xApplicationCommandLineGetStdin(x.GoPointer())
349- if GetStdinPtr == 0 {
350- return nil
351- }
352-
353- GetStdinCls := &InputStream{}
354- GetStdinCls.Ptr = GetStdinPtr
355- return GetStdinCls
356 350
351+ if cret == 0 {
352+ return cls
353+ }
354+ cls = &InputStream{}
355+ cls.Ptr = cret
356+ return cls
357 }357 }
358 358
359 var xApplicationCommandLineGetenv func(uintptr, string) string359 var xApplicationCommandLineGetenv func(uintptr, string) string
@@ -371,8 +371,8 @@ var xApplicationCommandLineGetenv func(uintptr, string) string
371 // long as @cmdline exists.371 // long as @cmdline exists.
372 func (x *ApplicationCommandLine) Getenv(NameVar string) string {372 func (x *ApplicationCommandLine) Getenv(NameVar string) string {
373 373
374- return xApplicationCommandLineGetenv(x.GoPointer(), NameVar)374+ cret := xApplicationCommandLineGetenv(x.GoPointer(), NameVar)
375-375+ return cret
376 }376 }
377 377
378 var xApplicationCommandLinePrint func(uintptr, string, ...interface{})378 var xApplicationCommandLinePrint func(uintptr, string, ...interface{})
M v4/gio/gasyncinitable.go +23 -12
@@ -4,6 +4,7 @@ package gio
4 import (4 import (
5 "github.com/jwijenbergh/purego"5 "github.com/jwijenbergh/purego"
6 "github.com/jwijenbergh/puregotk/internal/core"6 "github.com/jwijenbergh/puregotk/internal/core"
7+ "github.com/jwijenbergh/puregotk/v4/glib"
7 "github.com/jwijenbergh/puregotk/v4/gobject"8 "github.com/jwijenbergh/puregotk/v4/gobject"
8 )9 )
9 10
@@ -184,30 +185,40 @@ func (x *AsyncInitableBase) InitAsync(IoPriorityVar int, CancellableVar *Cancell
184 185
185 // Finishes asynchronous initialization and returns the result.186 // Finishes asynchronous initialization and returns the result.
186 // See g_async_initable_init_async().187 // See g_async_initable_init_async().
187-func (x *AsyncInitableBase) InitFinish(ResVar AsyncResult) bool {188+func (x *AsyncInitableBase) InitFinish(ResVar AsyncResult) (bool, error) {
189+ var cerr *glib.Error
188 190
189- return XGAsyncInitableInitFinish(x.GoPointer(), ResVar.GoPointer())191+ cret := XGAsyncInitableInitFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
192+ if cerr == nil {
193+ return cret, nil
194+ }
195+ return cret, cerr
190 196
191 }197 }
192 198
193 // Finishes the async construction for the various g_async_initable_new199 // Finishes the async construction for the various g_async_initable_new
194 // calls, returning the created object or %NULL on error.200 // calls, returning the created object or %NULL on error.
195-func (x *AsyncInitableBase) NewFinish(ResVar AsyncResult) *gobject.Object {201+func (x *AsyncInitableBase) NewFinish(ResVar AsyncResult) (*gobject.Object, error) {
202+ var cls *gobject.Object
203+ var cerr *glib.Error
196 204
197- NewFinishPtr := XGAsyncInitableNewFinish(x.GoPointer(), ResVar.GoPointer())205+ cret := XGAsyncInitableNewFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
198- if NewFinishPtr == 0 {
199- return nil
200- }
201 206
202- NewFinishCls := &gobject.Object{}207+ if cret == 0 {
203- NewFinishCls.Ptr = NewFinishPtr208+ return cls, cerr
204- return NewFinishCls209+ }
210+ cls = &gobject.Object{}
211+ cls.Ptr = cret
212+ if cerr == nil {
213+ return cls, nil
214+ }
215+ return cls, cerr
205 216
206 }217 }
207 218
208 var XGAsyncInitableInitAsync func(uintptr, int, uintptr, uintptr, uintptr)219 var XGAsyncInitableInitAsync func(uintptr, int, uintptr, uintptr, uintptr)
209-var XGAsyncInitableInitFinish func(uintptr, uintptr) bool220+var XGAsyncInitableInitFinish func(uintptr, uintptr, **glib.Error) bool
210-var XGAsyncInitableNewFinish func(uintptr, uintptr) uintptr221+var XGAsyncInitableNewFinish func(uintptr, uintptr, **glib.Error) uintptr
211 222
212 var xAsyncInitableNewvAsync func([]interface{}, uint, *gobject.Parameter, int, uintptr, uintptr, uintptr)223 var xAsyncInitableNewvAsync func([]interface{}, uint, *gobject.Parameter, int, uintptr, uintptr, uintptr)
213 224
M v4/gio/gasyncresult.go +20 -14
@@ -4,6 +4,7 @@ package gio
4 import (4 import (
5 "github.com/jwijenbergh/purego"5 "github.com/jwijenbergh/purego"
6 "github.com/jwijenbergh/puregotk/internal/core"6 "github.com/jwijenbergh/puregotk/internal/core"
7+ "github.com/jwijenbergh/puregotk/v4/glib"
7 "github.com/jwijenbergh/puregotk/v4/gobject"8 "github.com/jwijenbergh/puregotk/v4/gobject"
8 )9 )
9 10
@@ -124,31 +125,31 @@ func (x *AsyncResultBase) SetGoPointer(ptr uintptr) {
124 125
125 // Gets the source object from a #GAsyncResult.126 // Gets the source object from a #GAsyncResult.
126 func (x *AsyncResultBase) GetSourceObject() *gobject.Object {127 func (x *AsyncResultBase) GetSourceObject() *gobject.Object {
128+ var cls *gobject.Object
127 129
128- GetSourceObjectPtr := XGAsyncResultGetSourceObject(x.GoPointer())130+ cret := XGAsyncResultGetSourceObject(x.GoPointer())
129- if GetSourceObjectPtr == 0 {
130- return nil
131- }
132-
133- GetSourceObjectCls := &gobject.Object{}
134- GetSourceObjectCls.Ptr = GetSourceObjectPtr
135- return GetSourceObjectCls
136 131
132+ if cret == 0 {
133+ return cls
134+ }
135+ cls = &gobject.Object{}
136+ cls.Ptr = cret
137+ return cls
137 }138 }
138 139
139 // Gets the user data from a #GAsyncResult.140 // Gets the user data from a #GAsyncResult.
140 func (x *AsyncResultBase) GetUserData() uintptr {141 func (x *AsyncResultBase) GetUserData() uintptr {
141 142
142- return XGAsyncResultGetUserData(x.GoPointer())143+ cret := XGAsyncResultGetUserData(x.GoPointer())
143-144+ return cret
144 }145 }
145 146
146 // Checks if @res has the given @source_tag (generally a function147 // Checks if @res has the given @source_tag (generally a function
147 // pointer indicating the function @res was created by).148 // pointer indicating the function @res was created by).
148 func (x *AsyncResultBase) IsTagged(SourceTagVar uintptr) bool {149 func (x *AsyncResultBase) IsTagged(SourceTagVar uintptr) bool {
149 150
150- return XGAsyncResultIsTagged(x.GoPointer(), SourceTagVar)151+ cret := XGAsyncResultIsTagged(x.GoPointer(), SourceTagVar)
151-152+ return cret
152 }153 }
153 154
154 // If @res is a #GSimpleAsyncResult, this is equivalent to155 // If @res is a #GSimpleAsyncResult, this is equivalent to
@@ -161,9 +162,14 @@ func (x *AsyncResultBase) IsTagged(SourceTagVar uintptr) bool {
161 // This should not be used in new code; #GAsyncResult errors that are162 // This should not be used in new code; #GAsyncResult errors that are
162 // set by virtual methods should also be extracted by virtual methods,163 // set by virtual methods should also be extracted by virtual methods,
163 // to enable subclasses to chain up correctly.164 // to enable subclasses to chain up correctly.
164-func (x *AsyncResultBase) LegacyPropagateError() bool {165+func (x *AsyncResultBase) LegacyPropagateError() (bool, error) {
166+ var cerr *glib.Error
165 167
166- return XGAsyncResultLegacyPropagateError(x.GoPointer())168+ cret := XGAsyncResultLegacyPropagateError(x.GoPointer())
169+ if cerr == nil {
170+ return cret, nil
171+ }
172+ return cret, cerr
167 173
168 }174 }
169 175
M v4/gio/gbufferedinputstream.go +70 -41
@@ -43,14 +43,16 @@ var xNewBufferedInputStream func(uintptr) uintptr
43 // Creates a new #GInputStream from the given @base_stream, with43 // Creates a new #GInputStream from the given @base_stream, with
44 // a buffer set to the default size (4 kilobytes).44 // a buffer set to the default size (4 kilobytes).
45 func NewBufferedInputStream(BaseStreamVar *InputStream) *InputStream {45 func NewBufferedInputStream(BaseStreamVar *InputStream) *InputStream {
46- NewBufferedInputStreamPtr := xNewBufferedInputStream(BaseStreamVar.GoPointer())46+ var cls *InputStream
47- if NewBufferedInputStreamPtr == 0 {47+
48- return nil48+ cret := xNewBufferedInputStream(BaseStreamVar.GoPointer())
49- }
50 49
51- NewBufferedInputStreamCls := &InputStream{}50+ if cret == 0 {
52- NewBufferedInputStreamCls.Ptr = NewBufferedInputStreamPtr51+ return cls
53- return NewBufferedInputStreamCls52+ }
53+ cls = &InputStream{}
54+ cls.Ptr = cret
55+ return cls
54 }56 }
55 57
56 var xNewSizedBufferedInputStream func(uintptr, uint) uintptr58 var xNewSizedBufferedInputStream func(uintptr, uint) uintptr
@@ -58,17 +60,19 @@ var xNewSizedBufferedInputStream func(uintptr, uint) uintptr
58 // Creates a new #GBufferedInputStream from the given @base_stream,60 // Creates a new #GBufferedInputStream from the given @base_stream,
59 // with a buffer set to @size.61 // with a buffer set to @size.
60 func NewSizedBufferedInputStream(BaseStreamVar *InputStream, SizeVar uint) *InputStream {62 func NewSizedBufferedInputStream(BaseStreamVar *InputStream, SizeVar uint) *InputStream {
61- NewSizedBufferedInputStreamPtr := xNewSizedBufferedInputStream(BaseStreamVar.GoPointer(), SizeVar)63+ var cls *InputStream
62- if NewSizedBufferedInputStreamPtr == 0 {
63- return nil
64- }
65 64
66- NewSizedBufferedInputStreamCls := &InputStream{}65+ cret := xNewSizedBufferedInputStream(BaseStreamVar.GoPointer(), SizeVar)
67- NewSizedBufferedInputStreamCls.Ptr = NewSizedBufferedInputStreamPtr66+
68- return NewSizedBufferedInputStreamCls67+ if cret == 0 {
68+ return cls
69+ }
70+ cls = &InputStream{}
71+ cls.Ptr = cret
72+ return cls
69 }73 }
70 74
71-var xBufferedInputStreamFill func(uintptr, int, uintptr) int75+var xBufferedInputStreamFill func(uintptr, int, uintptr, **glib.Error) int
72 76
73 // Tries to read @count bytes from the stream into the buffer.77 // Tries to read @count bytes from the stream into the buffer.
74 // Will block during this read.78 // Will block during this read.
@@ -94,9 +98,14 @@ var xBufferedInputStreamFill func(uintptr, int, uintptr) int
94 //98 //
95 // For the asynchronous, non-blocking, version of this function, see99 // For the asynchronous, non-blocking, version of this function, see
96 // g_buffered_input_stream_fill_async().100 // g_buffered_input_stream_fill_async().
97-func (x *BufferedInputStream) Fill(CountVar int, CancellableVar *Cancellable) int {101+func (x *BufferedInputStream) Fill(CountVar int, CancellableVar *Cancellable) (int, error) {
102+ var cerr *glib.Error
98 103
99- return xBufferedInputStreamFill(x.GoPointer(), CountVar, CancellableVar.GoPointer())104+ cret := xBufferedInputStreamFill(x.GoPointer(), CountVar, CancellableVar.GoPointer(), &cerr)
105+ if cerr == nil {
106+ return cret, nil
107+ }
108+ return cret, cerr
100 109
101 }110 }
102 111
@@ -114,12 +123,17 @@ func (x *BufferedInputStream) FillAsync(CountVar int, IoPriorityVar int, Cancell
114 123
115 }124 }
116 125
117-var xBufferedInputStreamFillFinish func(uintptr, uintptr) int126+var xBufferedInputStreamFillFinish func(uintptr, uintptr, **glib.Error) int
118 127
119 // Finishes an asynchronous read.128 // Finishes an asynchronous read.
120-func (x *BufferedInputStream) FillFinish(ResultVar AsyncResult) int {129+func (x *BufferedInputStream) FillFinish(ResultVar AsyncResult) (int, error) {
130+ var cerr *glib.Error
121 131
122- return xBufferedInputStreamFillFinish(x.GoPointer(), ResultVar.GoPointer())132+ cret := xBufferedInputStreamFillFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
133+ if cerr == nil {
134+ return cret, nil
135+ }
136+ return cret, cerr
123 137
124 }138 }
125 139
@@ -128,8 +142,8 @@ var xBufferedInputStreamGetAvailable func(uintptr) uint
128 // Gets the size of the available data within the stream.142 // Gets the size of the available data within the stream.
129 func (x *BufferedInputStream) GetAvailable() uint {143 func (x *BufferedInputStream) GetAvailable() uint {
130 144
131- return xBufferedInputStreamGetAvailable(x.GoPointer())145+ cret := xBufferedInputStreamGetAvailable(x.GoPointer())
132-146+ return cret
133 }147 }
134 148
135 var xBufferedInputStreamGetBufferSize func(uintptr) uint149 var xBufferedInputStreamGetBufferSize func(uintptr) uint
@@ -137,8 +151,8 @@ var xBufferedInputStreamGetBufferSize func(uintptr) uint
137 // Gets the size of the input buffer.151 // Gets the size of the input buffer.
138 func (x *BufferedInputStream) GetBufferSize() uint {152 func (x *BufferedInputStream) GetBufferSize() uint {
139 153
140- return xBufferedInputStreamGetBufferSize(x.GoPointer())154+ cret := xBufferedInputStreamGetBufferSize(x.GoPointer())
141-155+ return cret
142 }156 }
143 157
144 var xBufferedInputStreamPeek func(uintptr, uintptr, uint, uint) uint158 var xBufferedInputStreamPeek func(uintptr, uintptr, uint, uint) uint
@@ -147,8 +161,8 @@ var xBufferedInputStreamPeek func(uintptr, uintptr, uint, uint) uint
147 // offset @offset bytes.161 // offset @offset bytes.
148 func (x *BufferedInputStream) Peek(BufferVar uintptr, OffsetVar uint, CountVar uint) uint {162 func (x *BufferedInputStream) Peek(BufferVar uintptr, OffsetVar uint, CountVar uint) uint {
149 163
150- return xBufferedInputStreamPeek(x.GoPointer(), BufferVar, OffsetVar, CountVar)164+ cret := xBufferedInputStreamPeek(x.GoPointer(), BufferVar, OffsetVar, CountVar)
151-165+ return cret
152 }166 }
153 167
154 var xBufferedInputStreamPeekBuffer func(uintptr, uint) uintptr168 var xBufferedInputStreamPeekBuffer func(uintptr, uint) uintptr
@@ -158,11 +172,11 @@ var xBufferedInputStreamPeekBuffer func(uintptr, uint) uintptr
158 // the stream or filling the buffer.172 // the stream or filling the buffer.
159 func (x *BufferedInputStream) PeekBuffer(CountVar uint) uintptr {173 func (x *BufferedInputStream) PeekBuffer(CountVar uint) uintptr {
160 174
161- return xBufferedInputStreamPeekBuffer(x.GoPointer(), CountVar)175+ cret := xBufferedInputStreamPeekBuffer(x.GoPointer(), CountVar)
162-176+ return cret
163 }177 }
164 178
165-var xBufferedInputStreamReadByte func(uintptr, uintptr) int179+var xBufferedInputStreamReadByte func(uintptr, uintptr, **glib.Error) int
166 180
167 // Tries to read a single byte from the stream or the buffer. Will block181 // Tries to read a single byte from the stream or the buffer. Will block
168 // during this read.182 // during this read.
@@ -177,9 +191,14 @@ var xBufferedInputStreamReadByte func(uintptr, uintptr) int
177 // partial result will be returned, without an error.191 // partial result will be returned, without an error.
178 //192 //
179 // On error -1 is returned and @error is set accordingly.193 // On error -1 is returned and @error is set accordingly.
180-func (x *BufferedInputStream) ReadByte(CancellableVar *Cancellable) int {194+func (x *BufferedInputStream) ReadByte(CancellableVar *Cancellable) (int, error) {
195+ var cerr *glib.Error
181 196
182- return xBufferedInputStreamReadByte(x.GoPointer(), CancellableVar.GoPointer())197+ cret := xBufferedInputStreamReadByte(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
198+ if cerr == nil {
199+ return cret, nil
200+ }
201+ return cret, cerr
183 202
184 }203 }
185 204
@@ -205,16 +224,16 @@ func (c *BufferedInputStream) SetGoPointer(ptr uintptr) {
205 // Tests if the stream supports the #GSeekableIface.224 // Tests if the stream supports the #GSeekableIface.
206 func (x *BufferedInputStream) CanSeek() bool {225 func (x *BufferedInputStream) CanSeek() bool {
207 226
208- return XGSeekableCanSeek(x.GoPointer())227+ cret := XGSeekableCanSeek(x.GoPointer())
209-228+ return cret
210 }229 }
211 230
212 // Tests if the length of the stream can be adjusted with231 // Tests if the length of the stream can be adjusted with
213 // g_seekable_truncate().232 // g_seekable_truncate().
214 func (x *BufferedInputStream) CanTruncate() bool {233 func (x *BufferedInputStream) CanTruncate() bool {
215 234
216- return XGSeekableCanTruncate(x.GoPointer())235+ cret := XGSeekableCanTruncate(x.GoPointer())
217-236+ return cret
218 }237 }
219 238
220 // Seeks in the stream by the given @offset, modified by @type.239 // Seeks in the stream by the given @offset, modified by @type.
@@ -231,17 +250,22 @@ func (x *BufferedInputStream) CanTruncate() bool {
231 // If @cancellable is not %NULL, then the operation can be cancelled by250 // If @cancellable is not %NULL, then the operation can be cancelled by
232 // triggering the cancellable object from another thread. If the operation251 // triggering the cancellable object from another thread. If the operation
233 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.252 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
234-func (x *BufferedInputStream) Seek(OffsetVar int64, TypeVar glib.SeekType, CancellableVar *Cancellable) bool {253+func (x *BufferedInputStream) Seek(OffsetVar int64, TypeVar glib.SeekType, CancellableVar *Cancellable) (bool, error) {
254+ var cerr *glib.Error
235 255
236- return XGSeekableSeek(x.GoPointer(), OffsetVar, TypeVar, CancellableVar.GoPointer())256+ cret := XGSeekableSeek(x.GoPointer(), OffsetVar, TypeVar, CancellableVar.GoPointer(), &cerr)
257+ if cerr == nil {
258+ return cret, nil
259+ }
260+ return cret, cerr
237 261
238 }262 }
239 263
240 // Tells the current position within the stream.264 // Tells the current position within the stream.
241 func (x *BufferedInputStream) Tell() int64 {265 func (x *BufferedInputStream) Tell() int64 {
242 266
243- return XGSeekableTell(x.GoPointer())267+ cret := XGSeekableTell(x.GoPointer())
244-268+ return cret
245 }269 }
246 270
247 // Sets the length of the stream to @offset. If the stream was previously271 // Sets the length of the stream to @offset. If the stream was previously
@@ -253,9 +277,14 @@ func (x *BufferedInputStream) Tell() int64 {
253 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an277 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
254 // operation was partially finished when the operation was cancelled the278 // operation was partially finished when the operation was cancelled the
255 // partial result will be returned, without an error.279 // partial result will be returned, without an error.
256-func (x *BufferedInputStream) Truncate(OffsetVar int64, CancellableVar *Cancellable) bool {280+func (x *BufferedInputStream) Truncate(OffsetVar int64, CancellableVar *Cancellable) (bool, error) {
281+ var cerr *glib.Error
257 282
258- return XGSeekableTruncate(x.GoPointer(), OffsetVar, CancellableVar.GoPointer())283+ cret := XGSeekableTruncate(x.GoPointer(), OffsetVar, CancellableVar.GoPointer(), &cerr)
284+ if cerr == nil {
285+ return cret, nil
286+ }
287+ return cret, cerr
259 288
260 }289 }
261 290
M v4/gio/gbufferedoutputstream.go +42 -28
@@ -42,28 +42,32 @@ var xNewBufferedOutputStream func(uintptr) uintptr
42 42
43 // Creates a new buffered output stream for a base stream.43 // Creates a new buffered output stream for a base stream.
44 func NewBufferedOutputStream(BaseStreamVar *OutputStream) *OutputStream {44 func NewBufferedOutputStream(BaseStreamVar *OutputStream) *OutputStream {
45- NewBufferedOutputStreamPtr := xNewBufferedOutputStream(BaseStreamVar.GoPointer())45+ var cls *OutputStream
46- if NewBufferedOutputStreamPtr == 0 {46+
47- return nil47+ cret := xNewBufferedOutputStream(BaseStreamVar.GoPointer())
48- }
49 48
50- NewBufferedOutputStreamCls := &OutputStream{}49+ if cret == 0 {
51- NewBufferedOutputStreamCls.Ptr = NewBufferedOutputStreamPtr50+ return cls
52- return NewBufferedOutputStreamCls51+ }
52+ cls = &OutputStream{}
53+ cls.Ptr = cret
54+ return cls
53 }55 }
54 56
55 var xNewSizedBufferedOutputStream func(uintptr, uint) uintptr57 var xNewSizedBufferedOutputStream func(uintptr, uint) uintptr
56 58
57 // Creates a new buffered output stream with a given buffer size.59 // Creates a new buffered output stream with a given buffer size.
58 func NewSizedBufferedOutputStream(BaseStreamVar *OutputStream, SizeVar uint) *OutputStream {60 func NewSizedBufferedOutputStream(BaseStreamVar *OutputStream, SizeVar uint) *OutputStream {
59- NewSizedBufferedOutputStreamPtr := xNewSizedBufferedOutputStream(BaseStreamVar.GoPointer(), SizeVar)61+ var cls *OutputStream
60- if NewSizedBufferedOutputStreamPtr == 0 {62+
61- return nil63+ cret := xNewSizedBufferedOutputStream(BaseStreamVar.GoPointer(), SizeVar)
62- }
63 64
64- NewSizedBufferedOutputStreamCls := &OutputStream{}65+ if cret == 0 {
65- NewSizedBufferedOutputStreamCls.Ptr = NewSizedBufferedOutputStreamPtr66+ return cls
66- return NewSizedBufferedOutputStreamCls67+ }
68+ cls = &OutputStream{}
69+ cls.Ptr = cret
70+ return cls
67 }71 }
68 72
69 var xBufferedOutputStreamGetAutoGrow func(uintptr) bool73 var xBufferedOutputStreamGetAutoGrow func(uintptr) bool
@@ -71,8 +75,8 @@ var xBufferedOutputStreamGetAutoGrow func(uintptr) bool
71 // Checks if the buffer automatically grows as data is added.75 // Checks if the buffer automatically grows as data is added.
72 func (x *BufferedOutputStream) GetAutoGrow() bool {76 func (x *BufferedOutputStream) GetAutoGrow() bool {
73 77
74- return xBufferedOutputStreamGetAutoGrow(x.GoPointer())78+ cret := xBufferedOutputStreamGetAutoGrow(x.GoPointer())
75-79+ return cret
76 }80 }
77 81
78 var xBufferedOutputStreamGetBufferSize func(uintptr) uint82 var xBufferedOutputStreamGetBufferSize func(uintptr) uint
@@ -80,8 +84,8 @@ var xBufferedOutputStreamGetBufferSize func(uintptr) uint
80 // Gets the size of the buffer in the @stream.84 // Gets the size of the buffer in the @stream.
81 func (x *BufferedOutputStream) GetBufferSize() uint {85 func (x *BufferedOutputStream) GetBufferSize() uint {
82 86
83- return xBufferedOutputStreamGetBufferSize(x.GoPointer())87+ cret := xBufferedOutputStreamGetBufferSize(x.GoPointer())
84-88+ return cret
85 }89 }
86 90
87 var xBufferedOutputStreamSetAutoGrow func(uintptr, bool)91 var xBufferedOutputStreamSetAutoGrow func(uintptr, bool)
@@ -116,16 +120,16 @@ func (c *BufferedOutputStream) SetGoPointer(ptr uintptr) {
116 // Tests if the stream supports the #GSeekableIface.120 // Tests if the stream supports the #GSeekableIface.
117 func (x *BufferedOutputStream) CanSeek() bool {121 func (x *BufferedOutputStream) CanSeek() bool {
118 122
119- return XGSeekableCanSeek(x.GoPointer())123+ cret := XGSeekableCanSeek(x.GoPointer())
120-124+ return cret
121 }125 }
122 126
123 // Tests if the length of the stream can be adjusted with127 // Tests if the length of the stream can be adjusted with
124 // g_seekable_truncate().128 // g_seekable_truncate().
125 func (x *BufferedOutputStream) CanTruncate() bool {129 func (x *BufferedOutputStream) CanTruncate() bool {
126 130
127- return XGSeekableCanTruncate(x.GoPointer())131+ cret := XGSeekableCanTruncate(x.GoPointer())
128-132+ return cret
129 }133 }
130 134
131 // Seeks in the stream by the given @offset, modified by @type.135 // Seeks in the stream by the given @offset, modified by @type.
@@ -142,17 +146,22 @@ func (x *BufferedOutputStream) CanTruncate() bool {
142 // If @cancellable is not %NULL, then the operation can be cancelled by146 // If @cancellable is not %NULL, then the operation can be cancelled by
143 // triggering the cancellable object from another thread. If the operation147 // triggering the cancellable object from another thread. If the operation
144 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.148 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
145-func (x *BufferedOutputStream) Seek(OffsetVar int64, TypeVar glib.SeekType, CancellableVar *Cancellable) bool {149+func (x *BufferedOutputStream) Seek(OffsetVar int64, TypeVar glib.SeekType, CancellableVar *Cancellable) (bool, error) {
150+ var cerr *glib.Error
146 151
147- return XGSeekableSeek(x.GoPointer(), OffsetVar, TypeVar, CancellableVar.GoPointer())152+ cret := XGSeekableSeek(x.GoPointer(), OffsetVar, TypeVar, CancellableVar.GoPointer(), &cerr)
153+ if cerr == nil {
154+ return cret, nil
155+ }
156+ return cret, cerr
148 157
149 }158 }
150 159
151 // Tells the current position within the stream.160 // Tells the current position within the stream.
152 func (x *BufferedOutputStream) Tell() int64 {161 func (x *BufferedOutputStream) Tell() int64 {
153 162
154- return XGSeekableTell(x.GoPointer())163+ cret := XGSeekableTell(x.GoPointer())
155-164+ return cret
156 }165 }
157 166
158 // Sets the length of the stream to @offset. If the stream was previously167 // Sets the length of the stream to @offset. If the stream was previously
@@ -164,9 +173,14 @@ func (x *BufferedOutputStream) Tell() int64 {
164 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an173 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
165 // operation was partially finished when the operation was cancelled the174 // operation was partially finished when the operation was cancelled the
166 // partial result will be returned, without an error.175 // partial result will be returned, without an error.
167-func (x *BufferedOutputStream) Truncate(OffsetVar int64, CancellableVar *Cancellable) bool {176+func (x *BufferedOutputStream) Truncate(OffsetVar int64, CancellableVar *Cancellable) (bool, error) {
177+ var cerr *glib.Error
168 178
169- return XGSeekableTruncate(x.GoPointer(), OffsetVar, CancellableVar.GoPointer())179+ cret := XGSeekableTruncate(x.GoPointer(), OffsetVar, CancellableVar.GoPointer(), &cerr)
180+ if cerr == nil {
181+ return cret, nil
182+ }
183+ return cret, cerr
170 184
171 }185 }
172 186
M v4/gio/gcancellable.go +26 -19
@@ -39,14 +39,16 @@ var xNewCancellable func() uintptr
39 // One #GCancellable can be used in multiple consecutive39 // One #GCancellable can be used in multiple consecutive
40 // operations or in multiple concurrent operations.40 // operations or in multiple concurrent operations.
41 func NewCancellable() *Cancellable {41 func NewCancellable() *Cancellable {
42- NewCancellablePtr := xNewCancellable()42+ var cls *Cancellable
43- if NewCancellablePtr == 0 {43+
44- return nil44+ cret := xNewCancellable()
45- }
46 45
47- NewCancellableCls := &Cancellable{}46+ if cret == 0 {
48- NewCancellableCls.Ptr = NewCancellablePtr47+ return cls
49- return NewCancellableCls48+ }
49+ cls = &Cancellable{}
50+ cls.Ptr = cret
51+ return cls
50 }52 }
51 53
52 var xCancellableCancel func(uintptr)54 var xCancellableCancel func(uintptr)
@@ -95,8 +97,8 @@ var xCancellableConnect func(uintptr, uintptr, uintptr, uintptr) uint32
95 // code that unconditionally invokes e.g. g_cancellable_cancel().97 // code that unconditionally invokes e.g. g_cancellable_cancel().
96 func (x *Cancellable) Connect(CallbackVar gobject.Callback, DataVar uintptr, DataDestroyFuncVar glib.DestroyNotify) uint32 {98 func (x *Cancellable) Connect(CallbackVar gobject.Callback, DataVar uintptr, DataDestroyFuncVar glib.DestroyNotify) uint32 {
97 99
98- return xCancellableConnect(x.GoPointer(), purego.NewCallback(CallbackVar), DataVar, purego.NewCallback(DataDestroyFuncVar))100+ cret := xCancellableConnect(x.GoPointer(), purego.NewCallback(CallbackVar), DataVar, purego.NewCallback(DataDestroyFuncVar))
99-101+ return cret
100 }102 }
101 103
102 var xCancellableDisconnect func(uintptr, uint32)104 var xCancellableDisconnect func(uintptr, uint32)
@@ -138,8 +140,8 @@ var xCancellableGetFd func(uintptr) int
138 // See also g_cancellable_make_pollfd().140 // See also g_cancellable_make_pollfd().
139 func (x *Cancellable) GetFd() int {141 func (x *Cancellable) GetFd() int {
140 142
141- return xCancellableGetFd(x.GoPointer())143+ cret := xCancellableGetFd(x.GoPointer())
142-144+ return cret
143 }145 }
144 146
145 var xCancellableIsCancelled func(uintptr) bool147 var xCancellableIsCancelled func(uintptr) bool
@@ -147,8 +149,8 @@ var xCancellableIsCancelled func(uintptr) bool
147 // Checks if a cancellable job has been cancelled.149 // Checks if a cancellable job has been cancelled.
148 func (x *Cancellable) IsCancelled() bool {150 func (x *Cancellable) IsCancelled() bool {
149 151
150- return xCancellableIsCancelled(x.GoPointer())152+ cret := xCancellableIsCancelled(x.GoPointer())
151-153+ return cret
152 }154 }
153 155
154 var xCancellableMakePollfd func(uintptr, *glib.PollFD) bool156 var xCancellableMakePollfd func(uintptr, *glib.PollFD) bool
@@ -173,8 +175,8 @@ var xCancellableMakePollfd func(uintptr, *glib.PollFD) bool
173 // with g_cancellable_reset().175 // with g_cancellable_reset().
174 func (x *Cancellable) MakePollfd(PollfdVar *glib.PollFD) bool {176 func (x *Cancellable) MakePollfd(PollfdVar *glib.PollFD) bool {
175 177
176- return xCancellableMakePollfd(x.GoPointer(), PollfdVar)178+ cret := xCancellableMakePollfd(x.GoPointer(), PollfdVar)
177-179+ return cret
178 }180 }
179 181
180 var xCancellablePopCurrent func(uintptr)182 var xCancellablePopCurrent func(uintptr)
@@ -243,9 +245,14 @@ var xCancellableSetErrorIfCancelled func(uintptr) bool
243 245
244 // If the @cancellable is cancelled, sets the error to notify246 // If the @cancellable is cancelled, sets the error to notify
245 // that the operation was cancelled.247 // that the operation was cancelled.
246-func (x *Cancellable) SetErrorIfCancelled() bool {248+func (x *Cancellable) SetErrorIfCancelled() (bool, error) {
249+ var cerr *glib.Error
247 250
248- return xCancellableSetErrorIfCancelled(x.GoPointer())251+ cret := xCancellableSetErrorIfCancelled(x.GoPointer())
252+ if cerr == nil {
253+ return cret, nil
254+ }
255+ return cret, cerr
249 256
250 }257 }
251 258
@@ -262,8 +269,8 @@ var xCancellableSourceNew func(uintptr) *glib.Source
262 // The new #GSource will hold a reference to the #GCancellable.269 // The new #GSource will hold a reference to the #GCancellable.
263 func (x *Cancellable) SourceNew() *glib.Source {270 func (x *Cancellable) SourceNew() *glib.Source {
264 271
265- return xCancellableSourceNew(x.GoPointer())272+ cret := xCancellableSourceNew(x.GoPointer())
266-273+ return cret
267 }274 }
268 275
269 func (c *Cancellable) GoPointer() uintptr {276 func (c *Cancellable) GoPointer() uintptr {
M v4/gio/gcharsetconverter.go +34 -16
@@ -4,6 +4,7 @@ package gio
4 import (4 import (
5 "github.com/jwijenbergh/purego"5 "github.com/jwijenbergh/purego"
6 "github.com/jwijenbergh/puregotk/internal/core"6 "github.com/jwijenbergh/puregotk/internal/core"
7+ "github.com/jwijenbergh/puregotk/v4/glib"
7 "github.com/jwijenbergh/puregotk/v4/gobject"8 "github.com/jwijenbergh/puregotk/v4/gobject"
8 )9 )
9 10
@@ -23,18 +24,25 @@ func CharsetConverterNewFromInternalPtr(ptr uintptr) *CharsetConverter {
23 return cls24 return cls
24 }25 }
25 26
26-var xNewCharsetConverter func(string, string) uintptr27+var xNewCharsetConverter func(string, string, **glib.Error) uintptr
27 28
28 // Creates a new #GCharsetConverter.29 // Creates a new #GCharsetConverter.
29-func NewCharsetConverter(ToCharsetVar string, FromCharsetVar string) *CharsetConverter {30+func NewCharsetConverter(ToCharsetVar string, FromCharsetVar string) (*CharsetConverter, error) {
30- NewCharsetConverterPtr := xNewCharsetConverter(ToCharsetVar, FromCharsetVar)31+ var cls *CharsetConverter
31- if NewCharsetConverterPtr == 0 {32+ var cerr *glib.Error
32- return nil33+
34+ cret := xNewCharsetConverter(ToCharsetVar, FromCharsetVar, &cerr)
35+
36+ if cret == 0 {
37+ return cls, cerr
33 }38 }
39+ cls = &CharsetConverter{}
40+ cls.Ptr = cret
41+ if cerr == nil {
42+ return cls, nil
43+ }
44+ return cls, cerr
34 45
35- NewCharsetConverterCls := &CharsetConverter{}
36- NewCharsetConverterCls.Ptr = NewCharsetConverterPtr
37- return NewCharsetConverterCls
38 }46 }
39 47
40 var xCharsetConverterGetNumFallbacks func(uintptr) uint48 var xCharsetConverterGetNumFallbacks func(uintptr) uint
@@ -42,8 +50,8 @@ var xCharsetConverterGetNumFallbacks func(uintptr) uint
42 // Gets the number of fallbacks that @converter has applied so far.50 // Gets the number of fallbacks that @converter has applied so far.
43 func (x *CharsetConverter) GetNumFallbacks() uint {51 func (x *CharsetConverter) GetNumFallbacks() uint {
44 52
45- return xCharsetConverterGetNumFallbacks(x.GoPointer())53+ cret := xCharsetConverterGetNumFallbacks(x.GoPointer())
46-54+ return cret
47 }55 }
48 56
49 var xCharsetConverterGetUseFallback func(uintptr) bool57 var xCharsetConverterGetUseFallback func(uintptr) bool
@@ -51,8 +59,8 @@ var xCharsetConverterGetUseFallback func(uintptr) bool
51 // Gets the #GCharsetConverter:use-fallback property.59 // Gets the #GCharsetConverter:use-fallback property.
52 func (x *CharsetConverter) GetUseFallback() bool {60 func (x *CharsetConverter) GetUseFallback() bool {
53 61
54- return xCharsetConverterGetUseFallback(x.GoPointer())62+ cret := xCharsetConverterGetUseFallback(x.GoPointer())
55-63+ return cret
56 }64 }
57 65
58 var xCharsetConverterSetUseFallback func(uintptr, bool)66 var xCharsetConverterSetUseFallback func(uintptr, bool)
@@ -154,9 +162,14 @@ func (c *CharsetConverter) SetGoPointer(ptr uintptr) {
154 // at a partial multibyte sequence). Converters are supposed to try162 // at a partial multibyte sequence). Converters are supposed to try
155 // to produce as much output as possible and then return an error163 // to produce as much output as possible and then return an error
156 // (typically %G_IO_ERROR_PARTIAL_INPUT).164 // (typically %G_IO_ERROR_PARTIAL_INPUT).
157-func (x *CharsetConverter) Convert(InbufVar uintptr, InbufSizeVar uint, OutbufVar uintptr, OutbufSizeVar uint, FlagsVar ConverterFlags, BytesReadVar uint, BytesWrittenVar uint) ConverterResult {165+func (x *CharsetConverter) Convert(InbufVar uintptr, InbufSizeVar uint, OutbufVar uintptr, OutbufSizeVar uint, FlagsVar ConverterFlags, BytesReadVar uint, BytesWrittenVar uint) (ConverterResult, error) {
166+ var cerr *glib.Error
158 167
159- return XGConverterConvert(x.GoPointer(), InbufVar, InbufSizeVar, OutbufVar, OutbufSizeVar, FlagsVar, BytesReadVar, BytesWrittenVar)168+ cret := XGConverterConvert(x.GoPointer(), InbufVar, InbufSizeVar, OutbufVar, OutbufSizeVar, FlagsVar, BytesReadVar, BytesWrittenVar, &cerr)
169+ if cerr == nil {
170+ return cret, nil
171+ }
172+ return cret, cerr
160 173
161 }174 }
162 175
@@ -207,9 +220,14 @@ func (x *CharsetConverter) Reset() {
207 // In this pattern, a caller would expect to be able to call g_initable_init()220 // In this pattern, a caller would expect to be able to call g_initable_init()
208 // on the result of g_object_new(), regardless of whether it is in fact a new221 // on the result of g_object_new(), regardless of whether it is in fact a new
209 // instance.222 // instance.
210-func (x *CharsetConverter) Init(CancellableVar *Cancellable) bool {223+func (x *CharsetConverter) Init(CancellableVar *Cancellable) (bool, error) {
224+ var cerr *glib.Error
211 225
212- return XGInitableInit(x.GoPointer(), CancellableVar.GoPointer())226+ cret := XGInitableInit(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
227+ if cerr == nil {
228+ return cret, nil
229+ }
230+ return cret, cerr
213 231
214 }232 }
215 233
M v4/gio/gcontenttype.go +42 -42
@@ -13,8 +13,8 @@ var xContentTypeCanBeExecutable func(string) bool
13 // things like text files can be executables (i.e. scripts and batch files).13 // things like text files can be executables (i.e. scripts and batch files).
14 func ContentTypeCanBeExecutable(TypeVar string) bool {14 func ContentTypeCanBeExecutable(TypeVar string) bool {
15 15
16- return xContentTypeCanBeExecutable(TypeVar)16+ cret := xContentTypeCanBeExecutable(TypeVar)
17-17+ return cret
18 }18 }
19 19
20 var xContentTypeEquals func(string, string) bool20 var xContentTypeEquals func(string, string) bool
@@ -22,8 +22,8 @@ var xContentTypeEquals func(string, string) bool
22 // Compares two content types for equality.22 // Compares two content types for equality.
23 func ContentTypeEquals(Type1Var string, Type2Var string) bool {23 func ContentTypeEquals(Type1Var string, Type2Var string) bool {
24 24
25- return xContentTypeEquals(Type1Var, Type2Var)25+ cret := xContentTypeEquals(Type1Var, Type2Var)
26-26+ return cret
27 }27 }
28 28
29 var xContentTypeFromMimeType func(string) string29 var xContentTypeFromMimeType func(string) string
@@ -31,8 +31,8 @@ var xContentTypeFromMimeType func(string) string
31 // Tries to find a content type based on the mime type name.31 // Tries to find a content type based on the mime type name.
32 func ContentTypeFromMimeType(MimeTypeVar string) string {32 func ContentTypeFromMimeType(MimeTypeVar string) string {
33 33
34- return xContentTypeFromMimeType(MimeTypeVar)34+ cret := xContentTypeFromMimeType(MimeTypeVar)
35-35+ return cret
36 }36 }
37 37
38 var xContentTypeGetDescription func(string) string38 var xContentTypeGetDescription func(string) string
@@ -40,8 +40,8 @@ var xContentTypeGetDescription func(string) string
40 // Gets the human readable description of the content type.40 // Gets the human readable description of the content type.
41 func ContentTypeGetDescription(TypeVar string) string {41 func ContentTypeGetDescription(TypeVar string) string {
42 42
43- return xContentTypeGetDescription(TypeVar)43+ cret := xContentTypeGetDescription(TypeVar)
44-44+ return cret
45 }45 }
46 46
47 var xContentTypeGetGenericIconName func(string) string47 var xContentTypeGetGenericIconName func(string) string
@@ -53,24 +53,24 @@ var xContentTypeGetGenericIconName func(string) string
53 // specification for more on the generic icon name.53 // specification for more on the generic icon name.
54 func ContentTypeGetGenericIconName(TypeVar string) string {54 func ContentTypeGetGenericIconName(TypeVar string) string {
55 55
56- return xContentTypeGetGenericIconName(TypeVar)56+ cret := xContentTypeGetGenericIconName(TypeVar)
57-57+ return cret
58 }58 }
59 59
60 var xContentTypeGetIcon func(string) uintptr60 var xContentTypeGetIcon func(string) uintptr
61 61
62 // Gets the icon for a content type.62 // Gets the icon for a content type.
63 func ContentTypeGetIcon(TypeVar string) *IconBase {63 func ContentTypeGetIcon(TypeVar string) *IconBase {
64+ var cls *IconBase
64 65
65- ContentTypeGetIconPtr := xContentTypeGetIcon(TypeVar)66+ cret := xContentTypeGetIcon(TypeVar)
66- if ContentTypeGetIconPtr == 0 {
67- return nil
68- }
69-
70- ContentTypeGetIconCls := &IconBase{}
71- ContentTypeGetIconCls.Ptr = ContentTypeGetIconPtr
72- return ContentTypeGetIconCls
73 67
68+ if cret == 0 {
69+ return cls
70+ }
71+ cls = &IconBase{}
72+ cls.Ptr = cret
73+ return cls
74 }74 }
75 75
76 var xContentTypeGetMimeDirs func() uintptr76 var xContentTypeGetMimeDirs func() uintptr
@@ -79,8 +79,8 @@ var xContentTypeGetMimeDirs func() uintptr
79 // g_content_type_set_mime_dirs() for details.79 // g_content_type_set_mime_dirs() for details.
80 func ContentTypeGetMimeDirs() uintptr {80 func ContentTypeGetMimeDirs() uintptr {
81 81
82- return xContentTypeGetMimeDirs()82+ cret := xContentTypeGetMimeDirs()
83-83+ return cret
84 }84 }
85 85
86 var xContentTypeGetMimeType func(string) string86 var xContentTypeGetMimeType func(string) string
@@ -88,24 +88,24 @@ var xContentTypeGetMimeType func(string) string
88 // Gets the mime type for the content type, if one is registered.88 // Gets the mime type for the content type, if one is registered.
89 func ContentTypeGetMimeType(TypeVar string) string {89 func ContentTypeGetMimeType(TypeVar string) string {
90 90
91- return xContentTypeGetMimeType(TypeVar)91+ cret := xContentTypeGetMimeType(TypeVar)
92-92+ return cret
93 }93 }
94 94
95 var xContentTypeGetSymbolicIcon func(string) uintptr95 var xContentTypeGetSymbolicIcon func(string) uintptr
96 96
97 // Gets the symbolic icon for a content type.97 // Gets the symbolic icon for a content type.
98 func ContentTypeGetSymbolicIcon(TypeVar string) *IconBase {98 func ContentTypeGetSymbolicIcon(TypeVar string) *IconBase {
99+ var cls *IconBase
99 100
100- ContentTypeGetSymbolicIconPtr := xContentTypeGetSymbolicIcon(TypeVar)101+ cret := xContentTypeGetSymbolicIcon(TypeVar)
101- if ContentTypeGetSymbolicIconPtr == 0 {
102- return nil
103- }
104-
105- ContentTypeGetSymbolicIconCls := &IconBase{}
106- ContentTypeGetSymbolicIconCls.Ptr = ContentTypeGetSymbolicIconPtr
107- return ContentTypeGetSymbolicIconCls
108 102
103+ if cret == 0 {
104+ return cls
105+ }
106+ cls = &IconBase{}
107+ cls.Ptr = cret
108+ return cls
109 }109 }
110 110
111 var xContentTypeGuess func(string, uintptr, uint, bool) string111 var xContentTypeGuess func(string, uintptr, uint, bool) string
@@ -116,8 +116,8 @@ var xContentTypeGuess func(string, uintptr, uint, bool) string
116 // on the other argument.116 // on the other argument.
117 func ContentTypeGuess(FilenameVar string, DataVar uintptr, DataSizeVar uint, ResultUncertainVar bool) string {117 func ContentTypeGuess(FilenameVar string, DataVar uintptr, DataSizeVar uint, ResultUncertainVar bool) string {
118 118
119- return xContentTypeGuess(FilenameVar, DataVar, DataSizeVar, ResultUncertainVar)119+ cret := xContentTypeGuess(FilenameVar, DataVar, DataSizeVar, ResultUncertainVar)
120-120+ return cret
121 }121 }
122 122
123 var xContentTypeGuessForTree func(uintptr) uintptr123 var xContentTypeGuessForTree func(uintptr) uintptr
@@ -136,8 +136,8 @@ var xContentTypeGuessForTree func(uintptr) uintptr
136 // g_mount_guess_content_type().136 // g_mount_guess_content_type().
137 func ContentTypeGuessForTree(RootVar File) uintptr {137 func ContentTypeGuessForTree(RootVar File) uintptr {
138 138
139- return xContentTypeGuessForTree(RootVar.GoPointer())139+ cret := xContentTypeGuessForTree(RootVar.GoPointer())
140-140+ return cret
141 }141 }
142 142
143 var xContentTypeIsA func(string, string) bool143 var xContentTypeIsA func(string, string) bool
@@ -145,8 +145,8 @@ var xContentTypeIsA func(string, string) bool
145 // Determines if @type is a subset of @supertype.145 // Determines if @type is a subset of @supertype.
146 func ContentTypeIsA(TypeVar string, SupertypeVar string) bool {146 func ContentTypeIsA(TypeVar string, SupertypeVar string) bool {
147 147
148- return xContentTypeIsA(TypeVar, SupertypeVar)148+ cret := xContentTypeIsA(TypeVar, SupertypeVar)
149-149+ return cret
150 }150 }
151 151
152 var xContentTypeIsMimeType func(string, string) bool152 var xContentTypeIsMimeType func(string, string) bool
@@ -155,8 +155,8 @@ var xContentTypeIsMimeType func(string, string) bool
155 // Convenience wrapper around g_content_type_is_a().155 // Convenience wrapper around g_content_type_is_a().
156 func ContentTypeIsMimeType(TypeVar string, MimeTypeVar string) bool {156 func ContentTypeIsMimeType(TypeVar string, MimeTypeVar string) bool {
157 157
158- return xContentTypeIsMimeType(TypeVar, MimeTypeVar)158+ cret := xContentTypeIsMimeType(TypeVar, MimeTypeVar)
159-159+ return cret
160 }160 }
161 161
162 var xContentTypeIsUnknown func(string) bool162 var xContentTypeIsUnknown func(string) bool
@@ -167,8 +167,8 @@ var xContentTypeIsUnknown func(string) bool
167 // or octet-stream.167 // or octet-stream.
168 func ContentTypeIsUnknown(TypeVar string) bool {168 func ContentTypeIsUnknown(TypeVar string) bool {
169 169
170- return xContentTypeIsUnknown(TypeVar)170+ cret := xContentTypeIsUnknown(TypeVar)
171-171+ return cret
172 }172 }
173 173
174 var xContentTypeSetMimeDirs func(uintptr)174 var xContentTypeSetMimeDirs func(uintptr)
@@ -211,8 +211,8 @@ var xContentTypesGetRegistered func() *glib.List
211 // `g_list_free_full (list, g_free)`.211 // `g_list_free_full (list, g_free)`.
212 func ContentTypesGetRegistered() *glib.List {212 func ContentTypesGetRegistered() *glib.List {
213 213
214- return xContentTypesGetRegistered()214+ cret := xContentTypesGetRegistered()
215-215+ return cret
216 }216 }
217 217
218 func init() {218 func init() {
M v4/gio/gconverter.go +9 -3
@@ -4,6 +4,7 @@ package gio
4 import (4 import (
5 "github.com/jwijenbergh/purego"5 "github.com/jwijenbergh/purego"
6 "github.com/jwijenbergh/puregotk/internal/core"6 "github.com/jwijenbergh/puregotk/internal/core"
7+ "github.com/jwijenbergh/puregotk/v4/glib"
7 )8 )
8 9
9 // Provides an interface for converting data from one type10 // Provides an interface for converting data from one type
@@ -120,9 +121,14 @@ func (x *ConverterBase) SetGoPointer(ptr uintptr) {
120 // at a partial multibyte sequence). Converters are supposed to try121 // at a partial multibyte sequence). Converters are supposed to try
121 // to produce as much output as possible and then return an error122 // to produce as much output as possible and then return an error
122 // (typically %G_IO_ERROR_PARTIAL_INPUT).123 // (typically %G_IO_ERROR_PARTIAL_INPUT).
123-func (x *ConverterBase) Convert(InbufVar uintptr, InbufSizeVar uint, OutbufVar uintptr, OutbufSizeVar uint, FlagsVar ConverterFlags, BytesReadVar uint, BytesWrittenVar uint) ConverterResult {124+func (x *ConverterBase) Convert(InbufVar uintptr, InbufSizeVar uint, OutbufVar uintptr, OutbufSizeVar uint, FlagsVar ConverterFlags, BytesReadVar uint, BytesWrittenVar uint) (ConverterResult, error) {
125+ var cerr *glib.Error
124 126
125- return XGConverterConvert(x.GoPointer(), InbufVar, InbufSizeVar, OutbufVar, OutbufSizeVar, FlagsVar, BytesReadVar, BytesWrittenVar)127+ cret := XGConverterConvert(x.GoPointer(), InbufVar, InbufSizeVar, OutbufVar, OutbufSizeVar, FlagsVar, BytesReadVar, BytesWrittenVar, &cerr)
128+ if cerr == nil {
129+ return cret, nil
130+ }
131+ return cret, cerr
126 132
127 }133 }
128 134
@@ -135,7 +141,7 @@ func (x *ConverterBase) Reset() {
135 141
136 }142 }
137 143
138-var XGConverterConvert func(uintptr, uintptr, uint, uintptr, uint, ConverterFlags, uint, uint) ConverterResult144+var XGConverterConvert func(uintptr, uintptr, uint, uintptr, uint, ConverterFlags, uint, uint, **glib.Error) ConverterResult
139 var XGConverterReset func(uintptr)145 var XGConverterReset func(uintptr)
140 146
141 func init() {147 func init() {
M v4/gio/gconverterinputstream.go +31 -25
@@ -34,32 +34,33 @@ var xNewConverterInputStream func(uintptr, uintptr) uintptr
34 34
35 // Creates a new converter input stream for the @base_stream.35 // Creates a new converter input stream for the @base_stream.
36 func NewConverterInputStream(BaseStreamVar *InputStream, ConverterVar Converter) *InputStream {36 func NewConverterInputStream(BaseStreamVar *InputStream, ConverterVar Converter) *InputStream {
37- NewConverterInputStreamPtr := xNewConverterInputStream(BaseStreamVar.GoPointer(), ConverterVar.GoPointer())37+ var cls *InputStream
38- if NewConverterInputStreamPtr == 0 {38+
39- return nil39+ cret := xNewConverterInputStream(BaseStreamVar.GoPointer(), ConverterVar.GoPointer())
40- }
41 40
42- NewConverterInputStreamCls := &InputStream{}41+ if cret == 0 {
43- NewConverterInputStreamCls.Ptr = NewConverterInputStreamPtr42+ return cls
44- return NewConverterInputStreamCls43+ }
44+ cls = &InputStream{}
45+ cls.Ptr = cret
46+ return cls
45 }47 }
46 48
47 var xConverterInputStreamGetConverter func(uintptr) uintptr49 var xConverterInputStreamGetConverter func(uintptr) uintptr
48 50
49 // Gets the #GConverter that is used by @converter_stream.51 // Gets the #GConverter that is used by @converter_stream.
50 func (x *ConverterInputStream) GetConverter() *ConverterBase {52 func (x *ConverterInputStream) GetConverter() *ConverterBase {
53+ var cls *ConverterBase
51 54
52- GetConverterPtr := xConverterInputStreamGetConverter(x.GoPointer())55+ cret := xConverterInputStreamGetConverter(x.GoPointer())
53- if GetConverterPtr == 0 {
54- return nil
55- }
56-
57- gobject.IncreaseRef(GetConverterPtr)
58-
59- GetConverterCls := &ConverterBase{}
60- GetConverterCls.Ptr = GetConverterPtr
61- return GetConverterCls
62 56
57+ if cret == 0 {
58+ return cls
59+ }
60+ gobject.IncreaseRef(cret)
61+ cls = &ConverterBase{}
62+ cls.Ptr = cret
63+ return cls
63 }64 }
64 65
65 func (c *ConverterInputStream) GoPointer() uintptr {66 func (c *ConverterInputStream) GoPointer() uintptr {
@@ -79,8 +80,8 @@ func (c *ConverterInputStream) SetGoPointer(ptr uintptr) {
79 // a stream cannot switch from pollable to non-pollable or vice versa.80 // a stream cannot switch from pollable to non-pollable or vice versa.
80 func (x *ConverterInputStream) CanPoll() bool {81 func (x *ConverterInputStream) CanPoll() bool {
81 82
82- return XGPollableInputStreamCanPoll(x.GoPointer())83+ cret := XGPollableInputStreamCanPoll(x.GoPointer())
83-84+ return cret
84 }85 }
85 86
86 // Creates a #GSource that triggers when @stream can be read, or87 // Creates a #GSource that triggers when @stream can be read, or
@@ -93,8 +94,8 @@ func (x *ConverterInputStream) CanPoll() bool {
93 // rather than g_input_stream_read() from the callback.94 // rather than g_input_stream_read() from the callback.
94 func (x *ConverterInputStream) CreateSource(CancellableVar *Cancellable) *glib.Source {95 func (x *ConverterInputStream) CreateSource(CancellableVar *Cancellable) *glib.Source {
95 96
96- return XGPollableInputStreamCreateSource(x.GoPointer(), CancellableVar.GoPointer())97+ cret := XGPollableInputStreamCreateSource(x.GoPointer(), CancellableVar.GoPointer())
97-98+ return cret
98 }99 }
99 100
100 // Checks if @stream can be read.101 // Checks if @stream can be read.
@@ -107,8 +108,8 @@ func (x *ConverterInputStream) CreateSource(CancellableVar *Cancellable) *glib.S
107 // %G_IO_ERROR_WOULD_BLOCK error rather than blocking.108 // %G_IO_ERROR_WOULD_BLOCK error rather than blocking.
108 func (x *ConverterInputStream) IsReadable() bool {109 func (x *ConverterInputStream) IsReadable() bool {
109 110
110- return XGPollableInputStreamIsReadable(x.GoPointer())111+ cret := XGPollableInputStreamIsReadable(x.GoPointer())
111-112+ return cret
112 }113 }
113 114
114 // Attempts to read up to @count bytes from @stream into @buffer, as115 // Attempts to read up to @count bytes from @stream into @buffer, as
@@ -122,9 +123,14 @@ func (x *ConverterInputStream) IsReadable() bool {
122 // if @cancellable has already been cancelled when you call, which123 // if @cancellable has already been cancelled when you call, which
123 // may happen if you call this method after a source triggers due124 // may happen if you call this method after a source triggers due
124 // to having been cancelled.125 // to having been cancelled.
125-func (x *ConverterInputStream) ReadNonblocking(BufferVar uintptr, CountVar uint, CancellableVar *Cancellable) int {126+func (x *ConverterInputStream) ReadNonblocking(BufferVar uintptr, CountVar uint, CancellableVar *Cancellable) (int, error) {
127+ var cerr *glib.Error
126 128
127- return XGPollableInputStreamReadNonblocking(x.GoPointer(), BufferVar, CountVar, CancellableVar.GoPointer())129+ cret := XGPollableInputStreamReadNonblocking(x.GoPointer(), BufferVar, CountVar, CancellableVar.GoPointer(), &cerr)
130+ if cerr == nil {
131+ return cret, nil
132+ }
133+ return cret, cerr
128 134
129 }135 }
130 136
M v4/gio/gconverteroutputstream.go +38 -27
@@ -34,32 +34,33 @@ var xNewConverterOutputStream func(uintptr, uintptr) uintptr
34 34
35 // Creates a new converter output stream for the @base_stream.35 // Creates a new converter output stream for the @base_stream.
36 func NewConverterOutputStream(BaseStreamVar *OutputStream, ConverterVar Converter) *OutputStream {36 func NewConverterOutputStream(BaseStreamVar *OutputStream, ConverterVar Converter) *OutputStream {
37- NewConverterOutputStreamPtr := xNewConverterOutputStream(BaseStreamVar.GoPointer(), ConverterVar.GoPointer())37+ var cls *OutputStream
38- if NewConverterOutputStreamPtr == 0 {38+
39- return nil39+ cret := xNewConverterOutputStream(BaseStreamVar.GoPointer(), ConverterVar.GoPointer())
40- }
41 40
42- NewConverterOutputStreamCls := &OutputStream{}41+ if cret == 0 {
43- NewConverterOutputStreamCls.Ptr = NewConverterOutputStreamPtr42+ return cls
44- return NewConverterOutputStreamCls43+ }
44+ cls = &OutputStream{}
45+ cls.Ptr = cret
46+ return cls
45 }47 }
46 48
47 var xConverterOutputStreamGetConverter func(uintptr) uintptr49 var xConverterOutputStreamGetConverter func(uintptr) uintptr
48 50
49 // Gets the #GConverter that is used by @converter_stream.51 // Gets the #GConverter that is used by @converter_stream.
50 func (x *ConverterOutputStream) GetConverter() *ConverterBase {52 func (x *ConverterOutputStream) GetConverter() *ConverterBase {
53+ var cls *ConverterBase
51 54
52- GetConverterPtr := xConverterOutputStreamGetConverter(x.GoPointer())55+ cret := xConverterOutputStreamGetConverter(x.GoPointer())
53- if GetConverterPtr == 0 {
54- return nil
55- }
56-
57- gobject.IncreaseRef(GetConverterPtr)
58-
59- GetConverterCls := &ConverterBase{}
60- GetConverterCls.Ptr = GetConverterPtr
61- return GetConverterCls
62 56
57+ if cret == 0 {
58+ return cls
59+ }
60+ gobject.IncreaseRef(cret)
61+ cls = &ConverterBase{}
62+ cls.Ptr = cret
63+ return cls
63 }64 }
64 65
65 func (c *ConverterOutputStream) GoPointer() uintptr {66 func (c *ConverterOutputStream) GoPointer() uintptr {
@@ -79,8 +80,8 @@ func (c *ConverterOutputStream) SetGoPointer(ptr uintptr) {
79 // a stream cannot switch from pollable to non-pollable or vice versa.80 // a stream cannot switch from pollable to non-pollable or vice versa.
80 func (x *ConverterOutputStream) CanPoll() bool {81 func (x *ConverterOutputStream) CanPoll() bool {
81 82
82- return XGPollableOutputStreamCanPoll(x.GoPointer())83+ cret := XGPollableOutputStreamCanPoll(x.GoPointer())
83-84+ return cret
84 }85 }
85 86
86 // Creates a #GSource that triggers when @stream can be written, or87 // Creates a #GSource that triggers when @stream can be written, or
@@ -93,8 +94,8 @@ func (x *ConverterOutputStream) CanPoll() bool {
93 // rather than g_output_stream_write() from the callback.94 // rather than g_output_stream_write() from the callback.
94 func (x *ConverterOutputStream) CreateSource(CancellableVar *Cancellable) *glib.Source {95 func (x *ConverterOutputStream) CreateSource(CancellableVar *Cancellable) *glib.Source {
95 96
96- return XGPollableOutputStreamCreateSource(x.GoPointer(), CancellableVar.GoPointer())97+ cret := XGPollableOutputStreamCreateSource(x.GoPointer(), CancellableVar.GoPointer())
97-98+ return cret
98 }99 }
99 100
100 // Checks if @stream can be written.101 // Checks if @stream can be written.
@@ -107,8 +108,8 @@ func (x *ConverterOutputStream) CreateSource(CancellableVar *Cancellable) *glib.
107 // %G_IO_ERROR_WOULD_BLOCK error rather than blocking.108 // %G_IO_ERROR_WOULD_BLOCK error rather than blocking.
108 func (x *ConverterOutputStream) IsWritable() bool {109 func (x *ConverterOutputStream) IsWritable() bool {
109 110
110- return XGPollableOutputStreamIsWritable(x.GoPointer())111+ cret := XGPollableOutputStreamIsWritable(x.GoPointer())
111-112+ return cret
112 }113 }
113 114
114 // Attempts to write up to @count bytes from @buffer to @stream, as115 // Attempts to write up to @count bytes from @buffer to @stream, as
@@ -126,9 +127,14 @@ func (x *ConverterOutputStream) IsWritable() bool {
126 // Also note that if %G_IO_ERROR_WOULD_BLOCK is returned some underlying127 // Also note that if %G_IO_ERROR_WOULD_BLOCK is returned some underlying
127 // transports like D/TLS require that you re-send the same @buffer and128 // transports like D/TLS require that you re-send the same @buffer and
128 // @count in the next write call.129 // @count in the next write call.
129-func (x *ConverterOutputStream) WriteNonblocking(BufferVar uintptr, CountVar uint, CancellableVar *Cancellable) int {130+func (x *ConverterOutputStream) WriteNonblocking(BufferVar uintptr, CountVar uint, CancellableVar *Cancellable) (int, error) {
131+ var cerr *glib.Error
130 132
131- return XGPollableOutputStreamWriteNonblocking(x.GoPointer(), BufferVar, CountVar, CancellableVar.GoPointer())133+ cret := XGPollableOutputStreamWriteNonblocking(x.GoPointer(), BufferVar, CountVar, CancellableVar.GoPointer(), &cerr)
134+ if cerr == nil {
135+ return cret, nil
136+ }
137+ return cret, cerr
132 138
133 }139 }
134 140
@@ -148,9 +154,14 @@ func (x *ConverterOutputStream) WriteNonblocking(BufferVar uintptr, CountVar uin
148 // Also note that if %G_POLLABLE_RETURN_WOULD_BLOCK is returned some underlying154 // Also note that if %G_POLLABLE_RETURN_WOULD_BLOCK is returned some underlying
149 // transports like D/TLS require that you re-send the same @vectors and155 // transports like D/TLS require that you re-send the same @vectors and
150 // @n_vectors in the next write call.156 // @n_vectors in the next write call.
151-func (x *ConverterOutputStream) WritevNonblocking(VectorsVar uintptr, NVectorsVar uint, BytesWrittenVar uint, CancellableVar *Cancellable) PollableReturn {157+func (x *ConverterOutputStream) WritevNonblocking(VectorsVar uintptr, NVectorsVar uint, BytesWrittenVar uint, CancellableVar *Cancellable) (PollableReturn, error) {
158+ var cerr *glib.Error
152 159
153- return XGPollableOutputStreamWritevNonblocking(x.GoPointer(), VectorsVar, NVectorsVar, BytesWrittenVar, CancellableVar.GoPointer())160+ cret := XGPollableOutputStreamWritevNonblocking(x.GoPointer(), VectorsVar, NVectorsVar, BytesWrittenVar, CancellableVar.GoPointer(), &cerr)
161+ if cerr == nil {
162+ return cret, nil
163+ }
164+ return cret, cerr
154 165
155 }166 }
156 167
M v4/gio/gcredentials.go +44 -21
@@ -4,6 +4,7 @@ package gio
4 import (4 import (
5 "github.com/jwijenbergh/purego"5 "github.com/jwijenbergh/purego"
6 "github.com/jwijenbergh/puregotk/internal/core"6 "github.com/jwijenbergh/puregotk/internal/core"
7+ "github.com/jwijenbergh/puregotk/v4/glib"
7 "github.com/jwijenbergh/puregotk/v4/gobject"8 "github.com/jwijenbergh/puregotk/v4/gobject"
8 )9 )
9 10
@@ -63,14 +64,16 @@ var xNewCredentials func() uintptr
63 // Creates a new #GCredentials object with credentials matching the64 // Creates a new #GCredentials object with credentials matching the
64 // the current process.65 // the current process.
65 func NewCredentials() *Credentials {66 func NewCredentials() *Credentials {
66- NewCredentialsPtr := xNewCredentials()67+ var cls *Credentials
67- if NewCredentialsPtr == 0 {68+
68- return nil69+ cret := xNewCredentials()
69- }
70 70
71- NewCredentialsCls := &Credentials{}71+ if cret == 0 {
72- NewCredentialsCls.Ptr = NewCredentialsPtr72+ return cls
73- return NewCredentialsCls73+ }
74+ cls = &Credentials{}
75+ cls.Ptr = cret
76+ return cls
74 }77 }
75 78
76 var xCredentialsGetNative func(uintptr, CredentialsType) uintptr79 var xCredentialsGetNative func(uintptr, CredentialsType) uintptr
@@ -83,8 +86,8 @@ var xCredentialsGetNative func(uintptr, CredentialsType) uintptr
83 // the OS or if @native_type isn't supported by the OS.86 // the OS or if @native_type isn't supported by the OS.
84 func (x *Credentials) GetNative(NativeTypeVar CredentialsType) uintptr {87 func (x *Credentials) GetNative(NativeTypeVar CredentialsType) uintptr {
85 88
86- return xCredentialsGetNative(x.GoPointer(), NativeTypeVar)89+ cret := xCredentialsGetNative(x.GoPointer(), NativeTypeVar)
87-90+ return cret
88 }91 }
89 92
90 var xCredentialsGetUnixPid func(uintptr) int93 var xCredentialsGetUnixPid func(uintptr) int
@@ -95,9 +98,14 @@ var xCredentialsGetUnixPid func(uintptr) int
95 // This operation can fail if #GCredentials is not supported on the98 // This operation can fail if #GCredentials is not supported on the
96 // OS or if the native credentials type does not contain information99 // OS or if the native credentials type does not contain information
97 // about the UNIX process ID.100 // about the UNIX process ID.
98-func (x *Credentials) GetUnixPid() int {101+func (x *Credentials) GetUnixPid() (int, error) {
102+ var cerr *glib.Error
99 103
100- return xCredentialsGetUnixPid(x.GoPointer())104+ cret := xCredentialsGetUnixPid(x.GoPointer())
105+ if cerr == nil {
106+ return cret, nil
107+ }
108+ return cret, cerr
101 109
102 }110 }
103 111
@@ -109,21 +117,31 @@ var xCredentialsGetUnixUser func(uintptr) uint
109 // This operation can fail if #GCredentials is not supported on the117 // This operation can fail if #GCredentials is not supported on the
110 // OS or if the native credentials type does not contain information118 // OS or if the native credentials type does not contain information
111 // about the UNIX user.119 // about the UNIX user.
112-func (x *Credentials) GetUnixUser() uint {120+func (x *Credentials) GetUnixUser() (uint, error) {
121+ var cerr *glib.Error
113 122
114- return xCredentialsGetUnixUser(x.GoPointer())123+ cret := xCredentialsGetUnixUser(x.GoPointer())
124+ if cerr == nil {
125+ return cret, nil
126+ }
127+ return cret, cerr
115 128
116 }129 }
117 130
118-var xCredentialsIsSameUser func(uintptr, uintptr) bool131+var xCredentialsIsSameUser func(uintptr, uintptr, **glib.Error) bool
119 132
120 // Checks if @credentials and @other_credentials is the same user.133 // Checks if @credentials and @other_credentials is the same user.
121 //134 //
122 // This operation can fail if #GCredentials is not supported on the135 // This operation can fail if #GCredentials is not supported on the
123 // the OS.136 // the OS.
124-func (x *Credentials) IsSameUser(OtherCredentialsVar *Credentials) bool {137+func (x *Credentials) IsSameUser(OtherCredentialsVar *Credentials) (bool, error) {
138+ var cerr *glib.Error
125 139
126- return xCredentialsIsSameUser(x.GoPointer(), OtherCredentialsVar.GoPointer())140+ cret := xCredentialsIsSameUser(x.GoPointer(), OtherCredentialsVar.GoPointer(), &cerr)
141+ if cerr == nil {
142+ return cret, nil
143+ }
144+ return cret, cerr
127 145
128 }146 }
129 147
@@ -141,7 +159,7 @@ func (x *Credentials) SetNative(NativeTypeVar CredentialsType, NativeVar uintptr
141 159
142 }160 }
143 161
144-var xCredentialsSetUnixUser func(uintptr, uint) bool162+var xCredentialsSetUnixUser func(uintptr, uint, **glib.Error) bool
145 163
146 // Tries to set the UNIX user identifier on @credentials. This method164 // Tries to set the UNIX user identifier on @credentials. This method
147 // is only available on UNIX platforms.165 // is only available on UNIX platforms.
@@ -150,9 +168,14 @@ var xCredentialsSetUnixUser func(uintptr, uint) bool
150 // OS or if the native credentials type does not contain information168 // OS or if the native credentials type does not contain information
151 // about the UNIX user. It can also fail if the OS does not allow the169 // about the UNIX user. It can also fail if the OS does not allow the
152 // use of "spoofed" credentials.170 // use of "spoofed" credentials.
153-func (x *Credentials) SetUnixUser(UidVar uint) bool {171+func (x *Credentials) SetUnixUser(UidVar uint) (bool, error) {
172+ var cerr *glib.Error
154 173
155- return xCredentialsSetUnixUser(x.GoPointer(), UidVar)174+ cret := xCredentialsSetUnixUser(x.GoPointer(), UidVar, &cerr)
175+ if cerr == nil {
176+ return cret, nil
177+ }
178+ return cret, cerr
156 179
157 }180 }
158 181
@@ -163,8 +186,8 @@ var xCredentialsToString func(uintptr) string
163 // returned string may change in future GLib release.186 // returned string may change in future GLib release.
164 func (x *Credentials) ToString() string {187 func (x *Credentials) ToString() string {
165 188
166- return xCredentialsToString(x.GoPointer())189+ cret := xCredentialsToString(x.GoPointer())
167-190+ return cret
168 }191 }
169 192
170 func (c *Credentials) GoPointer() uintptr {193 func (c *Credentials) GoPointer() uintptr {
M v4/gio/gdatagrambased.go +28 -13
@@ -122,8 +122,8 @@ func (x *DatagramBasedBase) SetGoPointer(ptr uintptr) {
122 // This call never blocks.122 // This call never blocks.
123 func (x *DatagramBasedBase) ConditionCheck(ConditionVar glib.IOCondition) glib.IOCondition {123 func (x *DatagramBasedBase) ConditionCheck(ConditionVar glib.IOCondition) glib.IOCondition {
124 124
125- return XGDatagramBasedConditionCheck(x.GoPointer(), ConditionVar)125+ cret := XGDatagramBasedConditionCheck(x.GoPointer(), ConditionVar)
126-126+ return cret
127 }127 }
128 128
129 // Waits for up to @timeout microseconds for condition to become true on129 // Waits for up to @timeout microseconds for condition to become true on
@@ -132,9 +132,14 @@ func (x *DatagramBasedBase) ConditionCheck(ConditionVar glib.IOCondition) glib.I
132 // If @cancellable is cancelled before the condition is met, or if @timeout is132 // If @cancellable is cancelled before the condition is met, or if @timeout is
133 // reached before the condition is met, then %FALSE is returned and @error is133 // reached before the condition is met, then %FALSE is returned and @error is
134 // set appropriately (%G_IO_ERROR_CANCELLED or %G_IO_ERROR_TIMED_OUT).134 // set appropriately (%G_IO_ERROR_CANCELLED or %G_IO_ERROR_TIMED_OUT).
135-func (x *DatagramBasedBase) ConditionWait(ConditionVar glib.IOCondition, TimeoutVar int64, CancellableVar *Cancellable) bool {135+func (x *DatagramBasedBase) ConditionWait(ConditionVar glib.IOCondition, TimeoutVar int64, CancellableVar *Cancellable) (bool, error) {
136+ var cerr *glib.Error
136 137
137- return XGDatagramBasedConditionWait(x.GoPointer(), ConditionVar, TimeoutVar, CancellableVar.GoPointer())138+ cret := XGDatagramBasedConditionWait(x.GoPointer(), ConditionVar, TimeoutVar, CancellableVar.GoPointer(), &cerr)
139+ if cerr == nil {
140+ return cret, nil
141+ }
142+ return cret, cerr
138 143
139 }144 }
140 145
@@ -154,8 +159,8 @@ func (x *DatagramBasedBase) ConditionWait(ConditionVar glib.IOCondition, Timeout
154 // g_cancellable_is_cancelled().159 // g_cancellable_is_cancelled().
155 func (x *DatagramBasedBase) CreateSource(ConditionVar glib.IOCondition, CancellableVar *Cancellable) *glib.Source {160 func (x *DatagramBasedBase) CreateSource(ConditionVar glib.IOCondition, CancellableVar *Cancellable) *glib.Source {
156 161
157- return XGDatagramBasedCreateSource(x.GoPointer(), ConditionVar, CancellableVar.GoPointer())162+ cret := XGDatagramBasedCreateSource(x.GoPointer(), ConditionVar, CancellableVar.GoPointer())
158-163+ return cret
159 }164 }
160 165
161 // Receive one or more data messages from @datagram_based in one go.166 // Receive one or more data messages from @datagram_based in one go.
@@ -208,9 +213,14 @@ func (x *DatagramBasedBase) CreateSource(ConditionVar glib.IOCondition, Cancella
208 // messages successfully received before the error will be returned. If213 // messages successfully received before the error will be returned. If
209 // @cancellable is cancelled, %G_IO_ERROR_CANCELLED is returned as with any214 // @cancellable is cancelled, %G_IO_ERROR_CANCELLED is returned as with any
210 // other error.215 // other error.
211-func (x *DatagramBasedBase) ReceiveMessages(MessagesVar uintptr, NumMessagesVar uint, FlagsVar int, TimeoutVar int64, CancellableVar *Cancellable) int {216+func (x *DatagramBasedBase) ReceiveMessages(MessagesVar uintptr, NumMessagesVar uint, FlagsVar int, TimeoutVar int64, CancellableVar *Cancellable) (int, error) {
217+ var cerr *glib.Error
212 218
213- return XGDatagramBasedReceiveMessages(x.GoPointer(), MessagesVar, NumMessagesVar, FlagsVar, TimeoutVar, CancellableVar.GoPointer())219+ cret := XGDatagramBasedReceiveMessages(x.GoPointer(), MessagesVar, NumMessagesVar, FlagsVar, TimeoutVar, CancellableVar.GoPointer(), &cerr)
220+ if cerr == nil {
221+ return cret, nil
222+ }
223+ return cret, cerr
214 224
215 }225 }
216 226
@@ -255,17 +265,22 @@ func (x *DatagramBasedBase) ReceiveMessages(MessagesVar uintptr, NumMessagesVar
255 // be returned if zero messages could be sent; otherwise the number of messages265 // be returned if zero messages could be sent; otherwise the number of messages
256 // successfully sent before the error will be returned. If @cancellable is266 // successfully sent before the error will be returned. If @cancellable is
257 // cancelled, %G_IO_ERROR_CANCELLED is returned as with any other error.267 // cancelled, %G_IO_ERROR_CANCELLED is returned as with any other error.
258-func (x *DatagramBasedBase) SendMessages(MessagesVar uintptr, NumMessagesVar uint, FlagsVar int, TimeoutVar int64, CancellableVar *Cancellable) int {268+func (x *DatagramBasedBase) SendMessages(MessagesVar uintptr, NumMessagesVar uint, FlagsVar int, TimeoutVar int64, CancellableVar *Cancellable) (int, error) {
269+ var cerr *glib.Error
259 270
260- return XGDatagramBasedSendMessages(x.GoPointer(), MessagesVar, NumMessagesVar, FlagsVar, TimeoutVar, CancellableVar.GoPointer())271+ cret := XGDatagramBasedSendMessages(x.GoPointer(), MessagesVar, NumMessagesVar, FlagsVar, TimeoutVar, CancellableVar.GoPointer(), &cerr)
272+ if cerr == nil {
273+ return cret, nil
274+ }
275+ return cret, cerr
261 276
262 }277 }
263 278
264 var XGDatagramBasedConditionCheck func(uintptr, glib.IOCondition) glib.IOCondition279 var XGDatagramBasedConditionCheck func(uintptr, glib.IOCondition) glib.IOCondition
265-var XGDatagramBasedConditionWait func(uintptr, glib.IOCondition, int64, uintptr) bool280+var XGDatagramBasedConditionWait func(uintptr, glib.IOCondition, int64, uintptr, **glib.Error) bool
266 var XGDatagramBasedCreateSource func(uintptr, glib.IOCondition, uintptr) *glib.Source281 var XGDatagramBasedCreateSource func(uintptr, glib.IOCondition, uintptr) *glib.Source
267-var XGDatagramBasedReceiveMessages func(uintptr, uintptr, uint, int, int64, uintptr) int282+var XGDatagramBasedReceiveMessages func(uintptr, uintptr, uint, int, int64, uintptr, **glib.Error) int
268-var XGDatagramBasedSendMessages func(uintptr, uintptr, uint, int, int64, uintptr) int283+var XGDatagramBasedSendMessages func(uintptr, uintptr, uint, int, int64, uintptr, **glib.Error) int
269 284
270 func init() {285 func init() {
271 lib, err := purego.Dlopen(core.GetPath("GIO"), purego.RTLD_NOW|purego.RTLD_GLOBAL)286 lib, err := purego.Dlopen(core.GetPath("GIO"), purego.RTLD_NOW|purego.RTLD_GLOBAL)
M v4/gio/gdatainputstream.go +153 -66
@@ -30,14 +30,16 @@ var xNewDataInputStream func(uintptr) uintptr
30 30
31 // Creates a new data input stream for the @base_stream.31 // Creates a new data input stream for the @base_stream.
32 func NewDataInputStream(BaseStreamVar *InputStream) *DataInputStream {32 func NewDataInputStream(BaseStreamVar *InputStream) *DataInputStream {
33- NewDataInputStreamPtr := xNewDataInputStream(BaseStreamVar.GoPointer())33+ var cls *DataInputStream
34- if NewDataInputStreamPtr == 0 {34+
35- return nil35+ cret := xNewDataInputStream(BaseStreamVar.GoPointer())
36- }
37 36
38- NewDataInputStreamCls := &DataInputStream{}37+ if cret == 0 {
39- NewDataInputStreamCls.Ptr = NewDataInputStreamPtr38+ return cls
40- return NewDataInputStreamCls39+ }
40+ cls = &DataInputStream{}
41+ cls.Ptr = cret
42+ return cls
41 }43 }
42 44
43 var xDataInputStreamGetByteOrder func(uintptr) DataStreamByteOrder45 var xDataInputStreamGetByteOrder func(uintptr) DataStreamByteOrder
@@ -45,8 +47,8 @@ var xDataInputStreamGetByteOrder func(uintptr) DataStreamByteOrder
45 // Gets the byte order for the data input stream.47 // Gets the byte order for the data input stream.
46 func (x *DataInputStream) GetByteOrder() DataStreamByteOrder {48 func (x *DataInputStream) GetByteOrder() DataStreamByteOrder {
47 49
48- return xDataInputStreamGetByteOrder(x.GoPointer())50+ cret := xDataInputStreamGetByteOrder(x.GoPointer())
49-51+ return cret
50 }52 }
51 53
52 var xDataInputStreamGetNewlineType func(uintptr) DataStreamNewlineType54 var xDataInputStreamGetNewlineType func(uintptr) DataStreamNewlineType
@@ -54,32 +56,42 @@ var xDataInputStreamGetNewlineType func(uintptr) DataStreamNewlineType
54 // Gets the current newline type for the @stream.56 // Gets the current newline type for the @stream.
55 func (x *DataInputStream) GetNewlineType() DataStreamNewlineType {57 func (x *DataInputStream) GetNewlineType() DataStreamNewlineType {
56 58
57- return xDataInputStreamGetNewlineType(x.GoPointer())59+ cret := xDataInputStreamGetNewlineType(x.GoPointer())
58-60+ return cret
59 }61 }
60 62
61-var xDataInputStreamReadByte func(uintptr, uintptr) byte63+var xDataInputStreamReadByte func(uintptr, uintptr, **glib.Error) byte
62 64
63 // Reads an unsigned 8-bit/1-byte value from @stream.65 // Reads an unsigned 8-bit/1-byte value from @stream.
64-func (x *DataInputStream) ReadByte(CancellableVar *Cancellable) byte {66+func (x *DataInputStream) ReadByte(CancellableVar *Cancellable) (byte, error) {
67+ var cerr *glib.Error
65 68
66- return xDataInputStreamReadByte(x.GoPointer(), CancellableVar.GoPointer())69+ cret := xDataInputStreamReadByte(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
70+ if cerr == nil {
71+ return cret, nil
72+ }
73+ return cret, cerr
67 74
68 }75 }
69 76
70-var xDataInputStreamReadInt16 func(uintptr, uintptr) int1677+var xDataInputStreamReadInt16 func(uintptr, uintptr, **glib.Error) int16
71 78
72 // Reads a 16-bit/2-byte value from @stream.79 // Reads a 16-bit/2-byte value from @stream.
73 //80 //
74 // In order to get the correct byte order for this read operation,81 // In order to get the correct byte order for this read operation,
75 // see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().82 // see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
76-func (x *DataInputStream) ReadInt16(CancellableVar *Cancellable) int16 {83+func (x *DataInputStream) ReadInt16(CancellableVar *Cancellable) (int16, error) {
84+ var cerr *glib.Error
77 85
78- return xDataInputStreamReadInt16(x.GoPointer(), CancellableVar.GoPointer())86+ cret := xDataInputStreamReadInt16(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
87+ if cerr == nil {
88+ return cret, nil
89+ }
90+ return cret, cerr
79 91
80 }92 }
81 93
82-var xDataInputStreamReadInt32 func(uintptr, uintptr) int3294+var xDataInputStreamReadInt32 func(uintptr, uintptr, **glib.Error) int32
83 95
84 // Reads a signed 32-bit/4-byte value from @stream.96 // Reads a signed 32-bit/4-byte value from @stream.
85 //97 //
@@ -89,13 +101,18 @@ var xDataInputStreamReadInt32 func(uintptr, uintptr) int32
89 // If @cancellable is not %NULL, then the operation can be cancelled by101 // If @cancellable is not %NULL, then the operation can be cancelled by
90 // triggering the cancellable object from another thread. If the operation102 // triggering the cancellable object from another thread. If the operation
91 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.103 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
92-func (x *DataInputStream) ReadInt32(CancellableVar *Cancellable) int32 {104+func (x *DataInputStream) ReadInt32(CancellableVar *Cancellable) (int32, error) {
105+ var cerr *glib.Error
93 106
94- return xDataInputStreamReadInt32(x.GoPointer(), CancellableVar.GoPointer())107+ cret := xDataInputStreamReadInt32(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
108+ if cerr == nil {
109+ return cret, nil
110+ }
111+ return cret, cerr
95 112
96 }113 }
97 114
98-var xDataInputStreamReadInt64 func(uintptr, uintptr) int64115+var xDataInputStreamReadInt64 func(uintptr, uintptr, **glib.Error) int64
99 116
100 // Reads a 64-bit/8-byte value from @stream.117 // Reads a 64-bit/8-byte value from @stream.
101 //118 //
@@ -105,13 +122,18 @@ var xDataInputStreamReadInt64 func(uintptr, uintptr) int64
105 // If @cancellable is not %NULL, then the operation can be cancelled by122 // If @cancellable is not %NULL, then the operation can be cancelled by
106 // triggering the cancellable object from another thread. If the operation123 // triggering the cancellable object from another thread. If the operation
107 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.124 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
108-func (x *DataInputStream) ReadInt64(CancellableVar *Cancellable) int64 {125+func (x *DataInputStream) ReadInt64(CancellableVar *Cancellable) (int64, error) {
126+ var cerr *glib.Error
109 127
110- return xDataInputStreamReadInt64(x.GoPointer(), CancellableVar.GoPointer())128+ cret := xDataInputStreamReadInt64(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
129+ if cerr == nil {
130+ return cret, nil
131+ }
132+ return cret, cerr
111 133
112 }134 }
113 135
114-var xDataInputStreamReadLine func(uintptr, uint, uintptr) uintptr136+var xDataInputStreamReadLine func(uintptr, uint, uintptr, **glib.Error) uintptr
115 137
116 // Reads a line from the data input stream. Note that no encoding138 // Reads a line from the data input stream. Note that no encoding
117 // checks or conversion is performed; the input is not guaranteed to139 // checks or conversion is performed; the input is not guaranteed to
@@ -120,9 +142,14 @@ var xDataInputStreamReadLine func(uintptr, uint, uintptr) uintptr
120 // If @cancellable is not %NULL, then the operation can be cancelled by142 // If @cancellable is not %NULL, then the operation can be cancelled by
121 // triggering the cancellable object from another thread. If the operation143 // triggering the cancellable object from another thread. If the operation
122 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.144 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
123-func (x *DataInputStream) ReadLine(LengthVar uint, CancellableVar *Cancellable) uintptr {145+func (x *DataInputStream) ReadLine(LengthVar uint, CancellableVar *Cancellable) (uintptr, error) {
146+ var cerr *glib.Error
124 147
125- return xDataInputStreamReadLine(x.GoPointer(), LengthVar, CancellableVar.GoPointer())148+ cret := xDataInputStreamReadLine(x.GoPointer(), LengthVar, CancellableVar.GoPointer(), &cerr)
149+ if cerr == nil {
150+ return cret, nil
151+ }
152+ return cret, cerr
126 153
127 }154 }
128 155
@@ -140,54 +167,74 @@ func (x *DataInputStream) ReadLineAsync(IoPriorityVar int, CancellableVar *Cance
140 167
141 }168 }
142 169
143-var xDataInputStreamReadLineFinish func(uintptr, uintptr, uint) uintptr170+var xDataInputStreamReadLineFinish func(uintptr, uintptr, uint, **glib.Error) uintptr
144 171
145 // Finish an asynchronous call started by172 // Finish an asynchronous call started by
146 // g_data_input_stream_read_line_async(). Note the warning about173 // g_data_input_stream_read_line_async(). Note the warning about
147 // string encoding in g_data_input_stream_read_line() applies here as174 // string encoding in g_data_input_stream_read_line() applies here as
148 // well.175 // well.
149-func (x *DataInputStream) ReadLineFinish(ResultVar AsyncResult, LengthVar uint) uintptr {176+func (x *DataInputStream) ReadLineFinish(ResultVar AsyncResult, LengthVar uint) (uintptr, error) {
177+ var cerr *glib.Error
150 178
151- return xDataInputStreamReadLineFinish(x.GoPointer(), ResultVar.GoPointer(), LengthVar)179+ cret := xDataInputStreamReadLineFinish(x.GoPointer(), ResultVar.GoPointer(), LengthVar, &cerr)
180+ if cerr == nil {
181+ return cret, nil
182+ }
183+ return cret, cerr
152 184
153 }185 }
154 186
155-var xDataInputStreamReadLineFinishUtf8 func(uintptr, uintptr, uint) string187+var xDataInputStreamReadLineFinishUtf8 func(uintptr, uintptr, uint, **glib.Error) string
156 188
157 // Finish an asynchronous call started by189 // Finish an asynchronous call started by
158 // g_data_input_stream_read_line_async().190 // g_data_input_stream_read_line_async().
159-func (x *DataInputStream) ReadLineFinishUtf8(ResultVar AsyncResult, LengthVar uint) string {191+func (x *DataInputStream) ReadLineFinishUtf8(ResultVar AsyncResult, LengthVar uint) (string, error) {
192+ var cerr *glib.Error
160 193
161- return xDataInputStreamReadLineFinishUtf8(x.GoPointer(), ResultVar.GoPointer(), LengthVar)194+ cret := xDataInputStreamReadLineFinishUtf8(x.GoPointer(), ResultVar.GoPointer(), LengthVar, &cerr)
195+ if cerr == nil {
196+ return cret, nil
197+ }
198+ return cret, cerr
162 199
163 }200 }
164 201
165-var xDataInputStreamReadLineUtf8 func(uintptr, uint, uintptr) string202+var xDataInputStreamReadLineUtf8 func(uintptr, uint, uintptr, **glib.Error) string
166 203
167 // Reads a UTF-8 encoded line from the data input stream.204 // Reads a UTF-8 encoded line from the data input stream.
168 //205 //
169 // If @cancellable is not %NULL, then the operation can be cancelled by206 // If @cancellable is not %NULL, then the operation can be cancelled by
170 // triggering the cancellable object from another thread. If the operation207 // triggering the cancellable object from another thread. If the operation
171 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.208 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
172-func (x *DataInputStream) ReadLineUtf8(LengthVar uint, CancellableVar *Cancellable) string {209+func (x *DataInputStream) ReadLineUtf8(LengthVar uint, CancellableVar *Cancellable) (string, error) {
210+ var cerr *glib.Error
173 211
174- return xDataInputStreamReadLineUtf8(x.GoPointer(), LengthVar, CancellableVar.GoPointer())212+ cret := xDataInputStreamReadLineUtf8(x.GoPointer(), LengthVar, CancellableVar.GoPointer(), &cerr)
213+ if cerr == nil {
214+ return cret, nil
215+ }
216+ return cret, cerr
175 217
176 }218 }
177 219
178-var xDataInputStreamReadUint16 func(uintptr, uintptr) uint16220+var xDataInputStreamReadUint16 func(uintptr, uintptr, **glib.Error) uint16
179 221
180 // Reads an unsigned 16-bit/2-byte value from @stream.222 // Reads an unsigned 16-bit/2-byte value from @stream.
181 //223 //
182 // In order to get the correct byte order for this read operation,224 // In order to get the correct byte order for this read operation,
183 // see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().225 // see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().
184-func (x *DataInputStream) ReadUint16(CancellableVar *Cancellable) uint16 {226+func (x *DataInputStream) ReadUint16(CancellableVar *Cancellable) (uint16, error) {
227+ var cerr *glib.Error
185 228
186- return xDataInputStreamReadUint16(x.GoPointer(), CancellableVar.GoPointer())229+ cret := xDataInputStreamReadUint16(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
230+ if cerr == nil {
231+ return cret, nil
232+ }
233+ return cret, cerr
187 234
188 }235 }
189 236
190-var xDataInputStreamReadUint32 func(uintptr, uintptr) uint32237+var xDataInputStreamReadUint32 func(uintptr, uintptr, **glib.Error) uint32
191 238
192 // Reads an unsigned 32-bit/4-byte value from @stream.239 // Reads an unsigned 32-bit/4-byte value from @stream.
193 //240 //
@@ -197,13 +244,18 @@ var xDataInputStreamReadUint32 func(uintptr, uintptr) uint32
197 // If @cancellable is not %NULL, then the operation can be cancelled by244 // If @cancellable is not %NULL, then the operation can be cancelled by
198 // triggering the cancellable object from another thread. If the operation245 // triggering the cancellable object from another thread. If the operation
199 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.246 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
200-func (x *DataInputStream) ReadUint32(CancellableVar *Cancellable) uint32 {247+func (x *DataInputStream) ReadUint32(CancellableVar *Cancellable) (uint32, error) {
248+ var cerr *glib.Error
201 249
202- return xDataInputStreamReadUint32(x.GoPointer(), CancellableVar.GoPointer())250+ cret := xDataInputStreamReadUint32(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
251+ if cerr == nil {
252+ return cret, nil
253+ }
254+ return cret, cerr
203 255
204 }256 }
205 257
206-var xDataInputStreamReadUint64 func(uintptr, uintptr) uint64258+var xDataInputStreamReadUint64 func(uintptr, uintptr, **glib.Error) uint64
207 259
208 // Reads an unsigned 64-bit/8-byte value from @stream.260 // Reads an unsigned 64-bit/8-byte value from @stream.
209 //261 //
@@ -213,13 +265,18 @@ var xDataInputStreamReadUint64 func(uintptr, uintptr) uint64
213 // If @cancellable is not %NULL, then the operation can be cancelled by265 // If @cancellable is not %NULL, then the operation can be cancelled by
214 // triggering the cancellable object from another thread. If the operation266 // triggering the cancellable object from another thread. If the operation
215 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.267 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
216-func (x *DataInputStream) ReadUint64(CancellableVar *Cancellable) uint64 {268+func (x *DataInputStream) ReadUint64(CancellableVar *Cancellable) (uint64, error) {
269+ var cerr *glib.Error
217 270
218- return xDataInputStreamReadUint64(x.GoPointer(), CancellableVar.GoPointer())271+ cret := xDataInputStreamReadUint64(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
272+ if cerr == nil {
273+ return cret, nil
274+ }
275+ return cret, cerr
219 276
220 }277 }
221 278
222-var xDataInputStreamReadUntil func(uintptr, string, uint, uintptr) string279+var xDataInputStreamReadUntil func(uintptr, string, uint, uintptr, **glib.Error) string
223 280
224 // Reads a string from the data input stream, up to the first281 // Reads a string from the data input stream, up to the first
225 // occurrence of any of the stop characters.282 // occurrence of any of the stop characters.
@@ -232,9 +289,14 @@ var xDataInputStreamReadUntil func(uintptr, string, uint, uintptr) string
232 // functions will be marked as deprecated in a future release. Use289 // functions will be marked as deprecated in a future release. Use
233 // g_data_input_stream_read_upto() instead, but note that that function290 // g_data_input_stream_read_upto() instead, but note that that function
234 // does not consume the stop character.291 // does not consume the stop character.
235-func (x *DataInputStream) ReadUntil(StopCharsVar string, LengthVar uint, CancellableVar *Cancellable) string {292+func (x *DataInputStream) ReadUntil(StopCharsVar string, LengthVar uint, CancellableVar *Cancellable) (string, error) {
293+ var cerr *glib.Error
236 294
237- return xDataInputStreamReadUntil(x.GoPointer(), StopCharsVar, LengthVar, CancellableVar.GoPointer())295+ cret := xDataInputStreamReadUntil(x.GoPointer(), StopCharsVar, LengthVar, CancellableVar.GoPointer(), &cerr)
296+ if cerr == nil {
297+ return cret, nil
298+ }
299+ return cret, cerr
238 300
239 }301 }
240 302
@@ -261,17 +323,22 @@ func (x *DataInputStream) ReadUntilAsync(StopCharsVar string, IoPriorityVar int,
261 323
262 }324 }
263 325
264-var xDataInputStreamReadUntilFinish func(uintptr, uintptr, uint) string326+var xDataInputStreamReadUntilFinish func(uintptr, uintptr, uint, **glib.Error) string
265 327
266 // Finish an asynchronous call started by328 // Finish an asynchronous call started by
267 // g_data_input_stream_read_until_async().329 // g_data_input_stream_read_until_async().
268-func (x *DataInputStream) ReadUntilFinish(ResultVar AsyncResult, LengthVar uint) string {330+func (x *DataInputStream) ReadUntilFinish(ResultVar AsyncResult, LengthVar uint) (string, error) {
331+ var cerr *glib.Error
269 332
270- return xDataInputStreamReadUntilFinish(x.GoPointer(), ResultVar.GoPointer(), LengthVar)333+ cret := xDataInputStreamReadUntilFinish(x.GoPointer(), ResultVar.GoPointer(), LengthVar, &cerr)
334+ if cerr == nil {
335+ return cret, nil
336+ }
337+ return cret, cerr
271 338
272 }339 }
273 340
274-var xDataInputStreamReadUpto func(uintptr, string, int, uint, uintptr) string341+var xDataInputStreamReadUpto func(uintptr, string, int, uint, uintptr, **glib.Error) string
275 342
276 // Reads a string from the data input stream, up to the first343 // Reads a string from the data input stream, up to the first
277 // occurrence of any of the stop characters.344 // occurrence of any of the stop characters.
@@ -285,9 +352,14 @@ var xDataInputStreamReadUpto func(uintptr, string, int, uint, uintptr) string
285 // specified.352 // specified.
286 //353 //
287 // The returned string will always be nul-terminated on success.354 // The returned string will always be nul-terminated on success.
288-func (x *DataInputStream) ReadUpto(StopCharsVar string, StopCharsLenVar int, LengthVar uint, CancellableVar *Cancellable) string {355+func (x *DataInputStream) ReadUpto(StopCharsVar string, StopCharsLenVar int, LengthVar uint, CancellableVar *Cancellable) (string, error) {
356+ var cerr *glib.Error
289 357
290- return xDataInputStreamReadUpto(x.GoPointer(), StopCharsVar, StopCharsLenVar, LengthVar, CancellableVar.GoPointer())358+ cret := xDataInputStreamReadUpto(x.GoPointer(), StopCharsVar, StopCharsLenVar, LengthVar, CancellableVar.GoPointer(), &cerr)
359+ if cerr == nil {
360+ return cret, nil
361+ }
362+ return cret, cerr
291 363
292 }364 }
293 365
@@ -313,7 +385,7 @@ func (x *DataInputStream) ReadUptoAsync(StopCharsVar string, StopCharsLenVar int
313 385
314 }386 }
315 387
316-var xDataInputStreamReadUptoFinish func(uintptr, uintptr, uint) string388+var xDataInputStreamReadUptoFinish func(uintptr, uintptr, uint, **glib.Error) string
317 389
318 // Finish an asynchronous call started by390 // Finish an asynchronous call started by
319 // g_data_input_stream_read_upto_async().391 // g_data_input_stream_read_upto_async().
@@ -323,9 +395,14 @@ var xDataInputStreamReadUptoFinish func(uintptr, uintptr, uint) string
323 // g_data_input_stream_read_upto_async() again.395 // g_data_input_stream_read_upto_async() again.
324 //396 //
325 // The returned string will always be nul-terminated on success.397 // The returned string will always be nul-terminated on success.
326-func (x *DataInputStream) ReadUptoFinish(ResultVar AsyncResult, LengthVar uint) string {398+func (x *DataInputStream) ReadUptoFinish(ResultVar AsyncResult, LengthVar uint) (string, error) {
399+ var cerr *glib.Error
327 400
328- return xDataInputStreamReadUptoFinish(x.GoPointer(), ResultVar.GoPointer(), LengthVar)401+ cret := xDataInputStreamReadUptoFinish(x.GoPointer(), ResultVar.GoPointer(), LengthVar, &cerr)
402+ if cerr == nil {
403+ return cret, nil
404+ }
405+ return cret, cerr
329 406
330 }407 }
331 408
@@ -363,16 +440,16 @@ func (c *DataInputStream) SetGoPointer(ptr uintptr) {
363 // Tests if the stream supports the #GSeekableIface.440 // Tests if the stream supports the #GSeekableIface.
364 func (x *DataInputStream) CanSeek() bool {441 func (x *DataInputStream) CanSeek() bool {
365 442
366- return XGSeekableCanSeek(x.GoPointer())443+ cret := XGSeekableCanSeek(x.GoPointer())
367-444+ return cret
368 }445 }
369 446
370 // Tests if the length of the stream can be adjusted with447 // Tests if the length of the stream can be adjusted with
371 // g_seekable_truncate().448 // g_seekable_truncate().
372 func (x *DataInputStream) CanTruncate() bool {449 func (x *DataInputStream) CanTruncate() bool {
373 450
374- return XGSeekableCanTruncate(x.GoPointer())451+ cret := XGSeekableCanTruncate(x.GoPointer())
375-452+ return cret
376 }453 }
377 454
378 // Seeks in the stream by the given @offset, modified by @type.455 // Seeks in the stream by the given @offset, modified by @type.
@@ -389,17 +466,22 @@ func (x *DataInputStream) CanTruncate() bool {
389 // If @cancellable is not %NULL, then the operation can be cancelled by466 // If @cancellable is not %NULL, then the operation can be cancelled by
390 // triggering the cancellable object from another thread. If the operation467 // triggering the cancellable object from another thread. If the operation
391 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.468 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
392-func (x *DataInputStream) Seek(OffsetVar int64, TypeVar glib.SeekType, CancellableVar *Cancellable) bool {469+func (x *DataInputStream) Seek(OffsetVar int64, TypeVar glib.SeekType, CancellableVar *Cancellable) (bool, error) {
470+ var cerr *glib.Error
393 471
394- return XGSeekableSeek(x.GoPointer(), OffsetVar, TypeVar, CancellableVar.GoPointer())472+ cret := XGSeekableSeek(x.GoPointer(), OffsetVar, TypeVar, CancellableVar.GoPointer(), &cerr)
473+ if cerr == nil {
474+ return cret, nil
475+ }
476+ return cret, cerr
395 477
396 }478 }
397 479
398 // Tells the current position within the stream.480 // Tells the current position within the stream.
399 func (x *DataInputStream) Tell() int64 {481 func (x *DataInputStream) Tell() int64 {
400 482
401- return XGSeekableTell(x.GoPointer())483+ cret := XGSeekableTell(x.GoPointer())
402-484+ return cret
403 }485 }
404 486
405 // Sets the length of the stream to @offset. If the stream was previously487 // Sets the length of the stream to @offset. If the stream was previously
@@ -411,9 +493,14 @@ func (x *DataInputStream) Tell() int64 {
411 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an493 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
412 // operation was partially finished when the operation was cancelled the494 // operation was partially finished when the operation was cancelled the
413 // partial result will be returned, without an error.495 // partial result will be returned, without an error.
414-func (x *DataInputStream) Truncate(OffsetVar int64, CancellableVar *Cancellable) bool {496+func (x *DataInputStream) Truncate(OffsetVar int64, CancellableVar *Cancellable) (bool, error) {
497+ var cerr *glib.Error
415 498
416- return XGSeekableTruncate(x.GoPointer(), OffsetVar, CancellableVar.GoPointer())499+ cret := XGSeekableTruncate(x.GoPointer(), OffsetVar, CancellableVar.GoPointer(), &cerr)
500+ if cerr == nil {
501+ return cret, nil
502+ }
503+ return cret, cerr
417 504
418 }505 }
419 506
M v4/gio/gdataoutputstream.go +95 -43
@@ -30,14 +30,16 @@ var xNewDataOutputStream func(uintptr) uintptr
30 30
31 // Creates a new data output stream for @base_stream.31 // Creates a new data output stream for @base_stream.
32 func NewDataOutputStream(BaseStreamVar *OutputStream) *DataOutputStream {32 func NewDataOutputStream(BaseStreamVar *OutputStream) *DataOutputStream {
33- NewDataOutputStreamPtr := xNewDataOutputStream(BaseStreamVar.GoPointer())33+ var cls *DataOutputStream
34- if NewDataOutputStreamPtr == 0 {34+
35- return nil35+ cret := xNewDataOutputStream(BaseStreamVar.GoPointer())
36- }
37 36
38- NewDataOutputStreamCls := &DataOutputStream{}37+ if cret == 0 {
39- NewDataOutputStreamCls.Ptr = NewDataOutputStreamPtr38+ return cls
40- return NewDataOutputStreamCls39+ }
40+ cls = &DataOutputStream{}
41+ cls.Ptr = cret
42+ return cls
41 }43 }
42 44
43 var xDataOutputStreamGetByteOrder func(uintptr) DataStreamByteOrder45 var xDataOutputStreamGetByteOrder func(uintptr) DataStreamByteOrder
@@ -45,79 +47,119 @@ var xDataOutputStreamGetByteOrder func(uintptr) DataStreamByteOrder
45 // Gets the byte order for the stream.47 // Gets the byte order for the stream.
46 func (x *DataOutputStream) GetByteOrder() DataStreamByteOrder {48 func (x *DataOutputStream) GetByteOrder() DataStreamByteOrder {
47 49
48- return xDataOutputStreamGetByteOrder(x.GoPointer())50+ cret := xDataOutputStreamGetByteOrder(x.GoPointer())
49-51+ return cret
50 }52 }
51 53
52-var xDataOutputStreamPutByte func(uintptr, byte, uintptr) bool54+var xDataOutputStreamPutByte func(uintptr, byte, uintptr, **glib.Error) bool
53 55
54 // Puts a byte into the output stream.56 // Puts a byte into the output stream.
55-func (x *DataOutputStream) PutByte(DataVar byte, CancellableVar *Cancellable) bool {57+func (x *DataOutputStream) PutByte(DataVar byte, CancellableVar *Cancellable) (bool, error) {
58+ var cerr *glib.Error
56 59
57- return xDataOutputStreamPutByte(x.GoPointer(), DataVar, CancellableVar.GoPointer())60+ cret := xDataOutputStreamPutByte(x.GoPointer(), DataVar, CancellableVar.GoPointer(), &cerr)
61+ if cerr == nil {
62+ return cret, nil
63+ }
64+ return cret, cerr
58 65
59 }66 }
60 67
61-var xDataOutputStreamPutInt16 func(uintptr, int16, uintptr) bool68+var xDataOutputStreamPutInt16 func(uintptr, int16, uintptr, **glib.Error) bool
62 69
63 // Puts a signed 16-bit integer into the output stream.70 // Puts a signed 16-bit integer into the output stream.
64-func (x *DataOutputStream) PutInt16(DataVar int16, CancellableVar *Cancellable) bool {71+func (x *DataOutputStream) PutInt16(DataVar int16, CancellableVar *Cancellable) (bool, error) {
72+ var cerr *glib.Error
65 73
66- return xDataOutputStreamPutInt16(x.GoPointer(), DataVar, CancellableVar.GoPointer())74+ cret := xDataOutputStreamPutInt16(x.GoPointer(), DataVar, CancellableVar.GoPointer(), &cerr)
75+ if cerr == nil {
76+ return cret, nil
77+ }
78+ return cret, cerr
67 79
68 }80 }
69 81
70-var xDataOutputStreamPutInt32 func(uintptr, int32, uintptr) bool82+var xDataOutputStreamPutInt32 func(uintptr, int32, uintptr, **glib.Error) bool
71 83
72 // Puts a signed 32-bit integer into the output stream.84 // Puts a signed 32-bit integer into the output stream.
73-func (x *DataOutputStream) PutInt32(DataVar int32, CancellableVar *Cancellable) bool {85+func (x *DataOutputStream) PutInt32(DataVar int32, CancellableVar *Cancellable) (bool, error) {
86+ var cerr *glib.Error
74 87
75- return xDataOutputStreamPutInt32(x.GoPointer(), DataVar, CancellableVar.GoPointer())88+ cret := xDataOutputStreamPutInt32(x.GoPointer(), DataVar, CancellableVar.GoPointer(), &cerr)
89+ if cerr == nil {
90+ return cret, nil
91+ }
92+ return cret, cerr
76 93
77 }94 }
78 95
79-var xDataOutputStreamPutInt64 func(uintptr, int64, uintptr) bool96+var xDataOutputStreamPutInt64 func(uintptr, int64, uintptr, **glib.Error) bool
80 97
81 // Puts a signed 64-bit integer into the stream.98 // Puts a signed 64-bit integer into the stream.
82-func (x *DataOutputStream) PutInt64(DataVar int64, CancellableVar *Cancellable) bool {99+func (x *DataOutputStream) PutInt64(DataVar int64, CancellableVar *Cancellable) (bool, error) {
100+ var cerr *glib.Error
83 101
84- return xDataOutputStreamPutInt64(x.GoPointer(), DataVar, CancellableVar.GoPointer())102+ cret := xDataOutputStreamPutInt64(x.GoPointer(), DataVar, CancellableVar.GoPointer(), &cerr)
103+ if cerr == nil {
104+ return cret, nil
105+ }
106+ return cret, cerr
85 107
86 }108 }
87 109
88-var xDataOutputStreamPutString func(uintptr, string, uintptr) bool110+var xDataOutputStreamPutString func(uintptr, string, uintptr, **glib.Error) bool
89 111
90 // Puts a string into the output stream.112 // Puts a string into the output stream.
91-func (x *DataOutputStream) PutString(StrVar string, CancellableVar *Cancellable) bool {113+func (x *DataOutputStream) PutString(StrVar string, CancellableVar *Cancellable) (bool, error) {
114+ var cerr *glib.Error
92 115
93- return xDataOutputStreamPutString(x.GoPointer(), StrVar, CancellableVar.GoPointer())116+ cret := xDataOutputStreamPutString(x.GoPointer(), StrVar, CancellableVar.GoPointer(), &cerr)
117+ if cerr == nil {
118+ return cret, nil
119+ }
120+ return cret, cerr
94 121
95 }122 }
96 123
97-var xDataOutputStreamPutUint16 func(uintptr, uint16, uintptr) bool124+var xDataOutputStreamPutUint16 func(uintptr, uint16, uintptr, **glib.Error) bool
98 125
99 // Puts an unsigned 16-bit integer into the output stream.126 // Puts an unsigned 16-bit integer into the output stream.
100-func (x *DataOutputStream) PutUint16(DataVar uint16, CancellableVar *Cancellable) bool {127+func (x *DataOutputStream) PutUint16(DataVar uint16, CancellableVar *Cancellable) (bool, error) {
128+ var cerr *glib.Error
101 129
102- return xDataOutputStreamPutUint16(x.GoPointer(), DataVar, CancellableVar.GoPointer())130+ cret := xDataOutputStreamPutUint16(x.GoPointer(), DataVar, CancellableVar.GoPointer(), &cerr)
131+ if cerr == nil {
132+ return cret, nil
133+ }
134+ return cret, cerr
103 135
104 }136 }
105 137
106-var xDataOutputStreamPutUint32 func(uintptr, uint32, uintptr) bool138+var xDataOutputStreamPutUint32 func(uintptr, uint32, uintptr, **glib.Error) bool
107 139
108 // Puts an unsigned 32-bit integer into the stream.140 // Puts an unsigned 32-bit integer into the stream.
109-func (x *DataOutputStream) PutUint32(DataVar uint32, CancellableVar *Cancellable) bool {141+func (x *DataOutputStream) PutUint32(DataVar uint32, CancellableVar *Cancellable) (bool, error) {
142+ var cerr *glib.Error
110 143
111- return xDataOutputStreamPutUint32(x.GoPointer(), DataVar, CancellableVar.GoPointer())144+ cret := xDataOutputStreamPutUint32(x.GoPointer(), DataVar, CancellableVar.GoPointer(), &cerr)
145+ if cerr == nil {
146+ return cret, nil
147+ }
148+ return cret, cerr
112 149
113 }150 }
114 151
115-var xDataOutputStreamPutUint64 func(uintptr, uint64, uintptr) bool152+var xDataOutputStreamPutUint64 func(uintptr, uint64, uintptr, **glib.Error) bool
116 153
117 // Puts an unsigned 64-bit integer into the stream.154 // Puts an unsigned 64-bit integer into the stream.
118-func (x *DataOutputStream) PutUint64(DataVar uint64, CancellableVar *Cancellable) bool {155+func (x *DataOutputStream) PutUint64(DataVar uint64, CancellableVar *Cancellable) (bool, error) {
156+ var cerr *glib.Error
119 157
120- return xDataOutputStreamPutUint64(x.GoPointer(), DataVar, CancellableVar.GoPointer())158+ cret := xDataOutputStreamPutUint64(x.GoPointer(), DataVar, CancellableVar.GoPointer(), &cerr)
159+ if cerr == nil {
160+ return cret, nil
161+ }
162+ return cret, cerr
121 163
122 }164 }
123 165
@@ -141,16 +183,16 @@ func (c *DataOutputStream) SetGoPointer(ptr uintptr) {
141 // Tests if the stream supports the #GSeekableIface.183 // Tests if the stream supports the #GSeekableIface.
142 func (x *DataOutputStream) CanSeek() bool {184 func (x *DataOutputStream) CanSeek() bool {
143 185
144- return XGSeekableCanSeek(x.GoPointer())186+ cret := XGSeekableCanSeek(x.GoPointer())
145-187+ return cret
146 }188 }
147 189
148 // Tests if the length of the stream can be adjusted with190 // Tests if the length of the stream can be adjusted with
149 // g_seekable_truncate().191 // g_seekable_truncate().
150 func (x *DataOutputStream) CanTruncate() bool {192 func (x *DataOutputStream) CanTruncate() bool {
151 193
152- return XGSeekableCanTruncate(x.GoPointer())194+ cret := XGSeekableCanTruncate(x.GoPointer())
153-195+ return cret
154 }196 }
155 197
156 // Seeks in the stream by the given @offset, modified by @type.198 // Seeks in the stream by the given @offset, modified by @type.
@@ -167,17 +209,22 @@ func (x *DataOutputStream) CanTruncate() bool {
167 // If @cancellable is not %NULL, then the operation can be cancelled by209 // If @cancellable is not %NULL, then the operation can be cancelled by
168 // triggering the cancellable object from another thread. If the operation210 // triggering the cancellable object from another thread. If the operation
169 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.211 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
170-func (x *DataOutputStream) Seek(OffsetVar int64, TypeVar glib.SeekType, CancellableVar *Cancellable) bool {212+func (x *DataOutputStream) Seek(OffsetVar int64, TypeVar glib.SeekType, CancellableVar *Cancellable) (bool, error) {
213+ var cerr *glib.Error
171 214
172- return XGSeekableSeek(x.GoPointer(), OffsetVar, TypeVar, CancellableVar.GoPointer())215+ cret := XGSeekableSeek(x.GoPointer(), OffsetVar, TypeVar, CancellableVar.GoPointer(), &cerr)
216+ if cerr == nil {
217+ return cret, nil
218+ }
219+ return cret, cerr
173 220
174 }221 }
175 222
176 // Tells the current position within the stream.223 // Tells the current position within the stream.
177 func (x *DataOutputStream) Tell() int64 {224 func (x *DataOutputStream) Tell() int64 {
178 225
179- return XGSeekableTell(x.GoPointer())226+ cret := XGSeekableTell(x.GoPointer())
180-227+ return cret
181 }228 }
182 229
183 // Sets the length of the stream to @offset. If the stream was previously230 // Sets the length of the stream to @offset. If the stream was previously
@@ -189,9 +236,14 @@ func (x *DataOutputStream) Tell() int64 {
189 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an236 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
190 // operation was partially finished when the operation was cancelled the237 // operation was partially finished when the operation was cancelled the
191 // partial result will be returned, without an error.238 // partial result will be returned, without an error.
192-func (x *DataOutputStream) Truncate(OffsetVar int64, CancellableVar *Cancellable) bool {239+func (x *DataOutputStream) Truncate(OffsetVar int64, CancellableVar *Cancellable) (bool, error) {
240+ var cerr *glib.Error
193 241
194- return XGSeekableTruncate(x.GoPointer(), OffsetVar, CancellableVar.GoPointer())242+ cret := XGSeekableTruncate(x.GoPointer(), OffsetVar, CancellableVar.GoPointer(), &cerr)
243+ if cerr == nil {
244+ return cret, nil
245+ }
246+ return cret, cerr
195 247
196 }248 }
197 249
M v4/gio/gdbusaddress.go +49 -28
@@ -4,6 +4,7 @@ package gio
4 import (4 import (
5 "github.com/jwijenbergh/purego"5 "github.com/jwijenbergh/purego"
6 "github.com/jwijenbergh/puregotk/internal/core"6 "github.com/jwijenbergh/puregotk/internal/core"
7+ "github.com/jwijenbergh/puregotk/v4/glib"
7 )8 )
8 9
9 var xDbusAddressEscapeValue func(string) string10 var xDbusAddressEscapeValue func(string) string
@@ -17,11 +18,11 @@ var xDbusAddressEscapeValue func(string) string
17 // `unix:nonce-tcp:host=127.0.0.1,port=42,noncefile=/run/bus-for-%3A0`.18 // `unix:nonce-tcp:host=127.0.0.1,port=42,noncefile=/run/bus-for-%3A0`.
18 func DbusAddressEscapeValue(StringVar string) string {19 func DbusAddressEscapeValue(StringVar string) string {
19 20
20- return xDbusAddressEscapeValue(StringVar)21+ cret := xDbusAddressEscapeValue(StringVar)
21-22+ return cret
22 }23 }
23 24
24-var xDbusAddressGetForBusSync func(BusType, uintptr) string25+var xDbusAddressGetForBusSync func(BusType, uintptr, **glib.Error) string
25 26
26 // Synchronously looks up the D-Bus address for the well-known message27 // Synchronously looks up the D-Bus address for the well-known message
27 // bus instance specified by @bus_type. This may involve using various28 // bus instance specified by @bus_type. This may involve using various
@@ -29,9 +30,14 @@ var xDbusAddressGetForBusSync func(BusType, uintptr) string
29 //30 //
30 // The returned address will be in the31 // The returned address will be in the
31 // [D-Bus address format](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses).32 // [D-Bus address format](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses).
32-func DbusAddressGetForBusSync(BusTypeVar BusType, CancellableVar *Cancellable) string {33+func DbusAddressGetForBusSync(BusTypeVar BusType, CancellableVar *Cancellable) (string, error) {
34+ var cerr *glib.Error
33 35
34- return xDbusAddressGetForBusSync(BusTypeVar, CancellableVar.GoPointer())36+ cret := xDbusAddressGetForBusSync(BusTypeVar, CancellableVar.GoPointer(), &cerr)
37+ if cerr == nil {
38+ return cret, nil
39+ }
40+ return cret, cerr
35 41
36 }42 }
37 43
@@ -54,26 +60,31 @@ func DbusAddressGetStream(AddressVar string, CancellableVar *Cancellable, Callba
54 60
55 }61 }
56 62
57-var xDbusAddressGetStreamFinish func(uintptr, string) uintptr63+var xDbusAddressGetStreamFinish func(uintptr, string, **glib.Error) uintptr
58 64
59 // Finishes an operation started with g_dbus_address_get_stream().65 // Finishes an operation started with g_dbus_address_get_stream().
60 //66 //
61 // A server is not required to set a GUID, so @out_guid may be set to %NULL67 // A server is not required to set a GUID, so @out_guid may be set to %NULL
62 // even on success.68 // even on success.
63-func DbusAddressGetStreamFinish(ResVar AsyncResult, OutGuidVar string) *IOStream {69+func DbusAddressGetStreamFinish(ResVar AsyncResult, OutGuidVar string) (*IOStream, error) {
70+ var cls *IOStream
71+ var cerr *glib.Error
64 72
65- DbusAddressGetStreamFinishPtr := xDbusAddressGetStreamFinish(ResVar.GoPointer(), OutGuidVar)73+ cret := xDbusAddressGetStreamFinish(ResVar.GoPointer(), OutGuidVar, &cerr)
66- if DbusAddressGetStreamFinishPtr == 0 {
67- return nil
68- }
69 74
70- DbusAddressGetStreamFinishCls := &IOStream{}75+ if cret == 0 {
71- DbusAddressGetStreamFinishCls.Ptr = DbusAddressGetStreamFinishPtr76+ return cls, cerr
72- return DbusAddressGetStreamFinishCls77+ }
78+ cls = &IOStream{}
79+ cls.Ptr = cret
80+ if cerr == nil {
81+ return cls, nil
82+ }
83+ return cls, cerr
73 84
74 }85 }
75 86
76-var xDbusAddressGetStreamSync func(string, string, uintptr) uintptr87+var xDbusAddressGetStreamSync func(string, string, uintptr, **glib.Error) uintptr
77 88
78 // Synchronously connects to an endpoint specified by @address and89 // Synchronously connects to an endpoint specified by @address and
79 // sets up the connection so it is in a state to run the client-side90 // sets up the connection so it is in a state to run the client-side
@@ -85,16 +96,21 @@ var xDbusAddressGetStreamSync func(string, string, uintptr) uintptr
85 //96 //
86 // This is a synchronous failable function. See97 // This is a synchronous failable function. See
87 // g_dbus_address_get_stream() for the asynchronous version.98 // g_dbus_address_get_stream() for the asynchronous version.
88-func DbusAddressGetStreamSync(AddressVar string, OutGuidVar string, CancellableVar *Cancellable) *IOStream {99+func DbusAddressGetStreamSync(AddressVar string, OutGuidVar string, CancellableVar *Cancellable) (*IOStream, error) {
100+ var cls *IOStream
101+ var cerr *glib.Error
89 102
90- DbusAddressGetStreamSyncPtr := xDbusAddressGetStreamSync(AddressVar, OutGuidVar, CancellableVar.GoPointer())103+ cret := xDbusAddressGetStreamSync(AddressVar, OutGuidVar, CancellableVar.GoPointer(), &cerr)
91- if DbusAddressGetStreamSyncPtr == 0 {
92- return nil
93- }
94 104
95- DbusAddressGetStreamSyncCls := &IOStream{}105+ if cret == 0 {
96- DbusAddressGetStreamSyncCls.Ptr = DbusAddressGetStreamSyncPtr106+ return cls, cerr
97- return DbusAddressGetStreamSyncCls107+ }
108+ cls = &IOStream{}
109+ cls.Ptr = cret
110+ if cerr == nil {
111+ return cls, nil
112+ }
113+ return cls, cerr
98 114
99 }115 }
100 116
@@ -108,19 +124,24 @@ var xDbusIsAddress func(string) bool
108 // checks.124 // checks.
109 func DbusIsAddress(StringVar string) bool {125 func DbusIsAddress(StringVar string) bool {
110 126
111- return xDbusIsAddress(StringVar)127+ cret := xDbusIsAddress(StringVar)
112-128+ return cret
113 }129 }
114 130
115-var xDbusIsSupportedAddress func(string) bool131+var xDbusIsSupportedAddress func(string, **glib.Error) bool
116 132
117 // Like g_dbus_is_address() but also checks if the library supports the133 // Like g_dbus_is_address() but also checks if the library supports the
118 // transports in @string and that key/value pairs for each transport134 // transports in @string and that key/value pairs for each transport
119 // are valid. See the specification of the135 // are valid. See the specification of the
120 // [D-Bus address format](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses).136 // [D-Bus address format](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses).
121-func DbusIsSupportedAddress(StringVar string) bool {137+func DbusIsSupportedAddress(StringVar string) (bool, error) {
138+ var cerr *glib.Error
122 139
123- return xDbusIsSupportedAddress(StringVar)140+ cret := xDbusIsSupportedAddress(StringVar, &cerr)
141+ if cerr == nil {
142+ return cret, nil
143+ }
144+ return cret, cerr
124 145
125 }146 }
126 147
M v4/gio/gdbusconnection.go +28 -18
@@ -205,7 +205,7 @@ func BusGet(BusTypeVar BusType, CancellableVar *Cancellable, CallbackVar AsyncRe
205 205
206 }206 }
207 207
208-var xBusGetFinish func(uintptr) uintptr208+var xBusGetFinish func(uintptr, **glib.Error) uintptr
209 209
210 // Finishes an operation started with g_bus_get().210 // Finishes an operation started with g_bus_get().
211 //211 //
@@ -219,20 +219,25 @@ var xBusGetFinish func(uintptr) uintptr
219 //219 //
220 // Note that the returned #GDBusConnection object will (usually) have220 // Note that the returned #GDBusConnection object will (usually) have
221 // the #GDBusConnection:exit-on-close property set to %TRUE.221 // the #GDBusConnection:exit-on-close property set to %TRUE.
222-func BusGetFinish(ResVar AsyncResult) *DBusConnection {222+func BusGetFinish(ResVar AsyncResult) (*DBusConnection, error) {
223+ var cls *DBusConnection
224+ var cerr *glib.Error
223 225
224- BusGetFinishPtr := xBusGetFinish(ResVar.GoPointer())226+ cret := xBusGetFinish(ResVar.GoPointer(), &cerr)
225- if BusGetFinishPtr == 0 {
226- return nil
227- }
228 227
229- BusGetFinishCls := &DBusConnection{}228+ if cret == 0 {
230- BusGetFinishCls.Ptr = BusGetFinishPtr229+ return cls, cerr
231- return BusGetFinishCls230+ }
231+ cls = &DBusConnection{}
232+ cls.Ptr = cret
233+ if cerr == nil {
234+ return cls, nil
235+ }
236+ return cls, cerr
232 237
233 }238 }
234 239
235-var xBusGetSync func(BusType, uintptr) uintptr240+var xBusGetSync func(BusType, uintptr, **glib.Error) uintptr
236 241
237 // Synchronously connects to the message bus specified by @bus_type.242 // Synchronously connects to the message bus specified by @bus_type.
238 // Note that the returned object may shared with other callers,243 // Note that the returned object may shared with other callers,
@@ -252,16 +257,21 @@ var xBusGetSync func(BusType, uintptr) uintptr
252 //257 //
253 // Note that the returned #GDBusConnection object will (usually) have258 // Note that the returned #GDBusConnection object will (usually) have
254 // the #GDBusConnection:exit-on-close property set to %TRUE.259 // the #GDBusConnection:exit-on-close property set to %TRUE.
255-func BusGetSync(BusTypeVar BusType, CancellableVar *Cancellable) *DBusConnection {260+func BusGetSync(BusTypeVar BusType, CancellableVar *Cancellable) (*DBusConnection, error) {
261+ var cls *DBusConnection
262+ var cerr *glib.Error
256 263
257- BusGetSyncPtr := xBusGetSync(BusTypeVar, CancellableVar.GoPointer())264+ cret := xBusGetSync(BusTypeVar, CancellableVar.GoPointer(), &cerr)
258- if BusGetSyncPtr == 0 {
259- return nil
260- }
261 265
262- BusGetSyncCls := &DBusConnection{}266+ if cret == 0 {
263- BusGetSyncCls.Ptr = BusGetSyncPtr267+ return cls, cerr
264- return BusGetSyncCls268+ }
269+ cls = &DBusConnection{}
270+ cls.Ptr = cret
271+ if cerr == nil {
272+ return cls, nil
273+ }
274+ return cls, cerr
265 275
266 }276 }
267 277
M v4/gio/gdbuserror.go +15 -15
@@ -11,7 +11,7 @@ import (
11 type DBusErrorEntry struct {11 type DBusErrorEntry struct {
12 ErrorCode int3212 ErrorCode int32
13 13
14- DbusErrorName string14+ DbusErrorName uintptr
15 }15 }
16 16
17 var xDbusErrorEncodeGerror func(*glib.Error) string17 var xDbusErrorEncodeGerror func(*glib.Error) string
@@ -29,8 +29,8 @@ var xDbusErrorEncodeGerror func(*glib.Error) string
29 // #GError on the wire. Regular applications should not use it.29 // #GError on the wire. Regular applications should not use it.
30 func DbusErrorEncodeGerror(ErrorVar *glib.Error) string {30 func DbusErrorEncodeGerror(ErrorVar *glib.Error) string {
31 31
32- return xDbusErrorEncodeGerror(ErrorVar)32+ cret := xDbusErrorEncodeGerror(ErrorVar)
33-33+ return cret
34 }34 }
35 35
36 var xDbusErrorGetRemoteError func(*glib.Error) string36 var xDbusErrorGetRemoteError func(*glib.Error) string
@@ -43,8 +43,8 @@ var xDbusErrorGetRemoteError func(*glib.Error) string
43 // g_dbus_error_strip_remote_error() has been used on @error.43 // g_dbus_error_strip_remote_error() has been used on @error.
44 func DbusErrorGetRemoteError(ErrorVar *glib.Error) string {44 func DbusErrorGetRemoteError(ErrorVar *glib.Error) string {
45 45
46- return xDbusErrorGetRemoteError(ErrorVar)46+ cret := xDbusErrorGetRemoteError(ErrorVar)
47-47+ return cret
48 }48 }
49 49
50 var xDbusErrorIsRemoteError func(*glib.Error) bool50 var xDbusErrorIsRemoteError func(*glib.Error) bool
@@ -53,8 +53,8 @@ var xDbusErrorIsRemoteError func(*glib.Error) bool
53 // use g_dbus_error_get_remote_error() to get the name of the error.53 // use g_dbus_error_get_remote_error() to get the name of the error.
54 func DbusErrorIsRemoteError(ErrorVar *glib.Error) bool {54 func DbusErrorIsRemoteError(ErrorVar *glib.Error) bool {
55 55
56- return xDbusErrorIsRemoteError(ErrorVar)56+ cret := xDbusErrorIsRemoteError(ErrorVar)
57-57+ return cret
58 }58 }
59 59
60 var xDbusErrorNewForDbusError func(string, string) *glib.Error60 var xDbusErrorNewForDbusError func(string, string) *glib.Error
@@ -87,8 +87,8 @@ var xDbusErrorNewForDbusError func(string, string) *glib.Error
87 // it.87 // it.
88 func DbusErrorNewForDbusError(DbusErrorNameVar string, DbusErrorMessageVar string) *glib.Error {88 func DbusErrorNewForDbusError(DbusErrorNameVar string, DbusErrorMessageVar string) *glib.Error {
89 89
90- return xDbusErrorNewForDbusError(DbusErrorNameVar, DbusErrorMessageVar)90+ cret := xDbusErrorNewForDbusError(DbusErrorNameVar, DbusErrorMessageVar)
91-91+ return cret
92 }92 }
93 93
94 var xDbusErrorRegisterError func(glib.Quark, int, string) bool94 var xDbusErrorRegisterError func(glib.Quark, int, string) bool
@@ -100,8 +100,8 @@ var xDbusErrorRegisterError func(glib.Quark, int, string) bool
100 // an error domain.100 // an error domain.
101 func DbusErrorRegisterError(ErrorDomainVar glib.Quark, ErrorCodeVar int, DbusErrorNameVar string) bool {101 func DbusErrorRegisterError(ErrorDomainVar glib.Quark, ErrorCodeVar int, DbusErrorNameVar string) bool {
102 102
103- return xDbusErrorRegisterError(ErrorDomainVar, ErrorCodeVar, DbusErrorNameVar)103+ cret := xDbusErrorRegisterError(ErrorDomainVar, ErrorCodeVar, DbusErrorNameVar)
104-104+ return cret
105 }105 }
106 106
107 var xDbusErrorRegisterErrorDomain func(string, uint, uintptr, uint)107 var xDbusErrorRegisterErrorDomain func(string, uint, uintptr, uint)
@@ -126,8 +126,8 @@ var xDbusErrorStripRemoteError func(*glib.Error) bool
126 // This is typically used when presenting errors to the end user.126 // This is typically used when presenting errors to the end user.
127 func DbusErrorStripRemoteError(ErrorVar *glib.Error) bool {127 func DbusErrorStripRemoteError(ErrorVar *glib.Error) bool {
128 128
129- return xDbusErrorStripRemoteError(ErrorVar)129+ cret := xDbusErrorStripRemoteError(ErrorVar)
130-130+ return cret
131 }131 }
132 132
133 var xDbusErrorUnregisterError func(glib.Quark, int, string) bool133 var xDbusErrorUnregisterError func(glib.Quark, int, string) bool
@@ -135,8 +135,8 @@ var xDbusErrorUnregisterError func(glib.Quark, int, string) bool
135 // Destroys an association previously set up with g_dbus_error_register_error().135 // Destroys an association previously set up with g_dbus_error_register_error().
136 func DbusErrorUnregisterError(ErrorDomainVar glib.Quark, ErrorCodeVar int, DbusErrorNameVar string) bool {136 func DbusErrorUnregisterError(ErrorDomainVar glib.Quark, ErrorCodeVar int, DbusErrorNameVar string) bool {
137 137
138- return xDbusErrorUnregisterError(ErrorDomainVar, ErrorCodeVar, DbusErrorNameVar)138+ cret := xDbusErrorUnregisterError(ErrorDomainVar, ErrorCodeVar, DbusErrorNameVar)
139-139+ return cret
140 }140 }
141 141
142 func init() {142 func init() {
M v4/gio/gdbusinterface.go +19 -20
@@ -37,24 +37,24 @@ func (x *DBusInterfaceBase) SetGoPointer(ptr uintptr) {
37 37
38 // Gets the #GDBusObject that @interface_ belongs to, if any.38 // Gets the #GDBusObject that @interface_ belongs to, if any.
39 func (x *DBusInterfaceBase) DupObject() *DBusObjectBase {39 func (x *DBusInterfaceBase) DupObject() *DBusObjectBase {
40+ var cls *DBusObjectBase
40 41
41- DupObjectPtr := XGDbusInterfaceDupObject(x.GoPointer())42+ cret := XGDbusInterfaceDupObject(x.GoPointer())
42- if DupObjectPtr == 0 {
43- return nil
44- }
45-
46- DupObjectCls := &DBusObjectBase{}
47- DupObjectCls.Ptr = DupObjectPtr
48- return DupObjectCls
49 43
44+ if cret == 0 {
45+ return cls
46+ }
47+ cls = &DBusObjectBase{}
48+ cls.Ptr = cret
49+ return cls
50 }50 }
51 51
52 // Gets D-Bus introspection information for the D-Bus interface52 // Gets D-Bus introspection information for the D-Bus interface
53 // implemented by @interface_.53 // implemented by @interface_.
54 func (x *DBusInterfaceBase) GetInfo() *DBusInterfaceInfo {54 func (x *DBusInterfaceBase) GetInfo() *DBusInterfaceInfo {
55 55
56- return XGDbusInterfaceGetInfo(x.GoPointer())56+ cret := XGDbusInterfaceGetInfo(x.GoPointer())
57-57+ return cret
58 }58 }
59 59
60 // Gets the #GDBusObject that @interface_ belongs to, if any.60 // Gets the #GDBusObject that @interface_ belongs to, if any.
@@ -63,18 +63,17 @@ func (x *DBusInterfaceBase) GetInfo() *DBusInterfaceInfo {
63 // the returned object is being used from other threads. See63 // the returned object is being used from other threads. See
64 // g_dbus_interface_dup_object() for a thread-safe alternative.64 // g_dbus_interface_dup_object() for a thread-safe alternative.
65 func (x *DBusInterfaceBase) GetObject() *DBusObjectBase {65 func (x *DBusInterfaceBase) GetObject() *DBusObjectBase {
66+ var cls *DBusObjectBase
66 67
67- GetObjectPtr := XGDbusInterfaceGetObject(x.GoPointer())68+ cret := XGDbusInterfaceGetObject(x.GoPointer())
68- if GetObjectPtr == 0 {
69- return nil
70- }
71-
72- gobject.IncreaseRef(GetObjectPtr)
73-
74- GetObjectCls := &DBusObjectBase{}
75- GetObjectCls.Ptr = GetObjectPtr
76- return GetObjectCls
77 69
70+ if cret == 0 {
71+ return cls
72+ }
73+ gobject.IncreaseRef(cret)
74+ cls = &DBusObjectBase{}
75+ cls.Ptr = cret
76+ return cls
78 }77 }
79 78
80 // Sets the #GDBusObject for @interface_ to @object.79 // Sets the #GDBusObject for @interface_ to @object.
M v4/gio/gdbusinterfaceskeleton.go +48 -45
@@ -31,7 +31,7 @@ func DBusInterfaceSkeletonNewFromInternalPtr(ptr uintptr) *DBusInterfaceSkeleton
31 return cls31 return cls
32 }32 }
33 33
34-var xDBusInterfaceSkeletonExport func(uintptr, uintptr, string) bool34+var xDBusInterfaceSkeletonExport func(uintptr, uintptr, string, **glib.Error) bool
35 35
36 // Exports @interface_ at @object_path on @connection.36 // Exports @interface_ at @object_path on @connection.
37 //37 //
@@ -40,9 +40,14 @@ var xDBusInterfaceSkeletonExport func(uintptr, uintptr, string) bool
40 // the same for all connections.40 // the same for all connections.
41 //41 //
42 // Use g_dbus_interface_skeleton_unexport() to unexport the object.42 // Use g_dbus_interface_skeleton_unexport() to unexport the object.
43-func (x *DBusInterfaceSkeleton) Export(ConnectionVar *DBusConnection, ObjectPathVar string) bool {43+func (x *DBusInterfaceSkeleton) Export(ConnectionVar *DBusConnection, ObjectPathVar string) (bool, error) {
44+ var cerr *glib.Error
44 45
45- return xDBusInterfaceSkeletonExport(x.GoPointer(), ConnectionVar.GoPointer(), ObjectPathVar)46+ cret := xDBusInterfaceSkeletonExport(x.GoPointer(), ConnectionVar.GoPointer(), ObjectPathVar, &cerr)
47+ if cerr == nil {
48+ return cret, nil
49+ }
50+ return cret, cerr
46 51
47 }52 }
48 53
@@ -66,18 +71,17 @@ var xDBusInterfaceSkeletonGetConnection func(uintptr) uintptr
66 71
67 // Gets the first connection that @interface_ is exported on, if any.72 // Gets the first connection that @interface_ is exported on, if any.
68 func (x *DBusInterfaceSkeleton) GetConnection() *DBusConnection {73 func (x *DBusInterfaceSkeleton) GetConnection() *DBusConnection {
74+ var cls *DBusConnection
69 75
70- GetConnectionPtr := xDBusInterfaceSkeletonGetConnection(x.GoPointer())76+ cret := xDBusInterfaceSkeletonGetConnection(x.GoPointer())
71- if GetConnectionPtr == 0 {
72- return nil
73- }
74-
75- gobject.IncreaseRef(GetConnectionPtr)
76-
77- GetConnectionCls := &DBusConnection{}
78- GetConnectionCls.Ptr = GetConnectionPtr
79- return GetConnectionCls
80 77
78+ if cret == 0 {
79+ return cls
80+ }
81+ gobject.IncreaseRef(cret)
82+ cls = &DBusConnection{}
83+ cls.Ptr = cret
84+ return cls
81 }85 }
82 86
83 var xDBusInterfaceSkeletonGetConnections func(uintptr) *glib.List87 var xDBusInterfaceSkeletonGetConnections func(uintptr) *glib.List
@@ -85,8 +89,8 @@ var xDBusInterfaceSkeletonGetConnections func(uintptr) *glib.List
85 // Gets a list of the connections that @interface_ is exported on.89 // Gets a list of the connections that @interface_ is exported on.
86 func (x *DBusInterfaceSkeleton) GetConnections() *glib.List {90 func (x *DBusInterfaceSkeleton) GetConnections() *glib.List {
87 91
88- return xDBusInterfaceSkeletonGetConnections(x.GoPointer())92+ cret := xDBusInterfaceSkeletonGetConnections(x.GoPointer())
89-93+ return cret
90 }94 }
91 95
92 var xDBusInterfaceSkeletonGetFlags func(uintptr) DBusInterfaceSkeletonFlags96 var xDBusInterfaceSkeletonGetFlags func(uintptr) DBusInterfaceSkeletonFlags
@@ -95,8 +99,8 @@ var xDBusInterfaceSkeletonGetFlags func(uintptr) DBusInterfaceSkeletonFlags
95 // of @interface_99 // of @interface_
96 func (x *DBusInterfaceSkeleton) GetFlags() DBusInterfaceSkeletonFlags {100 func (x *DBusInterfaceSkeleton) GetFlags() DBusInterfaceSkeletonFlags {
97 101
98- return xDBusInterfaceSkeletonGetFlags(x.GoPointer())102+ cret := xDBusInterfaceSkeletonGetFlags(x.GoPointer())
99-103+ return cret
100 }104 }
101 105
102 var xDBusInterfaceSkeletonGetInfo func(uintptr) *DBusInterfaceInfo106 var xDBusInterfaceSkeletonGetInfo func(uintptr) *DBusInterfaceInfo
@@ -105,8 +109,8 @@ var xDBusInterfaceSkeletonGetInfo func(uintptr) *DBusInterfaceInfo
105 // implemented by @interface_.109 // implemented by @interface_.
106 func (x *DBusInterfaceSkeleton) GetInfo() *DBusInterfaceInfo {110 func (x *DBusInterfaceSkeleton) GetInfo() *DBusInterfaceInfo {
107 111
108- return xDBusInterfaceSkeletonGetInfo(x.GoPointer())112+ cret := xDBusInterfaceSkeletonGetInfo(x.GoPointer())
109-113+ return cret
110 }114 }
111 115
112 var xDBusInterfaceSkeletonGetObjectPath func(uintptr) string116 var xDBusInterfaceSkeletonGetObjectPath func(uintptr) string
@@ -114,8 +118,8 @@ var xDBusInterfaceSkeletonGetObjectPath func(uintptr) string
114 // Gets the object path that @interface_ is exported on, if any.118 // Gets the object path that @interface_ is exported on, if any.
115 func (x *DBusInterfaceSkeleton) GetObjectPath() string {119 func (x *DBusInterfaceSkeleton) GetObjectPath() string {
116 120
117- return xDBusInterfaceSkeletonGetObjectPath(x.GoPointer())121+ cret := xDBusInterfaceSkeletonGetObjectPath(x.GoPointer())
118-122+ return cret
119 }123 }
120 124
121 var xDBusInterfaceSkeletonGetProperties func(uintptr) *glib.Variant125 var xDBusInterfaceSkeletonGetProperties func(uintptr) *glib.Variant
@@ -123,8 +127,8 @@ var xDBusInterfaceSkeletonGetProperties func(uintptr) *glib.Variant
123 // Gets all D-Bus properties for @interface_.127 // Gets all D-Bus properties for @interface_.
124 func (x *DBusInterfaceSkeleton) GetProperties() *glib.Variant {128 func (x *DBusInterfaceSkeleton) GetProperties() *glib.Variant {
125 129
126- return xDBusInterfaceSkeletonGetProperties(x.GoPointer())130+ cret := xDBusInterfaceSkeletonGetProperties(x.GoPointer())
127-131+ return cret
128 }132 }
129 133
130 var xDBusInterfaceSkeletonGetVtable func(uintptr) *DBusInterfaceVTable134 var xDBusInterfaceSkeletonGetVtable func(uintptr) *DBusInterfaceVTable
@@ -134,8 +138,8 @@ var xDBusInterfaceSkeletonGetVtable func(uintptr) *DBusInterfaceVTable
134 // itself to be passed as @user_data.138 // itself to be passed as @user_data.
135 func (x *DBusInterfaceSkeleton) GetVtable() *DBusInterfaceVTable {139 func (x *DBusInterfaceSkeleton) GetVtable() *DBusInterfaceVTable {
136 140
137- return xDBusInterfaceSkeletonGetVtable(x.GoPointer())141+ cret := xDBusInterfaceSkeletonGetVtable(x.GoPointer())
138-142+ return cret
139 }143 }
140 144
141 var xDBusInterfaceSkeletonHasConnection func(uintptr, uintptr) bool145 var xDBusInterfaceSkeletonHasConnection func(uintptr, uintptr) bool
@@ -143,8 +147,8 @@ var xDBusInterfaceSkeletonHasConnection func(uintptr, uintptr) bool
143 // Checks if @interface_ is exported on @connection.147 // Checks if @interface_ is exported on @connection.
144 func (x *DBusInterfaceSkeleton) HasConnection(ConnectionVar *DBusConnection) bool {148 func (x *DBusInterfaceSkeleton) HasConnection(ConnectionVar *DBusConnection) bool {
145 149
146- return xDBusInterfaceSkeletonHasConnection(x.GoPointer(), ConnectionVar.GoPointer())150+ cret := xDBusInterfaceSkeletonHasConnection(x.GoPointer(), ConnectionVar.GoPointer())
147-151+ return cret
148 }152 }
149 153
150 var xDBusInterfaceSkeletonSetFlags func(uintptr, DBusInterfaceSkeletonFlags)154 var xDBusInterfaceSkeletonSetFlags func(uintptr, DBusInterfaceSkeletonFlags)
@@ -234,16 +238,16 @@ func (x *DBusInterfaceSkeleton) ConnectGAuthorizeMethod(cb func(DBusInterfaceSke
234 238
235 // Gets the #GDBusObject that @interface_ belongs to, if any.239 // Gets the #GDBusObject that @interface_ belongs to, if any.
236 func (x *DBusInterfaceSkeleton) DupObject() *DBusObjectBase {240 func (x *DBusInterfaceSkeleton) DupObject() *DBusObjectBase {
241+ var cls *DBusObjectBase
237 242
238- DupObjectPtr := XGDbusInterfaceDupObject(x.GoPointer())243+ cret := XGDbusInterfaceDupObject(x.GoPointer())
239- if DupObjectPtr == 0 {
240- return nil
241- }
242-
243- DupObjectCls := &DBusObjectBase{}
244- DupObjectCls.Ptr = DupObjectPtr
245- return DupObjectCls
246 244
245+ if cret == 0 {
246+ return cls
247+ }
248+ cls = &DBusObjectBase{}
249+ cls.Ptr = cret
250+ return cls
247 }251 }
248 252
249 // Gets the #GDBusObject that @interface_ belongs to, if any.253 // Gets the #GDBusObject that @interface_ belongs to, if any.
@@ -252,18 +256,17 @@ func (x *DBusInterfaceSkeleton) DupObject() *DBusObjectBase {
252 // the returned object is being used from other threads. See256 // the returned object is being used from other threads. See
253 // g_dbus_interface_dup_object() for a thread-safe alternative.257 // g_dbus_interface_dup_object() for a thread-safe alternative.
254 func (x *DBusInterfaceSkeleton) GetObject() *DBusObjectBase {258 func (x *DBusInterfaceSkeleton) GetObject() *DBusObjectBase {
259+ var cls *DBusObjectBase
255 260
256- GetObjectPtr := XGDbusInterfaceGetObject(x.GoPointer())261+ cret := XGDbusInterfaceGetObject(x.GoPointer())
257- if GetObjectPtr == 0 {
258- return nil
259- }
260-
261- gobject.IncreaseRef(GetObjectPtr)
262-
263- GetObjectCls := &DBusObjectBase{}
264- GetObjectCls.Ptr = GetObjectPtr
265- return GetObjectCls
266 262
263+ if cret == 0 {
264+ return cls
265+ }
266+ gobject.IncreaseRef(cret)
267+ cls = &DBusObjectBase{}
268+ cls.Ptr = cret
269+ return cls
267 }270 }
268 271
269 // Sets the #GDBusObject for @interface_ to @object.272 // Sets the #GDBusObject for @interface_ to @object.
M v4/gio/gdbusintrospection.go +12 -12
@@ -10,9 +10,9 @@ import (
10 type DBusAnnotationInfo struct {10 type DBusAnnotationInfo struct {
11 RefCount int3211 RefCount int32
12 12
13- Key string13+ Key uintptr
14 14
15- Value string15+ Value uintptr
16 16
17 Annotations uintptr17 Annotations uintptr
18 }18 }
@@ -21,9 +21,9 @@ type DBusAnnotationInfo struct {
21 type DBusArgInfo struct {21 type DBusArgInfo struct {
22 RefCount int3222 RefCount int32
23 23
24- Name string24+ Name uintptr
25 25
26- Signature string26+ Signature uintptr
27 27
28 Annotations uintptr28 Annotations uintptr
29 }29 }
@@ -32,7 +32,7 @@ type DBusArgInfo struct {
32 type DBusInterfaceInfo struct {32 type DBusInterfaceInfo struct {
33 RefCount int3233 RefCount int32
34 34
35- Name string35+ Name uintptr
36 36
37 Methods uintptr37 Methods uintptr
38 38
@@ -47,7 +47,7 @@ type DBusInterfaceInfo struct {
47 type DBusMethodInfo struct {47 type DBusMethodInfo struct {
48 RefCount int3248 RefCount int32
49 49
50- Name string50+ Name uintptr
51 51
52 InArgs uintptr52 InArgs uintptr
53 53
@@ -60,7 +60,7 @@ type DBusMethodInfo struct {
60 type DBusNodeInfo struct {60 type DBusNodeInfo struct {
61 RefCount int3261 RefCount int32
62 62
63- Path string63+ Path uintptr
64 64
65 Interfaces uintptr65 Interfaces uintptr
66 66
@@ -73,9 +73,9 @@ type DBusNodeInfo struct {
73 type DBusPropertyInfo struct {73 type DBusPropertyInfo struct {
74 RefCount int3274 RefCount int32
75 75
76- Name string76+ Name uintptr
77 77
78- Signature string78+ Signature uintptr
79 79
80 Flags DBusPropertyInfoFlags80 Flags DBusPropertyInfoFlags
81 81
@@ -86,7 +86,7 @@ type DBusPropertyInfo struct {
86 type DBusSignalInfo struct {86 type DBusSignalInfo struct {
87 RefCount int3287 RefCount int32
88 88
89- Name string89+ Name uintptr
90 90
91 Args uintptr91 Args uintptr
92 92
@@ -100,8 +100,8 @@ var xDbusAnnotationInfoLookup func(uintptr, string) string
100 // The cost of this function is O(n) in number of annotations.100 // The cost of this function is O(n) in number of annotations.
101 func DbusAnnotationInfoLookup(AnnotationsVar uintptr, NameVar string) string {101 func DbusAnnotationInfoLookup(AnnotationsVar uintptr, NameVar string) string {
102 102
103- return xDbusAnnotationInfoLookup(AnnotationsVar, NameVar)103+ cret := xDbusAnnotationInfoLookup(AnnotationsVar, NameVar)
104-104+ return cret
105 }105 }
106 106
107 func init() {107 func init() {
M v4/gio/gdbusnameowning.go +8 -8
@@ -70,8 +70,8 @@ var xBusOwnName func(BusType, string, BusNameOwnerFlags, uintptr, uintptr, uintp
70 // unregister the objects (if any) in @name_lost_handler.70 // unregister the objects (if any) in @name_lost_handler.
71 func BusOwnName(BusTypeVar BusType, NameVar string, FlagsVar BusNameOwnerFlags, BusAcquiredHandlerVar BusAcquiredCallback, NameAcquiredHandlerVar BusNameAcquiredCallback, NameLostHandlerVar BusNameLostCallback, UserDataVar uintptr, UserDataFreeFuncVar glib.DestroyNotify) uint {71 func BusOwnName(BusTypeVar BusType, NameVar string, FlagsVar BusNameOwnerFlags, BusAcquiredHandlerVar BusAcquiredCallback, NameAcquiredHandlerVar BusNameAcquiredCallback, NameLostHandlerVar BusNameLostCallback, UserDataVar uintptr, UserDataFreeFuncVar glib.DestroyNotify) uint {
72 72
73- return xBusOwnName(BusTypeVar, NameVar, FlagsVar, purego.NewCallback(BusAcquiredHandlerVar), purego.NewCallback(NameAcquiredHandlerVar), purego.NewCallback(NameLostHandlerVar), UserDataVar, purego.NewCallback(UserDataFreeFuncVar))73+ cret := xBusOwnName(BusTypeVar, NameVar, FlagsVar, purego.NewCallback(BusAcquiredHandlerVar), purego.NewCallback(NameAcquiredHandlerVar), purego.NewCallback(NameLostHandlerVar), UserDataVar, purego.NewCallback(UserDataFreeFuncVar))
74-74+ return cret
75 }75 }
76 76
77 var xBusOwnNameOnConnection func(uintptr, string, BusNameOwnerFlags, uintptr, uintptr, uintptr, uintptr) uint77 var xBusOwnNameOnConnection func(uintptr, string, BusNameOwnerFlags, uintptr, uintptr, uintptr, uintptr) uint
@@ -80,8 +80,8 @@ var xBusOwnNameOnConnection func(uintptr, string, BusNameOwnerFlags, uintptr, ui
80 // #GBusType.80 // #GBusType.
81 func BusOwnNameOnConnection(ConnectionVar *DBusConnection, NameVar string, FlagsVar BusNameOwnerFlags, NameAcquiredHandlerVar BusNameAcquiredCallback, NameLostHandlerVar BusNameLostCallback, UserDataVar uintptr, UserDataFreeFuncVar glib.DestroyNotify) uint {81 func BusOwnNameOnConnection(ConnectionVar *DBusConnection, NameVar string, FlagsVar BusNameOwnerFlags, NameAcquiredHandlerVar BusNameAcquiredCallback, NameLostHandlerVar BusNameLostCallback, UserDataVar uintptr, UserDataFreeFuncVar glib.DestroyNotify) uint {
82 82
83- return xBusOwnNameOnConnection(ConnectionVar.GoPointer(), NameVar, FlagsVar, purego.NewCallback(NameAcquiredHandlerVar), purego.NewCallback(NameLostHandlerVar), UserDataVar, purego.NewCallback(UserDataFreeFuncVar))83+ cret := xBusOwnNameOnConnection(ConnectionVar.GoPointer(), NameVar, FlagsVar, purego.NewCallback(NameAcquiredHandlerVar), purego.NewCallback(NameLostHandlerVar), UserDataVar, purego.NewCallback(UserDataFreeFuncVar))
84-84+ return cret
85 }85 }
86 86
87 var xBusOwnNameOnConnectionWithClosures func(uintptr, string, BusNameOwnerFlags, *gobject.Closure, *gobject.Closure) uint87 var xBusOwnNameOnConnectionWithClosures func(uintptr, string, BusNameOwnerFlags, *gobject.Closure, *gobject.Closure) uint
@@ -90,8 +90,8 @@ var xBusOwnNameOnConnectionWithClosures func(uintptr, string, BusNameOwnerFlags,
90 // callbacks for easier binding in other languages.90 // callbacks for easier binding in other languages.
91 func BusOwnNameOnConnectionWithClosures(ConnectionVar *DBusConnection, NameVar string, FlagsVar BusNameOwnerFlags, NameAcquiredClosureVar *gobject.Closure, NameLostClosureVar *gobject.Closure) uint {91 func BusOwnNameOnConnectionWithClosures(ConnectionVar *DBusConnection, NameVar string, FlagsVar BusNameOwnerFlags, NameAcquiredClosureVar *gobject.Closure, NameLostClosureVar *gobject.Closure) uint {
92 92
93- return xBusOwnNameOnConnectionWithClosures(ConnectionVar.GoPointer(), NameVar, FlagsVar, NameAcquiredClosureVar, NameLostClosureVar)93+ cret := xBusOwnNameOnConnectionWithClosures(ConnectionVar.GoPointer(), NameVar, FlagsVar, NameAcquiredClosureVar, NameLostClosureVar)
94-94+ return cret
95 }95 }
96 96
97 var xBusOwnNameWithClosures func(BusType, string, BusNameOwnerFlags, *gobject.Closure, *gobject.Closure, *gobject.Closure) uint97 var xBusOwnNameWithClosures func(BusType, string, BusNameOwnerFlags, *gobject.Closure, *gobject.Closure, *gobject.Closure) uint
@@ -100,8 +100,8 @@ var xBusOwnNameWithClosures func(BusType, string, BusNameOwnerFlags, *gobject.Cl
100 // easier binding in other languages.100 // easier binding in other languages.
101 func BusOwnNameWithClosures(BusTypeVar BusType, NameVar string, FlagsVar BusNameOwnerFlags, BusAcquiredClosureVar *gobject.Closure, NameAcquiredClosureVar *gobject.Closure, NameLostClosureVar *gobject.Closure) uint {101 func BusOwnNameWithClosures(BusTypeVar BusType, NameVar string, FlagsVar BusNameOwnerFlags, BusAcquiredClosureVar *gobject.Closure, NameAcquiredClosureVar *gobject.Closure, NameLostClosureVar *gobject.Closure) uint {
102 102
103- return xBusOwnNameWithClosures(BusTypeVar, NameVar, FlagsVar, BusAcquiredClosureVar, NameAcquiredClosureVar, NameLostClosureVar)103+ cret := xBusOwnNameWithClosures(BusTypeVar, NameVar, FlagsVar, BusAcquiredClosureVar, NameAcquiredClosureVar, NameLostClosureVar)
104-104+ return cret
105 }105 }
106 106
107 var xBusUnownName func(uint)107 var xBusUnownName func(uint)
M v4/gio/gdbusnamewatching.go +8 -8
@@ -67,8 +67,8 @@ var xBusWatchName func(BusType, string, BusNameWatcherFlags, uintptr, uintptr, u
67 // @name_vanished_handler.67 // @name_vanished_handler.
68 func BusWatchName(BusTypeVar BusType, NameVar string, FlagsVar BusNameWatcherFlags, NameAppearedHandlerVar BusNameAppearedCallback, NameVanishedHandlerVar BusNameVanishedCallback, UserDataVar uintptr, UserDataFreeFuncVar glib.DestroyNotify) uint {68 func BusWatchName(BusTypeVar BusType, NameVar string, FlagsVar BusNameWatcherFlags, NameAppearedHandlerVar BusNameAppearedCallback, NameVanishedHandlerVar BusNameVanishedCallback, UserDataVar uintptr, UserDataFreeFuncVar glib.DestroyNotify) uint {
69 69
70- return xBusWatchName(BusTypeVar, NameVar, FlagsVar, purego.NewCallback(NameAppearedHandlerVar), purego.NewCallback(NameVanishedHandlerVar), UserDataVar, purego.NewCallback(UserDataFreeFuncVar))70+ cret := xBusWatchName(BusTypeVar, NameVar, FlagsVar, purego.NewCallback(NameAppearedHandlerVar), purego.NewCallback(NameVanishedHandlerVar), UserDataVar, purego.NewCallback(UserDataFreeFuncVar))
71-71+ return cret
72 }72 }
73 73
74 var xBusWatchNameOnConnection func(uintptr, string, BusNameWatcherFlags, uintptr, uintptr, uintptr, uintptr) uint74 var xBusWatchNameOnConnection func(uintptr, string, BusNameWatcherFlags, uintptr, uintptr, uintptr, uintptr) uint
@@ -77,8 +77,8 @@ var xBusWatchNameOnConnection func(uintptr, string, BusNameWatcherFlags, uintptr
77 // #GBusType.77 // #GBusType.
78 func BusWatchNameOnConnection(ConnectionVar *DBusConnection, NameVar string, FlagsVar BusNameWatcherFlags, NameAppearedHandlerVar BusNameAppearedCallback, NameVanishedHandlerVar BusNameVanishedCallback, UserDataVar uintptr, UserDataFreeFuncVar glib.DestroyNotify) uint {78 func BusWatchNameOnConnection(ConnectionVar *DBusConnection, NameVar string, FlagsVar BusNameWatcherFlags, NameAppearedHandlerVar BusNameAppearedCallback, NameVanishedHandlerVar BusNameVanishedCallback, UserDataVar uintptr, UserDataFreeFuncVar glib.DestroyNotify) uint {
79 79
80- return xBusWatchNameOnConnection(ConnectionVar.GoPointer(), NameVar, FlagsVar, purego.NewCallback(NameAppearedHandlerVar), purego.NewCallback(NameVanishedHandlerVar), UserDataVar, purego.NewCallback(UserDataFreeFuncVar))80+ cret := xBusWatchNameOnConnection(ConnectionVar.GoPointer(), NameVar, FlagsVar, purego.NewCallback(NameAppearedHandlerVar), purego.NewCallback(NameVanishedHandlerVar), UserDataVar, purego.NewCallback(UserDataFreeFuncVar))
81-81+ return cret
82 }82 }
83 83
84 var xBusWatchNameOnConnectionWithClosures func(uintptr, string, BusNameWatcherFlags, *gobject.Closure, *gobject.Closure) uint84 var xBusWatchNameOnConnectionWithClosures func(uintptr, string, BusNameWatcherFlags, *gobject.Closure, *gobject.Closure) uint
@@ -87,8 +87,8 @@ var xBusWatchNameOnConnectionWithClosures func(uintptr, string, BusNameWatcherFl
87 // easier binding in other languages.87 // easier binding in other languages.
88 func BusWatchNameOnConnectionWithClosures(ConnectionVar *DBusConnection, NameVar string, FlagsVar BusNameWatcherFlags, NameAppearedClosureVar *gobject.Closure, NameVanishedClosureVar *gobject.Closure) uint {88 func BusWatchNameOnConnectionWithClosures(ConnectionVar *DBusConnection, NameVar string, FlagsVar BusNameWatcherFlags, NameAppearedClosureVar *gobject.Closure, NameVanishedClosureVar *gobject.Closure) uint {
89 89
90- return xBusWatchNameOnConnectionWithClosures(ConnectionVar.GoPointer(), NameVar, FlagsVar, NameAppearedClosureVar, NameVanishedClosureVar)90+ cret := xBusWatchNameOnConnectionWithClosures(ConnectionVar.GoPointer(), NameVar, FlagsVar, NameAppearedClosureVar, NameVanishedClosureVar)
91-91+ return cret
92 }92 }
93 93
94 var xBusWatchNameWithClosures func(BusType, string, BusNameWatcherFlags, *gobject.Closure, *gobject.Closure) uint94 var xBusWatchNameWithClosures func(BusType, string, BusNameWatcherFlags, *gobject.Closure, *gobject.Closure) uint
@@ -97,8 +97,8 @@ var xBusWatchNameWithClosures func(BusType, string, BusNameWatcherFlags, *gobjec
97 // easier binding in other languages.97 // easier binding in other languages.
98 func BusWatchNameWithClosures(BusTypeVar BusType, NameVar string, FlagsVar BusNameWatcherFlags, NameAppearedClosureVar *gobject.Closure, NameVanishedClosureVar *gobject.Closure) uint {98 func BusWatchNameWithClosures(BusTypeVar BusType, NameVar string, FlagsVar BusNameWatcherFlags, NameAppearedClosureVar *gobject.Closure, NameVanishedClosureVar *gobject.Closure) uint {
99 99
100- return xBusWatchNameWithClosures(BusTypeVar, NameVar, FlagsVar, NameAppearedClosureVar, NameVanishedClosureVar)100+ cret := xBusWatchNameWithClosures(BusTypeVar, NameVar, FlagsVar, NameAppearedClosureVar, NameVanishedClosureVar)
101-101+ return cret
102 }102 }
103 103
104 func init() {104 func init() {
M v4/gio/gdbusobject.go +12 -12
@@ -38,30 +38,30 @@ func (x *DBusObjectBase) SetGoPointer(ptr uintptr) {
38 // Gets the D-Bus interface with name @interface_name associated with38 // Gets the D-Bus interface with name @interface_name associated with
39 // @object, if any.39 // @object, if any.
40 func (x *DBusObjectBase) GetInterface(InterfaceNameVar string) *DBusInterfaceBase {40 func (x *DBusObjectBase) GetInterface(InterfaceNameVar string) *DBusInterfaceBase {
41+ var cls *DBusInterfaceBase
41 42
42- GetInterfacePtr := XGDbusObjectGetInterface(x.GoPointer(), InterfaceNameVar)43+ cret := XGDbusObjectGetInterface(x.GoPointer(), InterfaceNameVar)
43- if GetInterfacePtr == 0 {
44- return nil
45- }
46-
47- GetInterfaceCls := &DBusInterfaceBase{}
48- GetInterfaceCls.Ptr = GetInterfacePtr
49- return GetInterfaceCls
50 44
45+ if cret == 0 {
46+ return cls
47+ }
48+ cls = &DBusInterfaceBase{}
49+ cls.Ptr = cret
50+ return cls
51 }51 }
52 52
53 // Gets the D-Bus interfaces associated with @object.53 // Gets the D-Bus interfaces associated with @object.
54 func (x *DBusObjectBase) GetInterfaces() *glib.List {54 func (x *DBusObjectBase) GetInterfaces() *glib.List {
55 55
56- return XGDbusObjectGetInterfaces(x.GoPointer())56+ cret := XGDbusObjectGetInterfaces(x.GoPointer())
57-57+ return cret
58 }58 }
59 59
60 // Gets the object path for @object.60 // Gets the object path for @object.
61 func (x *DBusObjectBase) GetObjectPath() string {61 func (x *DBusObjectBase) GetObjectPath() string {
62 62
63- return XGDbusObjectGetObjectPath(x.GoPointer())63+ cret := XGDbusObjectGetObjectPath(x.GoPointer())
64-64+ return cret
65 }65 }
66 66
67 var XGDbusObjectGetInterface func(uintptr, string) uintptr67 var XGDbusObjectGetInterface func(uintptr, string) uintptr
M v4/gio/gdbusobjectmanager.go +20 -20
@@ -42,44 +42,44 @@ func (x *DBusObjectManagerBase) SetGoPointer(ptr uintptr) {
42 // Gets the interface proxy for @interface_name at @object_path, if42 // Gets the interface proxy for @interface_name at @object_path, if
43 // any.43 // any.
44 func (x *DBusObjectManagerBase) GetInterface(ObjectPathVar string, InterfaceNameVar string) *DBusInterfaceBase {44 func (x *DBusObjectManagerBase) GetInterface(ObjectPathVar string, InterfaceNameVar string) *DBusInterfaceBase {
45+ var cls *DBusInterfaceBase
45 46
46- GetInterfacePtr := XGDbusObjectManagerGetInterface(x.GoPointer(), ObjectPathVar, InterfaceNameVar)47+ cret := XGDbusObjectManagerGetInterface(x.GoPointer(), ObjectPathVar, InterfaceNameVar)
47- if GetInterfacePtr == 0 {
48- return nil
49- }
50-
51- GetInterfaceCls := &DBusInterfaceBase{}
52- GetInterfaceCls.Ptr = GetInterfacePtr
53- return GetInterfaceCls
54 48
49+ if cret == 0 {
50+ return cls
51+ }
52+ cls = &DBusInterfaceBase{}
53+ cls.Ptr = cret
54+ return cls
55 }55 }
56 56
57 // Gets the #GDBusObject at @object_path, if any.57 // Gets the #GDBusObject at @object_path, if any.
58 func (x *DBusObjectManagerBase) GetObject(ObjectPathVar string) *DBusObjectBase {58 func (x *DBusObjectManagerBase) GetObject(ObjectPathVar string) *DBusObjectBase {
59+ var cls *DBusObjectBase
59 60
60- GetObjectPtr := XGDbusObjectManagerGetObject(x.GoPointer(), ObjectPathVar)61+ cret := XGDbusObjectManagerGetObject(x.GoPointer(), ObjectPathVar)
61- if GetObjectPtr == 0 {
62- return nil
63- }
64-
65- GetObjectCls := &DBusObjectBase{}
66- GetObjectCls.Ptr = GetObjectPtr
67- return GetObjectCls
68 62
63+ if cret == 0 {
64+ return cls
65+ }
66+ cls = &DBusObjectBase{}
67+ cls.Ptr = cret
68+ return cls
69 }69 }
70 70
71 // Gets the object path that @manager is for.71 // Gets the object path that @manager is for.
72 func (x *DBusObjectManagerBase) GetObjectPath() string {72 func (x *DBusObjectManagerBase) GetObjectPath() string {
73 73
74- return XGDbusObjectManagerGetObjectPath(x.GoPointer())74+ cret := XGDbusObjectManagerGetObjectPath(x.GoPointer())
75-75+ return cret
76 }76 }
77 77
78 // Gets all #GDBusObject objects known to @manager.78 // Gets all #GDBusObject objects known to @manager.
79 func (x *DBusObjectManagerBase) GetObjects() *glib.List {79 func (x *DBusObjectManagerBase) GetObjects() *glib.List {
80 80
81- return XGDbusObjectManagerGetObjects(x.GoPointer())81+ cret := XGDbusObjectManagerGetObjects(x.GoPointer())
82-82+ return cret
83 }83 }
84 84
85 var XGDbusObjectManagerGetInterface func(uintptr, string, string) uintptr85 var XGDbusObjectManagerGetInterface func(uintptr, string, string) uintptr
M v4/gio/gdbusobjectmanagerclient.go +122 -80
@@ -103,35 +103,49 @@ func DBusObjectManagerClientNewFromInternalPtr(ptr uintptr) *DBusObjectManagerCl
103 return cls103 return cls
104 }104 }
105 105
106-var xNewFinishDBusObjectManagerClient func(uintptr) uintptr106+var xNewFinishDBusObjectManagerClient func(uintptr, **glib.Error) uintptr
107 107
108 // Finishes an operation started with g_dbus_object_manager_client_new().108 // Finishes an operation started with g_dbus_object_manager_client_new().
109-func NewFinishDBusObjectManagerClient(ResVar AsyncResult) *DBusObjectManagerClient {109+func NewFinishDBusObjectManagerClient(ResVar AsyncResult) (*DBusObjectManagerClient, error) {
110- NewFinishDBusObjectManagerClientPtr := xNewFinishDBusObjectManagerClient(ResVar.GoPointer())110+ var cls *DBusObjectManagerClient
111- if NewFinishDBusObjectManagerClientPtr == 0 {111+ var cerr *glib.Error
112- return nil112+
113+ cret := xNewFinishDBusObjectManagerClient(ResVar.GoPointer(), &cerr)
114+
115+ if cret == 0 {
116+ return cls, cerr
117+ }
118+ cls = &DBusObjectManagerClient{}
119+ cls.Ptr = cret
120+ if cerr == nil {
121+ return cls, nil
113 }122 }
123+ return cls, cerr
114 124
115- NewFinishDBusObjectManagerClientCls := &DBusObjectManagerClient{}
116- NewFinishDBusObjectManagerClientCls.Ptr = NewFinishDBusObjectManagerClientPtr
117- return NewFinishDBusObjectManagerClientCls
118 }125 }
119 126
120-var xNewForBusFinishDBusObjectManagerClient func(uintptr) uintptr127+var xNewForBusFinishDBusObjectManagerClient func(uintptr, **glib.Error) uintptr
121 128
122 // Finishes an operation started with g_dbus_object_manager_client_new_for_bus().129 // Finishes an operation started with g_dbus_object_manager_client_new_for_bus().
123-func NewForBusFinishDBusObjectManagerClient(ResVar AsyncResult) *DBusObjectManagerClient {130+func NewForBusFinishDBusObjectManagerClient(ResVar AsyncResult) (*DBusObjectManagerClient, error) {
124- NewForBusFinishDBusObjectManagerClientPtr := xNewForBusFinishDBusObjectManagerClient(ResVar.GoPointer())131+ var cls *DBusObjectManagerClient
125- if NewForBusFinishDBusObjectManagerClientPtr == 0 {132+ var cerr *glib.Error
126- return nil133+
134+ cret := xNewForBusFinishDBusObjectManagerClient(ResVar.GoPointer(), &cerr)
135+
136+ if cret == 0 {
137+ return cls, cerr
127 }138 }
139+ cls = &DBusObjectManagerClient{}
140+ cls.Ptr = cret
141+ if cerr == nil {
142+ return cls, nil
143+ }
144+ return cls, cerr
128 145
129- NewForBusFinishDBusObjectManagerClientCls := &DBusObjectManagerClient{}
130- NewForBusFinishDBusObjectManagerClientCls.Ptr = NewForBusFinishDBusObjectManagerClientPtr
131- return NewForBusFinishDBusObjectManagerClientCls
132 }146 }
133 147
134-var xNewForBusSyncDBusObjectManagerClient func(BusType, DBusObjectManagerClientFlags, string, string, uintptr, uintptr, uintptr, uintptr) uintptr148+var xNewForBusSyncDBusObjectManagerClient func(BusType, DBusObjectManagerClientFlags, string, string, uintptr, uintptr, uintptr, uintptr, **glib.Error) uintptr
135 149
136 // Like g_dbus_object_manager_client_new_sync() but takes a #GBusType instead150 // Like g_dbus_object_manager_client_new_sync() but takes a #GBusType instead
137 // of a #GDBusConnection.151 // of a #GDBusConnection.
@@ -139,51 +153,64 @@ var xNewForBusSyncDBusObjectManagerClient func(BusType, DBusObjectManagerClientF
139 // This is a synchronous failable constructor - the calling thread is153 // This is a synchronous failable constructor - the calling thread is
140 // blocked until a reply is received. See g_dbus_object_manager_client_new_for_bus()154 // blocked until a reply is received. See g_dbus_object_manager_client_new_for_bus()
141 // for the asynchronous version.155 // for the asynchronous version.
142-func NewForBusSyncDBusObjectManagerClient(BusTypeVar BusType, FlagsVar DBusObjectManagerClientFlags, NameVar string, ObjectPathVar string, GetProxyTypeFuncVar DBusProxyTypeFunc, GetProxyTypeUserDataVar uintptr, GetProxyTypeDestroyNotifyVar glib.DestroyNotify, CancellableVar *Cancellable) *DBusObjectManagerClient {156+func NewForBusSyncDBusObjectManagerClient(BusTypeVar BusType, FlagsVar DBusObjectManagerClientFlags, NameVar string, ObjectPathVar string, GetProxyTypeFuncVar DBusProxyTypeFunc, GetProxyTypeUserDataVar uintptr, GetProxyTypeDestroyNotifyVar glib.DestroyNotify, CancellableVar *Cancellable) (*DBusObjectManagerClient, error) {
143- NewForBusSyncDBusObjectManagerClientPtr := xNewForBusSyncDBusObjectManagerClient(BusTypeVar, FlagsVar, NameVar, ObjectPathVar, purego.NewCallback(GetProxyTypeFuncVar), GetProxyTypeUserDataVar, purego.NewCallback(GetProxyTypeDestroyNotifyVar), CancellableVar.GoPointer())157+ var cls *DBusObjectManagerClient
144- if NewForBusSyncDBusObjectManagerClientPtr == 0 {158+ var cerr *glib.Error
145- return nil159+
160+ cret := xNewForBusSyncDBusObjectManagerClient(BusTypeVar, FlagsVar, NameVar, ObjectPathVar, purego.NewCallback(GetProxyTypeFuncVar), GetProxyTypeUserDataVar, purego.NewCallback(GetProxyTypeDestroyNotifyVar), CancellableVar.GoPointer(), &cerr)
161+
162+ if cret == 0 {
163+ return cls, cerr
164+ }
165+ cls = &DBusObjectManagerClient{}
166+ cls.Ptr = cret
167+ if cerr == nil {
168+ return cls, nil
146 }169 }
170+ return cls, cerr
147 171
148- NewForBusSyncDBusObjectManagerClientCls := &DBusObjectManagerClient{}
149- NewForBusSyncDBusObjectManagerClientCls.Ptr = NewForBusSyncDBusObjectManagerClientPtr
150- return NewForBusSyncDBusObjectManagerClientCls
151 }172 }
152 173
153-var xNewSyncDBusObjectManagerClient func(uintptr, DBusObjectManagerClientFlags, string, string, uintptr, uintptr, uintptr, uintptr) uintptr174+var xNewSyncDBusObjectManagerClient func(uintptr, DBusObjectManagerClientFlags, string, string, uintptr, uintptr, uintptr, uintptr, **glib.Error) uintptr
154 175
155 // Creates a new #GDBusObjectManagerClient object.176 // Creates a new #GDBusObjectManagerClient object.
156 //177 //
157 // This is a synchronous failable constructor - the calling thread is178 // This is a synchronous failable constructor - the calling thread is
158 // blocked until a reply is received. See g_dbus_object_manager_client_new()179 // blocked until a reply is received. See g_dbus_object_manager_client_new()
159 // for the asynchronous version.180 // for the asynchronous version.
160-func NewSyncDBusObjectManagerClient(ConnectionVar *DBusConnection, FlagsVar DBusObjectManagerClientFlags, NameVar string, ObjectPathVar string, GetProxyTypeFuncVar DBusProxyTypeFunc, GetProxyTypeUserDataVar uintptr, GetProxyTypeDestroyNotifyVar glib.DestroyNotify, CancellableVar *Cancellable) *DBusObjectManagerClient {181+func NewSyncDBusObjectManagerClient(ConnectionVar *DBusConnection, FlagsVar DBusObjectManagerClientFlags, NameVar string, ObjectPathVar string, GetProxyTypeFuncVar DBusProxyTypeFunc, GetProxyTypeUserDataVar uintptr, GetProxyTypeDestroyNotifyVar glib.DestroyNotify, CancellableVar *Cancellable) (*DBusObjectManagerClient, error) {
161- NewSyncDBusObjectManagerClientPtr := xNewSyncDBusObjectManagerClient(ConnectionVar.GoPointer(), FlagsVar, NameVar, ObjectPathVar, purego.NewCallback(GetProxyTypeFuncVar), GetProxyTypeUserDataVar, purego.NewCallback(GetProxyTypeDestroyNotifyVar), CancellableVar.GoPointer())182+ var cls *DBusObjectManagerClient
162- if NewSyncDBusObjectManagerClientPtr == 0 {183+ var cerr *glib.Error
163- return nil184+
185+ cret := xNewSyncDBusObjectManagerClient(ConnectionVar.GoPointer(), FlagsVar, NameVar, ObjectPathVar, purego.NewCallback(GetProxyTypeFuncVar), GetProxyTypeUserDataVar, purego.NewCallback(GetProxyTypeDestroyNotifyVar), CancellableVar.GoPointer(), &cerr)
186+
187+ if cret == 0 {
188+ return cls, cerr
189+ }
190+ cls = &DBusObjectManagerClient{}
191+ cls.Ptr = cret
192+ if cerr == nil {
193+ return cls, nil
164 }194 }
195+ return cls, cerr
165 196
166- NewSyncDBusObjectManagerClientCls := &DBusObjectManagerClient{}
167- NewSyncDBusObjectManagerClientCls.Ptr = NewSyncDBusObjectManagerClientPtr
168- return NewSyncDBusObjectManagerClientCls
169 }197 }
170 198
171 var xDBusObjectManagerClientGetConnection func(uintptr) uintptr199 var xDBusObjectManagerClientGetConnection func(uintptr) uintptr
172 200
173 // Gets the #GDBusConnection used by @manager.201 // Gets the #GDBusConnection used by @manager.
174 func (x *DBusObjectManagerClient) GetConnection() *DBusConnection {202 func (x *DBusObjectManagerClient) GetConnection() *DBusConnection {
203+ var cls *DBusConnection
175 204
176- GetConnectionPtr := xDBusObjectManagerClientGetConnection(x.GoPointer())205+ cret := xDBusObjectManagerClientGetConnection(x.GoPointer())
177- if GetConnectionPtr == 0 {
178- return nil
179- }
180-
181- gobject.IncreaseRef(GetConnectionPtr)
182-
183- GetConnectionCls := &DBusConnection{}
184- GetConnectionCls.Ptr = GetConnectionPtr
185- return GetConnectionCls
186 206
207+ if cret == 0 {
208+ return cls
209+ }
210+ gobject.IncreaseRef(cret)
211+ cls = &DBusConnection{}
212+ cls.Ptr = cret
213+ return cls
187 }214 }
188 215
189 var xDBusObjectManagerClientGetFlags func(uintptr) DBusObjectManagerClientFlags216 var xDBusObjectManagerClientGetFlags func(uintptr) DBusObjectManagerClientFlags
@@ -191,8 +218,8 @@ var xDBusObjectManagerClientGetFlags func(uintptr) DBusObjectManagerClientFlags
191 // Gets the flags that @manager was constructed with.218 // Gets the flags that @manager was constructed with.
192 func (x *DBusObjectManagerClient) GetFlags() DBusObjectManagerClientFlags {219 func (x *DBusObjectManagerClient) GetFlags() DBusObjectManagerClientFlags {
193 220
194- return xDBusObjectManagerClientGetFlags(x.GoPointer())221+ cret := xDBusObjectManagerClientGetFlags(x.GoPointer())
195-222+ return cret
196 }223 }
197 224
198 var xDBusObjectManagerClientGetName func(uintptr) string225 var xDBusObjectManagerClientGetName func(uintptr) string
@@ -201,8 +228,8 @@ var xDBusObjectManagerClientGetName func(uintptr) string
201 // connection.228 // connection.
202 func (x *DBusObjectManagerClient) GetName() string {229 func (x *DBusObjectManagerClient) GetName() string {
203 230
204- return xDBusObjectManagerClientGetName(x.GoPointer())231+ cret := xDBusObjectManagerClientGetName(x.GoPointer())
205-232+ return cret
206 }233 }
207 234
208 var xDBusObjectManagerClientGetNameOwner func(uintptr) string235 var xDBusObjectManagerClientGetNameOwner func(uintptr) string
@@ -213,8 +240,8 @@ var xDBusObjectManagerClientGetNameOwner func(uintptr) string
213 // #GDBusObjectManagerClient:name-owner property.240 // #GDBusObjectManagerClient:name-owner property.
214 func (x *DBusObjectManagerClient) GetNameOwner() string {241 func (x *DBusObjectManagerClient) GetNameOwner() string {
215 242
216- return xDBusObjectManagerClientGetNameOwner(x.GoPointer())243+ cret := xDBusObjectManagerClientGetNameOwner(x.GoPointer())
217-244+ return cret
218 }245 }
219 246
220 func (c *DBusObjectManagerClient) GoPointer() uintptr {247 func (c *DBusObjectManagerClient) GoPointer() uintptr {
@@ -310,68 +337,78 @@ func (x *DBusObjectManagerClient) InitAsync(IoPriorityVar int, CancellableVar *C
310 337
311 // Finishes asynchronous initialization and returns the result.338 // Finishes asynchronous initialization and returns the result.
312 // See g_async_initable_init_async().339 // See g_async_initable_init_async().
313-func (x *DBusObjectManagerClient) InitFinish(ResVar AsyncResult) bool {340+func (x *DBusObjectManagerClient) InitFinish(ResVar AsyncResult) (bool, error) {
341+ var cerr *glib.Error
314 342
315- return XGAsyncInitableInitFinish(x.GoPointer(), ResVar.GoPointer())343+ cret := XGAsyncInitableInitFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
344+ if cerr == nil {
345+ return cret, nil
346+ }
347+ return cret, cerr
316 348
317 }349 }
318 350
319 // Finishes the async construction for the various g_async_initable_new351 // Finishes the async construction for the various g_async_initable_new
320 // calls, returning the created object or %NULL on error.352 // calls, returning the created object or %NULL on error.
321-func (x *DBusObjectManagerClient) NewFinish(ResVar AsyncResult) *gobject.Object {353+func (x *DBusObjectManagerClient) NewFinish(ResVar AsyncResult) (*gobject.Object, error) {
354+ var cls *gobject.Object
355+ var cerr *glib.Error
322 356
323- NewFinishPtr := XGAsyncInitableNewFinish(x.GoPointer(), ResVar.GoPointer())357+ cret := XGAsyncInitableNewFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
324- if NewFinishPtr == 0 {
325- return nil
326- }
327 358
328- NewFinishCls := &gobject.Object{}359+ if cret == 0 {
329- NewFinishCls.Ptr = NewFinishPtr360+ return cls, cerr
330- return NewFinishCls361+ }
362+ cls = &gobject.Object{}
363+ cls.Ptr = cret
364+ if cerr == nil {
365+ return cls, nil
366+ }
367+ return cls, cerr
331 368
332 }369 }
333 370
334 // Gets the interface proxy for @interface_name at @object_path, if371 // Gets the interface proxy for @interface_name at @object_path, if
335 // any.372 // any.
336 func (x *DBusObjectManagerClient) GetInterface(ObjectPathVar string, InterfaceNameVar string) *DBusInterfaceBase {373 func (x *DBusObjectManagerClient) GetInterface(ObjectPathVar string, InterfaceNameVar string) *DBusInterfaceBase {
374+ var cls *DBusInterfaceBase
337 375
338- GetInterfacePtr := XGDbusObjectManagerGetInterface(x.GoPointer(), ObjectPathVar, InterfaceNameVar)376+ cret := XGDbusObjectManagerGetInterface(x.GoPointer(), ObjectPathVar, InterfaceNameVar)
339- if GetInterfacePtr == 0 {
340- return nil
341- }
342-
343- GetInterfaceCls := &DBusInterfaceBase{}
344- GetInterfaceCls.Ptr = GetInterfacePtr
345- return GetInterfaceCls
346 377
378+ if cret == 0 {
379+ return cls
380+ }
381+ cls = &DBusInterfaceBase{}
382+ cls.Ptr = cret
383+ return cls
347 }384 }
348 385
349 // Gets the #GDBusObject at @object_path, if any.386 // Gets the #GDBusObject at @object_path, if any.
350 func (x *DBusObjectManagerClient) GetObject(ObjectPathVar string) *DBusObjectBase {387 func (x *DBusObjectManagerClient) GetObject(ObjectPathVar string) *DBusObjectBase {
388+ var cls *DBusObjectBase
351 389
352- GetObjectPtr := XGDbusObjectManagerGetObject(x.GoPointer(), ObjectPathVar)390+ cret := XGDbusObjectManagerGetObject(x.GoPointer(), ObjectPathVar)
353- if GetObjectPtr == 0 {
354- return nil
355- }
356-
357- GetObjectCls := &DBusObjectBase{}
358- GetObjectCls.Ptr = GetObjectPtr
359- return GetObjectCls
360 391
392+ if cret == 0 {
393+ return cls
394+ }
395+ cls = &DBusObjectBase{}
396+ cls.Ptr = cret
397+ return cls
361 }398 }
362 399
363 // Gets the object path that @manager is for.400 // Gets the object path that @manager is for.
364 func (x *DBusObjectManagerClient) GetObjectPath() string {401 func (x *DBusObjectManagerClient) GetObjectPath() string {
365 402
366- return XGDbusObjectManagerGetObjectPath(x.GoPointer())403+ cret := XGDbusObjectManagerGetObjectPath(x.GoPointer())
367-404+ return cret
368 }405 }
369 406
370 // Gets all #GDBusObject objects known to @manager.407 // Gets all #GDBusObject objects known to @manager.
371 func (x *DBusObjectManagerClient) GetObjects() *glib.List {408 func (x *DBusObjectManagerClient) GetObjects() *glib.List {
372 409
373- return XGDbusObjectManagerGetObjects(x.GoPointer())410+ cret := XGDbusObjectManagerGetObjects(x.GoPointer())
374-411+ return cret
375 }412 }
376 413
377 // Initializes the object implementing the interface.414 // Initializes the object implementing the interface.
@@ -412,9 +449,14 @@ func (x *DBusObjectManagerClient) GetObjects() *glib.List {
412 // In this pattern, a caller would expect to be able to call g_initable_init()449 // In this pattern, a caller would expect to be able to call g_initable_init()
413 // on the result of g_object_new(), regardless of whether it is in fact a new450 // on the result of g_object_new(), regardless of whether it is in fact a new
414 // instance.451 // instance.
415-func (x *DBusObjectManagerClient) Init(CancellableVar *Cancellable) bool {452+func (x *DBusObjectManagerClient) Init(CancellableVar *Cancellable) (bool, error) {
453+ var cerr *glib.Error
416 454
417- return XGInitableInit(x.GoPointer(), CancellableVar.GoPointer())455+ cret := XGInitableInit(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
456+ if cerr == nil {
457+ return cret, nil
458+ }
459+ return cret, cerr
418 460
419 }461 }
420 462
M v4/gio/gdbusobjectmanagerserver.go +41 -39
@@ -60,14 +60,16 @@ var xNewDBusObjectManagerServer func(string) uintptr
60 // [InterfacesAdded](http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager)60 // [InterfacesAdded](http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager)
61 // signals being emitted.61 // signals being emitted.
62 func NewDBusObjectManagerServer(ObjectPathVar string) *DBusObjectManagerServer {62 func NewDBusObjectManagerServer(ObjectPathVar string) *DBusObjectManagerServer {
63- NewDBusObjectManagerServerPtr := xNewDBusObjectManagerServer(ObjectPathVar)63+ var cls *DBusObjectManagerServer
64- if NewDBusObjectManagerServerPtr == 0 {64+
65- return nil65+ cret := xNewDBusObjectManagerServer(ObjectPathVar)
66- }
67 66
68- NewDBusObjectManagerServerCls := &DBusObjectManagerServer{}67+ if cret == 0 {
69- NewDBusObjectManagerServerCls.Ptr = NewDBusObjectManagerServerPtr68+ return cls
70- return NewDBusObjectManagerServerCls69+ }
70+ cls = &DBusObjectManagerServer{}
71+ cls.Ptr = cret
72+ return cls
71 }73 }
72 74
73 var xDBusObjectManagerServerExport func(uintptr, uintptr)75 var xDBusObjectManagerServerExport func(uintptr, uintptr)
@@ -104,16 +106,16 @@ var xDBusObjectManagerServerGetConnection func(uintptr) uintptr
104 106
105 // Gets the #GDBusConnection used by @manager.107 // Gets the #GDBusConnection used by @manager.
106 func (x *DBusObjectManagerServer) GetConnection() *DBusConnection {108 func (x *DBusObjectManagerServer) GetConnection() *DBusConnection {
109+ var cls *DBusConnection
107 110
108- GetConnectionPtr := xDBusObjectManagerServerGetConnection(x.GoPointer())111+ cret := xDBusObjectManagerServerGetConnection(x.GoPointer())
109- if GetConnectionPtr == 0 {
110- return nil
111- }
112-
113- GetConnectionCls := &DBusConnection{}
114- GetConnectionCls.Ptr = GetConnectionPtr
115- return GetConnectionCls
116 112
113+ if cret == 0 {
114+ return cls
115+ }
116+ cls = &DBusConnection{}
117+ cls.Ptr = cret
118+ return cls
117 }119 }
118 120
119 var xDBusObjectManagerServerIsExported func(uintptr, uintptr) bool121 var xDBusObjectManagerServerIsExported func(uintptr, uintptr) bool
@@ -121,8 +123,8 @@ var xDBusObjectManagerServerIsExported func(uintptr, uintptr) bool
121 // Returns whether @object is currently exported on @manager.123 // Returns whether @object is currently exported on @manager.
122 func (x *DBusObjectManagerServer) IsExported(ObjectVar *DBusObjectSkeleton) bool {124 func (x *DBusObjectManagerServer) IsExported(ObjectVar *DBusObjectSkeleton) bool {
123 125
124- return xDBusObjectManagerServerIsExported(x.GoPointer(), ObjectVar.GoPointer())126+ cret := xDBusObjectManagerServerIsExported(x.GoPointer(), ObjectVar.GoPointer())
125-127+ return cret
126 }128 }
127 129
128 var xDBusObjectManagerServerSetConnection func(uintptr, uintptr)130 var xDBusObjectManagerServerSetConnection func(uintptr, uintptr)
@@ -144,8 +146,8 @@ var xDBusObjectManagerServerUnexport func(uintptr, string) bool
144 // object path for @manager.146 // object path for @manager.
145 func (x *DBusObjectManagerServer) Unexport(ObjectPathVar string) bool {147 func (x *DBusObjectManagerServer) Unexport(ObjectPathVar string) bool {
146 148
147- return xDBusObjectManagerServerUnexport(x.GoPointer(), ObjectPathVar)149+ cret := xDBusObjectManagerServerUnexport(x.GoPointer(), ObjectPathVar)
148-150+ return cret
149 }151 }
150 152
151 func (c *DBusObjectManagerServer) GoPointer() uintptr {153 func (c *DBusObjectManagerServer) GoPointer() uintptr {
@@ -159,44 +161,44 @@ func (c *DBusObjectManagerServer) SetGoPointer(ptr uintptr) {
159 // Gets the interface proxy for @interface_name at @object_path, if161 // Gets the interface proxy for @interface_name at @object_path, if
160 // any.162 // any.
161 func (x *DBusObjectManagerServer) GetInterface(ObjectPathVar string, InterfaceNameVar string) *DBusInterfaceBase {163 func (x *DBusObjectManagerServer) GetInterface(ObjectPathVar string, InterfaceNameVar string) *DBusInterfaceBase {
164+ var cls *DBusInterfaceBase
162 165
163- GetInterfacePtr := XGDbusObjectManagerGetInterface(x.GoPointer(), ObjectPathVar, InterfaceNameVar)166+ cret := XGDbusObjectManagerGetInterface(x.GoPointer(), ObjectPathVar, InterfaceNameVar)
164- if GetInterfacePtr == 0 {
165- return nil
166- }
167-
168- GetInterfaceCls := &DBusInterfaceBase{}
169- GetInterfaceCls.Ptr = GetInterfacePtr
170- return GetInterfaceCls
171 167
168+ if cret == 0 {
169+ return cls
170+ }
171+ cls = &DBusInterfaceBase{}
172+ cls.Ptr = cret
173+ return cls
172 }174 }
173 175
174 // Gets the #GDBusObject at @object_path, if any.176 // Gets the #GDBusObject at @object_path, if any.
175 func (x *DBusObjectManagerServer) GetObject(ObjectPathVar string) *DBusObjectBase {177 func (x *DBusObjectManagerServer) GetObject(ObjectPathVar string) *DBusObjectBase {
178+ var cls *DBusObjectBase
176 179
177- GetObjectPtr := XGDbusObjectManagerGetObject(x.GoPointer(), ObjectPathVar)180+ cret := XGDbusObjectManagerGetObject(x.GoPointer(), ObjectPathVar)
178- if GetObjectPtr == 0 {
179- return nil
180- }
181-
182- GetObjectCls := &DBusObjectBase{}
183- GetObjectCls.Ptr = GetObjectPtr
184- return GetObjectCls
185 181
182+ if cret == 0 {
183+ return cls
184+ }
185+ cls = &DBusObjectBase{}
186+ cls.Ptr = cret
187+ return cls
186 }188 }
187 189
188 // Gets the object path that @manager is for.190 // Gets the object path that @manager is for.
189 func (x *DBusObjectManagerServer) GetObjectPath() string {191 func (x *DBusObjectManagerServer) GetObjectPath() string {
190 192
191- return XGDbusObjectManagerGetObjectPath(x.GoPointer())193+ cret := XGDbusObjectManagerGetObjectPath(x.GoPointer())
192-194+ return cret
193 }195 }
194 196
195 // Gets all #GDBusObject objects known to @manager.197 // Gets all #GDBusObject objects known to @manager.
196 func (x *DBusObjectManagerServer) GetObjects() *glib.List {198 func (x *DBusObjectManagerServer) GetObjects() *glib.List {
197 199
198- return XGDbusObjectManagerGetObjects(x.GoPointer())200+ cret := XGDbusObjectManagerGetObjects(x.GoPointer())
199-201+ return cret
200 }202 }
201 203
202 func init() {204 func init() {
M v4/gio/gdbusobjectproxy.go +30 -29
@@ -37,32 +37,33 @@ var xNewDBusObjectProxy func(uintptr, string) uintptr
37 // Creates a new #GDBusObjectProxy for the given connection and37 // Creates a new #GDBusObjectProxy for the given connection and
38 // object path.38 // object path.
39 func NewDBusObjectProxy(ConnectionVar *DBusConnection, ObjectPathVar string) *DBusObjectProxy {39 func NewDBusObjectProxy(ConnectionVar *DBusConnection, ObjectPathVar string) *DBusObjectProxy {
40- NewDBusObjectProxyPtr := xNewDBusObjectProxy(ConnectionVar.GoPointer(), ObjectPathVar)40+ var cls *DBusObjectProxy
41- if NewDBusObjectProxyPtr == 0 {41+
42- return nil42+ cret := xNewDBusObjectProxy(ConnectionVar.GoPointer(), ObjectPathVar)
43- }
44 43
45- NewDBusObjectProxyCls := &DBusObjectProxy{}44+ if cret == 0 {
46- NewDBusObjectProxyCls.Ptr = NewDBusObjectProxyPtr45+ return cls
47- return NewDBusObjectProxyCls46+ }
47+ cls = &DBusObjectProxy{}
48+ cls.Ptr = cret
49+ return cls
48 }50 }
49 51
50 var xDBusObjectProxyGetConnection func(uintptr) uintptr52 var xDBusObjectProxyGetConnection func(uintptr) uintptr
51 53
52 // Gets the connection that @proxy is for.54 // Gets the connection that @proxy is for.
53 func (x *DBusObjectProxy) GetConnection() *DBusConnection {55 func (x *DBusObjectProxy) GetConnection() *DBusConnection {
56+ var cls *DBusConnection
54 57
55- GetConnectionPtr := xDBusObjectProxyGetConnection(x.GoPointer())58+ cret := xDBusObjectProxyGetConnection(x.GoPointer())
56- if GetConnectionPtr == 0 {
57- return nil
58- }
59-
60- gobject.IncreaseRef(GetConnectionPtr)
61-
62- GetConnectionCls := &DBusConnection{}
63- GetConnectionCls.Ptr = GetConnectionPtr
64- return GetConnectionCls
65 59
60+ if cret == 0 {
61+ return cls
62+ }
63+ gobject.IncreaseRef(cret)
64+ cls = &DBusConnection{}
65+ cls.Ptr = cret
66+ return cls
66 }67 }
67 68
68 func (c *DBusObjectProxy) GoPointer() uintptr {69 func (c *DBusObjectProxy) GoPointer() uintptr {
@@ -76,30 +77,30 @@ func (c *DBusObjectProxy) SetGoPointer(ptr uintptr) {
76 // Gets the D-Bus interface with name @interface_name associated with77 // Gets the D-Bus interface with name @interface_name associated with
77 // @object, if any.78 // @object, if any.
78 func (x *DBusObjectProxy) GetInterface(InterfaceNameVar string) *DBusInterfaceBase {79 func (x *DBusObjectProxy) GetInterface(InterfaceNameVar string) *DBusInterfaceBase {
80+ var cls *DBusInterfaceBase
79 81
80- GetInterfacePtr := XGDbusObjectGetInterface(x.GoPointer(), InterfaceNameVar)82+ cret := XGDbusObjectGetInterface(x.GoPointer(), InterfaceNameVar)
81- if GetInterfacePtr == 0 {
82- return nil
83- }
84-
85- GetInterfaceCls := &DBusInterfaceBase{}
86- GetInterfaceCls.Ptr = GetInterfacePtr
87- return GetInterfaceCls
88 83
84+ if cret == 0 {
85+ return cls
86+ }
87+ cls = &DBusInterfaceBase{}
88+ cls.Ptr = cret
89+ return cls
89 }90 }
90 91
91 // Gets the D-Bus interfaces associated with @object.92 // Gets the D-Bus interfaces associated with @object.
92 func (x *DBusObjectProxy) GetInterfaces() *glib.List {93 func (x *DBusObjectProxy) GetInterfaces() *glib.List {
93 94
94- return XGDbusObjectGetInterfaces(x.GoPointer())95+ cret := XGDbusObjectGetInterfaces(x.GoPointer())
95-96+ return cret
96 }97 }
97 98
98 // Gets the object path for @object.99 // Gets the object path for @object.
99 func (x *DBusObjectProxy) GetObjectPath() string {100 func (x *DBusObjectProxy) GetObjectPath() string {
100 101
101- return XGDbusObjectGetObjectPath(x.GoPointer())102+ cret := XGDbusObjectGetObjectPath(x.GoPointer())
102-103+ return cret
103 }104 }
104 105
105 func init() {106 func init() {
M v4/gio/gdbusobjectskeleton.go +21 -19
@@ -37,14 +37,16 @@ var xNewDBusObjectSkeleton func(string) uintptr
37 37
38 // Creates a new #GDBusObjectSkeleton.38 // Creates a new #GDBusObjectSkeleton.
39 func NewDBusObjectSkeleton(ObjectPathVar string) *DBusObjectSkeleton {39 func NewDBusObjectSkeleton(ObjectPathVar string) *DBusObjectSkeleton {
40- NewDBusObjectSkeletonPtr := xNewDBusObjectSkeleton(ObjectPathVar)40+ var cls *DBusObjectSkeleton
41- if NewDBusObjectSkeletonPtr == 0 {41+
42- return nil42+ cret := xNewDBusObjectSkeleton(ObjectPathVar)
43- }
44 43
45- NewDBusObjectSkeletonCls := &DBusObjectSkeleton{}44+ if cret == 0 {
46- NewDBusObjectSkeletonCls.Ptr = NewDBusObjectSkeletonPtr45+ return cls
47- return NewDBusObjectSkeletonCls46+ }
47+ cls = &DBusObjectSkeleton{}
48+ cls.Ptr = cret
49+ return cls
48 }50 }
49 51
50 var xDBusObjectSkeletonAddInterface func(uintptr, uintptr)52 var xDBusObjectSkeletonAddInterface func(uintptr, uintptr)
@@ -133,30 +135,30 @@ func (x *DBusObjectSkeleton) ConnectAuthorizeMethod(cb func(DBusObjectSkeleton,
133 // Gets the D-Bus interface with name @interface_name associated with135 // Gets the D-Bus interface with name @interface_name associated with
134 // @object, if any.136 // @object, if any.
135 func (x *DBusObjectSkeleton) GetInterface(InterfaceNameVar string) *DBusInterfaceBase {137 func (x *DBusObjectSkeleton) GetInterface(InterfaceNameVar string) *DBusInterfaceBase {
138+ var cls *DBusInterfaceBase
136 139
137- GetInterfacePtr := XGDbusObjectGetInterface(x.GoPointer(), InterfaceNameVar)140+ cret := XGDbusObjectGetInterface(x.GoPointer(), InterfaceNameVar)
138- if GetInterfacePtr == 0 {
139- return nil
140- }
141-
142- GetInterfaceCls := &DBusInterfaceBase{}
143- GetInterfaceCls.Ptr = GetInterfacePtr
144- return GetInterfaceCls
145 141
142+ if cret == 0 {
143+ return cls
144+ }
145+ cls = &DBusInterfaceBase{}
146+ cls.Ptr = cret
147+ return cls
146 }148 }
147 149
148 // Gets the D-Bus interfaces associated with @object.150 // Gets the D-Bus interfaces associated with @object.
149 func (x *DBusObjectSkeleton) GetInterfaces() *glib.List {151 func (x *DBusObjectSkeleton) GetInterfaces() *glib.List {
150 152
151- return XGDbusObjectGetInterfaces(x.GoPointer())153+ cret := XGDbusObjectGetInterfaces(x.GoPointer())
152-154+ return cret
153 }155 }
154 156
155 // Gets the object path for @object.157 // Gets the object path for @object.
156 func (x *DBusObjectSkeleton) GetObjectPath() string {158 func (x *DBusObjectSkeleton) GetObjectPath() string {
157 159
158- return XGDbusObjectGetObjectPath(x.GoPointer())160+ cret := XGDbusObjectGetObjectPath(x.GoPointer())
159-161+ return cret
160 }162 }
161 163
162 func init() {164 func init() {
M v4/gio/gdbusproxy.go +165 -104
@@ -72,51 +72,72 @@ func DBusProxyNewFromInternalPtr(ptr uintptr) *DBusProxy {
72 return cls72 return cls
73 }73 }
74 74
75-var xNewFinishDBusProxy func(uintptr) uintptr75+var xNewFinishDBusProxy func(uintptr, **glib.Error) uintptr
76 76
77 // Finishes creating a #GDBusProxy.77 // Finishes creating a #GDBusProxy.
78-func NewFinishDBusProxy(ResVar AsyncResult) *DBusProxy {78+func NewFinishDBusProxy(ResVar AsyncResult) (*DBusProxy, error) {
79- NewFinishDBusProxyPtr := xNewFinishDBusProxy(ResVar.GoPointer())79+ var cls *DBusProxy
80- if NewFinishDBusProxyPtr == 0 {80+ var cerr *glib.Error
81- return nil81+
82+ cret := xNewFinishDBusProxy(ResVar.GoPointer(), &cerr)
83+
84+ if cret == 0 {
85+ return cls, cerr
86+ }
87+ cls = &DBusProxy{}
88+ cls.Ptr = cret
89+ if cerr == nil {
90+ return cls, nil
82 }91 }
92+ return cls, cerr
83 93
84- NewFinishDBusProxyCls := &DBusProxy{}
85- NewFinishDBusProxyCls.Ptr = NewFinishDBusProxyPtr
86- return NewFinishDBusProxyCls
87 }94 }
88 95
89-var xNewForBusFinishDBusProxy func(uintptr) uintptr96+var xNewForBusFinishDBusProxy func(uintptr, **glib.Error) uintptr
90 97
91 // Finishes creating a #GDBusProxy.98 // Finishes creating a #GDBusProxy.
92-func NewForBusFinishDBusProxy(ResVar AsyncResult) *DBusProxy {99+func NewForBusFinishDBusProxy(ResVar AsyncResult) (*DBusProxy, error) {
93- NewForBusFinishDBusProxyPtr := xNewForBusFinishDBusProxy(ResVar.GoPointer())100+ var cls *DBusProxy
94- if NewForBusFinishDBusProxyPtr == 0 {101+ var cerr *glib.Error
95- return nil102+
103+ cret := xNewForBusFinishDBusProxy(ResVar.GoPointer(), &cerr)
104+
105+ if cret == 0 {
106+ return cls, cerr
107+ }
108+ cls = &DBusProxy{}
109+ cls.Ptr = cret
110+ if cerr == nil {
111+ return cls, nil
96 }112 }
113+ return cls, cerr
97 114
98- NewForBusFinishDBusProxyCls := &DBusProxy{}
99- NewForBusFinishDBusProxyCls.Ptr = NewForBusFinishDBusProxyPtr
100- return NewForBusFinishDBusProxyCls
101 }115 }
102 116
103-var xNewForBusSyncDBusProxy func(BusType, DBusProxyFlags, *DBusInterfaceInfo, string, string, string, uintptr) uintptr117+var xNewForBusSyncDBusProxy func(BusType, DBusProxyFlags, *DBusInterfaceInfo, string, string, string, uintptr, **glib.Error) uintptr
104 118
105 // Like g_dbus_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.119 // Like g_dbus_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
106 //120 //
107 // #GDBusProxy is used in this [example][gdbus-wellknown-proxy].121 // #GDBusProxy is used in this [example][gdbus-wellknown-proxy].
108-func NewForBusSyncDBusProxy(BusTypeVar BusType, FlagsVar DBusProxyFlags, InfoVar *DBusInterfaceInfo, NameVar string, ObjectPathVar string, InterfaceNameVar string, CancellableVar *Cancellable) *DBusProxy {122+func NewForBusSyncDBusProxy(BusTypeVar BusType, FlagsVar DBusProxyFlags, InfoVar *DBusInterfaceInfo, NameVar string, ObjectPathVar string, InterfaceNameVar string, CancellableVar *Cancellable) (*DBusProxy, error) {
109- NewForBusSyncDBusProxyPtr := xNewForBusSyncDBusProxy(BusTypeVar, FlagsVar, InfoVar, NameVar, ObjectPathVar, InterfaceNameVar, CancellableVar.GoPointer())123+ var cls *DBusProxy
110- if NewForBusSyncDBusProxyPtr == 0 {124+ var cerr *glib.Error
111- return nil125+
126+ cret := xNewForBusSyncDBusProxy(BusTypeVar, FlagsVar, InfoVar, NameVar, ObjectPathVar, InterfaceNameVar, CancellableVar.GoPointer(), &cerr)
127+
128+ if cret == 0 {
129+ return cls, cerr
130+ }
131+ cls = &DBusProxy{}
132+ cls.Ptr = cret
133+ if cerr == nil {
134+ return cls, nil
112 }135 }
136+ return cls, cerr
113 137
114- NewForBusSyncDBusProxyCls := &DBusProxy{}
115- NewForBusSyncDBusProxyCls.Ptr = NewForBusSyncDBusProxyPtr
116- return NewForBusSyncDBusProxyCls
117 }138 }
118 139
119-var xNewSyncDBusProxy func(uintptr, DBusProxyFlags, *DBusInterfaceInfo, string, string, string, uintptr) uintptr140+var xNewSyncDBusProxy func(uintptr, DBusProxyFlags, *DBusInterfaceInfo, string, string, string, uintptr, **glib.Error) uintptr
120 141
121 // Creates a proxy for accessing @interface_name on the remote object142 // Creates a proxy for accessing @interface_name on the remote object
122 // at @object_path owned by @name at @connection and synchronously143 // at @object_path owned by @name at @connection and synchronously
@@ -140,15 +161,22 @@ var xNewSyncDBusProxy func(uintptr, DBusProxyFlags, *DBusInterfaceInfo, string,
140 // and g_dbus_proxy_new_finish() for the asynchronous version.161 // and g_dbus_proxy_new_finish() for the asynchronous version.
141 //162 //
142 // #GDBusProxy is used in this [example][gdbus-wellknown-proxy].163 // #GDBusProxy is used in this [example][gdbus-wellknown-proxy].
143-func NewSyncDBusProxy(ConnectionVar *DBusConnection, FlagsVar DBusProxyFlags, InfoVar *DBusInterfaceInfo, NameVar string, ObjectPathVar string, InterfaceNameVar string, CancellableVar *Cancellable) *DBusProxy {164+func NewSyncDBusProxy(ConnectionVar *DBusConnection, FlagsVar DBusProxyFlags, InfoVar *DBusInterfaceInfo, NameVar string, ObjectPathVar string, InterfaceNameVar string, CancellableVar *Cancellable) (*DBusProxy, error) {
144- NewSyncDBusProxyPtr := xNewSyncDBusProxy(ConnectionVar.GoPointer(), FlagsVar, InfoVar, NameVar, ObjectPathVar, InterfaceNameVar, CancellableVar.GoPointer())165+ var cls *DBusProxy
145- if NewSyncDBusProxyPtr == 0 {166+ var cerr *glib.Error
146- return nil167+
168+ cret := xNewSyncDBusProxy(ConnectionVar.GoPointer(), FlagsVar, InfoVar, NameVar, ObjectPathVar, InterfaceNameVar, CancellableVar.GoPointer(), &cerr)
169+
170+ if cret == 0 {
171+ return cls, cerr
172+ }
173+ cls = &DBusProxy{}
174+ cls.Ptr = cret
175+ if cerr == nil {
176+ return cls, nil
147 }177 }
178+ return cls, cerr
148 179
149- NewSyncDBusProxyCls := &DBusProxy{}
150- NewSyncDBusProxyCls.Ptr = NewSyncDBusProxyPtr
151- return NewSyncDBusProxyCls
152 }180 }
153 181
154 var xDBusProxyCall func(uintptr, string, *glib.Variant, DBusCallFlags, int, uintptr, uintptr, uintptr)182 var xDBusProxyCall func(uintptr, string, *glib.Variant, DBusCallFlags, int, uintptr, uintptr, uintptr)
@@ -203,16 +231,21 @@ func (x *DBusProxy) Call(MethodNameVar string, ParametersVar *glib.Variant, Flag
203 231
204 }232 }
205 233
206-var xDBusProxyCallFinish func(uintptr, uintptr) *glib.Variant234+var xDBusProxyCallFinish func(uintptr, uintptr, **glib.Error) *glib.Variant
207 235
208 // Finishes an operation started with g_dbus_proxy_call().236 // Finishes an operation started with g_dbus_proxy_call().
209-func (x *DBusProxy) CallFinish(ResVar AsyncResult) *glib.Variant {237+func (x *DBusProxy) CallFinish(ResVar AsyncResult) (*glib.Variant, error) {
238+ var cerr *glib.Error
210 239
211- return xDBusProxyCallFinish(x.GoPointer(), ResVar.GoPointer())240+ cret := xDBusProxyCallFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
241+ if cerr == nil {
242+ return cret, nil
243+ }
244+ return cret, cerr
212 245
213 }246 }
214 247
215-var xDBusProxyCallSync func(uintptr, string, *glib.Variant, DBusCallFlags, int, uintptr) *glib.Variant248+var xDBusProxyCallSync func(uintptr, string, *glib.Variant, DBusCallFlags, int, uintptr, **glib.Error) *glib.Variant
216 249
217 // Synchronously invokes the @method_name method on @proxy.250 // Synchronously invokes the @method_name method on @proxy.
218 //251 //
@@ -250,9 +283,14 @@ var xDBusProxyCallSync func(uintptr, string, *glib.Variant, DBusCallFlags, int,
250 // If @proxy has an expected interface (see283 // If @proxy has an expected interface (see
251 // #GDBusProxy:g-interface-info) and @method_name is referenced by it,284 // #GDBusProxy:g-interface-info) and @method_name is referenced by it,
252 // then the return value is checked against the return type.285 // then the return value is checked against the return type.
253-func (x *DBusProxy) CallSync(MethodNameVar string, ParametersVar *glib.Variant, FlagsVar DBusCallFlags, TimeoutMsecVar int, CancellableVar *Cancellable) *glib.Variant {286+func (x *DBusProxy) CallSync(MethodNameVar string, ParametersVar *glib.Variant, FlagsVar DBusCallFlags, TimeoutMsecVar int, CancellableVar *Cancellable) (*glib.Variant, error) {
287+ var cerr *glib.Error
254 288
255- return xDBusProxyCallSync(x.GoPointer(), MethodNameVar, ParametersVar, FlagsVar, TimeoutMsecVar, CancellableVar.GoPointer())289+ cret := xDBusProxyCallSync(x.GoPointer(), MethodNameVar, ParametersVar, FlagsVar, TimeoutMsecVar, CancellableVar.GoPointer(), &cerr)
290+ if cerr == nil {
291+ return cret, nil
292+ }
293+ return cret, cerr
256 294
257 }295 }
258 296
@@ -267,23 +305,33 @@ func (x *DBusProxy) CallWithUnixFdList(MethodNameVar string, ParametersVar *glib
267 305
268 }306 }
269 307
270-var xDBusProxyCallWithUnixFdListFinish func(uintptr, *uintptr, uintptr) *glib.Variant308+var xDBusProxyCallWithUnixFdListFinish func(uintptr, *uintptr, uintptr, **glib.Error) *glib.Variant
271 309
272 // Finishes an operation started with g_dbus_proxy_call_with_unix_fd_list().310 // Finishes an operation started with g_dbus_proxy_call_with_unix_fd_list().
273-func (x *DBusProxy) CallWithUnixFdListFinish(OutFdListVar **UnixFDList, ResVar AsyncResult) *glib.Variant {311+func (x *DBusProxy) CallWithUnixFdListFinish(OutFdListVar **UnixFDList, ResVar AsyncResult) (*glib.Variant, error) {
312+ var cerr *glib.Error
274 313
275- return xDBusProxyCallWithUnixFdListFinish(x.GoPointer(), gobject.ConvertPtr(OutFdListVar), ResVar.GoPointer())314+ cret := xDBusProxyCallWithUnixFdListFinish(x.GoPointer(), gobject.ConvertPtr(OutFdListVar), ResVar.GoPointer(), &cerr)
315+ if cerr == nil {
316+ return cret, nil
317+ }
318+ return cret, cerr
276 319
277 }320 }
278 321
279-var xDBusProxyCallWithUnixFdListSync func(uintptr, string, *glib.Variant, DBusCallFlags, int, uintptr, *uintptr, uintptr) *glib.Variant322+var xDBusProxyCallWithUnixFdListSync func(uintptr, string, *glib.Variant, DBusCallFlags, int, uintptr, *uintptr, uintptr, **glib.Error) *glib.Variant
280 323
281 // Like g_dbus_proxy_call_sync() but also takes and returns #GUnixFDList objects.324 // Like g_dbus_proxy_call_sync() but also takes and returns #GUnixFDList objects.
282 //325 //
283 // This method is only available on UNIX.326 // This method is only available on UNIX.
284-func (x *DBusProxy) CallWithUnixFdListSync(MethodNameVar string, ParametersVar *glib.Variant, FlagsVar DBusCallFlags, TimeoutMsecVar int, FdListVar *UnixFDList, OutFdListVar **UnixFDList, CancellableVar *Cancellable) *glib.Variant {327+func (x *DBusProxy) CallWithUnixFdListSync(MethodNameVar string, ParametersVar *glib.Variant, FlagsVar DBusCallFlags, TimeoutMsecVar int, FdListVar *UnixFDList, OutFdListVar **UnixFDList, CancellableVar *Cancellable) (*glib.Variant, error) {
328+ var cerr *glib.Error
285 329
286- return xDBusProxyCallWithUnixFdListSync(x.GoPointer(), MethodNameVar, ParametersVar, FlagsVar, TimeoutMsecVar, FdListVar.GoPointer(), gobject.ConvertPtr(OutFdListVar), CancellableVar.GoPointer())330+ cret := xDBusProxyCallWithUnixFdListSync(x.GoPointer(), MethodNameVar, ParametersVar, FlagsVar, TimeoutMsecVar, FdListVar.GoPointer(), gobject.ConvertPtr(OutFdListVar), CancellableVar.GoPointer(), &cerr)
331+ if cerr == nil {
332+ return cret, nil
333+ }
334+ return cret, cerr
287 335
288 }336 }
289 337
@@ -297,8 +345,8 @@ var xDBusProxyGetCachedProperty func(uintptr, string) *glib.Variant
297 // it, then @value is checked against the type of the property.345 // it, then @value is checked against the type of the property.
298 func (x *DBusProxy) GetCachedProperty(PropertyNameVar string) *glib.Variant {346 func (x *DBusProxy) GetCachedProperty(PropertyNameVar string) *glib.Variant {
299 347
300- return xDBusProxyGetCachedProperty(x.GoPointer(), PropertyNameVar)348+ cret := xDBusProxyGetCachedProperty(x.GoPointer(), PropertyNameVar)
301-349+ return cret
302 }350 }
303 351
304 var xDBusProxyGetCachedPropertyNames func(uintptr) uintptr352 var xDBusProxyGetCachedPropertyNames func(uintptr) uintptr
@@ -306,26 +354,25 @@ var xDBusProxyGetCachedPropertyNames func(uintptr) uintptr
306 // Gets the names of all cached properties on @proxy.354 // Gets the names of all cached properties on @proxy.
307 func (x *DBusProxy) GetCachedPropertyNames() uintptr {355 func (x *DBusProxy) GetCachedPropertyNames() uintptr {
308 356
309- return xDBusProxyGetCachedPropertyNames(x.GoPointer())357+ cret := xDBusProxyGetCachedPropertyNames(x.GoPointer())
310-358+ return cret
311 }359 }
312 360
313 var xDBusProxyGetConnection func(uintptr) uintptr361 var xDBusProxyGetConnection func(uintptr) uintptr
314 362
315 // Gets the connection @proxy is for.363 // Gets the connection @proxy is for.
316 func (x *DBusProxy) GetConnection() *DBusConnection {364 func (x *DBusProxy) GetConnection() *DBusConnection {
365+ var cls *DBusConnection
317 366
318- GetConnectionPtr := xDBusProxyGetConnection(x.GoPointer())367+ cret := xDBusProxyGetConnection(x.GoPointer())
319- if GetConnectionPtr == 0 {
320- return nil
321- }
322-
323- gobject.IncreaseRef(GetConnectionPtr)
324-
325- GetConnectionCls := &DBusConnection{}
326- GetConnectionCls.Ptr = GetConnectionPtr
327- return GetConnectionCls
328 368
369+ if cret == 0 {
370+ return cls
371+ }
372+ gobject.IncreaseRef(cret)
373+ cls = &DBusConnection{}
374+ cls.Ptr = cret
375+ return cls
329 }376 }
330 377
331 var xDBusProxyGetDefaultTimeout func(uintptr) int378 var xDBusProxyGetDefaultTimeout func(uintptr) int
@@ -337,8 +384,8 @@ var xDBusProxyGetDefaultTimeout func(uintptr) int
337 // See the #GDBusProxy:g-default-timeout property for more details.384 // See the #GDBusProxy:g-default-timeout property for more details.
338 func (x *DBusProxy) GetDefaultTimeout() int {385 func (x *DBusProxy) GetDefaultTimeout() int {
339 386
340- return xDBusProxyGetDefaultTimeout(x.GoPointer())387+ cret := xDBusProxyGetDefaultTimeout(x.GoPointer())
341-388+ return cret
342 }389 }
343 390
344 var xDBusProxyGetFlags func(uintptr) DBusProxyFlags391 var xDBusProxyGetFlags func(uintptr) DBusProxyFlags
@@ -346,8 +393,8 @@ var xDBusProxyGetFlags func(uintptr) DBusProxyFlags
346 // Gets the flags that @proxy was constructed with.393 // Gets the flags that @proxy was constructed with.
347 func (x *DBusProxy) GetFlags() DBusProxyFlags {394 func (x *DBusProxy) GetFlags() DBusProxyFlags {
348 395
349- return xDBusProxyGetFlags(x.GoPointer())396+ cret := xDBusProxyGetFlags(x.GoPointer())
350-397+ return cret
351 }398 }
352 399
353 var xDBusProxyGetInterfaceInfo func(uintptr) *DBusInterfaceInfo400 var xDBusProxyGetInterfaceInfo func(uintptr) *DBusInterfaceInfo
@@ -357,8 +404,8 @@ var xDBusProxyGetInterfaceInfo func(uintptr) *DBusInterfaceInfo
357 // property for more details.404 // property for more details.
358 func (x *DBusProxy) GetInterfaceInfo() *DBusInterfaceInfo {405 func (x *DBusProxy) GetInterfaceInfo() *DBusInterfaceInfo {
359 406
360- return xDBusProxyGetInterfaceInfo(x.GoPointer())407+ cret := xDBusProxyGetInterfaceInfo(x.GoPointer())
361-408+ return cret
362 }409 }
363 410
364 var xDBusProxyGetInterfaceName func(uintptr) string411 var xDBusProxyGetInterfaceName func(uintptr) string
@@ -366,8 +413,8 @@ var xDBusProxyGetInterfaceName func(uintptr) string
366 // Gets the D-Bus interface name @proxy is for.413 // Gets the D-Bus interface name @proxy is for.
367 func (x *DBusProxy) GetInterfaceName() string {414 func (x *DBusProxy) GetInterfaceName() string {
368 415
369- return xDBusProxyGetInterfaceName(x.GoPointer())416+ cret := xDBusProxyGetInterfaceName(x.GoPointer())
370-417+ return cret
371 }418 }
372 419
373 var xDBusProxyGetName func(uintptr) string420 var xDBusProxyGetName func(uintptr) string
@@ -379,8 +426,8 @@ var xDBusProxyGetName func(uintptr) string
379 // pattern.426 // pattern.
380 func (x *DBusProxy) GetName() string {427 func (x *DBusProxy) GetName() string {
381 428
382- return xDBusProxyGetName(x.GoPointer())429+ cret := xDBusProxyGetName(x.GoPointer())
383-430+ return cret
384 }431 }
385 432
386 var xDBusProxyGetNameOwner func(uintptr) string433 var xDBusProxyGetNameOwner func(uintptr) string
@@ -391,8 +438,8 @@ var xDBusProxyGetNameOwner func(uintptr) string
391 // #GDBusProxy:g-name-owner property.438 // #GDBusProxy:g-name-owner property.
392 func (x *DBusProxy) GetNameOwner() string {439 func (x *DBusProxy) GetNameOwner() string {
393 440
394- return xDBusProxyGetNameOwner(x.GoPointer())441+ cret := xDBusProxyGetNameOwner(x.GoPointer())
395-442+ return cret
396 }443 }
397 444
398 var xDBusProxyGetObjectPath func(uintptr) string445 var xDBusProxyGetObjectPath func(uintptr) string
@@ -400,8 +447,8 @@ var xDBusProxyGetObjectPath func(uintptr) string
400 // Gets the object path @proxy is for.447 // Gets the object path @proxy is for.
401 func (x *DBusProxy) GetObjectPath() string {448 func (x *DBusProxy) GetObjectPath() string {
402 449
403- return xDBusProxyGetObjectPath(x.GoPointer())450+ cret := xDBusProxyGetObjectPath(x.GoPointer())
404-451+ return cret
405 }452 }
406 453
407 var xDBusProxySetCachedProperty func(uintptr, string, *glib.Variant)454 var xDBusProxySetCachedProperty func(uintptr, string, *glib.Variant)
@@ -562,47 +609,57 @@ func (x *DBusProxy) InitAsync(IoPriorityVar int, CancellableVar *Cancellable, Ca
562 609
563 // Finishes asynchronous initialization and returns the result.610 // Finishes asynchronous initialization and returns the result.
564 // See g_async_initable_init_async().611 // See g_async_initable_init_async().
565-func (x *DBusProxy) InitFinish(ResVar AsyncResult) bool {612+func (x *DBusProxy) InitFinish(ResVar AsyncResult) (bool, error) {
613+ var cerr *glib.Error
566 614
567- return XGAsyncInitableInitFinish(x.GoPointer(), ResVar.GoPointer())615+ cret := XGAsyncInitableInitFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
616+ if cerr == nil {
617+ return cret, nil
618+ }
619+ return cret, cerr
568 620
569 }621 }
570 622
571 // Finishes the async construction for the various g_async_initable_new623 // Finishes the async construction for the various g_async_initable_new
572 // calls, returning the created object or %NULL on error.624 // calls, returning the created object or %NULL on error.
573-func (x *DBusProxy) NewFinish(ResVar AsyncResult) *gobject.Object {625+func (x *DBusProxy) NewFinish(ResVar AsyncResult) (*gobject.Object, error) {
626+ var cls *gobject.Object
627+ var cerr *glib.Error
574 628
575- NewFinishPtr := XGAsyncInitableNewFinish(x.GoPointer(), ResVar.GoPointer())629+ cret := XGAsyncInitableNewFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
576- if NewFinishPtr == 0 {
577- return nil
578- }
579 630
580- NewFinishCls := &gobject.Object{}631+ if cret == 0 {
581- NewFinishCls.Ptr = NewFinishPtr632+ return cls, cerr
582- return NewFinishCls633+ }
634+ cls = &gobject.Object{}
635+ cls.Ptr = cret
636+ if cerr == nil {
637+ return cls, nil
638+ }
639+ return cls, cerr
583 640
584 }641 }
585 642
586 // Gets the #GDBusObject that @interface_ belongs to, if any.643 // Gets the #GDBusObject that @interface_ belongs to, if any.
587 func (x *DBusProxy) DupObject() *DBusObjectBase {644 func (x *DBusProxy) DupObject() *DBusObjectBase {
645+ var cls *DBusObjectBase
588 646
589- DupObjectPtr := XGDbusInterfaceDupObject(x.GoPointer())647+ cret := XGDbusInterfaceDupObject(x.GoPointer())
590- if DupObjectPtr == 0 {
591- return nil
592- }
593-
594- DupObjectCls := &DBusObjectBase{}
595- DupObjectCls.Ptr = DupObjectPtr
596- return DupObjectCls
597 648
649+ if cret == 0 {
650+ return cls
651+ }
652+ cls = &DBusObjectBase{}
653+ cls.Ptr = cret
654+ return cls
598 }655 }
599 656
600 // Gets D-Bus introspection information for the D-Bus interface657 // Gets D-Bus introspection information for the D-Bus interface
601 // implemented by @interface_.658 // implemented by @interface_.
602 func (x *DBusProxy) GetInfo() *DBusInterfaceInfo {659 func (x *DBusProxy) GetInfo() *DBusInterfaceInfo {
603 660
604- return XGDbusInterfaceGetInfo(x.GoPointer())661+ cret := XGDbusInterfaceGetInfo(x.GoPointer())
605-662+ return cret
606 }663 }
607 664
608 // Gets the #GDBusObject that @interface_ belongs to, if any.665 // Gets the #GDBusObject that @interface_ belongs to, if any.
@@ -611,18 +668,17 @@ func (x *DBusProxy) GetInfo() *DBusInterfaceInfo {
611 // the returned object is being used from other threads. See668 // the returned object is being used from other threads. See
612 // g_dbus_interface_dup_object() for a thread-safe alternative.669 // g_dbus_interface_dup_object() for a thread-safe alternative.
613 func (x *DBusProxy) GetObject() *DBusObjectBase {670 func (x *DBusProxy) GetObject() *DBusObjectBase {
671+ var cls *DBusObjectBase
614 672
615- GetObjectPtr := XGDbusInterfaceGetObject(x.GoPointer())673+ cret := XGDbusInterfaceGetObject(x.GoPointer())
616- if GetObjectPtr == 0 {
617- return nil
618- }
619-
620- gobject.IncreaseRef(GetObjectPtr)
621-
622- GetObjectCls := &DBusObjectBase{}
623- GetObjectCls.Ptr = GetObjectPtr
624- return GetObjectCls
625 674
675+ if cret == 0 {
676+ return cls
677+ }
678+ gobject.IncreaseRef(cret)
679+ cls = &DBusObjectBase{}
680+ cls.Ptr = cret
681+ return cls
626 }682 }
627 683
628 // Sets the #GDBusObject for @interface_ to @object.684 // Sets the #GDBusObject for @interface_ to @object.
@@ -672,9 +728,14 @@ func (x *DBusProxy) SetObject(ObjectVar DBusObject) {
672 // In this pattern, a caller would expect to be able to call g_initable_init()728 // In this pattern, a caller would expect to be able to call g_initable_init()
673 // on the result of g_object_new(), regardless of whether it is in fact a new729 // on the result of g_object_new(), regardless of whether it is in fact a new
674 // instance.730 // instance.
675-func (x *DBusProxy) Init(CancellableVar *Cancellable) bool {731+func (x *DBusProxy) Init(CancellableVar *Cancellable) (bool, error) {
732+ var cerr *glib.Error
676 733
677- return XGInitableInit(x.GoPointer(), CancellableVar.GoPointer())734+ cret := XGInitableInit(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
735+ if cerr == nil {
736+ return cret, nil
737+ }
738+ return cret, cerr
678 739
679 }740 }
680 741
M v4/gio/gdbusutils.go +22 -22
@@ -13,8 +13,8 @@ var xDbusEscapeObjectPath func(string) string
13 // This is a language binding friendly version of g_dbus_escape_object_path_bytestring().13 // This is a language binding friendly version of g_dbus_escape_object_path_bytestring().
14 func DbusEscapeObjectPath(SVar string) string {14 func DbusEscapeObjectPath(SVar string) string {
15 15
16- return xDbusEscapeObjectPath(SVar)16+ cret := xDbusEscapeObjectPath(SVar)
17-17+ return cret
18 }18 }
19 19
20 var xDbusEscapeObjectPathBytestring func(uintptr) string20 var xDbusEscapeObjectPathBytestring func(uintptr) string
@@ -37,8 +37,8 @@ var xDbusEscapeObjectPathBytestring func(uintptr) string
37 // This can be reversed with g_dbus_unescape_object_path().37 // This can be reversed with g_dbus_unescape_object_path().
38 func DbusEscapeObjectPathBytestring(BytesVar uintptr) string {38 func DbusEscapeObjectPathBytestring(BytesVar uintptr) string {
39 39
40- return xDbusEscapeObjectPathBytestring(BytesVar)40+ cret := xDbusEscapeObjectPathBytestring(BytesVar)
41-41+ return cret
42 }42 }
43 43
44 var xDbusGenerateGuid func() string44 var xDbusGenerateGuid func() string
@@ -56,8 +56,8 @@ var xDbusGenerateGuid func() string
56 // [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122).56 // [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122).
57 func DbusGenerateGuid() string {57 func DbusGenerateGuid() string {
58 58
59- return xDbusGenerateGuid()59+ cret := xDbusGenerateGuid()
60-60+ return cret
61 }61 }
62 62
63 var xDbusGvalueToGvariant func(*gobject.Value, *glib.VariantType) *glib.Variant63 var xDbusGvalueToGvariant func(*gobject.Value, *glib.VariantType) *glib.Variant
@@ -92,8 +92,8 @@ var xDbusGvalueToGvariant func(*gobject.Value, *glib.VariantType) *glib.Variant
92 // #GVariant to a #GValue.92 // #GVariant to a #GValue.
93 func DbusGvalueToGvariant(GvalueVar *gobject.Value, TypeVar *glib.VariantType) *glib.Variant {93 func DbusGvalueToGvariant(GvalueVar *gobject.Value, TypeVar *glib.VariantType) *glib.Variant {
94 94
95- return xDbusGvalueToGvariant(GvalueVar, TypeVar)95+ cret := xDbusGvalueToGvariant(GvalueVar, TypeVar)
96-96+ return cret
97 }97 }
98 98
99 var xDbusGvariantToGvalue func(*glib.Variant, *gobject.Value)99 var xDbusGvariantToGvalue func(*glib.Variant, *gobject.Value)
@@ -124,8 +124,8 @@ var xDbusIsErrorName func(string) bool
124 // same syntax as interface names.124 // same syntax as interface names.
125 func DbusIsErrorName(StringVar string) bool {125 func DbusIsErrorName(StringVar string) bool {
126 126
127- return xDbusIsErrorName(StringVar)127+ cret := xDbusIsErrorName(StringVar)
128-128+ return cret
129 }129 }
130 130
131 var xDbusIsGuid func(string) bool131 var xDbusIsGuid func(string) bool
@@ -136,8 +136,8 @@ var xDbusIsGuid func(string) bool
136 // the format of a GUID.136 // the format of a GUID.
137 func DbusIsGuid(StringVar string) bool {137 func DbusIsGuid(StringVar string) bool {
138 138
139- return xDbusIsGuid(StringVar)139+ cret := xDbusIsGuid(StringVar)
140-140+ return cret
141 }141 }
142 142
143 var xDbusIsInterfaceName func(string) bool143 var xDbusIsInterfaceName func(string) bool
@@ -145,8 +145,8 @@ var xDbusIsInterfaceName func(string) bool
145 // Checks if @string is a valid D-Bus interface name.145 // Checks if @string is a valid D-Bus interface name.
146 func DbusIsInterfaceName(StringVar string) bool {146 func DbusIsInterfaceName(StringVar string) bool {
147 147
148- return xDbusIsInterfaceName(StringVar)148+ cret := xDbusIsInterfaceName(StringVar)
149-149+ return cret
150 }150 }
151 151
152 var xDbusIsMemberName func(string) bool152 var xDbusIsMemberName func(string) bool
@@ -154,8 +154,8 @@ var xDbusIsMemberName func(string) bool
154 // Checks if @string is a valid D-Bus member (e.g. signal or method) name.154 // Checks if @string is a valid D-Bus member (e.g. signal or method) name.
155 func DbusIsMemberName(StringVar string) bool {155 func DbusIsMemberName(StringVar string) bool {
156 156
157- return xDbusIsMemberName(StringVar)157+ cret := xDbusIsMemberName(StringVar)
158-158+ return cret
159 }159 }
160 160
161 var xDbusIsName func(string) bool161 var xDbusIsName func(string) bool
@@ -163,8 +163,8 @@ var xDbusIsName func(string) bool
163 // Checks if @string is a valid D-Bus bus name (either unique or well-known).163 // Checks if @string is a valid D-Bus bus name (either unique or well-known).
164 func DbusIsName(StringVar string) bool {164 func DbusIsName(StringVar string) bool {
165 165
166- return xDbusIsName(StringVar)166+ cret := xDbusIsName(StringVar)
167-167+ return cret
168 }168 }
169 169
170 var xDbusIsUniqueName func(string) bool170 var xDbusIsUniqueName func(string) bool
@@ -172,8 +172,8 @@ var xDbusIsUniqueName func(string) bool
172 // Checks if @string is a valid D-Bus unique bus name.172 // Checks if @string is a valid D-Bus unique bus name.
173 func DbusIsUniqueName(StringVar string) bool {173 func DbusIsUniqueName(StringVar string) bool {
174 174
175- return xDbusIsUniqueName(StringVar)175+ cret := xDbusIsUniqueName(StringVar)
176-176+ return cret
177 }177 }
178 178
179 var xDbusUnescapeObjectPath func(string) uintptr179 var xDbusUnescapeObjectPath func(string) uintptr
@@ -188,8 +188,8 @@ var xDbusUnescapeObjectPath func(string) uintptr
188 // should contain `c` instead).188 // should contain `c` instead).
189 func DbusUnescapeObjectPath(SVar string) uintptr {189 func DbusUnescapeObjectPath(SVar string) uintptr {
190 190
191- return xDbusUnescapeObjectPath(SVar)191+ cret := xDbusUnescapeObjectPath(SVar)
192-192+ return cret
193 }193 }
194 194
195 func init() {195 func init() {
M v4/gio/gdebugcontroller.go +2 -2
@@ -47,8 +47,8 @@ func (x *DebugControllerBase) SetGoPointer(ptr uintptr) {
47 // Get the value of #GDebugController:debug-enabled.47 // Get the value of #GDebugController:debug-enabled.
48 func (x *DebugControllerBase) GetDebugEnabled() bool {48 func (x *DebugControllerBase) GetDebugEnabled() bool {
49 49
50- return XGDebugControllerGetDebugEnabled(x.GoPointer())50+ cret := XGDebugControllerGetDebugEnabled(x.GoPointer())
51-51+ return cret
52 }52 }
53 53
54 // Set the value of #GDebugController:debug-enabled.54 // Set the value of #GDebugController:debug-enabled.
M v4/gio/gdebugcontrollerdbus.go +25 -12
@@ -4,6 +4,7 @@ package gio
4 import (4 import (
5 "github.com/jwijenbergh/purego"5 "github.com/jwijenbergh/purego"
6 "github.com/jwijenbergh/puregotk/internal/core"6 "github.com/jwijenbergh/puregotk/internal/core"
7+ "github.com/jwijenbergh/puregotk/v4/glib"
7 "github.com/jwijenbergh/puregotk/v4/gobject"8 "github.com/jwijenbergh/puregotk/v4/gobject"
8 )9 )
9 10
@@ -136,7 +137,7 @@ func DebugControllerDBusNewFromInternalPtr(ptr uintptr) *DebugControllerDBus {
136 return cls137 return cls
137 }138 }
138 139
139-var xNewDebugControllerDBus func(uintptr, uintptr) uintptr140+var xNewDebugControllerDBus func(uintptr, uintptr, **glib.Error) uintptr
140 141
141 // Create a new #GDebugControllerDBus and synchronously initialize it.142 // Create a new #GDebugControllerDBus and synchronously initialize it.
142 //143 //
@@ -145,15 +146,22 @@ var xNewDebugControllerDBus func(uintptr, uintptr) uintptr
145 // #GDebugControllerDBus is dropped.146 // #GDebugControllerDBus is dropped.
146 //147 //
147 // Initialization may fail if registering the object on @connection fails.148 // Initialization may fail if registering the object on @connection fails.
148-func NewDebugControllerDBus(ConnectionVar *DBusConnection, CancellableVar *Cancellable) *DebugControllerDBus {149+func NewDebugControllerDBus(ConnectionVar *DBusConnection, CancellableVar *Cancellable) (*DebugControllerDBus, error) {
149- NewDebugControllerDBusPtr := xNewDebugControllerDBus(ConnectionVar.GoPointer(), CancellableVar.GoPointer())150+ var cls *DebugControllerDBus
150- if NewDebugControllerDBusPtr == 0 {151+ var cerr *glib.Error
151- return nil152+
153+ cret := xNewDebugControllerDBus(ConnectionVar.GoPointer(), CancellableVar.GoPointer(), &cerr)
154+
155+ if cret == 0 {
156+ return cls, cerr
157+ }
158+ cls = &DebugControllerDBus{}
159+ cls.Ptr = cret
160+ if cerr == nil {
161+ return cls, nil
152 }162 }
163+ return cls, cerr
153 164
154- NewDebugControllerDBusCls := &DebugControllerDBus{}
155- NewDebugControllerDBusCls.Ptr = NewDebugControllerDBusPtr
156- return NewDebugControllerDBusCls
157 }165 }
158 166
159 var xDebugControllerDBusStop func(uintptr)167 var xDebugControllerDBusStop func(uintptr)
@@ -219,8 +227,8 @@ func (x *DebugControllerDBus) ConnectAuthorize(cb func(DebugControllerDBus, uint
219 // Get the value of #GDebugController:debug-enabled.227 // Get the value of #GDebugController:debug-enabled.
220 func (x *DebugControllerDBus) GetDebugEnabled() bool {228 func (x *DebugControllerDBus) GetDebugEnabled() bool {
221 229
222- return XGDebugControllerGetDebugEnabled(x.GoPointer())230+ cret := XGDebugControllerGetDebugEnabled(x.GoPointer())
223-231+ return cret
224 }232 }
225 233
226 // Set the value of #GDebugController:debug-enabled.234 // Set the value of #GDebugController:debug-enabled.
@@ -268,9 +276,14 @@ func (x *DebugControllerDBus) SetDebugEnabled(DebugEnabledVar bool) {
268 // In this pattern, a caller would expect to be able to call g_initable_init()276 // In this pattern, a caller would expect to be able to call g_initable_init()
269 // on the result of g_object_new(), regardless of whether it is in fact a new277 // on the result of g_object_new(), regardless of whether it is in fact a new
270 // instance.278 // instance.
271-func (x *DebugControllerDBus) Init(CancellableVar *Cancellable) bool {279+func (x *DebugControllerDBus) Init(CancellableVar *Cancellable) (bool, error) {
280+ var cerr *glib.Error
272 281
273- return XGInitableInit(x.GoPointer(), CancellableVar.GoPointer())282+ cret := XGInitableInit(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
283+ if cerr == nil {
284+ return cret, nil
285+ }
286+ return cret, cerr
274 287
275 }288 }
276 289
M v4/gio/gdesktopappinfo.go +182 -127
@@ -51,16 +51,16 @@ func (x *DesktopAppInfoLookupBase) SetGoPointer(ptr uintptr) {
51 // in a GIO module. There is no reason for applications to use it51 // in a GIO module. There is no reason for applications to use it
52 // directly. Applications should use g_app_info_get_default_for_uri_scheme().52 // directly. Applications should use g_app_info_get_default_for_uri_scheme().
53 func (x *DesktopAppInfoLookupBase) GetDefaultForUriScheme(UriSchemeVar string) *AppInfoBase {53 func (x *DesktopAppInfoLookupBase) GetDefaultForUriScheme(UriSchemeVar string) *AppInfoBase {
54+ var cls *AppInfoBase
54 55
55- GetDefaultForUriSchemePtr := XGDesktopAppInfoLookupGetDefaultForUriScheme(x.GoPointer(), UriSchemeVar)56+ cret := XGDesktopAppInfoLookupGetDefaultForUriScheme(x.GoPointer(), UriSchemeVar)
56- if GetDefaultForUriSchemePtr == 0 {
57- return nil
58- }
59-
60- GetDefaultForUriSchemeCls := &AppInfoBase{}
61- GetDefaultForUriSchemeCls.Ptr = GetDefaultForUriSchemePtr
62- return GetDefaultForUriSchemeCls
63 57
58+ if cret == 0 {
59+ return cls
60+ }
61+ cls = &AppInfoBase{}
62+ cls.Ptr = cret
63+ return cls
64 }64 }
65 65
66 var XGDesktopAppInfoLookupGetDefaultForUriScheme func(uintptr, string) uintptr66 var XGDesktopAppInfoLookupGetDefaultForUriScheme func(uintptr, string) uintptr
@@ -95,42 +95,48 @@ var xNewDesktopAppInfo func(string) uintptr
95 // (i.e. a desktop id of kde-foo.desktop will match95 // (i.e. a desktop id of kde-foo.desktop will match
96 // `/usr/share/applications/kde/foo.desktop`).96 // `/usr/share/applications/kde/foo.desktop`).
97 func NewDesktopAppInfo(DesktopIdVar string) *DesktopAppInfo {97 func NewDesktopAppInfo(DesktopIdVar string) *DesktopAppInfo {
98- NewDesktopAppInfoPtr := xNewDesktopAppInfo(DesktopIdVar)98+ var cls *DesktopAppInfo
99- if NewDesktopAppInfoPtr == 0 {99+
100- return nil100+ cret := xNewDesktopAppInfo(DesktopIdVar)
101- }
102 101
103- NewDesktopAppInfoCls := &DesktopAppInfo{}102+ if cret == 0 {
104- NewDesktopAppInfoCls.Ptr = NewDesktopAppInfoPtr103+ return cls
105- return NewDesktopAppInfoCls104+ }
105+ cls = &DesktopAppInfo{}
106+ cls.Ptr = cret
107+ return cls
106 }108 }
107 109
108 var xNewFromFilenameDesktopAppInfo func(string) uintptr110 var xNewFromFilenameDesktopAppInfo func(string) uintptr
109 111
110 // Creates a new #GDesktopAppInfo.112 // Creates a new #GDesktopAppInfo.
111 func NewFromFilenameDesktopAppInfo(FilenameVar string) *DesktopAppInfo {113 func NewFromFilenameDesktopAppInfo(FilenameVar string) *DesktopAppInfo {
112- NewFromFilenameDesktopAppInfoPtr := xNewFromFilenameDesktopAppInfo(FilenameVar)114+ var cls *DesktopAppInfo
113- if NewFromFilenameDesktopAppInfoPtr == 0 {115+
114- return nil116+ cret := xNewFromFilenameDesktopAppInfo(FilenameVar)
115- }
116 117
117- NewFromFilenameDesktopAppInfoCls := &DesktopAppInfo{}118+ if cret == 0 {
118- NewFromFilenameDesktopAppInfoCls.Ptr = NewFromFilenameDesktopAppInfoPtr119+ return cls
119- return NewFromFilenameDesktopAppInfoCls120+ }
121+ cls = &DesktopAppInfo{}
122+ cls.Ptr = cret
123+ return cls
120 }124 }
121 125
122 var xNewFromKeyfileDesktopAppInfo func(*glib.KeyFile) uintptr126 var xNewFromKeyfileDesktopAppInfo func(*glib.KeyFile) uintptr
123 127
124 // Creates a new #GDesktopAppInfo.128 // Creates a new #GDesktopAppInfo.
125 func NewFromKeyfileDesktopAppInfo(KeyFileVar *glib.KeyFile) *DesktopAppInfo {129 func NewFromKeyfileDesktopAppInfo(KeyFileVar *glib.KeyFile) *DesktopAppInfo {
126- NewFromKeyfileDesktopAppInfoPtr := xNewFromKeyfileDesktopAppInfo(KeyFileVar)130+ var cls *DesktopAppInfo
127- if NewFromKeyfileDesktopAppInfoPtr == 0 {131+
128- return nil132+ cret := xNewFromKeyfileDesktopAppInfo(KeyFileVar)
129- }
130 133
131- NewFromKeyfileDesktopAppInfoCls := &DesktopAppInfo{}134+ if cret == 0 {
132- NewFromKeyfileDesktopAppInfoCls.Ptr = NewFromKeyfileDesktopAppInfoPtr135+ return cls
133- return NewFromKeyfileDesktopAppInfoCls136+ }
137+ cls = &DesktopAppInfo{}
138+ cls.Ptr = cret
139+ return cls
134 }140 }
135 141
136 var xDesktopAppInfoGetActionName func(uintptr, string) string142 var xDesktopAppInfoGetActionName func(uintptr, string) string
@@ -142,8 +148,8 @@ var xDesktopAppInfoGetActionName func(uintptr, string) string
142 // action.148 // action.
143 func (x *DesktopAppInfo) GetActionName(ActionNameVar string) string {149 func (x *DesktopAppInfo) GetActionName(ActionNameVar string) string {
144 150
145- return xDesktopAppInfoGetActionName(x.GoPointer(), ActionNameVar)151+ cret := xDesktopAppInfoGetActionName(x.GoPointer(), ActionNameVar)
146-152+ return cret
147 }153 }
148 154
149 var xDesktopAppInfoGetBoolean func(uintptr, string) bool155 var xDesktopAppInfoGetBoolean func(uintptr, string) bool
@@ -153,8 +159,8 @@ var xDesktopAppInfoGetBoolean func(uintptr, string) bool
153 // The @key is looked up in the "Desktop Entry" group.159 // The @key is looked up in the "Desktop Entry" group.
154 func (x *DesktopAppInfo) GetBoolean(KeyVar string) bool {160 func (x *DesktopAppInfo) GetBoolean(KeyVar string) bool {
155 161
156- return xDesktopAppInfoGetBoolean(x.GoPointer(), KeyVar)162+ cret := xDesktopAppInfoGetBoolean(x.GoPointer(), KeyVar)
157-163+ return cret
158 }164 }
159 165
160 var xDesktopAppInfoGetCategories func(uintptr) string166 var xDesktopAppInfoGetCategories func(uintptr) string
@@ -162,8 +168,8 @@ var xDesktopAppInfoGetCategories func(uintptr) string
162 // Gets the categories from the desktop file.168 // Gets the categories from the desktop file.
163 func (x *DesktopAppInfo) GetCategories() string {169 func (x *DesktopAppInfo) GetCategories() string {
164 170
165- return xDesktopAppInfoGetCategories(x.GoPointer())171+ cret := xDesktopAppInfoGetCategories(x.GoPointer())
166-172+ return cret
167 }173 }
168 174
169 var xDesktopAppInfoGetFilename func(uintptr) string175 var xDesktopAppInfoGetFilename func(uintptr) string
@@ -173,8 +179,8 @@ var xDesktopAppInfoGetFilename func(uintptr) string
173 // g_desktop_app_info_new_from_keyfile(), this function will return %NULL.179 // g_desktop_app_info_new_from_keyfile(), this function will return %NULL.
174 func (x *DesktopAppInfo) GetFilename() string {180 func (x *DesktopAppInfo) GetFilename() string {
175 181
176- return xDesktopAppInfoGetFilename(x.GoPointer())182+ cret := xDesktopAppInfoGetFilename(x.GoPointer())
177-183+ return cret
178 }184 }
179 185
180 var xDesktopAppInfoGetGenericName func(uintptr) string186 var xDesktopAppInfoGetGenericName func(uintptr) string
@@ -182,8 +188,8 @@ var xDesktopAppInfoGetGenericName func(uintptr) string
182 // Gets the generic name from the desktop file.188 // Gets the generic name from the desktop file.
183 func (x *DesktopAppInfo) GetGenericName() string {189 func (x *DesktopAppInfo) GetGenericName() string {
184 190
185- return xDesktopAppInfoGetGenericName(x.GoPointer())191+ cret := xDesktopAppInfoGetGenericName(x.GoPointer())
186-192+ return cret
187 }193 }
188 194
189 var xDesktopAppInfoGetIsHidden func(uintptr) bool195 var xDesktopAppInfoGetIsHidden func(uintptr) bool
@@ -192,8 +198,8 @@ var xDesktopAppInfoGetIsHidden func(uintptr) bool
192 // set to True.198 // set to True.
193 func (x *DesktopAppInfo) GetIsHidden() bool {199 func (x *DesktopAppInfo) GetIsHidden() bool {
194 200
195- return xDesktopAppInfoGetIsHidden(x.GoPointer())201+ cret := xDesktopAppInfoGetIsHidden(x.GoPointer())
196-202+ return cret
197 }203 }
198 204
199 var xDesktopAppInfoGetKeywords func(uintptr) uintptr205 var xDesktopAppInfoGetKeywords func(uintptr) uintptr
@@ -201,8 +207,8 @@ var xDesktopAppInfoGetKeywords func(uintptr) uintptr
201 // Gets the keywords from the desktop file.207 // Gets the keywords from the desktop file.
202 func (x *DesktopAppInfo) GetKeywords() uintptr {208 func (x *DesktopAppInfo) GetKeywords() uintptr {
203 209
204- return xDesktopAppInfoGetKeywords(x.GoPointer())210+ cret := xDesktopAppInfoGetKeywords(x.GoPointer())
205-211+ return cret
206 }212 }
207 213
208 var xDesktopAppInfoGetLocaleString func(uintptr, string) string214 var xDesktopAppInfoGetLocaleString func(uintptr, string) string
@@ -213,8 +219,8 @@ var xDesktopAppInfoGetLocaleString func(uintptr, string) string
213 // The @key is looked up in the "Desktop Entry" group.219 // The @key is looked up in the "Desktop Entry" group.
214 func (x *DesktopAppInfo) GetLocaleString(KeyVar string) string {220 func (x *DesktopAppInfo) GetLocaleString(KeyVar string) string {
215 221
216- return xDesktopAppInfoGetLocaleString(x.GoPointer(), KeyVar)222+ cret := xDesktopAppInfoGetLocaleString(x.GoPointer(), KeyVar)
217-223+ return cret
218 }224 }
219 225
220 var xDesktopAppInfoGetNodisplay func(uintptr) bool226 var xDesktopAppInfoGetNodisplay func(uintptr) bool
@@ -224,8 +230,8 @@ var xDesktopAppInfoGetNodisplay func(uintptr) bool
224 // %G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY and g_app_info_should_show().230 // %G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY and g_app_info_should_show().
225 func (x *DesktopAppInfo) GetNodisplay() bool {231 func (x *DesktopAppInfo) GetNodisplay() bool {
226 232
227- return xDesktopAppInfoGetNodisplay(x.GoPointer())233+ cret := xDesktopAppInfoGetNodisplay(x.GoPointer())
228-234+ return cret
229 }235 }
230 236
231 var xDesktopAppInfoGetShowIn func(uintptr, string) bool237 var xDesktopAppInfoGetShowIn func(uintptr, string) bool
@@ -243,8 +249,8 @@ var xDesktopAppInfoGetShowIn func(uintptr, string) bool
243 // %NULL for @desktop_env) as well as additional checks.249 // %NULL for @desktop_env) as well as additional checks.
244 func (x *DesktopAppInfo) GetShowIn(DesktopEnvVar string) bool {250 func (x *DesktopAppInfo) GetShowIn(DesktopEnvVar string) bool {
245 251
246- return xDesktopAppInfoGetShowIn(x.GoPointer(), DesktopEnvVar)252+ cret := xDesktopAppInfoGetShowIn(x.GoPointer(), DesktopEnvVar)
247-253+ return cret
248 }254 }
249 255
250 var xDesktopAppInfoGetStartupWmClass func(uintptr) string256 var xDesktopAppInfoGetStartupWmClass func(uintptr) string
@@ -254,8 +260,8 @@ var xDesktopAppInfoGetStartupWmClass func(uintptr) string
254 // through @info.260 // through @info.
255 func (x *DesktopAppInfo) GetStartupWmClass() string {261 func (x *DesktopAppInfo) GetStartupWmClass() string {
256 262
257- return xDesktopAppInfoGetStartupWmClass(x.GoPointer())263+ cret := xDesktopAppInfoGetStartupWmClass(x.GoPointer())
258-264+ return cret
259 }265 }
260 266
261 var xDesktopAppInfoGetString func(uintptr, string) string267 var xDesktopAppInfoGetString func(uintptr, string) string
@@ -265,8 +271,8 @@ var xDesktopAppInfoGetString func(uintptr, string) string
265 // The @key is looked up in the "Desktop Entry" group.271 // The @key is looked up in the "Desktop Entry" group.
266 func (x *DesktopAppInfo) GetString(KeyVar string) string {272 func (x *DesktopAppInfo) GetString(KeyVar string) string {
267 273
268- return xDesktopAppInfoGetString(x.GoPointer(), KeyVar)274+ cret := xDesktopAppInfoGetString(x.GoPointer(), KeyVar)
269-275+ return cret
270 }276 }
271 277
272 var xDesktopAppInfoGetStringList func(uintptr, string, uint) uintptr278 var xDesktopAppInfoGetStringList func(uintptr, string, uint) uintptr
@@ -276,8 +282,8 @@ var xDesktopAppInfoGetStringList func(uintptr, string, uint) uintptr
276 // The @key is looked up in the "Desktop Entry" group.282 // The @key is looked up in the "Desktop Entry" group.
277 func (x *DesktopAppInfo) GetStringList(KeyVar string, LengthVar uint) uintptr {283 func (x *DesktopAppInfo) GetStringList(KeyVar string, LengthVar uint) uintptr {
278 284
279- return xDesktopAppInfoGetStringList(x.GoPointer(), KeyVar, LengthVar)285+ cret := xDesktopAppInfoGetStringList(x.GoPointer(), KeyVar, LengthVar)
280-286+ return cret
281 }287 }
282 288
283 var xDesktopAppInfoHasKey func(uintptr, string) bool289 var xDesktopAppInfoHasKey func(uintptr, string) bool
@@ -286,8 +292,8 @@ var xDesktopAppInfoHasKey func(uintptr, string) bool
286 // of the keyfile backing @info.292 // of the keyfile backing @info.
287 func (x *DesktopAppInfo) HasKey(KeyVar string) bool {293 func (x *DesktopAppInfo) HasKey(KeyVar string) bool {
288 294
289- return xDesktopAppInfoHasKey(x.GoPointer(), KeyVar)295+ cret := xDesktopAppInfoHasKey(x.GoPointer(), KeyVar)
290-296+ return cret
291 }297 }
292 298
293 var xDesktopAppInfoLaunchAction func(uintptr, string, uintptr)299 var xDesktopAppInfoLaunchAction func(uintptr, string, uintptr)
@@ -313,7 +319,7 @@ func (x *DesktopAppInfo) LaunchAction(ActionNameVar string, LaunchContextVar *Ap
313 319
314 }320 }
315 321
316-var xDesktopAppInfoLaunchUrisAsManager func(uintptr, *glib.List, uintptr, glib.SpawnFlags, uintptr, uintptr, uintptr, uintptr) bool322+var xDesktopAppInfoLaunchUrisAsManager func(uintptr, *glib.List, uintptr, glib.SpawnFlags, uintptr, uintptr, uintptr, uintptr, **glib.Error) bool
317 323
318 // This function performs the equivalent of g_app_info_launch_uris(),324 // This function performs the equivalent of g_app_info_launch_uris(),
319 // but is intended primarily for operating system components that325 // but is intended primarily for operating system components that
@@ -330,13 +336,18 @@ var xDesktopAppInfoLaunchUrisAsManager func(uintptr, *glib.List, uintptr, glib.S
330 // If application launching occurs via some other mechanism (eg: D-Bus336 // If application launching occurs via some other mechanism (eg: D-Bus
331 // activation) then @spawn_flags, @user_setup, @user_setup_data,337 // activation) then @spawn_flags, @user_setup, @user_setup_data,
332 // @pid_callback and @pid_callback_data are ignored.338 // @pid_callback and @pid_callback_data are ignored.
333-func (x *DesktopAppInfo) LaunchUrisAsManager(UrisVar *glib.List, LaunchContextVar *AppLaunchContext, SpawnFlagsVar glib.SpawnFlags, UserSetupVar glib.SpawnChildSetupFunc, UserSetupDataVar uintptr, PidCallbackVar DesktopAppLaunchCallback, PidCallbackDataVar uintptr) bool {339+func (x *DesktopAppInfo) LaunchUrisAsManager(UrisVar *glib.List, LaunchContextVar *AppLaunchContext, SpawnFlagsVar glib.SpawnFlags, UserSetupVar glib.SpawnChildSetupFunc, UserSetupDataVar uintptr, PidCallbackVar DesktopAppLaunchCallback, PidCallbackDataVar uintptr) (bool, error) {
340+ var cerr *glib.Error
334 341
335- return xDesktopAppInfoLaunchUrisAsManager(x.GoPointer(), UrisVar, LaunchContextVar.GoPointer(), SpawnFlagsVar, purego.NewCallback(UserSetupVar), UserSetupDataVar, purego.NewCallback(PidCallbackVar), PidCallbackDataVar)342+ cret := xDesktopAppInfoLaunchUrisAsManager(x.GoPointer(), UrisVar, LaunchContextVar.GoPointer(), SpawnFlagsVar, purego.NewCallback(UserSetupVar), UserSetupDataVar, purego.NewCallback(PidCallbackVar), PidCallbackDataVar, &cerr)
343+ if cerr == nil {
344+ return cret, nil
345+ }
346+ return cret, cerr
336 347
337 }348 }
338 349
339-var xDesktopAppInfoLaunchUrisAsManagerWithFds func(uintptr, *glib.List, uintptr, glib.SpawnFlags, uintptr, uintptr, uintptr, uintptr, int, int, int) bool350+var xDesktopAppInfoLaunchUrisAsManagerWithFds func(uintptr, *glib.List, uintptr, glib.SpawnFlags, uintptr, uintptr, uintptr, uintptr, int, int, int, **glib.Error) bool
340 351
341 // Equivalent to g_desktop_app_info_launch_uris_as_manager() but allows352 // Equivalent to g_desktop_app_info_launch_uris_as_manager() but allows
342 // you to pass in file descriptors for the stdin, stdout and stderr streams353 // you to pass in file descriptors for the stdin, stdout and stderr streams
@@ -344,9 +355,14 @@ var xDesktopAppInfoLaunchUrisAsManagerWithFds func(uintptr, *glib.List, uintptr,
344 //355 //
345 // If application launching occurs via some non-spawn mechanism (e.g. D-Bus356 // If application launching occurs via some non-spawn mechanism (e.g. D-Bus
346 // activation) then @stdin_fd, @stdout_fd and @stderr_fd are ignored.357 // activation) then @stdin_fd, @stdout_fd and @stderr_fd are ignored.
347-func (x *DesktopAppInfo) LaunchUrisAsManagerWithFds(UrisVar *glib.List, LaunchContextVar *AppLaunchContext, SpawnFlagsVar glib.SpawnFlags, UserSetupVar glib.SpawnChildSetupFunc, UserSetupDataVar uintptr, PidCallbackVar DesktopAppLaunchCallback, PidCallbackDataVar uintptr, StdinFdVar int, StdoutFdVar int, StderrFdVar int) bool {358+func (x *DesktopAppInfo) LaunchUrisAsManagerWithFds(UrisVar *glib.List, LaunchContextVar *AppLaunchContext, SpawnFlagsVar glib.SpawnFlags, UserSetupVar glib.SpawnChildSetupFunc, UserSetupDataVar uintptr, PidCallbackVar DesktopAppLaunchCallback, PidCallbackDataVar uintptr, StdinFdVar int, StdoutFdVar int, StderrFdVar int) (bool, error) {
359+ var cerr *glib.Error
348 360
349- return xDesktopAppInfoLaunchUrisAsManagerWithFds(x.GoPointer(), UrisVar, LaunchContextVar.GoPointer(), SpawnFlagsVar, purego.NewCallback(UserSetupVar), UserSetupDataVar, purego.NewCallback(PidCallbackVar), PidCallbackDataVar, StdinFdVar, StdoutFdVar, StderrFdVar)361+ cret := xDesktopAppInfoLaunchUrisAsManagerWithFds(x.GoPointer(), UrisVar, LaunchContextVar.GoPointer(), SpawnFlagsVar, purego.NewCallback(UserSetupVar), UserSetupDataVar, purego.NewCallback(PidCallbackVar), PidCallbackDataVar, StdinFdVar, StdoutFdVar, StderrFdVar, &cerr)
362+ if cerr == nil {
363+ return cret, nil
364+ }
365+ return cret, cerr
350 366
351 }367 }
352 368
@@ -359,8 +375,8 @@ var xDesktopAppInfoListActions func(uintptr) uintptr
359 // explicitly listed in the "Actions" key of the [Desktop Entry] group.375 // explicitly listed in the "Actions" key of the [Desktop Entry] group.
360 func (x *DesktopAppInfo) ListActions() uintptr {376 func (x *DesktopAppInfo) ListActions() uintptr {
361 377
362- return xDesktopAppInfoListActions(x.GoPointer())378+ cret := xDesktopAppInfoListActions(x.GoPointer())
363-379+ return cret
364 }380 }
365 381
366 func (c *DesktopAppInfo) GoPointer() uintptr {382 func (c *DesktopAppInfo) GoPointer() uintptr {
@@ -373,9 +389,14 @@ func (c *DesktopAppInfo) SetGoPointer(ptr uintptr) {
373 389
374 // Adds a content type to the application information to indicate the390 // Adds a content type to the application information to indicate the
375 // application is capable of opening files with the given content type.391 // application is capable of opening files with the given content type.
376-func (x *DesktopAppInfo) AddSupportsType(ContentTypeVar string) bool {392+func (x *DesktopAppInfo) AddSupportsType(ContentTypeVar string) (bool, error) {
393+ var cerr *glib.Error
377 394
378- return XGAppInfoAddSupportsType(x.GoPointer(), ContentTypeVar)395+ cret := XGAppInfoAddSupportsType(x.GoPointer(), ContentTypeVar, &cerr)
396+ if cerr == nil {
397+ return cret, nil
398+ }
399+ return cret, cerr
379 400
380 }401 }
381 402
@@ -383,15 +404,15 @@ func (x *DesktopAppInfo) AddSupportsType(ContentTypeVar string) bool {
383 // See g_app_info_delete().404 // See g_app_info_delete().
384 func (x *DesktopAppInfo) CanDelete() bool {405 func (x *DesktopAppInfo) CanDelete() bool {
385 406
386- return XGAppInfoCanDelete(x.GoPointer())407+ cret := XGAppInfoCanDelete(x.GoPointer())
387-408+ return cret
388 }409 }
389 410
390 // Checks if a supported content type can be removed from an application.411 // Checks if a supported content type can be removed from an application.
391 func (x *DesktopAppInfo) CanRemoveSupportsType() bool {412 func (x *DesktopAppInfo) CanRemoveSupportsType() bool {
392 413
393- return XGAppInfoCanRemoveSupportsType(x.GoPointer())414+ cret := XGAppInfoCanRemoveSupportsType(x.GoPointer())
394-415+ return cret
395 }416 }
396 417
397 // Tries to delete a #GAppInfo.418 // Tries to delete a #GAppInfo.
@@ -401,22 +422,22 @@ func (x *DesktopAppInfo) CanRemoveSupportsType() bool {
401 // See g_app_info_can_delete().422 // See g_app_info_can_delete().
402 func (x *DesktopAppInfo) Delete() bool {423 func (x *DesktopAppInfo) Delete() bool {
403 424
404- return XGAppInfoDelete(x.GoPointer())425+ cret := XGAppInfoDelete(x.GoPointer())
405-426+ return cret
406 }427 }
407 428
408 // Creates a duplicate of a #GAppInfo.429 // Creates a duplicate of a #GAppInfo.
409 func (x *DesktopAppInfo) Dup() *AppInfoBase {430 func (x *DesktopAppInfo) Dup() *AppInfoBase {
431+ var cls *AppInfoBase
410 432
411- DupPtr := XGAppInfoDup(x.GoPointer())433+ cret := XGAppInfoDup(x.GoPointer())
412- if DupPtr == 0 {
413- return nil
414- }
415-
416- DupCls := &AppInfoBase{}
417- DupCls.Ptr = DupPtr
418- return DupCls
419 434
435+ if cret == 0 {
436+ return cls
437+ }
438+ cls = &AppInfoBase{}
439+ cls.Ptr = cret
440+ return cls
420 }441 }
421 442
422 // Checks if two #GAppInfos are equal.443 // Checks if two #GAppInfos are equal.
@@ -426,54 +447,53 @@ func (x *DesktopAppInfo) Dup() *AppInfoBase {
426 // contents is needed, program code must additionally compare relevant fields.447 // contents is needed, program code must additionally compare relevant fields.
427 func (x *DesktopAppInfo) Equal(Appinfo2Var AppInfo) bool {448 func (x *DesktopAppInfo) Equal(Appinfo2Var AppInfo) bool {
428 449
429- return XGAppInfoEqual(x.GoPointer(), Appinfo2Var.GoPointer())450+ cret := XGAppInfoEqual(x.GoPointer(), Appinfo2Var.GoPointer())
430-451+ return cret
431 }452 }
432 453
433 // Gets the commandline with which the application will be454 // Gets the commandline with which the application will be
434 // started.455 // started.
435 func (x *DesktopAppInfo) GetCommandline() string {456 func (x *DesktopAppInfo) GetCommandline() string {
436 457
437- return XGAppInfoGetCommandline(x.GoPointer())458+ cret := XGAppInfoGetCommandline(x.GoPointer())
438-459+ return cret
439 }460 }
440 461
441 // Gets a human-readable description of an installed application.462 // Gets a human-readable description of an installed application.
442 func (x *DesktopAppInfo) GetDescription() string {463 func (x *DesktopAppInfo) GetDescription() string {
443 464
444- return XGAppInfoGetDescription(x.GoPointer())465+ cret := XGAppInfoGetDescription(x.GoPointer())
445-466+ return cret
446 }467 }
447 468
448 // Gets the display name of the application. The display name is often more469 // Gets the display name of the application. The display name is often more
449 // descriptive to the user than the name itself.470 // descriptive to the user than the name itself.
450 func (x *DesktopAppInfo) GetDisplayName() string {471 func (x *DesktopAppInfo) GetDisplayName() string {
451 472
452- return XGAppInfoGetDisplayName(x.GoPointer())473+ cret := XGAppInfoGetDisplayName(x.GoPointer())
453-474+ return cret
454 }475 }
455 476
456 // Gets the executable's name for the installed application.477 // Gets the executable's name for the installed application.
457 func (x *DesktopAppInfo) GetExecutable() string {478 func (x *DesktopAppInfo) GetExecutable() string {
458 479
459- return XGAppInfoGetExecutable(x.GoPointer())480+ cret := XGAppInfoGetExecutable(x.GoPointer())
460-481+ return cret
461 }482 }
462 483
463 // Gets the icon for the application.484 // Gets the icon for the application.
464 func (x *DesktopAppInfo) GetIcon() *IconBase {485 func (x *DesktopAppInfo) GetIcon() *IconBase {
486+ var cls *IconBase
465 487
466- GetIconPtr := XGAppInfoGetIcon(x.GoPointer())488+ cret := XGAppInfoGetIcon(x.GoPointer())
467- if GetIconPtr == 0 {
468- return nil
469- }
470-
471- gobject.IncreaseRef(GetIconPtr)
472-
473- GetIconCls := &IconBase{}
474- GetIconCls.Ptr = GetIconPtr
475- return GetIconCls
476 489
490+ if cret == 0 {
491+ return cls
492+ }
493+ gobject.IncreaseRef(cret)
494+ cls = &IconBase{}
495+ cls.Ptr = cret
496+ return cls
477 }497 }
478 498
479 // Gets the ID of an application. An id is a string that499 // Gets the ID of an application. An id is a string that
@@ -485,15 +505,15 @@ func (x *DesktopAppInfo) GetIcon() *IconBase {
485 // the @appinfo has been constructed.505 // the @appinfo has been constructed.
486 func (x *DesktopAppInfo) GetId() string {506 func (x *DesktopAppInfo) GetId() string {
487 507
488- return XGAppInfoGetId(x.GoPointer())508+ cret := XGAppInfoGetId(x.GoPointer())
489-509+ return cret
490 }510 }
491 511
492 // Gets the installed name of the application.512 // Gets the installed name of the application.
493 func (x *DesktopAppInfo) GetName() string {513 func (x *DesktopAppInfo) GetName() string {
494 514
495- return XGAppInfoGetName(x.GoPointer())515+ cret := XGAppInfoGetName(x.GoPointer())
496-516+ return cret
497 }517 }
498 518
499 // Retrieves the list of content types that @app_info claims to support.519 // Retrieves the list of content types that @app_info claims to support.
@@ -504,8 +524,8 @@ func (x *DesktopAppInfo) GetName() string {
504 // the application.524 // the application.
505 func (x *DesktopAppInfo) GetSupportedTypes() uintptr {525 func (x *DesktopAppInfo) GetSupportedTypes() uintptr {
506 526
507- return XGAppInfoGetSupportedTypes(x.GoPointer())527+ cret := XGAppInfoGetSupportedTypes(x.GoPointer())
508-528+ return cret
509 }529 }
510 530
511 // Launches the application. Passes @files to the launched application531 // Launches the application. Passes @files to the launched application
@@ -535,9 +555,14 @@ func (x *DesktopAppInfo) GetSupportedTypes() uintptr {
535 // should it be inherited by further processes. The `DISPLAY` and555 // should it be inherited by further processes. The `DISPLAY` and
536 // `DESKTOP_STARTUP_ID` environment variables are also set, based556 // `DESKTOP_STARTUP_ID` environment variables are also set, based
537 // on information provided in @context.557 // on information provided in @context.
538-func (x *DesktopAppInfo) Launch(FilesVar *glib.List, ContextVar *AppLaunchContext) bool {558+func (x *DesktopAppInfo) Launch(FilesVar *glib.List, ContextVar *AppLaunchContext) (bool, error) {
559+ var cerr *glib.Error
539 560
540- return XGAppInfoLaunch(x.GoPointer(), FilesVar, ContextVar.GoPointer())561+ cret := XGAppInfoLaunch(x.GoPointer(), FilesVar, ContextVar.GoPointer(), &cerr)
562+ if cerr == nil {
563+ return cret, nil
564+ }
565+ return cret, cerr
541 566
542 }567 }
543 568
@@ -551,9 +576,14 @@ func (x *DesktopAppInfo) Launch(FilesVar *glib.List, ContextVar *AppLaunchContex
551 // Note that even if the launch is successful the application launched576 // Note that even if the launch is successful the application launched
552 // can fail to start if it runs into problems during startup. There is577 // can fail to start if it runs into problems during startup. There is
553 // no way to detect this.578 // no way to detect this.
554-func (x *DesktopAppInfo) LaunchUris(UrisVar *glib.List, ContextVar *AppLaunchContext) bool {579+func (x *DesktopAppInfo) LaunchUris(UrisVar *glib.List, ContextVar *AppLaunchContext) (bool, error) {
580+ var cerr *glib.Error
555 581
556- return XGAppInfoLaunchUris(x.GoPointer(), UrisVar, ContextVar.GoPointer())582+ cret := XGAppInfoLaunchUris(x.GoPointer(), UrisVar, ContextVar.GoPointer(), &cerr)
583+ if cerr == nil {
584+ return cret, nil
585+ }
586+ return cret, cerr
557 587
558 }588 }
559 589
@@ -570,30 +600,50 @@ func (x *DesktopAppInfo) LaunchUrisAsync(UrisVar *glib.List, ContextVar *AppLaun
570 }600 }
571 601
572 // Finishes a g_app_info_launch_uris_async() operation.602 // Finishes a g_app_info_launch_uris_async() operation.
573-func (x *DesktopAppInfo) LaunchUrisFinish(ResultVar AsyncResult) bool {603+func (x *DesktopAppInfo) LaunchUrisFinish(ResultVar AsyncResult) (bool, error) {
604+ var cerr *glib.Error
574 605
575- return XGAppInfoLaunchUrisFinish(x.GoPointer(), ResultVar.GoPointer())606+ cret := XGAppInfoLaunchUrisFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
607+ if cerr == nil {
608+ return cret, nil
609+ }
610+ return cret, cerr
576 611
577 }612 }
578 613
579 // Removes a supported type from an application, if possible.614 // Removes a supported type from an application, if possible.
580-func (x *DesktopAppInfo) RemoveSupportsType(ContentTypeVar string) bool {615+func (x *DesktopAppInfo) RemoveSupportsType(ContentTypeVar string) (bool, error) {
616+ var cerr *glib.Error
581 617
582- return XGAppInfoRemoveSupportsType(x.GoPointer(), ContentTypeVar)618+ cret := XGAppInfoRemoveSupportsType(x.GoPointer(), ContentTypeVar, &cerr)
619+ if cerr == nil {
620+ return cret, nil
621+ }
622+ return cret, cerr
583 623
584 }624 }
585 625
586 // Sets the application as the default handler for the given file extension.626 // Sets the application as the default handler for the given file extension.
587-func (x *DesktopAppInfo) SetAsDefaultForExtension(ExtensionVar string) bool {627+func (x *DesktopAppInfo) SetAsDefaultForExtension(ExtensionVar string) (bool, error) {
628+ var cerr *glib.Error
588 629
589- return XGAppInfoSetAsDefaultForExtension(x.GoPointer(), ExtensionVar)630+ cret := XGAppInfoSetAsDefaultForExtension(x.GoPointer(), ExtensionVar, &cerr)
631+ if cerr == nil {
632+ return cret, nil
633+ }
634+ return cret, cerr
590 635
591 }636 }
592 637
593 // Sets the application as the default handler for a given type.638 // Sets the application as the default handler for a given type.
594-func (x *DesktopAppInfo) SetAsDefaultForType(ContentTypeVar string) bool {639+func (x *DesktopAppInfo) SetAsDefaultForType(ContentTypeVar string) (bool, error) {
640+ var cerr *glib.Error
595 641
596- return XGAppInfoSetAsDefaultForType(x.GoPointer(), ContentTypeVar)642+ cret := XGAppInfoSetAsDefaultForType(x.GoPointer(), ContentTypeVar, &cerr)
643+ if cerr == nil {
644+ return cret, nil
645+ }
646+ return cret, cerr
597 647
598 }648 }
599 649
@@ -601,9 +651,14 @@ func (x *DesktopAppInfo) SetAsDefaultForType(ContentTypeVar string) bool {
601 // This will make the application appear as first in the list returned651 // This will make the application appear as first in the list returned
602 // by g_app_info_get_recommended_for_type(), regardless of the default652 // by g_app_info_get_recommended_for_type(), regardless of the default
603 // application for that content type.653 // application for that content type.
604-func (x *DesktopAppInfo) SetAsLastUsedForType(ContentTypeVar string) bool {654+func (x *DesktopAppInfo) SetAsLastUsedForType(ContentTypeVar string) (bool, error) {
655+ var cerr *glib.Error
605 656
606- return XGAppInfoSetAsLastUsedForType(x.GoPointer(), ContentTypeVar)657+ cret := XGAppInfoSetAsLastUsedForType(x.GoPointer(), ContentTypeVar, &cerr)
658+ if cerr == nil {
659+ return cret, nil
660+ }
661+ return cret, cerr
607 662
608 }663 }
609 664
@@ -611,22 +666,22 @@ func (x *DesktopAppInfo) SetAsLastUsedForType(ContentTypeVar string) bool {
611 // list available applications.666 // list available applications.
612 func (x *DesktopAppInfo) ShouldShow() bool {667 func (x *DesktopAppInfo) ShouldShow() bool {
613 668
614- return XGAppInfoShouldShow(x.GoPointer())669+ cret := XGAppInfoShouldShow(x.GoPointer())
615-670+ return cret
616 }671 }
617 672
618 // Checks if the application accepts files as arguments.673 // Checks if the application accepts files as arguments.
619 func (x *DesktopAppInfo) SupportsFiles() bool {674 func (x *DesktopAppInfo) SupportsFiles() bool {
620 675
621- return XGAppInfoSupportsFiles(x.GoPointer())676+ cret := XGAppInfoSupportsFiles(x.GoPointer())
622-677+ return cret
623 }678 }
624 679
625 // Checks if the application supports reading files and directories from URIs.680 // Checks if the application supports reading files and directories from URIs.
626 func (x *DesktopAppInfo) SupportsUris() bool {681 func (x *DesktopAppInfo) SupportsUris() bool {
627 682
628- return XGAppInfoSupportsUris(x.GoPointer())683+ cret := XGAppInfoSupportsUris(x.GoPointer())
629-684+ return cret
630 }685 }
631 686
632 func init() {687 func init() {
M v4/gio/gdrive.go +88 -63
@@ -85,36 +85,36 @@ func (x *DriveBase) SetGoPointer(ptr uintptr) {
85 // Checks if a drive can be ejected.85 // Checks if a drive can be ejected.
86 func (x *DriveBase) CanEject() bool {86 func (x *DriveBase) CanEject() bool {
87 87
88- return XGDriveCanEject(x.GoPointer())88+ cret := XGDriveCanEject(x.GoPointer())
89-89+ return cret
90 }90 }
91 91
92 // Checks if a drive can be polled for media changes.92 // Checks if a drive can be polled for media changes.
93 func (x *DriveBase) CanPollForMedia() bool {93 func (x *DriveBase) CanPollForMedia() bool {
94 94
95- return XGDriveCanPollForMedia(x.GoPointer())95+ cret := XGDriveCanPollForMedia(x.GoPointer())
96-96+ return cret
97 }97 }
98 98
99 // Checks if a drive can be started.99 // Checks if a drive can be started.
100 func (x *DriveBase) CanStart() bool {100 func (x *DriveBase) CanStart() bool {
101 101
102- return XGDriveCanStart(x.GoPointer())102+ cret := XGDriveCanStart(x.GoPointer())
103-103+ return cret
104 }104 }
105 105
106 // Checks if a drive can be started degraded.106 // Checks if a drive can be started degraded.
107 func (x *DriveBase) CanStartDegraded() bool {107 func (x *DriveBase) CanStartDegraded() bool {
108 108
109- return XGDriveCanStartDegraded(x.GoPointer())109+ cret := XGDriveCanStartDegraded(x.GoPointer())
110-110+ return cret
111 }111 }
112 112
113 // Checks if a drive can be stopped.113 // Checks if a drive can be stopped.
114 func (x *DriveBase) CanStop() bool {114 func (x *DriveBase) CanStop() bool {
115 115
116- return XGDriveCanStop(x.GoPointer())116+ cret := XGDriveCanStop(x.GoPointer())
117-117+ return cret
118 }118 }
119 119
120 // Asynchronously ejects a drive.120 // Asynchronously ejects a drive.
@@ -129,9 +129,14 @@ func (x *DriveBase) Eject(FlagsVar MountUnmountFlags, CancellableVar *Cancellabl
129 }129 }
130 130
131 // Finishes ejecting a drive.131 // Finishes ejecting a drive.
132-func (x *DriveBase) EjectFinish(ResultVar AsyncResult) bool {132+func (x *DriveBase) EjectFinish(ResultVar AsyncResult) (bool, error) {
133+ var cerr *glib.Error
133 134
134- return XGDriveEjectFinish(x.GoPointer(), ResultVar.GoPointer())135+ cret := XGDriveEjectFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
136+ if cerr == nil {
137+ return cret, nil
138+ }
139+ return cret, cerr
135 140
136 }141 }
137 142
@@ -146,9 +151,14 @@ func (x *DriveBase) EjectWithOperation(FlagsVar MountUnmountFlags, MountOperatio
146 151
147 // Finishes ejecting a drive. If any errors occurred during the operation,152 // Finishes ejecting a drive. If any errors occurred during the operation,
148 // @error will be set to contain the errors and %FALSE will be returned.153 // @error will be set to contain the errors and %FALSE will be returned.
149-func (x *DriveBase) EjectWithOperationFinish(ResultVar AsyncResult) bool {154+func (x *DriveBase) EjectWithOperationFinish(ResultVar AsyncResult) (bool, error) {
155+ var cerr *glib.Error
150 156
151- return XGDriveEjectWithOperationFinish(x.GoPointer(), ResultVar.GoPointer())157+ cret := XGDriveEjectWithOperationFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
158+ if cerr == nil {
159+ return cret, nil
160+ }
161+ return cret, cerr
152 162
153 }163 }
154 164
@@ -157,22 +167,22 @@ func (x *DriveBase) EjectWithOperationFinish(ResultVar AsyncResult) bool {
157 // themselves.167 // themselves.
158 func (x *DriveBase) EnumerateIdentifiers() []string {168 func (x *DriveBase) EnumerateIdentifiers() []string {
159 169
160- return XGDriveEnumerateIdentifiers(x.GoPointer())170+ cret := XGDriveEnumerateIdentifiers(x.GoPointer())
161-171+ return cret
162 }172 }
163 173
164 // Gets the icon for @drive.174 // Gets the icon for @drive.
165 func (x *DriveBase) GetIcon() *IconBase {175 func (x *DriveBase) GetIcon() *IconBase {
176+ var cls *IconBase
166 177
167- GetIconPtr := XGDriveGetIcon(x.GoPointer())178+ cret := XGDriveGetIcon(x.GoPointer())
168- if GetIconPtr == 0 {
169- return nil
170- }
171-
172- GetIconCls := &IconBase{}
173- GetIconCls.Ptr = GetIconPtr
174- return GetIconCls
175 179
180+ if cret == 0 {
181+ return cls
182+ }
183+ cls = &IconBase{}
184+ cls.Ptr = cret
185+ return cls
176 }186 }
177 187
178 // Gets the identifier of the given kind for @drive. The only188 // Gets the identifier of the given kind for @drive. The only
@@ -180,43 +190,43 @@ func (x *DriveBase) GetIcon() *IconBase {
180 // %G_DRIVE_IDENTIFIER_KIND_UNIX_DEVICE.190 // %G_DRIVE_IDENTIFIER_KIND_UNIX_DEVICE.
181 func (x *DriveBase) GetIdentifier(KindVar string) string {191 func (x *DriveBase) GetIdentifier(KindVar string) string {
182 192
183- return XGDriveGetIdentifier(x.GoPointer(), KindVar)193+ cret := XGDriveGetIdentifier(x.GoPointer(), KindVar)
184-194+ return cret
185 }195 }
186 196
187 // Gets the name of @drive.197 // Gets the name of @drive.
188 func (x *DriveBase) GetName() string {198 func (x *DriveBase) GetName() string {
189 199
190- return XGDriveGetName(x.GoPointer())200+ cret := XGDriveGetName(x.GoPointer())
191-201+ return cret
192 }202 }
193 203
194 // Gets the sort key for @drive, if any.204 // Gets the sort key for @drive, if any.
195 func (x *DriveBase) GetSortKey() string {205 func (x *DriveBase) GetSortKey() string {
196 206
197- return XGDriveGetSortKey(x.GoPointer())207+ cret := XGDriveGetSortKey(x.GoPointer())
198-208+ return cret
199 }209 }
200 210
201 // Gets a hint about how a drive can be started/stopped.211 // Gets a hint about how a drive can be started/stopped.
202 func (x *DriveBase) GetStartStopType() DriveStartStopType {212 func (x *DriveBase) GetStartStopType() DriveStartStopType {
203 213
204- return XGDriveGetStartStopType(x.GoPointer())214+ cret := XGDriveGetStartStopType(x.GoPointer())
205-215+ return cret
206 }216 }
207 217
208 // Gets the icon for @drive.218 // Gets the icon for @drive.
209 func (x *DriveBase) GetSymbolicIcon() *IconBase {219 func (x *DriveBase) GetSymbolicIcon() *IconBase {
220+ var cls *IconBase
210 221
211- GetSymbolicIconPtr := XGDriveGetSymbolicIcon(x.GoPointer())222+ cret := XGDriveGetSymbolicIcon(x.GoPointer())
212- if GetSymbolicIconPtr == 0 {
213- return nil
214- }
215-
216- GetSymbolicIconCls := &IconBase{}
217- GetSymbolicIconCls.Ptr = GetSymbolicIconPtr
218- return GetSymbolicIconCls
219 223
224+ if cret == 0 {
225+ return cls
226+ }
227+ cls = &IconBase{}
228+ cls.Ptr = cret
229+ return cls
220 }230 }
221 231
222 // Get a list of mountable volumes for @drive.232 // Get a list of mountable volumes for @drive.
@@ -225,8 +235,8 @@ func (x *DriveBase) GetSymbolicIcon() *IconBase {
225 // its elements have been unreffed with g_object_unref().235 // its elements have been unreffed with g_object_unref().
226 func (x *DriveBase) GetVolumes() *glib.List {236 func (x *DriveBase) GetVolumes() *glib.List {
227 237
228- return XGDriveGetVolumes(x.GoPointer())238+ cret := XGDriveGetVolumes(x.GoPointer())
229-239+ return cret
230 }240 }
231 241
232 // Checks if the @drive has media. Note that the OS may not be polling242 // Checks if the @drive has media. Note that the OS may not be polling
@@ -234,37 +244,37 @@ func (x *DriveBase) GetVolumes() *glib.List {
234 // for more details.244 // for more details.
235 func (x *DriveBase) HasMedia() bool {245 func (x *DriveBase) HasMedia() bool {
236 246
237- return XGDriveHasMedia(x.GoPointer())247+ cret := XGDriveHasMedia(x.GoPointer())
238-248+ return cret
239 }249 }
240 250
241 // Check if @drive has any mountable volumes.251 // Check if @drive has any mountable volumes.
242 func (x *DriveBase) HasVolumes() bool {252 func (x *DriveBase) HasVolumes() bool {
243 253
244- return XGDriveHasVolumes(x.GoPointer())254+ cret := XGDriveHasVolumes(x.GoPointer())
245-255+ return cret
246 }256 }
247 257
248 // Checks if @drive is capable of automatically detecting media changes.258 // Checks if @drive is capable of automatically detecting media changes.
249 func (x *DriveBase) IsMediaCheckAutomatic() bool {259 func (x *DriveBase) IsMediaCheckAutomatic() bool {
250 260
251- return XGDriveIsMediaCheckAutomatic(x.GoPointer())261+ cret := XGDriveIsMediaCheckAutomatic(x.GoPointer())
252-262+ return cret
253 }263 }
254 264
255 // Checks if the @drive supports removable media.265 // Checks if the @drive supports removable media.
256 func (x *DriveBase) IsMediaRemovable() bool {266 func (x *DriveBase) IsMediaRemovable() bool {
257 267
258- return XGDriveIsMediaRemovable(x.GoPointer())268+ cret := XGDriveIsMediaRemovable(x.GoPointer())
259-269+ return cret
260 }270 }
261 271
262 // Checks if the #GDrive and/or its media is considered removable by the user.272 // Checks if the #GDrive and/or its media is considered removable by the user.
263 // See g_drive_is_media_removable().273 // See g_drive_is_media_removable().
264 func (x *DriveBase) IsRemovable() bool {274 func (x *DriveBase) IsRemovable() bool {
265 275
266- return XGDriveIsRemovable(x.GoPointer())276+ cret := XGDriveIsRemovable(x.GoPointer())
267-277+ return cret
268 }278 }
269 279
270 // Asynchronously polls @drive to see if media has been inserted or removed.280 // Asynchronously polls @drive to see if media has been inserted or removed.
@@ -279,9 +289,14 @@ func (x *DriveBase) PollForMedia(CancellableVar *Cancellable, CallbackVar AsyncR
279 }289 }
280 290
281 // Finishes an operation started with g_drive_poll_for_media() on a drive.291 // Finishes an operation started with g_drive_poll_for_media() on a drive.
282-func (x *DriveBase) PollForMediaFinish(ResultVar AsyncResult) bool {292+func (x *DriveBase) PollForMediaFinish(ResultVar AsyncResult) (bool, error) {
293+ var cerr *glib.Error
283 294
284- return XGDrivePollForMediaFinish(x.GoPointer(), ResultVar.GoPointer())295+ cret := XGDrivePollForMediaFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
296+ if cerr == nil {
297+ return cret, nil
298+ }
299+ return cret, cerr
285 300
286 }301 }
287 302
@@ -297,9 +312,14 @@ func (x *DriveBase) Start(FlagsVar DriveStartFlags, MountOperationVar *MountOper
297 }312 }
298 313
299 // Finishes starting a drive.314 // Finishes starting a drive.
300-func (x *DriveBase) StartFinish(ResultVar AsyncResult) bool {315+func (x *DriveBase) StartFinish(ResultVar AsyncResult) (bool, error) {
316+ var cerr *glib.Error
301 317
302- return XGDriveStartFinish(x.GoPointer(), ResultVar.GoPointer())318+ cret := XGDriveStartFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
319+ if cerr == nil {
320+ return cret, nil
321+ }
322+ return cret, cerr
303 323
304 }324 }
305 325
@@ -315,9 +335,14 @@ func (x *DriveBase) Stop(FlagsVar MountUnmountFlags, MountOperationVar *MountOpe
315 }335 }
316 336
317 // Finishes stopping a drive.337 // Finishes stopping a drive.
318-func (x *DriveBase) StopFinish(ResultVar AsyncResult) bool {338+func (x *DriveBase) StopFinish(ResultVar AsyncResult) (bool, error) {
339+ var cerr *glib.Error
319 340
320- return XGDriveStopFinish(x.GoPointer(), ResultVar.GoPointer())341+ cret := XGDriveStopFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
342+ if cerr == nil {
343+ return cret, nil
344+ }
345+ return cret, cerr
321 346
322 }347 }
323 348
@@ -327,9 +352,9 @@ var XGDriveCanStart func(uintptr) bool
327 var XGDriveCanStartDegraded func(uintptr) bool352 var XGDriveCanStartDegraded func(uintptr) bool
328 var XGDriveCanStop func(uintptr) bool353 var XGDriveCanStop func(uintptr) bool
329 var XGDriveEject func(uintptr, MountUnmountFlags, uintptr, uintptr, uintptr)354 var XGDriveEject func(uintptr, MountUnmountFlags, uintptr, uintptr, uintptr)
330-var XGDriveEjectFinish func(uintptr, uintptr) bool355+var XGDriveEjectFinish func(uintptr, uintptr, **glib.Error) bool
331 var XGDriveEjectWithOperation func(uintptr, MountUnmountFlags, uintptr, uintptr, uintptr, uintptr)356 var XGDriveEjectWithOperation func(uintptr, MountUnmountFlags, uintptr, uintptr, uintptr, uintptr)
332-var XGDriveEjectWithOperationFinish func(uintptr, uintptr) bool357+var XGDriveEjectWithOperationFinish func(uintptr, uintptr, **glib.Error) bool
333 var XGDriveEnumerateIdentifiers func(uintptr) []string358 var XGDriveEnumerateIdentifiers func(uintptr) []string
334 var XGDriveGetIcon func(uintptr) uintptr359 var XGDriveGetIcon func(uintptr) uintptr
335 var XGDriveGetIdentifier func(uintptr, string) string360 var XGDriveGetIdentifier func(uintptr, string) string
@@ -344,11 +369,11 @@ var XGDriveIsMediaCheckAutomatic func(uintptr) bool
344 var XGDriveIsMediaRemovable func(uintptr) bool369 var XGDriveIsMediaRemovable func(uintptr) bool
345 var XGDriveIsRemovable func(uintptr) bool370 var XGDriveIsRemovable func(uintptr) bool
346 var XGDrivePollForMedia func(uintptr, uintptr, uintptr, uintptr)371 var XGDrivePollForMedia func(uintptr, uintptr, uintptr, uintptr)
347-var XGDrivePollForMediaFinish func(uintptr, uintptr) bool372+var XGDrivePollForMediaFinish func(uintptr, uintptr, **glib.Error) bool
348 var XGDriveStart func(uintptr, DriveStartFlags, uintptr, uintptr, uintptr, uintptr)373 var XGDriveStart func(uintptr, DriveStartFlags, uintptr, uintptr, uintptr, uintptr)
349-var XGDriveStartFinish func(uintptr, uintptr) bool374+var XGDriveStartFinish func(uintptr, uintptr, **glib.Error) bool
350 var XGDriveStop func(uintptr, MountUnmountFlags, uintptr, uintptr, uintptr, uintptr)375 var XGDriveStop func(uintptr, MountUnmountFlags, uintptr, uintptr, uintptr, uintptr)
351-var XGDriveStopFinish func(uintptr, uintptr) bool376+var XGDriveStopFinish func(uintptr, uintptr, **glib.Error) bool
352 377
353 func init() {378 func init() {
354 lib, err := purego.Dlopen(core.GetPath("GIO"), purego.RTLD_NOW|purego.RTLD_GLOBAL)379 lib, err := purego.Dlopen(core.GetPath("GIO"), purego.RTLD_NOW|purego.RTLD_GLOBAL)
M v4/gio/gdtlsclientconnection.go +27 -23
@@ -45,31 +45,30 @@ func (x *DtlsClientConnectionBase) SetGoPointer(ptr uintptr) {
45 // subject DN of the certificate authority.45 // subject DN of the certificate authority.
46 func (x *DtlsClientConnectionBase) GetAcceptedCas() *glib.List {46 func (x *DtlsClientConnectionBase) GetAcceptedCas() *glib.List {
47 47
48- return XGDtlsClientConnectionGetAcceptedCas(x.GoPointer())48+ cret := XGDtlsClientConnectionGetAcceptedCas(x.GoPointer())
49-49+ return cret
50 }50 }
51 51
52 // Gets @conn's expected server identity52 // Gets @conn's expected server identity
53 func (x *DtlsClientConnectionBase) GetServerIdentity() *SocketConnectableBase {53 func (x *DtlsClientConnectionBase) GetServerIdentity() *SocketConnectableBase {
54+ var cls *SocketConnectableBase
54 55
55- GetServerIdentityPtr := XGDtlsClientConnectionGetServerIdentity(x.GoPointer())56+ cret := XGDtlsClientConnectionGetServerIdentity(x.GoPointer())
56- if GetServerIdentityPtr == 0 {
57- return nil
58- }
59-
60- gobject.IncreaseRef(GetServerIdentityPtr)
61-
62- GetServerIdentityCls := &SocketConnectableBase{}
63- GetServerIdentityCls.Ptr = GetServerIdentityPtr
64- return GetServerIdentityCls
65 57
58+ if cret == 0 {
59+ return cls
60+ }
61+ gobject.IncreaseRef(cret)
62+ cls = &SocketConnectableBase{}
63+ cls.Ptr = cret
64+ return cls
66 }65 }
67 66
68 // Gets @conn's validation flags67 // Gets @conn's validation flags
69 func (x *DtlsClientConnectionBase) GetValidationFlags() TlsCertificateFlags {68 func (x *DtlsClientConnectionBase) GetValidationFlags() TlsCertificateFlags {
70 69
71- return XGDtlsClientConnectionGetValidationFlags(x.GoPointer())70+ cret := XGDtlsClientConnectionGetValidationFlags(x.GoPointer())
72-71+ return cret
73 }72 }
74 73
75 // Sets @conn's expected server identity, which is used both to tell74 // Sets @conn's expected server identity, which is used both to tell
@@ -97,20 +96,25 @@ var XGDtlsClientConnectionGetValidationFlags func(uintptr) TlsCertificateFlags
97 var XGDtlsClientConnectionSetServerIdentity func(uintptr, uintptr)96 var XGDtlsClientConnectionSetServerIdentity func(uintptr, uintptr)
98 var XGDtlsClientConnectionSetValidationFlags func(uintptr, TlsCertificateFlags)97 var XGDtlsClientConnectionSetValidationFlags func(uintptr, TlsCertificateFlags)
99 98
100-var xDtlsClientConnectionNew func(uintptr, uintptr) uintptr99+var xDtlsClientConnectionNew func(uintptr, uintptr, **glib.Error) uintptr
101 100
102 // Creates a new #GDtlsClientConnection wrapping @base_socket which is101 // Creates a new #GDtlsClientConnection wrapping @base_socket which is
103 // assumed to communicate with the server identified by @server_identity.102 // assumed to communicate with the server identified by @server_identity.
104-func DtlsClientConnectionNew(BaseSocketVar DatagramBased, ServerIdentityVar SocketConnectable) *DtlsClientConnectionBase {103+func DtlsClientConnectionNew(BaseSocketVar DatagramBased, ServerIdentityVar SocketConnectable) (*DtlsClientConnectionBase, error) {
104+ var cls *DtlsClientConnectionBase
105+ var cerr *glib.Error
105 106
106- DtlsClientConnectionNewPtr := xDtlsClientConnectionNew(BaseSocketVar.GoPointer(), ServerIdentityVar.GoPointer())107+ cret := xDtlsClientConnectionNew(BaseSocketVar.GoPointer(), ServerIdentityVar.GoPointer(), &cerr)
107- if DtlsClientConnectionNewPtr == 0 {
108- return nil
109- }
110 108
111- DtlsClientConnectionNewCls := &DtlsClientConnectionBase{}109+ if cret == 0 {
112- DtlsClientConnectionNewCls.Ptr = DtlsClientConnectionNewPtr110+ return cls, cerr
113- return DtlsClientConnectionNewCls111+ }
112+ cls = &DtlsClientConnectionBase{}
113+ cls.Ptr = cret
114+ if cerr == nil {
115+ return cls, nil
116+ }
117+ return cls, cerr
114 118
115 }119 }
116 120
M v4/gio/gdtlsconnection.go +107 -75
@@ -4,6 +4,7 @@ package gio
4 import (4 import (
5 "github.com/jwijenbergh/purego"5 "github.com/jwijenbergh/purego"
6 "github.com/jwijenbergh/puregotk/internal/core"6 "github.com/jwijenbergh/puregotk/internal/core"
7+ "github.com/jwijenbergh/puregotk/v4/glib"
7 "github.com/jwijenbergh/puregotk/v4/gobject"8 "github.com/jwijenbergh/puregotk/v4/gobject"
8 )9 )
9 10
@@ -93,9 +94,14 @@ func (x *DtlsConnectionBase) SetGoPointer(ptr uintptr) {
93 // If @cancellable is cancelled, the #GDtlsConnection may be left94 // If @cancellable is cancelled, the #GDtlsConnection may be left
94 // partially-closed and any pending untransmitted data may be lost. Call95 // partially-closed and any pending untransmitted data may be lost. Call
95 // g_dtls_connection_close() again to complete closing the #GDtlsConnection.96 // g_dtls_connection_close() again to complete closing the #GDtlsConnection.
96-func (x *DtlsConnectionBase) Close(CancellableVar *Cancellable) bool {97+func (x *DtlsConnectionBase) Close(CancellableVar *Cancellable) (bool, error) {
98+ var cerr *glib.Error
97 99
98- return XGDtlsConnectionClose(x.GoPointer(), CancellableVar.GoPointer())100+ cret := XGDtlsConnectionClose(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
101+ if cerr == nil {
102+ return cret, nil
103+ }
104+ return cret, cerr
99 105
100 }106 }
101 107
@@ -109,9 +115,14 @@ func (x *DtlsConnectionBase) CloseAsync(IoPriorityVar int, CancellableVar *Cance
109 115
110 // Finish an asynchronous TLS close operation. See g_dtls_connection_close()116 // Finish an asynchronous TLS close operation. See g_dtls_connection_close()
111 // for more information.117 // for more information.
112-func (x *DtlsConnectionBase) CloseFinish(ResultVar AsyncResult) bool {118+func (x *DtlsConnectionBase) CloseFinish(ResultVar AsyncResult) (bool, error) {
119+ var cerr *glib.Error
113 120
114- return XGDtlsConnectionCloseFinish(x.GoPointer(), ResultVar.GoPointer())121+ cret := XGDtlsConnectionCloseFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
122+ if cerr == nil {
123+ return cret, nil
124+ }
125+ return cret, cerr
115 126
116 }127 }
117 128
@@ -119,25 +130,24 @@ func (x *DtlsConnectionBase) CloseFinish(ResultVar AsyncResult) bool {
119 // #GDtlsConnection::accept-certificate signal.130 // #GDtlsConnection::accept-certificate signal.
120 func (x *DtlsConnectionBase) EmitAcceptCertificate(PeerCertVar *TlsCertificate, ErrorsVar TlsCertificateFlags) bool {131 func (x *DtlsConnectionBase) EmitAcceptCertificate(PeerCertVar *TlsCertificate, ErrorsVar TlsCertificateFlags) bool {
121 132
122- return XGDtlsConnectionEmitAcceptCertificate(x.GoPointer(), PeerCertVar.GoPointer(), ErrorsVar)133+ cret := XGDtlsConnectionEmitAcceptCertificate(x.GoPointer(), PeerCertVar.GoPointer(), ErrorsVar)
123-134+ return cret
124 }135 }
125 136
126 // Gets @conn's certificate, as set by137 // Gets @conn's certificate, as set by
127 // g_dtls_connection_set_certificate().138 // g_dtls_connection_set_certificate().
128 func (x *DtlsConnectionBase) GetCertificate() *TlsCertificate {139 func (x *DtlsConnectionBase) GetCertificate() *TlsCertificate {
140+ var cls *TlsCertificate
129 141
130- GetCertificatePtr := XGDtlsConnectionGetCertificate(x.GoPointer())142+ cret := XGDtlsConnectionGetCertificate(x.GoPointer())
131- if GetCertificatePtr == 0 {
132- return nil
133- }
134-
135- gobject.IncreaseRef(GetCertificatePtr)
136-
137- GetCertificateCls := &TlsCertificate{}
138- GetCertificateCls.Ptr = GetCertificatePtr
139- return GetCertificateCls
140 143
144+ if cret == 0 {
145+ return cls
146+ }
147+ gobject.IncreaseRef(cret)
148+ cls = &TlsCertificate{}
149+ cls.Ptr = cret
150+ return cls
141 }151 }
142 152
143 // Query the TLS backend for TLS channel binding data of @type for @conn.153 // Query the TLS backend for TLS channel binding data of @type for @conn.
@@ -153,9 +163,14 @@ func (x *DtlsConnectionBase) GetCertificate() *TlsCertificate {
153 // will be available though. That could happen if TLS connection does not163 // will be available though. That could happen if TLS connection does not
154 // support @type or the binding data is not available yet due to additional164 // support @type or the binding data is not available yet due to additional
155 // negotiation or input required.165 // negotiation or input required.
156-func (x *DtlsConnectionBase) GetChannelBindingData(TypeVar TlsChannelBindingType, DataVar uintptr) bool {166+func (x *DtlsConnectionBase) GetChannelBindingData(TypeVar TlsChannelBindingType, DataVar uintptr) (bool, error) {
167+ var cerr *glib.Error
157 168
158- return XGDtlsConnectionGetChannelBindingData(x.GoPointer(), TypeVar, DataVar)169+ cret := XGDtlsConnectionGetChannelBindingData(x.GoPointer(), TypeVar, DataVar, &cerr)
170+ if cerr == nil {
171+ return cret, nil
172+ }
173+ return cret, cerr
159 174
160 }175 }
161 176
@@ -169,43 +184,41 @@ func (x *DtlsConnectionBase) GetChannelBindingData(TypeVar TlsChannelBindingType
169 // is not recommended.184 // is not recommended.
170 func (x *DtlsConnectionBase) GetCiphersuiteName() string {185 func (x *DtlsConnectionBase) GetCiphersuiteName() string {
171 186
172- return XGDtlsConnectionGetCiphersuiteName(x.GoPointer())187+ cret := XGDtlsConnectionGetCiphersuiteName(x.GoPointer())
173-188+ return cret
174 }189 }
175 190
176 // Gets the certificate database that @conn uses to verify191 // Gets the certificate database that @conn uses to verify
177 // peer certificates. See g_dtls_connection_set_database().192 // peer certificates. See g_dtls_connection_set_database().
178 func (x *DtlsConnectionBase) GetDatabase() *TlsDatabase {193 func (x *DtlsConnectionBase) GetDatabase() *TlsDatabase {
194+ var cls *TlsDatabase
179 195
180- GetDatabasePtr := XGDtlsConnectionGetDatabase(x.GoPointer())196+ cret := XGDtlsConnectionGetDatabase(x.GoPointer())
181- if GetDatabasePtr == 0 {
182- return nil
183- }
184-
185- gobject.IncreaseRef(GetDatabasePtr)
186-
187- GetDatabaseCls := &TlsDatabase{}
188- GetDatabaseCls.Ptr = GetDatabasePtr
189- return GetDatabaseCls
190 197
198+ if cret == 0 {
199+ return cls
200+ }
201+ gobject.IncreaseRef(cret)
202+ cls = &TlsDatabase{}
203+ cls.Ptr = cret
204+ return cls
191 }205 }
192 206
193 // Get the object that will be used to interact with the user. It will be used207 // Get the object that will be used to interact with the user. It will be used
194 // for things like prompting the user for passwords. If %NULL is returned, then208 // for things like prompting the user for passwords. If %NULL is returned, then
195 // no user interaction will occur for this connection.209 // no user interaction will occur for this connection.
196 func (x *DtlsConnectionBase) GetInteraction() *TlsInteraction {210 func (x *DtlsConnectionBase) GetInteraction() *TlsInteraction {
211+ var cls *TlsInteraction
197 212
198- GetInteractionPtr := XGDtlsConnectionGetInteraction(x.GoPointer())213+ cret := XGDtlsConnectionGetInteraction(x.GoPointer())
199- if GetInteractionPtr == 0 {
200- return nil
201- }
202-
203- gobject.IncreaseRef(GetInteractionPtr)
204-
205- GetInteractionCls := &TlsInteraction{}
206- GetInteractionCls.Ptr = GetInteractionPtr
207- return GetInteractionCls
208 214
215+ if cret == 0 {
216+ return cls
217+ }
218+ gobject.IncreaseRef(cret)
219+ cls = &TlsInteraction{}
220+ cls.Ptr = cret
221+ return cls
209 }222 }
210 223
211 // Gets the name of the application-layer protocol negotiated during224 // Gets the name of the application-layer protocol negotiated during
@@ -217,26 +230,25 @@ func (x *DtlsConnectionBase) GetInteraction() *TlsInteraction {
217 // g_dtls_connection_set_advertised_protocols().230 // g_dtls_connection_set_advertised_protocols().
218 func (x *DtlsConnectionBase) GetNegotiatedProtocol() string {231 func (x *DtlsConnectionBase) GetNegotiatedProtocol() string {
219 232
220- return XGDtlsConnectionGetNegotiatedProtocol(x.GoPointer())233+ cret := XGDtlsConnectionGetNegotiatedProtocol(x.GoPointer())
221-234+ return cret
222 }235 }
223 236
224 // Gets @conn's peer's certificate after the handshake has completed237 // Gets @conn's peer's certificate after the handshake has completed
225 // or failed. (It is not set during the emission of238 // or failed. (It is not set during the emission of
226 // #GDtlsConnection::accept-certificate.)239 // #GDtlsConnection::accept-certificate.)
227 func (x *DtlsConnectionBase) GetPeerCertificate() *TlsCertificate {240 func (x *DtlsConnectionBase) GetPeerCertificate() *TlsCertificate {
241+ var cls *TlsCertificate
228 242
229- GetPeerCertificatePtr := XGDtlsConnectionGetPeerCertificate(x.GoPointer())243+ cret := XGDtlsConnectionGetPeerCertificate(x.GoPointer())
230- if GetPeerCertificatePtr == 0 {
231- return nil
232- }
233-
234- gobject.IncreaseRef(GetPeerCertificatePtr)
235-
236- GetPeerCertificateCls := &TlsCertificate{}
237- GetPeerCertificateCls.Ptr = GetPeerCertificatePtr
238- return GetPeerCertificateCls
239 244
245+ if cret == 0 {
246+ return cls
247+ }
248+ gobject.IncreaseRef(cret)
249+ cls = &TlsCertificate{}
250+ cls.Ptr = cret
251+ return cls
240 }252 }
241 253
242 // Gets the errors associated with validating @conn's peer's254 // Gets the errors associated with validating @conn's peer's
@@ -244,8 +256,8 @@ func (x *DtlsConnectionBase) GetPeerCertificate() *TlsCertificate {
244 // not set during the emission of #GDtlsConnection::accept-certificate.)256 // not set during the emission of #GDtlsConnection::accept-certificate.)
245 func (x *DtlsConnectionBase) GetPeerCertificateErrors() TlsCertificateFlags {257 func (x *DtlsConnectionBase) GetPeerCertificateErrors() TlsCertificateFlags {
246 258
247- return XGDtlsConnectionGetPeerCertificateErrors(x.GoPointer())259+ cret := XGDtlsConnectionGetPeerCertificateErrors(x.GoPointer())
248-260+ return cret
249 }261 }
250 262
251 // Returns the current DTLS protocol version, which may be263 // Returns the current DTLS protocol version, which may be
@@ -254,16 +266,16 @@ func (x *DtlsConnectionBase) GetPeerCertificateErrors() TlsCertificateFlags {
254 // that is not a recognized #GTlsProtocolVersion.266 // that is not a recognized #GTlsProtocolVersion.
255 func (x *DtlsConnectionBase) GetProtocolVersion() TlsProtocolVersion {267 func (x *DtlsConnectionBase) GetProtocolVersion() TlsProtocolVersion {
256 268
257- return XGDtlsConnectionGetProtocolVersion(x.GoPointer())269+ cret := XGDtlsConnectionGetProtocolVersion(x.GoPointer())
258-270+ return cret
259 }271 }
260 272
261 // Gets @conn rehandshaking mode. See273 // Gets @conn rehandshaking mode. See
262 // g_dtls_connection_set_rehandshake_mode() for details.274 // g_dtls_connection_set_rehandshake_mode() for details.
263 func (x *DtlsConnectionBase) GetRehandshakeMode() TlsRehandshakeMode {275 func (x *DtlsConnectionBase) GetRehandshakeMode() TlsRehandshakeMode {
264 276
265- return XGDtlsConnectionGetRehandshakeMode(x.GoPointer())277+ cret := XGDtlsConnectionGetRehandshakeMode(x.GoPointer())
266-278+ return cret
267 }279 }
268 280
269 // Tests whether or not @conn expects a proper TLS close notification281 // Tests whether or not @conn expects a proper TLS close notification
@@ -271,8 +283,8 @@ func (x *DtlsConnectionBase) GetRehandshakeMode() TlsRehandshakeMode {
271 // g_dtls_connection_set_require_close_notify() for details.283 // g_dtls_connection_set_require_close_notify() for details.
272 func (x *DtlsConnectionBase) GetRequireCloseNotify() bool {284 func (x *DtlsConnectionBase) GetRequireCloseNotify() bool {
273 285
274- return XGDtlsConnectionGetRequireCloseNotify(x.GoPointer())286+ cret := XGDtlsConnectionGetRequireCloseNotify(x.GoPointer())
275-287+ return cret
276 }288 }
277 289
278 // Attempts a TLS handshake on @conn.290 // Attempts a TLS handshake on @conn.
@@ -301,9 +313,14 @@ func (x *DtlsConnectionBase) GetRequireCloseNotify() bool {
301 //313 //
302 // #GDtlsConnection::accept_certificate may be emitted during the314 // #GDtlsConnection::accept_certificate may be emitted during the
303 // handshake.315 // handshake.
304-func (x *DtlsConnectionBase) Handshake(CancellableVar *Cancellable) bool {316+func (x *DtlsConnectionBase) Handshake(CancellableVar *Cancellable) (bool, error) {
317+ var cerr *glib.Error
305 318
306- return XGDtlsConnectionHandshake(x.GoPointer(), CancellableVar.GoPointer())319+ cret := XGDtlsConnectionHandshake(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
320+ if cerr == nil {
321+ return cret, nil
322+ }
323+ return cret, cerr
307 324
308 }325 }
309 326
@@ -317,9 +334,14 @@ func (x *DtlsConnectionBase) HandshakeAsync(IoPriorityVar int, CancellableVar *C
317 334
318 // Finish an asynchronous TLS handshake operation. See335 // Finish an asynchronous TLS handshake operation. See
319 // g_dtls_connection_handshake() for more information.336 // g_dtls_connection_handshake() for more information.
320-func (x *DtlsConnectionBase) HandshakeFinish(ResultVar AsyncResult) bool {337+func (x *DtlsConnectionBase) HandshakeFinish(ResultVar AsyncResult) (bool, error) {
338+ var cerr *glib.Error
321 339
322- return XGDtlsConnectionHandshakeFinish(x.GoPointer(), ResultVar.GoPointer())340+ cret := XGDtlsConnectionHandshakeFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
341+ if cerr == nil {
342+ return cret, nil
343+ }
344+ return cret, cerr
323 345
324 }346 }
325 347
@@ -449,9 +471,14 @@ func (x *DtlsConnectionBase) SetRequireCloseNotify(RequireCloseNotifyVar bool) {
449 // If @cancellable is cancelled, the #GDtlsConnection may be left471 // If @cancellable is cancelled, the #GDtlsConnection may be left
450 // partially-closed and any pending untransmitted data may be lost. Call472 // partially-closed and any pending untransmitted data may be lost. Call
451 // g_dtls_connection_shutdown() again to complete closing the #GDtlsConnection.473 // g_dtls_connection_shutdown() again to complete closing the #GDtlsConnection.
452-func (x *DtlsConnectionBase) Shutdown(ShutdownReadVar bool, ShutdownWriteVar bool, CancellableVar *Cancellable) bool {474+func (x *DtlsConnectionBase) Shutdown(ShutdownReadVar bool, ShutdownWriteVar bool, CancellableVar *Cancellable) (bool, error) {
475+ var cerr *glib.Error
453 476
454- return XGDtlsConnectionShutdown(x.GoPointer(), ShutdownReadVar, ShutdownWriteVar, CancellableVar.GoPointer())477+ cret := XGDtlsConnectionShutdown(x.GoPointer(), ShutdownReadVar, ShutdownWriteVar, CancellableVar.GoPointer(), &cerr)
478+ if cerr == nil {
479+ return cret, nil
480+ }
481+ return cret, cerr
455 482
456 }483 }
457 484
@@ -465,18 +492,23 @@ func (x *DtlsConnectionBase) ShutdownAsync(ShutdownReadVar bool, ShutdownWriteVa
465 492
466 // Finish an asynchronous TLS shutdown operation. See493 // Finish an asynchronous TLS shutdown operation. See
467 // g_dtls_connection_shutdown() for more information.494 // g_dtls_connection_shutdown() for more information.
468-func (x *DtlsConnectionBase) ShutdownFinish(ResultVar AsyncResult) bool {495+func (x *DtlsConnectionBase) ShutdownFinish(ResultVar AsyncResult) (bool, error) {
496+ var cerr *glib.Error
469 497
470- return XGDtlsConnectionShutdownFinish(x.GoPointer(), ResultVar.GoPointer())498+ cret := XGDtlsConnectionShutdownFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
499+ if cerr == nil {
500+ return cret, nil
501+ }
502+ return cret, cerr
471 503
472 }504 }
473 505
474-var XGDtlsConnectionClose func(uintptr, uintptr) bool506+var XGDtlsConnectionClose func(uintptr, uintptr, **glib.Error) bool
475 var XGDtlsConnectionCloseAsync func(uintptr, int, uintptr, uintptr, uintptr)507 var XGDtlsConnectionCloseAsync func(uintptr, int, uintptr, uintptr, uintptr)
476-var XGDtlsConnectionCloseFinish func(uintptr, uintptr) bool508+var XGDtlsConnectionCloseFinish func(uintptr, uintptr, **glib.Error) bool
477 var XGDtlsConnectionEmitAcceptCertificate func(uintptr, uintptr, TlsCertificateFlags) bool509 var XGDtlsConnectionEmitAcceptCertificate func(uintptr, uintptr, TlsCertificateFlags) bool
478 var XGDtlsConnectionGetCertificate func(uintptr) uintptr510 var XGDtlsConnectionGetCertificate func(uintptr) uintptr
479-var XGDtlsConnectionGetChannelBindingData func(uintptr, TlsChannelBindingType, uintptr) bool511+var XGDtlsConnectionGetChannelBindingData func(uintptr, TlsChannelBindingType, uintptr, **glib.Error) bool
480 var XGDtlsConnectionGetCiphersuiteName func(uintptr) string512 var XGDtlsConnectionGetCiphersuiteName func(uintptr) string
481 var XGDtlsConnectionGetDatabase func(uintptr) uintptr513 var XGDtlsConnectionGetDatabase func(uintptr) uintptr
482 var XGDtlsConnectionGetInteraction func(uintptr) uintptr514 var XGDtlsConnectionGetInteraction func(uintptr) uintptr
@@ -486,18 +518,18 @@ var XGDtlsConnectionGetPeerCertificateErrors func(uintptr) TlsCertificateFlags
486 var XGDtlsConnectionGetProtocolVersion func(uintptr) TlsProtocolVersion518 var XGDtlsConnectionGetProtocolVersion func(uintptr) TlsProtocolVersion
487 var XGDtlsConnectionGetRehandshakeMode func(uintptr) TlsRehandshakeMode519 var XGDtlsConnectionGetRehandshakeMode func(uintptr) TlsRehandshakeMode
488 var XGDtlsConnectionGetRequireCloseNotify func(uintptr) bool520 var XGDtlsConnectionGetRequireCloseNotify func(uintptr) bool
489-var XGDtlsConnectionHandshake func(uintptr, uintptr) bool521+var XGDtlsConnectionHandshake func(uintptr, uintptr, **glib.Error) bool
490 var XGDtlsConnectionHandshakeAsync func(uintptr, int, uintptr, uintptr, uintptr)522 var XGDtlsConnectionHandshakeAsync func(uintptr, int, uintptr, uintptr, uintptr)
491-var XGDtlsConnectionHandshakeFinish func(uintptr, uintptr) bool523+var XGDtlsConnectionHandshakeFinish func(uintptr, uintptr, **glib.Error) bool
492 var XGDtlsConnectionSetAdvertisedProtocols func(uintptr, uintptr)524 var XGDtlsConnectionSetAdvertisedProtocols func(uintptr, uintptr)
493 var XGDtlsConnectionSetCertificate func(uintptr, uintptr)525 var XGDtlsConnectionSetCertificate func(uintptr, uintptr)
494 var XGDtlsConnectionSetDatabase func(uintptr, uintptr)526 var XGDtlsConnectionSetDatabase func(uintptr, uintptr)
495 var XGDtlsConnectionSetInteraction func(uintptr, uintptr)527 var XGDtlsConnectionSetInteraction func(uintptr, uintptr)
496 var XGDtlsConnectionSetRehandshakeMode func(uintptr, TlsRehandshakeMode)528 var XGDtlsConnectionSetRehandshakeMode func(uintptr, TlsRehandshakeMode)
497 var XGDtlsConnectionSetRequireCloseNotify func(uintptr, bool)529 var XGDtlsConnectionSetRequireCloseNotify func(uintptr, bool)
498-var XGDtlsConnectionShutdown func(uintptr, bool, bool, uintptr) bool530+var XGDtlsConnectionShutdown func(uintptr, bool, bool, uintptr, **glib.Error) bool
499 var XGDtlsConnectionShutdownAsync func(uintptr, bool, bool, int, uintptr, uintptr, uintptr)531 var XGDtlsConnectionShutdownAsync func(uintptr, bool, bool, int, uintptr, uintptr, uintptr)
500-var XGDtlsConnectionShutdownFinish func(uintptr, uintptr) bool532+var XGDtlsConnectionShutdownFinish func(uintptr, uintptr, **glib.Error) bool
501 533
502 func init() {534 func init() {
503 lib, err := purego.Dlopen(core.GetPath("GIO"), purego.RTLD_NOW|purego.RTLD_GLOBAL)535 lib, err := purego.Dlopen(core.GetPath("GIO"), purego.RTLD_NOW|purego.RTLD_GLOBAL)
M v4/gio/gdtlsserverconnection.go +15 -9
@@ -4,6 +4,7 @@ package gio
4 import (4 import (
5 "github.com/jwijenbergh/purego"5 "github.com/jwijenbergh/purego"
6 "github.com/jwijenbergh/puregotk/internal/core"6 "github.com/jwijenbergh/puregotk/internal/core"
7+ "github.com/jwijenbergh/puregotk/v4/glib"
7 )8 )
8 9
9 // vtable for a #GDtlsServerConnection implementation.10 // vtable for a #GDtlsServerConnection implementation.
@@ -29,19 +30,24 @@ func (x *DtlsServerConnectionBase) SetGoPointer(ptr uintptr) {
29 x.Ptr = ptr30 x.Ptr = ptr
30 }31 }
31 32
32-var xDtlsServerConnectionNew func(uintptr, uintptr) uintptr33+var xDtlsServerConnectionNew func(uintptr, uintptr, **glib.Error) uintptr
33 34
34 // Creates a new #GDtlsServerConnection wrapping @base_socket.35 // Creates a new #GDtlsServerConnection wrapping @base_socket.
35-func DtlsServerConnectionNew(BaseSocketVar DatagramBased, CertificateVar *TlsCertificate) *DtlsServerConnectionBase {36+func DtlsServerConnectionNew(BaseSocketVar DatagramBased, CertificateVar *TlsCertificate) (*DtlsServerConnectionBase, error) {
37+ var cls *DtlsServerConnectionBase
38+ var cerr *glib.Error
36 39
37- DtlsServerConnectionNewPtr := xDtlsServerConnectionNew(BaseSocketVar.GoPointer(), CertificateVar.GoPointer())40+ cret := xDtlsServerConnectionNew(BaseSocketVar.GoPointer(), CertificateVar.GoPointer(), &cerr)
38- if DtlsServerConnectionNewPtr == 0 {
39- return nil
40- }
41 41
42- DtlsServerConnectionNewCls := &DtlsServerConnectionBase{}42+ if cret == 0 {
43- DtlsServerConnectionNewCls.Ptr = DtlsServerConnectionNewPtr43+ return cls, cerr
44- return DtlsServerConnectionNewCls44+ }
45+ cls = &DtlsServerConnectionBase{}
46+ cls.Ptr = cret
47+ if cerr == nil {
48+ return cls, nil
49+ }
50+ return cls, cerr
45 51
46 }52 }
47 53
M v4/gio/gemblem.go +35 -32
@@ -31,46 +31,49 @@ var xNewEmblem func(uintptr) uintptr
31 31
32 // Creates a new emblem for @icon.32 // Creates a new emblem for @icon.
33 func NewEmblem(IconVar Icon) *Emblem {33 func NewEmblem(IconVar Icon) *Emblem {
34- NewEmblemPtr := xNewEmblem(IconVar.GoPointer())34+ var cls *Emblem
35- if NewEmblemPtr == 0 {35+
36- return nil36+ cret := xNewEmblem(IconVar.GoPointer())
37- }
38 37
39- NewEmblemCls := &Emblem{}38+ if cret == 0 {
40- NewEmblemCls.Ptr = NewEmblemPtr39+ return cls
41- return NewEmblemCls40+ }
41+ cls = &Emblem{}
42+ cls.Ptr = cret
43+ return cls
42 }44 }
43 45
44 var xNewWithOriginEmblem func(uintptr, EmblemOrigin) uintptr46 var xNewWithOriginEmblem func(uintptr, EmblemOrigin) uintptr
45 47
46 // Creates a new emblem for @icon.48 // Creates a new emblem for @icon.
47 func NewWithOriginEmblem(IconVar Icon, OriginVar EmblemOrigin) *Emblem {49 func NewWithOriginEmblem(IconVar Icon, OriginVar EmblemOrigin) *Emblem {
48- NewWithOriginEmblemPtr := xNewWithOriginEmblem(IconVar.GoPointer(), OriginVar)50+ var cls *Emblem
49- if NewWithOriginEmblemPtr == 0 {
50- return nil
51- }
52 51
53- NewWithOriginEmblemCls := &Emblem{}52+ cret := xNewWithOriginEmblem(IconVar.GoPointer(), OriginVar)
54- NewWithOriginEmblemCls.Ptr = NewWithOriginEmblemPtr53+
55- return NewWithOriginEmblemCls54+ if cret == 0 {
55+ return cls
56+ }
57+ cls = &Emblem{}
58+ cls.Ptr = cret
59+ return cls
56 }60 }
57 61
58 var xEmblemGetIcon func(uintptr) uintptr62 var xEmblemGetIcon func(uintptr) uintptr
59 63
60 // Gives back the icon from @emblem.64 // Gives back the icon from @emblem.
61 func (x *Emblem) GetIcon() *IconBase {65 func (x *Emblem) GetIcon() *IconBase {
66+ var cls *IconBase
62 67
63- GetIconPtr := xEmblemGetIcon(x.GoPointer())68+ cret := xEmblemGetIcon(x.GoPointer())
64- if GetIconPtr == 0 {
65- return nil
66- }
67-
68- gobject.IncreaseRef(GetIconPtr)
69-
70- GetIconCls := &IconBase{}
71- GetIconCls.Ptr = GetIconPtr
72- return GetIconCls
73 69
70+ if cret == 0 {
71+ return cls
72+ }
73+ gobject.IncreaseRef(cret)
74+ cls = &IconBase{}
75+ cls.Ptr = cret
76+ return cls
74 }77 }
75 78
76 var xEmblemGetOrigin func(uintptr) EmblemOrigin79 var xEmblemGetOrigin func(uintptr) EmblemOrigin
@@ -78,8 +81,8 @@ var xEmblemGetOrigin func(uintptr) EmblemOrigin
78 // Gets the origin of the emblem.81 // Gets the origin of the emblem.
79 func (x *Emblem) GetOrigin() EmblemOrigin {82 func (x *Emblem) GetOrigin() EmblemOrigin {
80 83
81- return xEmblemGetOrigin(x.GoPointer())84+ cret := xEmblemGetOrigin(x.GoPointer())
82-85+ return cret
83 }86 }
84 87
85 func (c *Emblem) GoPointer() uintptr {88 func (c *Emblem) GoPointer() uintptr {
@@ -93,8 +96,8 @@ func (c *Emblem) SetGoPointer(ptr uintptr) {
93 // Checks if two icons are equal.96 // Checks if two icons are equal.
94 func (x *Emblem) Equal(Icon2Var Icon) bool {97 func (x *Emblem) Equal(Icon2Var Icon) bool {
95 98
96- return XGIconEqual(x.GoPointer(), Icon2Var.GoPointer())99+ cret := XGIconEqual(x.GoPointer(), Icon2Var.GoPointer())
97-100+ return cret
98 }101 }
99 102
100 // Serializes a #GIcon into a #GVariant. An equivalent #GIcon can be retrieved103 // Serializes a #GIcon into a #GVariant. An equivalent #GIcon can be retrieved
@@ -104,8 +107,8 @@ func (x *Emblem) Equal(Icon2Var Icon) bool {
104 // (as opposed to over the network), and within the same file system namespace.107 // (as opposed to over the network), and within the same file system namespace.
105 func (x *Emblem) Serialize() *glib.Variant {108 func (x *Emblem) Serialize() *glib.Variant {
106 109
107- return XGIconSerialize(x.GoPointer())110+ cret := XGIconSerialize(x.GoPointer())
108-111+ return cret
109 }112 }
110 113
111 // Generates a textual representation of @icon that can be used for114 // Generates a textual representation of @icon that can be used for
@@ -126,8 +129,8 @@ func (x *Emblem) Serialize() *glib.Variant {
126 // the encoding is simply the name (such as `network-server`).129 // the encoding is simply the name (such as `network-server`).
127 func (x *Emblem) ToString() string {130 func (x *Emblem) ToString() string {
128 131
129- return XGIconToString(x.GoPointer())132+ cret := XGIconToString(x.GoPointer())
130-133+ return cret
131 }134 }
132 135
133 func init() {136 func init() {
M v4/gio/gemblemedicon.go +26 -25
@@ -35,14 +35,16 @@ var xNewEmblemedIcon func(uintptr, uintptr) uintptr
35 35
36 // Creates a new emblemed icon for @icon with the emblem @emblem.36 // Creates a new emblemed icon for @icon with the emblem @emblem.
37 func NewEmblemedIcon(IconVar Icon, EmblemVar *Emblem) *EmblemedIcon {37 func NewEmblemedIcon(IconVar Icon, EmblemVar *Emblem) *EmblemedIcon {
38- NewEmblemedIconPtr := xNewEmblemedIcon(IconVar.GoPointer(), EmblemVar.GoPointer())38+ var cls *EmblemedIcon
39- if NewEmblemedIconPtr == 0 {39+
40- return nil40+ cret := xNewEmblemedIcon(IconVar.GoPointer(), EmblemVar.GoPointer())
41- }
42 41
43- NewEmblemedIconCls := &EmblemedIcon{}42+ if cret == 0 {
44- NewEmblemedIconCls.Ptr = NewEmblemedIconPtr43+ return cls
45- return NewEmblemedIconCls44+ }
45+ cls = &EmblemedIcon{}
46+ cls.Ptr = cret
47+ return cls
46 }48 }
47 49
48 var xEmblemedIconAddEmblem func(uintptr, uintptr)50 var xEmblemedIconAddEmblem func(uintptr, uintptr)
@@ -68,26 +70,25 @@ var xEmblemedIconGetEmblems func(uintptr) *glib.List
68 // Gets the list of emblems for the @icon.70 // Gets the list of emblems for the @icon.
69 func (x *EmblemedIcon) GetEmblems() *glib.List {71 func (x *EmblemedIcon) GetEmblems() *glib.List {
70 72
71- return xEmblemedIconGetEmblems(x.GoPointer())73+ cret := xEmblemedIconGetEmblems(x.GoPointer())
72-74+ return cret
73 }75 }
74 76
75 var xEmblemedIconGetIcon func(uintptr) uintptr77 var xEmblemedIconGetIcon func(uintptr) uintptr
76 78
77 // Gets the main icon for @emblemed.79 // Gets the main icon for @emblemed.
78 func (x *EmblemedIcon) GetIcon() *IconBase {80 func (x *EmblemedIcon) GetIcon() *IconBase {
81+ var cls *IconBase
79 82
80- GetIconPtr := xEmblemedIconGetIcon(x.GoPointer())83+ cret := xEmblemedIconGetIcon(x.GoPointer())
81- if GetIconPtr == 0 {
82- return nil
83- }
84-
85- gobject.IncreaseRef(GetIconPtr)
86-
87- GetIconCls := &IconBase{}
88- GetIconCls.Ptr = GetIconPtr
89- return GetIconCls
90 84
85+ if cret == 0 {
86+ return cls
87+ }
88+ gobject.IncreaseRef(cret)
89+ cls = &IconBase{}
90+ cls.Ptr = cret
91+ return cls
91 }92 }
92 93
93 func (c *EmblemedIcon) GoPointer() uintptr {94 func (c *EmblemedIcon) GoPointer() uintptr {
@@ -101,8 +102,8 @@ func (c *EmblemedIcon) SetGoPointer(ptr uintptr) {
101 // Checks if two icons are equal.102 // Checks if two icons are equal.
102 func (x *EmblemedIcon) Equal(Icon2Var Icon) bool {103 func (x *EmblemedIcon) Equal(Icon2Var Icon) bool {
103 104
104- return XGIconEqual(x.GoPointer(), Icon2Var.GoPointer())105+ cret := XGIconEqual(x.GoPointer(), Icon2Var.GoPointer())
105-106+ return cret
106 }107 }
107 108
108 // Serializes a #GIcon into a #GVariant. An equivalent #GIcon can be retrieved109 // Serializes a #GIcon into a #GVariant. An equivalent #GIcon can be retrieved
@@ -112,8 +113,8 @@ func (x *EmblemedIcon) Equal(Icon2Var Icon) bool {
112 // (as opposed to over the network), and within the same file system namespace.113 // (as opposed to over the network), and within the same file system namespace.
113 func (x *EmblemedIcon) Serialize() *glib.Variant {114 func (x *EmblemedIcon) Serialize() *glib.Variant {
114 115
115- return XGIconSerialize(x.GoPointer())116+ cret := XGIconSerialize(x.GoPointer())
116-117+ return cret
117 }118 }
118 119
119 // Generates a textual representation of @icon that can be used for120 // Generates a textual representation of @icon that can be used for
@@ -134,8 +135,8 @@ func (x *EmblemedIcon) Serialize() *glib.Variant {
134 // the encoding is simply the name (such as `network-server`).135 // the encoding is simply the name (such as `network-server`).
135 func (x *EmblemedIcon) ToString() string {136 func (x *EmblemedIcon) ToString() string {
136 137
137- return XGIconToString(x.GoPointer())138+ cret := XGIconToString(x.GoPointer())
138-139+ return cret
139 }140 }
140 141
141 func init() {142 func init() {
M v4/gio/gfile.go +888 -518
@@ -256,16 +256,21 @@ func (x *FileBase) SetGoPointer(ptr uintptr) {
256 // %G_IO_ERROR_INVALID_FILENAME error. If the file is a directory the256 // %G_IO_ERROR_INVALID_FILENAME error. If the file is a directory the
257 // %G_IO_ERROR_IS_DIRECTORY error will be returned. Other errors are257 // %G_IO_ERROR_IS_DIRECTORY error will be returned. Other errors are
258 // possible too, and depend on what kind of filesystem the file is on.258 // possible too, and depend on what kind of filesystem the file is on.
259-func (x *FileBase) AppendTo(FlagsVar FileCreateFlags, CancellableVar *Cancellable) *FileOutputStream {259+func (x *FileBase) AppendTo(FlagsVar FileCreateFlags, CancellableVar *Cancellable) (*FileOutputStream, error) {
260+ var cls *FileOutputStream
261+ var cerr *glib.Error
260 262
261- AppendToPtr := XGFileAppendTo(x.GoPointer(), FlagsVar, CancellableVar.GoPointer())263+ cret := XGFileAppendTo(x.GoPointer(), FlagsVar, CancellableVar.GoPointer(), &cerr)
262- if AppendToPtr == 0 {
263- return nil
264- }
265 264
266- AppendToCls := &FileOutputStream{}265+ if cret == 0 {
267- AppendToCls.Ptr = AppendToPtr266+ return cls, cerr
268- return AppendToCls267+ }
268+ cls = &FileOutputStream{}
269+ cls.Ptr = cret
270+ if cerr == nil {
271+ return cls, nil
272+ }
273+ return cls, cerr
269 274
270 }275 }
271 276
@@ -285,16 +290,21 @@ func (x *FileBase) AppendToAsync(FlagsVar FileCreateFlags, IoPriorityVar int, Ca
285 290
286 // Finishes an asynchronous file append operation started with291 // Finishes an asynchronous file append operation started with
287 // g_file_append_to_async().292 // g_file_append_to_async().
288-func (x *FileBase) AppendToFinish(ResVar AsyncResult) *FileOutputStream {293+func (x *FileBase) AppendToFinish(ResVar AsyncResult) (*FileOutputStream, error) {
294+ var cls *FileOutputStream
295+ var cerr *glib.Error
289 296
290- AppendToFinishPtr := XGFileAppendToFinish(x.GoPointer(), ResVar.GoPointer())297+ cret := XGFileAppendToFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
291- if AppendToFinishPtr == 0 {
292- return nil
293- }
294 298
295- AppendToFinishCls := &FileOutputStream{}299+ if cret == 0 {
296- AppendToFinishCls.Ptr = AppendToFinishPtr300+ return cls, cerr
297- return AppendToFinishCls301+ }
302+ cls = &FileOutputStream{}
303+ cls.Ptr = cret
304+ if cerr == nil {
305+ return cls, nil
306+ }
307+ return cls, cerr
298 308
299 }309 }
300 310
@@ -307,9 +317,14 @@ func (x *FileBase) AppendToFinish(ResVar AsyncResult) *FileOutputStream {
307 // implementation of g_file_copy_attributes() and is useful317 // implementation of g_file_copy_attributes() and is useful
308 // when one needs to query and set the attributes in two318 // when one needs to query and set the attributes in two
309 // stages (e.g., for recursive move of a directory).319 // stages (e.g., for recursive move of a directory).
310-func (x *FileBase) BuildAttributeListForCopy(FlagsVar FileCopyFlags, CancellableVar *Cancellable) string {320+func (x *FileBase) BuildAttributeListForCopy(FlagsVar FileCopyFlags, CancellableVar *Cancellable) (string, error) {
321+ var cerr *glib.Error
311 322
312- return XGFileBuildAttributeListForCopy(x.GoPointer(), FlagsVar, CancellableVar.GoPointer())323+ cret := XGFileBuildAttributeListForCopy(x.GoPointer(), FlagsVar, CancellableVar.GoPointer(), &cerr)
324+ if cerr == nil {
325+ return cret, nil
326+ }
327+ return cret, cerr
313 328
314 }329 }
315 330
@@ -353,9 +368,14 @@ func (x *FileBase) BuildAttributeListForCopy(FlagsVar FileCopyFlags, Cancellable
353 //368 //
354 // If you are interested in copying the #GFile object itself (not the on-disk369 // If you are interested in copying the #GFile object itself (not the on-disk
355 // file), see g_file_dup().370 // file), see g_file_dup().
356-func (x *FileBase) Copy(DestinationVar File, FlagsVar FileCopyFlags, CancellableVar *Cancellable, ProgressCallbackVar FileProgressCallback, ProgressCallbackDataVar uintptr) bool {371+func (x *FileBase) Copy(DestinationVar File, FlagsVar FileCopyFlags, CancellableVar *Cancellable, ProgressCallbackVar FileProgressCallback, ProgressCallbackDataVar uintptr) (bool, error) {
372+ var cerr *glib.Error
357 373
358- return XGFileCopy(x.GoPointer(), DestinationVar.GoPointer(), FlagsVar, CancellableVar.GoPointer(), purego.NewCallback(ProgressCallbackVar), ProgressCallbackDataVar)374+ cret := XGFileCopy(x.GoPointer(), DestinationVar.GoPointer(), FlagsVar, CancellableVar.GoPointer(), purego.NewCallback(ProgressCallbackVar), ProgressCallbackDataVar, &cerr)
375+ if cerr == nil {
376+ return cret, nil
377+ }
378+ return cret, cerr
359 379
360 }380 }
361 381
@@ -383,16 +403,26 @@ func (x *FileBase) CopyAsync(DestinationVar File, FlagsVar FileCopyFlags, IoPrio
383 // if %G_FILE_COPY_ALL_METADATA is specified in @flags, then403 // if %G_FILE_COPY_ALL_METADATA is specified in @flags, then
384 // all the metadata that is possible to copy is copied. This404 // all the metadata that is possible to copy is copied. This
385 // is useful when implementing move by copy + delete source.405 // is useful when implementing move by copy + delete source.
386-func (x *FileBase) CopyAttributes(DestinationVar File, FlagsVar FileCopyFlags, CancellableVar *Cancellable) bool {406+func (x *FileBase) CopyAttributes(DestinationVar File, FlagsVar FileCopyFlags, CancellableVar *Cancellable) (bool, error) {
407+ var cerr *glib.Error
387 408
388- return XGFileCopyAttributes(x.GoPointer(), DestinationVar.GoPointer(), FlagsVar, CancellableVar.GoPointer())409+ cret := XGFileCopyAttributes(x.GoPointer(), DestinationVar.GoPointer(), FlagsVar, CancellableVar.GoPointer(), &cerr)
410+ if cerr == nil {
411+ return cret, nil
412+ }
413+ return cret, cerr
389 414
390 }415 }
391 416
392 // Finishes copying the file started with g_file_copy_async().417 // Finishes copying the file started with g_file_copy_async().
393-func (x *FileBase) CopyFinish(ResVar AsyncResult) bool {418+func (x *FileBase) CopyFinish(ResVar AsyncResult) (bool, error) {
419+ var cerr *glib.Error
394 420
395- return XGFileCopyFinish(x.GoPointer(), ResVar.GoPointer())421+ cret := XGFileCopyFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
422+ if cerr == nil {
423+ return cret, nil
424+ }
425+ return cret, cerr
396 426
397 }427 }
398 428
@@ -415,16 +445,21 @@ func (x *FileBase) CopyFinish(ResVar AsyncResult) bool {
415 // error, and if the name is to long %G_IO_ERROR_FILENAME_TOO_LONG will445 // error, and if the name is to long %G_IO_ERROR_FILENAME_TOO_LONG will
416 // be returned. Other errors are possible too, and depend on what kind446 // be returned. Other errors are possible too, and depend on what kind
417 // of filesystem the file is on.447 // of filesystem the file is on.
418-func (x *FileBase) Create(FlagsVar FileCreateFlags, CancellableVar *Cancellable) *FileOutputStream {448+func (x *FileBase) Create(FlagsVar FileCreateFlags, CancellableVar *Cancellable) (*FileOutputStream, error) {
449+ var cls *FileOutputStream
450+ var cerr *glib.Error
419 451
420- CreatePtr := XGFileCreate(x.GoPointer(), FlagsVar, CancellableVar.GoPointer())452+ cret := XGFileCreate(x.GoPointer(), FlagsVar, CancellableVar.GoPointer(), &cerr)
421- if CreatePtr == 0 {
422- return nil
423- }
424 453
425- CreateCls := &FileOutputStream{}454+ if cret == 0 {
426- CreateCls.Ptr = CreatePtr455+ return cls, cerr
427- return CreateCls456+ }
457+ cls = &FileOutputStream{}
458+ cls.Ptr = cret
459+ if cerr == nil {
460+ return cls, nil
461+ }
462+ return cls, cerr
428 463
429 }464 }
430 465
@@ -445,16 +480,21 @@ func (x *FileBase) CreateAsync(FlagsVar FileCreateFlags, IoPriorityVar int, Canc
445 480
446 // Finishes an asynchronous file create operation started with481 // Finishes an asynchronous file create operation started with
447 // g_file_create_async().482 // g_file_create_async().
448-func (x *FileBase) CreateFinish(ResVar AsyncResult) *FileOutputStream {483+func (x *FileBase) CreateFinish(ResVar AsyncResult) (*FileOutputStream, error) {
484+ var cls *FileOutputStream
485+ var cerr *glib.Error
449 486
450- CreateFinishPtr := XGFileCreateFinish(x.GoPointer(), ResVar.GoPointer())487+ cret := XGFileCreateFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
451- if CreateFinishPtr == 0 {
452- return nil
453- }
454 488
455- CreateFinishCls := &FileOutputStream{}489+ if cret == 0 {
456- CreateFinishCls.Ptr = CreateFinishPtr490+ return cls, cerr
457- return CreateFinishCls491+ }
492+ cls = &FileOutputStream{}
493+ cls.Ptr = cret
494+ if cerr == nil {
495+ return cls, nil
496+ }
497+ return cls, cerr
458 498
459 }499 }
460 500
@@ -481,16 +521,21 @@ func (x *FileBase) CreateFinish(ResVar AsyncResult) *FileOutputStream {
481 // Note that in many non-local file cases read and write streams are521 // Note that in many non-local file cases read and write streams are
482 // not supported, so make sure you really need to do read and write522 // not supported, so make sure you really need to do read and write
483 // streaming, rather than just opening for reading or writing.523 // streaming, rather than just opening for reading or writing.
484-func (x *FileBase) CreateReadwrite(FlagsVar FileCreateFlags, CancellableVar *Cancellable) *FileIOStream {524+func (x *FileBase) CreateReadwrite(FlagsVar FileCreateFlags, CancellableVar *Cancellable) (*FileIOStream, error) {
525+ var cls *FileIOStream
526+ var cerr *glib.Error
485 527
486- CreateReadwritePtr := XGFileCreateReadwrite(x.GoPointer(), FlagsVar, CancellableVar.GoPointer())528+ cret := XGFileCreateReadwrite(x.GoPointer(), FlagsVar, CancellableVar.GoPointer(), &cerr)
487- if CreateReadwritePtr == 0 {
488- return nil
489- }
490 529
491- CreateReadwriteCls := &FileIOStream{}530+ if cret == 0 {
492- CreateReadwriteCls.Ptr = CreateReadwritePtr531+ return cls, cerr
493- return CreateReadwriteCls532+ }
533+ cls = &FileIOStream{}
534+ cls.Ptr = cret
535+ if cerr == nil {
536+ return cls, nil
537+ }
538+ return cls, cerr
494 539
495 }540 }
496 541
@@ -511,16 +556,21 @@ func (x *FileBase) CreateReadwriteAsync(FlagsVar FileCreateFlags, IoPriorityVar
511 556
512 // Finishes an asynchronous file create operation started with557 // Finishes an asynchronous file create operation started with
513 // g_file_create_readwrite_async().558 // g_file_create_readwrite_async().
514-func (x *FileBase) CreateReadwriteFinish(ResVar AsyncResult) *FileIOStream {559+func (x *FileBase) CreateReadwriteFinish(ResVar AsyncResult) (*FileIOStream, error) {
560+ var cls *FileIOStream
561+ var cerr *glib.Error
515 562
516- CreateReadwriteFinishPtr := XGFileCreateReadwriteFinish(x.GoPointer(), ResVar.GoPointer())563+ cret := XGFileCreateReadwriteFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
517- if CreateReadwriteFinishPtr == 0 {
518- return nil
519- }
520 564
521- CreateReadwriteFinishCls := &FileIOStream{}565+ if cret == 0 {
522- CreateReadwriteFinishCls.Ptr = CreateReadwriteFinishPtr566+ return cls, cerr
523- return CreateReadwriteFinishCls567+ }
568+ cls = &FileIOStream{}
569+ cls.Ptr = cret
570+ if cerr == nil {
571+ return cls, nil
572+ }
573+ return cls, cerr
524 574
525 }575 }
526 576
@@ -547,9 +597,14 @@ func (x *FileBase) CreateReadwriteFinish(ResVar AsyncResult) *FileIOStream {
547 // If @cancellable is not %NULL, then the operation can be cancelled by597 // If @cancellable is not %NULL, then the operation can be cancelled by
548 // triggering the cancellable object from another thread. If the operation598 // triggering the cancellable object from another thread. If the operation
549 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.599 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
550-func (x *FileBase) Delete(CancellableVar *Cancellable) bool {600+func (x *FileBase) Delete(CancellableVar *Cancellable) (bool, error) {
601+ var cerr *glib.Error
551 602
552- return XGFileDelete(x.GoPointer(), CancellableVar.GoPointer())603+ cret := XGFileDelete(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
604+ if cerr == nil {
605+ return cret, nil
606+ }
607+ return cret, cerr
553 608
554 }609 }
555 610
@@ -563,9 +618,14 @@ func (x *FileBase) DeleteAsync(IoPriorityVar int, CancellableVar *Cancellable, C
563 }618 }
564 619
565 // Finishes deleting a file started with g_file_delete_async().620 // Finishes deleting a file started with g_file_delete_async().
566-func (x *FileBase) DeleteFinish(ResultVar AsyncResult) bool {621+func (x *FileBase) DeleteFinish(ResultVar AsyncResult) (bool, error) {
622+ var cerr *glib.Error
567 623
568- return XGFileDeleteFinish(x.GoPointer(), ResultVar.GoPointer())624+ cret := XGFileDeleteFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
625+ if cerr == nil {
626+ return cret, nil
627+ }
628+ return cret, cerr
569 629
570 }630 }
571 631
@@ -580,16 +640,16 @@ func (x *FileBase) DeleteFinish(ResultVar AsyncResult) bool {
580 //640 //
581 // This call does no blocking I/O.641 // This call does no blocking I/O.
582 func (x *FileBase) Dup() *FileBase {642 func (x *FileBase) Dup() *FileBase {
643+ var cls *FileBase
583 644
584- DupPtr := XGFileDup(x.GoPointer())645+ cret := XGFileDup(x.GoPointer())
585- if DupPtr == 0 {
586- return nil
587- }
588-
589- DupCls := &FileBase{}
590- DupCls.Ptr = DupPtr
591- return DupCls
592 646
647+ if cret == 0 {
648+ return cls
649+ }
650+ cls = &FileBase{}
651+ cls.Ptr = cret
652+ return cls
593 }653 }
594 654
595 // Starts an asynchronous eject on a mountable.655 // Starts an asynchronous eject on a mountable.
@@ -608,9 +668,14 @@ func (x *FileBase) EjectMountable(FlagsVar MountUnmountFlags, CancellableVar *Ca
608 668
609 // Finishes an asynchronous eject operation started by669 // Finishes an asynchronous eject operation started by
610 // g_file_eject_mountable().670 // g_file_eject_mountable().
611-func (x *FileBase) EjectMountableFinish(ResultVar AsyncResult) bool {671+func (x *FileBase) EjectMountableFinish(ResultVar AsyncResult) (bool, error) {
672+ var cerr *glib.Error
612 673
613- return XGFileEjectMountableFinish(x.GoPointer(), ResultVar.GoPointer())674+ cret := XGFileEjectMountableFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
675+ if cerr == nil {
676+ return cret, nil
677+ }
678+ return cret, cerr
614 679
615 }680 }
616 681
@@ -630,9 +695,14 @@ func (x *FileBase) EjectMountableWithOperation(FlagsVar MountUnmountFlags, Mount
630 695
631 // Finishes an asynchronous eject operation started by696 // Finishes an asynchronous eject operation started by
632 // g_file_eject_mountable_with_operation().697 // g_file_eject_mountable_with_operation().
633-func (x *FileBase) EjectMountableWithOperationFinish(ResultVar AsyncResult) bool {698+func (x *FileBase) EjectMountableWithOperationFinish(ResultVar AsyncResult) (bool, error) {
699+ var cerr *glib.Error
634 700
635- return XGFileEjectMountableWithOperationFinish(x.GoPointer(), ResultVar.GoPointer())701+ cret := XGFileEjectMountableWithOperationFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
702+ if cerr == nil {
703+ return cret, nil
704+ }
705+ return cret, cerr
636 706
637 }707 }
638 708
@@ -661,16 +731,21 @@ func (x *FileBase) EjectMountableWithOperationFinish(ResultVar AsyncResult) bool
661 // If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will731 // If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will
662 // be returned. If the file is not a directory, the %G_IO_ERROR_NOT_DIRECTORY732 // be returned. If the file is not a directory, the %G_IO_ERROR_NOT_DIRECTORY
663 // error will be returned. Other errors are possible too.733 // error will be returned. Other errors are possible too.
664-func (x *FileBase) EnumerateChildren(AttributesVar string, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) *FileEnumerator {734+func (x *FileBase) EnumerateChildren(AttributesVar string, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) (*FileEnumerator, error) {
735+ var cls *FileEnumerator
736+ var cerr *glib.Error
665 737
666- EnumerateChildrenPtr := XGFileEnumerateChildren(x.GoPointer(), AttributesVar, FlagsVar, CancellableVar.GoPointer())738+ cret := XGFileEnumerateChildren(x.GoPointer(), AttributesVar, FlagsVar, CancellableVar.GoPointer(), &cerr)
667- if EnumerateChildrenPtr == 0 {
668- return nil
669- }
670 739
671- EnumerateChildrenCls := &FileEnumerator{}740+ if cret == 0 {
672- EnumerateChildrenCls.Ptr = EnumerateChildrenPtr741+ return cls, cerr
673- return EnumerateChildrenCls742+ }
743+ cls = &FileEnumerator{}
744+ cls.Ptr = cret
745+ if cerr == nil {
746+ return cls, nil
747+ }
748+ return cls, cerr
674 749
675 }750 }
676 751
@@ -692,16 +767,21 @@ func (x *FileBase) EnumerateChildrenAsync(AttributesVar string, FlagsVar FileQue
692 767
693 // Finishes an async enumerate children operation.768 // Finishes an async enumerate children operation.
694 // See g_file_enumerate_children_async().769 // See g_file_enumerate_children_async().
695-func (x *FileBase) EnumerateChildrenFinish(ResVar AsyncResult) *FileEnumerator {770+func (x *FileBase) EnumerateChildrenFinish(ResVar AsyncResult) (*FileEnumerator, error) {
771+ var cls *FileEnumerator
772+ var cerr *glib.Error
696 773
697- EnumerateChildrenFinishPtr := XGFileEnumerateChildrenFinish(x.GoPointer(), ResVar.GoPointer())774+ cret := XGFileEnumerateChildrenFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
698- if EnumerateChildrenFinishPtr == 0 {
699- return nil
700- }
701 775
702- EnumerateChildrenFinishCls := &FileEnumerator{}776+ if cret == 0 {
703- EnumerateChildrenFinishCls.Ptr = EnumerateChildrenFinishPtr777+ return cls, cerr
704- return EnumerateChildrenFinishCls778+ }
779+ cls = &FileEnumerator{}
780+ cls.Ptr = cret
781+ if cerr == nil {
782+ return cls, nil
783+ }
784+ return cls, cerr
705 785
706 }786 }
707 787
@@ -714,8 +794,8 @@ func (x *FileBase) EnumerateChildrenFinish(ResVar AsyncResult) *FileEnumerator {
714 // This call does no blocking I/O.794 // This call does no blocking I/O.
715 func (x *FileBase) Equal(File2Var File) bool {795 func (x *FileBase) Equal(File2Var File) bool {
716 796
717- return XGFileEqual(x.GoPointer(), File2Var.GoPointer())797+ cret := XGFileEqual(x.GoPointer(), File2Var.GoPointer())
718-798+ return cret
719 }799 }
720 800
721 // Gets a #GMount for the #GFile.801 // Gets a #GMount for the #GFile.
@@ -727,16 +807,21 @@ func (x *FileBase) Equal(File2Var File) bool {
727 // If @cancellable is not %NULL, then the operation can be cancelled by807 // If @cancellable is not %NULL, then the operation can be cancelled by
728 // triggering the cancellable object from another thread. If the operation808 // triggering the cancellable object from another thread. If the operation
729 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.809 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
730-func (x *FileBase) FindEnclosingMount(CancellableVar *Cancellable) *MountBase {810+func (x *FileBase) FindEnclosingMount(CancellableVar *Cancellable) (*MountBase, error) {
811+ var cls *MountBase
812+ var cerr *glib.Error
731 813
732- FindEnclosingMountPtr := XGFileFindEnclosingMount(x.GoPointer(), CancellableVar.GoPointer())814+ cret := XGFileFindEnclosingMount(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
733- if FindEnclosingMountPtr == 0 {
734- return nil
735- }
736 815
737- FindEnclosingMountCls := &MountBase{}816+ if cret == 0 {
738- FindEnclosingMountCls.Ptr = FindEnclosingMountPtr817+ return cls, cerr
739- return FindEnclosingMountCls818+ }
819+ cls = &MountBase{}
820+ cls.Ptr = cret
821+ if cerr == nil {
822+ return cls, nil
823+ }
824+ return cls, cerr
740 825
741 }826 }
742 827
@@ -756,16 +841,21 @@ func (x *FileBase) FindEnclosingMountAsync(IoPriorityVar int, CancellableVar *Ca
756 841
757 // Finishes an asynchronous find mount request.842 // Finishes an asynchronous find mount request.
758 // See g_file_find_enclosing_mount_async().843 // See g_file_find_enclosing_mount_async().
759-func (x *FileBase) FindEnclosingMountFinish(ResVar AsyncResult) *MountBase {844+func (x *FileBase) FindEnclosingMountFinish(ResVar AsyncResult) (*MountBase, error) {
845+ var cls *MountBase
846+ var cerr *glib.Error
760 847
761- FindEnclosingMountFinishPtr := XGFileFindEnclosingMountFinish(x.GoPointer(), ResVar.GoPointer())848+ cret := XGFileFindEnclosingMountFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
762- if FindEnclosingMountFinishPtr == 0 {
763- return nil
764- }
765 849
766- FindEnclosingMountFinishCls := &MountBase{}850+ if cret == 0 {
767- FindEnclosingMountFinishCls.Ptr = FindEnclosingMountFinishPtr851+ return cls, cerr
768- return FindEnclosingMountFinishCls852+ }
853+ cls = &MountBase{}
854+ cls.Ptr = cret
855+ if cerr == nil {
856+ return cls, nil
857+ }
858+ return cls, cerr
769 859
770 }860 }
771 861
@@ -784,8 +874,8 @@ func (x *FileBase) FindEnclosingMountFinish(ResVar AsyncResult) *MountBase {
784 // This call does no blocking I/O.874 // This call does no blocking I/O.
785 func (x *FileBase) GetBasename() string {875 func (x *FileBase) GetBasename() string {
786 876
787- return XGFileGetBasename(x.GoPointer())877+ cret := XGFileGetBasename(x.GoPointer())
788-878+ return cret
789 }879 }
790 880
791 // Gets a child of @file with basename equal to @name.881 // Gets a child of @file with basename equal to @name.
@@ -796,16 +886,16 @@ func (x *FileBase) GetBasename() string {
796 //886 //
797 // This call does no blocking I/O.887 // This call does no blocking I/O.
798 func (x *FileBase) GetChild(NameVar string) *FileBase {888 func (x *FileBase) GetChild(NameVar string) *FileBase {
889+ var cls *FileBase
799 890
800- GetChildPtr := XGFileGetChild(x.GoPointer(), NameVar)891+ cret := XGFileGetChild(x.GoPointer(), NameVar)
801- if GetChildPtr == 0 {
802- return nil
803- }
804-
805- GetChildCls := &FileBase{}
806- GetChildCls.Ptr = GetChildPtr
807- return GetChildCls
808 892
893+ if cret == 0 {
894+ return cls
895+ }
896+ cls = &FileBase{}
897+ cls.Ptr = cret
898+ return cls
809 }899 }
810 900
811 // Gets the child of @file for a given @display_name (i.e. a UTF-8901 // Gets the child of @file for a given @display_name (i.e. a UTF-8
@@ -816,16 +906,21 @@ func (x *FileBase) GetChild(NameVar string) *FileBase {
816 // type a filename in the file selector.906 // type a filename in the file selector.
817 //907 //
818 // This call does no blocking I/O.908 // This call does no blocking I/O.
819-func (x *FileBase) GetChildForDisplayName(DisplayNameVar string) *FileBase {909+func (x *FileBase) GetChildForDisplayName(DisplayNameVar string) (*FileBase, error) {
910+ var cls *FileBase
911+ var cerr *glib.Error
820 912
821- GetChildForDisplayNamePtr := XGFileGetChildForDisplayName(x.GoPointer(), DisplayNameVar)913+ cret := XGFileGetChildForDisplayName(x.GoPointer(), DisplayNameVar, &cerr)
822- if GetChildForDisplayNamePtr == 0 {
823- return nil
824- }
825 914
826- GetChildForDisplayNameCls := &FileBase{}915+ if cret == 0 {
827- GetChildForDisplayNameCls.Ptr = GetChildForDisplayNamePtr916+ return cls, cerr
828- return GetChildForDisplayNameCls917+ }
918+ cls = &FileBase{}
919+ cls.Ptr = cret
920+ if cerr == nil {
921+ return cls, nil
922+ }
923+ return cls, cerr
829 924
830 }925 }
831 926
@@ -835,16 +930,16 @@ func (x *FileBase) GetChildForDisplayName(DisplayNameVar string) *FileBase {
835 //930 //
836 // This call does no blocking I/O.931 // This call does no blocking I/O.
837 func (x *FileBase) GetParent() *FileBase {932 func (x *FileBase) GetParent() *FileBase {
933+ var cls *FileBase
838 934
839- GetParentPtr := XGFileGetParent(x.GoPointer())935+ cret := XGFileGetParent(x.GoPointer())
840- if GetParentPtr == 0 {
841- return nil
842- }
843-
844- GetParentCls := &FileBase{}
845- GetParentCls.Ptr = GetParentPtr
846- return GetParentCls
847 936
937+ if cret == 0 {
938+ return cls
939+ }
940+ cls = &FileBase{}
941+ cls.Ptr = cret
942+ return cls
848 }943 }
849 944
850 // Gets the parse name of the @file.945 // Gets the parse name of the @file.
@@ -863,8 +958,8 @@ func (x *FileBase) GetParent() *FileBase {
863 // This call does no blocking I/O.958 // This call does no blocking I/O.
864 func (x *FileBase) GetParseName() string {959 func (x *FileBase) GetParseName() string {
865 960
866- return XGFileGetParseName(x.GoPointer())961+ cret := XGFileGetParseName(x.GoPointer())
867-962+ return cret
868 }963 }
869 964
870 // Gets the local pathname for #GFile, if one exists. If non-%NULL, this is965 // Gets the local pathname for #GFile, if one exists. If non-%NULL, this is
@@ -873,8 +968,8 @@ func (x *FileBase) GetParseName() string {
873 // This call does no blocking I/O.968 // This call does no blocking I/O.
874 func (x *FileBase) GetPath() string {969 func (x *FileBase) GetPath() string {
875 970
876- return XGFileGetPath(x.GoPointer())971+ cret := XGFileGetPath(x.GoPointer())
877-972+ return cret
878 }973 }
879 974
880 // Gets the path for @descendant relative to @parent.975 // Gets the path for @descendant relative to @parent.
@@ -882,8 +977,8 @@ func (x *FileBase) GetPath() string {
882 // This call does no blocking I/O.977 // This call does no blocking I/O.
883 func (x *FileBase) GetRelativePath(DescendantVar File) string {978 func (x *FileBase) GetRelativePath(DescendantVar File) string {
884 979
885- return XGFileGetRelativePath(x.GoPointer(), DescendantVar.GoPointer())980+ cret := XGFileGetRelativePath(x.GoPointer(), DescendantVar.GoPointer())
886-981+ return cret
887 }982 }
888 983
889 // Gets the URI for the @file.984 // Gets the URI for the @file.
@@ -891,8 +986,8 @@ func (x *FileBase) GetRelativePath(DescendantVar File) string {
891 // This call does no blocking I/O.986 // This call does no blocking I/O.
892 func (x *FileBase) GetUri() string {987 func (x *FileBase) GetUri() string {
893 988
894- return XGFileGetUri(x.GoPointer())989+ cret := XGFileGetUri(x.GoPointer())
895-990+ return cret
896 }991 }
897 992
898 // Gets the URI scheme for a #GFile.993 // Gets the URI scheme for a #GFile.
@@ -908,8 +1003,8 @@ func (x *FileBase) GetUri() string {
908 // This call does no blocking I/O.1003 // This call does no blocking I/O.
909 func (x *FileBase) GetUriScheme() string {1004 func (x *FileBase) GetUriScheme() string {
910 1005
911- return XGFileGetUriScheme(x.GoPointer())1006+ cret := XGFileGetUriScheme(x.GoPointer())
912-1007+ return cret
913 }1008 }
914 1009
915 // Checks if @file has a parent, and optionally, if it is @parent.1010 // Checks if @file has a parent, and optionally, if it is @parent.
@@ -919,8 +1014,8 @@ func (x *FileBase) GetUriScheme() string {
919 // if @file is an immediate child of @parent.1014 // if @file is an immediate child of @parent.
920 func (x *FileBase) HasParent(ParentVar File) bool {1015 func (x *FileBase) HasParent(ParentVar File) bool {
921 1016
922- return XGFileHasParent(x.GoPointer(), ParentVar.GoPointer())1017+ cret := XGFileHasParent(x.GoPointer(), ParentVar.GoPointer())
923-1018+ return cret
924 }1019 }
925 1020
926 // Checks whether @file has the prefix specified by @prefix.1021 // Checks whether @file has the prefix specified by @prefix.
@@ -939,8 +1034,8 @@ func (x *FileBase) HasParent(ParentVar File) bool {
939 // of @prefix.1034 // of @prefix.
940 func (x *FileBase) HasPrefix(PrefixVar File) bool {1035 func (x *FileBase) HasPrefix(PrefixVar File) bool {
941 1036
942- return XGFileHasPrefix(x.GoPointer(), PrefixVar.GoPointer())1037+ cret := XGFileHasPrefix(x.GoPointer(), PrefixVar.GoPointer())
943-1038+ return cret
944 }1039 }
945 1040
946 // Checks to see if a #GFile has a given URI scheme.1041 // Checks to see if a #GFile has a given URI scheme.
@@ -948,8 +1043,8 @@ func (x *FileBase) HasPrefix(PrefixVar File) bool {
948 // This call does no blocking I/O.1043 // This call does no blocking I/O.
949 func (x *FileBase) HasUriScheme(UriSchemeVar string) bool {1044 func (x *FileBase) HasUriScheme(UriSchemeVar string) bool {
950 1045
951- return XGFileHasUriScheme(x.GoPointer(), UriSchemeVar)1046+ cret := XGFileHasUriScheme(x.GoPointer(), UriSchemeVar)
952-1047+ return cret
953 }1048 }
954 1049
955 // Creates a hash value for a #GFile.1050 // Creates a hash value for a #GFile.
@@ -957,8 +1052,8 @@ func (x *FileBase) HasUriScheme(UriSchemeVar string) bool {
957 // This call does no blocking I/O.1052 // This call does no blocking I/O.
958 func (x *FileBase) Hash() uint {1053 func (x *FileBase) Hash() uint {
959 1054
960- return XGFileHash(x.GoPointer())1055+ cret := XGFileHash(x.GoPointer())
961-1056+ return cret
962 }1057 }
963 1058
964 // Checks to see if a file is native to the platform.1059 // Checks to see if a file is native to the platform.
@@ -974,8 +1069,8 @@ func (x *FileBase) Hash() uint {
974 // This call does no blocking I/O.1069 // This call does no blocking I/O.
975 func (x *FileBase) IsNative() bool {1070 func (x *FileBase) IsNative() bool {
976 1071
977- return XGFileIsNative(x.GoPointer())1072+ cret := XGFileIsNative(x.GoPointer())
978-1073+ return cret
979 }1074 }
980 1075
981 // Loads the contents of @file and returns it as #GBytes.1076 // Loads the contents of @file and returns it as #GBytes.
@@ -989,9 +1084,14 @@ func (x *FileBase) IsNative() bool {
989 // The data contained in the resulting #GBytes is always zero-terminated, but1084 // The data contained in the resulting #GBytes is always zero-terminated, but
990 // this is not included in the #GBytes length. The resulting #GBytes should be1085 // this is not included in the #GBytes length. The resulting #GBytes should be
991 // freed with g_bytes_unref() when no longer in use.1086 // freed with g_bytes_unref() when no longer in use.
992-func (x *FileBase) LoadBytes(CancellableVar *Cancellable, EtagOutVar string) *glib.Bytes {1087+func (x *FileBase) LoadBytes(CancellableVar *Cancellable, EtagOutVar string) (*glib.Bytes, error) {
1088+ var cerr *glib.Error
993 1089
994- return XGFileLoadBytes(x.GoPointer(), CancellableVar.GoPointer(), EtagOutVar)1090+ cret := XGFileLoadBytes(x.GoPointer(), CancellableVar.GoPointer(), EtagOutVar, &cerr)
1091+ if cerr == nil {
1092+ return cret, nil
1093+ }
1094+ return cret, cerr
995 1095
996 }1096 }
997 1097
@@ -1020,9 +1120,14 @@ func (x *FileBase) LoadBytesAsync(CancellableVar *Cancellable, CallbackVar Async
1020 // freed with g_bytes_unref() when no longer in use.1120 // freed with g_bytes_unref() when no longer in use.
1021 //1121 //
1022 // See g_file_load_bytes() for more information.1122 // See g_file_load_bytes() for more information.
1023-func (x *FileBase) LoadBytesFinish(ResultVar AsyncResult, EtagOutVar string) *glib.Bytes {1123+func (x *FileBase) LoadBytesFinish(ResultVar AsyncResult, EtagOutVar string) (*glib.Bytes, error) {
1124+ var cerr *glib.Error
1024 1125
1025- return XGFileLoadBytesFinish(x.GoPointer(), ResultVar.GoPointer(), EtagOutVar)1126+ cret := XGFileLoadBytesFinish(x.GoPointer(), ResultVar.GoPointer(), EtagOutVar, &cerr)
1127+ if cerr == nil {
1128+ return cret, nil
1129+ }
1130+ return cret, cerr
1026 1131
1027 }1132 }
1028 1133
@@ -1034,9 +1139,14 @@ func (x *FileBase) LoadBytesFinish(ResultVar AsyncResult, EtagOutVar string) *gl
1034 // If @cancellable is not %NULL, then the operation can be cancelled by1139 // If @cancellable is not %NULL, then the operation can be cancelled by
1035 // triggering the cancellable object from another thread. If the operation1140 // triggering the cancellable object from another thread. If the operation
1036 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.1141 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
1037-func (x *FileBase) LoadContents(CancellableVar *Cancellable, ContentsVar []string, LengthVar uint, EtagOutVar string) bool {1142+func (x *FileBase) LoadContents(CancellableVar *Cancellable, ContentsVar []string, LengthVar uint, EtagOutVar string) (bool, error) {
1143+ var cerr *glib.Error
1038 1144
1039- return XGFileLoadContents(x.GoPointer(), CancellableVar.GoPointer(), ContentsVar, LengthVar, EtagOutVar)1145+ cret := XGFileLoadContents(x.GoPointer(), CancellableVar.GoPointer(), ContentsVar, LengthVar, EtagOutVar, &cerr)
1146+ if cerr == nil {
1147+ return cret, nil
1148+ }
1149+ return cret, cerr
1040 1150
1041 }1151 }
1042 1152
@@ -1064,9 +1174,14 @@ func (x *FileBase) LoadContentsAsync(CancellableVar *Cancellable, CallbackVar As
1064 // size of the @contents string. The @contents should be freed with1174 // size of the @contents string. The @contents should be freed with
1065 // g_free() when no longer needed. If @etag_out is present, it will be1175 // g_free() when no longer needed. If @etag_out is present, it will be
1066 // set to the new entity tag for the @file.1176 // set to the new entity tag for the @file.
1067-func (x *FileBase) LoadContentsFinish(ResVar AsyncResult, ContentsVar []string, LengthVar uint, EtagOutVar string) bool {1177+func (x *FileBase) LoadContentsFinish(ResVar AsyncResult, ContentsVar []string, LengthVar uint, EtagOutVar string) (bool, error) {
1178+ var cerr *glib.Error
1068 1179
1069- return XGFileLoadContentsFinish(x.GoPointer(), ResVar.GoPointer(), ContentsVar, LengthVar, EtagOutVar)1180+ cret := XGFileLoadContentsFinish(x.GoPointer(), ResVar.GoPointer(), ContentsVar, LengthVar, EtagOutVar, &cerr)
1181+ if cerr == nil {
1182+ return cret, nil
1183+ }
1184+ return cret, cerr
1070 1185
1071 }1186 }
1072 1187
@@ -1092,9 +1207,14 @@ func (x *FileBase) LoadPartialContentsAsync(CancellableVar *Cancellable, ReadMor
1092 // zero-terminated, but this is not included in the resultant @length.1207 // zero-terminated, but this is not included in the resultant @length.
1093 // The returned @contents should be freed with g_free() when no longer1208 // The returned @contents should be freed with g_free() when no longer
1094 // needed.1209 // needed.
1095-func (x *FileBase) LoadPartialContentsFinish(ResVar AsyncResult, ContentsVar []string, LengthVar uint, EtagOutVar string) bool {1210+func (x *FileBase) LoadPartialContentsFinish(ResVar AsyncResult, ContentsVar []string, LengthVar uint, EtagOutVar string) (bool, error) {
1211+ var cerr *glib.Error
1096 1212
1097- return XGFileLoadPartialContentsFinish(x.GoPointer(), ResVar.GoPointer(), ContentsVar, LengthVar, EtagOutVar)1213+ cret := XGFileLoadPartialContentsFinish(x.GoPointer(), ResVar.GoPointer(), ContentsVar, LengthVar, EtagOutVar, &cerr)
1214+ if cerr == nil {
1215+ return cret, nil
1216+ }
1217+ return cret, cerr
1098 1218
1099 }1219 }
1100 1220
@@ -1112,9 +1232,14 @@ func (x *FileBase) LoadPartialContentsFinish(ResVar AsyncResult, ContentsVar []s
1112 // If @cancellable is not %NULL, then the operation can be cancelled by1232 // If @cancellable is not %NULL, then the operation can be cancelled by
1113 // triggering the cancellable object from another thread. If the operation1233 // triggering the cancellable object from another thread. If the operation
1114 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.1234 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
1115-func (x *FileBase) MakeDirectory(CancellableVar *Cancellable) bool {1235+func (x *FileBase) MakeDirectory(CancellableVar *Cancellable) (bool, error) {
1236+ var cerr *glib.Error
1116 1237
1117- return XGFileMakeDirectory(x.GoPointer(), CancellableVar.GoPointer())1238+ cret := XGFileMakeDirectory(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
1239+ if cerr == nil {
1240+ return cret, nil
1241+ }
1242+ return cret, cerr
1118 1243
1119 }1244 }
1120 1245
@@ -1127,9 +1252,14 @@ func (x *FileBase) MakeDirectoryAsync(IoPriorityVar int, CancellableVar *Cancell
1127 1252
1128 // Finishes an asynchronous directory creation, started with1253 // Finishes an asynchronous directory creation, started with
1129 // g_file_make_directory_async().1254 // g_file_make_directory_async().
1130-func (x *FileBase) MakeDirectoryFinish(ResultVar AsyncResult) bool {1255+func (x *FileBase) MakeDirectoryFinish(ResultVar AsyncResult) (bool, error) {
1256+ var cerr *glib.Error
1131 1257
1132- return XGFileMakeDirectoryFinish(x.GoPointer(), ResultVar.GoPointer())1258+ cret := XGFileMakeDirectoryFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
1259+ if cerr == nil {
1260+ return cret, nil
1261+ }
1262+ return cret, cerr
1133 1263
1134 }1264 }
1135 1265
@@ -1146,9 +1276,14 @@ func (x *FileBase) MakeDirectoryFinish(ResultVar AsyncResult) bool {
1146 // If @cancellable is not %NULL, then the operation can be cancelled by1276 // If @cancellable is not %NULL, then the operation can be cancelled by
1147 // triggering the cancellable object from another thread. If the operation1277 // triggering the cancellable object from another thread. If the operation
1148 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.1278 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
1149-func (x *FileBase) MakeDirectoryWithParents(CancellableVar *Cancellable) bool {1279+func (x *FileBase) MakeDirectoryWithParents(CancellableVar *Cancellable) (bool, error) {
1280+ var cerr *glib.Error
1150 1281
1151- return XGFileMakeDirectoryWithParents(x.GoPointer(), CancellableVar.GoPointer())1282+ cret := XGFileMakeDirectoryWithParents(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
1283+ if cerr == nil {
1284+ return cret, nil
1285+ }
1286+ return cret, cerr
1152 1287
1153 }1288 }
1154 1289
@@ -1158,9 +1293,14 @@ func (x *FileBase) MakeDirectoryWithParents(CancellableVar *Cancellable) bool {
1158 // If @cancellable is not %NULL, then the operation can be cancelled by1293 // If @cancellable is not %NULL, then the operation can be cancelled by
1159 // triggering the cancellable object from another thread. If the operation1294 // triggering the cancellable object from another thread. If the operation
1160 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.1295 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
1161-func (x *FileBase) MakeSymbolicLink(SymlinkValueVar string, CancellableVar *Cancellable) bool {1296+func (x *FileBase) MakeSymbolicLink(SymlinkValueVar string, CancellableVar *Cancellable) (bool, error) {
1297+ var cerr *glib.Error
1162 1298
1163- return XGFileMakeSymbolicLink(x.GoPointer(), SymlinkValueVar, CancellableVar.GoPointer())1299+ cret := XGFileMakeSymbolicLink(x.GoPointer(), SymlinkValueVar, CancellableVar.GoPointer(), &cerr)
1300+ if cerr == nil {
1301+ return cret, nil
1302+ }
1303+ return cret, cerr
1164 1304
1165 }1305 }
1166 1306
@@ -1182,9 +1322,14 @@ func (x *FileBase) MakeSymbolicLink(SymlinkValueVar string, CancellableVar *Canc
1182 // periodic progress updates while scanning. See the documentation for1322 // periodic progress updates while scanning. See the documentation for
1183 // #GFileMeasureProgressCallback for information about when and how the1323 // #GFileMeasureProgressCallback for information about when and how the
1184 // callback will be invoked.1324 // callback will be invoked.
1185-func (x *FileBase) MeasureDiskUsage(FlagsVar FileMeasureFlags, CancellableVar *Cancellable, ProgressCallbackVar FileMeasureProgressCallback, ProgressDataVar uintptr, DiskUsageVar uint64, NumDirsVar uint64, NumFilesVar uint64) bool {1325+func (x *FileBase) MeasureDiskUsage(FlagsVar FileMeasureFlags, CancellableVar *Cancellable, ProgressCallbackVar FileMeasureProgressCallback, ProgressDataVar uintptr, DiskUsageVar uint64, NumDirsVar uint64, NumFilesVar uint64) (bool, error) {
1326+ var cerr *glib.Error
1186 1327
1187- return XGFileMeasureDiskUsage(x.GoPointer(), FlagsVar, CancellableVar.GoPointer(), purego.NewCallback(ProgressCallbackVar), ProgressDataVar, DiskUsageVar, NumDirsVar, NumFilesVar)1328+ cret := XGFileMeasureDiskUsage(x.GoPointer(), FlagsVar, CancellableVar.GoPointer(), purego.NewCallback(ProgressCallbackVar), ProgressDataVar, DiskUsageVar, NumDirsVar, NumFilesVar, &cerr)
1329+ if cerr == nil {
1330+ return cret, nil
1331+ }
1332+ return cret, cerr
1188 1333
1189 }1334 }
1190 1335
@@ -1201,9 +1346,14 @@ func (x *FileBase) MeasureDiskUsageAsync(FlagsVar FileMeasureFlags, IoPriorityVa
1201 // Collects the results from an earlier call to1346 // Collects the results from an earlier call to
1202 // g_file_measure_disk_usage_async(). See g_file_measure_disk_usage() for1347 // g_file_measure_disk_usage_async(). See g_file_measure_disk_usage() for
1203 // more information.1348 // more information.
1204-func (x *FileBase) MeasureDiskUsageFinish(ResultVar AsyncResult, DiskUsageVar uint64, NumDirsVar uint64, NumFilesVar uint64) bool {1349+func (x *FileBase) MeasureDiskUsageFinish(ResultVar AsyncResult, DiskUsageVar uint64, NumDirsVar uint64, NumFilesVar uint64) (bool, error) {
1350+ var cerr *glib.Error
1205 1351
1206- return XGFileMeasureDiskUsageFinish(x.GoPointer(), ResultVar.GoPointer(), DiskUsageVar, NumDirsVar, NumFilesVar)1352+ cret := XGFileMeasureDiskUsageFinish(x.GoPointer(), ResultVar.GoPointer(), DiskUsageVar, NumDirsVar, NumFilesVar, &cerr)
1353+ if cerr == nil {
1354+ return cret, nil
1355+ }
1356+ return cret, cerr
1207 1357
1208 }1358 }
1209 1359
@@ -1213,16 +1363,21 @@ func (x *FileBase) MeasureDiskUsageFinish(ResultVar AsyncResult, DiskUsageVar ui
1213 // If @cancellable is not %NULL, then the operation can be cancelled by1363 // If @cancellable is not %NULL, then the operation can be cancelled by
1214 // triggering the cancellable object from another thread. If the operation1364 // triggering the cancellable object from another thread. If the operation
1215 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.1365 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
1216-func (x *FileBase) Monitor(FlagsVar FileMonitorFlags, CancellableVar *Cancellable) *FileMonitor {1366+func (x *FileBase) Monitor(FlagsVar FileMonitorFlags, CancellableVar *Cancellable) (*FileMonitor, error) {
1367+ var cls *FileMonitor
1368+ var cerr *glib.Error
1217 1369
1218- MonitorPtr := XGFileMonitor(x.GoPointer(), FlagsVar, CancellableVar.GoPointer())1370+ cret := XGFileMonitor(x.GoPointer(), FlagsVar, CancellableVar.GoPointer(), &cerr)
1219- if MonitorPtr == 0 {
1220- return nil
1221- }
1222 1371
1223- MonitorCls := &FileMonitor{}1372+ if cret == 0 {
1224- MonitorCls.Ptr = MonitorPtr1373+ return cls, cerr
1225- return MonitorCls1374+ }
1375+ cls = &FileMonitor{}
1376+ cls.Ptr = cret
1377+ if cerr == nil {
1378+ return cls, nil
1379+ }
1380+ return cls, cerr
1226 1381
1227 }1382 }
1228 1383
@@ -1238,16 +1393,21 @@ func (x *FileBase) Monitor(FlagsVar FileMonitorFlags, CancellableVar *Cancellabl
1238 // directories. It is not possible to monitor all the files in a1393 // directories. It is not possible to monitor all the files in a
1239 // directory for changes made via hard links; if you want to do this then1394 // directory for changes made via hard links; if you want to do this then
1240 // you must register individual watches with g_file_monitor().1395 // you must register individual watches with g_file_monitor().
1241-func (x *FileBase) MonitorDirectory(FlagsVar FileMonitorFlags, CancellableVar *Cancellable) *FileMonitor {1396+func (x *FileBase) MonitorDirectory(FlagsVar FileMonitorFlags, CancellableVar *Cancellable) (*FileMonitor, error) {
1397+ var cls *FileMonitor
1398+ var cerr *glib.Error
1242 1399
1243- MonitorDirectoryPtr := XGFileMonitorDirectory(x.GoPointer(), FlagsVar, CancellableVar.GoPointer())1400+ cret := XGFileMonitorDirectory(x.GoPointer(), FlagsVar, CancellableVar.GoPointer(), &cerr)
1244- if MonitorDirectoryPtr == 0 {
1245- return nil
1246- }
1247 1401
1248- MonitorDirectoryCls := &FileMonitor{}1402+ if cret == 0 {
1249- MonitorDirectoryCls.Ptr = MonitorDirectoryPtr1403+ return cls, cerr
1250- return MonitorDirectoryCls1404+ }
1405+ cls = &FileMonitor{}
1406+ cls.Ptr = cret
1407+ if cerr == nil {
1408+ return cls, nil
1409+ }
1410+ return cls, cerr
1251 1411
1252 }1412 }
1253 1413
@@ -1265,16 +1425,21 @@ func (x *FileBase) MonitorDirectory(FlagsVar FileMonitorFlags, CancellableVar *C
1265 // reported. Using this flag may result in an increase in resource1425 // reported. Using this flag may result in an increase in resource
1266 // usage, and may not have any effect depending on the #GFileMonitor1426 // usage, and may not have any effect depending on the #GFileMonitor
1267 // backend and/or filesystem type.1427 // backend and/or filesystem type.
1268-func (x *FileBase) MonitorFile(FlagsVar FileMonitorFlags, CancellableVar *Cancellable) *FileMonitor {1428+func (x *FileBase) MonitorFile(FlagsVar FileMonitorFlags, CancellableVar *Cancellable) (*FileMonitor, error) {
1429+ var cls *FileMonitor
1430+ var cerr *glib.Error
1269 1431
1270- MonitorFilePtr := XGFileMonitorFile(x.GoPointer(), FlagsVar, CancellableVar.GoPointer())1432+ cret := XGFileMonitorFile(x.GoPointer(), FlagsVar, CancellableVar.GoPointer(), &cerr)
1271- if MonitorFilePtr == 0 {
1272- return nil
1273- }
1274 1433
1275- MonitorFileCls := &FileMonitor{}1434+ if cret == 0 {
1276- MonitorFileCls.Ptr = MonitorFilePtr1435+ return cls, cerr
1277- return MonitorFileCls1436+ }
1437+ cls = &FileMonitor{}
1438+ cls.Ptr = cret
1439+ if cerr == nil {
1440+ return cls, nil
1441+ }
1442+ return cls, cerr
1278 1443
1279 }1444 }
1280 1445
@@ -1295,9 +1460,14 @@ func (x *FileBase) MountEnclosingVolume(FlagsVar MountMountFlags, MountOperation
1295 }1460 }
1296 1461
1297 // Finishes a mount operation started by g_file_mount_enclosing_volume().1462 // Finishes a mount operation started by g_file_mount_enclosing_volume().
1298-func (x *FileBase) MountEnclosingVolumeFinish(ResultVar AsyncResult) bool {1463+func (x *FileBase) MountEnclosingVolumeFinish(ResultVar AsyncResult) (bool, error) {
1464+ var cerr *glib.Error
1299 1465
1300- return XGFileMountEnclosingVolumeFinish(x.GoPointer(), ResultVar.GoPointer())1466+ cret := XGFileMountEnclosingVolumeFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
1467+ if cerr == nil {
1468+ return cret, nil
1469+ }
1470+ return cret, cerr
1301 1471
1302 }1472 }
1303 1473
@@ -1322,16 +1492,21 @@ func (x *FileBase) MountMountable(FlagsVar MountMountFlags, MountOperationVar *M
1322 //1492 //
1323 // Finish an asynchronous mount operation that was started1493 // Finish an asynchronous mount operation that was started
1324 // with g_file_mount_mountable().1494 // with g_file_mount_mountable().
1325-func (x *FileBase) MountMountableFinish(ResultVar AsyncResult) *FileBase {1495+func (x *FileBase) MountMountableFinish(ResultVar AsyncResult) (*FileBase, error) {
1496+ var cls *FileBase
1497+ var cerr *glib.Error
1326 1498
1327- MountMountableFinishPtr := XGFileMountMountableFinish(x.GoPointer(), ResultVar.GoPointer())1499+ cret := XGFileMountMountableFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
1328- if MountMountableFinishPtr == 0 {
1329- return nil
1330- }
1331 1500
1332- MountMountableFinishCls := &FileBase{}1501+ if cret == 0 {
1333- MountMountableFinishCls.Ptr = MountMountableFinishPtr1502+ return cls, cerr
1334- return MountMountableFinishCls1503+ }
1504+ cls = &FileBase{}
1505+ cls.Ptr = cret
1506+ if cerr == nil {
1507+ return cls, nil
1508+ }
1509+ return cls, cerr
1335 1510
1336 }1511 }
1337 1512
@@ -1368,9 +1543,14 @@ func (x *FileBase) MountMountableFinish(ResultVar AsyncResult) *FileBase {
1368 // %G_FILE_COPY_OVERWRITE is specified and the target is a file, then1543 // %G_FILE_COPY_OVERWRITE is specified and the target is a file, then
1369 // the %G_IO_ERROR_WOULD_RECURSE error may be returned (if the native1544 // the %G_IO_ERROR_WOULD_RECURSE error may be returned (if the native
1370 // move operation isn't available).1545 // move operation isn't available).
1371-func (x *FileBase) Move(DestinationVar File, FlagsVar FileCopyFlags, CancellableVar *Cancellable, ProgressCallbackVar FileProgressCallback, ProgressCallbackDataVar uintptr) bool {1546+func (x *FileBase) Move(DestinationVar File, FlagsVar FileCopyFlags, CancellableVar *Cancellable, ProgressCallbackVar FileProgressCallback, ProgressCallbackDataVar uintptr) (bool, error) {
1547+ var cerr *glib.Error
1372 1548
1373- return XGFileMove(x.GoPointer(), DestinationVar.GoPointer(), FlagsVar, CancellableVar.GoPointer(), purego.NewCallback(ProgressCallbackVar), ProgressCallbackDataVar)1549+ cret := XGFileMove(x.GoPointer(), DestinationVar.GoPointer(), FlagsVar, CancellableVar.GoPointer(), purego.NewCallback(ProgressCallbackVar), ProgressCallbackDataVar, &cerr)
1550+ if cerr == nil {
1551+ return cret, nil
1552+ }
1553+ return cret, cerr
1374 1554
1375 }1555 }
1376 1556
@@ -1391,9 +1571,14 @@ func (x *FileBase) MoveAsync(DestinationVar File, FlagsVar FileCopyFlags, IoPrio
1391 1571
1392 // Finishes an asynchronous file movement, started with1572 // Finishes an asynchronous file movement, started with
1393 // g_file_move_async().1573 // g_file_move_async().
1394-func (x *FileBase) MoveFinish(ResultVar AsyncResult) bool {1574+func (x *FileBase) MoveFinish(ResultVar AsyncResult) (bool, error) {
1575+ var cerr *glib.Error
1395 1576
1396- return XGFileMoveFinish(x.GoPointer(), ResultVar.GoPointer())1577+ cret := XGFileMoveFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
1578+ if cerr == nil {
1579+ return cret, nil
1580+ }
1581+ return cret, cerr
1397 1582
1398 }1583 }
1399 1584
@@ -1413,16 +1598,21 @@ func (x *FileBase) MoveFinish(ResultVar AsyncResult) bool {
1413 // file cases read and write streams are not supported, so make sure you1598 // file cases read and write streams are not supported, so make sure you
1414 // really need to do read and write streaming, rather than just opening1599 // really need to do read and write streaming, rather than just opening
1415 // for reading or writing.1600 // for reading or writing.
1416-func (x *FileBase) OpenReadwrite(CancellableVar *Cancellable) *FileIOStream {1601+func (x *FileBase) OpenReadwrite(CancellableVar *Cancellable) (*FileIOStream, error) {
1602+ var cls *FileIOStream
1603+ var cerr *glib.Error
1417 1604
1418- OpenReadwritePtr := XGFileOpenReadwrite(x.GoPointer(), CancellableVar.GoPointer())1605+ cret := XGFileOpenReadwrite(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
1419- if OpenReadwritePtr == 0 {
1420- return nil
1421- }
1422 1606
1423- OpenReadwriteCls := &FileIOStream{}1607+ if cret == 0 {
1424- OpenReadwriteCls.Ptr = OpenReadwritePtr1608+ return cls, cerr
1425- return OpenReadwriteCls1609+ }
1610+ cls = &FileIOStream{}
1611+ cls.Ptr = cret
1612+ if cerr == nil {
1613+ return cls, nil
1614+ }
1615+ return cls, cerr
1426 1616
1427 }1617 }
1428 1618
@@ -1442,16 +1632,21 @@ func (x *FileBase) OpenReadwriteAsync(IoPriorityVar int, CancellableVar *Cancell
1442 1632
1443 // Finishes an asynchronous file read operation started with1633 // Finishes an asynchronous file read operation started with
1444 // g_file_open_readwrite_async().1634 // g_file_open_readwrite_async().
1445-func (x *FileBase) OpenReadwriteFinish(ResVar AsyncResult) *FileIOStream {1635+func (x *FileBase) OpenReadwriteFinish(ResVar AsyncResult) (*FileIOStream, error) {
1636+ var cls *FileIOStream
1637+ var cerr *glib.Error
1446 1638
1447- OpenReadwriteFinishPtr := XGFileOpenReadwriteFinish(x.GoPointer(), ResVar.GoPointer())1639+ cret := XGFileOpenReadwriteFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
1448- if OpenReadwriteFinishPtr == 0 {
1449- return nil
1450- }
1451 1640
1452- OpenReadwriteFinishCls := &FileIOStream{}1641+ if cret == 0 {
1453- OpenReadwriteFinishCls.Ptr = OpenReadwriteFinishPtr1642+ return cls, cerr
1454- return OpenReadwriteFinishCls1643+ }
1644+ cls = &FileIOStream{}
1645+ cls.Ptr = cret
1646+ if cerr == nil {
1647+ return cls, nil
1648+ }
1649+ return cls, cerr
1455 1650
1456 }1651 }
1457 1652
@@ -1464,8 +1659,8 @@ func (x *FileBase) OpenReadwriteFinish(ResVar AsyncResult) *FileIOStream {
1464 // This call does no blocking I/O.1659 // This call does no blocking I/O.
1465 func (x *FileBase) PeekPath() string {1660 func (x *FileBase) PeekPath() string {
1466 1661
1467- return XGFilePeekPath(x.GoPointer())1662+ cret := XGFilePeekPath(x.GoPointer())
1468-1663+ return cret
1469 }1664 }
1470 1665
1471 // Polls a file of type %G_FILE_TYPE_MOUNTABLE.1666 // Polls a file of type %G_FILE_TYPE_MOUNTABLE.
@@ -1487,9 +1682,14 @@ func (x *FileBase) PollMountable(CancellableVar *Cancellable, CallbackVar AsyncR
1487 //1682 //
1488 // Finish an asynchronous poll operation that was polled1683 // Finish an asynchronous poll operation that was polled
1489 // with g_file_poll_mountable().1684 // with g_file_poll_mountable().
1490-func (x *FileBase) PollMountableFinish(ResultVar AsyncResult) bool {1685+func (x *FileBase) PollMountableFinish(ResultVar AsyncResult) (bool, error) {
1686+ var cerr *glib.Error
1491 1687
1492- return XGFilePollMountableFinish(x.GoPointer(), ResultVar.GoPointer())1688+ cret := XGFilePollMountableFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
1689+ if cerr == nil {
1690+ return cret, nil
1691+ }
1692+ return cret, cerr
1493 1693
1494 }1694 }
1495 1695
@@ -1499,16 +1699,21 @@ func (x *FileBase) PollMountableFinish(ResultVar AsyncResult) bool {
1499 // If @cancellable is not %NULL, then the operation can be cancelled by1699 // If @cancellable is not %NULL, then the operation can be cancelled by
1500 // triggering the cancellable object from another thread. If the operation1700 // triggering the cancellable object from another thread. If the operation
1501 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.1701 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
1502-func (x *FileBase) QueryDefaultHandler(CancellableVar *Cancellable) *AppInfoBase {1702+func (x *FileBase) QueryDefaultHandler(CancellableVar *Cancellable) (*AppInfoBase, error) {
1703+ var cls *AppInfoBase
1704+ var cerr *glib.Error
1503 1705
1504- QueryDefaultHandlerPtr := XGFileQueryDefaultHandler(x.GoPointer(), CancellableVar.GoPointer())1706+ cret := XGFileQueryDefaultHandler(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
1505- if QueryDefaultHandlerPtr == 0 {
1506- return nil
1507- }
1508 1707
1509- QueryDefaultHandlerCls := &AppInfoBase{}1708+ if cret == 0 {
1510- QueryDefaultHandlerCls.Ptr = QueryDefaultHandlerPtr1709+ return cls, cerr
1511- return QueryDefaultHandlerCls1710+ }
1711+ cls = &AppInfoBase{}
1712+ cls.Ptr = cret
1713+ if cerr == nil {
1714+ return cls, nil
1715+ }
1716+ return cls, cerr
1512 1717
1513 }1718 }
1514 1719
@@ -1520,16 +1725,21 @@ func (x *FileBase) QueryDefaultHandlerAsync(IoPriorityVar int, CancellableVar *C
1520 }1725 }
1521 1726
1522 // Finishes a g_file_query_default_handler_async() operation.1727 // Finishes a g_file_query_default_handler_async() operation.
1523-func (x *FileBase) QueryDefaultHandlerFinish(ResultVar AsyncResult) *AppInfoBase {1728+func (x *FileBase) QueryDefaultHandlerFinish(ResultVar AsyncResult) (*AppInfoBase, error) {
1729+ var cls *AppInfoBase
1730+ var cerr *glib.Error
1524 1731
1525- QueryDefaultHandlerFinishPtr := XGFileQueryDefaultHandlerFinish(x.GoPointer(), ResultVar.GoPointer())1732+ cret := XGFileQueryDefaultHandlerFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
1526- if QueryDefaultHandlerFinishPtr == 0 {
1527- return nil
1528- }
1529 1733
1530- QueryDefaultHandlerFinishCls := &AppInfoBase{}1734+ if cret == 0 {
1531- QueryDefaultHandlerFinishCls.Ptr = QueryDefaultHandlerFinishPtr1735+ return cls, cerr
1532- return QueryDefaultHandlerFinishCls1736+ }
1737+ cls = &AppInfoBase{}
1738+ cls.Ptr = cret
1739+ if cerr == nil {
1740+ return cls, nil
1741+ }
1742+ return cls, cerr
1533 1743
1534 }1744 }
1535 1745
@@ -1557,8 +1767,8 @@ func (x *FileBase) QueryDefaultHandlerFinish(ResultVar AsyncResult) *AppInfoBase
1557 // that can happen due to races when you execute the operation.1767 // that can happen due to races when you execute the operation.
1558 func (x *FileBase) QueryExists(CancellableVar *Cancellable) bool {1768 func (x *FileBase) QueryExists(CancellableVar *Cancellable) bool {
1559 1769
1560- return XGFileQueryExists(x.GoPointer(), CancellableVar.GoPointer())1770+ cret := XGFileQueryExists(x.GoPointer(), CancellableVar.GoPointer())
1561-1771+ return cret
1562 }1772 }
1563 1773
1564 // Utility function to inspect the #GFileType of a file. This is1774 // Utility function to inspect the #GFileType of a file. This is
@@ -1568,8 +1778,8 @@ func (x *FileBase) QueryExists(CancellableVar *Cancellable) bool {
1568 // a regular file, directory, or symlink.1778 // a regular file, directory, or symlink.
1569 func (x *FileBase) QueryFileType(FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) FileType {1779 func (x *FileBase) QueryFileType(FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) FileType {
1570 1780
1571- return XGFileQueryFileType(x.GoPointer(), FlagsVar, CancellableVar.GoPointer())1781+ cret := XGFileQueryFileType(x.GoPointer(), FlagsVar, CancellableVar.GoPointer())
1572-1782+ return cret
1573 }1783 }
1574 1784
1575 // Similar to g_file_query_info(), but obtains information1785 // Similar to g_file_query_info(), but obtains information
@@ -1597,16 +1807,21 @@ func (x *FileBase) QueryFileType(FlagsVar FileQueryInfoFlags, CancellableVar *Ca
1597 // If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will1807 // If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will
1598 // be returned. Other errors are possible too, and depend on what1808 // be returned. Other errors are possible too, and depend on what
1599 // kind of filesystem the file is on.1809 // kind of filesystem the file is on.
1600-func (x *FileBase) QueryFilesystemInfo(AttributesVar string, CancellableVar *Cancellable) *FileInfo {1810+func (x *FileBase) QueryFilesystemInfo(AttributesVar string, CancellableVar *Cancellable) (*FileInfo, error) {
1811+ var cls *FileInfo
1812+ var cerr *glib.Error
1601 1813
1602- QueryFilesystemInfoPtr := XGFileQueryFilesystemInfo(x.GoPointer(), AttributesVar, CancellableVar.GoPointer())1814+ cret := XGFileQueryFilesystemInfo(x.GoPointer(), AttributesVar, CancellableVar.GoPointer(), &cerr)
1603- if QueryFilesystemInfoPtr == 0 {
1604- return nil
1605- }
1606 1815
1607- QueryFilesystemInfoCls := &FileInfo{}1816+ if cret == 0 {
1608- QueryFilesystemInfoCls.Ptr = QueryFilesystemInfoPtr1817+ return cls, cerr
1609- return QueryFilesystemInfoCls1818+ }
1819+ cls = &FileInfo{}
1820+ cls.Ptr = cret
1821+ if cerr == nil {
1822+ return cls, nil
1823+ }
1824+ return cls, cerr
1610 1825
1611 }1826 }
1612 1827
@@ -1629,16 +1844,21 @@ func (x *FileBase) QueryFilesystemInfoAsync(AttributesVar string, IoPriorityVar
1629 1844
1630 // Finishes an asynchronous filesystem info query.1845 // Finishes an asynchronous filesystem info query.
1631 // See g_file_query_filesystem_info_async().1846 // See g_file_query_filesystem_info_async().
1632-func (x *FileBase) QueryFilesystemInfoFinish(ResVar AsyncResult) *FileInfo {1847+func (x *FileBase) QueryFilesystemInfoFinish(ResVar AsyncResult) (*FileInfo, error) {
1848+ var cls *FileInfo
1849+ var cerr *glib.Error
1633 1850
1634- QueryFilesystemInfoFinishPtr := XGFileQueryFilesystemInfoFinish(x.GoPointer(), ResVar.GoPointer())1851+ cret := XGFileQueryFilesystemInfoFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
1635- if QueryFilesystemInfoFinishPtr == 0 {
1636- return nil
1637- }
1638 1852
1639- QueryFilesystemInfoFinishCls := &FileInfo{}1853+ if cret == 0 {
1640- QueryFilesystemInfoFinishCls.Ptr = QueryFilesystemInfoFinishPtr1854+ return cls, cerr
1641- return QueryFilesystemInfoFinishCls1855+ }
1856+ cls = &FileInfo{}
1857+ cls.Ptr = cret
1858+ if cerr == nil {
1859+ return cls, nil
1860+ }
1861+ return cls, cerr
1642 1862
1643 }1863 }
1644 1864
@@ -1672,16 +1892,21 @@ func (x *FileBase) QueryFilesystemInfoFinish(ResVar AsyncResult) *FileInfo {
1672 // If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will be1892 // If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will be
1673 // returned. Other errors are possible too, and depend on what kind of1893 // returned. Other errors are possible too, and depend on what kind of
1674 // filesystem the file is on.1894 // filesystem the file is on.
1675-func (x *FileBase) QueryInfo(AttributesVar string, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) *FileInfo {1895+func (x *FileBase) QueryInfo(AttributesVar string, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) (*FileInfo, error) {
1896+ var cls *FileInfo
1897+ var cerr *glib.Error
1676 1898
1677- QueryInfoPtr := XGFileQueryInfo(x.GoPointer(), AttributesVar, FlagsVar, CancellableVar.GoPointer())1899+ cret := XGFileQueryInfo(x.GoPointer(), AttributesVar, FlagsVar, CancellableVar.GoPointer(), &cerr)
1678- if QueryInfoPtr == 0 {
1679- return nil
1680- }
1681 1900
1682- QueryInfoCls := &FileInfo{}1901+ if cret == 0 {
1683- QueryInfoCls.Ptr = QueryInfoPtr1902+ return cls, cerr
1684- return QueryInfoCls1903+ }
1904+ cls = &FileInfo{}
1905+ cls.Ptr = cret
1906+ if cerr == nil {
1907+ return cls, nil
1908+ }
1909+ return cls, cerr
1685 1910
1686 }1911 }
1687 1912
@@ -1702,16 +1927,21 @@ func (x *FileBase) QueryInfoAsync(AttributesVar string, FlagsVar FileQueryInfoFl
1702 1927
1703 // Finishes an asynchronous file info query.1928 // Finishes an asynchronous file info query.
1704 // See g_file_query_info_async().1929 // See g_file_query_info_async().
1705-func (x *FileBase) QueryInfoFinish(ResVar AsyncResult) *FileInfo {1930+func (x *FileBase) QueryInfoFinish(ResVar AsyncResult) (*FileInfo, error) {
1931+ var cls *FileInfo
1932+ var cerr *glib.Error
1706 1933
1707- QueryInfoFinishPtr := XGFileQueryInfoFinish(x.GoPointer(), ResVar.GoPointer())1934+ cret := XGFileQueryInfoFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
1708- if QueryInfoFinishPtr == 0 {
1709- return nil
1710- }
1711 1935
1712- QueryInfoFinishCls := &FileInfo{}1936+ if cret == 0 {
1713- QueryInfoFinishCls.Ptr = QueryInfoFinishPtr1937+ return cls, cerr
1714- return QueryInfoFinishCls1938+ }
1939+ cls = &FileInfo{}
1940+ cls.Ptr = cret
1941+ if cerr == nil {
1942+ return cls, nil
1943+ }
1944+ return cls, cerr
1715 1945
1716 }1946 }
1717 1947
@@ -1725,9 +1955,14 @@ func (x *FileBase) QueryInfoFinish(ResVar AsyncResult) *FileInfo {
1725 // If @cancellable is not %NULL, then the operation can be cancelled by1955 // If @cancellable is not %NULL, then the operation can be cancelled by
1726 // triggering the cancellable object from another thread. If the operation1956 // triggering the cancellable object from another thread. If the operation
1727 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.1957 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
1728-func (x *FileBase) QuerySettableAttributes(CancellableVar *Cancellable) *FileAttributeInfoList {1958+func (x *FileBase) QuerySettableAttributes(CancellableVar *Cancellable) (*FileAttributeInfoList, error) {
1959+ var cerr *glib.Error
1729 1960
1730- return XGFileQuerySettableAttributes(x.GoPointer(), CancellableVar.GoPointer())1961+ cret := XGFileQuerySettableAttributes(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
1962+ if cerr == nil {
1963+ return cret, nil
1964+ }
1965+ return cret, cerr
1731 1966
1732 }1967 }
1733 1968
@@ -1738,9 +1973,14 @@ func (x *FileBase) QuerySettableAttributes(CancellableVar *Cancellable) *FileAtt
1738 // If @cancellable is not %NULL, then the operation can be cancelled by1973 // If @cancellable is not %NULL, then the operation can be cancelled by
1739 // triggering the cancellable object from another thread. If the operation1974 // triggering the cancellable object from another thread. If the operation
1740 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.1975 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
1741-func (x *FileBase) QueryWritableNamespaces(CancellableVar *Cancellable) *FileAttributeInfoList {1976+func (x *FileBase) QueryWritableNamespaces(CancellableVar *Cancellable) (*FileAttributeInfoList, error) {
1977+ var cerr *glib.Error
1742 1978
1743- return XGFileQueryWritableNamespaces(x.GoPointer(), CancellableVar.GoPointer())1979+ cret := XGFileQueryWritableNamespaces(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
1980+ if cerr == nil {
1981+ return cret, nil
1982+ }
1983+ return cret, cerr
1744 1984
1745 }1985 }
1746 1986
@@ -1755,16 +1995,21 @@ func (x *FileBase) QueryWritableNamespaces(CancellableVar *Cancellable) *FileAtt
1755 // returned. If the file is a directory, the %G_IO_ERROR_IS_DIRECTORY1995 // returned. If the file is a directory, the %G_IO_ERROR_IS_DIRECTORY
1756 // error will be returned. Other errors are possible too, and depend1996 // error will be returned. Other errors are possible too, and depend
1757 // on what kind of filesystem the file is on.1997 // on what kind of filesystem the file is on.
1758-func (x *FileBase) Read(CancellableVar *Cancellable) *FileInputStream {1998+func (x *FileBase) Read(CancellableVar *Cancellable) (*FileInputStream, error) {
1999+ var cls *FileInputStream
2000+ var cerr *glib.Error
1759 2001
1760- ReadPtr := XGFileRead(x.GoPointer(), CancellableVar.GoPointer())2002+ cret := XGFileRead(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
1761- if ReadPtr == 0 {
1762- return nil
1763- }
1764 2003
1765- ReadCls := &FileInputStream{}2004+ if cret == 0 {
1766- ReadCls.Ptr = ReadPtr2005+ return cls, cerr
1767- return ReadCls2006+ }
2007+ cls = &FileInputStream{}
2008+ cls.Ptr = cret
2009+ if cerr == nil {
2010+ return cls, nil
2011+ }
2012+ return cls, cerr
1768 2013
1769 }2014 }
1770 2015
@@ -1784,16 +2029,21 @@ func (x *FileBase) ReadAsync(IoPriorityVar int, CancellableVar *Cancellable, Cal
1784 2029
1785 // Finishes an asynchronous file read operation started with2030 // Finishes an asynchronous file read operation started with
1786 // g_file_read_async().2031 // g_file_read_async().
1787-func (x *FileBase) ReadFinish(ResVar AsyncResult) *FileInputStream {2032+func (x *FileBase) ReadFinish(ResVar AsyncResult) (*FileInputStream, error) {
2033+ var cls *FileInputStream
2034+ var cerr *glib.Error
1788 2035
1789- ReadFinishPtr := XGFileReadFinish(x.GoPointer(), ResVar.GoPointer())2036+ cret := XGFileReadFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
1790- if ReadFinishPtr == 0 {
1791- return nil
1792- }
1793 2037
1794- ReadFinishCls := &FileInputStream{}2038+ if cret == 0 {
1795- ReadFinishCls.Ptr = ReadFinishPtr2039+ return cls, cerr
1796- return ReadFinishCls2040+ }
2041+ cls = &FileInputStream{}
2042+ cls.Ptr = cret
2043+ if cerr == nil {
2044+ return cls, nil
2045+ }
2046+ return cls, cerr
1797 2047
1798 }2048 }
1799 2049
@@ -1838,16 +2088,21 @@ func (x *FileBase) ReadFinish(ResVar AsyncResult) *FileInputStream {
1838 // %G_IO_ERROR_INVALID_FILENAME error, and if the name is to long2088 // %G_IO_ERROR_INVALID_FILENAME error, and if the name is to long
1839 // %G_IO_ERROR_FILENAME_TOO_LONG will be returned. Other errors are2089 // %G_IO_ERROR_FILENAME_TOO_LONG will be returned. Other errors are
1840 // possible too, and depend on what kind of filesystem the file is on.2090 // possible too, and depend on what kind of filesystem the file is on.
1841-func (x *FileBase) Replace(EtagVar string, MakeBackupVar bool, FlagsVar FileCreateFlags, CancellableVar *Cancellable) *FileOutputStream {2091+func (x *FileBase) Replace(EtagVar string, MakeBackupVar bool, FlagsVar FileCreateFlags, CancellableVar *Cancellable) (*FileOutputStream, error) {
2092+ var cls *FileOutputStream
2093+ var cerr *glib.Error
1842 2094
1843- ReplacePtr := XGFileReplace(x.GoPointer(), EtagVar, MakeBackupVar, FlagsVar, CancellableVar.GoPointer())2095+ cret := XGFileReplace(x.GoPointer(), EtagVar, MakeBackupVar, FlagsVar, CancellableVar.GoPointer(), &cerr)
1844- if ReplacePtr == 0 {
1845- return nil
1846- }
1847 2096
1848- ReplaceCls := &FileOutputStream{}2097+ if cret == 0 {
1849- ReplaceCls.Ptr = ReplacePtr2098+ return cls, cerr
1850- return ReplaceCls2099+ }
2100+ cls = &FileOutputStream{}
2101+ cls.Ptr = cret
2102+ if cerr == nil {
2103+ return cls, nil
2104+ }
2105+ return cls, cerr
1851 2106
1852 }2107 }
1853 2108
@@ -1882,9 +2137,14 @@ func (x *FileBase) ReplaceAsync(EtagVar string, MakeBackupVar bool, FlagsVar Fil
1882 //2137 //
1883 // The returned @new_etag can be used to verify that the file hasn't2138 // The returned @new_etag can be used to verify that the file hasn't
1884 // changed the next time it is saved over.2139 // changed the next time it is saved over.
1885-func (x *FileBase) ReplaceContents(ContentsVar string, LengthVar uint, EtagVar string, MakeBackupVar bool, FlagsVar FileCreateFlags, NewEtagVar string, CancellableVar *Cancellable) bool {2140+func (x *FileBase) ReplaceContents(ContentsVar string, LengthVar uint, EtagVar string, MakeBackupVar bool, FlagsVar FileCreateFlags, NewEtagVar string, CancellableVar *Cancellable) (bool, error) {
2141+ var cerr *glib.Error
1886 2142
1887- return XGFileReplaceContents(x.GoPointer(), ContentsVar, LengthVar, EtagVar, MakeBackupVar, FlagsVar, NewEtagVar, CancellableVar.GoPointer())2143+ cret := XGFileReplaceContents(x.GoPointer(), ContentsVar, LengthVar, EtagVar, MakeBackupVar, FlagsVar, NewEtagVar, CancellableVar.GoPointer(), &cerr)
2144+ if cerr == nil {
2145+ return cret, nil
2146+ }
2147+ return cret, cerr
1888 2148
1889 }2149 }
1890 2150
@@ -1930,24 +2190,34 @@ func (x *FileBase) ReplaceContentsBytesAsync(ContentsVar *glib.Bytes, EtagVar st
1930 // Finishes an asynchronous replace of the given @file. See2190 // Finishes an asynchronous replace of the given @file. See
1931 // g_file_replace_contents_async(). Sets @new_etag to the new entity2191 // g_file_replace_contents_async(). Sets @new_etag to the new entity
1932 // tag for the document, if present.2192 // tag for the document, if present.
1933-func (x *FileBase) ReplaceContentsFinish(ResVar AsyncResult, NewEtagVar string) bool {2193+func (x *FileBase) ReplaceContentsFinish(ResVar AsyncResult, NewEtagVar string) (bool, error) {
2194+ var cerr *glib.Error
1934 2195
1935- return XGFileReplaceContentsFinish(x.GoPointer(), ResVar.GoPointer(), NewEtagVar)2196+ cret := XGFileReplaceContentsFinish(x.GoPointer(), ResVar.GoPointer(), NewEtagVar, &cerr)
2197+ if cerr == nil {
2198+ return cret, nil
2199+ }
2200+ return cret, cerr
1936 2201
1937 }2202 }
1938 2203
1939 // Finishes an asynchronous file replace operation started with2204 // Finishes an asynchronous file replace operation started with
1940 // g_file_replace_async().2205 // g_file_replace_async().
1941-func (x *FileBase) ReplaceFinish(ResVar AsyncResult) *FileOutputStream {2206+func (x *FileBase) ReplaceFinish(ResVar AsyncResult) (*FileOutputStream, error) {
2207+ var cls *FileOutputStream
2208+ var cerr *glib.Error
1942 2209
1943- ReplaceFinishPtr := XGFileReplaceFinish(x.GoPointer(), ResVar.GoPointer())2210+ cret := XGFileReplaceFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
1944- if ReplaceFinishPtr == 0 {
1945- return nil
1946- }
1947 2211
1948- ReplaceFinishCls := &FileOutputStream{}2212+ if cret == 0 {
1949- ReplaceFinishCls.Ptr = ReplaceFinishPtr2213+ return cls, cerr
1950- return ReplaceFinishCls2214+ }
2215+ cls = &FileOutputStream{}
2216+ cls.Ptr = cret
2217+ if cerr == nil {
2218+ return cls, nil
2219+ }
2220+ return cls, cerr
1951 2221
1952 }2222 }
1953 2223
@@ -1961,16 +2231,21 @@ func (x *FileBase) ReplaceFinish(ResVar AsyncResult) *FileOutputStream {
1961 // Note that in many non-local file cases read and write streams are not2231 // Note that in many non-local file cases read and write streams are not
1962 // supported, so make sure you really need to do read and write streaming,2232 // supported, so make sure you really need to do read and write streaming,
1963 // rather than just opening for reading or writing.2233 // rather than just opening for reading or writing.
1964-func (x *FileBase) ReplaceReadwrite(EtagVar string, MakeBackupVar bool, FlagsVar FileCreateFlags, CancellableVar *Cancellable) *FileIOStream {2234+func (x *FileBase) ReplaceReadwrite(EtagVar string, MakeBackupVar bool, FlagsVar FileCreateFlags, CancellableVar *Cancellable) (*FileIOStream, error) {
2235+ var cls *FileIOStream
2236+ var cerr *glib.Error
1965 2237
1966- ReplaceReadwritePtr := XGFileReplaceReadwrite(x.GoPointer(), EtagVar, MakeBackupVar, FlagsVar, CancellableVar.GoPointer())2238+ cret := XGFileReplaceReadwrite(x.GoPointer(), EtagVar, MakeBackupVar, FlagsVar, CancellableVar.GoPointer(), &cerr)
1967- if ReplaceReadwritePtr == 0 {
1968- return nil
1969- }
1970 2239
1971- ReplaceReadwriteCls := &FileIOStream{}2240+ if cret == 0 {
1972- ReplaceReadwriteCls.Ptr = ReplaceReadwritePtr2241+ return cls, cerr
1973- return ReplaceReadwriteCls2242+ }
2243+ cls = &FileIOStream{}
2244+ cls.Ptr = cret
2245+ if cerr == nil {
2246+ return cls, nil
2247+ }
2248+ return cls, cerr
1974 2249
1975 }2250 }
1976 2251
@@ -1992,16 +2267,21 @@ func (x *FileBase) ReplaceReadwriteAsync(EtagVar string, MakeBackupVar bool, Fla
1992 2267
1993 // Finishes an asynchronous file replace operation started with2268 // Finishes an asynchronous file replace operation started with
1994 // g_file_replace_readwrite_async().2269 // g_file_replace_readwrite_async().
1995-func (x *FileBase) ReplaceReadwriteFinish(ResVar AsyncResult) *FileIOStream {2270+func (x *FileBase) ReplaceReadwriteFinish(ResVar AsyncResult) (*FileIOStream, error) {
2271+ var cls *FileIOStream
2272+ var cerr *glib.Error
1996 2273
1997- ReplaceReadwriteFinishPtr := XGFileReplaceReadwriteFinish(x.GoPointer(), ResVar.GoPointer())2274+ cret := XGFileReplaceReadwriteFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
1998- if ReplaceReadwriteFinishPtr == 0 {
1999- return nil
2000- }
2001 2275
2002- ReplaceReadwriteFinishCls := &FileIOStream{}2276+ if cret == 0 {
2003- ReplaceReadwriteFinishCls.Ptr = ReplaceReadwriteFinishPtr2277+ return cls, cerr
2004- return ReplaceReadwriteFinishCls2278+ }
2279+ cls = &FileIOStream{}
2280+ cls.Ptr = cret
2281+ if cerr == nil {
2282+ return cls, nil
2283+ }
2284+ return cls, cerr
2005 2285
2006 }2286 }
2007 2287
@@ -2012,16 +2292,16 @@ func (x *FileBase) ReplaceReadwriteFinish(ResVar AsyncResult) *FileIOStream {
2012 // If the @relative_path is an absolute path name, the resolution2292 // If the @relative_path is an absolute path name, the resolution
2013 // is done absolutely (without taking @file path as base).2293 // is done absolutely (without taking @file path as base).
2014 func (x *FileBase) ResolveRelativePath(RelativePathVar string) *FileBase {2294 func (x *FileBase) ResolveRelativePath(RelativePathVar string) *FileBase {
2295+ var cls *FileBase
2015 2296
2016- ResolveRelativePathPtr := XGFileResolveRelativePath(x.GoPointer(), RelativePathVar)2297+ cret := XGFileResolveRelativePath(x.GoPointer(), RelativePathVar)
2017- if ResolveRelativePathPtr == 0 {
2018- return nil
2019- }
2020-
2021- ResolveRelativePathCls := &FileBase{}
2022- ResolveRelativePathCls.Ptr = ResolveRelativePathPtr
2023- return ResolveRelativePathCls
2024 2298
2299+ if cret == 0 {
2300+ return cls
2301+ }
2302+ cls = &FileBase{}
2303+ cls.Ptr = cret
2304+ return cls
2025 }2305 }
2026 2306
2027 // Sets an attribute in the file with attribute name @attribute to @value_p.2307 // Sets an attribute in the file with attribute name @attribute to @value_p.
@@ -2032,9 +2312,14 @@ func (x *FileBase) ResolveRelativePath(RelativePathVar string) *FileBase {
2032 // If @cancellable is not %NULL, then the operation can be cancelled by2312 // If @cancellable is not %NULL, then the operation can be cancelled by
2033 // triggering the cancellable object from another thread. If the operation2313 // triggering the cancellable object from another thread. If the operation
2034 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.2314 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
2035-func (x *FileBase) SetAttribute(AttributeVar string, TypeVar FileAttributeType, ValuePVar uintptr, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) bool {2315+func (x *FileBase) SetAttribute(AttributeVar string, TypeVar FileAttributeType, ValuePVar uintptr, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) (bool, error) {
2316+ var cerr *glib.Error
2036 2317
2037- return XGFileSetAttribute(x.GoPointer(), AttributeVar, TypeVar, ValuePVar, FlagsVar, CancellableVar.GoPointer())2318+ cret := XGFileSetAttribute(x.GoPointer(), AttributeVar, TypeVar, ValuePVar, FlagsVar, CancellableVar.GoPointer(), &cerr)
2319+ if cerr == nil {
2320+ return cret, nil
2321+ }
2322+ return cret, cerr
2038 2323
2039 }2324 }
2040 2325
@@ -2045,9 +2330,14 @@ func (x *FileBase) SetAttribute(AttributeVar string, TypeVar FileAttributeType,
2045 // If @cancellable is not %NULL, then the operation can be cancelled by2330 // If @cancellable is not %NULL, then the operation can be cancelled by
2046 // triggering the cancellable object from another thread. If the operation2331 // triggering the cancellable object from another thread. If the operation
2047 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.2332 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
2048-func (x *FileBase) SetAttributeByteString(AttributeVar string, ValueVar string, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) bool {2333+func (x *FileBase) SetAttributeByteString(AttributeVar string, ValueVar string, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) (bool, error) {
2334+ var cerr *glib.Error
2049 2335
2050- return XGFileSetAttributeByteString(x.GoPointer(), AttributeVar, ValueVar, FlagsVar, CancellableVar.GoPointer())2336+ cret := XGFileSetAttributeByteString(x.GoPointer(), AttributeVar, ValueVar, FlagsVar, CancellableVar.GoPointer(), &cerr)
2337+ if cerr == nil {
2338+ return cret, nil
2339+ }
2340+ return cret, cerr
2051 2341
2052 }2342 }
2053 2343
@@ -2057,9 +2347,14 @@ func (x *FileBase) SetAttributeByteString(AttributeVar string, ValueVar string,
2057 // If @cancellable is not %NULL, then the operation can be cancelled by2347 // If @cancellable is not %NULL, then the operation can be cancelled by
2058 // triggering the cancellable object from another thread. If the operation2348 // triggering the cancellable object from another thread. If the operation
2059 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.2349 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
2060-func (x *FileBase) SetAttributeInt32(AttributeVar string, ValueVar int32, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) bool {2350+func (x *FileBase) SetAttributeInt32(AttributeVar string, ValueVar int32, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) (bool, error) {
2351+ var cerr *glib.Error
2061 2352
2062- return XGFileSetAttributeInt32(x.GoPointer(), AttributeVar, ValueVar, FlagsVar, CancellableVar.GoPointer())2353+ cret := XGFileSetAttributeInt32(x.GoPointer(), AttributeVar, ValueVar, FlagsVar, CancellableVar.GoPointer(), &cerr)
2354+ if cerr == nil {
2355+ return cret, nil
2356+ }
2357+ return cret, cerr
2063 2358
2064 }2359 }
2065 2360
@@ -2069,9 +2364,14 @@ func (x *FileBase) SetAttributeInt32(AttributeVar string, ValueVar int32, FlagsV
2069 // If @cancellable is not %NULL, then the operation can be cancelled by2364 // If @cancellable is not %NULL, then the operation can be cancelled by
2070 // triggering the cancellable object from another thread. If the operation2365 // triggering the cancellable object from another thread. If the operation
2071 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.2366 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
2072-func (x *FileBase) SetAttributeInt64(AttributeVar string, ValueVar int64, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) bool {2367+func (x *FileBase) SetAttributeInt64(AttributeVar string, ValueVar int64, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) (bool, error) {
2368+ var cerr *glib.Error
2073 2369
2074- return XGFileSetAttributeInt64(x.GoPointer(), AttributeVar, ValueVar, FlagsVar, CancellableVar.GoPointer())2370+ cret := XGFileSetAttributeInt64(x.GoPointer(), AttributeVar, ValueVar, FlagsVar, CancellableVar.GoPointer(), &cerr)
2371+ if cerr == nil {
2372+ return cret, nil
2373+ }
2374+ return cret, cerr
2075 2375
2076 }2376 }
2077 2377
@@ -2081,9 +2381,14 @@ func (x *FileBase) SetAttributeInt64(AttributeVar string, ValueVar int64, FlagsV
2081 // If @cancellable is not %NULL, then the operation can be cancelled by2381 // If @cancellable is not %NULL, then the operation can be cancelled by
2082 // triggering the cancellable object from another thread. If the operation2382 // triggering the cancellable object from another thread. If the operation
2083 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.2383 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
2084-func (x *FileBase) SetAttributeString(AttributeVar string, ValueVar string, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) bool {2384+func (x *FileBase) SetAttributeString(AttributeVar string, ValueVar string, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) (bool, error) {
2385+ var cerr *glib.Error
2085 2386
2086- return XGFileSetAttributeString(x.GoPointer(), AttributeVar, ValueVar, FlagsVar, CancellableVar.GoPointer())2387+ cret := XGFileSetAttributeString(x.GoPointer(), AttributeVar, ValueVar, FlagsVar, CancellableVar.GoPointer(), &cerr)
2388+ if cerr == nil {
2389+ return cret, nil
2390+ }
2391+ return cret, cerr
2087 2392
2088 }2393 }
2089 2394
@@ -2093,9 +2398,14 @@ func (x *FileBase) SetAttributeString(AttributeVar string, ValueVar string, Flag
2093 // If @cancellable is not %NULL, then the operation can be cancelled by2398 // If @cancellable is not %NULL, then the operation can be cancelled by
2094 // triggering the cancellable object from another thread. If the operation2399 // triggering the cancellable object from another thread. If the operation
2095 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.2400 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
2096-func (x *FileBase) SetAttributeUint32(AttributeVar string, ValueVar uint32, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) bool {2401+func (x *FileBase) SetAttributeUint32(AttributeVar string, ValueVar uint32, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) (bool, error) {
2402+ var cerr *glib.Error
2097 2403
2098- return XGFileSetAttributeUint32(x.GoPointer(), AttributeVar, ValueVar, FlagsVar, CancellableVar.GoPointer())2404+ cret := XGFileSetAttributeUint32(x.GoPointer(), AttributeVar, ValueVar, FlagsVar, CancellableVar.GoPointer(), &cerr)
2405+ if cerr == nil {
2406+ return cret, nil
2407+ }
2408+ return cret, cerr
2099 2409
2100 }2410 }
2101 2411
@@ -2105,9 +2415,14 @@ func (x *FileBase) SetAttributeUint32(AttributeVar string, ValueVar uint32, Flag
2105 // If @cancellable is not %NULL, then the operation can be cancelled by2415 // If @cancellable is not %NULL, then the operation can be cancelled by
2106 // triggering the cancellable object from another thread. If the operation2416 // triggering the cancellable object from another thread. If the operation
2107 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.2417 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
2108-func (x *FileBase) SetAttributeUint64(AttributeVar string, ValueVar uint64, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) bool {2418+func (x *FileBase) SetAttributeUint64(AttributeVar string, ValueVar uint64, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) (bool, error) {
2419+ var cerr *glib.Error
2109 2420
2110- return XGFileSetAttributeUint64(x.GoPointer(), AttributeVar, ValueVar, FlagsVar, CancellableVar.GoPointer())2421+ cret := XGFileSetAttributeUint64(x.GoPointer(), AttributeVar, ValueVar, FlagsVar, CancellableVar.GoPointer(), &cerr)
2422+ if cerr == nil {
2423+ return cret, nil
2424+ }
2425+ return cret, cerr
2111 2426
2112 }2427 }
2113 2428
@@ -2126,9 +2441,14 @@ func (x *FileBase) SetAttributesAsync(InfoVar *FileInfo, FlagsVar FileQueryInfoF
2126 }2441 }
2127 2442
2128 // Finishes setting an attribute started in g_file_set_attributes_async().2443 // Finishes setting an attribute started in g_file_set_attributes_async().
2129-func (x *FileBase) SetAttributesFinish(ResultVar AsyncResult, InfoVar **FileInfo) bool {2444+func (x *FileBase) SetAttributesFinish(ResultVar AsyncResult, InfoVar **FileInfo) (bool, error) {
2445+ var cerr *glib.Error
2130 2446
2131- return XGFileSetAttributesFinish(x.GoPointer(), ResultVar.GoPointer(), gobject.ConvertPtr(InfoVar))2447+ cret := XGFileSetAttributesFinish(x.GoPointer(), ResultVar.GoPointer(), gobject.ConvertPtr(InfoVar), &cerr)
2448+ if cerr == nil {
2449+ return cret, nil
2450+ }
2451+ return cret, cerr
2132 2452
2133 }2453 }
2134 2454
@@ -2144,9 +2464,14 @@ func (x *FileBase) SetAttributesFinish(ResultVar AsyncResult, InfoVar **FileInfo
2144 // If @cancellable is not %NULL, then the operation can be cancelled by2464 // If @cancellable is not %NULL, then the operation can be cancelled by
2145 // triggering the cancellable object from another thread. If the operation2465 // triggering the cancellable object from another thread. If the operation
2146 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.2466 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
2147-func (x *FileBase) SetAttributesFromInfo(InfoVar *FileInfo, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) bool {2467+func (x *FileBase) SetAttributesFromInfo(InfoVar *FileInfo, FlagsVar FileQueryInfoFlags, CancellableVar *Cancellable) (bool, error) {
2468+ var cerr *glib.Error
2148 2469
2149- return XGFileSetAttributesFromInfo(x.GoPointer(), InfoVar.GoPointer(), FlagsVar, CancellableVar.GoPointer())2470+ cret := XGFileSetAttributesFromInfo(x.GoPointer(), InfoVar.GoPointer(), FlagsVar, CancellableVar.GoPointer(), &cerr)
2471+ if cerr == nil {
2472+ return cret, nil
2473+ }
2474+ return cret, cerr
2150 2475
2151 }2476 }
2152 2477
@@ -2165,16 +2490,21 @@ func (x *FileBase) SetAttributesFromInfo(InfoVar *FileInfo, FlagsVar FileQueryIn
2165 // If @cancellable is not %NULL, then the operation can be cancelled by2490 // If @cancellable is not %NULL, then the operation can be cancelled by
2166 // triggering the cancellable object from another thread. If the operation2491 // triggering the cancellable object from another thread. If the operation
2167 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.2492 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
2168-func (x *FileBase) SetDisplayName(DisplayNameVar string, CancellableVar *Cancellable) *FileBase {2493+func (x *FileBase) SetDisplayName(DisplayNameVar string, CancellableVar *Cancellable) (*FileBase, error) {
2494+ var cls *FileBase
2495+ var cerr *glib.Error
2169 2496
2170- SetDisplayNamePtr := XGFileSetDisplayName(x.GoPointer(), DisplayNameVar, CancellableVar.GoPointer())2497+ cret := XGFileSetDisplayName(x.GoPointer(), DisplayNameVar, CancellableVar.GoPointer(), &cerr)
2171- if SetDisplayNamePtr == 0 {
2172- return nil
2173- }
2174 2498
2175- SetDisplayNameCls := &FileBase{}2499+ if cret == 0 {
2176- SetDisplayNameCls.Ptr = SetDisplayNamePtr2500+ return cls, cerr
2177- return SetDisplayNameCls2501+ }
2502+ cls = &FileBase{}
2503+ cls.Ptr = cret
2504+ if cerr == nil {
2505+ return cls, nil
2506+ }
2507+ return cls, cerr
2178 2508
2179 }2509 }
2180 2510
@@ -2194,16 +2524,21 @@ func (x *FileBase) SetDisplayNameAsync(DisplayNameVar string, IoPriorityVar int,
2194 2524
2195 // Finishes setting a display name started with2525 // Finishes setting a display name started with
2196 // g_file_set_display_name_async().2526 // g_file_set_display_name_async().
2197-func (x *FileBase) SetDisplayNameFinish(ResVar AsyncResult) *FileBase {2527+func (x *FileBase) SetDisplayNameFinish(ResVar AsyncResult) (*FileBase, error) {
2528+ var cls *FileBase
2529+ var cerr *glib.Error
2198 2530
2199- SetDisplayNameFinishPtr := XGFileSetDisplayNameFinish(x.GoPointer(), ResVar.GoPointer())2531+ cret := XGFileSetDisplayNameFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
2200- if SetDisplayNameFinishPtr == 0 {
2201- return nil
2202- }
2203 2532
2204- SetDisplayNameFinishCls := &FileBase{}2533+ if cret == 0 {
2205- SetDisplayNameFinishCls.Ptr = SetDisplayNameFinishPtr2534+ return cls, cerr
2206- return SetDisplayNameFinishCls2535+ }
2536+ cls = &FileBase{}
2537+ cls.Ptr = cret
2538+ if cerr == nil {
2539+ return cls, nil
2540+ }
2541+ return cls, cerr
2207 2542
2208 }2543 }
2209 2544
@@ -2228,9 +2563,14 @@ func (x *FileBase) StartMountable(FlagsVar DriveStartFlags, StartOperationVar *M
2228 //2563 //
2229 // Finish an asynchronous start operation that was started2564 // Finish an asynchronous start operation that was started
2230 // with g_file_start_mountable().2565 // with g_file_start_mountable().
2231-func (x *FileBase) StartMountableFinish(ResultVar AsyncResult) bool {2566+func (x *FileBase) StartMountableFinish(ResultVar AsyncResult) (bool, error) {
2567+ var cerr *glib.Error
2232 2568
2233- return XGFileStartMountableFinish(x.GoPointer(), ResultVar.GoPointer())2569+ cret := XGFileStartMountableFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
2570+ if cerr == nil {
2571+ return cret, nil
2572+ }
2573+ return cret, cerr
2234 2574
2235 }2575 }
2236 2576
@@ -2253,9 +2593,14 @@ func (x *FileBase) StopMountable(FlagsVar MountUnmountFlags, MountOperationVar *
2253 //2593 //
2254 // Finish an asynchronous stop operation that was started2594 // Finish an asynchronous stop operation that was started
2255 // with g_file_stop_mountable().2595 // with g_file_stop_mountable().
2256-func (x *FileBase) StopMountableFinish(ResultVar AsyncResult) bool {2596+func (x *FileBase) StopMountableFinish(ResultVar AsyncResult) (bool, error) {
2597+ var cerr *glib.Error
2257 2598
2258- return XGFileStopMountableFinish(x.GoPointer(), ResultVar.GoPointer())2599+ cret := XGFileStopMountableFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
2600+ if cerr == nil {
2601+ return cret, nil
2602+ }
2603+ return cret, cerr
2259 2604
2260 }2605 }
2261 2606
@@ -2265,8 +2610,8 @@ func (x *FileBase) StopMountableFinish(ResultVar AsyncResult) bool {
2265 // @file in a thread that has a thread-default context.2610 // @file in a thread that has a thread-default context.
2266 func (x *FileBase) SupportsThreadContexts() bool {2611 func (x *FileBase) SupportsThreadContexts() bool {
2267 2612
2268- return XGFileSupportsThreadContexts(x.GoPointer())2613+ cret := XGFileSupportsThreadContexts(x.GoPointer())
2269-2614+ return cret
2270 }2615 }
2271 2616
2272 // Sends @file to the "Trashcan", if possible. This is similar to2617 // Sends @file to the "Trashcan", if possible. This is similar to
@@ -2279,9 +2624,14 @@ func (x *FileBase) SupportsThreadContexts() bool {
2279 // If @cancellable is not %NULL, then the operation can be cancelled by2624 // If @cancellable is not %NULL, then the operation can be cancelled by
2280 // triggering the cancellable object from another thread. If the operation2625 // triggering the cancellable object from another thread. If the operation
2281 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.2626 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
2282-func (x *FileBase) Trash(CancellableVar *Cancellable) bool {2627+func (x *FileBase) Trash(CancellableVar *Cancellable) (bool, error) {
2628+ var cerr *glib.Error
2283 2629
2284- return XGFileTrash(x.GoPointer(), CancellableVar.GoPointer())2630+ cret := XGFileTrash(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
2631+ if cerr == nil {
2632+ return cret, nil
2633+ }
2634+ return cret, cerr
2285 2635
2286 }2636 }
2287 2637
@@ -2294,9 +2644,14 @@ func (x *FileBase) TrashAsync(IoPriorityVar int, CancellableVar *Cancellable, Ca
2294 2644
2295 // Finishes an asynchronous file trashing operation, started with2645 // Finishes an asynchronous file trashing operation, started with
2296 // g_file_trash_async().2646 // g_file_trash_async().
2297-func (x *FileBase) TrashFinish(ResultVar AsyncResult) bool {2647+func (x *FileBase) TrashFinish(ResultVar AsyncResult) (bool, error) {
2648+ var cerr *glib.Error
2298 2649
2299- return XGFileTrashFinish(x.GoPointer(), ResultVar.GoPointer())2650+ cret := XGFileTrashFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
2651+ if cerr == nil {
2652+ return cret, nil
2653+ }
2654+ return cret, cerr
2300 2655
2301 }2656 }
2302 2657
@@ -2319,9 +2674,14 @@ func (x *FileBase) UnmountMountable(FlagsVar MountUnmountFlags, CancellableVar *
2319 //2674 //
2320 // Finish an asynchronous unmount operation that was started2675 // Finish an asynchronous unmount operation that was started
2321 // with g_file_unmount_mountable().2676 // with g_file_unmount_mountable().
2322-func (x *FileBase) UnmountMountableFinish(ResultVar AsyncResult) bool {2677+func (x *FileBase) UnmountMountableFinish(ResultVar AsyncResult) (bool, error) {
2678+ var cerr *glib.Error
2323 2679
2324- return XGFileUnmountMountableFinish(x.GoPointer(), ResultVar.GoPointer())2680+ cret := XGFileUnmountMountableFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
2681+ if cerr == nil {
2682+ return cret, nil
2683+ }
2684+ return cret, cerr
2325 2685
2326 }2686 }
2327 2687
@@ -2345,44 +2705,49 @@ func (x *FileBase) UnmountMountableWithOperation(FlagsVar MountUnmountFlags, Mou
2345 //2705 //
2346 // Finish an asynchronous unmount operation that was started2706 // Finish an asynchronous unmount operation that was started
2347 // with g_file_unmount_mountable_with_operation().2707 // with g_file_unmount_mountable_with_operation().
2348-func (x *FileBase) UnmountMountableWithOperationFinish(ResultVar AsyncResult) bool {2708+func (x *FileBase) UnmountMountableWithOperationFinish(ResultVar AsyncResult) (bool, error) {
2709+ var cerr *glib.Error
2349 2710
2350- return XGFileUnmountMountableWithOperationFinish(x.GoPointer(), ResultVar.GoPointer())2711+ cret := XGFileUnmountMountableWithOperationFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
2712+ if cerr == nil {
2713+ return cret, nil
2714+ }
2715+ return cret, cerr
2351 2716
2352 }2717 }
2353 2718
2354-var XGFileAppendTo func(uintptr, FileCreateFlags, uintptr) uintptr2719+var XGFileAppendTo func(uintptr, FileCreateFlags, uintptr, **glib.Error) uintptr
2355 var XGFileAppendToAsync func(uintptr, FileCreateFlags, int, uintptr, uintptr, uintptr)2720 var XGFileAppendToAsync func(uintptr, FileCreateFlags, int, uintptr, uintptr, uintptr)
2356-var XGFileAppendToFinish func(uintptr, uintptr) uintptr2721+var XGFileAppendToFinish func(uintptr, uintptr, **glib.Error) uintptr
2357-var XGFileBuildAttributeListForCopy func(uintptr, FileCopyFlags, uintptr) string2722+var XGFileBuildAttributeListForCopy func(uintptr, FileCopyFlags, uintptr, **glib.Error) string
2358-var XGFileCopy func(uintptr, uintptr, FileCopyFlags, uintptr, uintptr, uintptr) bool2723+var XGFileCopy func(uintptr, uintptr, FileCopyFlags, uintptr, uintptr, uintptr, **glib.Error) bool
2359 var XGFileCopyAsync func(uintptr, uintptr, FileCopyFlags, int, uintptr, uintptr, uintptr, uintptr, uintptr)2724 var XGFileCopyAsync func(uintptr, uintptr, FileCopyFlags, int, uintptr, uintptr, uintptr, uintptr, uintptr)
2360-var XGFileCopyAttributes func(uintptr, uintptr, FileCopyFlags, uintptr) bool2725+var XGFileCopyAttributes func(uintptr, uintptr, FileCopyFlags, uintptr, **glib.Error) bool
2361-var XGFileCopyFinish func(uintptr, uintptr) bool2726+var XGFileCopyFinish func(uintptr, uintptr, **glib.Error) bool
2362-var XGFileCreate func(uintptr, FileCreateFlags, uintptr) uintptr2727+var XGFileCreate func(uintptr, FileCreateFlags, uintptr, **glib.Error) uintptr
2363 var XGFileCreateAsync func(uintptr, FileCreateFlags, int, uintptr, uintptr, uintptr)2728 var XGFileCreateAsync func(uintptr, FileCreateFlags, int, uintptr, uintptr, uintptr)
2364-var XGFileCreateFinish func(uintptr, uintptr) uintptr2729+var XGFileCreateFinish func(uintptr, uintptr, **glib.Error) uintptr
2365-var XGFileCreateReadwrite func(uintptr, FileCreateFlags, uintptr) uintptr2730+var XGFileCreateReadwrite func(uintptr, FileCreateFlags, uintptr, **glib.Error) uintptr
2366 var XGFileCreateReadwriteAsync func(uintptr, FileCreateFlags, int, uintptr, uintptr, uintptr)2731 var XGFileCreateReadwriteAsync func(uintptr, FileCreateFlags, int, uintptr, uintptr, uintptr)
2367-var XGFileCreateReadwriteFinish func(uintptr, uintptr) uintptr2732+var XGFileCreateReadwriteFinish func(uintptr, uintptr, **glib.Error) uintptr
2368-var XGFileDelete func(uintptr, uintptr) bool2733+var XGFileDelete func(uintptr, uintptr, **glib.Error) bool
2369 var XGFileDeleteAsync func(uintptr, int, uintptr, uintptr, uintptr)2734 var XGFileDeleteAsync func(uintptr, int, uintptr, uintptr, uintptr)
2370-var XGFileDeleteFinish func(uintptr, uintptr) bool2735+var XGFileDeleteFinish func(uintptr, uintptr, **glib.Error) bool
2371 var XGFileDup func(uintptr) uintptr2736 var XGFileDup func(uintptr) uintptr
2372 var XGFileEjectMountable func(uintptr, MountUnmountFlags, uintptr, uintptr, uintptr)2737 var XGFileEjectMountable func(uintptr, MountUnmountFlags, uintptr, uintptr, uintptr)
2373-var XGFileEjectMountableFinish func(uintptr, uintptr) bool2738+var XGFileEjectMountableFinish func(uintptr, uintptr, **glib.Error) bool
2374 var XGFileEjectMountableWithOperation func(uintptr, MountUnmountFlags, uintptr, uintptr, uintptr, uintptr)2739 var XGFileEjectMountableWithOperation func(uintptr, MountUnmountFlags, uintptr, uintptr, uintptr, uintptr)
2375-var XGFileEjectMountableWithOperationFinish func(uintptr, uintptr) bool2740+var XGFileEjectMountableWithOperationFinish func(uintptr, uintptr, **glib.Error) bool
2376-var XGFileEnumerateChildren func(uintptr, string, FileQueryInfoFlags, uintptr) uintptr2741+var XGFileEnumerateChildren func(uintptr, string, FileQueryInfoFlags, uintptr, **glib.Error) uintptr
2377 var XGFileEnumerateChildrenAsync func(uintptr, string, FileQueryInfoFlags, int, uintptr, uintptr, uintptr)2742 var XGFileEnumerateChildrenAsync func(uintptr, string, FileQueryInfoFlags, int, uintptr, uintptr, uintptr)
2378-var XGFileEnumerateChildrenFinish func(uintptr, uintptr) uintptr2743+var XGFileEnumerateChildrenFinish func(uintptr, uintptr, **glib.Error) uintptr
2379 var XGFileEqual func(uintptr, uintptr) bool2744 var XGFileEqual func(uintptr, uintptr) bool
2380-var XGFileFindEnclosingMount func(uintptr, uintptr) uintptr2745+var XGFileFindEnclosingMount func(uintptr, uintptr, **glib.Error) uintptr
2381 var XGFileFindEnclosingMountAsync func(uintptr, int, uintptr, uintptr, uintptr)2746 var XGFileFindEnclosingMountAsync func(uintptr, int, uintptr, uintptr, uintptr)
2382-var XGFileFindEnclosingMountFinish func(uintptr, uintptr) uintptr2747+var XGFileFindEnclosingMountFinish func(uintptr, uintptr, **glib.Error) uintptr
2383 var XGFileGetBasename func(uintptr) string2748 var XGFileGetBasename func(uintptr) string
2384 var XGFileGetChild func(uintptr, string) uintptr2749 var XGFileGetChild func(uintptr, string) uintptr
2385-var XGFileGetChildForDisplayName func(uintptr, string) uintptr2750+var XGFileGetChildForDisplayName func(uintptr, string, **glib.Error) uintptr
2386 var XGFileGetParent func(uintptr) uintptr2751 var XGFileGetParent func(uintptr) uintptr
2387 var XGFileGetParseName func(uintptr) string2752 var XGFileGetParseName func(uintptr) string
2388 var XGFileGetPath func(uintptr) string2753 var XGFileGetPath func(uintptr) string
@@ -2394,90 +2759,90 @@ var XGFileHasPrefix func(uintptr, uintptr) bool
2394 var XGFileHasUriScheme func(uintptr, string) bool2759 var XGFileHasUriScheme func(uintptr, string) bool
2395 var XGFileHash func(uintptr) uint2760 var XGFileHash func(uintptr) uint
2396 var XGFileIsNative func(uintptr) bool2761 var XGFileIsNative func(uintptr) bool
2397-var XGFileLoadBytes func(uintptr, uintptr, string) *glib.Bytes2762+var XGFileLoadBytes func(uintptr, uintptr, string, **glib.Error) *glib.Bytes
2398 var XGFileLoadBytesAsync func(uintptr, uintptr, uintptr, uintptr)2763 var XGFileLoadBytesAsync func(uintptr, uintptr, uintptr, uintptr)
2399-var XGFileLoadBytesFinish func(uintptr, uintptr, string) *glib.Bytes2764+var XGFileLoadBytesFinish func(uintptr, uintptr, string, **glib.Error) *glib.Bytes
2400-var XGFileLoadContents func(uintptr, uintptr, []string, uint, string) bool2765+var XGFileLoadContents func(uintptr, uintptr, []string, uint, string, **glib.Error) bool
2401 var XGFileLoadContentsAsync func(uintptr, uintptr, uintptr, uintptr)2766 var XGFileLoadContentsAsync func(uintptr, uintptr, uintptr, uintptr)
2402-var XGFileLoadContentsFinish func(uintptr, uintptr, []string, uint, string) bool2767+var XGFileLoadContentsFinish func(uintptr, uintptr, []string, uint, string, **glib.Error) bool
2403 var XGFileLoadPartialContentsAsync func(uintptr, uintptr, uintptr, uintptr, uintptr)2768 var XGFileLoadPartialContentsAsync func(uintptr, uintptr, uintptr, uintptr, uintptr)
2404-var XGFileLoadPartialContentsFinish func(uintptr, uintptr, []string, uint, string) bool2769+var XGFileLoadPartialContentsFinish func(uintptr, uintptr, []string, uint, string, **glib.Error) bool
2405-var XGFileMakeDirectory func(uintptr, uintptr) bool2770+var XGFileMakeDirectory func(uintptr, uintptr, **glib.Error) bool
2406 var XGFileMakeDirectoryAsync func(uintptr, int, uintptr, uintptr, uintptr)2771 var XGFileMakeDirectoryAsync func(uintptr, int, uintptr, uintptr, uintptr)
2407-var XGFileMakeDirectoryFinish func(uintptr, uintptr) bool2772+var XGFileMakeDirectoryFinish func(uintptr, uintptr, **glib.Error) bool
2408-var XGFileMakeDirectoryWithParents func(uintptr, uintptr) bool2773+var XGFileMakeDirectoryWithParents func(uintptr, uintptr, **glib.Error) bool
2409-var XGFileMakeSymbolicLink func(uintptr, string, uintptr) bool2774+var XGFileMakeSymbolicLink func(uintptr, string, uintptr, **glib.Error) bool
2410-var XGFileMeasureDiskUsage func(uintptr, FileMeasureFlags, uintptr, uintptr, uintptr, uint64, uint64, uint64) bool2775+var XGFileMeasureDiskUsage func(uintptr, FileMeasureFlags, uintptr, uintptr, uintptr, uint64, uint64, uint64, **glib.Error) bool
2411 var XGFileMeasureDiskUsageAsync func(uintptr, FileMeasureFlags, int, uintptr, uintptr, uintptr, uintptr, uintptr)2776 var XGFileMeasureDiskUsageAsync func(uintptr, FileMeasureFlags, int, uintptr, uintptr, uintptr, uintptr, uintptr)
2412-var XGFileMeasureDiskUsageFinish func(uintptr, uintptr, uint64, uint64, uint64) bool2777+var XGFileMeasureDiskUsageFinish func(uintptr, uintptr, uint64, uint64, uint64, **glib.Error) bool
2413-var XGFileMonitor func(uintptr, FileMonitorFlags, uintptr) uintptr2778+var XGFileMonitor func(uintptr, FileMonitorFlags, uintptr, **glib.Error) uintptr
2414-var XGFileMonitorDirectory func(uintptr, FileMonitorFlags, uintptr) uintptr2779+var XGFileMonitorDirectory func(uintptr, FileMonitorFlags, uintptr, **glib.Error) uintptr
2415-var XGFileMonitorFile func(uintptr, FileMonitorFlags, uintptr) uintptr2780+var XGFileMonitorFile func(uintptr, FileMonitorFlags, uintptr, **glib.Error) uintptr
2416 var XGFileMountEnclosingVolume func(uintptr, MountMountFlags, uintptr, uintptr, uintptr, uintptr)2781 var XGFileMountEnclosingVolume func(uintptr, MountMountFlags, uintptr, uintptr, uintptr, uintptr)
2417-var XGFileMountEnclosingVolumeFinish func(uintptr, uintptr) bool2782+var XGFileMountEnclosingVolumeFinish func(uintptr, uintptr, **glib.Error) bool
2418 var XGFileMountMountable func(uintptr, MountMountFlags, uintptr, uintptr, uintptr, uintptr)2783 var XGFileMountMountable func(uintptr, MountMountFlags, uintptr, uintptr, uintptr, uintptr)
2419-var XGFileMountMountableFinish func(uintptr, uintptr) uintptr2784+var XGFileMountMountableFinish func(uintptr, uintptr, **glib.Error) uintptr
2420-var XGFileMove func(uintptr, uintptr, FileCopyFlags, uintptr, uintptr, uintptr) bool2785+var XGFileMove func(uintptr, uintptr, FileCopyFlags, uintptr, uintptr, uintptr, **glib.Error) bool
2421 var XGFileMoveAsync func(uintptr, uintptr, FileCopyFlags, int, uintptr, uintptr, uintptr, uintptr, uintptr)2786 var XGFileMoveAsync func(uintptr, uintptr, FileCopyFlags, int, uintptr, uintptr, uintptr, uintptr, uintptr)
2422-var XGFileMoveFinish func(uintptr, uintptr) bool2787+var XGFileMoveFinish func(uintptr, uintptr, **glib.Error) bool
2423-var XGFileOpenReadwrite func(uintptr, uintptr) uintptr2788+var XGFileOpenReadwrite func(uintptr, uintptr, **glib.Error) uintptr
2424 var XGFileOpenReadwriteAsync func(uintptr, int, uintptr, uintptr, uintptr)2789 var XGFileOpenReadwriteAsync func(uintptr, int, uintptr, uintptr, uintptr)
2425-var XGFileOpenReadwriteFinish func(uintptr, uintptr) uintptr2790+var XGFileOpenReadwriteFinish func(uintptr, uintptr, **glib.Error) uintptr
2426 var XGFilePeekPath func(uintptr) string2791 var XGFilePeekPath func(uintptr) string
2427 var XGFilePollMountable func(uintptr, uintptr, uintptr, uintptr)2792 var XGFilePollMountable func(uintptr, uintptr, uintptr, uintptr)
2428-var XGFilePollMountableFinish func(uintptr, uintptr) bool2793+var XGFilePollMountableFinish func(uintptr, uintptr, **glib.Error) bool
2429-var XGFileQueryDefaultHandler func(uintptr, uintptr) uintptr2794+var XGFileQueryDefaultHandler func(uintptr, uintptr, **glib.Error) uintptr
2430 var XGFileQueryDefaultHandlerAsync func(uintptr, int, uintptr, uintptr, uintptr)2795 var XGFileQueryDefaultHandlerAsync func(uintptr, int, uintptr, uintptr, uintptr)
2431-var XGFileQueryDefaultHandlerFinish func(uintptr, uintptr) uintptr2796+var XGFileQueryDefaultHandlerFinish func(uintptr, uintptr, **glib.Error) uintptr
2432 var XGFileQueryExists func(uintptr, uintptr) bool2797 var XGFileQueryExists func(uintptr, uintptr) bool
2433 var XGFileQueryFileType func(uintptr, FileQueryInfoFlags, uintptr) FileType2798 var XGFileQueryFileType func(uintptr, FileQueryInfoFlags, uintptr) FileType
2434-var XGFileQueryFilesystemInfo func(uintptr, string, uintptr) uintptr2799+var XGFileQueryFilesystemInfo func(uintptr, string, uintptr, **glib.Error) uintptr
2435 var XGFileQueryFilesystemInfoAsync func(uintptr, string, int, uintptr, uintptr, uintptr)2800 var XGFileQueryFilesystemInfoAsync func(uintptr, string, int, uintptr, uintptr, uintptr)
2436-var XGFileQueryFilesystemInfoFinish func(uintptr, uintptr) uintptr2801+var XGFileQueryFilesystemInfoFinish func(uintptr, uintptr, **glib.Error) uintptr
2437-var XGFileQueryInfo func(uintptr, string, FileQueryInfoFlags, uintptr) uintptr2802+var XGFileQueryInfo func(uintptr, string, FileQueryInfoFlags, uintptr, **glib.Error) uintptr
2438 var XGFileQueryInfoAsync func(uintptr, string, FileQueryInfoFlags, int, uintptr, uintptr, uintptr)2803 var XGFileQueryInfoAsync func(uintptr, string, FileQueryInfoFlags, int, uintptr, uintptr, uintptr)
2439-var XGFileQueryInfoFinish func(uintptr, uintptr) uintptr2804+var XGFileQueryInfoFinish func(uintptr, uintptr, **glib.Error) uintptr
2440-var XGFileQuerySettableAttributes func(uintptr, uintptr) *FileAttributeInfoList2805+var XGFileQuerySettableAttributes func(uintptr, uintptr, **glib.Error) *FileAttributeInfoList
2441-var XGFileQueryWritableNamespaces func(uintptr, uintptr) *FileAttributeInfoList2806+var XGFileQueryWritableNamespaces func(uintptr, uintptr, **glib.Error) *FileAttributeInfoList
2442-var XGFileRead func(uintptr, uintptr) uintptr2807+var XGFileRead func(uintptr, uintptr, **glib.Error) uintptr
2443 var XGFileReadAsync func(uintptr, int, uintptr, uintptr, uintptr)2808 var XGFileReadAsync func(uintptr, int, uintptr, uintptr, uintptr)
2444-var XGFileReadFinish func(uintptr, uintptr) uintptr2809+var XGFileReadFinish func(uintptr, uintptr, **glib.Error) uintptr
2445-var XGFileReplace func(uintptr, string, bool, FileCreateFlags, uintptr) uintptr2810+var XGFileReplace func(uintptr, string, bool, FileCreateFlags, uintptr, **glib.Error) uintptr
2446 var XGFileReplaceAsync func(uintptr, string, bool, FileCreateFlags, int, uintptr, uintptr, uintptr)2811 var XGFileReplaceAsync func(uintptr, string, bool, FileCreateFlags, int, uintptr, uintptr, uintptr)
2447-var XGFileReplaceContents func(uintptr, string, uint, string, bool, FileCreateFlags, string, uintptr) bool2812+var XGFileReplaceContents func(uintptr, string, uint, string, bool, FileCreateFlags, string, uintptr, **glib.Error) bool
2448 var XGFileReplaceContentsAsync func(uintptr, string, uint, string, bool, FileCreateFlags, uintptr, uintptr, uintptr)2813 var XGFileReplaceContentsAsync func(uintptr, string, uint, string, bool, FileCreateFlags, uintptr, uintptr, uintptr)
2449 var XGFileReplaceContentsBytesAsync func(uintptr, *glib.Bytes, string, bool, FileCreateFlags, uintptr, uintptr, uintptr)2814 var XGFileReplaceContentsBytesAsync func(uintptr, *glib.Bytes, string, bool, FileCreateFlags, uintptr, uintptr, uintptr)
2450-var XGFileReplaceContentsFinish func(uintptr, uintptr, string) bool2815+var XGFileReplaceContentsFinish func(uintptr, uintptr, string, **glib.Error) bool
2451-var XGFileReplaceFinish func(uintptr, uintptr) uintptr2816+var XGFileReplaceFinish func(uintptr, uintptr, **glib.Error) uintptr
2452-var XGFileReplaceReadwrite func(uintptr, string, bool, FileCreateFlags, uintptr) uintptr2817+var XGFileReplaceReadwrite func(uintptr, string, bool, FileCreateFlags, uintptr, **glib.Error) uintptr
2453 var XGFileReplaceReadwriteAsync func(uintptr, string, bool, FileCreateFlags, int, uintptr, uintptr, uintptr)2818 var XGFileReplaceReadwriteAsync func(uintptr, string, bool, FileCreateFlags, int, uintptr, uintptr, uintptr)
2454-var XGFileReplaceReadwriteFinish func(uintptr, uintptr) uintptr2819+var XGFileReplaceReadwriteFinish func(uintptr, uintptr, **glib.Error) uintptr
2455 var XGFileResolveRelativePath func(uintptr, string) uintptr2820 var XGFileResolveRelativePath func(uintptr, string) uintptr
2456-var XGFileSetAttribute func(uintptr, string, FileAttributeType, uintptr, FileQueryInfoFlags, uintptr) bool2821+var XGFileSetAttribute func(uintptr, string, FileAttributeType, uintptr, FileQueryInfoFlags, uintptr, **glib.Error) bool
2457-var XGFileSetAttributeByteString func(uintptr, string, string, FileQueryInfoFlags, uintptr) bool2822+var XGFileSetAttributeByteString func(uintptr, string, string, FileQueryInfoFlags, uintptr, **glib.Error) bool
2458-var XGFileSetAttributeInt32 func(uintptr, string, int32, FileQueryInfoFlags, uintptr) bool2823+var XGFileSetAttributeInt32 func(uintptr, string, int32, FileQueryInfoFlags, uintptr, **glib.Error) bool
2459-var XGFileSetAttributeInt64 func(uintptr, string, int64, FileQueryInfoFlags, uintptr) bool2824+var XGFileSetAttributeInt64 func(uintptr, string, int64, FileQueryInfoFlags, uintptr, **glib.Error) bool
2460-var XGFileSetAttributeString func(uintptr, string, string, FileQueryInfoFlags, uintptr) bool2825+var XGFileSetAttributeString func(uintptr, string, string, FileQueryInfoFlags, uintptr, **glib.Error) bool
2461-var XGFileSetAttributeUint32 func(uintptr, string, uint32, FileQueryInfoFlags, uintptr) bool2826+var XGFileSetAttributeUint32 func(uintptr, string, uint32, FileQueryInfoFlags, uintptr, **glib.Error) bool
2462-var XGFileSetAttributeUint64 func(uintptr, string, uint64, FileQueryInfoFlags, uintptr) bool2827+var XGFileSetAttributeUint64 func(uintptr, string, uint64, FileQueryInfoFlags, uintptr, **glib.Error) bool
2463 var XGFileSetAttributesAsync func(uintptr, uintptr, FileQueryInfoFlags, int, uintptr, uintptr, uintptr)2828 var XGFileSetAttributesAsync func(uintptr, uintptr, FileQueryInfoFlags, int, uintptr, uintptr, uintptr)
2464-var XGFileSetAttributesFinish func(uintptr, uintptr, *uintptr) bool2829+var XGFileSetAttributesFinish func(uintptr, uintptr, *uintptr, **glib.Error) bool
2465-var XGFileSetAttributesFromInfo func(uintptr, uintptr, FileQueryInfoFlags, uintptr) bool2830+var XGFileSetAttributesFromInfo func(uintptr, uintptr, FileQueryInfoFlags, uintptr, **glib.Error) bool
2466-var XGFileSetDisplayName func(uintptr, string, uintptr) uintptr2831+var XGFileSetDisplayName func(uintptr, string, uintptr, **glib.Error) uintptr
2467 var XGFileSetDisplayNameAsync func(uintptr, string, int, uintptr, uintptr, uintptr)2832 var XGFileSetDisplayNameAsync func(uintptr, string, int, uintptr, uintptr, uintptr)
2468-var XGFileSetDisplayNameFinish func(uintptr, uintptr) uintptr2833+var XGFileSetDisplayNameFinish func(uintptr, uintptr, **glib.Error) uintptr
2469 var XGFileStartMountable func(uintptr, DriveStartFlags, uintptr, uintptr, uintptr, uintptr)2834 var XGFileStartMountable func(uintptr, DriveStartFlags, uintptr, uintptr, uintptr, uintptr)
2470-var XGFileStartMountableFinish func(uintptr, uintptr) bool2835+var XGFileStartMountableFinish func(uintptr, uintptr, **glib.Error) bool
2471 var XGFileStopMountable func(uintptr, MountUnmountFlags, uintptr, uintptr, uintptr, uintptr)2836 var XGFileStopMountable func(uintptr, MountUnmountFlags, uintptr, uintptr, uintptr, uintptr)
2472-var XGFileStopMountableFinish func(uintptr, uintptr) bool2837+var XGFileStopMountableFinish func(uintptr, uintptr, **glib.Error) bool
2473 var XGFileSupportsThreadContexts func(uintptr) bool2838 var XGFileSupportsThreadContexts func(uintptr) bool
2474-var XGFileTrash func(uintptr, uintptr) bool2839+var XGFileTrash func(uintptr, uintptr, **glib.Error) bool
2475 var XGFileTrashAsync func(uintptr, int, uintptr, uintptr, uintptr)2840 var XGFileTrashAsync func(uintptr, int, uintptr, uintptr, uintptr)
2476-var XGFileTrashFinish func(uintptr, uintptr) bool2841+var XGFileTrashFinish func(uintptr, uintptr, **glib.Error) bool
2477 var XGFileUnmountMountable func(uintptr, MountUnmountFlags, uintptr, uintptr, uintptr)2842 var XGFileUnmountMountable func(uintptr, MountUnmountFlags, uintptr, uintptr, uintptr)
2478-var XGFileUnmountMountableFinish func(uintptr, uintptr) bool2843+var XGFileUnmountMountableFinish func(uintptr, uintptr, **glib.Error) bool
2479 var XGFileUnmountMountableWithOperation func(uintptr, MountUnmountFlags, uintptr, uintptr, uintptr, uintptr)2844 var XGFileUnmountMountableWithOperation func(uintptr, MountUnmountFlags, uintptr, uintptr, uintptr, uintptr)
2480-var XGFileUnmountMountableWithOperationFinish func(uintptr, uintptr) bool2845+var XGFileUnmountMountableWithOperationFinish func(uintptr, uintptr, **glib.Error) bool
2481 2846
2482 var xFileNewForCommandlineArg func(string) uintptr2847 var xFileNewForCommandlineArg func(string) uintptr
2483 2848
@@ -2496,16 +2861,16 @@ var xFileNewForCommandlineArg func(string) uintptr
2496 // for you there. It is also always possible to use this function with2861 // for you there. It is also always possible to use this function with
2497 // #GOptionContext arguments of type %G_OPTION_ARG_FILENAME.2862 // #GOptionContext arguments of type %G_OPTION_ARG_FILENAME.
2498 func FileNewForCommandlineArg(ArgVar string) *FileBase {2863 func FileNewForCommandlineArg(ArgVar string) *FileBase {
2864+ var cls *FileBase
2499 2865
2500- FileNewForCommandlineArgPtr := xFileNewForCommandlineArg(ArgVar)2866+ cret := xFileNewForCommandlineArg(ArgVar)
2501- if FileNewForCommandlineArgPtr == 0 {
2502- return nil
2503- }
2504-
2505- FileNewForCommandlineArgCls := &FileBase{}
2506- FileNewForCommandlineArgCls.Ptr = FileNewForCommandlineArgPtr
2507- return FileNewForCommandlineArgCls
2508 2867
2868+ if cret == 0 {
2869+ return cls
2870+ }
2871+ cls = &FileBase{}
2872+ cls.Ptr = cret
2873+ return cls
2509 }2874 }
2510 2875
2511 var xFileNewForCommandlineArgAndCwd func(string, string) uintptr2876 var xFileNewForCommandlineArgAndCwd func(string, string) uintptr
@@ -2522,16 +2887,16 @@ var xFileNewForCommandlineArgAndCwd func(string, string) uintptr
2522 //2887 //
2523 // See also g_application_command_line_create_file_for_arg().2888 // See also g_application_command_line_create_file_for_arg().
2524 func FileNewForCommandlineArgAndCwd(ArgVar string, CwdVar string) *FileBase {2889 func FileNewForCommandlineArgAndCwd(ArgVar string, CwdVar string) *FileBase {
2890+ var cls *FileBase
2525 2891
2526- FileNewForCommandlineArgAndCwdPtr := xFileNewForCommandlineArgAndCwd(ArgVar, CwdVar)2892+ cret := xFileNewForCommandlineArgAndCwd(ArgVar, CwdVar)
2527- if FileNewForCommandlineArgAndCwdPtr == 0 {
2528- return nil
2529- }
2530-
2531- FileNewForCommandlineArgAndCwdCls := &FileBase{}
2532- FileNewForCommandlineArgAndCwdCls.Ptr = FileNewForCommandlineArgAndCwdPtr
2533- return FileNewForCommandlineArgAndCwdCls
2534 2893
2894+ if cret == 0 {
2895+ return cls
2896+ }
2897+ cls = &FileBase{}
2898+ cls.Ptr = cret
2899+ return cls
2535 }2900 }
2536 2901
2537 var xFileNewForPath func(string) uintptr2902 var xFileNewForPath func(string) uintptr
@@ -2540,16 +2905,16 @@ var xFileNewForPath func(string) uintptr
2540 // fails, but the returned object might not support any I/O2905 // fails, but the returned object might not support any I/O
2541 // operation if @path is malformed.2906 // operation if @path is malformed.
2542 func FileNewForPath(PathVar string) *FileBase {2907 func FileNewForPath(PathVar string) *FileBase {
2908+ var cls *FileBase
2543 2909
2544- FileNewForPathPtr := xFileNewForPath(PathVar)2910+ cret := xFileNewForPath(PathVar)
2545- if FileNewForPathPtr == 0 {
2546- return nil
2547- }
2548-
2549- FileNewForPathCls := &FileBase{}
2550- FileNewForPathCls.Ptr = FileNewForPathPtr
2551- return FileNewForPathCls
2552 2911
2912+ if cret == 0 {
2913+ return cls
2914+ }
2915+ cls = &FileBase{}
2916+ cls.Ptr = cret
2917+ return cls
2553 }2918 }
2554 2919
2555 var xFileNewForUri func(string) uintptr2920 var xFileNewForUri func(string) uintptr
@@ -2559,19 +2924,19 @@ var xFileNewForUri func(string) uintptr
2559 // operation if @uri is malformed or if the uri type is2924 // operation if @uri is malformed or if the uri type is
2560 // not supported.2925 // not supported.
2561 func FileNewForUri(UriVar string) *FileBase {2926 func FileNewForUri(UriVar string) *FileBase {
2927+ var cls *FileBase
2562 2928
2563- FileNewForUriPtr := xFileNewForUri(UriVar)2929+ cret := xFileNewForUri(UriVar)
2564- if FileNewForUriPtr == 0 {
2565- return nil
2566- }
2567-
2568- FileNewForUriCls := &FileBase{}
2569- FileNewForUriCls.Ptr = FileNewForUriPtr
2570- return FileNewForUriCls
2571 2930
2931+ if cret == 0 {
2932+ return cls
2933+ }
2934+ cls = &FileBase{}
2935+ cls.Ptr = cret
2936+ return cls
2572 }2937 }
2573 2938
2574-var xFileNewTmp func(string, *uintptr) uintptr2939+var xFileNewTmp func(string, *uintptr, **glib.Error) uintptr
2575 2940
2576 // Opens a file in the preferred directory for temporary files (as2941 // Opens a file in the preferred directory for temporary files (as
2577 // returned by g_get_tmp_dir()) and returns a #GFile and2942 // returned by g_get_tmp_dir()) and returns a #GFile and
@@ -2583,16 +2948,21 @@ var xFileNewTmp func(string, *uintptr) uintptr
2583 //2948 //
2584 // Unlike the other #GFile constructors, this will return %NULL if2949 // Unlike the other #GFile constructors, this will return %NULL if
2585 // a temporary file could not be created.2950 // a temporary file could not be created.
2586-func FileNewTmp(TmplVar string, IostreamVar **FileIOStream) *FileBase {2951+func FileNewTmp(TmplVar string, IostreamVar **FileIOStream) (*FileBase, error) {
2952+ var cls *FileBase
2953+ var cerr *glib.Error
2587 2954
2588- FileNewTmpPtr := xFileNewTmp(TmplVar, gobject.ConvertPtr(IostreamVar))2955+ cret := xFileNewTmp(TmplVar, gobject.ConvertPtr(IostreamVar), &cerr)
2589- if FileNewTmpPtr == 0 {
2590- return nil
2591- }
2592 2956
2593- FileNewTmpCls := &FileBase{}2957+ if cret == 0 {
2594- FileNewTmpCls.Ptr = FileNewTmpPtr2958+ return cls, cerr
2595- return FileNewTmpCls2959+ }
2960+ cls = &FileBase{}
2961+ cls.Ptr = cret
2962+ if cerr == nil {
2963+ return cls, nil
2964+ }
2965+ return cls, cerr
2596 2966
2597 }2967 }
2598 2968
@@ -2603,16 +2973,16 @@ var xFileParseName func(string) uintptr
2603 // but the returned object might not support any I/O operation if2973 // but the returned object might not support any I/O operation if
2604 // the @parse_name cannot be parsed.2974 // the @parse_name cannot be parsed.
2605 func FileParseName(ParseNameVar string) *FileBase {2975 func FileParseName(ParseNameVar string) *FileBase {
2976+ var cls *FileBase
2606 2977
2607- FileParseNamePtr := xFileParseName(ParseNameVar)2978+ cret := xFileParseName(ParseNameVar)
2608- if FileParseNamePtr == 0 {
2609- return nil
2610- }
2611-
2612- FileParseNameCls := &FileBase{}
2613- FileParseNameCls.Ptr = FileParseNamePtr
2614- return FileParseNameCls
2615 2979
2980+ if cret == 0 {
2981+ return cls
2982+ }
2983+ cls = &FileBase{}
2984+ cls.Ptr = cret
2985+ return cls
2616 }2986 }
2617 2987
2618 func init() {2988 func init() {
M v4/gio/gfileattribute.go +1 -1
@@ -3,7 +3,7 @@ package gio
3 3
4 // Information about a specific attribute.4 // Information about a specific attribute.
5 type FileAttributeInfo struct {5 type FileAttributeInfo struct {
6- Name string6+ Name uintptr
7 7
8 Type FileAttributeType8 Type FileAttributeType
9 9
M v4/gio/gfiledescriptorbased.go +2 -2
@@ -37,8 +37,8 @@ func (x *FileDescriptorBasedBase) SetGoPointer(ptr uintptr) {
37 // Gets the underlying file descriptor.37 // Gets the underlying file descriptor.
38 func (x *FileDescriptorBasedBase) GetFd() int {38 func (x *FileDescriptorBasedBase) GetFd() int {
39 39
40- return XGFileDescriptorBasedGetFd(x.GoPointer())40+ cret := XGFileDescriptorBasedGetFd(x.GoPointer())
41-41+ return cret
42 }42 }
43 43
44 var XGFileDescriptorBasedGetFd func(uintptr) int44 var XGFileDescriptorBasedGetFd func(uintptr) int
M v4/gio/gfileenumerator.go +67 -43
@@ -51,7 +51,7 @@ func FileEnumeratorNewFromInternalPtr(ptr uintptr) *FileEnumerator {
51 return cls51 return cls
52 }52 }
53 53
54-var xFileEnumeratorClose func(uintptr, uintptr) bool54+var xFileEnumeratorClose func(uintptr, uintptr, **glib.Error) bool
55 55
56 // Releases all resources used by this enumerator, making the56 // Releases all resources used by this enumerator, making the
57 // enumerator return %G_IO_ERROR_CLOSED on all calls.57 // enumerator return %G_IO_ERROR_CLOSED on all calls.
@@ -59,9 +59,14 @@ var xFileEnumeratorClose func(uintptr, uintptr) bool
59 // This will be automatically called when the last reference59 // This will be automatically called when the last reference
60 // is dropped, but you might want to call this function to make60 // is dropped, but you might want to call this function to make
61 // sure resources are released as early as possible.61 // sure resources are released as early as possible.
62-func (x *FileEnumerator) Close(CancellableVar *Cancellable) bool {62+func (x *FileEnumerator) Close(CancellableVar *Cancellable) (bool, error) {
63+ var cerr *glib.Error
63 64
64- return xFileEnumeratorClose(x.GoPointer(), CancellableVar.GoPointer())65+ cret := xFileEnumeratorClose(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
66+ if cerr == nil {
67+ return cret, nil
68+ }
69+ return cret, cerr
65 70
66 }71 }
67 72
@@ -79,7 +84,7 @@ func (x *FileEnumerator) CloseAsync(IoPriorityVar int, CancellableVar *Cancellab
79 84
80 }85 }
81 86
82-var xFileEnumeratorCloseFinish func(uintptr, uintptr) bool87+var xFileEnumeratorCloseFinish func(uintptr, uintptr, **glib.Error) bool
83 88
84 // Finishes closing a file enumerator, started from g_file_enumerator_close_async().89 // Finishes closing a file enumerator, started from g_file_enumerator_close_async().
85 //90 //
@@ -91,9 +96,14 @@ var xFileEnumeratorCloseFinish func(uintptr, uintptr) bool
91 // cancelled by triggering the cancellable object from another thread. If the operation96 // cancelled by triggering the cancellable object from another thread. If the operation
92 // was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %FALSE will be97 // was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %FALSE will be
93 // returned.98 // returned.
94-func (x *FileEnumerator) CloseFinish(ResultVar AsyncResult) bool {99+func (x *FileEnumerator) CloseFinish(ResultVar AsyncResult) (bool, error) {
100+ var cerr *glib.Error
95 101
96- return xFileEnumeratorCloseFinish(x.GoPointer(), ResultVar.GoPointer())102+ cret := xFileEnumeratorCloseFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
103+ if cerr == nil {
104+ return cret, nil
105+ }
106+ return cret, cerr
97 107
98 }108 }
99 109
@@ -115,34 +125,33 @@ var xFileEnumeratorGetChild func(uintptr, uintptr) uintptr
115 //125 //
116 // ]|126 // ]|
117 func (x *FileEnumerator) GetChild(InfoVar *FileInfo) *FileBase {127 func (x *FileEnumerator) GetChild(InfoVar *FileInfo) *FileBase {
128+ var cls *FileBase
118 129
119- GetChildPtr := xFileEnumeratorGetChild(x.GoPointer(), InfoVar.GoPointer())130+ cret := xFileEnumeratorGetChild(x.GoPointer(), InfoVar.GoPointer())
120- if GetChildPtr == 0 {
121- return nil
122- }
123-
124- GetChildCls := &FileBase{}
125- GetChildCls.Ptr = GetChildPtr
126- return GetChildCls
127 131
132+ if cret == 0 {
133+ return cls
134+ }
135+ cls = &FileBase{}
136+ cls.Ptr = cret
137+ return cls
128 }138 }
129 139
130 var xFileEnumeratorGetContainer func(uintptr) uintptr140 var xFileEnumeratorGetContainer func(uintptr) uintptr
131 141
132 // Get the #GFile container which is being enumerated.142 // Get the #GFile container which is being enumerated.
133 func (x *FileEnumerator) GetContainer() *FileBase {143 func (x *FileEnumerator) GetContainer() *FileBase {
144+ var cls *FileBase
134 145
135- GetContainerPtr := xFileEnumeratorGetContainer(x.GoPointer())146+ cret := xFileEnumeratorGetContainer(x.GoPointer())
136- if GetContainerPtr == 0 {
137- return nil
138- }
139-
140- gobject.IncreaseRef(GetContainerPtr)
141-
142- GetContainerCls := &FileBase{}
143- GetContainerCls.Ptr = GetContainerPtr
144- return GetContainerCls
145 147
148+ if cret == 0 {
149+ return cls
150+ }
151+ gobject.IncreaseRef(cret)
152+ cls = &FileBase{}
153+ cls.Ptr = cret
154+ return cls
146 }155 }
147 156
148 var xFileEnumeratorHasPending func(uintptr) bool157 var xFileEnumeratorHasPending func(uintptr) bool
@@ -150,8 +159,8 @@ var xFileEnumeratorHasPending func(uintptr) bool
150 // Checks if the file enumerator has pending operations.159 // Checks if the file enumerator has pending operations.
151 func (x *FileEnumerator) HasPending() bool {160 func (x *FileEnumerator) HasPending() bool {
152 161
153- return xFileEnumeratorHasPending(x.GoPointer())162+ cret := xFileEnumeratorHasPending(x.GoPointer())
154-163+ return cret
155 }164 }
156 165
157 var xFileEnumeratorIsClosed func(uintptr) bool166 var xFileEnumeratorIsClosed func(uintptr) bool
@@ -159,11 +168,11 @@ var xFileEnumeratorIsClosed func(uintptr) bool
159 // Checks if the file enumerator has been closed.168 // Checks if the file enumerator has been closed.
160 func (x *FileEnumerator) IsClosed() bool {169 func (x *FileEnumerator) IsClosed() bool {
161 170
162- return xFileEnumeratorIsClosed(x.GoPointer())171+ cret := xFileEnumeratorIsClosed(x.GoPointer())
163-172+ return cret
164 }173 }
165 174
166-var xFileEnumeratorIterate func(uintptr, *uintptr, *uintptr, uintptr) bool175+var xFileEnumeratorIterate func(uintptr, *uintptr, *uintptr, uintptr, **glib.Error) bool
167 176
168 // This is a version of g_file_enumerator_next_file() that's easier to177 // This is a version of g_file_enumerator_next_file() that's easier to
169 // use correctly from C programs. With g_file_enumerator_next_file(),178 // use correctly from C programs. With g_file_enumerator_next_file(),
@@ -206,13 +215,18 @@ var xFileEnumeratorIterate func(uintptr, *uintptr, *uintptr, uintptr) bool
206 // g_object_unref (direnum); // Note: frees the last @info215 // g_object_unref (direnum); // Note: frees the last @info
207 //216 //
208 // ]|217 // ]|
209-func (x *FileEnumerator) Iterate(OutInfoVar **FileInfo, OutChildVar *File, CancellableVar *Cancellable) bool {218+func (x *FileEnumerator) Iterate(OutInfoVar **FileInfo, OutChildVar *File, CancellableVar *Cancellable) (bool, error) {
219+ var cerr *glib.Error
210 220
211- return xFileEnumeratorIterate(x.GoPointer(), gobject.ConvertPtr(OutInfoVar), gobject.ConvertPtr(OutChildVar), CancellableVar.GoPointer())221+ cret := xFileEnumeratorIterate(x.GoPointer(), gobject.ConvertPtr(OutInfoVar), gobject.ConvertPtr(OutChildVar), CancellableVar.GoPointer(), &cerr)
222+ if cerr == nil {
223+ return cret, nil
224+ }
225+ return cret, cerr
212 226
213 }227 }
214 228
215-var xFileEnumeratorNextFile func(uintptr, uintptr) uintptr229+var xFileEnumeratorNextFile func(uintptr, uintptr, **glib.Error) uintptr
216 230
217 // Returns information for the next file in the enumerated object.231 // Returns information for the next file in the enumerated object.
218 // Will block until the information is available. The #GFileInfo232 // Will block until the information is available. The #GFileInfo
@@ -225,16 +239,21 @@ var xFileEnumeratorNextFile func(uintptr, uintptr) uintptr
225 // On error, returns %NULL and sets @error to the error. If the239 // On error, returns %NULL and sets @error to the error. If the
226 // enumerator is at the end, %NULL will be returned and @error will240 // enumerator is at the end, %NULL will be returned and @error will
227 // be unset.241 // be unset.
228-func (x *FileEnumerator) NextFile(CancellableVar *Cancellable) *FileInfo {242+func (x *FileEnumerator) NextFile(CancellableVar *Cancellable) (*FileInfo, error) {
243+ var cls *FileInfo
244+ var cerr *glib.Error
229 245
230- NextFilePtr := xFileEnumeratorNextFile(x.GoPointer(), CancellableVar.GoPointer())246+ cret := xFileEnumeratorNextFile(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
231- if NextFilePtr == 0 {
232- return nil
233- }
234 247
235- NextFileCls := &FileInfo{}248+ if cret == 0 {
236- NextFileCls.Ptr = NextFilePtr249+ return cls, cerr
237- return NextFileCls250+ }
251+ cls = &FileInfo{}
252+ cls.Ptr = cret
253+ if cerr == nil {
254+ return cls, nil
255+ }
256+ return cls, cerr
238 257
239 }258 }
240 259
@@ -265,12 +284,17 @@ func (x *FileEnumerator) NextFilesAsync(NumFilesVar int, IoPriorityVar int, Canc
265 284
266 }285 }
267 286
268-var xFileEnumeratorNextFilesFinish func(uintptr, uintptr) *glib.List287+var xFileEnumeratorNextFilesFinish func(uintptr, uintptr, **glib.Error) *glib.List
269 288
270 // Finishes the asynchronous operation started with g_file_enumerator_next_files_async().289 // Finishes the asynchronous operation started with g_file_enumerator_next_files_async().
271-func (x *FileEnumerator) NextFilesFinish(ResultVar AsyncResult) *glib.List {290+func (x *FileEnumerator) NextFilesFinish(ResultVar AsyncResult) (*glib.List, error) {
291+ var cerr *glib.Error
272 292
273- return xFileEnumeratorNextFilesFinish(x.GoPointer(), ResultVar.GoPointer())293+ cret := xFileEnumeratorNextFilesFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
294+ if cerr == nil {
295+ return cret, nil
296+ }
297+ return cret, cerr
274 298
275 }299 }
276 300
M v4/gio/gfileicon.go +50 -39
@@ -27,32 +27,33 @@ var xNewFileIcon func(uintptr) uintptr
27 27
28 // Creates a new icon for a file.28 // Creates a new icon for a file.
29 func NewFileIcon(FileVar File) *FileIcon {29 func NewFileIcon(FileVar File) *FileIcon {
30- NewFileIconPtr := xNewFileIcon(FileVar.GoPointer())30+ var cls *FileIcon
31- if NewFileIconPtr == 0 {31+
32- return nil32+ cret := xNewFileIcon(FileVar.GoPointer())
33- }
34 33
35- NewFileIconCls := &FileIcon{}34+ if cret == 0 {
36- NewFileIconCls.Ptr = NewFileIconPtr35+ return cls
37- return NewFileIconCls36+ }
37+ cls = &FileIcon{}
38+ cls.Ptr = cret
39+ return cls
38 }40 }
39 41
40 var xFileIconGetFile func(uintptr) uintptr42 var xFileIconGetFile func(uintptr) uintptr
41 43
42 // Gets the #GFile associated with the given @icon.44 // Gets the #GFile associated with the given @icon.
43 func (x *FileIcon) GetFile() *FileBase {45 func (x *FileIcon) GetFile() *FileBase {
46+ var cls *FileBase
44 47
45- GetFilePtr := xFileIconGetFile(x.GoPointer())48+ cret := xFileIconGetFile(x.GoPointer())
46- if GetFilePtr == 0 {
47- return nil
48- }
49-
50- gobject.IncreaseRef(GetFilePtr)
51-
52- GetFileCls := &FileBase{}
53- GetFileCls.Ptr = GetFilePtr
54- return GetFileCls
55 49
50+ if cret == 0 {
51+ return cls
52+ }
53+ gobject.IncreaseRef(cret)
54+ cls = &FileBase{}
55+ cls.Ptr = cret
56+ return cls
56 }57 }
57 58
58 func (c *FileIcon) GoPointer() uintptr {59 func (c *FileIcon) GoPointer() uintptr {
@@ -66,8 +67,8 @@ func (c *FileIcon) SetGoPointer(ptr uintptr) {
66 // Checks if two icons are equal.67 // Checks if two icons are equal.
67 func (x *FileIcon) Equal(Icon2Var Icon) bool {68 func (x *FileIcon) Equal(Icon2Var Icon) bool {
68 69
69- return XGIconEqual(x.GoPointer(), Icon2Var.GoPointer())70+ cret := XGIconEqual(x.GoPointer(), Icon2Var.GoPointer())
70-71+ return cret
71 }72 }
72 73
73 // Serializes a #GIcon into a #GVariant. An equivalent #GIcon can be retrieved74 // Serializes a #GIcon into a #GVariant. An equivalent #GIcon can be retrieved
@@ -77,8 +78,8 @@ func (x *FileIcon) Equal(Icon2Var Icon) bool {
77 // (as opposed to over the network), and within the same file system namespace.78 // (as opposed to over the network), and within the same file system namespace.
78 func (x *FileIcon) Serialize() *glib.Variant {79 func (x *FileIcon) Serialize() *glib.Variant {
79 80
80- return XGIconSerialize(x.GoPointer())81+ cret := XGIconSerialize(x.GoPointer())
81-82+ return cret
82 }83 }
83 84
84 // Generates a textual representation of @icon that can be used for85 // Generates a textual representation of @icon that can be used for
@@ -99,22 +100,27 @@ func (x *FileIcon) Serialize() *glib.Variant {
99 // the encoding is simply the name (such as `network-server`).100 // the encoding is simply the name (such as `network-server`).
100 func (x *FileIcon) ToString() string {101 func (x *FileIcon) ToString() string {
101 102
102- return XGIconToString(x.GoPointer())103+ cret := XGIconToString(x.GoPointer())
103-104+ return cret
104 }105 }
105 106
106 // Loads a loadable icon. For the asynchronous version of this function,107 // Loads a loadable icon. For the asynchronous version of this function,
107 // see g_loadable_icon_load_async().108 // see g_loadable_icon_load_async().
108-func (x *FileIcon) Load(SizeVar int, TypeVar string, CancellableVar *Cancellable) *InputStream {109+func (x *FileIcon) Load(SizeVar int, TypeVar string, CancellableVar *Cancellable) (*InputStream, error) {
110+ var cls *InputStream
111+ var cerr *glib.Error
109 112
110- LoadPtr := XGLoadableIconLoad(x.GoPointer(), SizeVar, TypeVar, CancellableVar.GoPointer())113+ cret := XGLoadableIconLoad(x.GoPointer(), SizeVar, TypeVar, CancellableVar.GoPointer(), &cerr)
111- if LoadPtr == 0 {
112- return nil
113- }
114 114
115- LoadCls := &InputStream{}115+ if cret == 0 {
116- LoadCls.Ptr = LoadPtr116+ return cls, cerr
117- return LoadCls117+ }
118+ cls = &InputStream{}
119+ cls.Ptr = cret
120+ if cerr == nil {
121+ return cls, nil
122+ }
123+ return cls, cerr
118 124
119 }125 }
120 126
@@ -128,16 +134,21 @@ func (x *FileIcon) LoadAsync(SizeVar int, CancellableVar *Cancellable, CallbackV
128 }134 }
129 135
130 // Finishes an asynchronous icon load started in g_loadable_icon_load_async().136 // Finishes an asynchronous icon load started in g_loadable_icon_load_async().
131-func (x *FileIcon) LoadFinish(ResVar AsyncResult, TypeVar string) *InputStream {137+func (x *FileIcon) LoadFinish(ResVar AsyncResult, TypeVar string) (*InputStream, error) {
138+ var cls *InputStream
139+ var cerr *glib.Error
132 140
133- LoadFinishPtr := XGLoadableIconLoadFinish(x.GoPointer(), ResVar.GoPointer(), TypeVar)141+ cret := XGLoadableIconLoadFinish(x.GoPointer(), ResVar.GoPointer(), TypeVar, &cerr)
134- if LoadFinishPtr == 0 {
135- return nil
136- }
137 142
138- LoadFinishCls := &InputStream{}143+ if cret == 0 {
139- LoadFinishCls.Ptr = LoadFinishPtr144+ return cls, cerr
140- return LoadFinishCls145+ }
146+ cls = &InputStream{}
147+ cls.Ptr = cret
148+ if cerr == nil {
149+ return cls, nil
150+ }
151+ return cls, cerr
141 152
142 }153 }
143 154
M v4/gio/gfileinfo.go +108 -109
@@ -54,14 +54,16 @@ var xNewFileInfo func() uintptr
54 54
55 // Creates a new file info structure.55 // Creates a new file info structure.
56 func NewFileInfo() *FileInfo {56 func NewFileInfo() *FileInfo {
57- NewFileInfoPtr := xNewFileInfo()57+ var cls *FileInfo
58- if NewFileInfoPtr == 0 {58+
59- return nil59+ cret := xNewFileInfo()
60- }
61 60
62- NewFileInfoCls := &FileInfo{}61+ if cret == 0 {
63- NewFileInfoCls.Ptr = NewFileInfoPtr62+ return cls
64- return NewFileInfoCls63+ }
64+ cls = &FileInfo{}
65+ cls.Ptr = cret
66+ return cls
65 }67 }
66 68
67 var xFileInfoClearStatus func(uintptr)69 var xFileInfoClearStatus func(uintptr)
@@ -87,16 +89,16 @@ var xFileInfoDup func(uintptr) uintptr
87 89
88 // Duplicates a file info structure.90 // Duplicates a file info structure.
89 func (x *FileInfo) Dup() *FileInfo {91 func (x *FileInfo) Dup() *FileInfo {
92+ var cls *FileInfo
90 93
91- DupPtr := xFileInfoDup(x.GoPointer())94+ cret := xFileInfoDup(x.GoPointer())
92- if DupPtr == 0 {
93- return nil
94- }
95-
96- DupCls := &FileInfo{}
97- DupCls.Ptr = DupPtr
98- return DupCls
99 95
96+ if cret == 0 {
97+ return cls
98+ }
99+ cls = &FileInfo{}
100+ cls.Ptr = cret
101+ return cls
100 }102 }
101 103
102 var xFileInfoGetAccessDateTime func(uintptr) *glib.DateTime104 var xFileInfoGetAccessDateTime func(uintptr) *glib.DateTime
@@ -109,8 +111,8 @@ var xFileInfoGetAccessDateTime func(uintptr) *glib.DateTime
109 // will have microsecond precision.111 // will have microsecond precision.
110 func (x *FileInfo) GetAccessDateTime() *glib.DateTime {112 func (x *FileInfo) GetAccessDateTime() *glib.DateTime {
111 113
112- return xFileInfoGetAccessDateTime(x.GoPointer())114+ cret := xFileInfoGetAccessDateTime(x.GoPointer())
113-115+ return cret
114 }116 }
115 117
116 var xFileInfoGetAttributeAsString func(uintptr, string) string118 var xFileInfoGetAttributeAsString func(uintptr, string) string
@@ -120,8 +122,8 @@ var xFileInfoGetAttributeAsString func(uintptr, string) string
120 // UTF-8.122 // UTF-8.
121 func (x *FileInfo) GetAttributeAsString(AttributeVar string) string {123 func (x *FileInfo) GetAttributeAsString(AttributeVar string) string {
122 124
123- return xFileInfoGetAttributeAsString(x.GoPointer(), AttributeVar)125+ cret := xFileInfoGetAttributeAsString(x.GoPointer(), AttributeVar)
124-126+ return cret
125 }127 }
126 128
127 var xFileInfoGetAttributeBoolean func(uintptr, string) bool129 var xFileInfoGetAttributeBoolean func(uintptr, string) bool
@@ -130,8 +132,8 @@ var xFileInfoGetAttributeBoolean func(uintptr, string) bool
130 // contain a boolean value, %FALSE will be returned.132 // contain a boolean value, %FALSE will be returned.
131 func (x *FileInfo) GetAttributeBoolean(AttributeVar string) bool {133 func (x *FileInfo) GetAttributeBoolean(AttributeVar string) bool {
132 134
133- return xFileInfoGetAttributeBoolean(x.GoPointer(), AttributeVar)135+ cret := xFileInfoGetAttributeBoolean(x.GoPointer(), AttributeVar)
134-136+ return cret
135 }137 }
136 138
137 var xFileInfoGetAttributeByteString func(uintptr, string) string139 var xFileInfoGetAttributeByteString func(uintptr, string) string
@@ -140,8 +142,8 @@ var xFileInfoGetAttributeByteString func(uintptr, string) string
140 // not contain a byte string, %NULL will be returned.142 // not contain a byte string, %NULL will be returned.
141 func (x *FileInfo) GetAttributeByteString(AttributeVar string) string {143 func (x *FileInfo) GetAttributeByteString(AttributeVar string) string {
142 144
143- return xFileInfoGetAttributeByteString(x.GoPointer(), AttributeVar)145+ cret := xFileInfoGetAttributeByteString(x.GoPointer(), AttributeVar)
144-146+ return cret
145 }147 }
146 148
147 var xFileInfoGetAttributeData func(uintptr, string, *FileAttributeType, uintptr, *FileAttributeStatus) bool149 var xFileInfoGetAttributeData func(uintptr, string, *FileAttributeType, uintptr, *FileAttributeStatus) bool
@@ -149,8 +151,8 @@ var xFileInfoGetAttributeData func(uintptr, string, *FileAttributeType, uintptr,
149 // Gets the attribute type, value and status for an attribute key.151 // Gets the attribute type, value and status for an attribute key.
150 func (x *FileInfo) GetAttributeData(AttributeVar string, TypeVar *FileAttributeType, ValuePpVar uintptr, StatusVar *FileAttributeStatus) bool {152 func (x *FileInfo) GetAttributeData(AttributeVar string, TypeVar *FileAttributeType, ValuePpVar uintptr, StatusVar *FileAttributeStatus) bool {
151 153
152- return xFileInfoGetAttributeData(x.GoPointer(), AttributeVar, TypeVar, ValuePpVar, StatusVar)154+ cret := xFileInfoGetAttributeData(x.GoPointer(), AttributeVar, TypeVar, ValuePpVar, StatusVar)
153-155+ return cret
154 }156 }
155 157
156 var xFileInfoGetAttributeInt32 func(uintptr, string) int32158 var xFileInfoGetAttributeInt32 func(uintptr, string) int32
@@ -160,8 +162,8 @@ var xFileInfoGetAttributeInt32 func(uintptr, string) int32
160 // 0 will be returned.162 // 0 will be returned.
161 func (x *FileInfo) GetAttributeInt32(AttributeVar string) int32 {163 func (x *FileInfo) GetAttributeInt32(AttributeVar string) int32 {
162 164
163- return xFileInfoGetAttributeInt32(x.GoPointer(), AttributeVar)165+ cret := xFileInfoGetAttributeInt32(x.GoPointer(), AttributeVar)
164-166+ return cret
165 }167 }
166 168
167 var xFileInfoGetAttributeInt64 func(uintptr, string) int64169 var xFileInfoGetAttributeInt64 func(uintptr, string) int64
@@ -171,8 +173,8 @@ var xFileInfoGetAttributeInt64 func(uintptr, string) int64
171 // 0 will be returned.173 // 0 will be returned.
172 func (x *FileInfo) GetAttributeInt64(AttributeVar string) int64 {174 func (x *FileInfo) GetAttributeInt64(AttributeVar string) int64 {
173 175
174- return xFileInfoGetAttributeInt64(x.GoPointer(), AttributeVar)176+ cret := xFileInfoGetAttributeInt64(x.GoPointer(), AttributeVar)
175-177+ return cret
176 }178 }
177 179
178 var xFileInfoGetAttributeObject func(uintptr, string) uintptr180 var xFileInfoGetAttributeObject func(uintptr, string) uintptr
@@ -180,18 +182,17 @@ var xFileInfoGetAttributeObject func(uintptr, string) uintptr
180 // Gets the value of a #GObject attribute. If the attribute does182 // Gets the value of a #GObject attribute. If the attribute does
181 // not contain a #GObject, %NULL will be returned.183 // not contain a #GObject, %NULL will be returned.
182 func (x *FileInfo) GetAttributeObject(AttributeVar string) *gobject.Object {184 func (x *FileInfo) GetAttributeObject(AttributeVar string) *gobject.Object {
185+ var cls *gobject.Object
183 186
184- GetAttributeObjectPtr := xFileInfoGetAttributeObject(x.GoPointer(), AttributeVar)187+ cret := xFileInfoGetAttributeObject(x.GoPointer(), AttributeVar)
185- if GetAttributeObjectPtr == 0 {
186- return nil
187- }
188-
189- gobject.IncreaseRef(GetAttributeObjectPtr)
190-
191- GetAttributeObjectCls := &gobject.Object{}
192- GetAttributeObjectCls.Ptr = GetAttributeObjectPtr
193- return GetAttributeObjectCls
194 188
189+ if cret == 0 {
190+ return cls
191+ }
192+ gobject.IncreaseRef(cret)
193+ cls = &gobject.Object{}
194+ cls.Ptr = cret
195+ return cls
195 }196 }
196 197
197 var xFileInfoGetAttributeStatus func(uintptr, string) FileAttributeStatus198 var xFileInfoGetAttributeStatus func(uintptr, string) FileAttributeStatus
@@ -199,8 +200,8 @@ var xFileInfoGetAttributeStatus func(uintptr, string) FileAttributeStatus
199 // Gets the attribute status for an attribute key.200 // Gets the attribute status for an attribute key.
200 func (x *FileInfo) GetAttributeStatus(AttributeVar string) FileAttributeStatus {201 func (x *FileInfo) GetAttributeStatus(AttributeVar string) FileAttributeStatus {
201 202
202- return xFileInfoGetAttributeStatus(x.GoPointer(), AttributeVar)203+ cret := xFileInfoGetAttributeStatus(x.GoPointer(), AttributeVar)
203-204+ return cret
204 }205 }
205 206
206 var xFileInfoGetAttributeString func(uintptr, string) string207 var xFileInfoGetAttributeString func(uintptr, string) string
@@ -209,8 +210,8 @@ var xFileInfoGetAttributeString func(uintptr, string) string
209 // not contain a string, %NULL will be returned.210 // not contain a string, %NULL will be returned.
210 func (x *FileInfo) GetAttributeString(AttributeVar string) string {211 func (x *FileInfo) GetAttributeString(AttributeVar string) string {
211 212
212- return xFileInfoGetAttributeString(x.GoPointer(), AttributeVar)213+ cret := xFileInfoGetAttributeString(x.GoPointer(), AttributeVar)
213-214+ return cret
214 }215 }
215 216
216 var xFileInfoGetAttributeStringv func(uintptr, string) []string217 var xFileInfoGetAttributeStringv func(uintptr, string) []string
@@ -219,8 +220,8 @@ var xFileInfoGetAttributeStringv func(uintptr, string) []string
219 // not contain a stringv, %NULL will be returned.220 // not contain a stringv, %NULL will be returned.
220 func (x *FileInfo) GetAttributeStringv(AttributeVar string) []string {221 func (x *FileInfo) GetAttributeStringv(AttributeVar string) []string {
221 222
222- return xFileInfoGetAttributeStringv(x.GoPointer(), AttributeVar)223+ cret := xFileInfoGetAttributeStringv(x.GoPointer(), AttributeVar)
223-224+ return cret
224 }225 }
225 226
226 var xFileInfoGetAttributeType func(uintptr, string) FileAttributeType227 var xFileInfoGetAttributeType func(uintptr, string) FileAttributeType
@@ -228,8 +229,8 @@ var xFileInfoGetAttributeType func(uintptr, string) FileAttributeType
228 // Gets the attribute type for an attribute key.229 // Gets the attribute type for an attribute key.
229 func (x *FileInfo) GetAttributeType(AttributeVar string) FileAttributeType {230 func (x *FileInfo) GetAttributeType(AttributeVar string) FileAttributeType {
230 231
231- return xFileInfoGetAttributeType(x.GoPointer(), AttributeVar)232+ cret := xFileInfoGetAttributeType(x.GoPointer(), AttributeVar)
232-233+ return cret
233 }234 }
234 235
235 var xFileInfoGetAttributeUint32 func(uintptr, string) uint32236 var xFileInfoGetAttributeUint32 func(uintptr, string) uint32
@@ -239,8 +240,8 @@ var xFileInfoGetAttributeUint32 func(uintptr, string) uint32
239 // 0 will be returned.240 // 0 will be returned.
240 func (x *FileInfo) GetAttributeUint32(AttributeVar string) uint32 {241 func (x *FileInfo) GetAttributeUint32(AttributeVar string) uint32 {
241 242
242- return xFileInfoGetAttributeUint32(x.GoPointer(), AttributeVar)243+ cret := xFileInfoGetAttributeUint32(x.GoPointer(), AttributeVar)
243-244+ return cret
244 }245 }
245 246
246 var xFileInfoGetAttributeUint64 func(uintptr, string) uint64247 var xFileInfoGetAttributeUint64 func(uintptr, string) uint64
@@ -250,8 +251,8 @@ var xFileInfoGetAttributeUint64 func(uintptr, string) uint64
250 // 0 will be returned.251 // 0 will be returned.
251 func (x *FileInfo) GetAttributeUint64(AttributeVar string) uint64 {252 func (x *FileInfo) GetAttributeUint64(AttributeVar string) uint64 {
252 253
253- return xFileInfoGetAttributeUint64(x.GoPointer(), AttributeVar)254+ cret := xFileInfoGetAttributeUint64(x.GoPointer(), AttributeVar)
254-255+ return cret
255 }256 }
256 257
257 var xFileInfoGetContentType func(uintptr) string258 var xFileInfoGetContentType func(uintptr) string
@@ -259,8 +260,8 @@ var xFileInfoGetContentType func(uintptr) string
259 // Gets the file's content type.260 // Gets the file's content type.
260 func (x *FileInfo) GetContentType() string {261 func (x *FileInfo) GetContentType() string {
261 262
262- return xFileInfoGetContentType(x.GoPointer())263+ cret := xFileInfoGetContentType(x.GoPointer())
263-264+ return cret
264 }265 }
265 266
266 var xFileInfoGetCreationDateTime func(uintptr) *glib.DateTime267 var xFileInfoGetCreationDateTime func(uintptr) *glib.DateTime
@@ -273,8 +274,8 @@ var xFileInfoGetCreationDateTime func(uintptr) *glib.DateTime
273 // will have microsecond precision.274 // will have microsecond precision.
274 func (x *FileInfo) GetCreationDateTime() *glib.DateTime {275 func (x *FileInfo) GetCreationDateTime() *glib.DateTime {
275 276
276- return xFileInfoGetCreationDateTime(x.GoPointer())277+ cret := xFileInfoGetCreationDateTime(x.GoPointer())
277-278+ return cret
278 }279 }
279 280
280 var xFileInfoGetDeletionDate func(uintptr) *glib.DateTime281 var xFileInfoGetDeletionDate func(uintptr) *glib.DateTime
@@ -284,8 +285,8 @@ var xFileInfoGetDeletionDate func(uintptr) *glib.DateTime
284 // G_FILE_ATTRIBUTE_TRASH_DELETION_DATE attribute is unset, %NULL is returned.285 // G_FILE_ATTRIBUTE_TRASH_DELETION_DATE attribute is unset, %NULL is returned.
285 func (x *FileInfo) GetDeletionDate() *glib.DateTime {286 func (x *FileInfo) GetDeletionDate() *glib.DateTime {
286 287
287- return xFileInfoGetDeletionDate(x.GoPointer())288+ cret := xFileInfoGetDeletionDate(x.GoPointer())
288-289+ return cret
289 }290 }
290 291
291 var xFileInfoGetDisplayName func(uintptr) string292 var xFileInfoGetDisplayName func(uintptr) string
@@ -293,8 +294,8 @@ var xFileInfoGetDisplayName func(uintptr) string
293 // Gets a display name for a file. This is guaranteed to always be set.294 // Gets a display name for a file. This is guaranteed to always be set.
294 func (x *FileInfo) GetDisplayName() string {295 func (x *FileInfo) GetDisplayName() string {
295 296
296- return xFileInfoGetDisplayName(x.GoPointer())297+ cret := xFileInfoGetDisplayName(x.GoPointer())
297-298+ return cret
298 }299 }
299 300
300 var xFileInfoGetEditName func(uintptr) string301 var xFileInfoGetEditName func(uintptr) string
@@ -302,8 +303,8 @@ var xFileInfoGetEditName func(uintptr) string
302 // Gets the edit name for a file.303 // Gets the edit name for a file.
303 func (x *FileInfo) GetEditName() string {304 func (x *FileInfo) GetEditName() string {
304 305
305- return xFileInfoGetEditName(x.GoPointer())306+ cret := xFileInfoGetEditName(x.GoPointer())
306-307+ return cret
307 }308 }
308 309
309 var xFileInfoGetEtag func(uintptr) string310 var xFileInfoGetEtag func(uintptr) string
@@ -312,8 +313,8 @@ var xFileInfoGetEtag func(uintptr) string
312 // #GFileInfo. See %G_FILE_ATTRIBUTE_ETAG_VALUE.313 // #GFileInfo. See %G_FILE_ATTRIBUTE_ETAG_VALUE.
313 func (x *FileInfo) GetEtag() string {314 func (x *FileInfo) GetEtag() string {
314 315
315- return xFileInfoGetEtag(x.GoPointer())316+ cret := xFileInfoGetEtag(x.GoPointer())
316-317+ return cret
317 }318 }
318 319
319 var xFileInfoGetFileType func(uintptr) FileType320 var xFileInfoGetFileType func(uintptr) FileType
@@ -322,26 +323,25 @@ var xFileInfoGetFileType func(uintptr) FileType
322 // This is different from the file's content type, see g_file_info_get_content_type().323 // This is different from the file's content type, see g_file_info_get_content_type().
323 func (x *FileInfo) GetFileType() FileType {324 func (x *FileInfo) GetFileType() FileType {
324 325
325- return xFileInfoGetFileType(x.GoPointer())326+ cret := xFileInfoGetFileType(x.GoPointer())
326-327+ return cret
327 }328 }
328 329
329 var xFileInfoGetIcon func(uintptr) uintptr330 var xFileInfoGetIcon func(uintptr) uintptr
330 331
331 // Gets the icon for a file.332 // Gets the icon for a file.
332 func (x *FileInfo) GetIcon() *IconBase {333 func (x *FileInfo) GetIcon() *IconBase {
334+ var cls *IconBase
333 335
334- GetIconPtr := xFileInfoGetIcon(x.GoPointer())336+ cret := xFileInfoGetIcon(x.GoPointer())
335- if GetIconPtr == 0 {
336- return nil
337- }
338-
339- gobject.IncreaseRef(GetIconPtr)
340-
341- GetIconCls := &IconBase{}
342- GetIconCls.Ptr = GetIconPtr
343- return GetIconCls
344 337
338+ if cret == 0 {
339+ return cls
340+ }
341+ gobject.IncreaseRef(cret)
342+ cls = &IconBase{}
343+ cls.Ptr = cret
344+ return cls
345 }345 }
346 346
347 var xFileInfoGetIsBackup func(uintptr) bool347 var xFileInfoGetIsBackup func(uintptr) bool
@@ -349,8 +349,8 @@ var xFileInfoGetIsBackup func(uintptr) bool
349 // Checks if a file is a backup file.349 // Checks if a file is a backup file.
350 func (x *FileInfo) GetIsBackup() bool {350 func (x *FileInfo) GetIsBackup() bool {
351 351
352- return xFileInfoGetIsBackup(x.GoPointer())352+ cret := xFileInfoGetIsBackup(x.GoPointer())
353-353+ return cret
354 }354 }
355 355
356 var xFileInfoGetIsHidden func(uintptr) bool356 var xFileInfoGetIsHidden func(uintptr) bool
@@ -358,8 +358,8 @@ var xFileInfoGetIsHidden func(uintptr) bool
358 // Checks if a file is hidden.358 // Checks if a file is hidden.
359 func (x *FileInfo) GetIsHidden() bool {359 func (x *FileInfo) GetIsHidden() bool {
360 360
361- return xFileInfoGetIsHidden(x.GoPointer())361+ cret := xFileInfoGetIsHidden(x.GoPointer())
362-362+ return cret
363 }363 }
364 364
365 var xFileInfoGetIsSymlink func(uintptr) bool365 var xFileInfoGetIsSymlink func(uintptr) bool
@@ -367,8 +367,8 @@ var xFileInfoGetIsSymlink func(uintptr) bool
367 // Checks if a file is a symlink.367 // Checks if a file is a symlink.
368 func (x *FileInfo) GetIsSymlink() bool {368 func (x *FileInfo) GetIsSymlink() bool {
369 369
370- return xFileInfoGetIsSymlink(x.GoPointer())370+ cret := xFileInfoGetIsSymlink(x.GoPointer())
371-371+ return cret
372 }372 }
373 373
374 var xFileInfoGetModificationDateTime func(uintptr) *glib.DateTime374 var xFileInfoGetModificationDateTime func(uintptr) *glib.DateTime
@@ -381,8 +381,8 @@ var xFileInfoGetModificationDateTime func(uintptr) *glib.DateTime
381 // will have microsecond precision.381 // will have microsecond precision.
382 func (x *FileInfo) GetModificationDateTime() *glib.DateTime {382 func (x *FileInfo) GetModificationDateTime() *glib.DateTime {
383 383
384- return xFileInfoGetModificationDateTime(x.GoPointer())384+ cret := xFileInfoGetModificationDateTime(x.GoPointer())
385-385+ return cret
386 }386 }
387 387
388 var xFileInfoGetModificationTime func(uintptr, *glib.TimeVal)388 var xFileInfoGetModificationTime func(uintptr, *glib.TimeVal)
@@ -400,8 +400,8 @@ var xFileInfoGetName func(uintptr) string
400 // Gets the name for a file. This is guaranteed to always be set.400 // Gets the name for a file. This is guaranteed to always be set.
401 func (x *FileInfo) GetName() string {401 func (x *FileInfo) GetName() string {
402 402
403- return xFileInfoGetName(x.GoPointer())403+ cret := xFileInfoGetName(x.GoPointer())
404-404+ return cret
405 }405 }
406 406
407 var xFileInfoGetSize func(uintptr) int64407 var xFileInfoGetSize func(uintptr) int64
@@ -411,8 +411,8 @@ var xFileInfoGetSize func(uintptr) int64
411 // from #guint64 to #goffset before returning the result.411 // from #guint64 to #goffset before returning the result.
412 func (x *FileInfo) GetSize() int64 {412 func (x *FileInfo) GetSize() int64 {
413 413
414- return xFileInfoGetSize(x.GoPointer())414+ cret := xFileInfoGetSize(x.GoPointer())
415-415+ return cret
416 }416 }
417 417
418 var xFileInfoGetSortOrder func(uintptr) int32418 var xFileInfoGetSortOrder func(uintptr) int32
@@ -421,26 +421,25 @@ var xFileInfoGetSortOrder func(uintptr) int32
421 // See %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.421 // See %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.
422 func (x *FileInfo) GetSortOrder() int32 {422 func (x *FileInfo) GetSortOrder() int32 {
423 423
424- return xFileInfoGetSortOrder(x.GoPointer())424+ cret := xFileInfoGetSortOrder(x.GoPointer())
425-425+ return cret
426 }426 }
427 427
428 var xFileInfoGetSymbolicIcon func(uintptr) uintptr428 var xFileInfoGetSymbolicIcon func(uintptr) uintptr
429 429
430 // Gets the symbolic icon for a file.430 // Gets the symbolic icon for a file.
431 func (x *FileInfo) GetSymbolicIcon() *IconBase {431 func (x *FileInfo) GetSymbolicIcon() *IconBase {
432+ var cls *IconBase
432 433
433- GetSymbolicIconPtr := xFileInfoGetSymbolicIcon(x.GoPointer())434+ cret := xFileInfoGetSymbolicIcon(x.GoPointer())
434- if GetSymbolicIconPtr == 0 {
435- return nil
436- }
437-
438- gobject.IncreaseRef(GetSymbolicIconPtr)
439-
440- GetSymbolicIconCls := &IconBase{}
441- GetSymbolicIconCls.Ptr = GetSymbolicIconPtr
442- return GetSymbolicIconCls
443 435
436+ if cret == 0 {
437+ return cls
438+ }
439+ gobject.IncreaseRef(cret)
440+ cls = &IconBase{}
441+ cls.Ptr = cret
442+ return cls
444 }443 }
445 444
446 var xFileInfoGetSymlinkTarget func(uintptr) string445 var xFileInfoGetSymlinkTarget func(uintptr) string
@@ -448,8 +447,8 @@ var xFileInfoGetSymlinkTarget func(uintptr) string
448 // Gets the symlink target for a given #GFileInfo.447 // Gets the symlink target for a given #GFileInfo.
449 func (x *FileInfo) GetSymlinkTarget() string {448 func (x *FileInfo) GetSymlinkTarget() string {
450 449
451- return xFileInfoGetSymlinkTarget(x.GoPointer())450+ cret := xFileInfoGetSymlinkTarget(x.GoPointer())
452-451+ return cret
453 }452 }
454 453
455 var xFileInfoHasAttribute func(uintptr, string) bool454 var xFileInfoHasAttribute func(uintptr, string) bool
@@ -457,8 +456,8 @@ var xFileInfoHasAttribute func(uintptr, string) bool
457 // Checks if a file info structure has an attribute named @attribute.456 // Checks if a file info structure has an attribute named @attribute.
458 func (x *FileInfo) HasAttribute(AttributeVar string) bool {457 func (x *FileInfo) HasAttribute(AttributeVar string) bool {
459 458
460- return xFileInfoHasAttribute(x.GoPointer(), AttributeVar)459+ cret := xFileInfoHasAttribute(x.GoPointer(), AttributeVar)
461-460+ return cret
462 }461 }
463 462
464 var xFileInfoHasNamespace func(uintptr, string) bool463 var xFileInfoHasNamespace func(uintptr, string) bool
@@ -467,8 +466,8 @@ var xFileInfoHasNamespace func(uintptr, string) bool
467 // specified @name_space.466 // specified @name_space.
468 func (x *FileInfo) HasNamespace(NameSpaceVar string) bool {467 func (x *FileInfo) HasNamespace(NameSpaceVar string) bool {
469 468
470- return xFileInfoHasNamespace(x.GoPointer(), NameSpaceVar)469+ cret := xFileInfoHasNamespace(x.GoPointer(), NameSpaceVar)
471-470+ return cret
472 }471 }
473 472
474 var xFileInfoListAttributes func(uintptr, string) []string473 var xFileInfoListAttributes func(uintptr, string) []string
@@ -476,8 +475,8 @@ var xFileInfoListAttributes func(uintptr, string) []string
476 // Lists the file info structure's attributes.475 // Lists the file info structure's attributes.
477 func (x *FileInfo) ListAttributes(NameSpaceVar string) []string {476 func (x *FileInfo) ListAttributes(NameSpaceVar string) []string {
478 477
479- return xFileInfoListAttributes(x.GoPointer(), NameSpaceVar)478+ cret := xFileInfoListAttributes(x.GoPointer(), NameSpaceVar)
480-479+ return cret
481 }480 }
482 481
483 var xFileInfoRemoveAttribute func(uintptr, string)482 var xFileInfoRemoveAttribute func(uintptr, string)
@@ -579,8 +578,8 @@ var xFileInfoSetAttributeStatus func(uintptr, string, FileAttributeStatus) bool
579 // is returned and @info is unchanged.578 // is returned and @info is unchanged.
580 func (x *FileInfo) SetAttributeStatus(AttributeVar string, StatusVar FileAttributeStatus) bool {579 func (x *FileInfo) SetAttributeStatus(AttributeVar string, StatusVar FileAttributeStatus) bool {
581 580
582- return xFileInfoSetAttributeStatus(x.GoPointer(), AttributeVar, StatusVar)581+ cret := xFileInfoSetAttributeStatus(x.GoPointer(), AttributeVar, StatusVar)
583-582+ return cret
584 }583 }
585 584
586 var xFileInfoSetAttributeString func(uintptr, string, string)585 var xFileInfoSetAttributeString func(uintptr, string, string)
M v4/gio/gfileinputstream.go +48 -28
@@ -33,23 +33,28 @@ func FileInputStreamNewFromInternalPtr(ptr uintptr) *FileInputStream {
33 return cls33 return cls
34 }34 }
35 35
36-var xFileInputStreamQueryInfo func(uintptr, string, uintptr) uintptr36+var xFileInputStreamQueryInfo func(uintptr, string, uintptr, **glib.Error) uintptr
37 37
38 // Queries a file input stream the given @attributes. This function blocks38 // Queries a file input stream the given @attributes. This function blocks
39 // while querying the stream. For the asynchronous (non-blocking) version39 // while querying the stream. For the asynchronous (non-blocking) version
40 // of this function, see g_file_input_stream_query_info_async(). While the40 // of this function, see g_file_input_stream_query_info_async(). While the
41 // stream is blocked, the stream will set the pending flag internally, and41 // stream is blocked, the stream will set the pending flag internally, and
42 // any other operations on the stream will fail with %G_IO_ERROR_PENDING.42 // any other operations on the stream will fail with %G_IO_ERROR_PENDING.
43-func (x *FileInputStream) QueryInfo(AttributesVar string, CancellableVar *Cancellable) *FileInfo {43+func (x *FileInputStream) QueryInfo(AttributesVar string, CancellableVar *Cancellable) (*FileInfo, error) {
44+ var cls *FileInfo
45+ var cerr *glib.Error
44 46
45- QueryInfoPtr := xFileInputStreamQueryInfo(x.GoPointer(), AttributesVar, CancellableVar.GoPointer())47+ cret := xFileInputStreamQueryInfo(x.GoPointer(), AttributesVar, CancellableVar.GoPointer(), &cerr)
46- if QueryInfoPtr == 0 {
47- return nil
48- }
49 48
50- QueryInfoCls := &FileInfo{}49+ if cret == 0 {
51- QueryInfoCls.Ptr = QueryInfoPtr50+ return cls, cerr
52- return QueryInfoCls51+ }
52+ cls = &FileInfo{}
53+ cls.Ptr = cret
54+ if cerr == nil {
55+ return cls, nil
56+ }
57+ return cls, cerr
53 58
54 }59 }
55 60
@@ -72,19 +77,24 @@ func (x *FileInputStream) QueryInfoAsync(AttributesVar string, IoPriorityVar int
72 77
73 }78 }
74 79
75-var xFileInputStreamQueryInfoFinish func(uintptr, uintptr) uintptr80+var xFileInputStreamQueryInfoFinish func(uintptr, uintptr, **glib.Error) uintptr
76 81
77 // Finishes an asynchronous info query operation.82 // Finishes an asynchronous info query operation.
78-func (x *FileInputStream) QueryInfoFinish(ResultVar AsyncResult) *FileInfo {83+func (x *FileInputStream) QueryInfoFinish(ResultVar AsyncResult) (*FileInfo, error) {
84+ var cls *FileInfo
85+ var cerr *glib.Error
79 86
80- QueryInfoFinishPtr := xFileInputStreamQueryInfoFinish(x.GoPointer(), ResultVar.GoPointer())87+ cret := xFileInputStreamQueryInfoFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
81- if QueryInfoFinishPtr == 0 {
82- return nil
83- }
84 88
85- QueryInfoFinishCls := &FileInfo{}89+ if cret == 0 {
86- QueryInfoFinishCls.Ptr = QueryInfoFinishPtr90+ return cls, cerr
87- return QueryInfoFinishCls91+ }
92+ cls = &FileInfo{}
93+ cls.Ptr = cret
94+ if cerr == nil {
95+ return cls, nil
96+ }
97+ return cls, cerr
88 98
89 }99 }
90 100
@@ -99,16 +109,16 @@ func (c *FileInputStream) SetGoPointer(ptr uintptr) {
99 // Tests if the stream supports the #GSeekableIface.109 // Tests if the stream supports the #GSeekableIface.
100 func (x *FileInputStream) CanSeek() bool {110 func (x *FileInputStream) CanSeek() bool {
101 111
102- return XGSeekableCanSeek(x.GoPointer())112+ cret := XGSeekableCanSeek(x.GoPointer())
103-113+ return cret
104 }114 }
105 115
106 // Tests if the length of the stream can be adjusted with116 // Tests if the length of the stream can be adjusted with
107 // g_seekable_truncate().117 // g_seekable_truncate().
108 func (x *FileInputStream) CanTruncate() bool {118 func (x *FileInputStream) CanTruncate() bool {
109 119
110- return XGSeekableCanTruncate(x.GoPointer())120+ cret := XGSeekableCanTruncate(x.GoPointer())
111-121+ return cret
112 }122 }
113 123
114 // Seeks in the stream by the given @offset, modified by @type.124 // Seeks in the stream by the given @offset, modified by @type.
@@ -125,17 +135,22 @@ func (x *FileInputStream) CanTruncate() bool {
125 // If @cancellable is not %NULL, then the operation can be cancelled by135 // If @cancellable is not %NULL, then the operation can be cancelled by
126 // triggering the cancellable object from another thread. If the operation136 // triggering the cancellable object from another thread. If the operation
127 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.137 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
128-func (x *FileInputStream) Seek(OffsetVar int64, TypeVar glib.SeekType, CancellableVar *Cancellable) bool {138+func (x *FileInputStream) Seek(OffsetVar int64, TypeVar glib.SeekType, CancellableVar *Cancellable) (bool, error) {
139+ var cerr *glib.Error
129 140
130- return XGSeekableSeek(x.GoPointer(), OffsetVar, TypeVar, CancellableVar.GoPointer())141+ cret := XGSeekableSeek(x.GoPointer(), OffsetVar, TypeVar, CancellableVar.GoPointer(), &cerr)
142+ if cerr == nil {
143+ return cret, nil
144+ }
145+ return cret, cerr
131 146
132 }147 }
133 148
134 // Tells the current position within the stream.149 // Tells the current position within the stream.
135 func (x *FileInputStream) Tell() int64 {150 func (x *FileInputStream) Tell() int64 {
136 151
137- return XGSeekableTell(x.GoPointer())152+ cret := XGSeekableTell(x.GoPointer())
138-153+ return cret
139 }154 }
140 155
141 // Sets the length of the stream to @offset. If the stream was previously156 // Sets the length of the stream to @offset. If the stream was previously
@@ -147,9 +162,14 @@ func (x *FileInputStream) Tell() int64 {
147 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an162 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
148 // operation was partially finished when the operation was cancelled the163 // operation was partially finished when the operation was cancelled the
149 // partial result will be returned, without an error.164 // partial result will be returned, without an error.
150-func (x *FileInputStream) Truncate(OffsetVar int64, CancellableVar *Cancellable) bool {165+func (x *FileInputStream) Truncate(OffsetVar int64, CancellableVar *Cancellable) (bool, error) {
166+ var cerr *glib.Error
151 167
152- return XGSeekableTruncate(x.GoPointer(), OffsetVar, CancellableVar.GoPointer())168+ cret := XGSeekableTruncate(x.GoPointer(), OffsetVar, CancellableVar.GoPointer(), &cerr)
169+ if cerr == nil {
170+ return cret, nil
171+ }
172+ return cret, cerr
153 173
154 }174 }
155 175
M v4/gio/gfileiostream.go +50 -30
@@ -51,11 +51,11 @@ var xFileIOStreamGetEtag func(uintptr) string
51 // and closed, as the etag can change while writing.51 // and closed, as the etag can change while writing.
52 func (x *FileIOStream) GetEtag() string {52 func (x *FileIOStream) GetEtag() string {
53 53
54- return xFileIOStreamGetEtag(x.GoPointer())54+ cret := xFileIOStreamGetEtag(x.GoPointer())
55-55+ return cret
56 }56 }
57 57
58-var xFileIOStreamQueryInfo func(uintptr, string, uintptr) uintptr58+var xFileIOStreamQueryInfo func(uintptr, string, uintptr, **glib.Error) uintptr
59 59
60 // Queries a file io stream for the given @attributes.60 // Queries a file io stream for the given @attributes.
61 // This function blocks while querying the stream. For the asynchronous61 // This function blocks while querying the stream. For the asynchronous
@@ -74,16 +74,21 @@ var xFileIOStreamQueryInfo func(uintptr, string, uintptr) uintptr
74 // triggering the cancellable object from another thread. If the operation74 // triggering the cancellable object from another thread. If the operation
75 // was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will75 // was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will
76 // be returned.76 // be returned.
77-func (x *FileIOStream) QueryInfo(AttributesVar string, CancellableVar *Cancellable) *FileInfo {77+func (x *FileIOStream) QueryInfo(AttributesVar string, CancellableVar *Cancellable) (*FileInfo, error) {
78+ var cls *FileInfo
79+ var cerr *glib.Error
78 80
79- QueryInfoPtr := xFileIOStreamQueryInfo(x.GoPointer(), AttributesVar, CancellableVar.GoPointer())81+ cret := xFileIOStreamQueryInfo(x.GoPointer(), AttributesVar, CancellableVar.GoPointer(), &cerr)
80- if QueryInfoPtr == 0 {
81- return nil
82- }
83 82
84- QueryInfoCls := &FileInfo{}83+ if cret == 0 {
85- QueryInfoCls.Ptr = QueryInfoPtr84+ return cls, cerr
86- return QueryInfoCls85+ }
86+ cls = &FileInfo{}
87+ cls.Ptr = cret
88+ if cerr == nil {
89+ return cls, nil
90+ }
91+ return cls, cerr
87 92
88 }93 }
89 94
@@ -101,20 +106,25 @@ func (x *FileIOStream) QueryInfoAsync(AttributesVar string, IoPriorityVar int, C
101 106
102 }107 }
103 108
104-var xFileIOStreamQueryInfoFinish func(uintptr, uintptr) uintptr109+var xFileIOStreamQueryInfoFinish func(uintptr, uintptr, **glib.Error) uintptr
105 110
106 // Finalizes the asynchronous query started111 // Finalizes the asynchronous query started
107 // by g_file_io_stream_query_info_async().112 // by g_file_io_stream_query_info_async().
108-func (x *FileIOStream) QueryInfoFinish(ResultVar AsyncResult) *FileInfo {113+func (x *FileIOStream) QueryInfoFinish(ResultVar AsyncResult) (*FileInfo, error) {
114+ var cls *FileInfo
115+ var cerr *glib.Error
109 116
110- QueryInfoFinishPtr := xFileIOStreamQueryInfoFinish(x.GoPointer(), ResultVar.GoPointer())117+ cret := xFileIOStreamQueryInfoFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
111- if QueryInfoFinishPtr == 0 {
112- return nil
113- }
114 118
115- QueryInfoFinishCls := &FileInfo{}119+ if cret == 0 {
116- QueryInfoFinishCls.Ptr = QueryInfoFinishPtr120+ return cls, cerr
117- return QueryInfoFinishCls121+ }
122+ cls = &FileInfo{}
123+ cls.Ptr = cret
124+ if cerr == nil {
125+ return cls, nil
126+ }
127+ return cls, cerr
118 128
119 }129 }
120 130
@@ -129,16 +139,16 @@ func (c *FileIOStream) SetGoPointer(ptr uintptr) {
129 // Tests if the stream supports the #GSeekableIface.139 // Tests if the stream supports the #GSeekableIface.
130 func (x *FileIOStream) CanSeek() bool {140 func (x *FileIOStream) CanSeek() bool {
131 141
132- return XGSeekableCanSeek(x.GoPointer())142+ cret := XGSeekableCanSeek(x.GoPointer())
133-143+ return cret
134 }144 }
135 145
136 // Tests if the length of the stream can be adjusted with146 // Tests if the length of the stream can be adjusted with
137 // g_seekable_truncate().147 // g_seekable_truncate().
138 func (x *FileIOStream) CanTruncate() bool {148 func (x *FileIOStream) CanTruncate() bool {
139 149
140- return XGSeekableCanTruncate(x.GoPointer())150+ cret := XGSeekableCanTruncate(x.GoPointer())
141-151+ return cret
142 }152 }
143 153
144 // Seeks in the stream by the given @offset, modified by @type.154 // Seeks in the stream by the given @offset, modified by @type.
@@ -155,17 +165,22 @@ func (x *FileIOStream) CanTruncate() bool {
155 // If @cancellable is not %NULL, then the operation can be cancelled by165 // If @cancellable is not %NULL, then the operation can be cancelled by
156 // triggering the cancellable object from another thread. If the operation166 // triggering the cancellable object from another thread. If the operation
157 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.167 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
158-func (x *FileIOStream) Seek(OffsetVar int64, TypeVar glib.SeekType, CancellableVar *Cancellable) bool {168+func (x *FileIOStream) Seek(OffsetVar int64, TypeVar glib.SeekType, CancellableVar *Cancellable) (bool, error) {
169+ var cerr *glib.Error
159 170
160- return XGSeekableSeek(x.GoPointer(), OffsetVar, TypeVar, CancellableVar.GoPointer())171+ cret := XGSeekableSeek(x.GoPointer(), OffsetVar, TypeVar, CancellableVar.GoPointer(), &cerr)
172+ if cerr == nil {
173+ return cret, nil
174+ }
175+ return cret, cerr
161 176
162 }177 }
163 178
164 // Tells the current position within the stream.179 // Tells the current position within the stream.
165 func (x *FileIOStream) Tell() int64 {180 func (x *FileIOStream) Tell() int64 {
166 181
167- return XGSeekableTell(x.GoPointer())182+ cret := XGSeekableTell(x.GoPointer())
168-183+ return cret
169 }184 }
170 185
171 // Sets the length of the stream to @offset. If the stream was previously186 // Sets the length of the stream to @offset. If the stream was previously
@@ -177,9 +192,14 @@ func (x *FileIOStream) Tell() int64 {
177 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an192 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
178 // operation was partially finished when the operation was cancelled the193 // operation was partially finished when the operation was cancelled the
179 // partial result will be returned, without an error.194 // partial result will be returned, without an error.
180-func (x *FileIOStream) Truncate(OffsetVar int64, CancellableVar *Cancellable) bool {195+func (x *FileIOStream) Truncate(OffsetVar int64, CancellableVar *Cancellable) (bool, error) {
196+ var cerr *glib.Error
181 197
182- return XGSeekableTruncate(x.GoPointer(), OffsetVar, CancellableVar.GoPointer())198+ cret := XGSeekableTruncate(x.GoPointer(), OffsetVar, CancellableVar.GoPointer(), &cerr)
199+ if cerr == nil {
200+ return cret, nil
201+ }
202+ return cret, cerr
183 203
184 }204 }
185 205
M v4/gio/gfilemonitor.go +4 -4
@@ -43,8 +43,8 @@ var xFileMonitorCancel func(uintptr) bool
43 // Cancels a file monitor.43 // Cancels a file monitor.
44 func (x *FileMonitor) Cancel() bool {44 func (x *FileMonitor) Cancel() bool {
45 45
46- return xFileMonitorCancel(x.GoPointer())46+ cret := xFileMonitorCancel(x.GoPointer())
47-47+ return cret
48 }48 }
49 49
50 var xFileMonitorEmitEvent func(uintptr, uintptr, uintptr, FileMonitorEvent)50 var xFileMonitorEmitEvent func(uintptr, uintptr, uintptr, FileMonitorEvent)
@@ -67,8 +67,8 @@ var xFileMonitorIsCancelled func(uintptr) bool
67 // Returns whether the monitor is canceled.67 // Returns whether the monitor is canceled.
68 func (x *FileMonitor) IsCancelled() bool {68 func (x *FileMonitor) IsCancelled() bool {
69 69
70- return xFileMonitorIsCancelled(x.GoPointer())70+ cret := xFileMonitorIsCancelled(x.GoPointer())
71-71+ return cret
72 }72 }
73 73
74 var xFileMonitorSetRateLimit func(uintptr, int)74 var xFileMonitorSetRateLimit func(uintptr, int)
M v4/gio/gfilenamecompleter.go +13 -11
@@ -28,14 +28,16 @@ var xNewFilenameCompleter func() uintptr
28 28
29 // Creates a new filename completer.29 // Creates a new filename completer.
30 func NewFilenameCompleter() *FilenameCompleter {30 func NewFilenameCompleter() *FilenameCompleter {
31- NewFilenameCompleterPtr := xNewFilenameCompleter()31+ var cls *FilenameCompleter
32- if NewFilenameCompleterPtr == 0 {32+
33- return nil33+ cret := xNewFilenameCompleter()
34- }
35 34
36- NewFilenameCompleterCls := &FilenameCompleter{}35+ if cret == 0 {
37- NewFilenameCompleterCls.Ptr = NewFilenameCompleterPtr36+ return cls
38- return NewFilenameCompleterCls37+ }
38+ cls = &FilenameCompleter{}
39+ cls.Ptr = cret
40+ return cls
39 }41 }
40 42
41 var xFilenameCompleterGetCompletionSuffix func(uintptr, string) string43 var xFilenameCompleterGetCompletionSuffix func(uintptr, string) string
@@ -43,8 +45,8 @@ var xFilenameCompleterGetCompletionSuffix func(uintptr, string) string
43 // Obtains a completion for @initial_text from @completer.45 // Obtains a completion for @initial_text from @completer.
44 func (x *FilenameCompleter) GetCompletionSuffix(InitialTextVar string) string {46 func (x *FilenameCompleter) GetCompletionSuffix(InitialTextVar string) string {
45 47
46- return xFilenameCompleterGetCompletionSuffix(x.GoPointer(), InitialTextVar)48+ cret := xFilenameCompleterGetCompletionSuffix(x.GoPointer(), InitialTextVar)
47-49+ return cret
48 }50 }
49 51
50 var xFilenameCompleterGetCompletions func(uintptr, string) []string52 var xFilenameCompleterGetCompletions func(uintptr, string) []string
@@ -52,8 +54,8 @@ var xFilenameCompleterGetCompletions func(uintptr, string) []string
52 // Gets an array of completion strings for a given initial text.54 // Gets an array of completion strings for a given initial text.
53 func (x *FilenameCompleter) GetCompletions(InitialTextVar string) []string {55 func (x *FilenameCompleter) GetCompletions(InitialTextVar string) []string {
54 56
55- return xFilenameCompleterGetCompletions(x.GoPointer(), InitialTextVar)57+ cret := xFilenameCompleterGetCompletions(x.GoPointer(), InitialTextVar)
56-58+ return cret
57 }59 }
58 60
59 var xFilenameCompleterSetDirsOnly func(uintptr, bool)61 var xFilenameCompleterSetDirsOnly func(uintptr, bool)
M v4/gio/gfileoutputstream.go +50 -30
@@ -45,11 +45,11 @@ var xFileOutputStreamGetEtag func(uintptr) string
45 // and closed, as the etag can change while writing.45 // and closed, as the etag can change while writing.
46 func (x *FileOutputStream) GetEtag() string {46 func (x *FileOutputStream) GetEtag() string {
47 47
48- return xFileOutputStreamGetEtag(x.GoPointer())48+ cret := xFileOutputStreamGetEtag(x.GoPointer())
49-49+ return cret
50 }50 }
51 51
52-var xFileOutputStreamQueryInfo func(uintptr, string, uintptr) uintptr52+var xFileOutputStreamQueryInfo func(uintptr, string, uintptr, **glib.Error) uintptr
53 53
54 // Queries a file output stream for the given @attributes.54 // Queries a file output stream for the given @attributes.
55 // This function blocks while querying the stream. For the asynchronous55 // This function blocks while querying the stream. For the asynchronous
@@ -68,16 +68,21 @@ var xFileOutputStreamQueryInfo func(uintptr, string, uintptr) uintptr
68 // triggering the cancellable object from another thread. If the operation68 // triggering the cancellable object from another thread. If the operation
69 // was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will69 // was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will
70 // be returned.70 // be returned.
71-func (x *FileOutputStream) QueryInfo(AttributesVar string, CancellableVar *Cancellable) *FileInfo {71+func (x *FileOutputStream) QueryInfo(AttributesVar string, CancellableVar *Cancellable) (*FileInfo, error) {
72+ var cls *FileInfo
73+ var cerr *glib.Error
72 74
73- QueryInfoPtr := xFileOutputStreamQueryInfo(x.GoPointer(), AttributesVar, CancellableVar.GoPointer())75+ cret := xFileOutputStreamQueryInfo(x.GoPointer(), AttributesVar, CancellableVar.GoPointer(), &cerr)
74- if QueryInfoPtr == 0 {
75- return nil
76- }
77 76
78- QueryInfoCls := &FileInfo{}77+ if cret == 0 {
79- QueryInfoCls.Ptr = QueryInfoPtr78+ return cls, cerr
80- return QueryInfoCls79+ }
80+ cls = &FileInfo{}
81+ cls.Ptr = cret
82+ if cerr == nil {
83+ return cls, nil
84+ }
85+ return cls, cerr
81 86
82 }87 }
83 88
@@ -95,20 +100,25 @@ func (x *FileOutputStream) QueryInfoAsync(AttributesVar string, IoPriorityVar in
95 100
96 }101 }
97 102
98-var xFileOutputStreamQueryInfoFinish func(uintptr, uintptr) uintptr103+var xFileOutputStreamQueryInfoFinish func(uintptr, uintptr, **glib.Error) uintptr
99 104
100 // Finalizes the asynchronous query started105 // Finalizes the asynchronous query started
101 // by g_file_output_stream_query_info_async().106 // by g_file_output_stream_query_info_async().
102-func (x *FileOutputStream) QueryInfoFinish(ResultVar AsyncResult) *FileInfo {107+func (x *FileOutputStream) QueryInfoFinish(ResultVar AsyncResult) (*FileInfo, error) {
108+ var cls *FileInfo
109+ var cerr *glib.Error
103 110
104- QueryInfoFinishPtr := xFileOutputStreamQueryInfoFinish(x.GoPointer(), ResultVar.GoPointer())111+ cret := xFileOutputStreamQueryInfoFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
105- if QueryInfoFinishPtr == 0 {
106- return nil
107- }
108 112
109- QueryInfoFinishCls := &FileInfo{}113+ if cret == 0 {
110- QueryInfoFinishCls.Ptr = QueryInfoFinishPtr114+ return cls, cerr
111- return QueryInfoFinishCls115+ }
116+ cls = &FileInfo{}
117+ cls.Ptr = cret
118+ if cerr == nil {
119+ return cls, nil
120+ }
121+ return cls, cerr
112 122
113 }123 }
114 124
@@ -123,16 +133,16 @@ func (c *FileOutputStream) SetGoPointer(ptr uintptr) {
123 // Tests if the stream supports the #GSeekableIface.133 // Tests if the stream supports the #GSeekableIface.
124 func (x *FileOutputStream) CanSeek() bool {134 func (x *FileOutputStream) CanSeek() bool {
125 135
126- return XGSeekableCanSeek(x.GoPointer())136+ cret := XGSeekableCanSeek(x.GoPointer())
127-137+ return cret
128 }138 }
129 139
130 // Tests if the length of the stream can be adjusted with140 // Tests if the length of the stream can be adjusted with
131 // g_seekable_truncate().141 // g_seekable_truncate().
132 func (x *FileOutputStream) CanTruncate() bool {142 func (x *FileOutputStream) CanTruncate() bool {
133 143
134- return XGSeekableCanTruncate(x.GoPointer())144+ cret := XGSeekableCanTruncate(x.GoPointer())
135-145+ return cret
136 }146 }
137 147
138 // Seeks in the stream by the given @offset, modified by @type.148 // Seeks in the stream by the given @offset, modified by @type.
@@ -149,17 +159,22 @@ func (x *FileOutputStream) CanTruncate() bool {
149 // If @cancellable is not %NULL, then the operation can be cancelled by159 // If @cancellable is not %NULL, then the operation can be cancelled by
150 // triggering the cancellable object from another thread. If the operation160 // triggering the cancellable object from another thread. If the operation
151 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.161 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
152-func (x *FileOutputStream) Seek(OffsetVar int64, TypeVar glib.SeekType, CancellableVar *Cancellable) bool {162+func (x *FileOutputStream) Seek(OffsetVar int64, TypeVar glib.SeekType, CancellableVar *Cancellable) (bool, error) {
163+ var cerr *glib.Error
153 164
154- return XGSeekableSeek(x.GoPointer(), OffsetVar, TypeVar, CancellableVar.GoPointer())165+ cret := XGSeekableSeek(x.GoPointer(), OffsetVar, TypeVar, CancellableVar.GoPointer(), &cerr)
166+ if cerr == nil {
167+ return cret, nil
168+ }
169+ return cret, cerr
155 170
156 }171 }
157 172
158 // Tells the current position within the stream.173 // Tells the current position within the stream.
159 func (x *FileOutputStream) Tell() int64 {174 func (x *FileOutputStream) Tell() int64 {
160 175
161- return XGSeekableTell(x.GoPointer())176+ cret := XGSeekableTell(x.GoPointer())
162-177+ return cret
163 }178 }
164 179
165 // Sets the length of the stream to @offset. If the stream was previously180 // Sets the length of the stream to @offset. If the stream was previously
@@ -171,9 +186,14 @@ func (x *FileOutputStream) Tell() int64 {
171 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an186 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
172 // operation was partially finished when the operation was cancelled the187 // operation was partially finished when the operation was cancelled the
173 // partial result will be returned, without an error.188 // partial result will be returned, without an error.
174-func (x *FileOutputStream) Truncate(OffsetVar int64, CancellableVar *Cancellable) bool {189+func (x *FileOutputStream) Truncate(OffsetVar int64, CancellableVar *Cancellable) (bool, error) {
190+ var cerr *glib.Error
175 191
176- return XGSeekableTruncate(x.GoPointer(), OffsetVar, CancellableVar.GoPointer())192+ cret := XGSeekableTruncate(x.GoPointer(), OffsetVar, CancellableVar.GoPointer(), &cerr)
193+ if cerr == nil {
194+ return cret, nil
195+ }
196+ return cret, cerr
177 197
178 }198 }
179 199
M v4/gio/gfilterinputstream.go +11 -12
@@ -29,18 +29,17 @@ var xFilterInputStreamGetBaseStream func(uintptr) uintptr
29 29
30 // Gets the base stream for the filter stream.30 // Gets the base stream for the filter stream.
31 func (x *FilterInputStream) GetBaseStream() *InputStream {31 func (x *FilterInputStream) GetBaseStream() *InputStream {
32+ var cls *InputStream
32 33
33- GetBaseStreamPtr := xFilterInputStreamGetBaseStream(x.GoPointer())34+ cret := xFilterInputStreamGetBaseStream(x.GoPointer())
34- if GetBaseStreamPtr == 0 {
35- return nil
36- }
37-
38- gobject.IncreaseRef(GetBaseStreamPtr)
39-
40- GetBaseStreamCls := &InputStream{}
41- GetBaseStreamCls.Ptr = GetBaseStreamPtr
42- return GetBaseStreamCls
43 35
36+ if cret == 0 {
37+ return cls
38+ }
39+ gobject.IncreaseRef(cret)
40+ cls = &InputStream{}
41+ cls.Ptr = cret
42+ return cls
44 }43 }
45 44
46 var xFilterInputStreamGetCloseBaseStream func(uintptr) bool45 var xFilterInputStreamGetCloseBaseStream func(uintptr) bool
@@ -49,8 +48,8 @@ var xFilterInputStreamGetCloseBaseStream func(uintptr) bool
49 // closed.48 // closed.
50 func (x *FilterInputStream) GetCloseBaseStream() bool {49 func (x *FilterInputStream) GetCloseBaseStream() bool {
51 50
52- return xFilterInputStreamGetCloseBaseStream(x.GoPointer())51+ cret := xFilterInputStreamGetCloseBaseStream(x.GoPointer())
53-52+ return cret
54 }53 }
55 54
56 var xFilterInputStreamSetCloseBaseStream func(uintptr, bool)55 var xFilterInputStreamSetCloseBaseStream func(uintptr, bool)
M v4/gio/gfilteroutputstream.go +11 -12
@@ -29,18 +29,17 @@ var xFilterOutputStreamGetBaseStream func(uintptr) uintptr
29 29
30 // Gets the base stream for the filter stream.30 // Gets the base stream for the filter stream.
31 func (x *FilterOutputStream) GetBaseStream() *OutputStream {31 func (x *FilterOutputStream) GetBaseStream() *OutputStream {
32+ var cls *OutputStream
32 33
33- GetBaseStreamPtr := xFilterOutputStreamGetBaseStream(x.GoPointer())34+ cret := xFilterOutputStreamGetBaseStream(x.GoPointer())
34- if GetBaseStreamPtr == 0 {
35- return nil
36- }
37-
38- gobject.IncreaseRef(GetBaseStreamPtr)
39-
40- GetBaseStreamCls := &OutputStream{}
41- GetBaseStreamCls.Ptr = GetBaseStreamPtr
42- return GetBaseStreamCls
43 35
36+ if cret == 0 {
37+ return cls
38+ }
39+ gobject.IncreaseRef(cret)
40+ cls = &OutputStream{}
41+ cls.Ptr = cret
42+ return cls
44 }43 }
45 44
46 var xFilterOutputStreamGetCloseBaseStream func(uintptr) bool45 var xFilterOutputStreamGetCloseBaseStream func(uintptr) bool
@@ -49,8 +48,8 @@ var xFilterOutputStreamGetCloseBaseStream func(uintptr) bool
49 // closed.48 // closed.
50 func (x *FilterOutputStream) GetCloseBaseStream() bool {49 func (x *FilterOutputStream) GetCloseBaseStream() bool {
51 50
52- return xFilterOutputStreamGetCloseBaseStream(x.GoPointer())51+ cret := xFilterOutputStreamGetCloseBaseStream(x.GoPointer())
53-52+ return cret
54 }53 }
55 54
56 var xFilterOutputStreamSetCloseBaseStream func(uintptr, bool)55 var xFilterOutputStreamSetCloseBaseStream func(uintptr, bool)
M v4/gio/gicon.go +30 -25
@@ -64,8 +64,8 @@ func (x *IconBase) SetGoPointer(ptr uintptr) {
64 // Checks if two icons are equal.64 // Checks if two icons are equal.
65 func (x *IconBase) Equal(Icon2Var Icon) bool {65 func (x *IconBase) Equal(Icon2Var Icon) bool {
66 66
67- return XGIconEqual(x.GoPointer(), Icon2Var.GoPointer())67+ cret := XGIconEqual(x.GoPointer(), Icon2Var.GoPointer())
68-68+ return cret
69 }69 }
70 70
71 // Serializes a #GIcon into a #GVariant. An equivalent #GIcon can be retrieved71 // Serializes a #GIcon into a #GVariant. An equivalent #GIcon can be retrieved
@@ -75,8 +75,8 @@ func (x *IconBase) Equal(Icon2Var Icon) bool {
75 // (as opposed to over the network), and within the same file system namespace.75 // (as opposed to over the network), and within the same file system namespace.
76 func (x *IconBase) Serialize() *glib.Variant {76 func (x *IconBase) Serialize() *glib.Variant {
77 77
78- return XGIconSerialize(x.GoPointer())78+ cret := XGIconSerialize(x.GoPointer())
79-79+ return cret
80 }80 }
81 81
82 // Generates a textual representation of @icon that can be used for82 // Generates a textual representation of @icon that can be used for
@@ -97,8 +97,8 @@ func (x *IconBase) Serialize() *glib.Variant {
97 // the encoding is simply the name (such as `network-server`).97 // the encoding is simply the name (such as `network-server`).
98 func (x *IconBase) ToString() string {98 func (x *IconBase) ToString() string {
99 99
100- return XGIconToString(x.GoPointer())100+ cret := XGIconToString(x.GoPointer())
101-101+ return cret
102 }102 }
103 103
104 var XGIconEqual func(uintptr, uintptr) bool104 var XGIconEqual func(uintptr, uintptr) bool
@@ -109,16 +109,16 @@ var xIconDeserialize func(*glib.Variant) uintptr
109 109
110 // Deserializes a #GIcon previously serialized using g_icon_serialize().110 // Deserializes a #GIcon previously serialized using g_icon_serialize().
111 func IconDeserialize(ValueVar *glib.Variant) *IconBase {111 func IconDeserialize(ValueVar *glib.Variant) *IconBase {
112+ var cls *IconBase
112 113
113- IconDeserializePtr := xIconDeserialize(ValueVar)114+ cret := xIconDeserialize(ValueVar)
114- if IconDeserializePtr == 0 {
115- return nil
116- }
117-
118- IconDeserializeCls := &IconBase{}
119- IconDeserializeCls.Ptr = IconDeserializePtr
120- return IconDeserializeCls
121 115
116+ if cret == 0 {
117+ return cls
118+ }
119+ cls = &IconBase{}
120+ cls.Ptr = cret
121+ return cls
122 }122 }
123 123
124 var xIconHash func(uintptr) uint124 var xIconHash func(uintptr) uint
@@ -126,11 +126,11 @@ var xIconHash func(uintptr) uint
126 // Gets a hash for an icon.126 // Gets a hash for an icon.
127 func IconHash(IconVar uintptr) uint {127 func IconHash(IconVar uintptr) uint {
128 128
129- return xIconHash(IconVar)129+ cret := xIconHash(IconVar)
130-130+ return cret
131 }131 }
132 132
133-var xIconNewForString func(string) uintptr133+var xIconNewForString func(string, **glib.Error) uintptr
134 134
135 // Generate a #GIcon instance from @str. This function can fail if135 // Generate a #GIcon instance from @str. This function can fail if
136 // @str is not valid - see g_icon_to_string() for discussion.136 // @str is not valid - see g_icon_to_string() for discussion.
@@ -138,16 +138,21 @@ var xIconNewForString func(string) uintptr
138 // If your application or library provides one or more #GIcon138 // If your application or library provides one or more #GIcon
139 // implementations you need to ensure that each #GType is registered139 // implementations you need to ensure that each #GType is registered
140 // with the type system prior to calling g_icon_new_for_string().140 // with the type system prior to calling g_icon_new_for_string().
141-func IconNewForString(StrVar string) *IconBase {141+func IconNewForString(StrVar string) (*IconBase, error) {
142+ var cls *IconBase
143+ var cerr *glib.Error
142 144
143- IconNewForStringPtr := xIconNewForString(StrVar)145+ cret := xIconNewForString(StrVar, &cerr)
144- if IconNewForStringPtr == 0 {
145- return nil
146- }
147 146
148- IconNewForStringCls := &IconBase{}147+ if cret == 0 {
149- IconNewForStringCls.Ptr = IconNewForStringPtr148+ return cls, cerr
150- return IconNewForStringCls149+ }
150+ cls = &IconBase{}
151+ cls.Ptr = cret
152+ if cerr == nil {
153+ return cls, nil
154+ }
155+ return cls, cerr
151 156
152 }157 }
153 158
M v4/gio/ginetaddress.go +66 -58
@@ -39,14 +39,16 @@ var xNewAnyInetAddress func(SocketFamily) uintptr
39 // Creates a #GInetAddress for the "any" address (unassigned/"don't39 // Creates a #GInetAddress for the "any" address (unassigned/"don't
40 // care") for @family.40 // care") for @family.
41 func NewAnyInetAddress(FamilyVar SocketFamily) *InetAddress {41 func NewAnyInetAddress(FamilyVar SocketFamily) *InetAddress {
42- NewAnyInetAddressPtr := xNewAnyInetAddress(FamilyVar)42+ var cls *InetAddress
43- if NewAnyInetAddressPtr == 0 {43+
44- return nil44+ cret := xNewAnyInetAddress(FamilyVar)
45- }
46 45
47- NewAnyInetAddressCls := &InetAddress{}46+ if cret == 0 {
48- NewAnyInetAddressCls.Ptr = NewAnyInetAddressPtr47+ return cls
49- return NewAnyInetAddressCls48+ }
49+ cls = &InetAddress{}
50+ cls.Ptr = cret
51+ return cls
50 }52 }
51 53
52 var xNewFromBytesInetAddress func(uintptr, SocketFamily) uintptr54 var xNewFromBytesInetAddress func(uintptr, SocketFamily) uintptr
@@ -55,42 +57,48 @@ var xNewFromBytesInetAddress func(uintptr, SocketFamily) uintptr
55 // @bytes should be 4 bytes for %G_SOCKET_FAMILY_IPV4 and 16 bytes for57 // @bytes should be 4 bytes for %G_SOCKET_FAMILY_IPV4 and 16 bytes for
56 // %G_SOCKET_FAMILY_IPV6.58 // %G_SOCKET_FAMILY_IPV6.
57 func NewFromBytesInetAddress(BytesVar uintptr, FamilyVar SocketFamily) *InetAddress {59 func NewFromBytesInetAddress(BytesVar uintptr, FamilyVar SocketFamily) *InetAddress {
58- NewFromBytesInetAddressPtr := xNewFromBytesInetAddress(BytesVar, FamilyVar)60+ var cls *InetAddress
59- if NewFromBytesInetAddressPtr == 0 {61+
60- return nil62+ cret := xNewFromBytesInetAddress(BytesVar, FamilyVar)
61- }
62 63
63- NewFromBytesInetAddressCls := &InetAddress{}64+ if cret == 0 {
64- NewFromBytesInetAddressCls.Ptr = NewFromBytesInetAddressPtr65+ return cls
65- return NewFromBytesInetAddressCls66+ }
67+ cls = &InetAddress{}
68+ cls.Ptr = cret
69+ return cls
66 }70 }
67 71
68 var xNewFromStringInetAddress func(string) uintptr72 var xNewFromStringInetAddress func(string) uintptr
69 73
70 // Parses @string as an IP address and creates a new #GInetAddress.74 // Parses @string as an IP address and creates a new #GInetAddress.
71 func NewFromStringInetAddress(StringVar string) *InetAddress {75 func NewFromStringInetAddress(StringVar string) *InetAddress {
72- NewFromStringInetAddressPtr := xNewFromStringInetAddress(StringVar)76+ var cls *InetAddress
73- if NewFromStringInetAddressPtr == 0 {77+
74- return nil78+ cret := xNewFromStringInetAddress(StringVar)
75- }
76 79
77- NewFromStringInetAddressCls := &InetAddress{}80+ if cret == 0 {
78- NewFromStringInetAddressCls.Ptr = NewFromStringInetAddressPtr81+ return cls
79- return NewFromStringInetAddressCls82+ }
83+ cls = &InetAddress{}
84+ cls.Ptr = cret
85+ return cls
80 }86 }
81 87
82 var xNewLoopbackInetAddress func(SocketFamily) uintptr88 var xNewLoopbackInetAddress func(SocketFamily) uintptr
83 89
84 // Creates a #GInetAddress for the loopback address for @family.90 // Creates a #GInetAddress for the loopback address for @family.
85 func NewLoopbackInetAddress(FamilyVar SocketFamily) *InetAddress {91 func NewLoopbackInetAddress(FamilyVar SocketFamily) *InetAddress {
86- NewLoopbackInetAddressPtr := xNewLoopbackInetAddress(FamilyVar)92+ var cls *InetAddress
87- if NewLoopbackInetAddressPtr == 0 {93+
88- return nil94+ cret := xNewLoopbackInetAddress(FamilyVar)
89- }
90 95
91- NewLoopbackInetAddressCls := &InetAddress{}96+ if cret == 0 {
92- NewLoopbackInetAddressCls.Ptr = NewLoopbackInetAddressPtr97+ return cls
93- return NewLoopbackInetAddressCls98+ }
99+ cls = &InetAddress{}
100+ cls.Ptr = cret
101+ return cls
94 }102 }
95 103
96 var xInetAddressEqual func(uintptr, uintptr) bool104 var xInetAddressEqual func(uintptr, uintptr) bool
@@ -98,8 +106,8 @@ var xInetAddressEqual func(uintptr, uintptr) bool
98 // Checks if two #GInetAddress instances are equal, e.g. the same address.106 // Checks if two #GInetAddress instances are equal, e.g. the same address.
99 func (x *InetAddress) Equal(OtherAddressVar *InetAddress) bool {107 func (x *InetAddress) Equal(OtherAddressVar *InetAddress) bool {
100 108
101- return xInetAddressEqual(x.GoPointer(), OtherAddressVar.GoPointer())109+ cret := xInetAddressEqual(x.GoPointer(), OtherAddressVar.GoPointer())
102-110+ return cret
103 }111 }
104 112
105 var xInetAddressGetFamily func(uintptr) SocketFamily113 var xInetAddressGetFamily func(uintptr) SocketFamily
@@ -107,8 +115,8 @@ var xInetAddressGetFamily func(uintptr) SocketFamily
107 // Gets @address's family115 // Gets @address's family
108 func (x *InetAddress) GetFamily() SocketFamily {116 func (x *InetAddress) GetFamily() SocketFamily {
109 117
110- return xInetAddressGetFamily(x.GoPointer())118+ cret := xInetAddressGetFamily(x.GoPointer())
111-119+ return cret
112 }120 }
113 121
114 var xInetAddressGetIsAny func(uintptr) bool122 var xInetAddressGetIsAny func(uintptr) bool
@@ -116,8 +124,8 @@ var xInetAddressGetIsAny func(uintptr) bool
116 // Tests whether @address is the "any" address for its family.124 // Tests whether @address is the "any" address for its family.
117 func (x *InetAddress) GetIsAny() bool {125 func (x *InetAddress) GetIsAny() bool {
118 126
119- return xInetAddressGetIsAny(x.GoPointer())127+ cret := xInetAddressGetIsAny(x.GoPointer())
120-128+ return cret
121 }129 }
122 130
123 var xInetAddressGetIsLinkLocal func(uintptr) bool131 var xInetAddressGetIsLinkLocal func(uintptr) bool
@@ -127,8 +135,8 @@ var xInetAddressGetIsLinkLocal func(uintptr) bool
127 // Internet).135 // Internet).
128 func (x *InetAddress) GetIsLinkLocal() bool {136 func (x *InetAddress) GetIsLinkLocal() bool {
129 137
130- return xInetAddressGetIsLinkLocal(x.GoPointer())138+ cret := xInetAddressGetIsLinkLocal(x.GoPointer())
131-139+ return cret
132 }140 }
133 141
134 var xInetAddressGetIsLoopback func(uintptr) bool142 var xInetAddressGetIsLoopback func(uintptr) bool
@@ -136,8 +144,8 @@ var xInetAddressGetIsLoopback func(uintptr) bool
136 // Tests whether @address is the loopback address for its family.144 // Tests whether @address is the loopback address for its family.
137 func (x *InetAddress) GetIsLoopback() bool {145 func (x *InetAddress) GetIsLoopback() bool {
138 146
139- return xInetAddressGetIsLoopback(x.GoPointer())147+ cret := xInetAddressGetIsLoopback(x.GoPointer())
140-148+ return cret
141 }149 }
142 150
143 var xInetAddressGetIsMcGlobal func(uintptr) bool151 var xInetAddressGetIsMcGlobal func(uintptr) bool
@@ -145,8 +153,8 @@ var xInetAddressGetIsMcGlobal func(uintptr) bool
145 // Tests whether @address is a global multicast address.153 // Tests whether @address is a global multicast address.
146 func (x *InetAddress) GetIsMcGlobal() bool {154 func (x *InetAddress) GetIsMcGlobal() bool {
147 155
148- return xInetAddressGetIsMcGlobal(x.GoPointer())156+ cret := xInetAddressGetIsMcGlobal(x.GoPointer())
149-157+ return cret
150 }158 }
151 159
152 var xInetAddressGetIsMcLinkLocal func(uintptr) bool160 var xInetAddressGetIsMcLinkLocal func(uintptr) bool
@@ -154,8 +162,8 @@ var xInetAddressGetIsMcLinkLocal func(uintptr) bool
154 // Tests whether @address is a link-local multicast address.162 // Tests whether @address is a link-local multicast address.
155 func (x *InetAddress) GetIsMcLinkLocal() bool {163 func (x *InetAddress) GetIsMcLinkLocal() bool {
156 164
157- return xInetAddressGetIsMcLinkLocal(x.GoPointer())165+ cret := xInetAddressGetIsMcLinkLocal(x.GoPointer())
158-166+ return cret
159 }167 }
160 168
161 var xInetAddressGetIsMcNodeLocal func(uintptr) bool169 var xInetAddressGetIsMcNodeLocal func(uintptr) bool
@@ -163,8 +171,8 @@ var xInetAddressGetIsMcNodeLocal func(uintptr) bool
163 // Tests whether @address is a node-local multicast address.171 // Tests whether @address is a node-local multicast address.
164 func (x *InetAddress) GetIsMcNodeLocal() bool {172 func (x *InetAddress) GetIsMcNodeLocal() bool {
165 173
166- return xInetAddressGetIsMcNodeLocal(x.GoPointer())174+ cret := xInetAddressGetIsMcNodeLocal(x.GoPointer())
167-175+ return cret
168 }176 }
169 177
170 var xInetAddressGetIsMcOrgLocal func(uintptr) bool178 var xInetAddressGetIsMcOrgLocal func(uintptr) bool
@@ -172,8 +180,8 @@ var xInetAddressGetIsMcOrgLocal func(uintptr) bool
172 // Tests whether @address is an organization-local multicast address.180 // Tests whether @address is an organization-local multicast address.
173 func (x *InetAddress) GetIsMcOrgLocal() bool {181 func (x *InetAddress) GetIsMcOrgLocal() bool {
174 182
175- return xInetAddressGetIsMcOrgLocal(x.GoPointer())183+ cret := xInetAddressGetIsMcOrgLocal(x.GoPointer())
176-184+ return cret
177 }185 }
178 186
179 var xInetAddressGetIsMcSiteLocal func(uintptr) bool187 var xInetAddressGetIsMcSiteLocal func(uintptr) bool
@@ -181,8 +189,8 @@ var xInetAddressGetIsMcSiteLocal func(uintptr) bool
181 // Tests whether @address is a site-local multicast address.189 // Tests whether @address is a site-local multicast address.
182 func (x *InetAddress) GetIsMcSiteLocal() bool {190 func (x *InetAddress) GetIsMcSiteLocal() bool {
183 191
184- return xInetAddressGetIsMcSiteLocal(x.GoPointer())192+ cret := xInetAddressGetIsMcSiteLocal(x.GoPointer())
185-193+ return cret
186 }194 }
187 195
188 var xInetAddressGetIsMulticast func(uintptr) bool196 var xInetAddressGetIsMulticast func(uintptr) bool
@@ -190,8 +198,8 @@ var xInetAddressGetIsMulticast func(uintptr) bool
190 // Tests whether @address is a multicast address.198 // Tests whether @address is a multicast address.
191 func (x *InetAddress) GetIsMulticast() bool {199 func (x *InetAddress) GetIsMulticast() bool {
192 200
193- return xInetAddressGetIsMulticast(x.GoPointer())201+ cret := xInetAddressGetIsMulticast(x.GoPointer())
194-202+ return cret
195 }203 }
196 204
197 var xInetAddressGetIsSiteLocal func(uintptr) bool205 var xInetAddressGetIsSiteLocal func(uintptr) bool
@@ -202,8 +210,8 @@ var xInetAddressGetIsSiteLocal func(uintptr) bool
202 // outgoing Internet connectivity via a NAT or firewall).210 // outgoing Internet connectivity via a NAT or firewall).
203 func (x *InetAddress) GetIsSiteLocal() bool {211 func (x *InetAddress) GetIsSiteLocal() bool {
204 212
205- return xInetAddressGetIsSiteLocal(x.GoPointer())213+ cret := xInetAddressGetIsSiteLocal(x.GoPointer())
206-214+ return cret
207 }215 }
208 216
209 var xInetAddressGetNativeSize func(uintptr) uint217 var xInetAddressGetNativeSize func(uintptr) uint
@@ -212,8 +220,8 @@ var xInetAddressGetNativeSize func(uintptr) uint
212 // is the size of the data that you get from g_inet_address_to_bytes().220 // is the size of the data that you get from g_inet_address_to_bytes().
213 func (x *InetAddress) GetNativeSize() uint {221 func (x *InetAddress) GetNativeSize() uint {
214 222
215- return xInetAddressGetNativeSize(x.GoPointer())223+ cret := xInetAddressGetNativeSize(x.GoPointer())
216-224+ return cret
217 }225 }
218 226
219 var xInetAddressToBytes func(uintptr) byte227 var xInetAddressToBytes func(uintptr) byte
@@ -221,8 +229,8 @@ var xInetAddressToBytes func(uintptr) byte
221 // Gets the raw binary address data from @address.229 // Gets the raw binary address data from @address.
222 func (x *InetAddress) ToBytes() byte {230 func (x *InetAddress) ToBytes() byte {
223 231
224- return xInetAddressToBytes(x.GoPointer())232+ cret := xInetAddressToBytes(x.GoPointer())
225-233+ return cret
226 }234 }
227 235
228 var xInetAddressToString func(uintptr) string236 var xInetAddressToString func(uintptr) string
@@ -230,8 +238,8 @@ var xInetAddressToString func(uintptr) string
230 // Converts @address to string form.238 // Converts @address to string form.
231 func (x *InetAddress) ToString() string {239 func (x *InetAddress) ToString() string {
232 240
233- return xInetAddressToString(x.GoPointer())241+ cret := xInetAddressToString(x.GoPointer())
234-242+ return cret
235 }243 }
236 244
237 func (c *InetAddress) GoPointer() uintptr {245 func (c *InetAddress) GoPointer() uintptr {
M v4/gio/ginetaddressmask.go +57 -38
@@ -4,6 +4,7 @@ package gio
4 import (4 import (
5 "github.com/jwijenbergh/purego"5 "github.com/jwijenbergh/purego"
6 "github.com/jwijenbergh/puregotk/internal/core"6 "github.com/jwijenbergh/puregotk/internal/core"
7+ "github.com/jwijenbergh/puregotk/v4/glib"
7 "github.com/jwijenbergh/puregotk/v4/gobject"8 "github.com/jwijenbergh/puregotk/v4/gobject"
8 )9 )
9 10
@@ -28,36 +29,50 @@ func InetAddressMaskNewFromInternalPtr(ptr uintptr) *InetAddressMask {
28 return cls29 return cls
29 }30 }
30 31
31-var xNewInetAddressMask func(uintptr, uint) uintptr32+var xNewInetAddressMask func(uintptr, uint, **glib.Error) uintptr
32 33
33 // Creates a new #GInetAddressMask representing all addresses whose34 // Creates a new #GInetAddressMask representing all addresses whose
34 // first @length bits match @addr.35 // first @length bits match @addr.
35-func NewInetAddressMask(AddrVar *InetAddress, LengthVar uint) *InetAddressMask {36+func NewInetAddressMask(AddrVar *InetAddress, LengthVar uint) (*InetAddressMask, error) {
36- NewInetAddressMaskPtr := xNewInetAddressMask(AddrVar.GoPointer(), LengthVar)37+ var cls *InetAddressMask
37- if NewInetAddressMaskPtr == 0 {38+ var cerr *glib.Error
38- return nil39+
40+ cret := xNewInetAddressMask(AddrVar.GoPointer(), LengthVar, &cerr)
41+
42+ if cret == 0 {
43+ return cls, cerr
44+ }
45+ cls = &InetAddressMask{}
46+ cls.Ptr = cret
47+ if cerr == nil {
48+ return cls, nil
39 }49 }
50+ return cls, cerr
40 51
41- NewInetAddressMaskCls := &InetAddressMask{}
42- NewInetAddressMaskCls.Ptr = NewInetAddressMaskPtr
43- return NewInetAddressMaskCls
44 }52 }
45 53
46-var xNewFromStringInetAddressMask func(string) uintptr54+var xNewFromStringInetAddressMask func(string, **glib.Error) uintptr
47 55
48 // Parses @mask_string as an IP address and (optional) length, and56 // Parses @mask_string as an IP address and (optional) length, and
49 // creates a new #GInetAddressMask. The length, if present, is57 // creates a new #GInetAddressMask. The length, if present, is
50 // delimited by a "/". If it is not present, then the length is58 // delimited by a "/". If it is not present, then the length is
51 // assumed to be the full length of the address.59 // assumed to be the full length of the address.
52-func NewFromStringInetAddressMask(MaskStringVar string) *InetAddressMask {60+func NewFromStringInetAddressMask(MaskStringVar string) (*InetAddressMask, error) {
53- NewFromStringInetAddressMaskPtr := xNewFromStringInetAddressMask(MaskStringVar)61+ var cls *InetAddressMask
54- if NewFromStringInetAddressMaskPtr == 0 {62+ var cerr *glib.Error
55- return nil63+
64+ cret := xNewFromStringInetAddressMask(MaskStringVar, &cerr)
65+
66+ if cret == 0 {
67+ return cls, cerr
56 }68 }
69+ cls = &InetAddressMask{}
70+ cls.Ptr = cret
71+ if cerr == nil {
72+ return cls, nil
73+ }
74+ return cls, cerr
57 75
58- NewFromStringInetAddressMaskCls := &InetAddressMask{}
59- NewFromStringInetAddressMaskCls.Ptr = NewFromStringInetAddressMaskPtr
60- return NewFromStringInetAddressMaskCls
61 }76 }
62 77
63 var xInetAddressMaskEqual func(uintptr, uintptr) bool78 var xInetAddressMaskEqual func(uintptr, uintptr) bool
@@ -65,26 +80,25 @@ var xInetAddressMaskEqual func(uintptr, uintptr) bool
65 // Tests if @mask and @mask2 are the same mask.80 // Tests if @mask and @mask2 are the same mask.
66 func (x *InetAddressMask) Equal(Mask2Var *InetAddressMask) bool {81 func (x *InetAddressMask) Equal(Mask2Var *InetAddressMask) bool {
67 82
68- return xInetAddressMaskEqual(x.GoPointer(), Mask2Var.GoPointer())83+ cret := xInetAddressMaskEqual(x.GoPointer(), Mask2Var.GoPointer())
69-84+ return cret
70 }85 }
71 86
72 var xInetAddressMaskGetAddress func(uintptr) uintptr87 var xInetAddressMaskGetAddress func(uintptr) uintptr
73 88
74 // Gets @mask's base address89 // Gets @mask's base address
75 func (x *InetAddressMask) GetAddress() *InetAddress {90 func (x *InetAddressMask) GetAddress() *InetAddress {
91+ var cls *InetAddress
76 92
77- GetAddressPtr := xInetAddressMaskGetAddress(x.GoPointer())93+ cret := xInetAddressMaskGetAddress(x.GoPointer())
78- if GetAddressPtr == 0 {
79- return nil
80- }
81-
82- gobject.IncreaseRef(GetAddressPtr)
83-
84- GetAddressCls := &InetAddress{}
85- GetAddressCls.Ptr = GetAddressPtr
86- return GetAddressCls
87 94
95+ if cret == 0 {
96+ return cls
97+ }
98+ gobject.IncreaseRef(cret)
99+ cls = &InetAddress{}
100+ cls.Ptr = cret
101+ return cls
88 }102 }
89 103
90 var xInetAddressMaskGetFamily func(uintptr) SocketFamily104 var xInetAddressMaskGetFamily func(uintptr) SocketFamily
@@ -92,8 +106,8 @@ var xInetAddressMaskGetFamily func(uintptr) SocketFamily
92 // Gets the #GSocketFamily of @mask's address106 // Gets the #GSocketFamily of @mask's address
93 func (x *InetAddressMask) GetFamily() SocketFamily {107 func (x *InetAddressMask) GetFamily() SocketFamily {
94 108
95- return xInetAddressMaskGetFamily(x.GoPointer())109+ cret := xInetAddressMaskGetFamily(x.GoPointer())
96-110+ return cret
97 }111 }
98 112
99 var xInetAddressMaskGetLength func(uintptr) uint113 var xInetAddressMaskGetLength func(uintptr) uint
@@ -101,8 +115,8 @@ var xInetAddressMaskGetLength func(uintptr) uint
101 // Gets @mask's length115 // Gets @mask's length
102 func (x *InetAddressMask) GetLength() uint {116 func (x *InetAddressMask) GetLength() uint {
103 117
104- return xInetAddressMaskGetLength(x.GoPointer())118+ cret := xInetAddressMaskGetLength(x.GoPointer())
105-119+ return cret
106 }120 }
107 121
108 var xInetAddressMaskMatches func(uintptr, uintptr) bool122 var xInetAddressMaskMatches func(uintptr, uintptr) bool
@@ -110,8 +124,8 @@ var xInetAddressMaskMatches func(uintptr, uintptr) bool
110 // Tests if @address falls within the range described by @mask.124 // Tests if @address falls within the range described by @mask.
111 func (x *InetAddressMask) Matches(AddressVar *InetAddress) bool {125 func (x *InetAddressMask) Matches(AddressVar *InetAddress) bool {
112 126
113- return xInetAddressMaskMatches(x.GoPointer(), AddressVar.GoPointer())127+ cret := xInetAddressMaskMatches(x.GoPointer(), AddressVar.GoPointer())
114-128+ return cret
115 }129 }
116 130
117 var xInetAddressMaskToString func(uintptr) string131 var xInetAddressMaskToString func(uintptr) string
@@ -119,8 +133,8 @@ var xInetAddressMaskToString func(uintptr) string
119 // Converts @mask back to its corresponding string form.133 // Converts @mask back to its corresponding string form.
120 func (x *InetAddressMask) ToString() string {134 func (x *InetAddressMask) ToString() string {
121 135
122- return xInetAddressMaskToString(x.GoPointer())136+ cret := xInetAddressMaskToString(x.GoPointer())
123-137+ return cret
124 }138 }
125 139
126 func (c *InetAddressMask) GoPointer() uintptr {140 func (c *InetAddressMask) GoPointer() uintptr {
@@ -169,9 +183,14 @@ func (c *InetAddressMask) SetGoPointer(ptr uintptr) {
169 // In this pattern, a caller would expect to be able to call g_initable_init()183 // In this pattern, a caller would expect to be able to call g_initable_init()
170 // on the result of g_object_new(), regardless of whether it is in fact a new184 // on the result of g_object_new(), regardless of whether it is in fact a new
171 // instance.185 // instance.
172-func (x *InetAddressMask) Init(CancellableVar *Cancellable) bool {186+func (x *InetAddressMask) Init(CancellableVar *Cancellable) (bool, error) {
187+ var cerr *glib.Error
173 188
174- return XGInitableInit(x.GoPointer(), CancellableVar.GoPointer())189+ cret := XGInitableInit(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
190+ if cerr == nil {
191+ return cret, nil
192+ }
193+ return cret, cerr
175 194
176 }195 }
177 196
M v4/gio/ginetsocketaddress.go +51 -48
@@ -30,14 +30,16 @@ var xNewInetSocketAddress func(uintptr, uint16) uintptr
30 30
31 // Creates a new #GInetSocketAddress for @address and @port.31 // Creates a new #GInetSocketAddress for @address and @port.
32 func NewInetSocketAddress(AddressVar *InetAddress, PortVar uint16) *SocketAddress {32 func NewInetSocketAddress(AddressVar *InetAddress, PortVar uint16) *SocketAddress {
33- NewInetSocketAddressPtr := xNewInetSocketAddress(AddressVar.GoPointer(), PortVar)33+ var cls *SocketAddress
34- if NewInetSocketAddressPtr == 0 {34+
35- return nil35+ cret := xNewInetSocketAddress(AddressVar.GoPointer(), PortVar)
36- }
37 36
38- NewInetSocketAddressCls := &SocketAddress{}37+ if cret == 0 {
39- NewInetSocketAddressCls.Ptr = NewInetSocketAddressPtr38+ return cls
40- return NewInetSocketAddressCls39+ }
40+ cls = &SocketAddress{}
41+ cls.Ptr = cret
42+ return cls
41 }43 }
42 44
43 var xNewFromStringInetSocketAddress func(string, uint) uintptr45 var xNewFromStringInetSocketAddress func(string, uint) uintptr
@@ -47,32 +49,33 @@ var xNewFromStringInetSocketAddress func(string, uint) uintptr
47 // If @address is an IPv6 address, it can also contain a scope ID49 // If @address is an IPv6 address, it can also contain a scope ID
48 // (separated from the address by a `%`).50 // (separated from the address by a `%`).
49 func NewFromStringInetSocketAddress(AddressVar string, PortVar uint) *SocketAddress {51 func NewFromStringInetSocketAddress(AddressVar string, PortVar uint) *SocketAddress {
50- NewFromStringInetSocketAddressPtr := xNewFromStringInetSocketAddress(AddressVar, PortVar)52+ var cls *SocketAddress
51- if NewFromStringInetSocketAddressPtr == 0 {53+
52- return nil54+ cret := xNewFromStringInetSocketAddress(AddressVar, PortVar)
53- }
54 55
55- NewFromStringInetSocketAddressCls := &SocketAddress{}56+ if cret == 0 {
56- NewFromStringInetSocketAddressCls.Ptr = NewFromStringInetSocketAddressPtr57+ return cls
57- return NewFromStringInetSocketAddressCls58+ }
59+ cls = &SocketAddress{}
60+ cls.Ptr = cret
61+ return cls
58 }62 }
59 63
60 var xInetSocketAddressGetAddress func(uintptr) uintptr64 var xInetSocketAddressGetAddress func(uintptr) uintptr
61 65
62 // Gets @address's #GInetAddress.66 // Gets @address's #GInetAddress.
63 func (x *InetSocketAddress) GetAddress() *InetAddress {67 func (x *InetSocketAddress) GetAddress() *InetAddress {
68+ var cls *InetAddress
64 69
65- GetAddressPtr := xInetSocketAddressGetAddress(x.GoPointer())70+ cret := xInetSocketAddressGetAddress(x.GoPointer())
66- if GetAddressPtr == 0 {
67- return nil
68- }
69-
70- gobject.IncreaseRef(GetAddressPtr)
71-
72- GetAddressCls := &InetAddress{}
73- GetAddressCls.Ptr = GetAddressPtr
74- return GetAddressCls
75 71
72+ if cret == 0 {
73+ return cls
74+ }
75+ gobject.IncreaseRef(cret)
76+ cls = &InetAddress{}
77+ cls.Ptr = cret
78+ return cls
76 }79 }
77 80
78 var xInetSocketAddressGetFlowinfo func(uintptr) uint3281 var xInetSocketAddressGetFlowinfo func(uintptr) uint32
@@ -81,8 +84,8 @@ var xInetSocketAddressGetFlowinfo func(uintptr) uint32
81 // which must be an IPv6 address.84 // which must be an IPv6 address.
82 func (x *InetSocketAddress) GetFlowinfo() uint32 {85 func (x *InetSocketAddress) GetFlowinfo() uint32 {
83 86
84- return xInetSocketAddressGetFlowinfo(x.GoPointer())87+ cret := xInetSocketAddressGetFlowinfo(x.GoPointer())
85-88+ return cret
86 }89 }
87 90
88 var xInetSocketAddressGetPort func(uintptr) uint1691 var xInetSocketAddressGetPort func(uintptr) uint16
@@ -90,8 +93,8 @@ var xInetSocketAddressGetPort func(uintptr) uint16
90 // Gets @address's port.93 // Gets @address's port.
91 func (x *InetSocketAddress) GetPort() uint16 {94 func (x *InetSocketAddress) GetPort() uint16 {
92 95
93- return xInetSocketAddressGetPort(x.GoPointer())96+ cret := xInetSocketAddressGetPort(x.GoPointer())
94-97+ return cret
95 }98 }
96 99
97 var xInetSocketAddressGetScopeId func(uintptr) uint32100 var xInetSocketAddressGetScopeId func(uintptr) uint32
@@ -100,8 +103,8 @@ var xInetSocketAddressGetScopeId func(uintptr) uint32
100 // which must be an IPv6 address.103 // which must be an IPv6 address.
101 func (x *InetSocketAddress) GetScopeId() uint32 {104 func (x *InetSocketAddress) GetScopeId() uint32 {
102 105
103- return xInetSocketAddressGetScopeId(x.GoPointer())106+ cret := xInetSocketAddressGetScopeId(x.GoPointer())
104-107+ return cret
105 }108 }
106 109
107 func (c *InetSocketAddress) GoPointer() uintptr {110 func (c *InetSocketAddress) GoPointer() uintptr {
@@ -114,16 +117,16 @@ func (c *InetSocketAddress) SetGoPointer(ptr uintptr) {
114 117
115 // Creates a #GSocketAddressEnumerator for @connectable.118 // Creates a #GSocketAddressEnumerator for @connectable.
116 func (x *InetSocketAddress) Enumerate() *SocketAddressEnumerator {119 func (x *InetSocketAddress) Enumerate() *SocketAddressEnumerator {
120+ var cls *SocketAddressEnumerator
117 121
118- EnumeratePtr := XGSocketConnectableEnumerate(x.GoPointer())122+ cret := XGSocketConnectableEnumerate(x.GoPointer())
119- if EnumeratePtr == 0 {
120- return nil
121- }
122-
123- EnumerateCls := &SocketAddressEnumerator{}
124- EnumerateCls.Ptr = EnumeratePtr
125- return EnumerateCls
126 123
124+ if cret == 0 {
125+ return cls
126+ }
127+ cls = &SocketAddressEnumerator{}
128+ cls.Ptr = cret
129+ return cls
127 }130 }
128 131
129 // Creates a #GSocketAddressEnumerator for @connectable that will132 // Creates a #GSocketAddressEnumerator for @connectable that will
@@ -134,16 +137,16 @@ func (x *InetSocketAddress) Enumerate() *SocketAddressEnumerator {
134 // g_socket_connectable_proxy_enumerate(), this will fall back to137 // g_socket_connectable_proxy_enumerate(), this will fall back to
135 // calling g_socket_connectable_enumerate().138 // calling g_socket_connectable_enumerate().
136 func (x *InetSocketAddress) ProxyEnumerate() *SocketAddressEnumerator {139 func (x *InetSocketAddress) ProxyEnumerate() *SocketAddressEnumerator {
140+ var cls *SocketAddressEnumerator
137 141
138- ProxyEnumeratePtr := XGSocketConnectableProxyEnumerate(x.GoPointer())142+ cret := XGSocketConnectableProxyEnumerate(x.GoPointer())
139- if ProxyEnumeratePtr == 0 {
140- return nil
141- }
142-
143- ProxyEnumerateCls := &SocketAddressEnumerator{}
144- ProxyEnumerateCls.Ptr = ProxyEnumeratePtr
145- return ProxyEnumerateCls
146 143
144+ if cret == 0 {
145+ return cls
146+ }
147+ cls = &SocketAddressEnumerator{}
148+ cls.Ptr = cret
149+ return cls
147 }150 }
148 151
149 // Format a #GSocketConnectable as a string. This is a human-readable format for152 // Format a #GSocketConnectable as a string. This is a human-readable format for
@@ -155,8 +158,8 @@ func (x *InetSocketAddress) ProxyEnumerate() *SocketAddressEnumerator {
155 // the implementation’s type name will be returned as a fallback.158 // the implementation’s type name will be returned as a fallback.
156 func (x *InetSocketAddress) ToString() string {159 func (x *InetSocketAddress) ToString() string {
157 160
158- return XGSocketConnectableToString(x.GoPointer())161+ cret := XGSocketConnectableToString(x.GoPointer())
159-162+ return cret
160 }163 }
161 164
162 func init() {165 func init() {
M v4/gio/ginitable.go +23 -12
@@ -4,6 +4,7 @@ package gio
4 import (4 import (
5 "github.com/jwijenbergh/purego"5 "github.com/jwijenbergh/purego"
6 "github.com/jwijenbergh/puregotk/internal/core"6 "github.com/jwijenbergh/puregotk/internal/core"
7+ "github.com/jwijenbergh/puregotk/v4/glib"
7 "github.com/jwijenbergh/puregotk/v4/gobject"8 "github.com/jwijenbergh/puregotk/v4/gobject"
8 )9 )
9 10
@@ -92,29 +93,39 @@ func (x *InitableBase) SetGoPointer(ptr uintptr) {
92 // In this pattern, a caller would expect to be able to call g_initable_init()93 // In this pattern, a caller would expect to be able to call g_initable_init()
93 // on the result of g_object_new(), regardless of whether it is in fact a new94 // on the result of g_object_new(), regardless of whether it is in fact a new
94 // instance.95 // instance.
95-func (x *InitableBase) Init(CancellableVar *Cancellable) bool {96+func (x *InitableBase) Init(CancellableVar *Cancellable) (bool, error) {
97+ var cerr *glib.Error
96 98
97- return XGInitableInit(x.GoPointer(), CancellableVar.GoPointer())99+ cret := XGInitableInit(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
100+ if cerr == nil {
101+ return cret, nil
102+ }
103+ return cret, cerr
98 104
99 }105 }
100 106
101-var XGInitableInit func(uintptr, uintptr) bool107+var XGInitableInit func(uintptr, uintptr, **glib.Error) bool
102 108
103-var xInitableNewv func([]interface{}, uint, uintptr, uintptr) uintptr109+var xInitableNewv func([]interface{}, uint, uintptr, uintptr, **glib.Error) uintptr
104 110
105 // Helper function for constructing #GInitable object. This is111 // Helper function for constructing #GInitable object. This is
106 // similar to g_object_newv() but also initializes the object112 // similar to g_object_newv() but also initializes the object
107 // and returns %NULL, setting an error on failure.113 // and returns %NULL, setting an error on failure.
108-func InitableNewv(ObjectTypeVar []interface{}, NParametersVar uint, ParametersVar uintptr, CancellableVar *Cancellable) *gobject.Object {114+func InitableNewv(ObjectTypeVar []interface{}, NParametersVar uint, ParametersVar uintptr, CancellableVar *Cancellable) (*gobject.Object, error) {
115+ var cls *gobject.Object
116+ var cerr *glib.Error
109 117
110- InitableNewvPtr := xInitableNewv(ObjectTypeVar, NParametersVar, ParametersVar, CancellableVar.GoPointer())118+ cret := xInitableNewv(ObjectTypeVar, NParametersVar, ParametersVar, CancellableVar.GoPointer(), &cerr)
111- if InitableNewvPtr == 0 {
112- return nil
113- }
114 119
115- InitableNewvCls := &gobject.Object{}120+ if cret == 0 {
116- InitableNewvCls.Ptr = InitableNewvPtr121+ return cls, cerr
117- return InitableNewvCls122+ }
123+ cls = &gobject.Object{}
124+ cls.Ptr = cret
125+ if cerr == nil {
126+ return cls, nil
127+ }
128+ return cls, cerr
118 129
119 }130 }
120 131
M v4/gio/ginputstream.go +91 -36
@@ -45,7 +45,7 @@ func (x *InputStream) ClearPending() {
45 45
46 }46 }
47 47
48-var xInputStreamClose func(uintptr, uintptr) bool48+var xInputStreamClose func(uintptr, uintptr, **glib.Error) bool
49 49
50 // Closes the stream, releasing resources related to it.50 // Closes the stream, releasing resources related to it.
51 //51 //
@@ -70,9 +70,14 @@ var xInputStreamClose func(uintptr, uintptr) bool
70 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.70 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
71 // Cancelling a close will still leave the stream closed, but some streams71 // Cancelling a close will still leave the stream closed, but some streams
72 // can use a faster close that doesn't block to e.g. check errors.72 // can use a faster close that doesn't block to e.g. check errors.
73-func (x *InputStream) Close(CancellableVar *Cancellable) bool {73+func (x *InputStream) Close(CancellableVar *Cancellable) (bool, error) {
74+ var cerr *glib.Error
74 75
75- return xInputStreamClose(x.GoPointer(), CancellableVar.GoPointer())76+ cret := xInputStreamClose(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
77+ if cerr == nil {
78+ return cret, nil
79+ }
80+ return cret, cerr
76 81
77 }82 }
78 83
@@ -94,12 +99,17 @@ func (x *InputStream) CloseAsync(IoPriorityVar int, CancellableVar *Cancellable,
94 99
95 }100 }
96 101
97-var xInputStreamCloseFinish func(uintptr, uintptr) bool102+var xInputStreamCloseFinish func(uintptr, uintptr, **glib.Error) bool
98 103
99 // Finishes closing a stream asynchronously, started from g_input_stream_close_async().104 // Finishes closing a stream asynchronously, started from g_input_stream_close_async().
100-func (x *InputStream) CloseFinish(ResultVar AsyncResult) bool {105+func (x *InputStream) CloseFinish(ResultVar AsyncResult) (bool, error) {
106+ var cerr *glib.Error
101 107
102- return xInputStreamCloseFinish(x.GoPointer(), ResultVar.GoPointer())108+ cret := xInputStreamCloseFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
109+ if cerr == nil {
110+ return cret, nil
111+ }
112+ return cret, cerr
103 113
104 }114 }
105 115
@@ -108,8 +118,8 @@ var xInputStreamHasPending func(uintptr) bool
108 // Checks if an input stream has pending actions.118 // Checks if an input stream has pending actions.
109 func (x *InputStream) HasPending() bool {119 func (x *InputStream) HasPending() bool {
110 120
111- return xInputStreamHasPending(x.GoPointer())121+ cret := xInputStreamHasPending(x.GoPointer())
112-122+ return cret
113 }123 }
114 124
115 var xInputStreamIsClosed func(uintptr) bool125 var xInputStreamIsClosed func(uintptr) bool
@@ -117,11 +127,11 @@ var xInputStreamIsClosed func(uintptr) bool
117 // Checks if an input stream is closed.127 // Checks if an input stream is closed.
118 func (x *InputStream) IsClosed() bool {128 func (x *InputStream) IsClosed() bool {
119 129
120- return xInputStreamIsClosed(x.GoPointer())130+ cret := xInputStreamIsClosed(x.GoPointer())
121-131+ return cret
122 }132 }
123 133
124-var xInputStreamRead func(uintptr, uintptr, uint, uintptr) int134+var xInputStreamRead func(uintptr, uintptr, uint, uintptr, **glib.Error) int
125 135
126 // Tries to read @count bytes from the stream into the buffer starting at136 // Tries to read @count bytes from the stream into the buffer starting at
127 // @buffer. Will block during this read.137 // @buffer. Will block during this read.
@@ -144,13 +154,18 @@ var xInputStreamRead func(uintptr, uintptr, uint, uintptr) int
144 // partial result will be returned, without an error.154 // partial result will be returned, without an error.
145 //155 //
146 // On error -1 is returned and @error is set accordingly.156 // On error -1 is returned and @error is set accordingly.
147-func (x *InputStream) Read(BufferVar uintptr, CountVar uint, CancellableVar *Cancellable) int {157+func (x *InputStream) Read(BufferVar uintptr, CountVar uint, CancellableVar *Cancellable) (int, error) {
158+ var cerr *glib.Error
148 159
149- return xInputStreamRead(x.GoPointer(), BufferVar, CountVar, CancellableVar.GoPointer())160+ cret := xInputStreamRead(x.GoPointer(), BufferVar, CountVar, CancellableVar.GoPointer(), &cerr)
161+ if cerr == nil {
162+ return cret, nil
163+ }
164+ return cret, cerr
150 165
151 }166 }
152 167
153-var xInputStreamReadAll func(uintptr, uintptr, uint, uint, uintptr) bool168+var xInputStreamReadAll func(uintptr, uintptr, uint, uint, uintptr, **glib.Error) bool
154 169
155 // Tries to read @count bytes from the stream into the buffer starting at170 // Tries to read @count bytes from the stream into the buffer starting at
156 // @buffer. Will block during this read.171 // @buffer. Will block during this read.
@@ -171,9 +186,14 @@ var xInputStreamReadAll func(uintptr, uintptr, uint, uint, uintptr) bool
171 // read before the error was encountered. This functionality is only186 // read before the error was encountered. This functionality is only
172 // available from C. If you need it from another language then you must187 // available from C. If you need it from another language then you must
173 // write your own loop around g_input_stream_read().188 // write your own loop around g_input_stream_read().
174-func (x *InputStream) ReadAll(BufferVar uintptr, CountVar uint, BytesReadVar uint, CancellableVar *Cancellable) bool {189+func (x *InputStream) ReadAll(BufferVar uintptr, CountVar uint, BytesReadVar uint, CancellableVar *Cancellable) (bool, error) {
190+ var cerr *glib.Error
175 191
176- return xInputStreamReadAll(x.GoPointer(), BufferVar, CountVar, BytesReadVar, CancellableVar.GoPointer())192+ cret := xInputStreamReadAll(x.GoPointer(), BufferVar, CountVar, BytesReadVar, CancellableVar.GoPointer(), &cerr)
193+ if cerr == nil {
194+ return cret, nil
195+ }
196+ return cret, cerr
177 197
178 }198 }
179 199
@@ -195,7 +215,7 @@ func (x *InputStream) ReadAllAsync(BufferVar uintptr, CountVar uint, IoPriorityV
195 215
196 }216 }
197 217
198-var xInputStreamReadAllFinish func(uintptr, uintptr, uint) bool218+var xInputStreamReadAllFinish func(uintptr, uintptr, uint, **glib.Error) bool
199 219
200 // Finishes an asynchronous stream read operation started with220 // Finishes an asynchronous stream read operation started with
201 // g_input_stream_read_all_async().221 // g_input_stream_read_all_async().
@@ -206,9 +226,14 @@ var xInputStreamReadAllFinish func(uintptr, uintptr, uint) bool
206 // read before the error was encountered. This functionality is only226 // read before the error was encountered. This functionality is only
207 // available from C. If you need it from another language then you must227 // available from C. If you need it from another language then you must
208 // write your own loop around g_input_stream_read_async().228 // write your own loop around g_input_stream_read_async().
209-func (x *InputStream) ReadAllFinish(ResultVar AsyncResult, BytesReadVar uint) bool {229+func (x *InputStream) ReadAllFinish(ResultVar AsyncResult, BytesReadVar uint) (bool, error) {
230+ var cerr *glib.Error
210 231
211- return xInputStreamReadAllFinish(x.GoPointer(), ResultVar.GoPointer(), BytesReadVar)232+ cret := xInputStreamReadAllFinish(x.GoPointer(), ResultVar.GoPointer(), BytesReadVar, &cerr)
233+ if cerr == nil {
234+ return cret, nil
235+ }
236+ return cret, cerr
212 237
213 }238 }
214 239
@@ -243,7 +268,7 @@ func (x *InputStream) ReadAsync(BufferVar uintptr, CountVar uint, IoPriorityVar
243 268
244 }269 }
245 270
246-var xInputStreamReadBytes func(uintptr, uint, uintptr) *glib.Bytes271+var xInputStreamReadBytes func(uintptr, uint, uintptr, **glib.Error) *glib.Bytes
247 272
248 // Like g_input_stream_read(), this tries to read @count bytes from273 // Like g_input_stream_read(), this tries to read @count bytes from
249 // the stream in a blocking fashion. However, rather than reading into274 // the stream in a blocking fashion. However, rather than reading into
@@ -268,9 +293,14 @@ var xInputStreamReadBytes func(uintptr, uint, uintptr) *glib.Bytes
268 // partial result will be returned, without an error.293 // partial result will be returned, without an error.
269 //294 //
270 // On error %NULL is returned and @error is set accordingly.295 // On error %NULL is returned and @error is set accordingly.
271-func (x *InputStream) ReadBytes(CountVar uint, CancellableVar *Cancellable) *glib.Bytes {296+func (x *InputStream) ReadBytes(CountVar uint, CancellableVar *Cancellable) (*glib.Bytes, error) {
297+ var cerr *glib.Error
272 298
273- return xInputStreamReadBytes(x.GoPointer(), CountVar, CancellableVar.GoPointer())299+ cret := xInputStreamReadBytes(x.GoPointer(), CountVar, CancellableVar.GoPointer(), &cerr)
300+ if cerr == nil {
301+ return cret, nil
302+ }
303+ return cret, cerr
274 304
275 }305 }
276 306
@@ -302,21 +332,31 @@ func (x *InputStream) ReadBytesAsync(CountVar uint, IoPriorityVar int, Cancellab
302 332
303 }333 }
304 334
305-var xInputStreamReadBytesFinish func(uintptr, uintptr) *glib.Bytes335+var xInputStreamReadBytesFinish func(uintptr, uintptr, **glib.Error) *glib.Bytes
306 336
307 // Finishes an asynchronous stream read-into-#GBytes operation.337 // Finishes an asynchronous stream read-into-#GBytes operation.
308-func (x *InputStream) ReadBytesFinish(ResultVar AsyncResult) *glib.Bytes {338+func (x *InputStream) ReadBytesFinish(ResultVar AsyncResult) (*glib.Bytes, error) {
339+ var cerr *glib.Error
309 340
310- return xInputStreamReadBytesFinish(x.GoPointer(), ResultVar.GoPointer())341+ cret := xInputStreamReadBytesFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
342+ if cerr == nil {
343+ return cret, nil
344+ }
345+ return cret, cerr
311 346
312 }347 }
313 348
314-var xInputStreamReadFinish func(uintptr, uintptr) int349+var xInputStreamReadFinish func(uintptr, uintptr, **glib.Error) int
315 350
316 // Finishes an asynchronous stream read operation.351 // Finishes an asynchronous stream read operation.
317-func (x *InputStream) ReadFinish(ResultVar AsyncResult) int {352+func (x *InputStream) ReadFinish(ResultVar AsyncResult) (int, error) {
353+ var cerr *glib.Error
318 354
319- return xInputStreamReadFinish(x.GoPointer(), ResultVar.GoPointer())355+ cret := xInputStreamReadFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
356+ if cerr == nil {
357+ return cret, nil
358+ }
359+ return cret, cerr
320 360
321 }361 }
322 362
@@ -325,13 +365,18 @@ var xInputStreamSetPending func(uintptr) bool
325 // Sets @stream to have actions pending. If the pending flag is365 // Sets @stream to have actions pending. If the pending flag is
326 // already set or @stream is closed, it will return %FALSE and set366 // already set or @stream is closed, it will return %FALSE and set
327 // @error.367 // @error.
328-func (x *InputStream) SetPending() bool {368+func (x *InputStream) SetPending() (bool, error) {
369+ var cerr *glib.Error
329 370
330- return xInputStreamSetPending(x.GoPointer())371+ cret := xInputStreamSetPending(x.GoPointer())
372+ if cerr == nil {
373+ return cret, nil
374+ }
375+ return cret, cerr
331 376
332 }377 }
333 378
334-var xInputStreamSkip func(uintptr, uint, uintptr) int379+var xInputStreamSkip func(uintptr, uint, uintptr, **glib.Error) int
335 380
336 // Tries to skip @count bytes from the stream. Will block during the operation.381 // Tries to skip @count bytes from the stream. Will block during the operation.
337 //382 //
@@ -347,9 +392,14 @@ var xInputStreamSkip func(uintptr, uint, uintptr) int
347 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an392 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
348 // operation was partially finished when the operation was cancelled the393 // operation was partially finished when the operation was cancelled the
349 // partial result will be returned, without an error.394 // partial result will be returned, without an error.
350-func (x *InputStream) Skip(CountVar uint, CancellableVar *Cancellable) int {395+func (x *InputStream) Skip(CountVar uint, CancellableVar *Cancellable) (int, error) {
396+ var cerr *glib.Error
351 397
352- return xInputStreamSkip(x.GoPointer(), CountVar, CancellableVar.GoPointer())398+ cret := xInputStreamSkip(x.GoPointer(), CountVar, CancellableVar.GoPointer(), &cerr)
399+ if cerr == nil {
400+ return cret, nil
401+ }
402+ return cret, cerr
353 403
354 }404 }
355 405
@@ -384,12 +434,17 @@ func (x *InputStream) SkipAsync(CountVar uint, IoPriorityVar int, CancellableVar
384 434
385 }435 }
386 436
387-var xInputStreamSkipFinish func(uintptr, uintptr) int437+var xInputStreamSkipFinish func(uintptr, uintptr, **glib.Error) int
388 438
389 // Finishes a stream skip operation.439 // Finishes a stream skip operation.
390-func (x *InputStream) SkipFinish(ResultVar AsyncResult) int {440+func (x *InputStream) SkipFinish(ResultVar AsyncResult) (int, error) {
441+ var cerr *glib.Error
391 442
392- return xInputStreamSkipFinish(x.GoPointer(), ResultVar.GoPointer())443+ cret := xInputStreamSkipFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
444+ if cerr == nil {
445+ return cret, nil
446+ }
447+ return cret, cerr
393 448
394 }449 }
395 450
M v4/gio/gio-2.0.go +887 -628
@@ -13,8 +13,8 @@ var xIoErrorQuark func() glib.Quark
13 // Gets the GIO Error Quark.13 // Gets the GIO Error Quark.
14 func IoErrorQuark() glib.Quark {14 func IoErrorQuark() glib.Quark {
15 15
16- return xIoErrorQuark()16+ cret := xIoErrorQuark()
17-17+ return cret
18 }18 }
19 19
20 var xResolverErrorQuark func() glib.Quark20 var xResolverErrorQuark func() glib.Quark
@@ -22,8 +22,8 @@ var xResolverErrorQuark func() glib.Quark
22 // Gets the #GResolver Error Quark.22 // Gets the #GResolver Error Quark.
23 func ResolverErrorQuark() glib.Quark {23 func ResolverErrorQuark() glib.Quark {
24 24
25- return xResolverErrorQuark()25+ cret := xResolverErrorQuark()
26-26+ return cret
27 }27 }
28 28
29 var xResourceErrorQuark func() glib.Quark29 var xResourceErrorQuark func() glib.Quark
@@ -31,8 +31,8 @@ var xResourceErrorQuark func() glib.Quark
31 // Gets the #GResource Error Quark.31 // Gets the #GResource Error Quark.
32 func ResourceErrorQuark() glib.Quark {32 func ResourceErrorQuark() glib.Quark {
33 33
34- return xResourceErrorQuark()34+ cret := xResourceErrorQuark()
35-35+ return cret
36 }36 }
37 37
38 var xTlsChannelBindingErrorQuark func() glib.Quark38 var xTlsChannelBindingErrorQuark func() glib.Quark
@@ -40,8 +40,8 @@ var xTlsChannelBindingErrorQuark func() glib.Quark
40 // Gets the TLS channel binding error quark.40 // Gets the TLS channel binding error quark.
41 func TlsChannelBindingErrorQuark() glib.Quark {41 func TlsChannelBindingErrorQuark() glib.Quark {
42 42
43- return xTlsChannelBindingErrorQuark()43+ cret := xTlsChannelBindingErrorQuark()
44-44+ return cret
45 }45 }
46 46
47 var xTlsErrorQuark func() glib.Quark47 var xTlsErrorQuark func() glib.Quark
@@ -49,8 +49,8 @@ var xTlsErrorQuark func() glib.Quark
49 // Gets the TLS error quark.49 // Gets the TLS error quark.
50 func TlsErrorQuark() glib.Quark {50 func TlsErrorQuark() glib.Quark {
51 51
52- return xTlsErrorQuark()52+ cret := xTlsErrorQuark()
53-53+ return cret
54 }54 }
55 55
56 // #GAppInfoMonitor is a very simple object used for monitoring the app56 // #GAppInfoMonitor is a very simple object used for monitoring the app
@@ -120,14 +120,16 @@ var xNewBytesIcon func(*glib.Bytes) uintptr
120 // This cannot fail, but loading and interpreting the bytes may fail later on120 // This cannot fail, but loading and interpreting the bytes may fail later on
121 // (for example, if g_loadable_icon_load() is called) if the image is invalid.121 // (for example, if g_loadable_icon_load() is called) if the image is invalid.
122 func NewBytesIcon(BytesVar *glib.Bytes) *BytesIcon {122 func NewBytesIcon(BytesVar *glib.Bytes) *BytesIcon {
123- NewBytesIconPtr := xNewBytesIcon(BytesVar)123+ var cls *BytesIcon
124- if NewBytesIconPtr == 0 {124+
125- return nil125+ cret := xNewBytesIcon(BytesVar)
126- }
127 126
128- NewBytesIconCls := &BytesIcon{}127+ if cret == 0 {
129- NewBytesIconCls.Ptr = NewBytesIconPtr128+ return cls
130- return NewBytesIconCls129+ }
130+ cls = &BytesIcon{}
131+ cls.Ptr = cret
132+ return cls
131 }133 }
132 134
133 var xBytesIconGetBytes func(uintptr) *glib.Bytes135 var xBytesIconGetBytes func(uintptr) *glib.Bytes
@@ -135,8 +137,8 @@ var xBytesIconGetBytes func(uintptr) *glib.Bytes
135 // Gets the #GBytes associated with the given @icon.137 // Gets the #GBytes associated with the given @icon.
136 func (x *BytesIcon) GetBytes() *glib.Bytes {138 func (x *BytesIcon) GetBytes() *glib.Bytes {
137 139
138- return xBytesIconGetBytes(x.GoPointer())140+ cret := xBytesIconGetBytes(x.GoPointer())
139-141+ return cret
140 }142 }
141 143
142 func (c *BytesIcon) GoPointer() uintptr {144 func (c *BytesIcon) GoPointer() uintptr {
@@ -150,8 +152,8 @@ func (c *BytesIcon) SetGoPointer(ptr uintptr) {
150 // Checks if two icons are equal.152 // Checks if two icons are equal.
151 func (x *BytesIcon) Equal(Icon2Var Icon) bool {153 func (x *BytesIcon) Equal(Icon2Var Icon) bool {
152 154
153- return XGIconEqual(x.GoPointer(), Icon2Var.GoPointer())155+ cret := XGIconEqual(x.GoPointer(), Icon2Var.GoPointer())
154-156+ return cret
155 }157 }
156 158
157 // Serializes a #GIcon into a #GVariant. An equivalent #GIcon can be retrieved159 // Serializes a #GIcon into a #GVariant. An equivalent #GIcon can be retrieved
@@ -161,8 +163,8 @@ func (x *BytesIcon) Equal(Icon2Var Icon) bool {
161 // (as opposed to over the network), and within the same file system namespace.163 // (as opposed to over the network), and within the same file system namespace.
162 func (x *BytesIcon) Serialize() *glib.Variant {164 func (x *BytesIcon) Serialize() *glib.Variant {
163 165
164- return XGIconSerialize(x.GoPointer())166+ cret := XGIconSerialize(x.GoPointer())
165-167+ return cret
166 }168 }
167 169
168 // Generates a textual representation of @icon that can be used for170 // Generates a textual representation of @icon that can be used for
@@ -183,22 +185,27 @@ func (x *BytesIcon) Serialize() *glib.Variant {
183 // the encoding is simply the name (such as `network-server`).185 // the encoding is simply the name (such as `network-server`).
184 func (x *BytesIcon) ToString() string {186 func (x *BytesIcon) ToString() string {
185 187
186- return XGIconToString(x.GoPointer())188+ cret := XGIconToString(x.GoPointer())
187-189+ return cret
188 }190 }
189 191
190 // Loads a loadable icon. For the asynchronous version of this function,192 // Loads a loadable icon. For the asynchronous version of this function,
191 // see g_loadable_icon_load_async().193 // see g_loadable_icon_load_async().
192-func (x *BytesIcon) Load(SizeVar int, TypeVar string, CancellableVar *Cancellable) *InputStream {194+func (x *BytesIcon) Load(SizeVar int, TypeVar string, CancellableVar *Cancellable) (*InputStream, error) {
195+ var cls *InputStream
196+ var cerr *glib.Error
193 197
194- LoadPtr := XGLoadableIconLoad(x.GoPointer(), SizeVar, TypeVar, CancellableVar.GoPointer())198+ cret := XGLoadableIconLoad(x.GoPointer(), SizeVar, TypeVar, CancellableVar.GoPointer(), &cerr)
195- if LoadPtr == 0 {
196- return nil
197- }
198 199
199- LoadCls := &InputStream{}200+ if cret == 0 {
200- LoadCls.Ptr = LoadPtr201+ return cls, cerr
201- return LoadCls202+ }
203+ cls = &InputStream{}
204+ cls.Ptr = cret
205+ if cerr == nil {
206+ return cls, nil
207+ }
208+ return cls, cerr
202 209
203 }210 }
204 211
@@ -212,16 +219,21 @@ func (x *BytesIcon) LoadAsync(SizeVar int, CancellableVar *Cancellable, Callback
212 }219 }
213 220
214 // Finishes an asynchronous icon load started in g_loadable_icon_load_async().221 // Finishes an asynchronous icon load started in g_loadable_icon_load_async().
215-func (x *BytesIcon) LoadFinish(ResVar AsyncResult, TypeVar string) *InputStream {222+func (x *BytesIcon) LoadFinish(ResVar AsyncResult, TypeVar string) (*InputStream, error) {
223+ var cls *InputStream
224+ var cerr *glib.Error
216 225
217- LoadFinishPtr := XGLoadableIconLoadFinish(x.GoPointer(), ResVar.GoPointer(), TypeVar)226+ cret := XGLoadableIconLoadFinish(x.GoPointer(), ResVar.GoPointer(), TypeVar, &cerr)
218- if LoadFinishPtr == 0 {
219- return nil
220- }
221 227
222- LoadFinishCls := &InputStream{}228+ if cret == 0 {
223- LoadFinishCls.Ptr = LoadFinishPtr229+ return cls, cerr
224- return LoadFinishCls230+ }
231+ cls = &InputStream{}
232+ cls.Ptr = cret
233+ if cerr == nil {
234+ return cls, nil
235+ }
236+ return cls, cerr
225 237
226 }238 }
227 239
@@ -344,8 +356,8 @@ func (x *DBusActionGroup) ChangeActionState(ActionNameVar string, ValueVar *glib
344 // have its state changed from outside callers.356 // have its state changed from outside callers.
345 func (x *DBusActionGroup) GetActionEnabled(ActionNameVar string) bool {357 func (x *DBusActionGroup) GetActionEnabled(ActionNameVar string) bool {
346 358
347- return XGActionGroupGetActionEnabled(x.GoPointer(), ActionNameVar)359+ cret := XGActionGroupGetActionEnabled(x.GoPointer(), ActionNameVar)
348-360+ return cret
349 }361 }
350 362
351 // Queries the type of the parameter that must be given when activating363 // Queries the type of the parameter that must be given when activating
@@ -363,8 +375,8 @@ func (x *DBusActionGroup) GetActionEnabled(ActionNameVar string) bool {
363 // with the same name but a different parameter type.375 // with the same name but a different parameter type.
364 func (x *DBusActionGroup) GetActionParameterType(ActionNameVar string) *glib.VariantType {376 func (x *DBusActionGroup) GetActionParameterType(ActionNameVar string) *glib.VariantType {
365 377
366- return XGActionGroupGetActionParameterType(x.GoPointer(), ActionNameVar)378+ cret := XGActionGroupGetActionParameterType(x.GoPointer(), ActionNameVar)
367-379+ return cret
368 }380 }
369 381
370 // Queries the current state of the named action within @action_group.382 // Queries the current state of the named action within @action_group.
@@ -377,8 +389,8 @@ func (x *DBusActionGroup) GetActionParameterType(ActionNameVar string) *glib.Var
377 // g_variant_unref() when it is no longer required.389 // g_variant_unref() when it is no longer required.
378 func (x *DBusActionGroup) GetActionState(ActionNameVar string) *glib.Variant {390 func (x *DBusActionGroup) GetActionState(ActionNameVar string) *glib.Variant {
379 391
380- return XGActionGroupGetActionState(x.GoPointer(), ActionNameVar)392+ cret := XGActionGroupGetActionState(x.GoPointer(), ActionNameVar)
381-393+ return cret
382 }394 }
383 395
384 // Requests a hint about the valid range of values for the state of the396 // Requests a hint about the valid range of values for the state of the
@@ -401,8 +413,8 @@ func (x *DBusActionGroup) GetActionState(ActionNameVar string) *glib.Variant {
401 // g_variant_unref() when it is no longer required.413 // g_variant_unref() when it is no longer required.
402 func (x *DBusActionGroup) GetActionStateHint(ActionNameVar string) *glib.Variant {414 func (x *DBusActionGroup) GetActionStateHint(ActionNameVar string) *glib.Variant {
403 415
404- return XGActionGroupGetActionStateHint(x.GoPointer(), ActionNameVar)416+ cret := XGActionGroupGetActionStateHint(x.GoPointer(), ActionNameVar)
405-417+ return cret
406 }418 }
407 419
408 // Queries the type of the state of the named action within420 // Queries the type of the state of the named action within
@@ -423,15 +435,15 @@ func (x *DBusActionGroup) GetActionStateHint(ActionNameVar string) *glib.Variant
423 // with the same name but a different state type.435 // with the same name but a different state type.
424 func (x *DBusActionGroup) GetActionStateType(ActionNameVar string) *glib.VariantType {436 func (x *DBusActionGroup) GetActionStateType(ActionNameVar string) *glib.VariantType {
425 437
426- return XGActionGroupGetActionStateType(x.GoPointer(), ActionNameVar)438+ cret := XGActionGroupGetActionStateType(x.GoPointer(), ActionNameVar)
427-439+ return cret
428 }440 }
429 441
430 // Checks if the named action exists within @action_group.442 // Checks if the named action exists within @action_group.
431 func (x *DBusActionGroup) HasAction(ActionNameVar string) bool {443 func (x *DBusActionGroup) HasAction(ActionNameVar string) bool {
432 444
433- return XGActionGroupHasAction(x.GoPointer(), ActionNameVar)445+ cret := XGActionGroupHasAction(x.GoPointer(), ActionNameVar)
434-446+ return cret
435 }447 }
436 448
437 // Lists the actions contained within @action_group.449 // Lists the actions contained within @action_group.
@@ -440,8 +452,8 @@ func (x *DBusActionGroup) HasAction(ActionNameVar string) bool {
440 // it is no longer required.452 // it is no longer required.
441 func (x *DBusActionGroup) ListActions() uintptr {453 func (x *DBusActionGroup) ListActions() uintptr {
442 454
443- return XGActionGroupListActions(x.GoPointer())455+ cret := XGActionGroupListActions(x.GoPointer())
444-456+ return cret
445 }457 }
446 458
447 // Queries all aspects of the named action within an @action_group.459 // Queries all aspects of the named action within an @action_group.
@@ -473,8 +485,8 @@ func (x *DBusActionGroup) ListActions() uintptr {
473 // fields may or may not have been modified.485 // fields may or may not have been modified.
474 func (x *DBusActionGroup) QueryAction(ActionNameVar string, EnabledVar bool, ParameterTypeVar **glib.VariantType, StateTypeVar **glib.VariantType, StateHintVar **glib.Variant, StateVar **glib.Variant) bool {486 func (x *DBusActionGroup) QueryAction(ActionNameVar string, EnabledVar bool, ParameterTypeVar **glib.VariantType, StateTypeVar **glib.VariantType, StateHintVar **glib.Variant, StateVar **glib.Variant) bool {
475 487
476- return XGActionGroupQueryAction(x.GoPointer(), ActionNameVar, EnabledVar, ParameterTypeVar, StateTypeVar, StateHintVar, StateVar)488+ cret := XGActionGroupQueryAction(x.GoPointer(), ActionNameVar, EnabledVar, ParameterTypeVar, StateTypeVar, StateHintVar, StateVar)
477-489+ return cret
478 }490 }
479 491
480 // Activates the remote action.492 // Activates the remote action.
@@ -589,14 +601,16 @@ var xNewDBusAuthObserver func() uintptr
589 601
590 // Creates a new #GDBusAuthObserver object.602 // Creates a new #GDBusAuthObserver object.
591 func NewDBusAuthObserver() *DBusAuthObserver {603 func NewDBusAuthObserver() *DBusAuthObserver {
592- NewDBusAuthObserverPtr := xNewDBusAuthObserver()604+ var cls *DBusAuthObserver
593- if NewDBusAuthObserverPtr == 0 {
594- return nil
595- }
596 605
597- NewDBusAuthObserverCls := &DBusAuthObserver{}606+ cret := xNewDBusAuthObserver()
598- NewDBusAuthObserverCls.Ptr = NewDBusAuthObserverPtr607+
599- return NewDBusAuthObserverCls608+ if cret == 0 {
609+ return cls
610+ }
611+ cls = &DBusAuthObserver{}
612+ cls.Ptr = cret
613+ return cls
600 }614 }
601 615
602 var xDBusAuthObserverAllowMechanism func(uintptr, string) bool616 var xDBusAuthObserverAllowMechanism func(uintptr, string) bool
@@ -604,8 +618,8 @@ var xDBusAuthObserverAllowMechanism func(uintptr, string) bool
604 // Emits the #GDBusAuthObserver::allow-mechanism signal on @observer.618 // Emits the #GDBusAuthObserver::allow-mechanism signal on @observer.
605 func (x *DBusAuthObserver) AllowMechanism(MechanismVar string) bool {619 func (x *DBusAuthObserver) AllowMechanism(MechanismVar string) bool {
606 620
607- return xDBusAuthObserverAllowMechanism(x.GoPointer(), MechanismVar)621+ cret := xDBusAuthObserverAllowMechanism(x.GoPointer(), MechanismVar)
608-622+ return cret
609 }623 }
610 624
611 var xDBusAuthObserverAuthorizeAuthenticatedPeer func(uintptr, uintptr, uintptr) bool625 var xDBusAuthObserverAuthorizeAuthenticatedPeer func(uintptr, uintptr, uintptr) bool
@@ -613,8 +627,8 @@ var xDBusAuthObserverAuthorizeAuthenticatedPeer func(uintptr, uintptr, uintptr)
613 // Emits the #GDBusAuthObserver::authorize-authenticated-peer signal on @observer.627 // Emits the #GDBusAuthObserver::authorize-authenticated-peer signal on @observer.
614 func (x *DBusAuthObserver) AuthorizeAuthenticatedPeer(StreamVar *IOStream, CredentialsVar *Credentials) bool {628 func (x *DBusAuthObserver) AuthorizeAuthenticatedPeer(StreamVar *IOStream, CredentialsVar *Credentials) bool {
615 629
616- return xDBusAuthObserverAuthorizeAuthenticatedPeer(x.GoPointer(), StreamVar.GoPointer(), CredentialsVar.GoPointer())630+ cret := xDBusAuthObserverAuthorizeAuthenticatedPeer(x.GoPointer(), StreamVar.GoPointer(), CredentialsVar.GoPointer())
617-631+ return cret
618 }632 }
619 633
620 func (c *DBusAuthObserver) GoPointer() uintptr {634 func (c *DBusAuthObserver) GoPointer() uintptr {
@@ -709,35 +723,49 @@ func DBusConnectionNewFromInternalPtr(ptr uintptr) *DBusConnection {
709 return cls723 return cls
710 }724 }
711 725
712-var xNewFinishDBusConnection func(uintptr) uintptr726+var xNewFinishDBusConnection func(uintptr, **glib.Error) uintptr
713 727
714 // Finishes an operation started with g_dbus_connection_new().728 // Finishes an operation started with g_dbus_connection_new().
715-func NewFinishDBusConnection(ResVar AsyncResult) *DBusConnection {729+func NewFinishDBusConnection(ResVar AsyncResult) (*DBusConnection, error) {
716- NewFinishDBusConnectionPtr := xNewFinishDBusConnection(ResVar.GoPointer())730+ var cls *DBusConnection
717- if NewFinishDBusConnectionPtr == 0 {731+ var cerr *glib.Error
718- return nil732+
733+ cret := xNewFinishDBusConnection(ResVar.GoPointer(), &cerr)
734+
735+ if cret == 0 {
736+ return cls, cerr
719 }737 }
738+ cls = &DBusConnection{}
739+ cls.Ptr = cret
740+ if cerr == nil {
741+ return cls, nil
742+ }
743+ return cls, cerr
720 744
721- NewFinishDBusConnectionCls := &DBusConnection{}
722- NewFinishDBusConnectionCls.Ptr = NewFinishDBusConnectionPtr
723- return NewFinishDBusConnectionCls
724 }745 }
725 746
726-var xNewForAddressFinishDBusConnection func(uintptr) uintptr747+var xNewForAddressFinishDBusConnection func(uintptr, **glib.Error) uintptr
727 748
728 // Finishes an operation started with g_dbus_connection_new_for_address().749 // Finishes an operation started with g_dbus_connection_new_for_address().
729-func NewForAddressFinishDBusConnection(ResVar AsyncResult) *DBusConnection {750+func NewForAddressFinishDBusConnection(ResVar AsyncResult) (*DBusConnection, error) {
730- NewForAddressFinishDBusConnectionPtr := xNewForAddressFinishDBusConnection(ResVar.GoPointer())751+ var cls *DBusConnection
731- if NewForAddressFinishDBusConnectionPtr == 0 {752+ var cerr *glib.Error
732- return nil753+
754+ cret := xNewForAddressFinishDBusConnection(ResVar.GoPointer(), &cerr)
755+
756+ if cret == 0 {
757+ return cls, cerr
758+ }
759+ cls = &DBusConnection{}
760+ cls.Ptr = cret
761+ if cerr == nil {
762+ return cls, nil
733 }763 }
764+ return cls, cerr
734 765
735- NewForAddressFinishDBusConnectionCls := &DBusConnection{}
736- NewForAddressFinishDBusConnectionCls.Ptr = NewForAddressFinishDBusConnectionPtr
737- return NewForAddressFinishDBusConnectionCls
738 }766 }
739 767
740-var xNewForAddressSyncDBusConnection func(string, DBusConnectionFlags, uintptr, uintptr) uintptr768+var xNewForAddressSyncDBusConnection func(string, DBusConnectionFlags, uintptr, uintptr, **glib.Error) uintptr
741 769
742 // Synchronously connects and sets up a D-Bus client connection for770 // Synchronously connects and sets up a D-Bus client connection for
743 // exchanging D-Bus messages with an endpoint specified by @address771 // exchanging D-Bus messages with an endpoint specified by @address
@@ -756,18 +784,25 @@ var xNewForAddressSyncDBusConnection func(string, DBusConnectionFlags, uintptr,
756 //784 //
757 // If @observer is not %NULL it may be used to control the785 // If @observer is not %NULL it may be used to control the
758 // authentication process.786 // authentication process.
759-func NewForAddressSyncDBusConnection(AddressVar string, FlagsVar DBusConnectionFlags, ObserverVar *DBusAuthObserver, CancellableVar *Cancellable) *DBusConnection {787+func NewForAddressSyncDBusConnection(AddressVar string, FlagsVar DBusConnectionFlags, ObserverVar *DBusAuthObserver, CancellableVar *Cancellable) (*DBusConnection, error) {
760- NewForAddressSyncDBusConnectionPtr := xNewForAddressSyncDBusConnection(AddressVar, FlagsVar, ObserverVar.GoPointer(), CancellableVar.GoPointer())788+ var cls *DBusConnection
761- if NewForAddressSyncDBusConnectionPtr == 0 {789+ var cerr *glib.Error
762- return nil790+
791+ cret := xNewForAddressSyncDBusConnection(AddressVar, FlagsVar, ObserverVar.GoPointer(), CancellableVar.GoPointer(), &cerr)
792+
793+ if cret == 0 {
794+ return cls, cerr
795+ }
796+ cls = &DBusConnection{}
797+ cls.Ptr = cret
798+ if cerr == nil {
799+ return cls, nil
763 }800 }
801+ return cls, cerr
764 802
765- NewForAddressSyncDBusConnectionCls := &DBusConnection{}
766- NewForAddressSyncDBusConnectionCls.Ptr = NewForAddressSyncDBusConnectionPtr
767- return NewForAddressSyncDBusConnectionCls
768 }803 }
769 804
770-var xNewSyncDBusConnection func(uintptr, string, DBusConnectionFlags, uintptr, uintptr) uintptr805+var xNewSyncDBusConnection func(uintptr, string, DBusConnectionFlags, uintptr, uintptr, **glib.Error) uintptr
771 806
772 // Synchronously sets up a D-Bus connection for exchanging D-Bus messages807 // Synchronously sets up a D-Bus connection for exchanging D-Bus messages
773 // with the end represented by @stream.808 // with the end represented by @stream.
@@ -784,15 +819,22 @@ var xNewSyncDBusConnection func(uintptr, string, DBusConnectionFlags, uintptr, u
784 //819 //
785 // This is a synchronous failable constructor. See820 // This is a synchronous failable constructor. See
786 // g_dbus_connection_new() for the asynchronous version.821 // g_dbus_connection_new() for the asynchronous version.
787-func NewSyncDBusConnection(StreamVar *IOStream, GuidVar string, FlagsVar DBusConnectionFlags, ObserverVar *DBusAuthObserver, CancellableVar *Cancellable) *DBusConnection {822+func NewSyncDBusConnection(StreamVar *IOStream, GuidVar string, FlagsVar DBusConnectionFlags, ObserverVar *DBusAuthObserver, CancellableVar *Cancellable) (*DBusConnection, error) {
788- NewSyncDBusConnectionPtr := xNewSyncDBusConnection(StreamVar.GoPointer(), GuidVar, FlagsVar, ObserverVar.GoPointer(), CancellableVar.GoPointer())823+ var cls *DBusConnection
789- if NewSyncDBusConnectionPtr == 0 {824+ var cerr *glib.Error
790- return nil825+
826+ cret := xNewSyncDBusConnection(StreamVar.GoPointer(), GuidVar, FlagsVar, ObserverVar.GoPointer(), CancellableVar.GoPointer(), &cerr)
827+
828+ if cret == 0 {
829+ return cls, cerr
830+ }
831+ cls = &DBusConnection{}
832+ cls.Ptr = cret
833+ if cerr == nil {
834+ return cls, nil
791 }835 }
836+ return cls, cerr
792 837
793- NewSyncDBusConnectionCls := &DBusConnection{}
794- NewSyncDBusConnectionCls.Ptr = NewSyncDBusConnectionPtr
795- return NewSyncDBusConnectionCls
796 }838 }
797 839
798 var xDBusConnectionAddFilter func(uintptr, uintptr, uintptr, uintptr) uint840 var xDBusConnectionAddFilter func(uintptr, uintptr, uintptr, uintptr) uint
@@ -826,8 +868,8 @@ var xDBusConnectionAddFilter func(uintptr, uintptr, uintptr, uintptr) uint
826 // destroyed.)868 // destroyed.)
827 func (x *DBusConnection) AddFilter(FilterFunctionVar DBusMessageFilterFunction, UserDataVar uintptr, UserDataFreeFuncVar glib.DestroyNotify) uint {869 func (x *DBusConnection) AddFilter(FilterFunctionVar DBusMessageFilterFunction, UserDataVar uintptr, UserDataFreeFuncVar glib.DestroyNotify) uint {
828 870
829- return xDBusConnectionAddFilter(x.GoPointer(), purego.NewCallback(FilterFunctionVar), UserDataVar, purego.NewCallback(UserDataFreeFuncVar))871+ cret := xDBusConnectionAddFilter(x.GoPointer(), purego.NewCallback(FilterFunctionVar), UserDataVar, purego.NewCallback(UserDataFreeFuncVar))
830-872+ return cret
831 }873 }
832 874
833 var xDBusConnectionCall func(uintptr, string, string, string, string, *glib.Variant, *glib.VariantType, DBusCallFlags, int, uintptr, uintptr, uintptr)875 var xDBusConnectionCall func(uintptr, string, string, string, string, *glib.Variant, *glib.VariantType, DBusCallFlags, int, uintptr, uintptr, uintptr)
@@ -885,16 +927,21 @@ func (x *DBusConnection) Call(BusNameVar string, ObjectPathVar string, Interface
885 927
886 }928 }
887 929
888-var xDBusConnectionCallFinish func(uintptr, uintptr) *glib.Variant930+var xDBusConnectionCallFinish func(uintptr, uintptr, **glib.Error) *glib.Variant
889 931
890 // Finishes an operation started with g_dbus_connection_call().932 // Finishes an operation started with g_dbus_connection_call().
891-func (x *DBusConnection) CallFinish(ResVar AsyncResult) *glib.Variant {933+func (x *DBusConnection) CallFinish(ResVar AsyncResult) (*glib.Variant, error) {
934+ var cerr *glib.Error
892 935
893- return xDBusConnectionCallFinish(x.GoPointer(), ResVar.GoPointer())936+ cret := xDBusConnectionCallFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
937+ if cerr == nil {
938+ return cret, nil
939+ }
940+ return cret, cerr
894 941
895 }942 }
896 943
897-var xDBusConnectionCallSync func(uintptr, string, string, string, string, *glib.Variant, *glib.VariantType, DBusCallFlags, int, uintptr) *glib.Variant944+var xDBusConnectionCallSync func(uintptr, string, string, string, string, *glib.Variant, *glib.VariantType, DBusCallFlags, int, uintptr, **glib.Error) *glib.Variant
898 945
899 // Synchronously invokes the @method_name method on the946 // Synchronously invokes the @method_name method on the
900 // @interface_name D-Bus interface on the remote object at947 // @interface_name D-Bus interface on the remote object at
@@ -934,9 +981,14 @@ var xDBusConnectionCallSync func(uintptr, string, string, string, string, *glib.
934 // The calling thread is blocked until a reply is received. See981 // The calling thread is blocked until a reply is received. See
935 // g_dbus_connection_call() for the asynchronous version of982 // g_dbus_connection_call() for the asynchronous version of
936 // this method.983 // this method.
937-func (x *DBusConnection) CallSync(BusNameVar string, ObjectPathVar string, InterfaceNameVar string, MethodNameVar string, ParametersVar *glib.Variant, ReplyTypeVar *glib.VariantType, FlagsVar DBusCallFlags, TimeoutMsecVar int, CancellableVar *Cancellable) *glib.Variant {984+func (x *DBusConnection) CallSync(BusNameVar string, ObjectPathVar string, InterfaceNameVar string, MethodNameVar string, ParametersVar *glib.Variant, ReplyTypeVar *glib.VariantType, FlagsVar DBusCallFlags, TimeoutMsecVar int, CancellableVar *Cancellable) (*glib.Variant, error) {
985+ var cerr *glib.Error
938 986
939- return xDBusConnectionCallSync(x.GoPointer(), BusNameVar, ObjectPathVar, InterfaceNameVar, MethodNameVar, ParametersVar, ReplyTypeVar, FlagsVar, TimeoutMsecVar, CancellableVar.GoPointer())987+ cret := xDBusConnectionCallSync(x.GoPointer(), BusNameVar, ObjectPathVar, InterfaceNameVar, MethodNameVar, ParametersVar, ReplyTypeVar, FlagsVar, TimeoutMsecVar, CancellableVar.GoPointer(), &cerr)
988+ if cerr == nil {
989+ return cret, nil
990+ }
991+ return cret, cerr
940 992
941 }993 }
942 994
@@ -963,7 +1015,7 @@ func (x *DBusConnection) CallWithUnixFdList(BusNameVar string, ObjectPathVar str
963 1015
964 }1016 }
965 1017
966-var xDBusConnectionCallWithUnixFdListFinish func(uintptr, *uintptr, uintptr) *glib.Variant1018+var xDBusConnectionCallWithUnixFdListFinish func(uintptr, *uintptr, uintptr, **glib.Error) *glib.Variant
967 1019
968 // Finishes an operation started with g_dbus_connection_call_with_unix_fd_list().1020 // Finishes an operation started with g_dbus_connection_call_with_unix_fd_list().
969 //1021 //
@@ -977,22 +1029,32 @@ var xDBusConnectionCallWithUnixFdListFinish func(uintptr, *uintptr, uintptr) *gl
977 // please note that non-GDBus implementations of D-Bus can usually only1029 // please note that non-GDBus implementations of D-Bus can usually only
978 // access file descriptors if they are referenced in this way by a1030 // access file descriptors if they are referenced in this way by a
979 // value of type %G_VARIANT_TYPE_HANDLE in the body of the message.1031 // value of type %G_VARIANT_TYPE_HANDLE in the body of the message.
980-func (x *DBusConnection) CallWithUnixFdListFinish(OutFdListVar **UnixFDList, ResVar AsyncResult) *glib.Variant {1032+func (x *DBusConnection) CallWithUnixFdListFinish(OutFdListVar **UnixFDList, ResVar AsyncResult) (*glib.Variant, error) {
1033+ var cerr *glib.Error
981 1034
982- return xDBusConnectionCallWithUnixFdListFinish(x.GoPointer(), gobject.ConvertPtr(OutFdListVar), ResVar.GoPointer())1035+ cret := xDBusConnectionCallWithUnixFdListFinish(x.GoPointer(), gobject.ConvertPtr(OutFdListVar), ResVar.GoPointer(), &cerr)
1036+ if cerr == nil {
1037+ return cret, nil
1038+ }
1039+ return cret, cerr
983 1040
984 }1041 }
985 1042
986-var xDBusConnectionCallWithUnixFdListSync func(uintptr, string, string, string, string, *glib.Variant, *glib.VariantType, DBusCallFlags, int, uintptr, *uintptr, uintptr) *glib.Variant1043+var xDBusConnectionCallWithUnixFdListSync func(uintptr, string, string, string, string, *glib.Variant, *glib.VariantType, DBusCallFlags, int, uintptr, *uintptr, uintptr, **glib.Error) *glib.Variant
987 1044
988 // Like g_dbus_connection_call_sync() but also takes and returns #GUnixFDList objects.1045 // Like g_dbus_connection_call_sync() but also takes and returns #GUnixFDList objects.
989 // See g_dbus_connection_call_with_unix_fd_list() and1046 // See g_dbus_connection_call_with_unix_fd_list() and
990 // g_dbus_connection_call_with_unix_fd_list_finish() for more details.1047 // g_dbus_connection_call_with_unix_fd_list_finish() for more details.
991 //1048 //
992 // This method is only available on UNIX.1049 // This method is only available on UNIX.
993-func (x *DBusConnection) CallWithUnixFdListSync(BusNameVar string, ObjectPathVar string, InterfaceNameVar string, MethodNameVar string, ParametersVar *glib.Variant, ReplyTypeVar *glib.VariantType, FlagsVar DBusCallFlags, TimeoutMsecVar int, FdListVar *UnixFDList, OutFdListVar **UnixFDList, CancellableVar *Cancellable) *glib.Variant {1050+func (x *DBusConnection) CallWithUnixFdListSync(BusNameVar string, ObjectPathVar string, InterfaceNameVar string, MethodNameVar string, ParametersVar *glib.Variant, ReplyTypeVar *glib.VariantType, FlagsVar DBusCallFlags, TimeoutMsecVar int, FdListVar *UnixFDList, OutFdListVar **UnixFDList, CancellableVar *Cancellable) (*glib.Variant, error) {
1051+ var cerr *glib.Error
994 1052
995- return xDBusConnectionCallWithUnixFdListSync(x.GoPointer(), BusNameVar, ObjectPathVar, InterfaceNameVar, MethodNameVar, ParametersVar, ReplyTypeVar, FlagsVar, TimeoutMsecVar, FdListVar.GoPointer(), gobject.ConvertPtr(OutFdListVar), CancellableVar.GoPointer())1053+ cret := xDBusConnectionCallWithUnixFdListSync(x.GoPointer(), BusNameVar, ObjectPathVar, InterfaceNameVar, MethodNameVar, ParametersVar, ReplyTypeVar, FlagsVar, TimeoutMsecVar, FdListVar.GoPointer(), gobject.ConvertPtr(OutFdListVar), CancellableVar.GoPointer(), &cerr)
1054+ if cerr == nil {
1055+ return cret, nil
1056+ }
1057+ return cret, cerr
996 1058
997 }1059 }
998 1060
@@ -1028,28 +1090,38 @@ func (x *DBusConnection) Close(CancellableVar *Cancellable, CallbackVar AsyncRea
1028 1090
1029 }1091 }
1030 1092
1031-var xDBusConnectionCloseFinish func(uintptr, uintptr) bool1093+var xDBusConnectionCloseFinish func(uintptr, uintptr, **glib.Error) bool
1032 1094
1033 // Finishes an operation started with g_dbus_connection_close().1095 // Finishes an operation started with g_dbus_connection_close().
1034-func (x *DBusConnection) CloseFinish(ResVar AsyncResult) bool {1096+func (x *DBusConnection) CloseFinish(ResVar AsyncResult) (bool, error) {
1097+ var cerr *glib.Error
1035 1098
1036- return xDBusConnectionCloseFinish(x.GoPointer(), ResVar.GoPointer())1099+ cret := xDBusConnectionCloseFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
1100+ if cerr == nil {
1101+ return cret, nil
1102+ }
1103+ return cret, cerr
1037 1104
1038 }1105 }
1039 1106
1040-var xDBusConnectionCloseSync func(uintptr, uintptr) bool1107+var xDBusConnectionCloseSync func(uintptr, uintptr, **glib.Error) bool
1041 1108
1042 // Synchronously closes @connection. The calling thread is blocked1109 // Synchronously closes @connection. The calling thread is blocked
1043 // until this is done. See g_dbus_connection_close() for the1110 // until this is done. See g_dbus_connection_close() for the
1044 // asynchronous version of this method and more details about what it1111 // asynchronous version of this method and more details about what it
1045 // does.1112 // does.
1046-func (x *DBusConnection) CloseSync(CancellableVar *Cancellable) bool {1113+func (x *DBusConnection) CloseSync(CancellableVar *Cancellable) (bool, error) {
1114+ var cerr *glib.Error
1047 1115
1048- return xDBusConnectionCloseSync(x.GoPointer(), CancellableVar.GoPointer())1116+ cret := xDBusConnectionCloseSync(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
1117+ if cerr == nil {
1118+ return cret, nil
1119+ }
1120+ return cret, cerr
1049 1121
1050 }1122 }
1051 1123
1052-var xDBusConnectionEmitSignal func(uintptr, string, string, string, string, *glib.Variant) bool1124+var xDBusConnectionEmitSignal func(uintptr, string, string, string, string, *glib.Variant, **glib.Error) bool
1053 1125
1054 // Emits a signal.1126 // Emits a signal.
1055 //1127 //
@@ -1058,13 +1130,18 @@ var xDBusConnectionEmitSignal func(uintptr, string, string, string, string, *gli
1058 // This can only fail if @parameters is not compatible with the D-Bus protocol1130 // This can only fail if @parameters is not compatible with the D-Bus protocol
1059 // (%G_IO_ERROR_INVALID_ARGUMENT), or if @connection has been closed1131 // (%G_IO_ERROR_INVALID_ARGUMENT), or if @connection has been closed
1060 // (%G_IO_ERROR_CLOSED).1132 // (%G_IO_ERROR_CLOSED).
1061-func (x *DBusConnection) EmitSignal(DestinationBusNameVar string, ObjectPathVar string, InterfaceNameVar string, SignalNameVar string, ParametersVar *glib.Variant) bool {1133+func (x *DBusConnection) EmitSignal(DestinationBusNameVar string, ObjectPathVar string, InterfaceNameVar string, SignalNameVar string, ParametersVar *glib.Variant) (bool, error) {
1134+ var cerr *glib.Error
1062 1135
1063- return xDBusConnectionEmitSignal(x.GoPointer(), DestinationBusNameVar, ObjectPathVar, InterfaceNameVar, SignalNameVar, ParametersVar)1136+ cret := xDBusConnectionEmitSignal(x.GoPointer(), DestinationBusNameVar, ObjectPathVar, InterfaceNameVar, SignalNameVar, ParametersVar, &cerr)
1137+ if cerr == nil {
1138+ return cret, nil
1139+ }
1140+ return cret, cerr
1064 1141
1065 }1142 }
1066 1143
1067-var xDBusConnectionExportActionGroup func(uintptr, string, uintptr) uint1144+var xDBusConnectionExportActionGroup func(uintptr, string, uintptr, **glib.Error) uint
1068 1145
1069 // Exports @action_group on @connection at @object_path.1146 // Exports @action_group on @connection at @object_path.
1070 //1147 //
@@ -1087,13 +1164,18 @@ var xDBusConnectionExportActionGroup func(uintptr, string, uintptr) uint
1087 // rather likely to cause changes on the action group, this effectively1164 // rather likely to cause changes on the action group, this effectively
1088 // limits a given action group to being exported from only one main1165 // limits a given action group to being exported from only one main
1089 // context.1166 // context.
1090-func (x *DBusConnection) ExportActionGroup(ObjectPathVar string, ActionGroupVar ActionGroup) uint {1167+func (x *DBusConnection) ExportActionGroup(ObjectPathVar string, ActionGroupVar ActionGroup) (uint, error) {
1168+ var cerr *glib.Error
1091 1169
1092- return xDBusConnectionExportActionGroup(x.GoPointer(), ObjectPathVar, ActionGroupVar.GoPointer())1170+ cret := xDBusConnectionExportActionGroup(x.GoPointer(), ObjectPathVar, ActionGroupVar.GoPointer(), &cerr)
1171+ if cerr == nil {
1172+ return cret, nil
1173+ }
1174+ return cret, cerr
1093 1175
1094 }1176 }
1095 1177
1096-var xDBusConnectionExportMenuModel func(uintptr, string, uintptr) uint1178+var xDBusConnectionExportMenuModel func(uintptr, string, uintptr, **glib.Error) uint
1097 1179
1098 // Exports @menu on @connection at @object_path.1180 // Exports @menu on @connection at @object_path.
1099 //1181 //
@@ -1107,9 +1189,14 @@ var xDBusConnectionExportMenuModel func(uintptr, string, uintptr) uint
1107 // You can unexport the menu model using1189 // You can unexport the menu model using
1108 // g_dbus_connection_unexport_menu_model() with the return value of1190 // g_dbus_connection_unexport_menu_model() with the return value of
1109 // this function.1191 // this function.
1110-func (x *DBusConnection) ExportMenuModel(ObjectPathVar string, MenuVar *MenuModel) uint {1192+func (x *DBusConnection) ExportMenuModel(ObjectPathVar string, MenuVar *MenuModel) (uint, error) {
1193+ var cerr *glib.Error
1111 1194
1112- return xDBusConnectionExportMenuModel(x.GoPointer(), ObjectPathVar, MenuVar.GoPointer())1195+ cret := xDBusConnectionExportMenuModel(x.GoPointer(), ObjectPathVar, MenuVar.GoPointer(), &cerr)
1196+ if cerr == nil {
1197+ return cret, nil
1198+ }
1199+ return cret, cerr
1113 1200
1114 }1201 }
1115 1202
@@ -1135,24 +1222,34 @@ func (x *DBusConnection) Flush(CancellableVar *Cancellable, CallbackVar AsyncRea
1135 1222
1136 }1223 }
1137 1224
1138-var xDBusConnectionFlushFinish func(uintptr, uintptr) bool1225+var xDBusConnectionFlushFinish func(uintptr, uintptr, **glib.Error) bool
1139 1226
1140 // Finishes an operation started with g_dbus_connection_flush().1227 // Finishes an operation started with g_dbus_connection_flush().
1141-func (x *DBusConnection) FlushFinish(ResVar AsyncResult) bool {1228+func (x *DBusConnection) FlushFinish(ResVar AsyncResult) (bool, error) {
1229+ var cerr *glib.Error
1142 1230
1143- return xDBusConnectionFlushFinish(x.GoPointer(), ResVar.GoPointer())1231+ cret := xDBusConnectionFlushFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
1232+ if cerr == nil {
1233+ return cret, nil
1234+ }
1235+ return cret, cerr
1144 1236
1145 }1237 }
1146 1238
1147-var xDBusConnectionFlushSync func(uintptr, uintptr) bool1239+var xDBusConnectionFlushSync func(uintptr, uintptr, **glib.Error) bool
1148 1240
1149 // Synchronously flushes @connection. The calling thread is blocked1241 // Synchronously flushes @connection. The calling thread is blocked
1150 // until this is done. See g_dbus_connection_flush() for the1242 // until this is done. See g_dbus_connection_flush() for the
1151 // asynchronous version of this method and more details about what it1243 // asynchronous version of this method and more details about what it
1152 // does.1244 // does.
1153-func (x *DBusConnection) FlushSync(CancellableVar *Cancellable) bool {1245+func (x *DBusConnection) FlushSync(CancellableVar *Cancellable) (bool, error) {
1246+ var cerr *glib.Error
1154 1247
1155- return xDBusConnectionFlushSync(x.GoPointer(), CancellableVar.GoPointer())1248+ cret := xDBusConnectionFlushSync(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
1249+ if cerr == nil {
1250+ return cret, nil
1251+ }
1252+ return cret, cerr
1156 1253
1157 }1254 }
1158 1255
@@ -1161,8 +1258,8 @@ var xDBusConnectionGetCapabilities func(uintptr) DBusCapabilityFlags
1161 // Gets the capabilities negotiated with the remote peer1258 // Gets the capabilities negotiated with the remote peer
1162 func (x *DBusConnection) GetCapabilities() DBusCapabilityFlags {1259 func (x *DBusConnection) GetCapabilities() DBusCapabilityFlags {
1163 1260
1164- return xDBusConnectionGetCapabilities(x.GoPointer())1261+ cret := xDBusConnectionGetCapabilities(x.GoPointer())
1165-1262+ return cret
1166 }1263 }
1167 1264
1168 var xDBusConnectionGetExitOnClose func(uintptr) bool1265 var xDBusConnectionGetExitOnClose func(uintptr) bool
@@ -1172,8 +1269,8 @@ var xDBusConnectionGetExitOnClose func(uintptr) bool
1172 // #GDBusConnection:exit-on-close for more details.1269 // #GDBusConnection:exit-on-close for more details.
1173 func (x *DBusConnection) GetExitOnClose() bool {1270 func (x *DBusConnection) GetExitOnClose() bool {
1174 1271
1175- return xDBusConnectionGetExitOnClose(x.GoPointer())1272+ cret := xDBusConnectionGetExitOnClose(x.GoPointer())
1176-1273+ return cret
1177 }1274 }
1178 1275
1179 var xDBusConnectionGetFlags func(uintptr) DBusConnectionFlags1276 var xDBusConnectionGetFlags func(uintptr) DBusConnectionFlags
@@ -1181,8 +1278,8 @@ var xDBusConnectionGetFlags func(uintptr) DBusConnectionFlags
1181 // Gets the flags used to construct this connection1278 // Gets the flags used to construct this connection
1182 func (x *DBusConnection) GetFlags() DBusConnectionFlags {1279 func (x *DBusConnection) GetFlags() DBusConnectionFlags {
1183 1280
1184- return xDBusConnectionGetFlags(x.GoPointer())1281+ cret := xDBusConnectionGetFlags(x.GoPointer())
1185-1282+ return cret
1186 }1283 }
1187 1284
1188 var xDBusConnectionGetGuid func(uintptr) string1285 var xDBusConnectionGetGuid func(uintptr) string
@@ -1191,8 +1288,8 @@ var xDBusConnectionGetGuid func(uintptr) string
1191 // authenticating. See #GDBusConnection:guid for more details.1288 // authenticating. See #GDBusConnection:guid for more details.
1192 func (x *DBusConnection) GetGuid() string {1289 func (x *DBusConnection) GetGuid() string {
1193 1290
1194- return xDBusConnectionGetGuid(x.GoPointer())1291+ cret := xDBusConnectionGetGuid(x.GoPointer())
1195-1292+ return cret
1196 }1293 }
1197 1294
1198 var xDBusConnectionGetLastSerial func(uintptr) uint321295 var xDBusConnectionGetLastSerial func(uintptr) uint32
@@ -1204,8 +1301,8 @@ var xDBusConnectionGetLastSerial func(uintptr) uint32
1204 // g_dbus_connection_call() or g_dbus_proxy_call().1301 // g_dbus_connection_call() or g_dbus_proxy_call().
1205 func (x *DBusConnection) GetLastSerial() uint32 {1302 func (x *DBusConnection) GetLastSerial() uint32 {
1206 1303
1207- return xDBusConnectionGetLastSerial(x.GoPointer())1304+ cret := xDBusConnectionGetLastSerial(x.GoPointer())
1208-1305+ return cret
1209 }1306 }
1210 1307
1211 var xDBusConnectionGetPeerCredentials func(uintptr) uintptr1308 var xDBusConnectionGetPeerCredentials func(uintptr) uintptr
@@ -1220,18 +1317,17 @@ var xDBusConnectionGetPeerCredentials func(uintptr) uintptr
1220 // each application is a client. So this method will always return1317 // each application is a client. So this method will always return
1221 // %NULL for message bus clients.1318 // %NULL for message bus clients.
1222 func (x *DBusConnection) GetPeerCredentials() *Credentials {1319 func (x *DBusConnection) GetPeerCredentials() *Credentials {
1320+ var cls *Credentials
1223 1321
1224- GetPeerCredentialsPtr := xDBusConnectionGetPeerCredentials(x.GoPointer())1322+ cret := xDBusConnectionGetPeerCredentials(x.GoPointer())
1225- if GetPeerCredentialsPtr == 0 {
1226- return nil
1227- }
1228-
1229- gobject.IncreaseRef(GetPeerCredentialsPtr)
1230-
1231- GetPeerCredentialsCls := &Credentials{}
1232- GetPeerCredentialsCls.Ptr = GetPeerCredentialsPtr
1233- return GetPeerCredentialsCls
1234 1323
1324+ if cret == 0 {
1325+ return cls
1326+ }
1327+ gobject.IncreaseRef(cret)
1328+ cls = &Credentials{}
1329+ cls.Ptr = cret
1330+ return cls
1235 }1331 }
1236 1332
1237 var xDBusConnectionGetStream func(uintptr) uintptr1333 var xDBusConnectionGetStream func(uintptr) uintptr
@@ -1242,18 +1338,17 @@ var xDBusConnectionGetStream func(uintptr) uintptr
1242 // stream from a worker thread, so it is not safe to interact with1338 // stream from a worker thread, so it is not safe to interact with
1243 // the stream directly.1339 // the stream directly.
1244 func (x *DBusConnection) GetStream() *IOStream {1340 func (x *DBusConnection) GetStream() *IOStream {
1341+ var cls *IOStream
1245 1342
1246- GetStreamPtr := xDBusConnectionGetStream(x.GoPointer())1343+ cret := xDBusConnectionGetStream(x.GoPointer())
1247- if GetStreamPtr == 0 {
1248- return nil
1249- }
1250-
1251- gobject.IncreaseRef(GetStreamPtr)
1252-
1253- GetStreamCls := &IOStream{}
1254- GetStreamCls.Ptr = GetStreamPtr
1255- return GetStreamCls
1256 1344
1345+ if cret == 0 {
1346+ return cls
1347+ }
1348+ gobject.IncreaseRef(cret)
1349+ cls = &IOStream{}
1350+ cls.Ptr = cret
1351+ return cls
1257 }1352 }
1258 1353
1259 var xDBusConnectionGetUniqueName func(uintptr) string1354 var xDBusConnectionGetUniqueName func(uintptr) string
@@ -1263,8 +1358,8 @@ var xDBusConnectionGetUniqueName func(uintptr) string
1263 // message bus connection.1358 // message bus connection.
1264 func (x *DBusConnection) GetUniqueName() string {1359 func (x *DBusConnection) GetUniqueName() string {
1265 1360
1266- return xDBusConnectionGetUniqueName(x.GoPointer())1361+ cret := xDBusConnectionGetUniqueName(x.GoPointer())
1267-1362+ return cret
1268 }1363 }
1269 1364
1270 var xDBusConnectionIsClosed func(uintptr) bool1365 var xDBusConnectionIsClosed func(uintptr) bool
@@ -1272,11 +1367,11 @@ var xDBusConnectionIsClosed func(uintptr) bool
1272 // Gets whether @connection is closed.1367 // Gets whether @connection is closed.
1273 func (x *DBusConnection) IsClosed() bool {1368 func (x *DBusConnection) IsClosed() bool {
1274 1369
1275- return xDBusConnectionIsClosed(x.GoPointer())1370+ cret := xDBusConnectionIsClosed(x.GoPointer())
1276-1371+ return cret
1277 }1372 }
1278 1373
1279-var xDBusConnectionRegisterObject func(uintptr, string, *DBusInterfaceInfo, *DBusInterfaceVTable, uintptr, uintptr) uint1374+var xDBusConnectionRegisterObject func(uintptr, string, *DBusInterfaceInfo, *DBusInterfaceVTable, uintptr, uintptr, **glib.Error) uint
1280 1375
1281 // Registers callbacks for exported objects at @object_path with the1376 // Registers callbacks for exported objects at @object_path with the
1282 // D-Bus interface that is described in @interface_info.1377 // D-Bus interface that is described in @interface_info.
@@ -1316,23 +1411,33 @@ var xDBusConnectionRegisterObject func(uintptr, string, *DBusInterfaceInfo, *DBu
1316 // as the object is exported. Also note that @vtable will be copied.1411 // as the object is exported. Also note that @vtable will be copied.
1317 //1412 //
1318 // See this [server][gdbus-server] for an example of how to use this method.1413 // See this [server][gdbus-server] for an example of how to use this method.
1319-func (x *DBusConnection) RegisterObject(ObjectPathVar string, InterfaceInfoVar *DBusInterfaceInfo, VtableVar *DBusInterfaceVTable, UserDataVar uintptr, UserDataFreeFuncVar glib.DestroyNotify) uint {1414+func (x *DBusConnection) RegisterObject(ObjectPathVar string, InterfaceInfoVar *DBusInterfaceInfo, VtableVar *DBusInterfaceVTable, UserDataVar uintptr, UserDataFreeFuncVar glib.DestroyNotify) (uint, error) {
1415+ var cerr *glib.Error
1320 1416
1321- return xDBusConnectionRegisterObject(x.GoPointer(), ObjectPathVar, InterfaceInfoVar, VtableVar, UserDataVar, purego.NewCallback(UserDataFreeFuncVar))1417+ cret := xDBusConnectionRegisterObject(x.GoPointer(), ObjectPathVar, InterfaceInfoVar, VtableVar, UserDataVar, purego.NewCallback(UserDataFreeFuncVar), &cerr)
1418+ if cerr == nil {
1419+ return cret, nil
1420+ }
1421+ return cret, cerr
1322 1422
1323 }1423 }
1324 1424
1325-var xDBusConnectionRegisterObjectWithClosures func(uintptr, string, *DBusInterfaceInfo, *gobject.Closure, *gobject.Closure, *gobject.Closure) uint1425+var xDBusConnectionRegisterObjectWithClosures func(uintptr, string, *DBusInterfaceInfo, *gobject.Closure, *gobject.Closure, *gobject.Closure, **glib.Error) uint
1326 1426
1327 // Version of g_dbus_connection_register_object() using closures instead of a1427 // Version of g_dbus_connection_register_object() using closures instead of a
1328 // #GDBusInterfaceVTable for easier binding in other languages.1428 // #GDBusInterfaceVTable for easier binding in other languages.
1329-func (x *DBusConnection) RegisterObjectWithClosures(ObjectPathVar string, InterfaceInfoVar *DBusInterfaceInfo, MethodCallClosureVar *gobject.Closure, GetPropertyClosureVar *gobject.Closure, SetPropertyClosureVar *gobject.Closure) uint {1429+func (x *DBusConnection) RegisterObjectWithClosures(ObjectPathVar string, InterfaceInfoVar *DBusInterfaceInfo, MethodCallClosureVar *gobject.Closure, GetPropertyClosureVar *gobject.Closure, SetPropertyClosureVar *gobject.Closure) (uint, error) {
1430+ var cerr *glib.Error
1330 1431
1331- return xDBusConnectionRegisterObjectWithClosures(x.GoPointer(), ObjectPathVar, InterfaceInfoVar, MethodCallClosureVar, GetPropertyClosureVar, SetPropertyClosureVar)1432+ cret := xDBusConnectionRegisterObjectWithClosures(x.GoPointer(), ObjectPathVar, InterfaceInfoVar, MethodCallClosureVar, GetPropertyClosureVar, SetPropertyClosureVar, &cerr)
1433+ if cerr == nil {
1434+ return cret, nil
1435+ }
1436+ return cret, cerr
1332 1437
1333 }1438 }
1334 1439
1335-var xDBusConnectionRegisterSubtree func(uintptr, string, *DBusSubtreeVTable, DBusSubtreeFlags, uintptr, uintptr) uint1440+var xDBusConnectionRegisterSubtree func(uintptr, string, *DBusSubtreeVTable, DBusSubtreeFlags, uintptr, uintptr, **glib.Error) uint
1336 1441
1337 // Registers a whole subtree of dynamic objects.1442 // Registers a whole subtree of dynamic objects.
1338 //1443 //
@@ -1368,9 +1473,14 @@ var xDBusConnectionRegisterSubtree func(uintptr, string, *DBusSubtreeVTable, DBu
1368 //1473 //
1369 // See this [server][gdbus-subtree-server] for an example of how to use1474 // See this [server][gdbus-subtree-server] for an example of how to use
1370 // this method.1475 // this method.
1371-func (x *DBusConnection) RegisterSubtree(ObjectPathVar string, VtableVar *DBusSubtreeVTable, FlagsVar DBusSubtreeFlags, UserDataVar uintptr, UserDataFreeFuncVar glib.DestroyNotify) uint {1476+func (x *DBusConnection) RegisterSubtree(ObjectPathVar string, VtableVar *DBusSubtreeVTable, FlagsVar DBusSubtreeFlags, UserDataVar uintptr, UserDataFreeFuncVar glib.DestroyNotify) (uint, error) {
1477+ var cerr *glib.Error
1372 1478
1373- return xDBusConnectionRegisterSubtree(x.GoPointer(), ObjectPathVar, VtableVar, FlagsVar, UserDataVar, purego.NewCallback(UserDataFreeFuncVar))1479+ cret := xDBusConnectionRegisterSubtree(x.GoPointer(), ObjectPathVar, VtableVar, FlagsVar, UserDataVar, purego.NewCallback(UserDataFreeFuncVar), &cerr)
1480+ if cerr == nil {
1481+ return cret, nil
1482+ }
1483+ return cret, cerr
1374 1484
1375 }1485 }
1376 1486
@@ -1390,7 +1500,7 @@ func (x *DBusConnection) RemoveFilter(FilterIdVar uint) {
1390 1500
1391 }1501 }
1392 1502
1393-var xDBusConnectionSendMessage func(uintptr, uintptr, DBusSendMessageFlags, uint32) bool1503+var xDBusConnectionSendMessage func(uintptr, uintptr, DBusSendMessageFlags, uint32, **glib.Error) bool
1394 1504
1395 // Asynchronously sends @message to the peer represented by @connection.1505 // Asynchronously sends @message to the peer represented by @connection.
1396 //1506 //
@@ -1413,9 +1523,14 @@ var xDBusConnectionSendMessage func(uintptr, uintptr, DBusSendMessageFlags, uint
1413 //1523 //
1414 // Note that @message must be unlocked, unless @flags contain the1524 // Note that @message must be unlocked, unless @flags contain the
1415 // %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.1525 // %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
1416-func (x *DBusConnection) SendMessage(MessageVar *DBusMessage, FlagsVar DBusSendMessageFlags, OutSerialVar uint32) bool {1526+func (x *DBusConnection) SendMessage(MessageVar *DBusMessage, FlagsVar DBusSendMessageFlags, OutSerialVar uint32) (bool, error) {
1527+ var cerr *glib.Error
1417 1528
1418- return xDBusConnectionSendMessage(x.GoPointer(), MessageVar.GoPointer(), FlagsVar, OutSerialVar)1529+ cret := xDBusConnectionSendMessage(x.GoPointer(), MessageVar.GoPointer(), FlagsVar, OutSerialVar, &cerr)
1530+ if cerr == nil {
1531+ return cret, nil
1532+ }
1533+ return cret, cerr
1419 1534
1420 }1535 }
1421 1536
@@ -1456,7 +1571,7 @@ func (x *DBusConnection) SendMessageWithReply(MessageVar *DBusMessage, FlagsVar
1456 1571
1457 }1572 }
1458 1573
1459-var xDBusConnectionSendMessageWithReplyFinish func(uintptr, uintptr) uintptr1574+var xDBusConnectionSendMessageWithReplyFinish func(uintptr, uintptr, **glib.Error) uintptr
1460 1575
1461 // Finishes an operation started with g_dbus_connection_send_message_with_reply().1576 // Finishes an operation started with g_dbus_connection_send_message_with_reply().
1462 //1577 //
@@ -1468,20 +1583,25 @@ var xDBusConnectionSendMessageWithReplyFinish func(uintptr, uintptr) uintptr
1468 // See this [server][gdbus-server] and [client][gdbus-unix-fd-client]1583 // See this [server][gdbus-server] and [client][gdbus-unix-fd-client]
1469 // for an example of how to use this low-level API to send and receive1584 // for an example of how to use this low-level API to send and receive
1470 // UNIX file descriptors.1585 // UNIX file descriptors.
1471-func (x *DBusConnection) SendMessageWithReplyFinish(ResVar AsyncResult) *DBusMessage {1586+func (x *DBusConnection) SendMessageWithReplyFinish(ResVar AsyncResult) (*DBusMessage, error) {
1587+ var cls *DBusMessage
1588+ var cerr *glib.Error
1472 1589
1473- SendMessageWithReplyFinishPtr := xDBusConnectionSendMessageWithReplyFinish(x.GoPointer(), ResVar.GoPointer())1590+ cret := xDBusConnectionSendMessageWithReplyFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
1474- if SendMessageWithReplyFinishPtr == 0 {
1475- return nil
1476- }
1477 1591
1478- SendMessageWithReplyFinishCls := &DBusMessage{}1592+ if cret == 0 {
1479- SendMessageWithReplyFinishCls.Ptr = SendMessageWithReplyFinishPtr1593+ return cls, cerr
1480- return SendMessageWithReplyFinishCls1594+ }
1595+ cls = &DBusMessage{}
1596+ cls.Ptr = cret
1597+ if cerr == nil {
1598+ return cls, nil
1599+ }
1600+ return cls, cerr
1481 1601
1482 }1602 }
1483 1603
1484-var xDBusConnectionSendMessageWithReplySync func(uintptr, uintptr, DBusSendMessageFlags, int, uint32, uintptr) uintptr1604+var xDBusConnectionSendMessageWithReplySync func(uintptr, uintptr, DBusSendMessageFlags, int, uint32, uintptr, **glib.Error) uintptr
1485 1605
1486 // Synchronously sends @message to the peer represented by @connection1606 // Synchronously sends @message to the peer represented by @connection
1487 // and blocks the calling thread until a reply is received or the1607 // and blocks the calling thread until a reply is received or the
@@ -1513,16 +1633,21 @@ var xDBusConnectionSendMessageWithReplySync func(uintptr, uintptr, DBusSendMessa
1513 //1633 //
1514 // Note that @message must be unlocked, unless @flags contain the1634 // Note that @message must be unlocked, unless @flags contain the
1515 // %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.1635 // %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
1516-func (x *DBusConnection) SendMessageWithReplySync(MessageVar *DBusMessage, FlagsVar DBusSendMessageFlags, TimeoutMsecVar int, OutSerialVar uint32, CancellableVar *Cancellable) *DBusMessage {1636+func (x *DBusConnection) SendMessageWithReplySync(MessageVar *DBusMessage, FlagsVar DBusSendMessageFlags, TimeoutMsecVar int, OutSerialVar uint32, CancellableVar *Cancellable) (*DBusMessage, error) {
1637+ var cls *DBusMessage
1638+ var cerr *glib.Error
1517 1639
1518- SendMessageWithReplySyncPtr := xDBusConnectionSendMessageWithReplySync(x.GoPointer(), MessageVar.GoPointer(), FlagsVar, TimeoutMsecVar, OutSerialVar, CancellableVar.GoPointer())1640+ cret := xDBusConnectionSendMessageWithReplySync(x.GoPointer(), MessageVar.GoPointer(), FlagsVar, TimeoutMsecVar, OutSerialVar, CancellableVar.GoPointer(), &cerr)
1519- if SendMessageWithReplySyncPtr == 0 {
1520- return nil
1521- }
1522 1641
1523- SendMessageWithReplySyncCls := &DBusMessage{}1642+ if cret == 0 {
1524- SendMessageWithReplySyncCls.Ptr = SendMessageWithReplySyncPtr1643+ return cls, cerr
1525- return SendMessageWithReplySyncCls1644+ }
1645+ cls = &DBusMessage{}
1646+ cls.Ptr = cret
1647+ if cerr == nil {
1648+ return cls, nil
1649+ }
1650+ return cls, cerr
1526 1651
1527 }1652 }
1528 1653
@@ -1597,8 +1722,8 @@ var xDBusConnectionSignalSubscribe func(uintptr, string, string, string, string,
1597 // This function can never fail.1722 // This function can never fail.
1598 func (x *DBusConnection) SignalSubscribe(SenderVar string, InterfaceNameVar string, MemberVar string, ObjectPathVar string, Arg0Var string, FlagsVar DBusSignalFlags, CallbackVar DBusSignalCallback, UserDataVar uintptr, UserDataFreeFuncVar glib.DestroyNotify) uint {1723 func (x *DBusConnection) SignalSubscribe(SenderVar string, InterfaceNameVar string, MemberVar string, ObjectPathVar string, Arg0Var string, FlagsVar DBusSignalFlags, CallbackVar DBusSignalCallback, UserDataVar uintptr, UserDataFreeFuncVar glib.DestroyNotify) uint {
1599 1724
1600- return xDBusConnectionSignalSubscribe(x.GoPointer(), SenderVar, InterfaceNameVar, MemberVar, ObjectPathVar, Arg0Var, FlagsVar, purego.NewCallback(CallbackVar), UserDataVar, purego.NewCallback(UserDataFreeFuncVar))1725+ cret := xDBusConnectionSignalSubscribe(x.GoPointer(), SenderVar, InterfaceNameVar, MemberVar, ObjectPathVar, Arg0Var, FlagsVar, purego.NewCallback(CallbackVar), UserDataVar, purego.NewCallback(UserDataFreeFuncVar))
1601-1726+ return cret
1602 }1727 }
1603 1728
1604 var xDBusConnectionSignalUnsubscribe func(uintptr, uint)1729 var xDBusConnectionSignalUnsubscribe func(uintptr, uint)
@@ -1666,8 +1791,8 @@ var xDBusConnectionUnregisterObject func(uintptr, uint) bool
1666 // Unregisters an object.1791 // Unregisters an object.
1667 func (x *DBusConnection) UnregisterObject(RegistrationIdVar uint) bool {1792 func (x *DBusConnection) UnregisterObject(RegistrationIdVar uint) bool {
1668 1793
1669- return xDBusConnectionUnregisterObject(x.GoPointer(), RegistrationIdVar)1794+ cret := xDBusConnectionUnregisterObject(x.GoPointer(), RegistrationIdVar)
1670-1795+ return cret
1671 }1796 }
1672 1797
1673 var xDBusConnectionUnregisterSubtree func(uintptr, uint) bool1798 var xDBusConnectionUnregisterSubtree func(uintptr, uint) bool
@@ -1675,8 +1800,8 @@ var xDBusConnectionUnregisterSubtree func(uintptr, uint) bool
1675 // Unregisters a subtree.1800 // Unregisters a subtree.
1676 func (x *DBusConnection) UnregisterSubtree(RegistrationIdVar uint) bool {1801 func (x *DBusConnection) UnregisterSubtree(RegistrationIdVar uint) bool {
1677 1802
1678- return xDBusConnectionUnregisterSubtree(x.GoPointer(), RegistrationIdVar)1803+ cret := xDBusConnectionUnregisterSubtree(x.GoPointer(), RegistrationIdVar)
1679-1804+ return cret
1680 }1805 }
1681 1806
1682 func (c *DBusConnection) GoPointer() uintptr {1807 func (c *DBusConnection) GoPointer() uintptr {
@@ -1758,24 +1883,34 @@ func (x *DBusConnection) InitAsync(IoPriorityVar int, CancellableVar *Cancellabl
1758 1883
1759 // Finishes asynchronous initialization and returns the result.1884 // Finishes asynchronous initialization and returns the result.
1760 // See g_async_initable_init_async().1885 // See g_async_initable_init_async().
1761-func (x *DBusConnection) InitFinish(ResVar AsyncResult) bool {1886+func (x *DBusConnection) InitFinish(ResVar AsyncResult) (bool, error) {
1887+ var cerr *glib.Error
1762 1888
1763- return XGAsyncInitableInitFinish(x.GoPointer(), ResVar.GoPointer())1889+ cret := XGAsyncInitableInitFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
1890+ if cerr == nil {
1891+ return cret, nil
1892+ }
1893+ return cret, cerr
1764 1894
1765 }1895 }
1766 1896
1767 // Finishes the async construction for the various g_async_initable_new1897 // Finishes the async construction for the various g_async_initable_new
1768 // calls, returning the created object or %NULL on error.1898 // calls, returning the created object or %NULL on error.
1769-func (x *DBusConnection) NewFinish(ResVar AsyncResult) *gobject.Object {1899+func (x *DBusConnection) NewFinish(ResVar AsyncResult) (*gobject.Object, error) {
1900+ var cls *gobject.Object
1901+ var cerr *glib.Error
1770 1902
1771- NewFinishPtr := XGAsyncInitableNewFinish(x.GoPointer(), ResVar.GoPointer())1903+ cret := XGAsyncInitableNewFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
1772- if NewFinishPtr == 0 {
1773- return nil
1774- }
1775 1904
1776- NewFinishCls := &gobject.Object{}1905+ if cret == 0 {
1777- NewFinishCls.Ptr = NewFinishPtr1906+ return cls, cerr
1778- return NewFinishCls1907+ }
1908+ cls = &gobject.Object{}
1909+ cls.Ptr = cret
1910+ if cerr == nil {
1911+ return cls, nil
1912+ }
1913+ return cls, cerr
1779 1914
1780 }1915 }
1781 1916
@@ -1817,9 +1952,14 @@ func (x *DBusConnection) NewFinish(ResVar AsyncResult) *gobject.Object {
1817 // In this pattern, a caller would expect to be able to call g_initable_init()1952 // In this pattern, a caller would expect to be able to call g_initable_init()
1818 // on the result of g_object_new(), regardless of whether it is in fact a new1953 // on the result of g_object_new(), regardless of whether it is in fact a new
1819 // instance.1954 // instance.
1820-func (x *DBusConnection) Init(CancellableVar *Cancellable) bool {1955+func (x *DBusConnection) Init(CancellableVar *Cancellable) (bool, error) {
1956+ var cerr *glib.Error
1821 1957
1822- return XGInitableInit(x.GoPointer(), CancellableVar.GoPointer())1958+ cret := XGInitableInit(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
1959+ if cerr == nil {
1960+ return cret, nil
1961+ }
1962+ return cret, cerr
1823 1963
1824 }1964 }
1825 1965
@@ -1860,17 +2000,19 @@ var xNewDBusMessage func() uintptr
1860 2000
1861 // Creates a new empty #GDBusMessage.2001 // Creates a new empty #GDBusMessage.
1862 func NewDBusMessage() *DBusMessage {2002 func NewDBusMessage() *DBusMessage {
1863- NewDBusMessagePtr := xNewDBusMessage()2003+ var cls *DBusMessage
1864- if NewDBusMessagePtr == 0 {
1865- return nil
1866- }
1867 2004
1868- NewDBusMessageCls := &DBusMessage{}2005+ cret := xNewDBusMessage()
1869- NewDBusMessageCls.Ptr = NewDBusMessagePtr2006+
1870- return NewDBusMessageCls2007+ if cret == 0 {
2008+ return cls
2009+ }
2010+ cls = &DBusMessage{}
2011+ cls.Ptr = cret
2012+ return cls
1871 }2013 }
1872 2014
1873-var xNewFromBlobDBusMessage func(uintptr, uint, DBusCapabilityFlags) uintptr2015+var xNewFromBlobDBusMessage func(uintptr, uint, DBusCapabilityFlags, **glib.Error) uintptr
1874 2016
1875 // Creates a new #GDBusMessage from the data stored at @blob. The byte2017 // Creates a new #GDBusMessage from the data stored at @blob. The byte
1876 // order that the message was in can be retrieved using2018 // order that the message was in can be retrieved using
@@ -1878,43 +2020,54 @@ var xNewFromBlobDBusMessage func(uintptr, uint, DBusCapabilityFlags) uintptr
1878 //2020 //
1879 // If the @blob cannot be parsed, contains invalid fields, or contains invalid2021 // If the @blob cannot be parsed, contains invalid fields, or contains invalid
1880 // headers, %G_IO_ERROR_INVALID_ARGUMENT will be returned.2022 // headers, %G_IO_ERROR_INVALID_ARGUMENT will be returned.
1881-func NewFromBlobDBusMessage(BlobVar uintptr, BlobLenVar uint, CapabilitiesVar DBusCapabilityFlags) *DBusMessage {2023+func NewFromBlobDBusMessage(BlobVar uintptr, BlobLenVar uint, CapabilitiesVar DBusCapabilityFlags) (*DBusMessage, error) {
1882- NewFromBlobDBusMessagePtr := xNewFromBlobDBusMessage(BlobVar, BlobLenVar, CapabilitiesVar)2024+ var cls *DBusMessage
1883- if NewFromBlobDBusMessagePtr == 0 {2025+ var cerr *glib.Error
1884- return nil2026+
2027+ cret := xNewFromBlobDBusMessage(BlobVar, BlobLenVar, CapabilitiesVar, &cerr)
2028+
2029+ if cret == 0 {
2030+ return cls, cerr
1885 }2031 }
2032+ cls = &DBusMessage{}
2033+ cls.Ptr = cret
2034+ if cerr == nil {
2035+ return cls, nil
2036+ }
2037+ return cls, cerr
1886 2038
1887- NewFromBlobDBusMessageCls := &DBusMessage{}
1888- NewFromBlobDBusMessageCls.Ptr = NewFromBlobDBusMessagePtr
1889- return NewFromBlobDBusMessageCls
1890 }2039 }
1891 2040
1892 var xNewMethodCallDBusMessage func(string, string, string, string) uintptr2041 var xNewMethodCallDBusMessage func(string, string, string, string) uintptr
1893 2042
1894 // Creates a new #GDBusMessage for a method call.2043 // Creates a new #GDBusMessage for a method call.
1895 func NewMethodCallDBusMessage(NameVar string, PathVar string, InterfaceVar string, MethodVar string) *DBusMessage {2044 func NewMethodCallDBusMessage(NameVar string, PathVar string, InterfaceVar string, MethodVar string) *DBusMessage {
1896- NewMethodCallDBusMessagePtr := xNewMethodCallDBusMessage(NameVar, PathVar, InterfaceVar, MethodVar)2045+ var cls *DBusMessage
1897- if NewMethodCallDBusMessagePtr == 0 {
1898- return nil
1899- }
1900 2046
1901- NewMethodCallDBusMessageCls := &DBusMessage{}2047+ cret := xNewMethodCallDBusMessage(NameVar, PathVar, InterfaceVar, MethodVar)
1902- NewMethodCallDBusMessageCls.Ptr = NewMethodCallDBusMessagePtr2048+
1903- return NewMethodCallDBusMessageCls2049+ if cret == 0 {
2050+ return cls
2051+ }
2052+ cls = &DBusMessage{}
2053+ cls.Ptr = cret
2054+ return cls
1904 }2055 }
1905 2056
1906 var xNewSignalDBusMessage func(string, string, string) uintptr2057 var xNewSignalDBusMessage func(string, string, string) uintptr
1907 2058
1908 // Creates a new #GDBusMessage for a signal emission.2059 // Creates a new #GDBusMessage for a signal emission.
1909 func NewSignalDBusMessage(PathVar string, InterfaceVar string, SignalVar string) *DBusMessage {2060 func NewSignalDBusMessage(PathVar string, InterfaceVar string, SignalVar string) *DBusMessage {
1910- NewSignalDBusMessagePtr := xNewSignalDBusMessage(PathVar, InterfaceVar, SignalVar)2061+ var cls *DBusMessage
1911- if NewSignalDBusMessagePtr == 0 {2062+
1912- return nil2063+ cret := xNewSignalDBusMessage(PathVar, InterfaceVar, SignalVar)
1913- }
1914 2064
1915- NewSignalDBusMessageCls := &DBusMessage{}2065+ if cret == 0 {
1916- NewSignalDBusMessageCls.Ptr = NewSignalDBusMessagePtr2066+ return cls
1917- return NewSignalDBusMessageCls2067+ }
2068+ cls = &DBusMessage{}
2069+ cls.Ptr = cret
2070+ return cls
1918 }2071 }
1919 2072
1920 var xDBusMessageCopy func(uintptr) uintptr2073 var xDBusMessageCopy func(uintptr) uintptr
@@ -1925,16 +2078,21 @@ var xDBusMessageCopy func(uintptr) uintptr
1925 //2078 //
1926 // This operation can fail if e.g. @message contains file descriptors2079 // This operation can fail if e.g. @message contains file descriptors
1927 // and the per-process or system-wide open files limit is reached.2080 // and the per-process or system-wide open files limit is reached.
1928-func (x *DBusMessage) Copy() *DBusMessage {2081+func (x *DBusMessage) Copy() (*DBusMessage, error) {
2082+ var cls *DBusMessage
2083+ var cerr *glib.Error
1929 2084
1930- CopyPtr := xDBusMessageCopy(x.GoPointer())2085+ cret := xDBusMessageCopy(x.GoPointer())
1931- if CopyPtr == 0 {
1932- return nil
1933- }
1934 2086
1935- CopyCls := &DBusMessage{}2087+ if cret == 0 {
1936- CopyCls.Ptr = CopyPtr2088+ return cls, cerr
1937- return CopyCls2089+ }
2090+ cls = &DBusMessage{}
2091+ cls.Ptr = cret
2092+ if cerr == nil {
2093+ return cls, nil
2094+ }
2095+ return cls, cerr
1938 2096
1939 }2097 }
1940 2098
@@ -1943,8 +2101,8 @@ var xDBusMessageGetArg0 func(uintptr) string
1943 // Convenience to get the first item in the body of @message.2101 // Convenience to get the first item in the body of @message.
1944 func (x *DBusMessage) GetArg0() string {2102 func (x *DBusMessage) GetArg0() string {
1945 2103
1946- return xDBusMessageGetArg0(x.GoPointer())2104+ cret := xDBusMessageGetArg0(x.GoPointer())
1947-2105+ return cret
1948 }2106 }
1949 2107
1950 var xDBusMessageGetBody func(uintptr) *glib.Variant2108 var xDBusMessageGetBody func(uintptr) *glib.Variant
@@ -1952,8 +2110,8 @@ var xDBusMessageGetBody func(uintptr) *glib.Variant
1952 // Gets the body of a message.2110 // Gets the body of a message.
1953 func (x *DBusMessage) GetBody() *glib.Variant {2111 func (x *DBusMessage) GetBody() *glib.Variant {
1954 2112
1955- return xDBusMessageGetBody(x.GoPointer())2113+ cret := xDBusMessageGetBody(x.GoPointer())
1956-2114+ return cret
1957 }2115 }
1958 2116
1959 var xDBusMessageGetByteOrder func(uintptr) DBusMessageByteOrder2117 var xDBusMessageGetByteOrder func(uintptr) DBusMessageByteOrder
@@ -1961,8 +2119,8 @@ var xDBusMessageGetByteOrder func(uintptr) DBusMessageByteOrder
1961 // Gets the byte order of @message.2119 // Gets the byte order of @message.
1962 func (x *DBusMessage) GetByteOrder() DBusMessageByteOrder {2120 func (x *DBusMessage) GetByteOrder() DBusMessageByteOrder {
1963 2121
1964- return xDBusMessageGetByteOrder(x.GoPointer())2122+ cret := xDBusMessageGetByteOrder(x.GoPointer())
1965-2123+ return cret
1966 }2124 }
1967 2125
1968 var xDBusMessageGetDestination func(uintptr) string2126 var xDBusMessageGetDestination func(uintptr) string
@@ -1970,8 +2128,8 @@ var xDBusMessageGetDestination func(uintptr) string
1970 // Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field.2128 // Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field.
1971 func (x *DBusMessage) GetDestination() string {2129 func (x *DBusMessage) GetDestination() string {
1972 2130
1973- return xDBusMessageGetDestination(x.GoPointer())2131+ cret := xDBusMessageGetDestination(x.GoPointer())
1974-2132+ return cret
1975 }2133 }
1976 2134
1977 var xDBusMessageGetErrorName func(uintptr) string2135 var xDBusMessageGetErrorName func(uintptr) string
@@ -1979,8 +2137,8 @@ var xDBusMessageGetErrorName func(uintptr) string
1979 // Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field.2137 // Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field.
1980 func (x *DBusMessage) GetErrorName() string {2138 func (x *DBusMessage) GetErrorName() string {
1981 2139
1982- return xDBusMessageGetErrorName(x.GoPointer())2140+ cret := xDBusMessageGetErrorName(x.GoPointer())
1983-2141+ return cret
1984 }2142 }
1985 2143
1986 var xDBusMessageGetFlags func(uintptr) DBusMessageFlags2144 var xDBusMessageGetFlags func(uintptr) DBusMessageFlags
@@ -1988,8 +2146,8 @@ var xDBusMessageGetFlags func(uintptr) DBusMessageFlags
1988 // Gets the flags for @message.2146 // Gets the flags for @message.
1989 func (x *DBusMessage) GetFlags() DBusMessageFlags {2147 func (x *DBusMessage) GetFlags() DBusMessageFlags {
1990 2148
1991- return xDBusMessageGetFlags(x.GoPointer())2149+ cret := xDBusMessageGetFlags(x.GoPointer())
1992-2150+ return cret
1993 }2151 }
1994 2152
1995 var xDBusMessageGetHeader func(uintptr, DBusMessageHeaderField) *glib.Variant2153 var xDBusMessageGetHeader func(uintptr, DBusMessageHeaderField) *glib.Variant
@@ -2000,8 +2158,8 @@ var xDBusMessageGetHeader func(uintptr, DBusMessageHeaderField) *glib.Variant
2000 // matches what is expected.2158 // matches what is expected.
2001 func (x *DBusMessage) GetHeader(HeaderFieldVar DBusMessageHeaderField) *glib.Variant {2159 func (x *DBusMessage) GetHeader(HeaderFieldVar DBusMessageHeaderField) *glib.Variant {
2002 2160
2003- return xDBusMessageGetHeader(x.GoPointer(), HeaderFieldVar)2161+ cret := xDBusMessageGetHeader(x.GoPointer(), HeaderFieldVar)
2004-2162+ return cret
2005 }2163 }
2006 2164
2007 var xDBusMessageGetHeaderFields func(uintptr) uintptr2165 var xDBusMessageGetHeaderFields func(uintptr) uintptr
@@ -2009,8 +2167,8 @@ var xDBusMessageGetHeaderFields func(uintptr) uintptr
2009 // Gets an array of all header fields on @message that are set.2167 // Gets an array of all header fields on @message that are set.
2010 func (x *DBusMessage) GetHeaderFields() uintptr {2168 func (x *DBusMessage) GetHeaderFields() uintptr {
2011 2169
2012- return xDBusMessageGetHeaderFields(x.GoPointer())2170+ cret := xDBusMessageGetHeaderFields(x.GoPointer())
2013-2171+ return cret
2014 }2172 }
2015 2173
2016 var xDBusMessageGetInterface func(uintptr) string2174 var xDBusMessageGetInterface func(uintptr) string
@@ -2018,8 +2176,8 @@ var xDBusMessageGetInterface func(uintptr) string
2018 // Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field.2176 // Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field.
2019 func (x *DBusMessage) GetInterface() string {2177 func (x *DBusMessage) GetInterface() string {
2020 2178
2021- return xDBusMessageGetInterface(x.GoPointer())2179+ cret := xDBusMessageGetInterface(x.GoPointer())
2022-2180+ return cret
2023 }2181 }
2024 2182
2025 var xDBusMessageGetLocked func(uintptr) bool2183 var xDBusMessageGetLocked func(uintptr) bool
@@ -2029,8 +2187,8 @@ var xDBusMessageGetLocked func(uintptr) bool
2029 // on the #GDBusMessage:locked property.2187 // on the #GDBusMessage:locked property.
2030 func (x *DBusMessage) GetLocked() bool {2188 func (x *DBusMessage) GetLocked() bool {
2031 2189
2032- return xDBusMessageGetLocked(x.GoPointer())2190+ cret := xDBusMessageGetLocked(x.GoPointer())
2033-2191+ return cret
2034 }2192 }
2035 2193
2036 var xDBusMessageGetMember func(uintptr) string2194 var xDBusMessageGetMember func(uintptr) string
@@ -2038,8 +2196,8 @@ var xDBusMessageGetMember func(uintptr) string
2038 // Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field.2196 // Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field.
2039 func (x *DBusMessage) GetMember() string {2197 func (x *DBusMessage) GetMember() string {
2040 2198
2041- return xDBusMessageGetMember(x.GoPointer())2199+ cret := xDBusMessageGetMember(x.GoPointer())
2042-2200+ return cret
2043 }2201 }
2044 2202
2045 var xDBusMessageGetMessageType func(uintptr) DBusMessageType2203 var xDBusMessageGetMessageType func(uintptr) DBusMessageType
@@ -2047,8 +2205,8 @@ var xDBusMessageGetMessageType func(uintptr) DBusMessageType
2047 // Gets the type of @message.2205 // Gets the type of @message.
2048 func (x *DBusMessage) GetMessageType() DBusMessageType {2206 func (x *DBusMessage) GetMessageType() DBusMessageType {
2049 2207
2050- return xDBusMessageGetMessageType(x.GoPointer())2208+ cret := xDBusMessageGetMessageType(x.GoPointer())
2051-2209+ return cret
2052 }2210 }
2053 2211
2054 var xDBusMessageGetNumUnixFds func(uintptr) uint322212 var xDBusMessageGetNumUnixFds func(uintptr) uint32
@@ -2056,8 +2214,8 @@ var xDBusMessageGetNumUnixFds func(uintptr) uint32
2056 // Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field.2214 // Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field.
2057 func (x *DBusMessage) GetNumUnixFds() uint32 {2215 func (x *DBusMessage) GetNumUnixFds() uint32 {
2058 2216
2059- return xDBusMessageGetNumUnixFds(x.GoPointer())2217+ cret := xDBusMessageGetNumUnixFds(x.GoPointer())
2060-2218+ return cret
2061 }2219 }
2062 2220
2063 var xDBusMessageGetPath func(uintptr) string2221 var xDBusMessageGetPath func(uintptr) string
@@ -2065,8 +2223,8 @@ var xDBusMessageGetPath func(uintptr) string
2065 // Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field.2223 // Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field.
2066 func (x *DBusMessage) GetPath() string {2224 func (x *DBusMessage) GetPath() string {
2067 2225
2068- return xDBusMessageGetPath(x.GoPointer())2226+ cret := xDBusMessageGetPath(x.GoPointer())
2069-2227+ return cret
2070 }2228 }
2071 2229
2072 var xDBusMessageGetReplySerial func(uintptr) uint322230 var xDBusMessageGetReplySerial func(uintptr) uint32
@@ -2074,8 +2232,8 @@ var xDBusMessageGetReplySerial func(uintptr) uint32
2074 // Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field.2232 // Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field.
2075 func (x *DBusMessage) GetReplySerial() uint32 {2233 func (x *DBusMessage) GetReplySerial() uint32 {
2076 2234
2077- return xDBusMessageGetReplySerial(x.GoPointer())2235+ cret := xDBusMessageGetReplySerial(x.GoPointer())
2078-2236+ return cret
2079 }2237 }
2080 2238
2081 var xDBusMessageGetSender func(uintptr) string2239 var xDBusMessageGetSender func(uintptr) string
@@ -2083,8 +2241,8 @@ var xDBusMessageGetSender func(uintptr) string
2083 // Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field.2241 // Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field.
2084 func (x *DBusMessage) GetSender() string {2242 func (x *DBusMessage) GetSender() string {
2085 2243
2086- return xDBusMessageGetSender(x.GoPointer())2244+ cret := xDBusMessageGetSender(x.GoPointer())
2087-2245+ return cret
2088 }2246 }
2089 2247
2090 var xDBusMessageGetSerial func(uintptr) uint322248 var xDBusMessageGetSerial func(uintptr) uint32
@@ -2092,8 +2250,8 @@ var xDBusMessageGetSerial func(uintptr) uint32
2092 // Gets the serial for @message.2250 // Gets the serial for @message.
2093 func (x *DBusMessage) GetSerial() uint32 {2251 func (x *DBusMessage) GetSerial() uint32 {
2094 2252
2095- return xDBusMessageGetSerial(x.GoPointer())2253+ cret := xDBusMessageGetSerial(x.GoPointer())
2096-2254+ return cret
2097 }2255 }
2098 2256
2099 var xDBusMessageGetSignature func(uintptr) string2257 var xDBusMessageGetSignature func(uintptr) string
@@ -2103,8 +2261,8 @@ var xDBusMessageGetSignature func(uintptr) string
2103 // This will always be non-%NULL, but may be an empty string.2261 // This will always be non-%NULL, but may be an empty string.
2104 func (x *DBusMessage) GetSignature() string {2262 func (x *DBusMessage) GetSignature() string {
2105 2263
2106- return xDBusMessageGetSignature(x.GoPointer())2264+ cret := xDBusMessageGetSignature(x.GoPointer())
2107-2265+ return cret
2108 }2266 }
2109 2267
2110 var xDBusMessageGetUnixFdList func(uintptr) uintptr2268 var xDBusMessageGetUnixFdList func(uintptr) uintptr
@@ -2119,18 +2277,17 @@ var xDBusMessageGetUnixFdList func(uintptr) uintptr
2119 // to the file descriptor that can be accessed by2277 // to the file descriptor that can be accessed by
2120 // `g_unix_fd_list_get (list, 5, ...)`.2278 // `g_unix_fd_list_get (list, 5, ...)`.
2121 func (x *DBusMessage) GetUnixFdList() *UnixFDList {2279 func (x *DBusMessage) GetUnixFdList() *UnixFDList {
2280+ var cls *UnixFDList
2122 2281
2123- GetUnixFdListPtr := xDBusMessageGetUnixFdList(x.GoPointer())2282+ cret := xDBusMessageGetUnixFdList(x.GoPointer())
2124- if GetUnixFdListPtr == 0 {
2125- return nil
2126- }
2127-
2128- gobject.IncreaseRef(GetUnixFdListPtr)
2129-
2130- GetUnixFdListCls := &UnixFDList{}
2131- GetUnixFdListCls.Ptr = GetUnixFdListPtr
2132- return GetUnixFdListCls
2133 2283
2284+ if cret == 0 {
2285+ return cls
2286+ }
2287+ gobject.IncreaseRef(cret)
2288+ cls = &UnixFDList{}
2289+ cls.Ptr = cret
2290+ return cls
2134 }2291 }
2135 2292
2136 var xDBusMessageLock func(uintptr)2293 var xDBusMessageLock func(uintptr)
@@ -2146,64 +2303,64 @@ var xDBusMessageNewMethodError func(uintptr, string, string, ...interface{}) uin
2146 2303
2147 // Creates a new #GDBusMessage that is an error reply to @method_call_message.2304 // Creates a new #GDBusMessage that is an error reply to @method_call_message.
2148 func (x *DBusMessage) NewMethodError(ErrorNameVar string, ErrorMessageFormatVar string, varArgs ...interface{}) *DBusMessage {2305 func (x *DBusMessage) NewMethodError(ErrorNameVar string, ErrorMessageFormatVar string, varArgs ...interface{}) *DBusMessage {
2306+ var cls *DBusMessage
2149 2307
2150- NewMethodErrorPtr := xDBusMessageNewMethodError(x.GoPointer(), ErrorNameVar, ErrorMessageFormatVar, varArgs...)2308+ cret := xDBusMessageNewMethodError(x.GoPointer(), ErrorNameVar, ErrorMessageFormatVar, varArgs...)
2151- if NewMethodErrorPtr == 0 {
2152- return nil
2153- }
2154-
2155- NewMethodErrorCls := &DBusMessage{}
2156- NewMethodErrorCls.Ptr = NewMethodErrorPtr
2157- return NewMethodErrorCls
2158 2309
2310+ if cret == 0 {
2311+ return cls
2312+ }
2313+ cls = &DBusMessage{}
2314+ cls.Ptr = cret
2315+ return cls
2159 }2316 }
2160 2317
2161 var xDBusMessageNewMethodErrorLiteral func(uintptr, string, string) uintptr2318 var xDBusMessageNewMethodErrorLiteral func(uintptr, string, string) uintptr
2162 2319
2163 // Creates a new #GDBusMessage that is an error reply to @method_call_message.2320 // Creates a new #GDBusMessage that is an error reply to @method_call_message.
2164 func (x *DBusMessage) NewMethodErrorLiteral(ErrorNameVar string, ErrorMessageVar string) *DBusMessage {2321 func (x *DBusMessage) NewMethodErrorLiteral(ErrorNameVar string, ErrorMessageVar string) *DBusMessage {
2322+ var cls *DBusMessage
2165 2323
2166- NewMethodErrorLiteralPtr := xDBusMessageNewMethodErrorLiteral(x.GoPointer(), ErrorNameVar, ErrorMessageVar)2324+ cret := xDBusMessageNewMethodErrorLiteral(x.GoPointer(), ErrorNameVar, ErrorMessageVar)
2167- if NewMethodErrorLiteralPtr == 0 {
2168- return nil
2169- }
2170-
2171- NewMethodErrorLiteralCls := &DBusMessage{}
2172- NewMethodErrorLiteralCls.Ptr = NewMethodErrorLiteralPtr
2173- return NewMethodErrorLiteralCls
2174 2325
2326+ if cret == 0 {
2327+ return cls
2328+ }
2329+ cls = &DBusMessage{}
2330+ cls.Ptr = cret
2331+ return cls
2175 }2332 }
2176 2333
2177 var xDBusMessageNewMethodErrorValist func(uintptr, string, string, []interface{}) uintptr2334 var xDBusMessageNewMethodErrorValist func(uintptr, string, string, []interface{}) uintptr
2178 2335
2179 // Like g_dbus_message_new_method_error() but intended for language bindings.2336 // Like g_dbus_message_new_method_error() but intended for language bindings.
2180 func (x *DBusMessage) NewMethodErrorValist(ErrorNameVar string, ErrorMessageFormatVar string, VarArgsVar []interface{}) *DBusMessage {2337 func (x *DBusMessage) NewMethodErrorValist(ErrorNameVar string, ErrorMessageFormatVar string, VarArgsVar []interface{}) *DBusMessage {
2338+ var cls *DBusMessage
2181 2339
2182- NewMethodErrorValistPtr := xDBusMessageNewMethodErrorValist(x.GoPointer(), ErrorNameVar, ErrorMessageFormatVar, VarArgsVar)2340+ cret := xDBusMessageNewMethodErrorValist(x.GoPointer(), ErrorNameVar, ErrorMessageFormatVar, VarArgsVar)
2183- if NewMethodErrorValistPtr == 0 {
2184- return nil
2185- }
2186-
2187- NewMethodErrorValistCls := &DBusMessage{}
2188- NewMethodErrorValistCls.Ptr = NewMethodErrorValistPtr
2189- return NewMethodErrorValistCls
2190 2341
2342+ if cret == 0 {
2343+ return cls
2344+ }
2345+ cls = &DBusMessage{}
2346+ cls.Ptr = cret
2347+ return cls
2191 }2348 }
2192 2349
2193 var xDBusMessageNewMethodReply func(uintptr) uintptr2350 var xDBusMessageNewMethodReply func(uintptr) uintptr
2194 2351
2195 // Creates a new #GDBusMessage that is a reply to @method_call_message.2352 // Creates a new #GDBusMessage that is a reply to @method_call_message.
2196 func (x *DBusMessage) NewMethodReply() *DBusMessage {2353 func (x *DBusMessage) NewMethodReply() *DBusMessage {
2354+ var cls *DBusMessage
2197 2355
2198- NewMethodReplyPtr := xDBusMessageNewMethodReply(x.GoPointer())2356+ cret := xDBusMessageNewMethodReply(x.GoPointer())
2199- if NewMethodReplyPtr == 0 {
2200- return nil
2201- }
2202-
2203- NewMethodReplyCls := &DBusMessage{}
2204- NewMethodReplyCls.Ptr = NewMethodReplyPtr
2205- return NewMethodReplyCls
2206 2357
2358+ if cret == 0 {
2359+ return cls
2360+ }
2361+ cls = &DBusMessage{}
2362+ cls.Ptr = cret
2363+ return cls
2207 }2364 }
2208 2365
2209 var xDBusMessagePrint func(uintptr, uint) string2366 var xDBusMessagePrint func(uintptr, uint) string
@@ -2250,8 +2407,8 @@ var xDBusMessagePrint func(uintptr, uint) string
2250 // ]|2407 // ]|
2251 func (x *DBusMessage) Print(IndentVar uint) string {2408 func (x *DBusMessage) Print(IndentVar uint) string {
2252 2409
2253- return xDBusMessagePrint(x.GoPointer(), IndentVar)2410+ cret := xDBusMessagePrint(x.GoPointer(), IndentVar)
2254-2411+ return cret
2255 }2412 }
2256 2413
2257 var xDBusMessageSetBody func(uintptr, *glib.Variant)2414 var xDBusMessageSetBody func(uintptr, *glib.Variant)
@@ -2414,13 +2571,18 @@ func (x *DBusMessage) SetUnixFdList(FdListVar *UnixFDList) {
2414 2571
2415 }2572 }
2416 2573
2417-var xDBusMessageToBlob func(uintptr, uint, DBusCapabilityFlags) uintptr2574+var xDBusMessageToBlob func(uintptr, uint, DBusCapabilityFlags, **glib.Error) uintptr
2418 2575
2419 // Serializes @message to a blob. The byte order returned by2576 // Serializes @message to a blob. The byte order returned by
2420 // g_dbus_message_get_byte_order() will be used.2577 // g_dbus_message_get_byte_order() will be used.
2421-func (x *DBusMessage) ToBlob(OutSizeVar uint, CapabilitiesVar DBusCapabilityFlags) uintptr {2578+func (x *DBusMessage) ToBlob(OutSizeVar uint, CapabilitiesVar DBusCapabilityFlags) (uintptr, error) {
2579+ var cerr *glib.Error
2422 2580
2423- return xDBusMessageToBlob(x.GoPointer(), OutSizeVar, CapabilitiesVar)2581+ cret := xDBusMessageToBlob(x.GoPointer(), OutSizeVar, CapabilitiesVar, &cerr)
2582+ if cerr == nil {
2583+ return cret, nil
2584+ }
2585+ return cret, cerr
2424 2586
2425 }2587 }
2426 2588
@@ -2433,9 +2595,14 @@ var xDBusMessageToGerror func(uintptr) bool
2433 // using g_dbus_error_set_dbus_error() using the information in the2595 // using g_dbus_error_set_dbus_error() using the information in the
2434 // %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field of @message as2596 // %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field of @message as
2435 // well as the first string item in @message's body.2597 // well as the first string item in @message's body.
2436-func (x *DBusMessage) ToGerror() bool {2598+func (x *DBusMessage) ToGerror() (bool, error) {
2599+ var cerr *glib.Error
2437 2600
2438- return xDBusMessageToGerror(x.GoPointer())2601+ cret := xDBusMessageToGerror(x.GoPointer())
2602+ if cerr == nil {
2603+ return cret, nil
2604+ }
2605+ return cret, cerr
2439 2606
2440 }2607 }
2441 2608
@@ -2468,18 +2635,17 @@ var xDBusMethodInvocationGetConnection func(uintptr) uintptr
2468 2635
2469 // Gets the #GDBusConnection the method was invoked on.2636 // Gets the #GDBusConnection the method was invoked on.
2470 func (x *DBusMethodInvocation) GetConnection() *DBusConnection {2637 func (x *DBusMethodInvocation) GetConnection() *DBusConnection {
2638+ var cls *DBusConnection
2471 2639
2472- GetConnectionPtr := xDBusMethodInvocationGetConnection(x.GoPointer())2640+ cret := xDBusMethodInvocationGetConnection(x.GoPointer())
2473- if GetConnectionPtr == 0 {
2474- return nil
2475- }
2476-
2477- gobject.IncreaseRef(GetConnectionPtr)
2478-
2479- GetConnectionCls := &DBusConnection{}
2480- GetConnectionCls.Ptr = GetConnectionPtr
2481- return GetConnectionCls
2482 2641
2642+ if cret == 0 {
2643+ return cls
2644+ }
2645+ gobject.IncreaseRef(cret)
2646+ cls = &DBusConnection{}
2647+ cls.Ptr = cret
2648+ return cls
2483 }2649 }
2484 2650
2485 var xDBusMethodInvocationGetInterfaceName func(uintptr) string2651 var xDBusMethodInvocationGetInterfaceName func(uintptr) string
@@ -2492,8 +2658,8 @@ var xDBusMethodInvocationGetInterfaceName func(uintptr) string
2492 // #GDBusInterfaceVTable for more information.2658 // #GDBusInterfaceVTable for more information.
2493 func (x *DBusMethodInvocation) GetInterfaceName() string {2659 func (x *DBusMethodInvocation) GetInterfaceName() string {
2494 2660
2495- return xDBusMethodInvocationGetInterfaceName(x.GoPointer())2661+ cret := xDBusMethodInvocationGetInterfaceName(x.GoPointer())
2496-2662+ return cret
2497 }2663 }
2498 2664
2499 var xDBusMethodInvocationGetMessage func(uintptr) uintptr2665 var xDBusMethodInvocationGetMessage func(uintptr) uintptr
@@ -2507,18 +2673,17 @@ var xDBusMethodInvocationGetMessage func(uintptr) uintptr
2507 // for an example of how to use this low-level API to send and receive2673 // for an example of how to use this low-level API to send and receive
2508 // UNIX file descriptors.2674 // UNIX file descriptors.
2509 func (x *DBusMethodInvocation) GetMessage() *DBusMessage {2675 func (x *DBusMethodInvocation) GetMessage() *DBusMessage {
2676+ var cls *DBusMessage
2510 2677
2511- GetMessagePtr := xDBusMethodInvocationGetMessage(x.GoPointer())2678+ cret := xDBusMethodInvocationGetMessage(x.GoPointer())
2512- if GetMessagePtr == 0 {
2513- return nil
2514- }
2515-
2516- gobject.IncreaseRef(GetMessagePtr)
2517-
2518- GetMessageCls := &DBusMessage{}
2519- GetMessageCls.Ptr = GetMessagePtr
2520- return GetMessageCls
2521 2679
2680+ if cret == 0 {
2681+ return cls
2682+ }
2683+ gobject.IncreaseRef(cret)
2684+ cls = &DBusMessage{}
2685+ cls.Ptr = cret
2686+ return cls
2522 }2687 }
2523 2688
2524 var xDBusMethodInvocationGetMethodInfo func(uintptr) *DBusMethodInfo2689 var xDBusMethodInvocationGetMethodInfo func(uintptr) *DBusMethodInfo
@@ -2531,8 +2696,8 @@ var xDBusMethodInvocationGetMethodInfo func(uintptr) *DBusMethodInfo
2531 // #GDBusInterfaceVTable for more information.2696 // #GDBusInterfaceVTable for more information.
2532 func (x *DBusMethodInvocation) GetMethodInfo() *DBusMethodInfo {2697 func (x *DBusMethodInvocation) GetMethodInfo() *DBusMethodInfo {
2533 2698
2534- return xDBusMethodInvocationGetMethodInfo(x.GoPointer())2699+ cret := xDBusMethodInvocationGetMethodInfo(x.GoPointer())
2535-2700+ return cret
2536 }2701 }
2537 2702
2538 var xDBusMethodInvocationGetMethodName func(uintptr) string2703 var xDBusMethodInvocationGetMethodName func(uintptr) string
@@ -2540,8 +2705,8 @@ var xDBusMethodInvocationGetMethodName func(uintptr) string
2540 // Gets the name of the method that was invoked.2705 // Gets the name of the method that was invoked.
2541 func (x *DBusMethodInvocation) GetMethodName() string {2706 func (x *DBusMethodInvocation) GetMethodName() string {
2542 2707
2543- return xDBusMethodInvocationGetMethodName(x.GoPointer())2708+ cret := xDBusMethodInvocationGetMethodName(x.GoPointer())
2544-2709+ return cret
2545 }2710 }
2546 2711
2547 var xDBusMethodInvocationGetObjectPath func(uintptr) string2712 var xDBusMethodInvocationGetObjectPath func(uintptr) string
@@ -2549,8 +2714,8 @@ var xDBusMethodInvocationGetObjectPath func(uintptr) string
2549 // Gets the object path the method was invoked on.2714 // Gets the object path the method was invoked on.
2550 func (x *DBusMethodInvocation) GetObjectPath() string {2715 func (x *DBusMethodInvocation) GetObjectPath() string {
2551 2716
2552- return xDBusMethodInvocationGetObjectPath(x.GoPointer())2717+ cret := xDBusMethodInvocationGetObjectPath(x.GoPointer())
2553-2718+ return cret
2554 }2719 }
2555 2720
2556 var xDBusMethodInvocationGetParameters func(uintptr) *glib.Variant2721 var xDBusMethodInvocationGetParameters func(uintptr) *glib.Variant
@@ -2559,8 +2724,8 @@ var xDBusMethodInvocationGetParameters func(uintptr) *glib.Variant
2559 // parameters then this will return a GVariant with 0 children rather than NULL.2724 // parameters then this will return a GVariant with 0 children rather than NULL.
2560 func (x *DBusMethodInvocation) GetParameters() *glib.Variant {2725 func (x *DBusMethodInvocation) GetParameters() *glib.Variant {
2561 2726
2562- return xDBusMethodInvocationGetParameters(x.GoPointer())2727+ cret := xDBusMethodInvocationGetParameters(x.GoPointer())
2563-2728+ return cret
2564 }2729 }
2565 2730
2566 var xDBusMethodInvocationGetPropertyInfo func(uintptr) *DBusPropertyInfo2731 var xDBusMethodInvocationGetPropertyInfo func(uintptr) *DBusPropertyInfo
@@ -2578,8 +2743,8 @@ var xDBusMethodInvocationGetPropertyInfo func(uintptr) *DBusPropertyInfo
2578 // If the call was GetAll, %NULL will be returned.2743 // If the call was GetAll, %NULL will be returned.
2579 func (x *DBusMethodInvocation) GetPropertyInfo() *DBusPropertyInfo {2744 func (x *DBusMethodInvocation) GetPropertyInfo() *DBusPropertyInfo {
2580 2745
2581- return xDBusMethodInvocationGetPropertyInfo(x.GoPointer())2746+ cret := xDBusMethodInvocationGetPropertyInfo(x.GoPointer())
2582-2747+ return cret
2583 }2748 }
2584 2749
2585 var xDBusMethodInvocationGetSender func(uintptr) string2750 var xDBusMethodInvocationGetSender func(uintptr) string
@@ -2587,8 +2752,8 @@ var xDBusMethodInvocationGetSender func(uintptr) string
2587 // Gets the bus name that invoked the method.2752 // Gets the bus name that invoked the method.
2588 func (x *DBusMethodInvocation) GetSender() string {2753 func (x *DBusMethodInvocation) GetSender() string {
2589 2754
2590- return xDBusMethodInvocationGetSender(x.GoPointer())2755+ cret := xDBusMethodInvocationGetSender(x.GoPointer())
2591-2756+ return cret
2592 }2757 }
2593 2758
2594 var xDBusMethodInvocationGetUserData func(uintptr) uintptr2759 var xDBusMethodInvocationGetUserData func(uintptr) uintptr
@@ -2596,8 +2761,8 @@ var xDBusMethodInvocationGetUserData func(uintptr) uintptr
2596 // Gets the @user_data #gpointer passed to g_dbus_connection_register_object().2761 // Gets the @user_data #gpointer passed to g_dbus_connection_register_object().
2597 func (x *DBusMethodInvocation) GetUserData() uintptr {2762 func (x *DBusMethodInvocation) GetUserData() uintptr {
2598 2763
2599- return xDBusMethodInvocationGetUserData(x.GoPointer())2764+ cret := xDBusMethodInvocationGetUserData(x.GoPointer())
2600-2765+ return cret
2601 }2766 }
2602 2767
2603 var xDBusMethodInvocationReturnDbusError func(uintptr, string, string)2768 var xDBusMethodInvocationReturnDbusError func(uintptr, string, string)
@@ -2790,7 +2955,7 @@ func DBusServerNewFromInternalPtr(ptr uintptr) *DBusServer {
2790 return cls2955 return cls
2791 }2956 }
2792 2957
2793-var xNewSyncDBusServer func(string, DBusServerFlags, string, uintptr, uintptr) uintptr2958+var xNewSyncDBusServer func(string, DBusServerFlags, string, uintptr, uintptr, **glib.Error) uintptr
2794 2959
2795 // Creates a new D-Bus server that listens on the first address in2960 // Creates a new D-Bus server that listens on the first address in
2796 // @address that works.2961 // @address that works.
@@ -2812,15 +2977,22 @@ var xNewSyncDBusServer func(string, DBusServerFlags, string, uintptr, uintptr) u
2812 //2977 //
2813 // This is a synchronous failable constructor. There is currently no2978 // This is a synchronous failable constructor. There is currently no
2814 // asynchronous version.2979 // asynchronous version.
2815-func NewSyncDBusServer(AddressVar string, FlagsVar DBusServerFlags, GuidVar string, ObserverVar *DBusAuthObserver, CancellableVar *Cancellable) *DBusServer {2980+func NewSyncDBusServer(AddressVar string, FlagsVar DBusServerFlags, GuidVar string, ObserverVar *DBusAuthObserver, CancellableVar *Cancellable) (*DBusServer, error) {
2816- NewSyncDBusServerPtr := xNewSyncDBusServer(AddressVar, FlagsVar, GuidVar, ObserverVar.GoPointer(), CancellableVar.GoPointer())2981+ var cls *DBusServer
2817- if NewSyncDBusServerPtr == 0 {2982+ var cerr *glib.Error
2818- return nil2983+
2984+ cret := xNewSyncDBusServer(AddressVar, FlagsVar, GuidVar, ObserverVar.GoPointer(), CancellableVar.GoPointer(), &cerr)
2985+
2986+ if cret == 0 {
2987+ return cls, cerr
2819 }2988 }
2989+ cls = &DBusServer{}
2990+ cls.Ptr = cret
2991+ if cerr == nil {
2992+ return cls, nil
2993+ }
2994+ return cls, cerr
2820 2995
2821- NewSyncDBusServerCls := &DBusServer{}
2822- NewSyncDBusServerCls.Ptr = NewSyncDBusServerPtr
2823- return NewSyncDBusServerCls
2824 }2996 }
2825 2997
2826 var xDBusServerGetClientAddress func(uintptr) string2998 var xDBusServerGetClientAddress func(uintptr) string
@@ -2832,8 +3004,8 @@ var xDBusServerGetClientAddress func(uintptr) string
2832 // This is valid and non-empty if initializing the #GDBusServer succeeded.3004 // This is valid and non-empty if initializing the #GDBusServer succeeded.
2833 func (x *DBusServer) GetClientAddress() string {3005 func (x *DBusServer) GetClientAddress() string {
2834 3006
2835- return xDBusServerGetClientAddress(x.GoPointer())3007+ cret := xDBusServerGetClientAddress(x.GoPointer())
2836-3008+ return cret
2837 }3009 }
2838 3010
2839 var xDBusServerGetFlags func(uintptr) DBusServerFlags3011 var xDBusServerGetFlags func(uintptr) DBusServerFlags
@@ -2841,8 +3013,8 @@ var xDBusServerGetFlags func(uintptr) DBusServerFlags
2841 // Gets the flags for @server.3013 // Gets the flags for @server.
2842 func (x *DBusServer) GetFlags() DBusServerFlags {3014 func (x *DBusServer) GetFlags() DBusServerFlags {
2843 3015
2844- return xDBusServerGetFlags(x.GoPointer())3016+ cret := xDBusServerGetFlags(x.GoPointer())
2845-3017+ return cret
2846 }3018 }
2847 3019
2848 var xDBusServerGetGuid func(uintptr) string3020 var xDBusServerGetGuid func(uintptr) string
@@ -2850,8 +3022,8 @@ var xDBusServerGetGuid func(uintptr) string
2850 // Gets the GUID for @server, as provided to g_dbus_server_new_sync().3022 // Gets the GUID for @server, as provided to g_dbus_server_new_sync().
2851 func (x *DBusServer) GetGuid() string {3023 func (x *DBusServer) GetGuid() string {
2852 3024
2853- return xDBusServerGetGuid(x.GoPointer())3025+ cret := xDBusServerGetGuid(x.GoPointer())
2854-3026+ return cret
2855 }3027 }
2856 3028
2857 var xDBusServerIsActive func(uintptr) bool3029 var xDBusServerIsActive func(uintptr) bool
@@ -2859,8 +3031,8 @@ var xDBusServerIsActive func(uintptr) bool
2859 // Gets whether @server is active.3031 // Gets whether @server is active.
2860 func (x *DBusServer) IsActive() bool {3032 func (x *DBusServer) IsActive() bool {
2861 3033
2862- return xDBusServerIsActive(x.GoPointer())3034+ cret := xDBusServerIsActive(x.GoPointer())
2863-3035+ return cret
2864 }3036 }
2865 3037
2866 var xDBusServerStart func(uintptr)3038 var xDBusServerStart func(uintptr)
@@ -2959,9 +3131,14 @@ func (x *DBusServer) ConnectNewConnection(cb func(DBusServer, uintptr) bool) {
2959 // In this pattern, a caller would expect to be able to call g_initable_init()3131 // In this pattern, a caller would expect to be able to call g_initable_init()
2960 // on the result of g_object_new(), regardless of whether it is in fact a new3132 // on the result of g_object_new(), regardless of whether it is in fact a new
2961 // instance.3133 // instance.
2962-func (x *DBusServer) Init(CancellableVar *Cancellable) bool {3134+func (x *DBusServer) Init(CancellableVar *Cancellable) (bool, error) {
3135+ var cerr *glib.Error
2963 3136
2964- return XGInitableInit(x.GoPointer(), CancellableVar.GoPointer())3137+ cret := XGInitableInit(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
3138+ if cerr == nil {
3139+ return cret, nil
3140+ }
3141+ return cret, cerr
2965 3142
2966 }3143 }
2967 3144
@@ -2989,14 +3166,16 @@ var xNewMenu func() uintptr
2989 //3166 //
2990 // The new menu has no items.3167 // The new menu has no items.
2991 func NewMenu() *Menu {3168 func NewMenu() *Menu {
2992- NewMenuPtr := xNewMenu()3169+ var cls *Menu
2993- if NewMenuPtr == 0 {
2994- return nil
2995- }
2996 3170
2997- NewMenuCls := &Menu{}3171+ cret := xNewMenu()
2998- NewMenuCls.Ptr = NewMenuPtr3172+
2999- return NewMenuCls3173+ if cret == 0 {
3174+ return cls
3175+ }
3176+ cls = &Menu{}
3177+ cls.Ptr = cret
3178+ return cls
3000 }3179 }
3001 3180
3002 var xMenuAppend func(uintptr, string, string)3181 var xMenuAppend func(uintptr, string, string)
@@ -3219,14 +3398,16 @@ var xNewMenuItem func(string, string) uintptr
3219 // possibly the "target" attribute of the new item. See3398 // possibly the "target" attribute of the new item. See
3220 // g_menu_item_set_detailed_action() for more information.3399 // g_menu_item_set_detailed_action() for more information.
3221 func NewMenuItem(LabelVar string, DetailedActionVar string) *MenuItem {3400 func NewMenuItem(LabelVar string, DetailedActionVar string) *MenuItem {
3222- NewMenuItemPtr := xNewMenuItem(LabelVar, DetailedActionVar)3401+ var cls *MenuItem
3223- if NewMenuItemPtr == 0 {
3224- return nil
3225- }
3226 3402
3227- NewMenuItemCls := &MenuItem{}3403+ cret := xNewMenuItem(LabelVar, DetailedActionVar)
3228- NewMenuItemCls.Ptr = NewMenuItemPtr3404+
3229- return NewMenuItemCls3405+ if cret == 0 {
3406+ return cls
3407+ }
3408+ cls = &MenuItem{}
3409+ cls.Ptr = cret
3410+ return cls
3230 }3411 }
3231 3412
3232 var xNewFromModelMenuItem func(uintptr, int) uintptr3413 var xNewFromModelMenuItem func(uintptr, int) uintptr
@@ -3237,14 +3418,16 @@ var xNewFromModelMenuItem func(uintptr, int) uintptr
3237 // @item_index must be valid (ie: be sure to call3418 // @item_index must be valid (ie: be sure to call
3238 // g_menu_model_get_n_items() first).3419 // g_menu_model_get_n_items() first).
3239 func NewFromModelMenuItem(ModelVar *MenuModel, ItemIndexVar int) *MenuItem {3420 func NewFromModelMenuItem(ModelVar *MenuModel, ItemIndexVar int) *MenuItem {
3240- NewFromModelMenuItemPtr := xNewFromModelMenuItem(ModelVar.GoPointer(), ItemIndexVar)3421+ var cls *MenuItem
3241- if NewFromModelMenuItemPtr == 0 {3422+
3242- return nil3423+ cret := xNewFromModelMenuItem(ModelVar.GoPointer(), ItemIndexVar)
3243- }
3244 3424
3245- NewFromModelMenuItemCls := &MenuItem{}3425+ if cret == 0 {
3246- NewFromModelMenuItemCls.Ptr = NewFromModelMenuItemPtr3426+ return cls
3247- return NewFromModelMenuItemCls3427+ }
3428+ cls = &MenuItem{}
3429+ cls.Ptr = cret
3430+ return cls
3248 }3431 }
3249 3432
3250 var xNewSectionMenuItem func(string, uintptr) uintptr3433 var xNewSectionMenuItem func(string, uintptr) uintptr
@@ -3314,14 +3497,16 @@ var xNewSectionMenuItem func(string, uintptr) uintptr
3314 // </menu>3497 // </menu>
3315 // ]|3498 // ]|
3316 func NewSectionMenuItem(LabelVar string, SectionVar *MenuModel) *MenuItem {3499 func NewSectionMenuItem(LabelVar string, SectionVar *MenuModel) *MenuItem {
3317- NewSectionMenuItemPtr := xNewSectionMenuItem(LabelVar, SectionVar.GoPointer())3500+ var cls *MenuItem
3318- if NewSectionMenuItemPtr == 0 {3501+
3319- return nil3502+ cret := xNewSectionMenuItem(LabelVar, SectionVar.GoPointer())
3320- }
3321 3503
3322- NewSectionMenuItemCls := &MenuItem{}3504+ if cret == 0 {
3323- NewSectionMenuItemCls.Ptr = NewSectionMenuItemPtr3505+ return cls
3324- return NewSectionMenuItemCls3506+ }
3507+ cls = &MenuItem{}
3508+ cls.Ptr = cret
3509+ return cls
3325 }3510 }
3326 3511
3327 var xNewSubmenuMenuItem func(string, uintptr) uintptr3512 var xNewSubmenuMenuItem func(string, uintptr) uintptr
@@ -3331,14 +3516,16 @@ var xNewSubmenuMenuItem func(string, uintptr) uintptr
3331 // This is a convenience API around g_menu_item_new() and3516 // This is a convenience API around g_menu_item_new() and
3332 // g_menu_item_set_submenu().3517 // g_menu_item_set_submenu().
3333 func NewSubmenuMenuItem(LabelVar string, SubmenuVar *MenuModel) *MenuItem {3518 func NewSubmenuMenuItem(LabelVar string, SubmenuVar *MenuModel) *MenuItem {
3334- NewSubmenuMenuItemPtr := xNewSubmenuMenuItem(LabelVar, SubmenuVar.GoPointer())3519+ var cls *MenuItem
3335- if NewSubmenuMenuItemPtr == 0 {
3336- return nil
3337- }
3338 3520
3339- NewSubmenuMenuItemCls := &MenuItem{}3521+ cret := xNewSubmenuMenuItem(LabelVar, SubmenuVar.GoPointer())
3340- NewSubmenuMenuItemCls.Ptr = NewSubmenuMenuItemPtr3522+
3341- return NewSubmenuMenuItemCls3523+ if cret == 0 {
3524+ return cls
3525+ }
3526+ cls = &MenuItem{}
3527+ cls.Ptr = cret
3528+ return cls
3342 }3529 }
3343 3530
3344 var xMenuItemGetAttribute func(uintptr, string, string, ...interface{}) bool3531 var xMenuItemGetAttribute func(uintptr, string, string, ...interface{}) bool
@@ -3354,8 +3541,8 @@ var xMenuItemGetAttribute func(uintptr, string, string, ...interface{}) bool
3354 // returned.3541 // returned.
3355 func (x *MenuItem) GetAttribute(AttributeVar string, FormatStringVar string, varArgs ...interface{}) bool {3542 func (x *MenuItem) GetAttribute(AttributeVar string, FormatStringVar string, varArgs ...interface{}) bool {
3356 3543
3357- return xMenuItemGetAttribute(x.GoPointer(), AttributeVar, FormatStringVar, varArgs...)3544+ cret := xMenuItemGetAttribute(x.GoPointer(), AttributeVar, FormatStringVar, varArgs...)
3358-3545+ return cret
3359 }3546 }
3360 3547
3361 var xMenuItemGetAttributeValue func(uintptr, string, *glib.VariantType) *glib.Variant3548 var xMenuItemGetAttributeValue func(uintptr, string, *glib.VariantType) *glib.Variant
@@ -3367,24 +3554,24 @@ var xMenuItemGetAttributeValue func(uintptr, string, *glib.VariantType) *glib.Va
3367 // simply does not exist.3554 // simply does not exist.
3368 func (x *MenuItem) GetAttributeValue(AttributeVar string, ExpectedTypeVar *glib.VariantType) *glib.Variant {3555 func (x *MenuItem) GetAttributeValue(AttributeVar string, ExpectedTypeVar *glib.VariantType) *glib.Variant {
3369 3556
3370- return xMenuItemGetAttributeValue(x.GoPointer(), AttributeVar, ExpectedTypeVar)3557+ cret := xMenuItemGetAttributeValue(x.GoPointer(), AttributeVar, ExpectedTypeVar)
3371-3558+ return cret
3372 }3559 }
3373 3560
3374 var xMenuItemGetLink func(uintptr, string) uintptr3561 var xMenuItemGetLink func(uintptr, string) uintptr
3375 3562
3376 // Queries the named @link on @menu_item.3563 // Queries the named @link on @menu_item.
3377 func (x *MenuItem) GetLink(LinkVar string) *MenuModel {3564 func (x *MenuItem) GetLink(LinkVar string) *MenuModel {
3565+ var cls *MenuModel
3378 3566
3379- GetLinkPtr := xMenuItemGetLink(x.GoPointer(), LinkVar)3567+ cret := xMenuItemGetLink(x.GoPointer(), LinkVar)
3380- if GetLinkPtr == 0 {
3381- return nil
3382- }
3383-
3384- GetLinkCls := &MenuModel{}
3385- GetLinkCls.Ptr = GetLinkPtr
3386- return GetLinkCls
3387 3568
3569+ if cret == 0 {
3570+ return cls
3571+ }
3572+ cls = &MenuModel{}
3573+ cls.Ptr = cret
3574+ return cls
3388 }3575 }
3389 3576
3390 var xMenuItemSetActionAndTarget func(uintptr, string, string, ...interface{})3577 var xMenuItemSetActionAndTarget func(uintptr, string, string, ...interface{})
@@ -3682,14 +3869,16 @@ var xNewNotification func(string) uintptr
3682 // any properties after this call will not have any effect until3869 // any properties after this call will not have any effect until
3683 // resending @notification.3870 // resending @notification.
3684 func NewNotification(TitleVar string) *Notification {3871 func NewNotification(TitleVar string) *Notification {
3685- NewNotificationPtr := xNewNotification(TitleVar)3872+ var cls *Notification
3686- if NewNotificationPtr == 0 {3873+
3687- return nil3874+ cret := xNewNotification(TitleVar)
3688- }
3689 3875
3690- NewNotificationCls := &Notification{}3876+ if cret == 0 {
3691- NewNotificationCls.Ptr = NewNotificationPtr3877+ return cls
3692- return NewNotificationCls3878+ }
3879+ cls = &Notification{}
3880+ cls.Ptr = cret
3881+ return cls
3693 }3882 }
3694 3883
3695 var xNotificationAddButton func(uintptr, string, string)3884 var xNotificationAddButton func(uintptr, string, string)
@@ -3931,14 +4120,16 @@ var xNewPropertyAction func(string, uintptr, string) uintptr
3931 // This function takes a reference on @object and doesn't release it4120 // This function takes a reference on @object and doesn't release it
3932 // until the action is destroyed.4121 // until the action is destroyed.
3933 func NewPropertyAction(NameVar string, ObjectVar *gobject.Object, PropertyNameVar string) *PropertyAction {4122 func NewPropertyAction(NameVar string, ObjectVar *gobject.Object, PropertyNameVar string) *PropertyAction {
3934- NewPropertyActionPtr := xNewPropertyAction(NameVar, ObjectVar.GoPointer(), PropertyNameVar)4123+ var cls *PropertyAction
3935- if NewPropertyActionPtr == 0 {
3936- return nil
3937- }
3938 4124
3939- NewPropertyActionCls := &PropertyAction{}4125+ cret := xNewPropertyAction(NameVar, ObjectVar.GoPointer(), PropertyNameVar)
3940- NewPropertyActionCls.Ptr = NewPropertyActionPtr4126+
3941- return NewPropertyActionCls4127+ if cret == 0 {
4128+ return cls
4129+ }
4130+ cls = &PropertyAction{}
4131+ cls.Ptr = cret
4132+ return cls
3942 }4133 }
3943 4134
3944 func (c *PropertyAction) GoPointer() uintptr {4135 func (c *PropertyAction) GoPointer() uintptr {
@@ -3984,15 +4175,15 @@ func (x *PropertyAction) ChangeState(ValueVar *glib.Variant) {
3984 // have its state changed from outside callers.4175 // have its state changed from outside callers.
3985 func (x *PropertyAction) GetEnabled() bool {4176 func (x *PropertyAction) GetEnabled() bool {
3986 4177
3987- return XGActionGetEnabled(x.GoPointer())4178+ cret := XGActionGetEnabled(x.GoPointer())
3988-4179+ return cret
3989 }4180 }
3990 4181
3991 // Queries the name of @action.4182 // Queries the name of @action.
3992 func (x *PropertyAction) GetName() string {4183 func (x *PropertyAction) GetName() string {
3993 4184
3994- return XGActionGetName(x.GoPointer())4185+ cret := XGActionGetName(x.GoPointer())
3995-4186+ return cret
3996 }4187 }
3997 4188
3998 // Queries the type of the parameter that must be given when activating4189 // Queries the type of the parameter that must be given when activating
@@ -4005,8 +4196,8 @@ func (x *PropertyAction) GetName() string {
4005 // #GVariant, but %NULL instead.4196 // #GVariant, but %NULL instead.
4006 func (x *PropertyAction) GetParameterType() *glib.VariantType {4197 func (x *PropertyAction) GetParameterType() *glib.VariantType {
4007 4198
4008- return XGActionGetParameterType(x.GoPointer())4199+ cret := XGActionGetParameterType(x.GoPointer())
4009-4200+ return cret
4010 }4201 }
4011 4202
4012 // Queries the current state of @action.4203 // Queries the current state of @action.
@@ -4019,8 +4210,8 @@ func (x *PropertyAction) GetParameterType() *glib.VariantType {
4019 // g_variant_unref() when it is no longer required.4210 // g_variant_unref() when it is no longer required.
4020 func (x *PropertyAction) GetState() *glib.Variant {4211 func (x *PropertyAction) GetState() *glib.Variant {
4021 4212
4022- return XGActionGetState(x.GoPointer())4213+ cret := XGActionGetState(x.GoPointer())
4023-4214+ return cret
4024 }4215 }
4025 4216
4026 // Requests a hint about the valid range of values for the state of4217 // Requests a hint about the valid range of values for the state of
@@ -4043,8 +4234,8 @@ func (x *PropertyAction) GetState() *glib.Variant {
4043 // g_variant_unref() when it is no longer required.4234 // g_variant_unref() when it is no longer required.
4044 func (x *PropertyAction) GetStateHint() *glib.Variant {4235 func (x *PropertyAction) GetStateHint() *glib.Variant {
4045 4236
4046- return XGActionGetStateHint(x.GoPointer())4237+ cret := XGActionGetStateHint(x.GoPointer())
4047-4238+ return cret
4048 }4239 }
4049 4240
4050 // Queries the type of the state of @action.4241 // Queries the type of the state of @action.
@@ -4061,8 +4252,8 @@ func (x *PropertyAction) GetStateHint() *glib.Variant {
4061 // will return %NULL and you must not call g_action_change_state().4252 // will return %NULL and you must not call g_action_change_state().
4062 func (x *PropertyAction) GetStateType() *glib.VariantType {4253 func (x *PropertyAction) GetStateType() *glib.VariantType {
4063 4254
4064- return XGActionGetStateType(x.GoPointer())4255+ cret := XGActionGetStateType(x.GoPointer())
4065-4256+ return cret
4066 }4257 }
4067 4258
4068 // A #GSimpleAction is the obvious simple implementation of the #GAction4259 // A #GSimpleAction is the obvious simple implementation of the #GAction
@@ -4087,14 +4278,16 @@ var xNewSimpleAction func(string, *glib.VariantType) uintptr
4087 // The created action is stateless. See g_simple_action_new_stateful() to create4278 // The created action is stateless. See g_simple_action_new_stateful() to create
4088 // an action that has state.4279 // an action that has state.
4089 func NewSimpleAction(NameVar string, ParameterTypeVar *glib.VariantType) *SimpleAction {4280 func NewSimpleAction(NameVar string, ParameterTypeVar *glib.VariantType) *SimpleAction {
4090- NewSimpleActionPtr := xNewSimpleAction(NameVar, ParameterTypeVar)4281+ var cls *SimpleAction
4091- if NewSimpleActionPtr == 0 {4282+
4092- return nil4283+ cret := xNewSimpleAction(NameVar, ParameterTypeVar)
4093- }
4094 4284
4095- NewSimpleActionCls := &SimpleAction{}4285+ if cret == 0 {
4096- NewSimpleActionCls.Ptr = NewSimpleActionPtr4286+ return cls
4097- return NewSimpleActionCls4287+ }
4288+ cls = &SimpleAction{}
4289+ cls.Ptr = cret
4290+ return cls
4098 }4291 }
4099 4292
4100 var xNewStatefulSimpleAction func(string, *glib.VariantType, *glib.Variant) uintptr4293 var xNewStatefulSimpleAction func(string, *glib.VariantType, *glib.Variant) uintptr
@@ -4106,14 +4299,16 @@ var xNewStatefulSimpleAction func(string, *glib.VariantType, *glib.Variant) uint
4106 //4299 //
4107 // If the @state #GVariant is floating, it is consumed.4300 // If the @state #GVariant is floating, it is consumed.
4108 func NewStatefulSimpleAction(NameVar string, ParameterTypeVar *glib.VariantType, StateVar *glib.Variant) *SimpleAction {4301 func NewStatefulSimpleAction(NameVar string, ParameterTypeVar *glib.VariantType, StateVar *glib.Variant) *SimpleAction {
4109- NewStatefulSimpleActionPtr := xNewStatefulSimpleAction(NameVar, ParameterTypeVar, StateVar)4302+ var cls *SimpleAction
4110- if NewStatefulSimpleActionPtr == 0 {4303+
4111- return nil4304+ cret := xNewStatefulSimpleAction(NameVar, ParameterTypeVar, StateVar)
4112- }
4113 4305
4114- NewStatefulSimpleActionCls := &SimpleAction{}4306+ if cret == 0 {
4115- NewStatefulSimpleActionCls.Ptr = NewStatefulSimpleActionPtr4307+ return cls
4116- return NewStatefulSimpleActionCls4308+ }
4309+ cls = &SimpleAction{}
4310+ cls.Ptr = cret
4311+ return cls
4117 }4312 }
4118 4313
4119 var xSimpleActionSetEnabled func(uintptr, bool)4314 var xSimpleActionSetEnabled func(uintptr, bool)
@@ -4275,15 +4470,15 @@ func (x *SimpleAction) ChangeState(ValueVar *glib.Variant) {
4275 // have its state changed from outside callers.4470 // have its state changed from outside callers.
4276 func (x *SimpleAction) GetEnabled() bool {4471 func (x *SimpleAction) GetEnabled() bool {
4277 4472
4278- return XGActionGetEnabled(x.GoPointer())4473+ cret := XGActionGetEnabled(x.GoPointer())
4279-4474+ return cret
4280 }4475 }
4281 4476
4282 // Queries the name of @action.4477 // Queries the name of @action.
4283 func (x *SimpleAction) GetName() string {4478 func (x *SimpleAction) GetName() string {
4284 4479
4285- return XGActionGetName(x.GoPointer())4480+ cret := XGActionGetName(x.GoPointer())
4286-4481+ return cret
4287 }4482 }
4288 4483
4289 // Queries the type of the parameter that must be given when activating4484 // Queries the type of the parameter that must be given when activating
@@ -4296,8 +4491,8 @@ func (x *SimpleAction) GetName() string {
4296 // #GVariant, but %NULL instead.4491 // #GVariant, but %NULL instead.
4297 func (x *SimpleAction) GetParameterType() *glib.VariantType {4492 func (x *SimpleAction) GetParameterType() *glib.VariantType {
4298 4493
4299- return XGActionGetParameterType(x.GoPointer())4494+ cret := XGActionGetParameterType(x.GoPointer())
4300-4495+ return cret
4301 }4496 }
4302 4497
4303 // Queries the current state of @action.4498 // Queries the current state of @action.
@@ -4310,8 +4505,8 @@ func (x *SimpleAction) GetParameterType() *glib.VariantType {
4310 // g_variant_unref() when it is no longer required.4505 // g_variant_unref() when it is no longer required.
4311 func (x *SimpleAction) GetState() *glib.Variant {4506 func (x *SimpleAction) GetState() *glib.Variant {
4312 4507
4313- return XGActionGetState(x.GoPointer())4508+ cret := XGActionGetState(x.GoPointer())
4314-4509+ return cret
4315 }4510 }
4316 4511
4317 // Requests a hint about the valid range of values for the state of4512 // Requests a hint about the valid range of values for the state of
@@ -4334,8 +4529,8 @@ func (x *SimpleAction) GetState() *glib.Variant {
4334 // g_variant_unref() when it is no longer required.4529 // g_variant_unref() when it is no longer required.
4335 func (x *SimpleAction) GetStateHint() *glib.Variant {4530 func (x *SimpleAction) GetStateHint() *glib.Variant {
4336 4531
4337- return XGActionGetStateHint(x.GoPointer())4532+ cret := XGActionGetStateHint(x.GoPointer())
4338-4533+ return cret
4339 }4534 }
4340 4535
4341 // Queries the type of the state of @action.4536 // Queries the type of the state of @action.
@@ -4352,8 +4547,8 @@ func (x *SimpleAction) GetStateHint() *glib.Variant {
4352 // will return %NULL and you must not call g_action_change_state().4547 // will return %NULL and you must not call g_action_change_state().
4353 func (x *SimpleAction) GetStateType() *glib.VariantType {4548 func (x *SimpleAction) GetStateType() *glib.VariantType {
4354 4549
4355- return XGActionGetStateType(x.GoPointer())4550+ cret := XGActionGetStateType(x.GoPointer())
4356-4551+ return cret
4357 }4552 }
4358 4553
4359 // GSimpleIOStream creates a #GIOStream from an arbitrary #GInputStream and4554 // GSimpleIOStream creates a #GIOStream from an arbitrary #GInputStream and
@@ -4379,14 +4574,16 @@ var xNewSimpleIOStream func(uintptr, uintptr) uintptr
4379 // Creates a new #GSimpleIOStream wrapping @input_stream and @output_stream.4574 // Creates a new #GSimpleIOStream wrapping @input_stream and @output_stream.
4380 // See also #GIOStream.4575 // See also #GIOStream.
4381 func NewSimpleIOStream(InputStreamVar *InputStream, OutputStreamVar *OutputStream) *IOStream {4576 func NewSimpleIOStream(InputStreamVar *InputStream, OutputStreamVar *OutputStream) *IOStream {
4382- NewSimpleIOStreamPtr := xNewSimpleIOStream(InputStreamVar.GoPointer(), OutputStreamVar.GoPointer())4577+ var cls *IOStream
4383- if NewSimpleIOStreamPtr == 0 {4578+
4384- return nil4579+ cret := xNewSimpleIOStream(InputStreamVar.GoPointer(), OutputStreamVar.GoPointer())
4385- }
4386 4580
4387- NewSimpleIOStreamCls := &IOStream{}4581+ if cret == 0 {
4388- NewSimpleIOStreamCls.Ptr = NewSimpleIOStreamPtr4582+ return cls
4389- return NewSimpleIOStreamCls4583+ }
4584+ cls = &IOStream{}
4585+ cls.Ptr = cret
4586+ return cls
4390 }4587 }
4391 4588
4392 func (c *SimpleIOStream) GoPointer() uintptr {4589 func (c *SimpleIOStream) GoPointer() uintptr {
@@ -4417,14 +4614,16 @@ var xNewSimplePermission func(bool) uintptr
4417 // Creates a new #GPermission instance that represents an action that is4614 // Creates a new #GPermission instance that represents an action that is
4418 // either always or never allowed.4615 // either always or never allowed.
4419 func NewSimplePermission(AllowedVar bool) *Permission {4616 func NewSimplePermission(AllowedVar bool) *Permission {
4420- NewSimplePermissionPtr := xNewSimplePermission(AllowedVar)4617+ var cls *Permission
4421- if NewSimplePermissionPtr == 0 {
4422- return nil
4423- }
4424 4618
4425- NewSimplePermissionCls := &Permission{}4619+ cret := xNewSimplePermission(AllowedVar)
4426- NewSimplePermissionCls.Ptr = NewSimplePermissionPtr4620+
4427- return NewSimplePermissionCls4621+ if cret == 0 {
4622+ return cls
4623+ }
4624+ cls = &Permission{}
4625+ cls.Ptr = cret
4626+ return cls
4428 }4627 }
4429 4628
4430 func (c *SimplePermission) GoPointer() uintptr {4629 func (c *SimplePermission) GoPointer() uintptr {
@@ -4512,33 +4711,42 @@ var xNewSubprocess func(SubprocessFlags, **glib.Error, string, ...interface{}) u
4512 //4711 //
4513 // The argument list must be terminated with %NULL.4712 // The argument list must be terminated with %NULL.
4514 func NewSubprocess(FlagsVar SubprocessFlags, ErrorVar **glib.Error, Argv0Var string, varArgs ...interface{}) *Subprocess {4713 func NewSubprocess(FlagsVar SubprocessFlags, ErrorVar **glib.Error, Argv0Var string, varArgs ...interface{}) *Subprocess {
4515- NewSubprocessPtr := xNewSubprocess(FlagsVar, ErrorVar, Argv0Var, varArgs...)4714+ var cls *Subprocess
4516- if NewSubprocessPtr == 0 {
4517- return nil
4518- }
4519 4715
4520- NewSubprocessCls := &Subprocess{}4716+ cret := xNewSubprocess(FlagsVar, ErrorVar, Argv0Var, varArgs...)
4521- NewSubprocessCls.Ptr = NewSubprocessPtr4717+
4522- return NewSubprocessCls4718+ if cret == 0 {
4719+ return cls
4720+ }
4721+ cls = &Subprocess{}
4722+ cls.Ptr = cret
4723+ return cls
4523 }4724 }
4524 4725
4525-var xNewvSubprocess func(uintptr, SubprocessFlags) uintptr4726+var xNewvSubprocess func(uintptr, SubprocessFlags, **glib.Error) uintptr
4526 4727
4527 // Create a new process with the given flags and argument list.4728 // Create a new process with the given flags and argument list.
4528 //4729 //
4529 // The argument list is expected to be %NULL-terminated.4730 // The argument list is expected to be %NULL-terminated.
4530-func NewvSubprocess(ArgvVar uintptr, FlagsVar SubprocessFlags) *Subprocess {4731+func NewvSubprocess(ArgvVar uintptr, FlagsVar SubprocessFlags) (*Subprocess, error) {
4531- NewvSubprocessPtr := xNewvSubprocess(ArgvVar, FlagsVar)4732+ var cls *Subprocess
4532- if NewvSubprocessPtr == 0 {4733+ var cerr *glib.Error
4533- return nil4734+
4735+ cret := xNewvSubprocess(ArgvVar, FlagsVar, &cerr)
4736+
4737+ if cret == 0 {
4738+ return cls, cerr
4534 }4739 }
4740+ cls = &Subprocess{}
4741+ cls.Ptr = cret
4742+ if cerr == nil {
4743+ return cls, nil
4744+ }
4745+ return cls, cerr
4535 4746
4536- NewvSubprocessCls := &Subprocess{}
4537- NewvSubprocessCls.Ptr = NewvSubprocessPtr
4538- return NewvSubprocessCls
4539 }4747 }
4540 4748
4541-var xSubprocessCommunicate func(uintptr, *glib.Bytes, uintptr, **glib.Bytes, **glib.Bytes) bool4749+var xSubprocessCommunicate func(uintptr, *glib.Bytes, uintptr, **glib.Bytes, **glib.Bytes, **glib.Error) bool
4542 4750
4543 // Communicate with the subprocess until it terminates, and all input4751 // Communicate with the subprocess until it terminates, and all input
4544 // and output has been completed.4752 // and output has been completed.
@@ -4581,9 +4789,14 @@ var xSubprocessCommunicate func(uintptr, *glib.Bytes, uintptr, **glib.Bytes, **g
4581 // even if the operation was cancelled. You should especially not4789 // even if the operation was cancelled. You should especially not
4582 // attempt to interact with the pipes while the operation is in progress4790 // attempt to interact with the pipes while the operation is in progress
4583 // (either from another thread or if using the asynchronous version).4791 // (either from another thread or if using the asynchronous version).
4584-func (x *Subprocess) Communicate(StdinBufVar *glib.Bytes, CancellableVar *Cancellable, StdoutBufVar **glib.Bytes, StderrBufVar **glib.Bytes) bool {4792+func (x *Subprocess) Communicate(StdinBufVar *glib.Bytes, CancellableVar *Cancellable, StdoutBufVar **glib.Bytes, StderrBufVar **glib.Bytes) (bool, error) {
4793+ var cerr *glib.Error
4585 4794
4586- return xSubprocessCommunicate(x.GoPointer(), StdinBufVar, CancellableVar.GoPointer(), StdoutBufVar, StderrBufVar)4795+ cret := xSubprocessCommunicate(x.GoPointer(), StdinBufVar, CancellableVar.GoPointer(), StdoutBufVar, StderrBufVar, &cerr)
4796+ if cerr == nil {
4797+ return cret, nil
4798+ }
4799+ return cret, cerr
4587 4800
4588 }4801 }
4589 4802
@@ -4597,25 +4810,35 @@ func (x *Subprocess) CommunicateAsync(StdinBufVar *glib.Bytes, CancellableVar *C
4597 4810
4598 }4811 }
4599 4812
4600-var xSubprocessCommunicateFinish func(uintptr, uintptr, **glib.Bytes, **glib.Bytes) bool4813+var xSubprocessCommunicateFinish func(uintptr, uintptr, **glib.Bytes, **glib.Bytes, **glib.Error) bool
4601 4814
4602 // Complete an invocation of g_subprocess_communicate_async().4815 // Complete an invocation of g_subprocess_communicate_async().
4603-func (x *Subprocess) CommunicateFinish(ResultVar AsyncResult, StdoutBufVar **glib.Bytes, StderrBufVar **glib.Bytes) bool {4816+func (x *Subprocess) CommunicateFinish(ResultVar AsyncResult, StdoutBufVar **glib.Bytes, StderrBufVar **glib.Bytes) (bool, error) {
4817+ var cerr *glib.Error
4604 4818
4605- return xSubprocessCommunicateFinish(x.GoPointer(), ResultVar.GoPointer(), StdoutBufVar, StderrBufVar)4819+ cret := xSubprocessCommunicateFinish(x.GoPointer(), ResultVar.GoPointer(), StdoutBufVar, StderrBufVar, &cerr)
4820+ if cerr == nil {
4821+ return cret, nil
4822+ }
4823+ return cret, cerr
4606 4824
4607 }4825 }
4608 4826
4609-var xSubprocessCommunicateUtf8 func(uintptr, string, uintptr, string, string) bool4827+var xSubprocessCommunicateUtf8 func(uintptr, string, uintptr, string, string, **glib.Error) bool
4610 4828
4611 // Like g_subprocess_communicate(), but validates the output of the4829 // Like g_subprocess_communicate(), but validates the output of the
4612 // process as UTF-8, and returns it as a regular NUL terminated string.4830 // process as UTF-8, and returns it as a regular NUL terminated string.
4613 //4831 //
4614 // On error, @stdout_buf and @stderr_buf will be set to undefined values and4832 // On error, @stdout_buf and @stderr_buf will be set to undefined values and
4615 // should not be used.4833 // should not be used.
4616-func (x *Subprocess) CommunicateUtf8(StdinBufVar string, CancellableVar *Cancellable, StdoutBufVar string, StderrBufVar string) bool {4834+func (x *Subprocess) CommunicateUtf8(StdinBufVar string, CancellableVar *Cancellable, StdoutBufVar string, StderrBufVar string) (bool, error) {
4835+ var cerr *glib.Error
4617 4836
4618- return xSubprocessCommunicateUtf8(x.GoPointer(), StdinBufVar, CancellableVar.GoPointer(), StdoutBufVar, StderrBufVar)4837+ cret := xSubprocessCommunicateUtf8(x.GoPointer(), StdinBufVar, CancellableVar.GoPointer(), StdoutBufVar, StderrBufVar, &cerr)
4838+ if cerr == nil {
4839+ return cret, nil
4840+ }
4841+ return cret, cerr
4619 4842
4620 }4843 }
4621 4844
@@ -4629,12 +4852,17 @@ func (x *Subprocess) CommunicateUtf8Async(StdinBufVar string, CancellableVar *Ca
4629 4852
4630 }4853 }
4631 4854
4632-var xSubprocessCommunicateUtf8Finish func(uintptr, uintptr, string, string) bool4855+var xSubprocessCommunicateUtf8Finish func(uintptr, uintptr, string, string, **glib.Error) bool
4633 4856
4634 // Complete an invocation of g_subprocess_communicate_utf8_async().4857 // Complete an invocation of g_subprocess_communicate_utf8_async().
4635-func (x *Subprocess) CommunicateUtf8Finish(ResultVar AsyncResult, StdoutBufVar string, StderrBufVar string) bool {4858+func (x *Subprocess) CommunicateUtf8Finish(ResultVar AsyncResult, StdoutBufVar string, StderrBufVar string) (bool, error) {
4859+ var cerr *glib.Error
4636 4860
4637- return xSubprocessCommunicateUtf8Finish(x.GoPointer(), ResultVar.GoPointer(), StdoutBufVar, StderrBufVar)4861+ cret := xSubprocessCommunicateUtf8Finish(x.GoPointer(), ResultVar.GoPointer(), StdoutBufVar, StderrBufVar, &cerr)
4862+ if cerr == nil {
4863+ return cret, nil
4864+ }
4865+ return cret, cerr
4638 4866
4639 }4867 }
4640 4868
@@ -4665,8 +4893,8 @@ var xSubprocessGetExitStatus func(uintptr) int
4665 // unless g_subprocess_get_if_exited() returned %TRUE.4893 // unless g_subprocess_get_if_exited() returned %TRUE.
4666 func (x *Subprocess) GetExitStatus() int {4894 func (x *Subprocess) GetExitStatus() int {
4667 4895
4668- return xSubprocessGetExitStatus(x.GoPointer())4896+ cret := xSubprocessGetExitStatus(x.GoPointer())
4669-4897+ return cret
4670 }4898 }
4671 4899
4672 var xSubprocessGetIdentifier func(uintptr) string4900 var xSubprocessGetIdentifier func(uintptr) string
@@ -4676,8 +4904,8 @@ var xSubprocessGetIdentifier func(uintptr) string
4676 // If the subprocess has terminated, this will return %NULL.4904 // If the subprocess has terminated, this will return %NULL.
4677 func (x *Subprocess) GetIdentifier() string {4905 func (x *Subprocess) GetIdentifier() string {
4678 4906
4679- return xSubprocessGetIdentifier(x.GoPointer())4907+ cret := xSubprocessGetIdentifier(x.GoPointer())
4680-4908+ return cret
4681 }4909 }
4682 4910
4683 var xSubprocessGetIfExited func(uintptr) bool4911 var xSubprocessGetIfExited func(uintptr) bool
@@ -4691,8 +4919,8 @@ var xSubprocessGetIfExited func(uintptr) bool
4691 // returned.4919 // returned.
4692 func (x *Subprocess) GetIfExited() bool {4920 func (x *Subprocess) GetIfExited() bool {
4693 4921
4694- return xSubprocessGetIfExited(x.GoPointer())4922+ cret := xSubprocessGetIfExited(x.GoPointer())
4695-4923+ return cret
4696 }4924 }
4697 4925
4698 var xSubprocessGetIfSignaled func(uintptr) bool4926 var xSubprocessGetIfSignaled func(uintptr) bool
@@ -4705,8 +4933,8 @@ var xSubprocessGetIfSignaled func(uintptr) bool
4705 // returned.4933 // returned.
4706 func (x *Subprocess) GetIfSignaled() bool {4934 func (x *Subprocess) GetIfSignaled() bool {
4707 4935
4708- return xSubprocessGetIfSignaled(x.GoPointer())4936+ cret := xSubprocessGetIfSignaled(x.GoPointer())
4709-4937+ return cret
4710 }4938 }
4711 4939
4712 var xSubprocessGetStatus func(uintptr) int4940 var xSubprocessGetStatus func(uintptr) int
@@ -4724,8 +4952,8 @@ var xSubprocessGetStatus func(uintptr) int
4724 // returned.4952 // returned.
4725 func (x *Subprocess) GetStatus() int {4953 func (x *Subprocess) GetStatus() int {
4726 4954
4727- return xSubprocessGetStatus(x.GoPointer())4955+ cret := xSubprocessGetStatus(x.GoPointer())
4728-4956+ return cret
4729 }4957 }
4730 4958
4731 var xSubprocessGetStderrPipe func(uintptr) uintptr4959 var xSubprocessGetStderrPipe func(uintptr) uintptr
@@ -4736,18 +4964,17 @@ var xSubprocessGetStderrPipe func(uintptr) uintptr
4736 // The process must have been created with %G_SUBPROCESS_FLAGS_STDERR_PIPE,4964 // The process must have been created with %G_SUBPROCESS_FLAGS_STDERR_PIPE,
4737 // otherwise %NULL will be returned.4965 // otherwise %NULL will be returned.
4738 func (x *Subprocess) GetStderrPipe() *InputStream {4966 func (x *Subprocess) GetStderrPipe() *InputStream {
4967+ var cls *InputStream
4739 4968
4740- GetStderrPipePtr := xSubprocessGetStderrPipe(x.GoPointer())4969+ cret := xSubprocessGetStderrPipe(x.GoPointer())
4741- if GetStderrPipePtr == 0 {
4742- return nil
4743- }
4744-
4745- gobject.IncreaseRef(GetStderrPipePtr)
4746-
4747- GetStderrPipeCls := &InputStream{}
4748- GetStderrPipeCls.Ptr = GetStderrPipePtr
4749- return GetStderrPipeCls
4750 4970
4971+ if cret == 0 {
4972+ return cls
4973+ }
4974+ gobject.IncreaseRef(cret)
4975+ cls = &InputStream{}
4976+ cls.Ptr = cret
4977+ return cls
4751 }4978 }
4752 4979
4753 var xSubprocessGetStdinPipe func(uintptr) uintptr4980 var xSubprocessGetStdinPipe func(uintptr) uintptr
@@ -4758,18 +4985,17 @@ var xSubprocessGetStdinPipe func(uintptr) uintptr
4758 // The process must have been created with %G_SUBPROCESS_FLAGS_STDIN_PIPE and4985 // The process must have been created with %G_SUBPROCESS_FLAGS_STDIN_PIPE and
4759 // not %G_SUBPROCESS_FLAGS_STDIN_INHERIT, otherwise %NULL will be returned.4986 // not %G_SUBPROCESS_FLAGS_STDIN_INHERIT, otherwise %NULL will be returned.
4760 func (x *Subprocess) GetStdinPipe() *OutputStream {4987 func (x *Subprocess) GetStdinPipe() *OutputStream {
4988+ var cls *OutputStream
4761 4989
4762- GetStdinPipePtr := xSubprocessGetStdinPipe(x.GoPointer())4990+ cret := xSubprocessGetStdinPipe(x.GoPointer())
4763- if GetStdinPipePtr == 0 {
4764- return nil
4765- }
4766-
4767- gobject.IncreaseRef(GetStdinPipePtr)
4768-
4769- GetStdinPipeCls := &OutputStream{}
4770- GetStdinPipeCls.Ptr = GetStdinPipePtr
4771- return GetStdinPipeCls
4772 4991
4992+ if cret == 0 {
4993+ return cls
4994+ }
4995+ gobject.IncreaseRef(cret)
4996+ cls = &OutputStream{}
4997+ cls.Ptr = cret
4998+ return cls
4773 }4999 }
4774 5000
4775 var xSubprocessGetStdoutPipe func(uintptr) uintptr5001 var xSubprocessGetStdoutPipe func(uintptr) uintptr
@@ -4780,18 +5006,17 @@ var xSubprocessGetStdoutPipe func(uintptr) uintptr
4780 // The process must have been created with %G_SUBPROCESS_FLAGS_STDOUT_PIPE,5006 // The process must have been created with %G_SUBPROCESS_FLAGS_STDOUT_PIPE,
4781 // otherwise %NULL will be returned.5007 // otherwise %NULL will be returned.
4782 func (x *Subprocess) GetStdoutPipe() *InputStream {5008 func (x *Subprocess) GetStdoutPipe() *InputStream {
5009+ var cls *InputStream
4783 5010
4784- GetStdoutPipePtr := xSubprocessGetStdoutPipe(x.GoPointer())5011+ cret := xSubprocessGetStdoutPipe(x.GoPointer())
4785- if GetStdoutPipePtr == 0 {
4786- return nil
4787- }
4788-
4789- gobject.IncreaseRef(GetStdoutPipePtr)
4790-
4791- GetStdoutPipeCls := &InputStream{}
4792- GetStdoutPipeCls.Ptr = GetStdoutPipePtr
4793- return GetStdoutPipeCls
4794 5012
5013+ if cret == 0 {
5014+ return cls
5015+ }
5016+ gobject.IncreaseRef(cret)
5017+ cls = &InputStream{}
5018+ cls.Ptr = cret
5019+ return cls
4795 }5020 }
4796 5021
4797 var xSubprocessGetSuccessful func(uintptr) bool5022 var xSubprocessGetSuccessful func(uintptr) bool
@@ -4804,8 +5029,8 @@ var xSubprocessGetSuccessful func(uintptr) bool
4804 // returned.5029 // returned.
4805 func (x *Subprocess) GetSuccessful() bool {5030 func (x *Subprocess) GetSuccessful() bool {
4806 5031
4807- return xSubprocessGetSuccessful(x.GoPointer())5032+ cret := xSubprocessGetSuccessful(x.GoPointer())
4808-5033+ return cret
4809 }5034 }
4810 5035
4811 var xSubprocessGetTermSig func(uintptr) int5036 var xSubprocessGetTermSig func(uintptr) int
@@ -4819,8 +5044,8 @@ var xSubprocessGetTermSig func(uintptr) int
4819 // unless g_subprocess_get_if_signaled() returned %TRUE.5044 // unless g_subprocess_get_if_signaled() returned %TRUE.
4820 func (x *Subprocess) GetTermSig() int {5045 func (x *Subprocess) GetTermSig() int {
4821 5046
4822- return xSubprocessGetTermSig(x.GoPointer())5047+ cret := xSubprocessGetTermSig(x.GoPointer())
4823-5048+ return cret
4824 }5049 }
4825 5050
4826 var xSubprocessSendSignal func(uintptr, int)5051 var xSubprocessSendSignal func(uintptr, int)
@@ -4838,7 +5063,7 @@ func (x *Subprocess) SendSignal(SignalNumVar int) {
4838 5063
4839 }5064 }
4840 5065
4841-var xSubprocessWait func(uintptr, uintptr) bool5066+var xSubprocessWait func(uintptr, uintptr, **glib.Error) bool
4842 5067
4843 // Synchronously wait for the subprocess to terminate.5068 // Synchronously wait for the subprocess to terminate.
4844 //5069 //
@@ -4851,9 +5076,14 @@ var xSubprocessWait func(uintptr, uintptr) bool
4851 //5076 //
4852 // Cancelling @cancellable doesn't kill the subprocess. Call5077 // Cancelling @cancellable doesn't kill the subprocess. Call
4853 // g_subprocess_force_exit() if it is desirable.5078 // g_subprocess_force_exit() if it is desirable.
4854-func (x *Subprocess) Wait(CancellableVar *Cancellable) bool {5079+func (x *Subprocess) Wait(CancellableVar *Cancellable) (bool, error) {
5080+ var cerr *glib.Error
4855 5081
4856- return xSubprocessWait(x.GoPointer(), CancellableVar.GoPointer())5082+ cret := xSubprocessWait(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
5083+ if cerr == nil {
5084+ return cret, nil
5085+ }
5086+ return cret, cerr
4857 5087
4858 }5088 }
4859 5089
@@ -4868,12 +5098,17 @@ func (x *Subprocess) WaitAsync(CancellableVar *Cancellable, CallbackVar AsyncRea
4868 5098
4869 }5099 }
4870 5100
4871-var xSubprocessWaitCheck func(uintptr, uintptr) bool5101+var xSubprocessWaitCheck func(uintptr, uintptr, **glib.Error) bool
4872 5102
4873 // Combines g_subprocess_wait() with g_spawn_check_wait_status().5103 // Combines g_subprocess_wait() with g_spawn_check_wait_status().
4874-func (x *Subprocess) WaitCheck(CancellableVar *Cancellable) bool {5104+func (x *Subprocess) WaitCheck(CancellableVar *Cancellable) (bool, error) {
5105+ var cerr *glib.Error
4875 5106
4876- return xSubprocessWaitCheck(x.GoPointer(), CancellableVar.GoPointer())5107+ cret := xSubprocessWaitCheck(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
5108+ if cerr == nil {
5109+ return cret, nil
5110+ }
5111+ return cret, cerr
4877 5112
4878 }5113 }
4879 5114
@@ -4888,23 +5123,33 @@ func (x *Subprocess) WaitCheckAsync(CancellableVar *Cancellable, CallbackVar Asy
4888 5123
4889 }5124 }
4890 5125
4891-var xSubprocessWaitCheckFinish func(uintptr, uintptr) bool5126+var xSubprocessWaitCheckFinish func(uintptr, uintptr, **glib.Error) bool
4892 5127
4893 // Collects the result of a previous call to5128 // Collects the result of a previous call to
4894 // g_subprocess_wait_check_async().5129 // g_subprocess_wait_check_async().
4895-func (x *Subprocess) WaitCheckFinish(ResultVar AsyncResult) bool {5130+func (x *Subprocess) WaitCheckFinish(ResultVar AsyncResult) (bool, error) {
5131+ var cerr *glib.Error
4896 5132
4897- return xSubprocessWaitCheckFinish(x.GoPointer(), ResultVar.GoPointer())5133+ cret := xSubprocessWaitCheckFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
5134+ if cerr == nil {
5135+ return cret, nil
5136+ }
5137+ return cret, cerr
4898 5138
4899 }5139 }
4900 5140
4901-var xSubprocessWaitFinish func(uintptr, uintptr) bool5141+var xSubprocessWaitFinish func(uintptr, uintptr, **glib.Error) bool
4902 5142
4903 // Collects the result of a previous call to5143 // Collects the result of a previous call to
4904 // g_subprocess_wait_async().5144 // g_subprocess_wait_async().
4905-func (x *Subprocess) WaitFinish(ResultVar AsyncResult) bool {5145+func (x *Subprocess) WaitFinish(ResultVar AsyncResult) (bool, error) {
5146+ var cerr *glib.Error
4906 5147
4907- return xSubprocessWaitFinish(x.GoPointer(), ResultVar.GoPointer())5148+ cret := xSubprocessWaitFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
5149+ if cerr == nil {
5150+ return cret, nil
5151+ }
5152+ return cret, cerr
4908 5153
4909 }5154 }
4910 5155
@@ -4954,9 +5199,14 @@ func (c *Subprocess) SetGoPointer(ptr uintptr) {
4954 // In this pattern, a caller would expect to be able to call g_initable_init()5199 // In this pattern, a caller would expect to be able to call g_initable_init()
4955 // on the result of g_object_new(), regardless of whether it is in fact a new5200 // on the result of g_object_new(), regardless of whether it is in fact a new
4956 // instance.5201 // instance.
4957-func (x *Subprocess) Init(CancellableVar *Cancellable) bool {5202+func (x *Subprocess) Init(CancellableVar *Cancellable) (bool, error) {
5203+ var cerr *glib.Error
4958 5204
4959- return XGInitableInit(x.GoPointer(), CancellableVar.GoPointer())5205+ cret := XGInitableInit(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
5206+ if cerr == nil {
5207+ return cret, nil
5208+ }
5209+ return cret, cerr
4960 5210
4961 }5211 }
4962 5212
@@ -4986,14 +5236,16 @@ var xNewSubprocessLauncher func(SubprocessFlags) uintptr
4986 // environment of the calling process is made at the time of this call5236 // environment of the calling process is made at the time of this call
4987 // and will be used as the environment that the process is launched in.5237 // and will be used as the environment that the process is launched in.
4988 func NewSubprocessLauncher(FlagsVar SubprocessFlags) *SubprocessLauncher {5238 func NewSubprocessLauncher(FlagsVar SubprocessFlags) *SubprocessLauncher {
4989- NewSubprocessLauncherPtr := xNewSubprocessLauncher(FlagsVar)5239+ var cls *SubprocessLauncher
4990- if NewSubprocessLauncherPtr == 0 {5240+
4991- return nil5241+ cret := xNewSubprocessLauncher(FlagsVar)
4992- }
4993 5242
4994- NewSubprocessLauncherCls := &SubprocessLauncher{}5243+ if cret == 0 {
4995- NewSubprocessLauncherCls.Ptr = NewSubprocessLauncherPtr5244+ return cls
4996- return NewSubprocessLauncherCls5245+ }
5246+ cls = &SubprocessLauncher{}
5247+ cls.Ptr = cret
5248+ return cls
4997 }5249 }
4998 5250
4999 var xSubprocessLauncherClose func(uintptr)5251 var xSubprocessLauncherClose func(uintptr)
@@ -5023,8 +5275,8 @@ var xSubprocessLauncherGetenv func(uintptr, string) string
5023 // On Windows, it will be UTF-8.5275 // On Windows, it will be UTF-8.
5024 func (x *SubprocessLauncher) Getenv(VariableVar string) string {5276 func (x *SubprocessLauncher) Getenv(VariableVar string) string {
5025 5277
5026- return xSubprocessLauncherGetenv(x.GoPointer(), VariableVar)5278+ cret := xSubprocessLauncherGetenv(x.GoPointer(), VariableVar)
5027-5279+ return cret
5028 }5280 }
5029 5281
5030 var xSubprocessLauncherSetChildSetup func(uintptr, uintptr, uintptr, uintptr)5282 var xSubprocessLauncherSetChildSetup func(uintptr, uintptr, uintptr, uintptr)
@@ -5185,31 +5437,36 @@ var xSubprocessLauncherSpawn func(uintptr, **glib.Error, string, ...interface{})
5185 5437
5186 // Creates a #GSubprocess given a provided varargs list of arguments.5438 // Creates a #GSubprocess given a provided varargs list of arguments.
5187 func (x *SubprocessLauncher) Spawn(ErrorVar **glib.Error, Argv0Var string, varArgs ...interface{}) *Subprocess {5439 func (x *SubprocessLauncher) Spawn(ErrorVar **glib.Error, Argv0Var string, varArgs ...interface{}) *Subprocess {
5440+ var cls *Subprocess
5188 5441
5189- SpawnPtr := xSubprocessLauncherSpawn(x.GoPointer(), ErrorVar, Argv0Var, varArgs...)5442+ cret := xSubprocessLauncherSpawn(x.GoPointer(), ErrorVar, Argv0Var, varArgs...)
5190- if SpawnPtr == 0 {
5191- return nil
5192- }
5193-
5194- SpawnCls := &Subprocess{}
5195- SpawnCls.Ptr = SpawnPtr
5196- return SpawnCls
5197 5443
5444+ if cret == 0 {
5445+ return cls
5446+ }
5447+ cls = &Subprocess{}
5448+ cls.Ptr = cret
5449+ return cls
5198 }5450 }
5199 5451
5200-var xSubprocessLauncherSpawnv func(uintptr, uintptr) uintptr5452+var xSubprocessLauncherSpawnv func(uintptr, uintptr, **glib.Error) uintptr
5201 5453
5202 // Creates a #GSubprocess given a provided array of arguments.5454 // Creates a #GSubprocess given a provided array of arguments.
5203-func (x *SubprocessLauncher) Spawnv(ArgvVar uintptr) *Subprocess {5455+func (x *SubprocessLauncher) Spawnv(ArgvVar uintptr) (*Subprocess, error) {
5456+ var cls *Subprocess
5457+ var cerr *glib.Error
5204 5458
5205- SpawnvPtr := xSubprocessLauncherSpawnv(x.GoPointer(), ArgvVar)5459+ cret := xSubprocessLauncherSpawnv(x.GoPointer(), ArgvVar, &cerr)
5206- if SpawnvPtr == 0 {
5207- return nil
5208- }
5209 5460
5210- SpawnvCls := &Subprocess{}5461+ if cret == 0 {
5211- SpawnvCls.Ptr = SpawnvPtr5462+ return cls, cerr
5212- return SpawnvCls5463+ }
5464+ cls = &Subprocess{}
5465+ cls.Ptr = cret
5466+ if cerr == nil {
5467+ return cls, nil
5468+ }
5469+ return cls, cerr
5213 5470
5214 }5471 }
5215 5472
@@ -5423,14 +5680,16 @@ var xNewTestDBus func(TestDBusFlags) uintptr
5423 5680
5424 // Create a new #GTestDBus object.5681 // Create a new #GTestDBus object.
5425 func NewTestDBus(FlagsVar TestDBusFlags) *TestDBus {5682 func NewTestDBus(FlagsVar TestDBusFlags) *TestDBus {
5426- NewTestDBusPtr := xNewTestDBus(FlagsVar)5683+ var cls *TestDBus
5427- if NewTestDBusPtr == 0 {5684+
5428- return nil5685+ cret := xNewTestDBus(FlagsVar)
5429- }
5430 5686
5431- NewTestDBusCls := &TestDBus{}5687+ if cret == 0 {
5432- NewTestDBusCls.Ptr = NewTestDBusPtr5688+ return cls
5433- return NewTestDBusCls5689+ }
5690+ cls = &TestDBus{}
5691+ cls.Ptr = cret
5692+ return cls
5434 }5693 }
5435 5694
5436 var xTestDBusAddServiceDir func(uintptr, string)5695 var xTestDBusAddServiceDir func(uintptr, string)
@@ -5463,8 +5722,8 @@ var xTestDBusGetBusAddress func(uintptr) string
5463 // g_dbus_connection_new_for_address().5722 // g_dbus_connection_new_for_address().
5464 func (x *TestDBus) GetBusAddress() string {5723 func (x *TestDBus) GetBusAddress() string {
5465 5724
5466- return xTestDBusGetBusAddress(x.GoPointer())5725+ cret := xTestDBusGetBusAddress(x.GoPointer())
5467-5726+ return cret
5468 }5727 }
5469 5728
5470 var xTestDBusGetFlags func(uintptr) TestDBusFlags5729 var xTestDBusGetFlags func(uintptr) TestDBusFlags
@@ -5472,8 +5731,8 @@ var xTestDBusGetFlags func(uintptr) TestDBusFlags
5472 // Get the flags of the #GTestDBus object.5731 // Get the flags of the #GTestDBus object.
5473 func (x *TestDBus) GetFlags() TestDBusFlags {5732 func (x *TestDBus) GetFlags() TestDBusFlags {
5474 5733
5475- return xTestDBusGetFlags(x.GoPointer())5734+ cret := xTestDBusGetFlags(x.GoPointer())
5476-5735+ return cret
5477 }5736 }
5478 5737
5479 var xTestDBusStop func(uintptr)5738 var xTestDBusStop func(uintptr)
M v4/gio/gioerror.go +2 -2
@@ -17,8 +17,8 @@ var xIoErrorFromErrno func(int) IOErrorEnum
17 // calls, you should save its value as soon as the call which sets it17 // calls, you should save its value as soon as the call which sets it
18 func IoErrorFromErrno(ErrNoVar int) IOErrorEnum {18 func IoErrorFromErrno(ErrNoVar int) IOErrorEnum {
19 19
20- return xIoErrorFromErrno(ErrNoVar)20+ cret := xIoErrorFromErrno(ErrNoVar)
21-21+ return cret
22 }22 }
23 23
24 func init() {24 func init() {
M v4/gio/giomodule.go +19 -17
@@ -28,8 +28,8 @@ var xIoExtensionPointImplement func(string, []interface{}, string, int) *IOExten
28 // extension point, the existing #GIOExtension object is returned.28 // extension point, the existing #GIOExtension object is returned.
29 func IoExtensionPointImplement(ExtensionPointNameVar string, TypeVar []interface{}, ExtensionNameVar string, PriorityVar int) *IOExtension {29 func IoExtensionPointImplement(ExtensionPointNameVar string, TypeVar []interface{}, ExtensionNameVar string, PriorityVar int) *IOExtension {
30 30
31- return xIoExtensionPointImplement(ExtensionPointNameVar, TypeVar, ExtensionNameVar, PriorityVar)31+ cret := xIoExtensionPointImplement(ExtensionPointNameVar, TypeVar, ExtensionNameVar, PriorityVar)
32-32+ return cret
33 }33 }
34 34
35 var xIoExtensionPointLookup func(string) *IOExtensionPoint35 var xIoExtensionPointLookup func(string) *IOExtensionPoint
@@ -37,8 +37,8 @@ var xIoExtensionPointLookup func(string) *IOExtensionPoint
37 // Looks up an existing extension point.37 // Looks up an existing extension point.
38 func IoExtensionPointLookup(NameVar string) *IOExtensionPoint {38 func IoExtensionPointLookup(NameVar string) *IOExtensionPoint {
39 39
40- return xIoExtensionPointLookup(NameVar)40+ cret := xIoExtensionPointLookup(NameVar)
41-41+ return cret
42 }42 }
43 43
44 var xIoExtensionPointRegister func(string) *IOExtensionPoint44 var xIoExtensionPointRegister func(string) *IOExtensionPoint
@@ -46,8 +46,8 @@ var xIoExtensionPointRegister func(string) *IOExtensionPoint
46 // Registers an extension point.46 // Registers an extension point.
47 func IoExtensionPointRegister(NameVar string) *IOExtensionPoint {47 func IoExtensionPointRegister(NameVar string) *IOExtensionPoint {
48 48
49- return xIoExtensionPointRegister(NameVar)49+ cret := xIoExtensionPointRegister(NameVar)
50-50+ return cret
51 }51 }
52 52
53 var xIoModulesLoadAllInDirectory func(string) *glib.List53 var xIoModulesLoadAllInDirectory func(string) *glib.List
@@ -59,8 +59,8 @@ var xIoModulesLoadAllInDirectory func(string) *glib.List
59 // which allows delayed/lazy loading of modules.59 // which allows delayed/lazy loading of modules.
60 func IoModulesLoadAllInDirectory(DirnameVar string) *glib.List {60 func IoModulesLoadAllInDirectory(DirnameVar string) *glib.List {
61 61
62- return xIoModulesLoadAllInDirectory(DirnameVar)62+ cret := xIoModulesLoadAllInDirectory(DirnameVar)
63-63+ return cret
64 }64 }
65 65
66 var xIoModulesLoadAllInDirectoryWithScope func(string, *IOModuleScope) *glib.List66 var xIoModulesLoadAllInDirectoryWithScope func(string, *IOModuleScope) *glib.List
@@ -72,8 +72,8 @@ var xIoModulesLoadAllInDirectoryWithScope func(string, *IOModuleScope) *glib.Lis
72 // which allows delayed/lazy loading of modules.72 // which allows delayed/lazy loading of modules.
73 func IoModulesLoadAllInDirectoryWithScope(DirnameVar string, ScopeVar *IOModuleScope) *glib.List {73 func IoModulesLoadAllInDirectoryWithScope(DirnameVar string, ScopeVar *IOModuleScope) *glib.List {
74 74
75- return xIoModulesLoadAllInDirectoryWithScope(DirnameVar, ScopeVar)75+ cret := xIoModulesLoadAllInDirectoryWithScope(DirnameVar, ScopeVar)
76-76+ return cret
77 }77 }
78 78
79 var xIoModulesScanAllInDirectory func(string)79 var xIoModulesScanAllInDirectory func(string)
@@ -132,14 +132,16 @@ var xNewIOModule func(string) uintptr
132 // Creates a new GIOModule that will load the specific132 // Creates a new GIOModule that will load the specific
133 // shared library when in use.133 // shared library when in use.
134 func NewIOModule(FilenameVar string) *IOModule {134 func NewIOModule(FilenameVar string) *IOModule {
135- NewIOModulePtr := xNewIOModule(FilenameVar)135+ var cls *IOModule
136- if NewIOModulePtr == 0 {136+
137- return nil137+ cret := xNewIOModule(FilenameVar)
138- }
139 138
140- NewIOModuleCls := &IOModule{}139+ if cret == 0 {
141- NewIOModuleCls.Ptr = NewIOModulePtr140+ return cls
142- return NewIOModuleCls141+ }
142+ cls = &IOModule{}
143+ cls.Ptr = cret
144+ return cls
143 }145 }
144 146
145 var xIOModuleLoad func(uintptr)147 var xIOModuleLoad func(uintptr)
M v4/gio/giostream.go +46 -32
@@ -4,6 +4,7 @@ package gio
4 import (4 import (
5 "github.com/jwijenbergh/purego"5 "github.com/jwijenbergh/purego"
6 "github.com/jwijenbergh/puregotk/internal/core"6 "github.com/jwijenbergh/puregotk/internal/core"
7+ "github.com/jwijenbergh/puregotk/v4/glib"
7 "github.com/jwijenbergh/puregotk/v4/gobject"8 "github.com/jwijenbergh/puregotk/v4/gobject"
8 )9 )
9 10
@@ -79,7 +80,7 @@ func (x *IOStream) ClearPending() {
79 80
80 }81 }
81 82
82-var xIOStreamClose func(uintptr, uintptr) bool83+var xIOStreamClose func(uintptr, uintptr, **glib.Error) bool
83 84
84 // Closes the stream, releasing resources related to it. This will also85 // Closes the stream, releasing resources related to it. This will also
85 // close the individual input and output streams, if they are not already86 // close the individual input and output streams, if they are not already
@@ -114,9 +115,14 @@ var xIOStreamClose func(uintptr, uintptr) bool
114 //115 //
115 // The default implementation of this method just calls close on the116 // The default implementation of this method just calls close on the
116 // individual input/output streams.117 // individual input/output streams.
117-func (x *IOStream) Close(CancellableVar *Cancellable) bool {118+func (x *IOStream) Close(CancellableVar *Cancellable) (bool, error) {
119+ var cerr *glib.Error
118 120
119- return xIOStreamClose(x.GoPointer(), CancellableVar.GoPointer())121+ cret := xIOStreamClose(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
122+ if cerr == nil {
123+ return cret, nil
124+ }
125+ return cret, cerr
120 126
121 }127 }
122 128
@@ -138,12 +144,17 @@ func (x *IOStream) CloseAsync(IoPriorityVar int, CancellableVar *Cancellable, Ca
138 144
139 }145 }
140 146
141-var xIOStreamCloseFinish func(uintptr, uintptr) bool147+var xIOStreamCloseFinish func(uintptr, uintptr, **glib.Error) bool
142 148
143 // Closes a stream.149 // Closes a stream.
144-func (x *IOStream) CloseFinish(ResultVar AsyncResult) bool {150+func (x *IOStream) CloseFinish(ResultVar AsyncResult) (bool, error) {
151+ var cerr *glib.Error
145 152
146- return xIOStreamCloseFinish(x.GoPointer(), ResultVar.GoPointer())153+ cret := xIOStreamCloseFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
154+ if cerr == nil {
155+ return cret, nil
156+ }
157+ return cret, cerr
147 158
148 }159 }
149 160
@@ -152,18 +163,17 @@ var xIOStreamGetInputStream func(uintptr) uintptr
152 // Gets the input stream for this object. This is used163 // Gets the input stream for this object. This is used
153 // for reading.164 // for reading.
154 func (x *IOStream) GetInputStream() *InputStream {165 func (x *IOStream) GetInputStream() *InputStream {
166+ var cls *InputStream
155 167
156- GetInputStreamPtr := xIOStreamGetInputStream(x.GoPointer())168+ cret := xIOStreamGetInputStream(x.GoPointer())
157- if GetInputStreamPtr == 0 {
158- return nil
159- }
160-
161- gobject.IncreaseRef(GetInputStreamPtr)
162-
163- GetInputStreamCls := &InputStream{}
164- GetInputStreamCls.Ptr = GetInputStreamPtr
165- return GetInputStreamCls
166 169
170+ if cret == 0 {
171+ return cls
172+ }
173+ gobject.IncreaseRef(cret)
174+ cls = &InputStream{}
175+ cls.Ptr = cret
176+ return cls
167 }177 }
168 178
169 var xIOStreamGetOutputStream func(uintptr) uintptr179 var xIOStreamGetOutputStream func(uintptr) uintptr
@@ -171,18 +181,17 @@ var xIOStreamGetOutputStream func(uintptr) uintptr
171 // Gets the output stream for this object. This is used for181 // Gets the output stream for this object. This is used for
172 // writing.182 // writing.
173 func (x *IOStream) GetOutputStream() *OutputStream {183 func (x *IOStream) GetOutputStream() *OutputStream {
184+ var cls *OutputStream
174 185
175- GetOutputStreamPtr := xIOStreamGetOutputStream(x.GoPointer())186+ cret := xIOStreamGetOutputStream(x.GoPointer())
176- if GetOutputStreamPtr == 0 {
177- return nil
178- }
179-
180- gobject.IncreaseRef(GetOutputStreamPtr)
181-
182- GetOutputStreamCls := &OutputStream{}
183- GetOutputStreamCls.Ptr = GetOutputStreamPtr
184- return GetOutputStreamCls
185 187
188+ if cret == 0 {
189+ return cls
190+ }
191+ gobject.IncreaseRef(cret)
192+ cls = &OutputStream{}
193+ cls.Ptr = cret
194+ return cls
186 }195 }
187 196
188 var xIOStreamHasPending func(uintptr) bool197 var xIOStreamHasPending func(uintptr) bool
@@ -190,8 +199,8 @@ var xIOStreamHasPending func(uintptr) bool
190 // Checks if a stream has pending actions.199 // Checks if a stream has pending actions.
191 func (x *IOStream) HasPending() bool {200 func (x *IOStream) HasPending() bool {
192 201
193- return xIOStreamHasPending(x.GoPointer())202+ cret := xIOStreamHasPending(x.GoPointer())
194-203+ return cret
195 }204 }
196 205
197 var xIOStreamIsClosed func(uintptr) bool206 var xIOStreamIsClosed func(uintptr) bool
@@ -199,8 +208,8 @@ var xIOStreamIsClosed func(uintptr) bool
199 // Checks if a stream is closed.208 // Checks if a stream is closed.
200 func (x *IOStream) IsClosed() bool {209 func (x *IOStream) IsClosed() bool {
201 210
202- return xIOStreamIsClosed(x.GoPointer())211+ cret := xIOStreamIsClosed(x.GoPointer())
203-212+ return cret
204 }213 }
205 214
206 var xIOStreamSetPending func(uintptr) bool215 var xIOStreamSetPending func(uintptr) bool
@@ -208,9 +217,14 @@ var xIOStreamSetPending func(uintptr) bool
208 // Sets @stream to have actions pending. If the pending flag is217 // Sets @stream to have actions pending. If the pending flag is
209 // already set or @stream is closed, it will return %FALSE and set218 // already set or @stream is closed, it will return %FALSE and set
210 // @error.219 // @error.
211-func (x *IOStream) SetPending() bool {220+func (x *IOStream) SetPending() (bool, error) {
221+ var cerr *glib.Error
212 222
213- return xIOStreamSetPending(x.GoPointer())223+ cret := xIOStreamSetPending(x.GoPointer())
224+ if cerr == nil {
225+ return cret, nil
226+ }
227+ return cret, cerr
214 228
215 }229 }
216 230
M v4/gio/glistmodel.go +14 -14
@@ -91,8 +91,8 @@ func (x *ListModelBase) SetGoPointer(ptr uintptr) {
91 // See also: g_list_model_get_n_items()91 // See also: g_list_model_get_n_items()
92 func (x *ListModelBase) GetItem(PositionVar uint) uintptr {92 func (x *ListModelBase) GetItem(PositionVar uint) uintptr {
93 93
94- return XGListModelGetItem(x.GoPointer(), PositionVar)94+ cret := XGListModelGetItem(x.GoPointer(), PositionVar)
95-95+ return cret
96 }96 }
97 97
98 // Gets the type of the items in @list.98 // Gets the type of the items in @list.
@@ -105,8 +105,8 @@ func (x *ListModelBase) GetItem(PositionVar uint) uintptr {
105 // model.105 // model.
106 func (x *ListModelBase) GetItemType() []interface{} {106 func (x *ListModelBase) GetItemType() []interface{} {
107 107
108- return XGListModelGetItemType(x.GoPointer())108+ cret := XGListModelGetItemType(x.GoPointer())
109-109+ return cret
110 }110 }
111 111
112 // Gets the number of items in @list.112 // Gets the number of items in @list.
@@ -116,8 +116,8 @@ func (x *ListModelBase) GetItemType() []interface{} {
116 // @position until g_list_model_get_item() returns %NULL.116 // @position until g_list_model_get_item() returns %NULL.
117 func (x *ListModelBase) GetNItems() uint {117 func (x *ListModelBase) GetNItems() uint {
118 118
119- return XGListModelGetNItems(x.GoPointer())119+ cret := XGListModelGetNItems(x.GoPointer())
120-120+ return cret
121 }121 }
122 122
123 // Get the item at @position.123 // Get the item at @position.
@@ -133,16 +133,16 @@ func (x *ListModelBase) GetNItems() uint {
133 //133 //
134 // See also: g_list_model_get_n_items()134 // See also: g_list_model_get_n_items()
135 func (x *ListModelBase) GetObject(PositionVar uint) *gobject.Object {135 func (x *ListModelBase) GetObject(PositionVar uint) *gobject.Object {
136+ var cls *gobject.Object
136 137
137- GetObjectPtr := XGListModelGetObject(x.GoPointer(), PositionVar)138+ cret := XGListModelGetObject(x.GoPointer(), PositionVar)
138- if GetObjectPtr == 0 {
139- return nil
140- }
141-
142- GetObjectCls := &gobject.Object{}
143- GetObjectCls.Ptr = GetObjectPtr
144- return GetObjectCls
145 139
140+ if cret == 0 {
141+ return cls
142+ }
143+ cls = &gobject.Object{}
144+ cls.Ptr = cret
145+ return cls
146 }146 }
147 147
148 // Emits the #GListModel::items-changed signal on @list.148 // Emits the #GListModel::items-changed signal on @list.
M v4/gio/gliststore.go +29 -27
@@ -32,14 +32,16 @@ var xNewListStore func([]interface{}) uintptr
32 // Creates a new #GListStore with items of type @item_type. @item_type32 // Creates a new #GListStore with items of type @item_type. @item_type
33 // must be a subclass of #GObject.33 // must be a subclass of #GObject.
34 func NewListStore(ItemTypeVar []interface{}) *ListStore {34 func NewListStore(ItemTypeVar []interface{}) *ListStore {
35- NewListStorePtr := xNewListStore(ItemTypeVar)35+ var cls *ListStore
36- if NewListStorePtr == 0 {36+
37- return nil37+ cret := xNewListStore(ItemTypeVar)
38- }
39 38
40- NewListStoreCls := &ListStore{}39+ if cret == 0 {
41- NewListStoreCls.Ptr = NewListStorePtr40+ return cls
42- return NewListStoreCls41+ }
42+ cls = &ListStore{}
43+ cls.Ptr = cret
44+ return cls
43 }45 }
44 46
45 var xListStoreAppend func(uintptr, uintptr)47 var xListStoreAppend func(uintptr, uintptr)
@@ -66,8 +68,8 @@ var xListStoreFind func(uintptr, uintptr, uint) bool
66 // g_list_store_find_with_equal_func() with a custom #GEqualFunc instead.68 // g_list_store_find_with_equal_func() with a custom #GEqualFunc instead.
67 func (x *ListStore) Find(ItemVar *gobject.Object, PositionVar uint) bool {69 func (x *ListStore) Find(ItemVar *gobject.Object, PositionVar uint) bool {
68 70
69- return xListStoreFind(x.GoPointer(), ItemVar.GoPointer(), PositionVar)71+ cret := xListStoreFind(x.GoPointer(), ItemVar.GoPointer(), PositionVar)
70-72+ return cret
71 }73 }
72 74
73 var xListStoreFindWithEqualFunc func(uintptr, uintptr, uintptr, uint) bool75 var xListStoreFindWithEqualFunc func(uintptr, uintptr, uintptr, uint) bool
@@ -78,8 +80,8 @@ var xListStoreFindWithEqualFunc func(uintptr, uintptr, uintptr, uint) bool
78 // method will return %FALSE.80 // method will return %FALSE.
79 func (x *ListStore) FindWithEqualFunc(ItemVar *gobject.Object, EqualFuncVar glib.EqualFunc, PositionVar uint) bool {81 func (x *ListStore) FindWithEqualFunc(ItemVar *gobject.Object, EqualFuncVar glib.EqualFunc, PositionVar uint) bool {
80 82
81- return xListStoreFindWithEqualFunc(x.GoPointer(), ItemVar.GoPointer(), purego.NewCallback(EqualFuncVar), PositionVar)83+ cret := xListStoreFindWithEqualFunc(x.GoPointer(), ItemVar.GoPointer(), purego.NewCallback(EqualFuncVar), PositionVar)
82-84+ return cret
83 }85 }
84 86
85 var xListStoreInsert func(uintptr, uint, uintptr)87 var xListStoreInsert func(uintptr, uint, uintptr)
@@ -110,8 +112,8 @@ var xListStoreInsertSorted func(uintptr, uintptr, uintptr, uintptr) uint
110 // This function takes a ref on @item.112 // This function takes a ref on @item.
111 func (x *ListStore) InsertSorted(ItemVar *gobject.Object, CompareFuncVar glib.CompareDataFunc, UserDataVar uintptr) uint {113 func (x *ListStore) InsertSorted(ItemVar *gobject.Object, CompareFuncVar glib.CompareDataFunc, UserDataVar uintptr) uint {
112 114
113- return xListStoreInsertSorted(x.GoPointer(), ItemVar.GoPointer(), purego.NewCallback(CompareFuncVar), UserDataVar)115+ cret := xListStoreInsertSorted(x.GoPointer(), ItemVar.GoPointer(), purego.NewCallback(CompareFuncVar), UserDataVar)
114-116+ return cret
115 }117 }
116 118
117 var xListStoreRemove func(uintptr, uint)119 var xListStoreRemove func(uintptr, uint)
@@ -185,8 +187,8 @@ func (c *ListStore) SetGoPointer(ptr uintptr) {
185 // See also: g_list_model_get_n_items()187 // See also: g_list_model_get_n_items()
186 func (x *ListStore) GetItem(PositionVar uint) uintptr {188 func (x *ListStore) GetItem(PositionVar uint) uintptr {
187 189
188- return XGListModelGetItem(x.GoPointer(), PositionVar)190+ cret := XGListModelGetItem(x.GoPointer(), PositionVar)
189-191+ return cret
190 }192 }
191 193
192 // Gets the type of the items in @list.194 // Gets the type of the items in @list.
@@ -199,8 +201,8 @@ func (x *ListStore) GetItem(PositionVar uint) uintptr {
199 // model.201 // model.
200 func (x *ListStore) GetItemType() []interface{} {202 func (x *ListStore) GetItemType() []interface{} {
201 203
202- return XGListModelGetItemType(x.GoPointer())204+ cret := XGListModelGetItemType(x.GoPointer())
203-205+ return cret
204 }206 }
205 207
206 // Gets the number of items in @list.208 // Gets the number of items in @list.
@@ -210,8 +212,8 @@ func (x *ListStore) GetItemType() []interface{} {
210 // @position until g_list_model_get_item() returns %NULL.212 // @position until g_list_model_get_item() returns %NULL.
211 func (x *ListStore) GetNItems() uint {213 func (x *ListStore) GetNItems() uint {
212 214
213- return XGListModelGetNItems(x.GoPointer())215+ cret := XGListModelGetNItems(x.GoPointer())
214-216+ return cret
215 }217 }
216 218
217 // Get the item at @position.219 // Get the item at @position.
@@ -227,16 +229,16 @@ func (x *ListStore) GetNItems() uint {
227 //229 //
228 // See also: g_list_model_get_n_items()230 // See also: g_list_model_get_n_items()
229 func (x *ListStore) GetObject(PositionVar uint) *gobject.Object {231 func (x *ListStore) GetObject(PositionVar uint) *gobject.Object {
232+ var cls *gobject.Object
230 233
231- GetObjectPtr := XGListModelGetObject(x.GoPointer(), PositionVar)234+ cret := XGListModelGetObject(x.GoPointer(), PositionVar)
232- if GetObjectPtr == 0 {
233- return nil
234- }
235-
236- GetObjectCls := &gobject.Object{}
237- GetObjectCls.Ptr = GetObjectPtr
238- return GetObjectCls
239 235
236+ if cret == 0 {
237+ return cls
238+ }
239+ cls = &gobject.Object{}
240+ cls.Ptr = cret
241+ return cls
240 }242 }
241 243
242 // Emits the #GListModel::items-changed signal on @list.244 // Emits the #GListModel::items-changed signal on @list.
M v4/gio/gloadableicon.go +29 -18
@@ -4,6 +4,7 @@ package gio
4 import (4 import (
5 "github.com/jwijenbergh/purego"5 "github.com/jwijenbergh/purego"
6 "github.com/jwijenbergh/puregotk/internal/core"6 "github.com/jwijenbergh/puregotk/internal/core"
7+ "github.com/jwijenbergh/puregotk/v4/glib"
7 )8 )
8 9
9 // Interface for icons that can be loaded as a stream.10 // Interface for icons that can be loaded as a stream.
@@ -34,16 +35,21 @@ func (x *LoadableIconBase) SetGoPointer(ptr uintptr) {
34 35
35 // Loads a loadable icon. For the asynchronous version of this function,36 // Loads a loadable icon. For the asynchronous version of this function,
36 // see g_loadable_icon_load_async().37 // see g_loadable_icon_load_async().
37-func (x *LoadableIconBase) Load(SizeVar int, TypeVar string, CancellableVar *Cancellable) *InputStream {38+func (x *LoadableIconBase) Load(SizeVar int, TypeVar string, CancellableVar *Cancellable) (*InputStream, error) {
39+ var cls *InputStream
40+ var cerr *glib.Error
38 41
39- LoadPtr := XGLoadableIconLoad(x.GoPointer(), SizeVar, TypeVar, CancellableVar.GoPointer())42+ cret := XGLoadableIconLoad(x.GoPointer(), SizeVar, TypeVar, CancellableVar.GoPointer(), &cerr)
40- if LoadPtr == 0 {
41- return nil
42- }
43 43
44- LoadCls := &InputStream{}44+ if cret == 0 {
45- LoadCls.Ptr = LoadPtr45+ return cls, cerr
46- return LoadCls46+ }
47+ cls = &InputStream{}
48+ cls.Ptr = cret
49+ if cerr == nil {
50+ return cls, nil
51+ }
52+ return cls, cerr
47 53
48 }54 }
49 55
@@ -57,22 +63,27 @@ func (x *LoadableIconBase) LoadAsync(SizeVar int, CancellableVar *Cancellable, C
57 }63 }
58 64
59 // Finishes an asynchronous icon load started in g_loadable_icon_load_async().65 // Finishes an asynchronous icon load started in g_loadable_icon_load_async().
60-func (x *LoadableIconBase) LoadFinish(ResVar AsyncResult, TypeVar string) *InputStream {66+func (x *LoadableIconBase) LoadFinish(ResVar AsyncResult, TypeVar string) (*InputStream, error) {
67+ var cls *InputStream
68+ var cerr *glib.Error
61 69
62- LoadFinishPtr := XGLoadableIconLoadFinish(x.GoPointer(), ResVar.GoPointer(), TypeVar)70+ cret := XGLoadableIconLoadFinish(x.GoPointer(), ResVar.GoPointer(), TypeVar, &cerr)
63- if LoadFinishPtr == 0 {
64- return nil
65- }
66 71
67- LoadFinishCls := &InputStream{}72+ if cret == 0 {
68- LoadFinishCls.Ptr = LoadFinishPtr73+ return cls, cerr
69- return LoadFinishCls74+ }
75+ cls = &InputStream{}
76+ cls.Ptr = cret
77+ if cerr == nil {
78+ return cls, nil
79+ }
80+ return cls, cerr
70 81
71 }82 }
72 83
73-var XGLoadableIconLoad func(uintptr, int, string, uintptr) uintptr84+var XGLoadableIconLoad func(uintptr, int, string, uintptr, **glib.Error) uintptr
74 var XGLoadableIconLoadAsync func(uintptr, int, uintptr, uintptr, uintptr)85 var XGLoadableIconLoadAsync func(uintptr, int, uintptr, uintptr, uintptr)
75-var XGLoadableIconLoadFinish func(uintptr, uintptr, string) uintptr86+var XGLoadableIconLoadFinish func(uintptr, uintptr, string, **glib.Error) uintptr
76 87
77 func init() {88 func init() {
78 lib, err := purego.Dlopen(core.GetPath("GIO"), purego.RTLD_NOW|purego.RTLD_GLOBAL)89 lib, err := purego.Dlopen(core.GetPath("GIO"), purego.RTLD_NOW|purego.RTLD_GLOBAL)
M v4/gio/gmemoryinputstream.go +60 -39
@@ -33,42 +33,48 @@ var xNewMemoryInputStream func() uintptr
33 33
34 // Creates a new empty #GMemoryInputStream.34 // Creates a new empty #GMemoryInputStream.
35 func NewMemoryInputStream() *InputStream {35 func NewMemoryInputStream() *InputStream {
36- NewMemoryInputStreamPtr := xNewMemoryInputStream()36+ var cls *InputStream
37- if NewMemoryInputStreamPtr == 0 {37+
38- return nil38+ cret := xNewMemoryInputStream()
39- }
40 39
41- NewMemoryInputStreamCls := &InputStream{}40+ if cret == 0 {
42- NewMemoryInputStreamCls.Ptr = NewMemoryInputStreamPtr41+ return cls
43- return NewMemoryInputStreamCls42+ }
43+ cls = &InputStream{}
44+ cls.Ptr = cret
45+ return cls
44 }46 }
45 47
46 var xNewFromBytesMemoryInputStream func(*glib.Bytes) uintptr48 var xNewFromBytesMemoryInputStream func(*glib.Bytes) uintptr
47 49
48 // Creates a new #GMemoryInputStream with data from the given @bytes.50 // Creates a new #GMemoryInputStream with data from the given @bytes.
49 func NewFromBytesMemoryInputStream(BytesVar *glib.Bytes) *InputStream {51 func NewFromBytesMemoryInputStream(BytesVar *glib.Bytes) *InputStream {
50- NewFromBytesMemoryInputStreamPtr := xNewFromBytesMemoryInputStream(BytesVar)52+ var cls *InputStream
51- if NewFromBytesMemoryInputStreamPtr == 0 {53+
52- return nil54+ cret := xNewFromBytesMemoryInputStream(BytesVar)
53- }
54 55
55- NewFromBytesMemoryInputStreamCls := &InputStream{}56+ if cret == 0 {
56- NewFromBytesMemoryInputStreamCls.Ptr = NewFromBytesMemoryInputStreamPtr57+ return cls
57- return NewFromBytesMemoryInputStreamCls58+ }
59+ cls = &InputStream{}
60+ cls.Ptr = cret
61+ return cls
58 }62 }
59 63
60 var xNewFromDataMemoryInputStream func(uintptr, int, uintptr) uintptr64 var xNewFromDataMemoryInputStream func(uintptr, int, uintptr) uintptr
61 65
62 // Creates a new #GMemoryInputStream with data in memory of a given size.66 // Creates a new #GMemoryInputStream with data in memory of a given size.
63 func NewFromDataMemoryInputStream(DataVar uintptr, LenVar int, DestroyVar glib.DestroyNotify) *InputStream {67 func NewFromDataMemoryInputStream(DataVar uintptr, LenVar int, DestroyVar glib.DestroyNotify) *InputStream {
64- NewFromDataMemoryInputStreamPtr := xNewFromDataMemoryInputStream(DataVar, LenVar, purego.NewCallback(DestroyVar))68+ var cls *InputStream
65- if NewFromDataMemoryInputStreamPtr == 0 {
66- return nil
67- }
68 69
69- NewFromDataMemoryInputStreamCls := &InputStream{}70+ cret := xNewFromDataMemoryInputStream(DataVar, LenVar, purego.NewCallback(DestroyVar))
70- NewFromDataMemoryInputStreamCls.Ptr = NewFromDataMemoryInputStreamPtr71+
71- return NewFromDataMemoryInputStreamCls72+ if cret == 0 {
73+ return cls
74+ }
75+ cls = &InputStream{}
76+ cls.Ptr = cret
77+ return cls
72 }78 }
73 79
74 var xMemoryInputStreamAddBytes func(uintptr, *glib.Bytes)80 var xMemoryInputStreamAddBytes func(uintptr, *glib.Bytes)
@@ -106,8 +112,8 @@ func (c *MemoryInputStream) SetGoPointer(ptr uintptr) {
106 // a stream cannot switch from pollable to non-pollable or vice versa.112 // a stream cannot switch from pollable to non-pollable or vice versa.
107 func (x *MemoryInputStream) CanPoll() bool {113 func (x *MemoryInputStream) CanPoll() bool {
108 114
109- return XGPollableInputStreamCanPoll(x.GoPointer())115+ cret := XGPollableInputStreamCanPoll(x.GoPointer())
110-116+ return cret
111 }117 }
112 118
113 // Creates a #GSource that triggers when @stream can be read, or119 // Creates a #GSource that triggers when @stream can be read, or
@@ -120,8 +126,8 @@ func (x *MemoryInputStream) CanPoll() bool {
120 // rather than g_input_stream_read() from the callback.126 // rather than g_input_stream_read() from the callback.
121 func (x *MemoryInputStream) CreateSource(CancellableVar *Cancellable) *glib.Source {127 func (x *MemoryInputStream) CreateSource(CancellableVar *Cancellable) *glib.Source {
122 128
123- return XGPollableInputStreamCreateSource(x.GoPointer(), CancellableVar.GoPointer())129+ cret := XGPollableInputStreamCreateSource(x.GoPointer(), CancellableVar.GoPointer())
124-130+ return cret
125 }131 }
126 132
127 // Checks if @stream can be read.133 // Checks if @stream can be read.
@@ -134,8 +140,8 @@ func (x *MemoryInputStream) CreateSource(CancellableVar *Cancellable) *glib.Sour
134 // %G_IO_ERROR_WOULD_BLOCK error rather than blocking.140 // %G_IO_ERROR_WOULD_BLOCK error rather than blocking.
135 func (x *MemoryInputStream) IsReadable() bool {141 func (x *MemoryInputStream) IsReadable() bool {
136 142
137- return XGPollableInputStreamIsReadable(x.GoPointer())143+ cret := XGPollableInputStreamIsReadable(x.GoPointer())
138-144+ return cret
139 }145 }
140 146
141 // Attempts to read up to @count bytes from @stream into @buffer, as147 // Attempts to read up to @count bytes from @stream into @buffer, as
@@ -149,25 +155,30 @@ func (x *MemoryInputStream) IsReadable() bool {
149 // if @cancellable has already been cancelled when you call, which155 // if @cancellable has already been cancelled when you call, which
150 // may happen if you call this method after a source triggers due156 // may happen if you call this method after a source triggers due
151 // to having been cancelled.157 // to having been cancelled.
152-func (x *MemoryInputStream) ReadNonblocking(BufferVar uintptr, CountVar uint, CancellableVar *Cancellable) int {158+func (x *MemoryInputStream) ReadNonblocking(BufferVar uintptr, CountVar uint, CancellableVar *Cancellable) (int, error) {
159+ var cerr *glib.Error
153 160
154- return XGPollableInputStreamReadNonblocking(x.GoPointer(), BufferVar, CountVar, CancellableVar.GoPointer())161+ cret := XGPollableInputStreamReadNonblocking(x.GoPointer(), BufferVar, CountVar, CancellableVar.GoPointer(), &cerr)
162+ if cerr == nil {
163+ return cret, nil
164+ }
165+ return cret, cerr
155 166
156 }167 }
157 168
158 // Tests if the stream supports the #GSeekableIface.169 // Tests if the stream supports the #GSeekableIface.
159 func (x *MemoryInputStream) CanSeek() bool {170 func (x *MemoryInputStream) CanSeek() bool {
160 171
161- return XGSeekableCanSeek(x.GoPointer())172+ cret := XGSeekableCanSeek(x.GoPointer())
162-173+ return cret
163 }174 }
164 175
165 // Tests if the length of the stream can be adjusted with176 // Tests if the length of the stream can be adjusted with
166 // g_seekable_truncate().177 // g_seekable_truncate().
167 func (x *MemoryInputStream) CanTruncate() bool {178 func (x *MemoryInputStream) CanTruncate() bool {
168 179
169- return XGSeekableCanTruncate(x.GoPointer())180+ cret := XGSeekableCanTruncate(x.GoPointer())
170-181+ return cret
171 }182 }
172 183
173 // Seeks in the stream by the given @offset, modified by @type.184 // Seeks in the stream by the given @offset, modified by @type.
@@ -184,17 +195,22 @@ func (x *MemoryInputStream) CanTruncate() bool {
184 // If @cancellable is not %NULL, then the operation can be cancelled by195 // If @cancellable is not %NULL, then the operation can be cancelled by
185 // triggering the cancellable object from another thread. If the operation196 // triggering the cancellable object from another thread. If the operation
186 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.197 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
187-func (x *MemoryInputStream) Seek(OffsetVar int64, TypeVar glib.SeekType, CancellableVar *Cancellable) bool {198+func (x *MemoryInputStream) Seek(OffsetVar int64, TypeVar glib.SeekType, CancellableVar *Cancellable) (bool, error) {
199+ var cerr *glib.Error
188 200
189- return XGSeekableSeek(x.GoPointer(), OffsetVar, TypeVar, CancellableVar.GoPointer())201+ cret := XGSeekableSeek(x.GoPointer(), OffsetVar, TypeVar, CancellableVar.GoPointer(), &cerr)
202+ if cerr == nil {
203+ return cret, nil
204+ }
205+ return cret, cerr
190 206
191 }207 }
192 208
193 // Tells the current position within the stream.209 // Tells the current position within the stream.
194 func (x *MemoryInputStream) Tell() int64 {210 func (x *MemoryInputStream) Tell() int64 {
195 211
196- return XGSeekableTell(x.GoPointer())212+ cret := XGSeekableTell(x.GoPointer())
197-213+ return cret
198 }214 }
199 215
200 // Sets the length of the stream to @offset. If the stream was previously216 // Sets the length of the stream to @offset. If the stream was previously
@@ -206,9 +222,14 @@ func (x *MemoryInputStream) Tell() int64 {
206 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an222 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
207 // operation was partially finished when the operation was cancelled the223 // operation was partially finished when the operation was cancelled the
208 // partial result will be returned, without an error.224 // partial result will be returned, without an error.
209-func (x *MemoryInputStream) Truncate(OffsetVar int64, CancellableVar *Cancellable) bool {225+func (x *MemoryInputStream) Truncate(OffsetVar int64, CancellableVar *Cancellable) (bool, error) {
226+ var cerr *glib.Error
210 227
211- return XGSeekableTruncate(x.GoPointer(), OffsetVar, CancellableVar.GoPointer())228+ cret := XGSeekableTruncate(x.GoPointer(), OffsetVar, CancellableVar.GoPointer(), &cerr)
229+ if cerr == nil {
230+ return cret, nil
231+ }
232+ return cret, cerr
212 233
213 }234 }
214 235
M v4/gio/gmemorymonitor.go +8 -8
@@ -80,16 +80,16 @@ var xMemoryMonitorDupDefault func() uintptr
80 80
81 // Gets a reference to the default #GMemoryMonitor for the system.81 // Gets a reference to the default #GMemoryMonitor for the system.
82 func MemoryMonitorDupDefault() *MemoryMonitorBase {82 func MemoryMonitorDupDefault() *MemoryMonitorBase {
83+ var cls *MemoryMonitorBase
83 84
84- MemoryMonitorDupDefaultPtr := xMemoryMonitorDupDefault()85+ cret := xMemoryMonitorDupDefault()
85- if MemoryMonitorDupDefaultPtr == 0 {
86- return nil
87- }
88-
89- MemoryMonitorDupDefaultCls := &MemoryMonitorBase{}
90- MemoryMonitorDupDefaultCls.Ptr = MemoryMonitorDupDefaultPtr
91- return MemoryMonitorDupDefaultCls
92 86
87+ if cret == 0 {
88+ return cls
89+ }
90+ cls = &MemoryMonitorBase{}
91+ cls.Ptr = cret
92+ return cls
93 }93 }
94 94
95 func init() {95 func init() {
M v4/gio/gmemoryoutputstream.go +68 -44
@@ -79,14 +79,16 @@ var xNewMemoryOutputStream func(uintptr, uint, uintptr, uintptr) uintptr
79 // stream3 = g_memory_output_stream_new (data, 200, NULL, free);79 // stream3 = g_memory_output_stream_new (data, 200, NULL, free);
80 // ]|80 // ]|
81 func NewMemoryOutputStream(DataVar uintptr, SizeVar uint, ReallocFunctionVar ReallocFunc, DestroyFunctionVar glib.DestroyNotify) *OutputStream {81 func NewMemoryOutputStream(DataVar uintptr, SizeVar uint, ReallocFunctionVar ReallocFunc, DestroyFunctionVar glib.DestroyNotify) *OutputStream {
82- NewMemoryOutputStreamPtr := xNewMemoryOutputStream(DataVar, SizeVar, purego.NewCallback(ReallocFunctionVar), purego.NewCallback(DestroyFunctionVar))82+ var cls *OutputStream
83- if NewMemoryOutputStreamPtr == 0 {83+
84- return nil84+ cret := xNewMemoryOutputStream(DataVar, SizeVar, purego.NewCallback(ReallocFunctionVar), purego.NewCallback(DestroyFunctionVar))
85- }
86 85
87- NewMemoryOutputStreamCls := &OutputStream{}86+ if cret == 0 {
88- NewMemoryOutputStreamCls.Ptr = NewMemoryOutputStreamPtr87+ return cls
89- return NewMemoryOutputStreamCls88+ }
89+ cls = &OutputStream{}
90+ cls.Ptr = cret
91+ return cls
90 }92 }
91 93
92 var xNewResizableMemoryOutputStream func() uintptr94 var xNewResizableMemoryOutputStream func() uintptr
@@ -94,14 +96,16 @@ var xNewResizableMemoryOutputStream func() uintptr
94 // Creates a new #GMemoryOutputStream, using g_realloc() and g_free()96 // Creates a new #GMemoryOutputStream, using g_realloc() and g_free()
95 // for memory allocation.97 // for memory allocation.
96 func NewResizableMemoryOutputStream() *OutputStream {98 func NewResizableMemoryOutputStream() *OutputStream {
97- NewResizableMemoryOutputStreamPtr := xNewResizableMemoryOutputStream()99+ var cls *OutputStream
98- if NewResizableMemoryOutputStreamPtr == 0 {100+
99- return nil101+ cret := xNewResizableMemoryOutputStream()
100- }
101 102
102- NewResizableMemoryOutputStreamCls := &OutputStream{}103+ if cret == 0 {
103- NewResizableMemoryOutputStreamCls.Ptr = NewResizableMemoryOutputStreamPtr104+ return cls
104- return NewResizableMemoryOutputStreamCls105+ }
106+ cls = &OutputStream{}
107+ cls.Ptr = cret
108+ return cls
105 }109 }
106 110
107 var xMemoryOutputStreamGetData func(uintptr) uintptr111 var xMemoryOutputStreamGetData func(uintptr) uintptr
@@ -112,8 +116,8 @@ var xMemoryOutputStreamGetData func(uintptr) uintptr
112 // write or truncate operation on the stream.116 // write or truncate operation on the stream.
113 func (x *MemoryOutputStream) GetData() uintptr {117 func (x *MemoryOutputStream) GetData() uintptr {
114 118
115- return xMemoryOutputStreamGetData(x.GoPointer())119+ cret := xMemoryOutputStreamGetData(x.GoPointer())
116-120+ return cret
117 }121 }
118 122
119 var xMemoryOutputStreamGetDataSize func(uintptr) uint123 var xMemoryOutputStreamGetDataSize func(uintptr) uint
@@ -122,8 +126,8 @@ var xMemoryOutputStreamGetDataSize func(uintptr) uint
122 // byte written in the stream that has not been truncated away.126 // byte written in the stream that has not been truncated away.
123 func (x *MemoryOutputStream) GetDataSize() uint {127 func (x *MemoryOutputStream) GetDataSize() uint {
124 128
125- return xMemoryOutputStreamGetDataSize(x.GoPointer())129+ cret := xMemoryOutputStreamGetDataSize(x.GoPointer())
126-130+ return cret
127 }131 }
128 132
129 var xMemoryOutputStreamGetSize func(uintptr) uint133 var xMemoryOutputStreamGetSize func(uintptr) uint
@@ -145,8 +149,8 @@ var xMemoryOutputStreamGetSize func(uintptr) uint
145 // stream, use g_memory_output_stream_get_data_size().149 // stream, use g_memory_output_stream_get_data_size().
146 func (x *MemoryOutputStream) GetSize() uint {150 func (x *MemoryOutputStream) GetSize() uint {
147 151
148- return xMemoryOutputStreamGetSize(x.GoPointer())152+ cret := xMemoryOutputStreamGetSize(x.GoPointer())
149-153+ return cret
150 }154 }
151 155
152 var xMemoryOutputStreamStealAsBytes func(uintptr) *glib.Bytes156 var xMemoryOutputStreamStealAsBytes func(uintptr) *glib.Bytes
@@ -155,8 +159,8 @@ var xMemoryOutputStreamStealAsBytes func(uintptr) *glib.Bytes
155 // closed before calling this function.159 // closed before calling this function.
156 func (x *MemoryOutputStream) StealAsBytes() *glib.Bytes {160 func (x *MemoryOutputStream) StealAsBytes() *glib.Bytes {
157 161
158- return xMemoryOutputStreamStealAsBytes(x.GoPointer())162+ cret := xMemoryOutputStreamStealAsBytes(x.GoPointer())
159-163+ return cret
160 }164 }
161 165
162 var xMemoryOutputStreamStealData func(uintptr) uintptr166 var xMemoryOutputStreamStealData func(uintptr) uintptr
@@ -169,8 +173,8 @@ var xMemoryOutputStreamStealData func(uintptr) uintptr
169 // @ostream must be closed before calling this function.173 // @ostream must be closed before calling this function.
170 func (x *MemoryOutputStream) StealData() uintptr {174 func (x *MemoryOutputStream) StealData() uintptr {
171 175
172- return xMemoryOutputStreamStealData(x.GoPointer())176+ cret := xMemoryOutputStreamStealData(x.GoPointer())
173-177+ return cret
174 }178 }
175 179
176 func (c *MemoryOutputStream) GoPointer() uintptr {180 func (c *MemoryOutputStream) GoPointer() uintptr {
@@ -190,8 +194,8 @@ func (c *MemoryOutputStream) SetGoPointer(ptr uintptr) {
190 // a stream cannot switch from pollable to non-pollable or vice versa.194 // a stream cannot switch from pollable to non-pollable or vice versa.
191 func (x *MemoryOutputStream) CanPoll() bool {195 func (x *MemoryOutputStream) CanPoll() bool {
192 196
193- return XGPollableOutputStreamCanPoll(x.GoPointer())197+ cret := XGPollableOutputStreamCanPoll(x.GoPointer())
194-198+ return cret
195 }199 }
196 200
197 // Creates a #GSource that triggers when @stream can be written, or201 // Creates a #GSource that triggers when @stream can be written, or
@@ -204,8 +208,8 @@ func (x *MemoryOutputStream) CanPoll() bool {
204 // rather than g_output_stream_write() from the callback.208 // rather than g_output_stream_write() from the callback.
205 func (x *MemoryOutputStream) CreateSource(CancellableVar *Cancellable) *glib.Source {209 func (x *MemoryOutputStream) CreateSource(CancellableVar *Cancellable) *glib.Source {
206 210
207- return XGPollableOutputStreamCreateSource(x.GoPointer(), CancellableVar.GoPointer())211+ cret := XGPollableOutputStreamCreateSource(x.GoPointer(), CancellableVar.GoPointer())
208-212+ return cret
209 }213 }
210 214
211 // Checks if @stream can be written.215 // Checks if @stream can be written.
@@ -218,8 +222,8 @@ func (x *MemoryOutputStream) CreateSource(CancellableVar *Cancellable) *glib.Sou
218 // %G_IO_ERROR_WOULD_BLOCK error rather than blocking.222 // %G_IO_ERROR_WOULD_BLOCK error rather than blocking.
219 func (x *MemoryOutputStream) IsWritable() bool {223 func (x *MemoryOutputStream) IsWritable() bool {
220 224
221- return XGPollableOutputStreamIsWritable(x.GoPointer())225+ cret := XGPollableOutputStreamIsWritable(x.GoPointer())
222-226+ return cret
223 }227 }
224 228
225 // Attempts to write up to @count bytes from @buffer to @stream, as229 // Attempts to write up to @count bytes from @buffer to @stream, as
@@ -237,9 +241,14 @@ func (x *MemoryOutputStream) IsWritable() bool {
237 // Also note that if %G_IO_ERROR_WOULD_BLOCK is returned some underlying241 // Also note that if %G_IO_ERROR_WOULD_BLOCK is returned some underlying
238 // transports like D/TLS require that you re-send the same @buffer and242 // transports like D/TLS require that you re-send the same @buffer and
239 // @count in the next write call.243 // @count in the next write call.
240-func (x *MemoryOutputStream) WriteNonblocking(BufferVar uintptr, CountVar uint, CancellableVar *Cancellable) int {244+func (x *MemoryOutputStream) WriteNonblocking(BufferVar uintptr, CountVar uint, CancellableVar *Cancellable) (int, error) {
245+ var cerr *glib.Error
241 246
242- return XGPollableOutputStreamWriteNonblocking(x.GoPointer(), BufferVar, CountVar, CancellableVar.GoPointer())247+ cret := XGPollableOutputStreamWriteNonblocking(x.GoPointer(), BufferVar, CountVar, CancellableVar.GoPointer(), &cerr)
248+ if cerr == nil {
249+ return cret, nil
250+ }
251+ return cret, cerr
243 252
244 }253 }
245 254
@@ -259,25 +268,30 @@ func (x *MemoryOutputStream) WriteNonblocking(BufferVar uintptr, CountVar uint,
259 // Also note that if %G_POLLABLE_RETURN_WOULD_BLOCK is returned some underlying268 // Also note that if %G_POLLABLE_RETURN_WOULD_BLOCK is returned some underlying
260 // transports like D/TLS require that you re-send the same @vectors and269 // transports like D/TLS require that you re-send the same @vectors and
261 // @n_vectors in the next write call.270 // @n_vectors in the next write call.
262-func (x *MemoryOutputStream) WritevNonblocking(VectorsVar uintptr, NVectorsVar uint, BytesWrittenVar uint, CancellableVar *Cancellable) PollableReturn {271+func (x *MemoryOutputStream) WritevNonblocking(VectorsVar uintptr, NVectorsVar uint, BytesWrittenVar uint, CancellableVar *Cancellable) (PollableReturn, error) {
272+ var cerr *glib.Error
263 273
264- return XGPollableOutputStreamWritevNonblocking(x.GoPointer(), VectorsVar, NVectorsVar, BytesWrittenVar, CancellableVar.GoPointer())274+ cret := XGPollableOutputStreamWritevNonblocking(x.GoPointer(), VectorsVar, NVectorsVar, BytesWrittenVar, CancellableVar.GoPointer(), &cerr)
275+ if cerr == nil {
276+ return cret, nil
277+ }
278+ return cret, cerr
265 279
266 }280 }
267 281
268 // Tests if the stream supports the #GSeekableIface.282 // Tests if the stream supports the #GSeekableIface.
269 func (x *MemoryOutputStream) CanSeek() bool {283 func (x *MemoryOutputStream) CanSeek() bool {
270 284
271- return XGSeekableCanSeek(x.GoPointer())285+ cret := XGSeekableCanSeek(x.GoPointer())
272-286+ return cret
273 }287 }
274 288
275 // Tests if the length of the stream can be adjusted with289 // Tests if the length of the stream can be adjusted with
276 // g_seekable_truncate().290 // g_seekable_truncate().
277 func (x *MemoryOutputStream) CanTruncate() bool {291 func (x *MemoryOutputStream) CanTruncate() bool {
278 292
279- return XGSeekableCanTruncate(x.GoPointer())293+ cret := XGSeekableCanTruncate(x.GoPointer())
280-294+ return cret
281 }295 }
282 296
283 // Seeks in the stream by the given @offset, modified by @type.297 // Seeks in the stream by the given @offset, modified by @type.
@@ -294,17 +308,22 @@ func (x *MemoryOutputStream) CanTruncate() bool {
294 // If @cancellable is not %NULL, then the operation can be cancelled by308 // If @cancellable is not %NULL, then the operation can be cancelled by
295 // triggering the cancellable object from another thread. If the operation309 // triggering the cancellable object from another thread. If the operation
296 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.310 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
297-func (x *MemoryOutputStream) Seek(OffsetVar int64, TypeVar glib.SeekType, CancellableVar *Cancellable) bool {311+func (x *MemoryOutputStream) Seek(OffsetVar int64, TypeVar glib.SeekType, CancellableVar *Cancellable) (bool, error) {
312+ var cerr *glib.Error
298 313
299- return XGSeekableSeek(x.GoPointer(), OffsetVar, TypeVar, CancellableVar.GoPointer())314+ cret := XGSeekableSeek(x.GoPointer(), OffsetVar, TypeVar, CancellableVar.GoPointer(), &cerr)
315+ if cerr == nil {
316+ return cret, nil
317+ }
318+ return cret, cerr
300 319
301 }320 }
302 321
303 // Tells the current position within the stream.322 // Tells the current position within the stream.
304 func (x *MemoryOutputStream) Tell() int64 {323 func (x *MemoryOutputStream) Tell() int64 {
305 324
306- return XGSeekableTell(x.GoPointer())325+ cret := XGSeekableTell(x.GoPointer())
307-326+ return cret
308 }327 }
309 328
310 // Sets the length of the stream to @offset. If the stream was previously329 // Sets the length of the stream to @offset. If the stream was previously
@@ -316,9 +335,14 @@ func (x *MemoryOutputStream) Tell() int64 {
316 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an335 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
317 // operation was partially finished when the operation was cancelled the336 // operation was partially finished when the operation was cancelled the
318 // partial result will be returned, without an error.337 // partial result will be returned, without an error.
319-func (x *MemoryOutputStream) Truncate(OffsetVar int64, CancellableVar *Cancellable) bool {338+func (x *MemoryOutputStream) Truncate(OffsetVar int64, CancellableVar *Cancellable) (bool, error) {
339+ var cerr *glib.Error
320 340
321- return XGSeekableTruncate(x.GoPointer(), OffsetVar, CancellableVar.GoPointer())341+ cret := XGSeekableTruncate(x.GoPointer(), OffsetVar, CancellableVar.GoPointer(), &cerr)
342+ if cerr == nil {
343+ return cret, nil
344+ }
345+ return cret, cerr
322 346
323 }347 }
324 348
M v4/gio/gmenumodel.go +54 -54
@@ -49,8 +49,8 @@ var xMenuAttributeIterGetName func(uintptr) string
49 // The iterator is not advanced.49 // The iterator is not advanced.
50 func (x *MenuAttributeIter) GetName() string {50 func (x *MenuAttributeIter) GetName() string {
51 51
52- return xMenuAttributeIterGetName(x.GoPointer())52+ cret := xMenuAttributeIterGetName(x.GoPointer())
53-53+ return cret
54 }54 }
55 55
56 var xMenuAttributeIterGetNext func(uintptr, string, **glib.Variant) bool56 var xMenuAttributeIterGetNext func(uintptr, string, **glib.Variant) bool
@@ -72,8 +72,8 @@ var xMenuAttributeIterGetNext func(uintptr, string, **glib.Variant) bool
72 // be unreffed using g_variant_unref() when it is no longer in use.72 // be unreffed using g_variant_unref() when it is no longer in use.
73 func (x *MenuAttributeIter) GetNext(OutNameVar string, ValueVar **glib.Variant) bool {73 func (x *MenuAttributeIter) GetNext(OutNameVar string, ValueVar **glib.Variant) bool {
74 74
75- return xMenuAttributeIterGetNext(x.GoPointer(), OutNameVar, ValueVar)75+ cret := xMenuAttributeIterGetNext(x.GoPointer(), OutNameVar, ValueVar)
76-76+ return cret
77 }77 }
78 78
79 var xMenuAttributeIterGetValue func(uintptr) *glib.Variant79 var xMenuAttributeIterGetValue func(uintptr) *glib.Variant
@@ -83,8 +83,8 @@ var xMenuAttributeIterGetValue func(uintptr) *glib.Variant
83 // The iterator is not advanced.83 // The iterator is not advanced.
84 func (x *MenuAttributeIter) GetValue() *glib.Variant {84 func (x *MenuAttributeIter) GetValue() *glib.Variant {
85 85
86- return xMenuAttributeIterGetValue(x.GoPointer())86+ cret := xMenuAttributeIterGetValue(x.GoPointer())
87-87+ return cret
88 }88 }
89 89
90 var xMenuAttributeIterNext func(uintptr) bool90 var xMenuAttributeIterNext func(uintptr) bool
@@ -100,8 +100,8 @@ var xMenuAttributeIterNext func(uintptr) bool
100 // attribute exists at all).100 // attribute exists at all).
101 func (x *MenuAttributeIter) Next() bool {101 func (x *MenuAttributeIter) Next() bool {
102 102
103- return xMenuAttributeIterNext(x.GoPointer())103+ cret := xMenuAttributeIterNext(x.GoPointer())
104-104+ return cret
105 }105 }
106 106
107 func (c *MenuAttributeIter) GoPointer() uintptr {107 func (c *MenuAttributeIter) GoPointer() uintptr {
@@ -131,8 +131,8 @@ var xMenuLinkIterGetName func(uintptr) string
131 // The iterator is not advanced.131 // The iterator is not advanced.
132 func (x *MenuLinkIter) GetName() string {132 func (x *MenuLinkIter) GetName() string {
133 133
134- return xMenuLinkIterGetName(x.GoPointer())134+ cret := xMenuLinkIterGetName(x.GoPointer())
135-135+ return cret
136 }136 }
137 137
138 var xMenuLinkIterGetNext func(uintptr, string, *uintptr) bool138 var xMenuLinkIterGetNext func(uintptr, string, *uintptr) bool
@@ -153,8 +153,8 @@ var xMenuLinkIterGetNext func(uintptr, string, *uintptr) bool
153 // be unreffed using g_object_unref() when it is no longer in use.153 // be unreffed using g_object_unref() when it is no longer in use.
154 func (x *MenuLinkIter) GetNext(OutLinkVar string, ValueVar **MenuModel) bool {154 func (x *MenuLinkIter) GetNext(OutLinkVar string, ValueVar **MenuModel) bool {
155 155
156- return xMenuLinkIterGetNext(x.GoPointer(), OutLinkVar, gobject.ConvertPtr(ValueVar))156+ cret := xMenuLinkIterGetNext(x.GoPointer(), OutLinkVar, gobject.ConvertPtr(ValueVar))
157-157+ return cret
158 }158 }
159 159
160 var xMenuLinkIterGetValue func(uintptr) uintptr160 var xMenuLinkIterGetValue func(uintptr) uintptr
@@ -163,16 +163,16 @@ var xMenuLinkIterGetValue func(uintptr) uintptr
163 //163 //
164 // The iterator is not advanced.164 // The iterator is not advanced.
165 func (x *MenuLinkIter) GetValue() *MenuModel {165 func (x *MenuLinkIter) GetValue() *MenuModel {
166+ var cls *MenuModel
166 167
167- GetValuePtr := xMenuLinkIterGetValue(x.GoPointer())168+ cret := xMenuLinkIterGetValue(x.GoPointer())
168- if GetValuePtr == 0 {
169- return nil
170- }
171-
172- GetValueCls := &MenuModel{}
173- GetValueCls.Ptr = GetValuePtr
174- return GetValueCls
175 169
170+ if cret == 0 {
171+ return cls
172+ }
173+ cls = &MenuModel{}
174+ cls.Ptr = cret
175+ return cls
176 }176 }
177 177
178 var xMenuLinkIterNext func(uintptr) bool178 var xMenuLinkIterNext func(uintptr) bool
@@ -187,8 +187,8 @@ var xMenuLinkIterNext func(uintptr) bool
187 // at all).187 // at all).
188 func (x *MenuLinkIter) Next() bool {188 func (x *MenuLinkIter) Next() bool {
189 189
190- return xMenuLinkIterNext(x.GoPointer())190+ cret := xMenuLinkIterNext(x.GoPointer())
191-191+ return cret
192 }192 }
193 193
194 func (c *MenuLinkIter) GoPointer() uintptr {194 func (c *MenuLinkIter) GoPointer() uintptr {
@@ -342,8 +342,8 @@ var xMenuModelGetItemAttribute func(uintptr, int, string, string, ...interface{}
342 // particular, no '&' characters are allowed in @format_string.342 // particular, no '&' characters are allowed in @format_string.
343 func (x *MenuModel) GetItemAttribute(ItemIndexVar int, AttributeVar string, FormatStringVar string, varArgs ...interface{}) bool {343 func (x *MenuModel) GetItemAttribute(ItemIndexVar int, AttributeVar string, FormatStringVar string, varArgs ...interface{}) bool {
344 344
345- return xMenuModelGetItemAttribute(x.GoPointer(), ItemIndexVar, AttributeVar, FormatStringVar, varArgs...)345+ cret := xMenuModelGetItemAttribute(x.GoPointer(), ItemIndexVar, AttributeVar, FormatStringVar, varArgs...)
346-346+ return cret
347 }347 }
348 348
349 var xMenuModelGetItemAttributeValue func(uintptr, int, string, *glib.VariantType) *glib.Variant349 var xMenuModelGetItemAttributeValue func(uintptr, int, string, *glib.VariantType) *glib.Variant
@@ -361,8 +361,8 @@ var xMenuModelGetItemAttributeValue func(uintptr, int, string, *glib.VariantType
361 // then %NULL is returned.361 // then %NULL is returned.
362 func (x *MenuModel) GetItemAttributeValue(ItemIndexVar int, AttributeVar string, ExpectedTypeVar *glib.VariantType) *glib.Variant {362 func (x *MenuModel) GetItemAttributeValue(ItemIndexVar int, AttributeVar string, ExpectedTypeVar *glib.VariantType) *glib.Variant {
363 363
364- return xMenuModelGetItemAttributeValue(x.GoPointer(), ItemIndexVar, AttributeVar, ExpectedTypeVar)364+ cret := xMenuModelGetItemAttributeValue(x.GoPointer(), ItemIndexVar, AttributeVar, ExpectedTypeVar)
365-365+ return cret
366 }366 }
367 367
368 var xMenuModelGetItemLink func(uintptr, int, string) uintptr368 var xMenuModelGetItemLink func(uintptr, int, string) uintptr
@@ -373,16 +373,16 @@ var xMenuModelGetItemLink func(uintptr, int, string) uintptr
373 // If the link exists, the linked #GMenuModel is returned. If the link373 // If the link exists, the linked #GMenuModel is returned. If the link
374 // does not exist, %NULL is returned.374 // does not exist, %NULL is returned.
375 func (x *MenuModel) GetItemLink(ItemIndexVar int, LinkVar string) *MenuModel {375 func (x *MenuModel) GetItemLink(ItemIndexVar int, LinkVar string) *MenuModel {
376+ var cls *MenuModel
376 377
377- GetItemLinkPtr := xMenuModelGetItemLink(x.GoPointer(), ItemIndexVar, LinkVar)378+ cret := xMenuModelGetItemLink(x.GoPointer(), ItemIndexVar, LinkVar)
378- if GetItemLinkPtr == 0 {
379- return nil
380- }
381-
382- GetItemLinkCls := &MenuModel{}
383- GetItemLinkCls.Ptr = GetItemLinkPtr
384- return GetItemLinkCls
385 379
380+ if cret == 0 {
381+ return cls
382+ }
383+ cls = &MenuModel{}
384+ cls.Ptr = cret
385+ return cls
386 }386 }
387 387
388 var xMenuModelGetNItems func(uintptr) int388 var xMenuModelGetNItems func(uintptr) int
@@ -390,8 +390,8 @@ var xMenuModelGetNItems func(uintptr) int
390 // Query the number of items in @model.390 // Query the number of items in @model.
391 func (x *MenuModel) GetNItems() int {391 func (x *MenuModel) GetNItems() int {
392 392
393- return xMenuModelGetNItems(x.GoPointer())393+ cret := xMenuModelGetNItems(x.GoPointer())
394-394+ return cret
395 }395 }
396 396
397 var xMenuModelIsMutable func(uintptr) bool397 var xMenuModelIsMutable func(uintptr) bool
@@ -402,8 +402,8 @@ var xMenuModelIsMutable func(uintptr) bool
402 // signal. Consumers of the model may make optimisations accordingly.402 // signal. Consumers of the model may make optimisations accordingly.
403 func (x *MenuModel) IsMutable() bool {403 func (x *MenuModel) IsMutable() bool {
404 404
405- return xMenuModelIsMutable(x.GoPointer())405+ cret := xMenuModelIsMutable(x.GoPointer())
406-406+ return cret
407 }407 }
408 408
409 var xMenuModelItemsChanged func(uintptr, int, int, int)409 var xMenuModelItemsChanged func(uintptr, int, int, int)
@@ -436,16 +436,16 @@ var xMenuModelIterateItemAttributes func(uintptr, int) uintptr
436 //436 //
437 // You must free the iterator with g_object_unref() when you are done.437 // You must free the iterator with g_object_unref() when you are done.
438 func (x *MenuModel) IterateItemAttributes(ItemIndexVar int) *MenuAttributeIter {438 func (x *MenuModel) IterateItemAttributes(ItemIndexVar int) *MenuAttributeIter {
439+ var cls *MenuAttributeIter
439 440
440- IterateItemAttributesPtr := xMenuModelIterateItemAttributes(x.GoPointer(), ItemIndexVar)441+ cret := xMenuModelIterateItemAttributes(x.GoPointer(), ItemIndexVar)
441- if IterateItemAttributesPtr == 0 {
442- return nil
443- }
444-
445- IterateItemAttributesCls := &MenuAttributeIter{}
446- IterateItemAttributesCls.Ptr = IterateItemAttributesPtr
447- return IterateItemAttributesCls
448 442
443+ if cret == 0 {
444+ return cls
445+ }
446+ cls = &MenuAttributeIter{}
447+ cls.Ptr = cret
448+ return cls
449 }449 }
450 450
451 var xMenuModelIterateItemLinks func(uintptr, int) uintptr451 var xMenuModelIterateItemLinks func(uintptr, int) uintptr
@@ -455,16 +455,16 @@ var xMenuModelIterateItemLinks func(uintptr, int) uintptr
455 //455 //
456 // You must free the iterator with g_object_unref() when you are done.456 // You must free the iterator with g_object_unref() when you are done.
457 func (x *MenuModel) IterateItemLinks(ItemIndexVar int) *MenuLinkIter {457 func (x *MenuModel) IterateItemLinks(ItemIndexVar int) *MenuLinkIter {
458+ var cls *MenuLinkIter
458 459
459- IterateItemLinksPtr := xMenuModelIterateItemLinks(x.GoPointer(), ItemIndexVar)460+ cret := xMenuModelIterateItemLinks(x.GoPointer(), ItemIndexVar)
460- if IterateItemLinksPtr == 0 {
461- return nil
462- }
463-
464- IterateItemLinksCls := &MenuLinkIter{}
465- IterateItemLinksCls.Ptr = IterateItemLinksPtr
466- return IterateItemLinksCls
467 461
462+ if cret == 0 {
463+ return cls
464+ }
465+ cls = &MenuLinkIter{}
466+ cls.Ptr = cret
467+ return cls
468 }468 }
469 469
470 func (c *MenuModel) GoPointer() uintptr {470 func (c *MenuModel) GoPointer() uintptr {
M v4/gio/gmount.go +117 -81
@@ -4,6 +4,7 @@ package gio
4 import (4 import (
5 "github.com/jwijenbergh/purego"5 "github.com/jwijenbergh/purego"
6 "github.com/jwijenbergh/puregotk/internal/core"6 "github.com/jwijenbergh/puregotk/internal/core"
7+ "github.com/jwijenbergh/puregotk/v4/glib"
7 )8 )
8 9
9 // Interface for implementing operations for mounts.10 // Interface for implementing operations for mounts.
@@ -76,15 +77,15 @@ func (x *MountBase) SetGoPointer(ptr uintptr) {
76 // Checks if @mount can be ejected.77 // Checks if @mount can be ejected.
77 func (x *MountBase) CanEject() bool {78 func (x *MountBase) CanEject() bool {
78 79
79- return XGMountCanEject(x.GoPointer())80+ cret := XGMountCanEject(x.GoPointer())
80-81+ return cret
81 }82 }
82 83
83 // Checks if @mount can be unmounted.84 // Checks if @mount can be unmounted.
84 func (x *MountBase) CanUnmount() bool {85 func (x *MountBase) CanUnmount() bool {
85 86
86- return XGMountCanUnmount(x.GoPointer())87+ cret := XGMountCanUnmount(x.GoPointer())
87-88+ return cret
88 }89 }
89 90
90 // Ejects a mount. This is an asynchronous operation, and is91 // Ejects a mount. This is an asynchronous operation, and is
@@ -98,9 +99,14 @@ func (x *MountBase) Eject(FlagsVar MountUnmountFlags, CancellableVar *Cancellabl
98 99
99 // Finishes ejecting a mount. If any errors occurred during the operation,100 // Finishes ejecting a mount. If any errors occurred during the operation,
100 // @error will be set to contain the errors and %FALSE will be returned.101 // @error will be set to contain the errors and %FALSE will be returned.
101-func (x *MountBase) EjectFinish(ResultVar AsyncResult) bool {102+func (x *MountBase) EjectFinish(ResultVar AsyncResult) (bool, error) {
103+ var cerr *glib.Error
102 104
103- return XGMountEjectFinish(x.GoPointer(), ResultVar.GoPointer())105+ cret := XGMountEjectFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
106+ if cerr == nil {
107+ return cret, nil
108+ }
109+ return cret, cerr
104 110
105 }111 }
106 112
@@ -115,9 +121,14 @@ func (x *MountBase) EjectWithOperation(FlagsVar MountUnmountFlags, MountOperatio
115 121
116 // Finishes ejecting a mount. If any errors occurred during the operation,122 // Finishes ejecting a mount. If any errors occurred during the operation,
117 // @error will be set to contain the errors and %FALSE will be returned.123 // @error will be set to contain the errors and %FALSE will be returned.
118-func (x *MountBase) EjectWithOperationFinish(ResultVar AsyncResult) bool {124+func (x *MountBase) EjectWithOperationFinish(ResultVar AsyncResult) (bool, error) {
125+ var cerr *glib.Error
119 126
120- return XGMountEjectWithOperationFinish(x.GoPointer(), ResultVar.GoPointer())127+ cret := XGMountEjectWithOperationFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
128+ if cerr == nil {
129+ return cret, nil
130+ }
131+ return cret, cerr
121 132
122 }133 }
123 134
@@ -125,16 +136,16 @@ func (x *MountBase) EjectWithOperationFinish(ResultVar AsyncResult) bool {
125 // @mount is a path that reflects the main entry point for the user (e.g.136 // @mount is a path that reflects the main entry point for the user (e.g.
126 // the home directory, or the root of the volume).137 // the home directory, or the root of the volume).
127 func (x *MountBase) GetDefaultLocation() *FileBase {138 func (x *MountBase) GetDefaultLocation() *FileBase {
139+ var cls *FileBase
128 140
129- GetDefaultLocationPtr := XGMountGetDefaultLocation(x.GoPointer())141+ cret := XGMountGetDefaultLocation(x.GoPointer())
130- if GetDefaultLocationPtr == 0 {
131- return nil
132- }
133-
134- GetDefaultLocationCls := &FileBase{}
135- GetDefaultLocationCls.Ptr = GetDefaultLocationPtr
136- return GetDefaultLocationCls
137 142
143+ if cret == 0 {
144+ return cls
145+ }
146+ cls = &FileBase{}
147+ cls.Ptr = cret
148+ return cls
138 }149 }
139 150
140 // Gets the drive for the @mount.151 // Gets the drive for the @mount.
@@ -142,72 +153,72 @@ func (x *MountBase) GetDefaultLocation() *FileBase {
142 // This is a convenience method for getting the #GVolume and then153 // This is a convenience method for getting the #GVolume and then
143 // using that object to get the #GDrive.154 // using that object to get the #GDrive.
144 func (x *MountBase) GetDrive() *DriveBase {155 func (x *MountBase) GetDrive() *DriveBase {
156+ var cls *DriveBase
145 157
146- GetDrivePtr := XGMountGetDrive(x.GoPointer())158+ cret := XGMountGetDrive(x.GoPointer())
147- if GetDrivePtr == 0 {
148- return nil
149- }
150-
151- GetDriveCls := &DriveBase{}
152- GetDriveCls.Ptr = GetDrivePtr
153- return GetDriveCls
154 159
160+ if cret == 0 {
161+ return cls
162+ }
163+ cls = &DriveBase{}
164+ cls.Ptr = cret
165+ return cls
155 }166 }
156 167
157 // Gets the icon for @mount.168 // Gets the icon for @mount.
158 func (x *MountBase) GetIcon() *IconBase {169 func (x *MountBase) GetIcon() *IconBase {
170+ var cls *IconBase
159 171
160- GetIconPtr := XGMountGetIcon(x.GoPointer())172+ cret := XGMountGetIcon(x.GoPointer())
161- if GetIconPtr == 0 {
162- return nil
163- }
164-
165- GetIconCls := &IconBase{}
166- GetIconCls.Ptr = GetIconPtr
167- return GetIconCls
168 173
174+ if cret == 0 {
175+ return cls
176+ }
177+ cls = &IconBase{}
178+ cls.Ptr = cret
179+ return cls
169 }180 }
170 181
171 // Gets the name of @mount.182 // Gets the name of @mount.
172 func (x *MountBase) GetName() string {183 func (x *MountBase) GetName() string {
173 184
174- return XGMountGetName(x.GoPointer())185+ cret := XGMountGetName(x.GoPointer())
175-186+ return cret
176 }187 }
177 188
178 // Gets the root directory on @mount.189 // Gets the root directory on @mount.
179 func (x *MountBase) GetRoot() *FileBase {190 func (x *MountBase) GetRoot() *FileBase {
191+ var cls *FileBase
180 192
181- GetRootPtr := XGMountGetRoot(x.GoPointer())193+ cret := XGMountGetRoot(x.GoPointer())
182- if GetRootPtr == 0 {
183- return nil
184- }
185-
186- GetRootCls := &FileBase{}
187- GetRootCls.Ptr = GetRootPtr
188- return GetRootCls
189 194
195+ if cret == 0 {
196+ return cls
197+ }
198+ cls = &FileBase{}
199+ cls.Ptr = cret
200+ return cls
190 }201 }
191 202
192 // Gets the sort key for @mount, if any.203 // Gets the sort key for @mount, if any.
193 func (x *MountBase) GetSortKey() string {204 func (x *MountBase) GetSortKey() string {
194 205
195- return XGMountGetSortKey(x.GoPointer())206+ cret := XGMountGetSortKey(x.GoPointer())
196-207+ return cret
197 }208 }
198 209
199 // Gets the symbolic icon for @mount.210 // Gets the symbolic icon for @mount.
200 func (x *MountBase) GetSymbolicIcon() *IconBase {211 func (x *MountBase) GetSymbolicIcon() *IconBase {
212+ var cls *IconBase
201 213
202- GetSymbolicIconPtr := XGMountGetSymbolicIcon(x.GoPointer())214+ cret := XGMountGetSymbolicIcon(x.GoPointer())
203- if GetSymbolicIconPtr == 0 {
204- return nil
205- }
206-
207- GetSymbolicIconCls := &IconBase{}
208- GetSymbolicIconCls.Ptr = GetSymbolicIconPtr
209- return GetSymbolicIconCls
210 215
216+ if cret == 0 {
217+ return cls
218+ }
219+ cls = &IconBase{}
220+ cls.Ptr = cret
221+ return cls
211 }222 }
212 223
213 // Gets the UUID for the @mount. The reference is typically based on224 // Gets the UUID for the @mount. The reference is typically based on
@@ -216,22 +227,22 @@ func (x *MountBase) GetSymbolicIcon() *IconBase {
216 // available.227 // available.
217 func (x *MountBase) GetUuid() string {228 func (x *MountBase) GetUuid() string {
218 229
219- return XGMountGetUuid(x.GoPointer())230+ cret := XGMountGetUuid(x.GoPointer())
220-231+ return cret
221 }232 }
222 233
223 // Gets the volume for the @mount.234 // Gets the volume for the @mount.
224 func (x *MountBase) GetVolume() *VolumeBase {235 func (x *MountBase) GetVolume() *VolumeBase {
236+ var cls *VolumeBase
225 237
226- GetVolumePtr := XGMountGetVolume(x.GoPointer())238+ cret := XGMountGetVolume(x.GoPointer())
227- if GetVolumePtr == 0 {
228- return nil
229- }
230-
231- GetVolumeCls := &VolumeBase{}
232- GetVolumeCls.Ptr = GetVolumePtr
233- return GetVolumeCls
234 239
240+ if cret == 0 {
241+ return cls
242+ }
243+ cls = &VolumeBase{}
244+ cls.Ptr = cret
245+ return cls
235 }246 }
236 247
237 // Tries to guess the type of content stored on @mount. Returns one or248 // Tries to guess the type of content stored on @mount. Returns one or
@@ -256,9 +267,14 @@ func (x *MountBase) GuessContentType(ForceRescanVar bool, CancellableVar *Cancel
256 // %FALSE will be returned. In particular, you may get an267 // %FALSE will be returned. In particular, you may get an
257 // %G_IO_ERROR_NOT_SUPPORTED if the mount does not support content268 // %G_IO_ERROR_NOT_SUPPORTED if the mount does not support content
258 // guessing.269 // guessing.
259-func (x *MountBase) GuessContentTypeFinish(ResultVar AsyncResult) uintptr {270+func (x *MountBase) GuessContentTypeFinish(ResultVar AsyncResult) (uintptr, error) {
271+ var cerr *glib.Error
260 272
261- return XGMountGuessContentTypeFinish(x.GoPointer(), ResultVar.GoPointer())273+ cret := XGMountGuessContentTypeFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
274+ if cerr == nil {
275+ return cret, nil
276+ }
277+ return cret, cerr
262 278
263 }279 }
264 280
@@ -271,9 +287,14 @@ func (x *MountBase) GuessContentTypeFinish(ResultVar AsyncResult) uintptr {
271 //287 //
272 // This is a synchronous operation and as such may block doing IO;288 // This is a synchronous operation and as such may block doing IO;
273 // see g_mount_guess_content_type() for the asynchronous version.289 // see g_mount_guess_content_type() for the asynchronous version.
274-func (x *MountBase) GuessContentTypeSync(ForceRescanVar bool, CancellableVar *Cancellable) uintptr {290+func (x *MountBase) GuessContentTypeSync(ForceRescanVar bool, CancellableVar *Cancellable) (uintptr, error) {
291+ var cerr *glib.Error
275 292
276- return XGMountGuessContentTypeSync(x.GoPointer(), ForceRescanVar, CancellableVar.GoPointer())293+ cret := XGMountGuessContentTypeSync(x.GoPointer(), ForceRescanVar, CancellableVar.GoPointer(), &cerr)
294+ if cerr == nil {
295+ return cret, nil
296+ }
297+ return cret, cerr
277 298
278 }299 }
279 300
@@ -302,8 +323,8 @@ func (x *MountBase) GuessContentTypeSync(ForceRescanVar bool, CancellableVar *Ca
302 // activation root on a #GVolume is set.323 // activation root on a #GVolume is set.
303 func (x *MountBase) IsShadowed() bool {324 func (x *MountBase) IsShadowed() bool {
304 325
305- return XGMountIsShadowed(x.GoPointer())326+ cret := XGMountIsShadowed(x.GoPointer())
306-327+ return cret
307 }328 }
308 329
309 // Remounts a mount. This is an asynchronous operation, and is330 // Remounts a mount. This is an asynchronous operation, and is
@@ -323,9 +344,14 @@ func (x *MountBase) Remount(FlagsVar MountMountFlags, MountOperationVar *MountOp
323 344
324 // Finishes remounting a mount. If any errors occurred during the operation,345 // Finishes remounting a mount. If any errors occurred during the operation,
325 // @error will be set to contain the errors and %FALSE will be returned.346 // @error will be set to contain the errors and %FALSE will be returned.
326-func (x *MountBase) RemountFinish(ResultVar AsyncResult) bool {347+func (x *MountBase) RemountFinish(ResultVar AsyncResult) (bool, error) {
348+ var cerr *glib.Error
327 349
328- return XGMountRemountFinish(x.GoPointer(), ResultVar.GoPointer())350+ cret := XGMountRemountFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
351+ if cerr == nil {
352+ return cret, nil
353+ }
354+ return cret, cerr
329 355
330 }356 }
331 357
@@ -350,9 +376,14 @@ func (x *MountBase) Unmount(FlagsVar MountUnmountFlags, CancellableVar *Cancella
350 376
351 // Finishes unmounting a mount. If any errors occurred during the operation,377 // Finishes unmounting a mount. If any errors occurred during the operation,
352 // @error will be set to contain the errors and %FALSE will be returned.378 // @error will be set to contain the errors and %FALSE will be returned.
353-func (x *MountBase) UnmountFinish(ResultVar AsyncResult) bool {379+func (x *MountBase) UnmountFinish(ResultVar AsyncResult) (bool, error) {
380+ var cerr *glib.Error
354 381
355- return XGMountUnmountFinish(x.GoPointer(), ResultVar.GoPointer())382+ cret := XGMountUnmountFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
383+ if cerr == nil {
384+ return cret, nil
385+ }
386+ return cret, cerr
356 387
357 }388 }
358 389
@@ -367,9 +398,14 @@ func (x *MountBase) UnmountWithOperation(FlagsVar MountUnmountFlags, MountOperat
367 398
368 // Finishes unmounting a mount. If any errors occurred during the operation,399 // Finishes unmounting a mount. If any errors occurred during the operation,
369 // @error will be set to contain the errors and %FALSE will be returned.400 // @error will be set to contain the errors and %FALSE will be returned.
370-func (x *MountBase) UnmountWithOperationFinish(ResultVar AsyncResult) bool {401+func (x *MountBase) UnmountWithOperationFinish(ResultVar AsyncResult) (bool, error) {
402+ var cerr *glib.Error
371 403
372- return XGMountUnmountWithOperationFinish(x.GoPointer(), ResultVar.GoPointer())404+ cret := XGMountUnmountWithOperationFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
405+ if cerr == nil {
406+ return cret, nil
407+ }
408+ return cret, cerr
373 409
374 }410 }
375 411
@@ -386,9 +422,9 @@ func (x *MountBase) Unshadow() {
386 var XGMountCanEject func(uintptr) bool422 var XGMountCanEject func(uintptr) bool
387 var XGMountCanUnmount func(uintptr) bool423 var XGMountCanUnmount func(uintptr) bool
388 var XGMountEject func(uintptr, MountUnmountFlags, uintptr, uintptr, uintptr)424 var XGMountEject func(uintptr, MountUnmountFlags, uintptr, uintptr, uintptr)
389-var XGMountEjectFinish func(uintptr, uintptr) bool425+var XGMountEjectFinish func(uintptr, uintptr, **glib.Error) bool
390 var XGMountEjectWithOperation func(uintptr, MountUnmountFlags, uintptr, uintptr, uintptr, uintptr)426 var XGMountEjectWithOperation func(uintptr, MountUnmountFlags, uintptr, uintptr, uintptr, uintptr)
391-var XGMountEjectWithOperationFinish func(uintptr, uintptr) bool427+var XGMountEjectWithOperationFinish func(uintptr, uintptr, **glib.Error) bool
392 var XGMountGetDefaultLocation func(uintptr) uintptr428 var XGMountGetDefaultLocation func(uintptr) uintptr
393 var XGMountGetDrive func(uintptr) uintptr429 var XGMountGetDrive func(uintptr) uintptr
394 var XGMountGetIcon func(uintptr) uintptr430 var XGMountGetIcon func(uintptr) uintptr
@@ -399,16 +435,16 @@ var XGMountGetSymbolicIcon func(uintptr) uintptr
399 var XGMountGetUuid func(uintptr) string435 var XGMountGetUuid func(uintptr) string
400 var XGMountGetVolume func(uintptr) uintptr436 var XGMountGetVolume func(uintptr) uintptr
401 var XGMountGuessContentType func(uintptr, bool, uintptr, uintptr, uintptr)437 var XGMountGuessContentType func(uintptr, bool, uintptr, uintptr, uintptr)
402-var XGMountGuessContentTypeFinish func(uintptr, uintptr) uintptr438+var XGMountGuessContentTypeFinish func(uintptr, uintptr, **glib.Error) uintptr
403-var XGMountGuessContentTypeSync func(uintptr, bool, uintptr) uintptr439+var XGMountGuessContentTypeSync func(uintptr, bool, uintptr, **glib.Error) uintptr
404 var XGMountIsShadowed func(uintptr) bool440 var XGMountIsShadowed func(uintptr) bool
405 var XGMountRemount func(uintptr, MountMountFlags, uintptr, uintptr, uintptr, uintptr)441 var XGMountRemount func(uintptr, MountMountFlags, uintptr, uintptr, uintptr, uintptr)
406-var XGMountRemountFinish func(uintptr, uintptr) bool442+var XGMountRemountFinish func(uintptr, uintptr, **glib.Error) bool
407 var XGMountShadow func(uintptr)443 var XGMountShadow func(uintptr)
408 var XGMountUnmount func(uintptr, MountUnmountFlags, uintptr, uintptr, uintptr)444 var XGMountUnmount func(uintptr, MountUnmountFlags, uintptr, uintptr, uintptr)
409-var XGMountUnmountFinish func(uintptr, uintptr) bool445+var XGMountUnmountFinish func(uintptr, uintptr, **glib.Error) bool
410 var XGMountUnmountWithOperation func(uintptr, MountUnmountFlags, uintptr, uintptr, uintptr, uintptr)446 var XGMountUnmountWithOperation func(uintptr, MountUnmountFlags, uintptr, uintptr, uintptr, uintptr)
411-var XGMountUnmountWithOperationFinish func(uintptr, uintptr) bool447+var XGMountUnmountWithOperationFinish func(uintptr, uintptr, **glib.Error) bool
412 var XGMountUnshadow func(uintptr)448 var XGMountUnshadow func(uintptr)
413 449
414 func init() {450 func init() {
M v4/gio/gmountoperation.go +27 -25
@@ -49,14 +49,16 @@ var xNewMountOperation func() uintptr
49 49
50 // Creates a new mount operation.50 // Creates a new mount operation.
51 func NewMountOperation() *MountOperation {51 func NewMountOperation() *MountOperation {
52- NewMountOperationPtr := xNewMountOperation()52+ var cls *MountOperation
53- if NewMountOperationPtr == 0 {53+
54- return nil54+ cret := xNewMountOperation()
55- }
56 55
57- NewMountOperationCls := &MountOperation{}56+ if cret == 0 {
58- NewMountOperationCls.Ptr = NewMountOperationPtr57+ return cls
59- return NewMountOperationCls58+ }
59+ cls = &MountOperation{}
60+ cls.Ptr = cret
61+ return cls
60 }62 }
61 63
62 var xMountOperationGetAnonymous func(uintptr) bool64 var xMountOperationGetAnonymous func(uintptr) bool
@@ -65,8 +67,8 @@ var xMountOperationGetAnonymous func(uintptr) bool
65 // for an anonymous user.67 // for an anonymous user.
66 func (x *MountOperation) GetAnonymous() bool {68 func (x *MountOperation) GetAnonymous() bool {
67 69
68- return xMountOperationGetAnonymous(x.GoPointer())70+ cret := xMountOperationGetAnonymous(x.GoPointer())
69-71+ return cret
70 }72 }
71 73
72 var xMountOperationGetChoice func(uintptr) int74 var xMountOperationGetChoice func(uintptr) int
@@ -74,8 +76,8 @@ var xMountOperationGetChoice func(uintptr) int
74 // Gets a choice from the mount operation.76 // Gets a choice from the mount operation.
75 func (x *MountOperation) GetChoice() int {77 func (x *MountOperation) GetChoice() int {
76 78
77- return xMountOperationGetChoice(x.GoPointer())79+ cret := xMountOperationGetChoice(x.GoPointer())
78-80+ return cret
79 }81 }
80 82
81 var xMountOperationGetDomain func(uintptr) string83 var xMountOperationGetDomain func(uintptr) string
@@ -83,8 +85,8 @@ var xMountOperationGetDomain func(uintptr) string
83 // Gets the domain of the mount operation.85 // Gets the domain of the mount operation.
84 func (x *MountOperation) GetDomain() string {86 func (x *MountOperation) GetDomain() string {
85 87
86- return xMountOperationGetDomain(x.GoPointer())88+ cret := xMountOperationGetDomain(x.GoPointer())
87-89+ return cret
88 }90 }
89 91
90 var xMountOperationGetIsTcryptHiddenVolume func(uintptr) bool92 var xMountOperationGetIsTcryptHiddenVolume func(uintptr) bool
@@ -93,8 +95,8 @@ var xMountOperationGetIsTcryptHiddenVolume func(uintptr) bool
93 // for a TCRYPT hidden volume.95 // for a TCRYPT hidden volume.
94 func (x *MountOperation) GetIsTcryptHiddenVolume() bool {96 func (x *MountOperation) GetIsTcryptHiddenVolume() bool {
95 97
96- return xMountOperationGetIsTcryptHiddenVolume(x.GoPointer())98+ cret := xMountOperationGetIsTcryptHiddenVolume(x.GoPointer())
97-99+ return cret
98 }100 }
99 101
100 var xMountOperationGetIsTcryptSystemVolume func(uintptr) bool102 var xMountOperationGetIsTcryptSystemVolume func(uintptr) bool
@@ -103,8 +105,8 @@ var xMountOperationGetIsTcryptSystemVolume func(uintptr) bool
103 // for a TCRYPT system volume.105 // for a TCRYPT system volume.
104 func (x *MountOperation) GetIsTcryptSystemVolume() bool {106 func (x *MountOperation) GetIsTcryptSystemVolume() bool {
105 107
106- return xMountOperationGetIsTcryptSystemVolume(x.GoPointer())108+ cret := xMountOperationGetIsTcryptSystemVolume(x.GoPointer())
107-109+ return cret
108 }110 }
109 111
110 var xMountOperationGetPassword func(uintptr) string112 var xMountOperationGetPassword func(uintptr) string
@@ -112,8 +114,8 @@ var xMountOperationGetPassword func(uintptr) string
112 // Gets a password from the mount operation.114 // Gets a password from the mount operation.
113 func (x *MountOperation) GetPassword() string {115 func (x *MountOperation) GetPassword() string {
114 116
115- return xMountOperationGetPassword(x.GoPointer())117+ cret := xMountOperationGetPassword(x.GoPointer())
116-118+ return cret
117 }119 }
118 120
119 var xMountOperationGetPasswordSave func(uintptr) PasswordSave121 var xMountOperationGetPasswordSave func(uintptr) PasswordSave
@@ -121,8 +123,8 @@ var xMountOperationGetPasswordSave func(uintptr) PasswordSave
121 // Gets the state of saving passwords for the mount operation.123 // Gets the state of saving passwords for the mount operation.
122 func (x *MountOperation) GetPasswordSave() PasswordSave {124 func (x *MountOperation) GetPasswordSave() PasswordSave {
123 125
124- return xMountOperationGetPasswordSave(x.GoPointer())126+ cret := xMountOperationGetPasswordSave(x.GoPointer())
125-127+ return cret
126 }128 }
127 129
128 var xMountOperationGetPim func(uintptr) uint130 var xMountOperationGetPim func(uintptr) uint
@@ -130,8 +132,8 @@ var xMountOperationGetPim func(uintptr) uint
130 // Gets a PIM from the mount operation.132 // Gets a PIM from the mount operation.
131 func (x *MountOperation) GetPim() uint {133 func (x *MountOperation) GetPim() uint {
132 134
133- return xMountOperationGetPim(x.GoPointer())135+ cret := xMountOperationGetPim(x.GoPointer())
134-136+ return cret
135 }137 }
136 138
137 var xMountOperationGetUsername func(uintptr) string139 var xMountOperationGetUsername func(uintptr) string
@@ -139,8 +141,8 @@ var xMountOperationGetUsername func(uintptr) string
139 // Get the user name from the mount operation.141 // Get the user name from the mount operation.
140 func (x *MountOperation) GetUsername() string {142 func (x *MountOperation) GetUsername() string {
141 143
142- return xMountOperationGetUsername(x.GoPointer())144+ cret := xMountOperationGetUsername(x.GoPointer())
143-145+ return cret
144 }146 }
145 147
146 var xMountOperationReply func(uintptr, MountOperationResult)148 var xMountOperationReply func(uintptr, MountOperationResult)
M v4/gio/gnativesocketaddress.go +27 -25
@@ -28,14 +28,16 @@ var xNewNativeSocketAddress func(uintptr, uint) uintptr
28 28
29 // Creates a new #GNativeSocketAddress for @native and @len.29 // Creates a new #GNativeSocketAddress for @native and @len.
30 func NewNativeSocketAddress(NativeVar uintptr, LenVar uint) *SocketAddress {30 func NewNativeSocketAddress(NativeVar uintptr, LenVar uint) *SocketAddress {
31- NewNativeSocketAddressPtr := xNewNativeSocketAddress(NativeVar, LenVar)31+ var cls *SocketAddress
32- if NewNativeSocketAddressPtr == 0 {32+
33- return nil33+ cret := xNewNativeSocketAddress(NativeVar, LenVar)
34- }
35 34
36- NewNativeSocketAddressCls := &SocketAddress{}35+ if cret == 0 {
37- NewNativeSocketAddressCls.Ptr = NewNativeSocketAddressPtr36+ return cls
38- return NewNativeSocketAddressCls37+ }
38+ cls = &SocketAddress{}
39+ cls.Ptr = cret
40+ return cls
39 }41 }
40 42
41 func (c *NativeSocketAddress) GoPointer() uintptr {43 func (c *NativeSocketAddress) GoPointer() uintptr {
@@ -48,16 +50,16 @@ func (c *NativeSocketAddress) SetGoPointer(ptr uintptr) {
48 50
49 // Creates a #GSocketAddressEnumerator for @connectable.51 // Creates a #GSocketAddressEnumerator for @connectable.
50 func (x *NativeSocketAddress) Enumerate() *SocketAddressEnumerator {52 func (x *NativeSocketAddress) Enumerate() *SocketAddressEnumerator {
53+ var cls *SocketAddressEnumerator
51 54
52- EnumeratePtr := XGSocketConnectableEnumerate(x.GoPointer())55+ cret := XGSocketConnectableEnumerate(x.GoPointer())
53- if EnumeratePtr == 0 {
54- return nil
55- }
56-
57- EnumerateCls := &SocketAddressEnumerator{}
58- EnumerateCls.Ptr = EnumeratePtr
59- return EnumerateCls
60 56
57+ if cret == 0 {
58+ return cls
59+ }
60+ cls = &SocketAddressEnumerator{}
61+ cls.Ptr = cret
62+ return cls
61 }63 }
62 64
63 // Creates a #GSocketAddressEnumerator for @connectable that will65 // Creates a #GSocketAddressEnumerator for @connectable that will
@@ -68,16 +70,16 @@ func (x *NativeSocketAddress) Enumerate() *SocketAddressEnumerator {
68 // g_socket_connectable_proxy_enumerate(), this will fall back to70 // g_socket_connectable_proxy_enumerate(), this will fall back to
69 // calling g_socket_connectable_enumerate().71 // calling g_socket_connectable_enumerate().
70 func (x *NativeSocketAddress) ProxyEnumerate() *SocketAddressEnumerator {72 func (x *NativeSocketAddress) ProxyEnumerate() *SocketAddressEnumerator {
73+ var cls *SocketAddressEnumerator
71 74
72- ProxyEnumeratePtr := XGSocketConnectableProxyEnumerate(x.GoPointer())75+ cret := XGSocketConnectableProxyEnumerate(x.GoPointer())
73- if ProxyEnumeratePtr == 0 {
74- return nil
75- }
76-
77- ProxyEnumerateCls := &SocketAddressEnumerator{}
78- ProxyEnumerateCls.Ptr = ProxyEnumeratePtr
79- return ProxyEnumerateCls
80 76
77+ if cret == 0 {
78+ return cls
79+ }
80+ cls = &SocketAddressEnumerator{}
81+ cls.Ptr = cret
82+ return cls
81 }83 }
82 84
83 // Format a #GSocketConnectable as a string. This is a human-readable format for85 // Format a #GSocketConnectable as a string. This is a human-readable format for
@@ -89,8 +91,8 @@ func (x *NativeSocketAddress) ProxyEnumerate() *SocketAddressEnumerator {
89 // the implementation’s type name will be returned as a fallback.91 // the implementation’s type name will be returned as a fallback.
90 func (x *NativeSocketAddress) ToString() string {92 func (x *NativeSocketAddress) ToString() string {
91 93
92- return XGSocketConnectableToString(x.GoPointer())94+ cret := XGSocketConnectableToString(x.GoPointer())
93-95+ return cret
94 }96 }
95 97
96 func init() {98 func init() {
M v4/gio/gnetworkaddress.go +42 -38
@@ -45,14 +45,16 @@ var xNewNetworkAddress func(string, uint16) uintptr
45 // g_network_address_new_loopback() to create a #GNetworkAddress that45 // g_network_address_new_loopback() to create a #GNetworkAddress that
46 // is guaranteed to resolve to both addresses.46 // is guaranteed to resolve to both addresses.
47 func NewNetworkAddress(HostnameVar string, PortVar uint16) *NetworkAddress {47 func NewNetworkAddress(HostnameVar string, PortVar uint16) *NetworkAddress {
48- NewNetworkAddressPtr := xNewNetworkAddress(HostnameVar, PortVar)48+ var cls *NetworkAddress
49- if NewNetworkAddressPtr == 0 {49+
50- return nil50+ cret := xNewNetworkAddress(HostnameVar, PortVar)
51- }
52 51
53- NewNetworkAddressCls := &NetworkAddress{}52+ if cret == 0 {
54- NewNetworkAddressCls.Ptr = NewNetworkAddressPtr53+ return cls
55- return NewNetworkAddressCls54+ }
55+ cls = &NetworkAddress{}
56+ cls.Ptr = cret
57+ return cls
56 }58 }
57 59
58 var xNewLoopbackNetworkAddress func(uint16) uintptr60 var xNewLoopbackNetworkAddress func(uint16) uintptr
@@ -70,14 +72,16 @@ var xNewLoopbackNetworkAddress func(uint16) uintptr
70 // g_network_address_get_hostname() will always return `localhost` for72 // g_network_address_get_hostname() will always return `localhost` for
71 // a #GNetworkAddress created with this constructor.73 // a #GNetworkAddress created with this constructor.
72 func NewLoopbackNetworkAddress(PortVar uint16) *NetworkAddress {74 func NewLoopbackNetworkAddress(PortVar uint16) *NetworkAddress {
73- NewLoopbackNetworkAddressPtr := xNewLoopbackNetworkAddress(PortVar)75+ var cls *NetworkAddress
74- if NewLoopbackNetworkAddressPtr == 0 {
75- return nil
76- }
77 76
78- NewLoopbackNetworkAddressCls := &NetworkAddress{}77+ cret := xNewLoopbackNetworkAddress(PortVar)
79- NewLoopbackNetworkAddressCls.Ptr = NewLoopbackNetworkAddressPtr78+
80- return NewLoopbackNetworkAddressCls79+ if cret == 0 {
80+ return cls
81+ }
82+ cls = &NetworkAddress{}
83+ cls.Ptr = cret
84+ return cls
81 }85 }
82 86
83 var xNetworkAddressGetHostname func(uintptr) string87 var xNetworkAddressGetHostname func(uintptr) string
@@ -86,8 +90,8 @@ var xNetworkAddressGetHostname func(uintptr) string
86 // depending on what @addr was created with.90 // depending on what @addr was created with.
87 func (x *NetworkAddress) GetHostname() string {91 func (x *NetworkAddress) GetHostname() string {
88 92
89- return xNetworkAddressGetHostname(x.GoPointer())93+ cret := xNetworkAddressGetHostname(x.GoPointer())
90-94+ return cret
91 }95 }
92 96
93 var xNetworkAddressGetPort func(uintptr) uint1697 var xNetworkAddressGetPort func(uintptr) uint16
@@ -95,8 +99,8 @@ var xNetworkAddressGetPort func(uintptr) uint16
95 // Gets @addr's port number99 // Gets @addr's port number
96 func (x *NetworkAddress) GetPort() uint16 {100 func (x *NetworkAddress) GetPort() uint16 {
97 101
98- return xNetworkAddressGetPort(x.GoPointer())102+ cret := xNetworkAddressGetPort(x.GoPointer())
99-103+ return cret
100 }104 }
101 105
102 var xNetworkAddressGetScheme func(uintptr) string106 var xNetworkAddressGetScheme func(uintptr) string
@@ -104,8 +108,8 @@ var xNetworkAddressGetScheme func(uintptr) string
104 // Gets @addr's scheme108 // Gets @addr's scheme
105 func (x *NetworkAddress) GetScheme() string {109 func (x *NetworkAddress) GetScheme() string {
106 110
107- return xNetworkAddressGetScheme(x.GoPointer())111+ cret := xNetworkAddressGetScheme(x.GoPointer())
108-112+ return cret
109 }113 }
110 114
111 func (c *NetworkAddress) GoPointer() uintptr {115 func (c *NetworkAddress) GoPointer() uintptr {
@@ -118,16 +122,16 @@ func (c *NetworkAddress) SetGoPointer(ptr uintptr) {
118 122
119 // Creates a #GSocketAddressEnumerator for @connectable.123 // Creates a #GSocketAddressEnumerator for @connectable.
120 func (x *NetworkAddress) Enumerate() *SocketAddressEnumerator {124 func (x *NetworkAddress) Enumerate() *SocketAddressEnumerator {
125+ var cls *SocketAddressEnumerator
121 126
122- EnumeratePtr := XGSocketConnectableEnumerate(x.GoPointer())127+ cret := XGSocketConnectableEnumerate(x.GoPointer())
123- if EnumeratePtr == 0 {
124- return nil
125- }
126-
127- EnumerateCls := &SocketAddressEnumerator{}
128- EnumerateCls.Ptr = EnumeratePtr
129- return EnumerateCls
130 128
129+ if cret == 0 {
130+ return cls
131+ }
132+ cls = &SocketAddressEnumerator{}
133+ cls.Ptr = cret
134+ return cls
131 }135 }
132 136
133 // Creates a #GSocketAddressEnumerator for @connectable that will137 // Creates a #GSocketAddressEnumerator for @connectable that will
@@ -138,16 +142,16 @@ func (x *NetworkAddress) Enumerate() *SocketAddressEnumerator {
138 // g_socket_connectable_proxy_enumerate(), this will fall back to142 // g_socket_connectable_proxy_enumerate(), this will fall back to
139 // calling g_socket_connectable_enumerate().143 // calling g_socket_connectable_enumerate().
140 func (x *NetworkAddress) ProxyEnumerate() *SocketAddressEnumerator {144 func (x *NetworkAddress) ProxyEnumerate() *SocketAddressEnumerator {
145+ var cls *SocketAddressEnumerator
141 146
142- ProxyEnumeratePtr := XGSocketConnectableProxyEnumerate(x.GoPointer())147+ cret := XGSocketConnectableProxyEnumerate(x.GoPointer())
143- if ProxyEnumeratePtr == 0 {
144- return nil
145- }
146-
147- ProxyEnumerateCls := &SocketAddressEnumerator{}
148- ProxyEnumerateCls.Ptr = ProxyEnumeratePtr
149- return ProxyEnumerateCls
150 148
149+ if cret == 0 {
150+ return cls
151+ }
152+ cls = &SocketAddressEnumerator{}
153+ cls.Ptr = cret
154+ return cls
151 }155 }
152 156
153 // Format a #GSocketConnectable as a string. This is a human-readable format for157 // Format a #GSocketConnectable as a string. This is a human-readable format for
@@ -159,8 +163,8 @@ func (x *NetworkAddress) ProxyEnumerate() *SocketAddressEnumerator {
159 // the implementation’s type name will be returned as a fallback.163 // the implementation’s type name will be returned as a fallback.
160 func (x *NetworkAddress) ToString() string {164 func (x *NetworkAddress) ToString() string {
161 165
162- return XGSocketConnectableToString(x.GoPointer())166+ cret := XGSocketConnectableToString(x.GoPointer())
163-167+ return cret
164 }168 }
165 169
166 func init() {170 func init() {
M v4/gio/gnetworkmonitor.go +32 -22
@@ -4,6 +4,7 @@ package gio
4 import (4 import (
5 "github.com/jwijenbergh/purego"5 "github.com/jwijenbergh/purego"
6 "github.com/jwijenbergh/puregotk/internal/core"6 "github.com/jwijenbergh/puregotk/internal/core"
7+ "github.com/jwijenbergh/puregotk/v4/glib"
7 "github.com/jwijenbergh/puregotk/v4/gobject"8 "github.com/jwijenbergh/puregotk/v4/gobject"
8 )9 )
9 10
@@ -57,9 +58,14 @@ func (x *NetworkMonitorBase) SetGoPointer(ptr uintptr) {
57 // @connectable, it may still block for a brief period of time (eg,58 // @connectable, it may still block for a brief period of time (eg,
58 // trying to do multicast DNS on the local network), so if you do not59 // trying to do multicast DNS on the local network), so if you do not
59 // want to block, you should use g_network_monitor_can_reach_async().60 // want to block, you should use g_network_monitor_can_reach_async().
60-func (x *NetworkMonitorBase) CanReach(ConnectableVar SocketConnectable, CancellableVar *Cancellable) bool {61+func (x *NetworkMonitorBase) CanReach(ConnectableVar SocketConnectable, CancellableVar *Cancellable) (bool, error) {
62+ var cerr *glib.Error
61 63
62- return XGNetworkMonitorCanReach(x.GoPointer(), ConnectableVar.GoPointer(), CancellableVar.GoPointer())64+ cret := XGNetworkMonitorCanReach(x.GoPointer(), ConnectableVar.GoPointer(), CancellableVar.GoPointer(), &cerr)
65+ if cerr == nil {
66+ return cret, nil
67+ }
68+ return cret, cerr
63 69
64 }70 }
65 71
@@ -80,9 +86,14 @@ func (x *NetworkMonitorBase) CanReachAsync(ConnectableVar SocketConnectable, Can
80 86
81 // Finishes an async network connectivity test.87 // Finishes an async network connectivity test.
82 // See g_network_monitor_can_reach_async().88 // See g_network_monitor_can_reach_async().
83-func (x *NetworkMonitorBase) CanReachFinish(ResultVar AsyncResult) bool {89+func (x *NetworkMonitorBase) CanReachFinish(ResultVar AsyncResult) (bool, error) {
90+ var cerr *glib.Error
84 91
85- return XGNetworkMonitorCanReachFinish(x.GoPointer(), ResultVar.GoPointer())92+ cret := XGNetworkMonitorCanReachFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
93+ if cerr == nil {
94+ return cret, nil
95+ }
96+ return cret, cerr
86 97
87 }98 }
88 99
@@ -107,8 +118,8 @@ func (x *NetworkMonitorBase) CanReachFinish(ResultVar AsyncResult) bool {
107 // back to their "offline" behavior if the connection attempt fails.118 // back to their "offline" behavior if the connection attempt fails.
108 func (x *NetworkMonitorBase) GetConnectivity() NetworkConnectivity {119 func (x *NetworkMonitorBase) GetConnectivity() NetworkConnectivity {
109 120
110- return XGNetworkMonitorGetConnectivity(x.GoPointer())121+ cret := XGNetworkMonitorGetConnectivity(x.GoPointer())
111-122+ return cret
112 }123 }
113 124
114 // Checks if the network is available. "Available" here means that the125 // Checks if the network is available. "Available" here means that the
@@ -117,21 +128,21 @@ func (x *NetworkMonitorBase) GetConnectivity() NetworkConnectivity {
117 // reachable. See #GNetworkMonitor:network-available for more details.128 // reachable. See #GNetworkMonitor:network-available for more details.
118 func (x *NetworkMonitorBase) GetNetworkAvailable() bool {129 func (x *NetworkMonitorBase) GetNetworkAvailable() bool {
119 130
120- return XGNetworkMonitorGetNetworkAvailable(x.GoPointer())131+ cret := XGNetworkMonitorGetNetworkAvailable(x.GoPointer())
121-132+ return cret
122 }133 }
123 134
124 // Checks if the network is metered.135 // Checks if the network is metered.
125 // See #GNetworkMonitor:network-metered for more details.136 // See #GNetworkMonitor:network-metered for more details.
126 func (x *NetworkMonitorBase) GetNetworkMetered() bool {137 func (x *NetworkMonitorBase) GetNetworkMetered() bool {
127 138
128- return XGNetworkMonitorGetNetworkMetered(x.GoPointer())139+ cret := XGNetworkMonitorGetNetworkMetered(x.GoPointer())
129-140+ return cret
130 }141 }
131 142
132-var XGNetworkMonitorCanReach func(uintptr, uintptr, uintptr) bool143+var XGNetworkMonitorCanReach func(uintptr, uintptr, uintptr, **glib.Error) bool
133 var XGNetworkMonitorCanReachAsync func(uintptr, uintptr, uintptr, uintptr, uintptr)144 var XGNetworkMonitorCanReachAsync func(uintptr, uintptr, uintptr, uintptr, uintptr)
134-var XGNetworkMonitorCanReachFinish func(uintptr, uintptr) bool145+var XGNetworkMonitorCanReachFinish func(uintptr, uintptr, **glib.Error) bool
135 var XGNetworkMonitorGetConnectivity func(uintptr) NetworkConnectivity146 var XGNetworkMonitorGetConnectivity func(uintptr) NetworkConnectivity
136 var XGNetworkMonitorGetNetworkAvailable func(uintptr) bool147 var XGNetworkMonitorGetNetworkAvailable func(uintptr) bool
137 var XGNetworkMonitorGetNetworkMetered func(uintptr) bool148 var XGNetworkMonitorGetNetworkMetered func(uintptr) bool
@@ -140,18 +151,17 @@ var xNetworkMonitorGetDefault func() uintptr
140 151
141 // Gets the default #GNetworkMonitor for the system.152 // Gets the default #GNetworkMonitor for the system.
142 func NetworkMonitorGetDefault() *NetworkMonitorBase {153 func NetworkMonitorGetDefault() *NetworkMonitorBase {
154+ var cls *NetworkMonitorBase
143 155
144- NetworkMonitorGetDefaultPtr := xNetworkMonitorGetDefault()156+ cret := xNetworkMonitorGetDefault()
145- if NetworkMonitorGetDefaultPtr == 0 {
146- return nil
147- }
148-
149- gobject.IncreaseRef(NetworkMonitorGetDefaultPtr)
150-
151- NetworkMonitorGetDefaultCls := &NetworkMonitorBase{}
152- NetworkMonitorGetDefaultCls.Ptr = NetworkMonitorGetDefaultPtr
153- return NetworkMonitorGetDefaultCls
154 157
158+ if cret == 0 {
159+ return cls
160+ }
161+ gobject.IncreaseRef(cret)
162+ cls = &NetworkMonitorBase{}
163+ cls.Ptr = cret
164+ return cls
155 }165 }
156 166
157 func init() {167 func init() {
M v4/gio/gnetworkservice.go +35 -33
@@ -39,14 +39,16 @@ var xNewNetworkService func(string, string, string) uintptr
39 // @protocol, and @domain. This will initially be unresolved; use the39 // @protocol, and @domain. This will initially be unresolved; use the
40 // #GSocketConnectable interface to resolve it.40 // #GSocketConnectable interface to resolve it.
41 func NewNetworkService(ServiceVar string, ProtocolVar string, DomainVar string) *NetworkService {41 func NewNetworkService(ServiceVar string, ProtocolVar string, DomainVar string) *NetworkService {
42- NewNetworkServicePtr := xNewNetworkService(ServiceVar, ProtocolVar, DomainVar)42+ var cls *NetworkService
43- if NewNetworkServicePtr == 0 {43+
44- return nil44+ cret := xNewNetworkService(ServiceVar, ProtocolVar, DomainVar)
45- }
46 45
47- NewNetworkServiceCls := &NetworkService{}46+ if cret == 0 {
48- NewNetworkServiceCls.Ptr = NewNetworkServicePtr47+ return cls
49- return NewNetworkServiceCls48+ }
49+ cls = &NetworkService{}
50+ cls.Ptr = cret
51+ return cls
50 }52 }
51 53
52 var xNetworkServiceGetDomain func(uintptr) string54 var xNetworkServiceGetDomain func(uintptr) string
@@ -55,8 +57,8 @@ var xNetworkServiceGetDomain func(uintptr) string
55 // ASCII-encoded, depending on what @srv was created with.57 // ASCII-encoded, depending on what @srv was created with.
56 func (x *NetworkService) GetDomain() string {58 func (x *NetworkService) GetDomain() string {
57 59
58- return xNetworkServiceGetDomain(x.GoPointer())60+ cret := xNetworkServiceGetDomain(x.GoPointer())
59-61+ return cret
60 }62 }
61 63
62 var xNetworkServiceGetProtocol func(uintptr) string64 var xNetworkServiceGetProtocol func(uintptr) string
@@ -64,8 +66,8 @@ var xNetworkServiceGetProtocol func(uintptr) string
64 // Gets @srv's protocol name (eg, "tcp").66 // Gets @srv's protocol name (eg, "tcp").
65 func (x *NetworkService) GetProtocol() string {67 func (x *NetworkService) GetProtocol() string {
66 68
67- return xNetworkServiceGetProtocol(x.GoPointer())69+ cret := xNetworkServiceGetProtocol(x.GoPointer())
68-70+ return cret
69 }71 }
70 72
71 var xNetworkServiceGetScheme func(uintptr) string73 var xNetworkServiceGetScheme func(uintptr) string
@@ -74,8 +76,8 @@ var xNetworkServiceGetScheme func(uintptr) string
74 // is used as scheme.76 // is used as scheme.
75 func (x *NetworkService) GetScheme() string {77 func (x *NetworkService) GetScheme() string {
76 78
77- return xNetworkServiceGetScheme(x.GoPointer())79+ cret := xNetworkServiceGetScheme(x.GoPointer())
78-80+ return cret
79 }81 }
80 82
81 var xNetworkServiceGetService func(uintptr) string83 var xNetworkServiceGetService func(uintptr) string
@@ -83,8 +85,8 @@ var xNetworkServiceGetService func(uintptr) string
83 // Gets @srv's service name (eg, "ldap").85 // Gets @srv's service name (eg, "ldap").
84 func (x *NetworkService) GetService() string {86 func (x *NetworkService) GetService() string {
85 87
86- return xNetworkServiceGetService(x.GoPointer())88+ cret := xNetworkServiceGetService(x.GoPointer())
87-89+ return cret
88 }90 }
89 91
90 var xNetworkServiceSetScheme func(uintptr, string)92 var xNetworkServiceSetScheme func(uintptr, string)
@@ -107,16 +109,16 @@ func (c *NetworkService) SetGoPointer(ptr uintptr) {
107 109
108 // Creates a #GSocketAddressEnumerator for @connectable.110 // Creates a #GSocketAddressEnumerator for @connectable.
109 func (x *NetworkService) Enumerate() *SocketAddressEnumerator {111 func (x *NetworkService) Enumerate() *SocketAddressEnumerator {
112+ var cls *SocketAddressEnumerator
110 113
111- EnumeratePtr := XGSocketConnectableEnumerate(x.GoPointer())114+ cret := XGSocketConnectableEnumerate(x.GoPointer())
112- if EnumeratePtr == 0 {
113- return nil
114- }
115-
116- EnumerateCls := &SocketAddressEnumerator{}
117- EnumerateCls.Ptr = EnumeratePtr
118- return EnumerateCls
119 115
116+ if cret == 0 {
117+ return cls
118+ }
119+ cls = &SocketAddressEnumerator{}
120+ cls.Ptr = cret
121+ return cls
120 }122 }
121 123
122 // Creates a #GSocketAddressEnumerator for @connectable that will124 // Creates a #GSocketAddressEnumerator for @connectable that will
@@ -127,16 +129,16 @@ func (x *NetworkService) Enumerate() *SocketAddressEnumerator {
127 // g_socket_connectable_proxy_enumerate(), this will fall back to129 // g_socket_connectable_proxy_enumerate(), this will fall back to
128 // calling g_socket_connectable_enumerate().130 // calling g_socket_connectable_enumerate().
129 func (x *NetworkService) ProxyEnumerate() *SocketAddressEnumerator {131 func (x *NetworkService) ProxyEnumerate() *SocketAddressEnumerator {
132+ var cls *SocketAddressEnumerator
130 133
131- ProxyEnumeratePtr := XGSocketConnectableProxyEnumerate(x.GoPointer())134+ cret := XGSocketConnectableProxyEnumerate(x.GoPointer())
132- if ProxyEnumeratePtr == 0 {
133- return nil
134- }
135-
136- ProxyEnumerateCls := &SocketAddressEnumerator{}
137- ProxyEnumerateCls.Ptr = ProxyEnumeratePtr
138- return ProxyEnumerateCls
139 135
136+ if cret == 0 {
137+ return cls
138+ }
139+ cls = &SocketAddressEnumerator{}
140+ cls.Ptr = cret
141+ return cls
140 }142 }
141 143
142 // Format a #GSocketConnectable as a string. This is a human-readable format for144 // Format a #GSocketConnectable as a string. This is a human-readable format for
@@ -148,8 +150,8 @@ func (x *NetworkService) ProxyEnumerate() *SocketAddressEnumerator {
148 // the implementation’s type name will be returned as a fallback.150 // the implementation’s type name will be returned as a fallback.
149 func (x *NetworkService) ToString() string {151 func (x *NetworkService) ToString() string {
150 152
151- return XGSocketConnectableToString(x.GoPointer())153+ cret := XGSocketConnectableToString(x.GoPointer())
152-154+ return cret
153 }155 }
154 156
155 func init() {157 func init() {
M v4/gio/goutputstream.go +145 -60
@@ -45,7 +45,7 @@ func (x *OutputStream) ClearPending() {
45 45
46 }46 }
47 47
48-var xOutputStreamClose func(uintptr, uintptr) bool48+var xOutputStreamClose func(uintptr, uintptr, **glib.Error) bool
49 49
50 // Closes the stream, releasing resources related to it.50 // Closes the stream, releasing resources related to it.
51 //51 //
@@ -76,9 +76,14 @@ var xOutputStreamClose func(uintptr, uintptr) bool
76 // can use a faster close that doesn't block to e.g. check errors. On76 // can use a faster close that doesn't block to e.g. check errors. On
77 // cancellation (as with any error) there is no guarantee that all written77 // cancellation (as with any error) there is no guarantee that all written
78 // data will reach the target.78 // data will reach the target.
79-func (x *OutputStream) Close(CancellableVar *Cancellable) bool {79+func (x *OutputStream) Close(CancellableVar *Cancellable) (bool, error) {
80+ var cerr *glib.Error
80 81
81- return xOutputStreamClose(x.GoPointer(), CancellableVar.GoPointer())82+ cret := xOutputStreamClose(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
83+ if cerr == nil {
84+ return cret, nil
85+ }
86+ return cret, cerr
82 87
83 }88 }
84 89
@@ -100,16 +105,21 @@ func (x *OutputStream) CloseAsync(IoPriorityVar int, CancellableVar *Cancellable
100 105
101 }106 }
102 107
103-var xOutputStreamCloseFinish func(uintptr, uintptr) bool108+var xOutputStreamCloseFinish func(uintptr, uintptr, **glib.Error) bool
104 109
105 // Closes an output stream.110 // Closes an output stream.
106-func (x *OutputStream) CloseFinish(ResultVar AsyncResult) bool {111+func (x *OutputStream) CloseFinish(ResultVar AsyncResult) (bool, error) {
112+ var cerr *glib.Error
107 113
108- return xOutputStreamCloseFinish(x.GoPointer(), ResultVar.GoPointer())114+ cret := xOutputStreamCloseFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
115+ if cerr == nil {
116+ return cret, nil
117+ }
118+ return cret, cerr
109 119
110 }120 }
111 121
112-var xOutputStreamFlush func(uintptr, uintptr) bool122+var xOutputStreamFlush func(uintptr, uintptr, **glib.Error) bool
113 123
114 // Forces a write of all user-space buffered data for the given124 // Forces a write of all user-space buffered data for the given
115 // @stream. Will block during the operation. Closing the stream will125 // @stream. Will block during the operation. Closing the stream will
@@ -120,9 +130,14 @@ var xOutputStreamFlush func(uintptr, uintptr) bool
120 // If @cancellable is not %NULL, then the operation can be cancelled by130 // If @cancellable is not %NULL, then the operation can be cancelled by
121 // triggering the cancellable object from another thread. If the operation131 // triggering the cancellable object from another thread. If the operation
122 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.132 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
123-func (x *OutputStream) Flush(CancellableVar *Cancellable) bool {133+func (x *OutputStream) Flush(CancellableVar *Cancellable) (bool, error) {
134+ var cerr *glib.Error
124 135
125- return xOutputStreamFlush(x.GoPointer(), CancellableVar.GoPointer())136+ cret := xOutputStreamFlush(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
137+ if cerr == nil {
138+ return cret, nil
139+ }
140+ return cret, cerr
126 141
127 }142 }
128 143
@@ -141,12 +156,17 @@ func (x *OutputStream) FlushAsync(IoPriorityVar int, CancellableVar *Cancellable
141 156
142 }157 }
143 158
144-var xOutputStreamFlushFinish func(uintptr, uintptr) bool159+var xOutputStreamFlushFinish func(uintptr, uintptr, **glib.Error) bool
145 160
146 // Finishes flushing an output stream.161 // Finishes flushing an output stream.
147-func (x *OutputStream) FlushFinish(ResultVar AsyncResult) bool {162+func (x *OutputStream) FlushFinish(ResultVar AsyncResult) (bool, error) {
163+ var cerr *glib.Error
148 164
149- return xOutputStreamFlushFinish(x.GoPointer(), ResultVar.GoPointer())165+ cret := xOutputStreamFlushFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
166+ if cerr == nil {
167+ return cret, nil
168+ }
169+ return cret, cerr
150 170
151 }171 }
152 172
@@ -155,8 +175,8 @@ var xOutputStreamHasPending func(uintptr) bool
155 // Checks if an output stream has pending actions.175 // Checks if an output stream has pending actions.
156 func (x *OutputStream) HasPending() bool {176 func (x *OutputStream) HasPending() bool {
157 177
158- return xOutputStreamHasPending(x.GoPointer())178+ cret := xOutputStreamHasPending(x.GoPointer())
159-179+ return cret
160 }180 }
161 181
162 var xOutputStreamIsClosed func(uintptr) bool182 var xOutputStreamIsClosed func(uintptr) bool
@@ -164,8 +184,8 @@ var xOutputStreamIsClosed func(uintptr) bool
164 // Checks if an output stream has already been closed.184 // Checks if an output stream has already been closed.
165 func (x *OutputStream) IsClosed() bool {185 func (x *OutputStream) IsClosed() bool {
166 186
167- return xOutputStreamIsClosed(x.GoPointer())187+ cret := xOutputStreamIsClosed(x.GoPointer())
168-188+ return cret
169 }189 }
170 190
171 var xOutputStreamIsClosing func(uintptr) bool191 var xOutputStreamIsClosing func(uintptr) bool
@@ -176,8 +196,8 @@ var xOutputStreamIsClosing func(uintptr) bool
176 // the closing operation.196 // the closing operation.
177 func (x *OutputStream) IsClosing() bool {197 func (x *OutputStream) IsClosing() bool {
178 198
179- return xOutputStreamIsClosing(x.GoPointer())199+ cret := xOutputStreamIsClosing(x.GoPointer())
180-200+ return cret
181 }201 }
182 202
183 var xOutputStreamPrintf func(uintptr, uint, uintptr, **glib.Error, string, ...interface{}) bool203 var xOutputStreamPrintf func(uintptr, uint, uintptr, **glib.Error, string, ...interface{}) bool
@@ -196,8 +216,8 @@ var xOutputStreamPrintf func(uintptr, uint, uintptr, **glib.Error, string, ...in
196 // or g_output_stream_write_all().216 // or g_output_stream_write_all().
197 func (x *OutputStream) Printf(BytesWrittenVar uint, CancellableVar *Cancellable, ErrorVar **glib.Error, FormatVar string, varArgs ...interface{}) bool {217 func (x *OutputStream) Printf(BytesWrittenVar uint, CancellableVar *Cancellable, ErrorVar **glib.Error, FormatVar string, varArgs ...interface{}) bool {
198 218
199- return xOutputStreamPrintf(x.GoPointer(), BytesWrittenVar, CancellableVar.GoPointer(), ErrorVar, FormatVar, varArgs...)219+ cret := xOutputStreamPrintf(x.GoPointer(), BytesWrittenVar, CancellableVar.GoPointer(), ErrorVar, FormatVar, varArgs...)
200-220+ return cret
201 }221 }
202 222
203 var xOutputStreamSetPending func(uintptr) bool223 var xOutputStreamSetPending func(uintptr) bool
@@ -205,18 +225,28 @@ var xOutputStreamSetPending func(uintptr) bool
205 // Sets @stream to have actions pending. If the pending flag is225 // Sets @stream to have actions pending. If the pending flag is
206 // already set or @stream is closed, it will return %FALSE and set226 // already set or @stream is closed, it will return %FALSE and set
207 // @error.227 // @error.
208-func (x *OutputStream) SetPending() bool {228+func (x *OutputStream) SetPending() (bool, error) {
229+ var cerr *glib.Error
209 230
210- return xOutputStreamSetPending(x.GoPointer())231+ cret := xOutputStreamSetPending(x.GoPointer())
232+ if cerr == nil {
233+ return cret, nil
234+ }
235+ return cret, cerr
211 236
212 }237 }
213 238
214-var xOutputStreamSplice func(uintptr, uintptr, OutputStreamSpliceFlags, uintptr) int239+var xOutputStreamSplice func(uintptr, uintptr, OutputStreamSpliceFlags, uintptr, **glib.Error) int
215 240
216 // Splices an input stream into an output stream.241 // Splices an input stream into an output stream.
217-func (x *OutputStream) Splice(SourceVar *InputStream, FlagsVar OutputStreamSpliceFlags, CancellableVar *Cancellable) int {242+func (x *OutputStream) Splice(SourceVar *InputStream, FlagsVar OutputStreamSpliceFlags, CancellableVar *Cancellable) (int, error) {
243+ var cerr *glib.Error
218 244
219- return xOutputStreamSplice(x.GoPointer(), SourceVar.GoPointer(), FlagsVar, CancellableVar.GoPointer())245+ cret := xOutputStreamSplice(x.GoPointer(), SourceVar.GoPointer(), FlagsVar, CancellableVar.GoPointer(), &cerr)
246+ if cerr == nil {
247+ return cret, nil
248+ }
249+ return cret, cerr
220 250
221 }251 }
222 252
@@ -235,12 +265,17 @@ func (x *OutputStream) SpliceAsync(SourceVar *InputStream, FlagsVar OutputStream
235 265
236 }266 }
237 267
238-var xOutputStreamSpliceFinish func(uintptr, uintptr) int268+var xOutputStreamSpliceFinish func(uintptr, uintptr, **glib.Error) int
239 269
240 // Finishes an asynchronous stream splice operation.270 // Finishes an asynchronous stream splice operation.
241-func (x *OutputStream) SpliceFinish(ResultVar AsyncResult) int {271+func (x *OutputStream) SpliceFinish(ResultVar AsyncResult) (int, error) {
272+ var cerr *glib.Error
242 273
243- return xOutputStreamSpliceFinish(x.GoPointer(), ResultVar.GoPointer())274+ cret := xOutputStreamSpliceFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
275+ if cerr == nil {
276+ return cret, nil
277+ }
278+ return cret, cerr
244 279
245 }280 }
246 281
@@ -260,11 +295,11 @@ var xOutputStreamVprintf func(uintptr, uint, uintptr, **glib.Error, string, []in
260 // or g_output_stream_write_all().295 // or g_output_stream_write_all().
261 func (x *OutputStream) Vprintf(BytesWrittenVar uint, CancellableVar *Cancellable, ErrorVar **glib.Error, FormatVar string, ArgsVar []interface{}) bool {296 func (x *OutputStream) Vprintf(BytesWrittenVar uint, CancellableVar *Cancellable, ErrorVar **glib.Error, FormatVar string, ArgsVar []interface{}) bool {
262 297
263- return xOutputStreamVprintf(x.GoPointer(), BytesWrittenVar, CancellableVar.GoPointer(), ErrorVar, FormatVar, ArgsVar)298+ cret := xOutputStreamVprintf(x.GoPointer(), BytesWrittenVar, CancellableVar.GoPointer(), ErrorVar, FormatVar, ArgsVar)
264-299+ return cret
265 }300 }
266 301
267-var xOutputStreamWrite func(uintptr, uintptr, uint, uintptr) int302+var xOutputStreamWrite func(uintptr, uintptr, uint, uintptr, **glib.Error) int
268 303
269 // Tries to write @count bytes from @buffer into the stream. Will block304 // Tries to write @count bytes from @buffer into the stream. Will block
270 // during the operation.305 // during the operation.
@@ -286,13 +321,18 @@ var xOutputStreamWrite func(uintptr, uintptr, uint, uintptr) int
286 // partial result will be returned, without an error.321 // partial result will be returned, without an error.
287 //322 //
288 // On error -1 is returned and @error is set accordingly.323 // On error -1 is returned and @error is set accordingly.
289-func (x *OutputStream) Write(BufferVar uintptr, CountVar uint, CancellableVar *Cancellable) int {324+func (x *OutputStream) Write(BufferVar uintptr, CountVar uint, CancellableVar *Cancellable) (int, error) {
325+ var cerr *glib.Error
290 326
291- return xOutputStreamWrite(x.GoPointer(), BufferVar, CountVar, CancellableVar.GoPointer())327+ cret := xOutputStreamWrite(x.GoPointer(), BufferVar, CountVar, CancellableVar.GoPointer(), &cerr)
328+ if cerr == nil {
329+ return cret, nil
330+ }
331+ return cret, cerr
292 332
293 }333 }
294 334
295-var xOutputStreamWriteAll func(uintptr, uintptr, uint, uint, uintptr) bool335+var xOutputStreamWriteAll func(uintptr, uintptr, uint, uint, uintptr, **glib.Error) bool
296 336
297 // Tries to write @count bytes from @buffer into the stream. Will block337 // Tries to write @count bytes from @buffer into the stream. Will block
298 // during the operation.338 // during the operation.
@@ -313,9 +353,14 @@ var xOutputStreamWriteAll func(uintptr, uintptr, uint, uint, uintptr) bool
313 // functionality is only available from C. If you need it from another353 // functionality is only available from C. If you need it from another
314 // language then you must write your own loop around354 // language then you must write your own loop around
315 // g_output_stream_write().355 // g_output_stream_write().
316-func (x *OutputStream) WriteAll(BufferVar uintptr, CountVar uint, BytesWrittenVar uint, CancellableVar *Cancellable) bool {356+func (x *OutputStream) WriteAll(BufferVar uintptr, CountVar uint, BytesWrittenVar uint, CancellableVar *Cancellable) (bool, error) {
357+ var cerr *glib.Error
317 358
318- return xOutputStreamWriteAll(x.GoPointer(), BufferVar, CountVar, BytesWrittenVar, CancellableVar.GoPointer())359+ cret := xOutputStreamWriteAll(x.GoPointer(), BufferVar, CountVar, BytesWrittenVar, CancellableVar.GoPointer(), &cerr)
360+ if cerr == nil {
361+ return cret, nil
362+ }
363+ return cret, cerr
319 364
320 }365 }
321 366
@@ -342,7 +387,7 @@ func (x *OutputStream) WriteAllAsync(BufferVar uintptr, CountVar uint, IoPriorit
342 387
343 }388 }
344 389
345-var xOutputStreamWriteAllFinish func(uintptr, uintptr, uint) bool390+var xOutputStreamWriteAllFinish func(uintptr, uintptr, uint, **glib.Error) bool
346 391
347 // Finishes an asynchronous stream write operation started with392 // Finishes an asynchronous stream write operation started with
348 // g_output_stream_write_all_async().393 // g_output_stream_write_all_async().
@@ -354,9 +399,14 @@ var xOutputStreamWriteAllFinish func(uintptr, uintptr, uint) bool
354 // functionality is only available from C. If you need it from another399 // functionality is only available from C. If you need it from another
355 // language then you must write your own loop around400 // language then you must write your own loop around
356 // g_output_stream_write_async().401 // g_output_stream_write_async().
357-func (x *OutputStream) WriteAllFinish(ResultVar AsyncResult, BytesWrittenVar uint) bool {402+func (x *OutputStream) WriteAllFinish(ResultVar AsyncResult, BytesWrittenVar uint) (bool, error) {
403+ var cerr *glib.Error
358 404
359- return xOutputStreamWriteAllFinish(x.GoPointer(), ResultVar.GoPointer(), BytesWrittenVar)405+ cret := xOutputStreamWriteAllFinish(x.GoPointer(), ResultVar.GoPointer(), BytesWrittenVar, &cerr)
406+ if cerr == nil {
407+ return cret, nil
408+ }
409+ return cret, cerr
360 410
361 }411 }
362 412
@@ -403,7 +453,7 @@ func (x *OutputStream) WriteAsync(BufferVar uintptr, CountVar uint, IoPriorityVa
403 453
404 }454 }
405 455
406-var xOutputStreamWriteBytes func(uintptr, *glib.Bytes, uintptr) int456+var xOutputStreamWriteBytes func(uintptr, *glib.Bytes, uintptr, **glib.Error) int
407 457
408 // A wrapper function for g_output_stream_write() which takes a458 // A wrapper function for g_output_stream_write() which takes a
409 // #GBytes as input. This can be more convenient for use by language459 // #GBytes as input. This can be more convenient for use by language
@@ -416,9 +466,14 @@ var xOutputStreamWriteBytes func(uintptr, *glib.Bytes, uintptr) int
416 // remaining bytes, using g_bytes_new_from_bytes(). Passing the same466 // remaining bytes, using g_bytes_new_from_bytes(). Passing the same
417 // #GBytes instance multiple times potentially can result in duplicated467 // #GBytes instance multiple times potentially can result in duplicated
418 // data in the output stream.468 // data in the output stream.
419-func (x *OutputStream) WriteBytes(BytesVar *glib.Bytes, CancellableVar *Cancellable) int {469+func (x *OutputStream) WriteBytes(BytesVar *glib.Bytes, CancellableVar *Cancellable) (int, error) {
470+ var cerr *glib.Error
420 471
421- return xOutputStreamWriteBytes(x.GoPointer(), BytesVar, CancellableVar.GoPointer())472+ cret := xOutputStreamWriteBytes(x.GoPointer(), BytesVar, CancellableVar.GoPointer(), &cerr)
473+ if cerr == nil {
474+ return cret, nil
475+ }
476+ return cret, cerr
422 477
423 }478 }
424 479
@@ -443,25 +498,35 @@ func (x *OutputStream) WriteBytesAsync(BytesVar *glib.Bytes, IoPriorityVar int,
443 498
444 }499 }
445 500
446-var xOutputStreamWriteBytesFinish func(uintptr, uintptr) int501+var xOutputStreamWriteBytesFinish func(uintptr, uintptr, **glib.Error) int
447 502
448 // Finishes a stream write-from-#GBytes operation.503 // Finishes a stream write-from-#GBytes operation.
449-func (x *OutputStream) WriteBytesFinish(ResultVar AsyncResult) int {504+func (x *OutputStream) WriteBytesFinish(ResultVar AsyncResult) (int, error) {
505+ var cerr *glib.Error
450 506
451- return xOutputStreamWriteBytesFinish(x.GoPointer(), ResultVar.GoPointer())507+ cret := xOutputStreamWriteBytesFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
508+ if cerr == nil {
509+ return cret, nil
510+ }
511+ return cret, cerr
452 512
453 }513 }
454 514
455-var xOutputStreamWriteFinish func(uintptr, uintptr) int515+var xOutputStreamWriteFinish func(uintptr, uintptr, **glib.Error) int
456 516
457 // Finishes a stream write operation.517 // Finishes a stream write operation.
458-func (x *OutputStream) WriteFinish(ResultVar AsyncResult) int {518+func (x *OutputStream) WriteFinish(ResultVar AsyncResult) (int, error) {
519+ var cerr *glib.Error
459 520
460- return xOutputStreamWriteFinish(x.GoPointer(), ResultVar.GoPointer())521+ cret := xOutputStreamWriteFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
522+ if cerr == nil {
523+ return cret, nil
524+ }
525+ return cret, cerr
461 526
462 }527 }
463 528
464-var xOutputStreamWritev func(uintptr, uintptr, uint, uint, uintptr) bool529+var xOutputStreamWritev func(uintptr, uintptr, uint, uint, uintptr, **glib.Error) bool
465 530
466 // Tries to write the bytes contained in the @n_vectors @vectors into the531 // Tries to write the bytes contained in the @n_vectors @vectors into the
467 // stream. Will block during the operation.532 // stream. Will block during the operation.
@@ -486,13 +551,18 @@ var xOutputStreamWritev func(uintptr, uintptr, uint, uint, uintptr) bool
486 // aggregate buffer size, and will return %G_IO_ERROR_INVALID_ARGUMENT if these551 // aggregate buffer size, and will return %G_IO_ERROR_INVALID_ARGUMENT if these
487 // are exceeded. For example, when writing to a local file on UNIX platforms,552 // are exceeded. For example, when writing to a local file on UNIX platforms,
488 // the aggregate buffer size must not exceed %G_MAXSSIZE bytes.553 // the aggregate buffer size must not exceed %G_MAXSSIZE bytes.
489-func (x *OutputStream) Writev(VectorsVar uintptr, NVectorsVar uint, BytesWrittenVar uint, CancellableVar *Cancellable) bool {554+func (x *OutputStream) Writev(VectorsVar uintptr, NVectorsVar uint, BytesWrittenVar uint, CancellableVar *Cancellable) (bool, error) {
555+ var cerr *glib.Error
490 556
491- return xOutputStreamWritev(x.GoPointer(), VectorsVar, NVectorsVar, BytesWrittenVar, CancellableVar.GoPointer())557+ cret := xOutputStreamWritev(x.GoPointer(), VectorsVar, NVectorsVar, BytesWrittenVar, CancellableVar.GoPointer(), &cerr)
558+ if cerr == nil {
559+ return cret, nil
560+ }
561+ return cret, cerr
492 562
493 }563 }
494 564
495-var xOutputStreamWritevAll func(uintptr, uintptr, uint, uint, uintptr) bool565+var xOutputStreamWritevAll func(uintptr, uintptr, uint, uint, uintptr, **glib.Error) bool
496 566
497 // Tries to write the bytes contained in the @n_vectors @vectors into the567 // Tries to write the bytes contained in the @n_vectors @vectors into the
498 // stream. Will block during the operation.568 // stream. Will block during the operation.
@@ -516,9 +586,14 @@ var xOutputStreamWritevAll func(uintptr, uintptr, uint, uint, uintptr) bool
516 //586 //
517 // The content of the individual elements of @vectors might be changed by this587 // The content of the individual elements of @vectors might be changed by this
518 // function.588 // function.
519-func (x *OutputStream) WritevAll(VectorsVar uintptr, NVectorsVar uint, BytesWrittenVar uint, CancellableVar *Cancellable) bool {589+func (x *OutputStream) WritevAll(VectorsVar uintptr, NVectorsVar uint, BytesWrittenVar uint, CancellableVar *Cancellable) (bool, error) {
590+ var cerr *glib.Error
520 591
521- return xOutputStreamWritevAll(x.GoPointer(), VectorsVar, NVectorsVar, BytesWrittenVar, CancellableVar.GoPointer())592+ cret := xOutputStreamWritevAll(x.GoPointer(), VectorsVar, NVectorsVar, BytesWrittenVar, CancellableVar.GoPointer(), &cerr)
593+ if cerr == nil {
594+ return cret, nil
595+ }
596+ return cret, cerr
522 597
523 }598 }
524 599
@@ -546,7 +621,7 @@ func (x *OutputStream) WritevAllAsync(VectorsVar uintptr, NVectorsVar uint, IoPr
546 621
547 }622 }
548 623
549-var xOutputStreamWritevAllFinish func(uintptr, uintptr, uint) bool624+var xOutputStreamWritevAllFinish func(uintptr, uintptr, uint, **glib.Error) bool
550 625
551 // Finishes an asynchronous stream write operation started with626 // Finishes an asynchronous stream write operation started with
552 // g_output_stream_writev_all_async().627 // g_output_stream_writev_all_async().
@@ -558,9 +633,14 @@ var xOutputStreamWritevAllFinish func(uintptr, uintptr, uint) bool
558 // functionality is only available from C. If you need it from another633 // functionality is only available from C. If you need it from another
559 // language then you must write your own loop around634 // language then you must write your own loop around
560 // g_output_stream_writev_async().635 // g_output_stream_writev_async().
561-func (x *OutputStream) WritevAllFinish(ResultVar AsyncResult, BytesWrittenVar uint) bool {636+func (x *OutputStream) WritevAllFinish(ResultVar AsyncResult, BytesWrittenVar uint) (bool, error) {
637+ var cerr *glib.Error
562 638
563- return xOutputStreamWritevAllFinish(x.GoPointer(), ResultVar.GoPointer(), BytesWrittenVar)639+ cret := xOutputStreamWritevAllFinish(x.GoPointer(), ResultVar.GoPointer(), BytesWrittenVar, &cerr)
640+ if cerr == nil {
641+ return cret, nil
642+ }
643+ return cret, cerr
564 644
565 }645 }
566 646
@@ -602,12 +682,17 @@ func (x *OutputStream) WritevAsync(VectorsVar uintptr, NVectorsVar uint, IoPrior
602 682
603 }683 }
604 684
605-var xOutputStreamWritevFinish func(uintptr, uintptr, uint) bool685+var xOutputStreamWritevFinish func(uintptr, uintptr, uint, **glib.Error) bool
606 686
607 // Finishes a stream writev operation.687 // Finishes a stream writev operation.
608-func (x *OutputStream) WritevFinish(ResultVar AsyncResult, BytesWrittenVar uint) bool {688+func (x *OutputStream) WritevFinish(ResultVar AsyncResult, BytesWrittenVar uint) (bool, error) {
689+ var cerr *glib.Error
609 690
610- return xOutputStreamWritevFinish(x.GoPointer(), ResultVar.GoPointer(), BytesWrittenVar)691+ cret := xOutputStreamWritevFinish(x.GoPointer(), ResultVar.GoPointer(), BytesWrittenVar, &cerr)
692+ if cerr == nil {
693+ return cret, nil
694+ }
695+ return cret, cerr
611 696
612 }697 }
613 698
M v4/gio/gpermission.go +39 -18
@@ -4,6 +4,7 @@ package gio
4 import (4 import (
5 "github.com/jwijenbergh/purego"5 "github.com/jwijenbergh/purego"
6 "github.com/jwijenbergh/puregotk/internal/core"6 "github.com/jwijenbergh/puregotk/internal/core"
7+ "github.com/jwijenbergh/puregotk/v4/glib"
7 "github.com/jwijenbergh/puregotk/v4/gobject"8 "github.com/jwijenbergh/puregotk/v4/gobject"
8 )9 )
9 10
@@ -41,7 +42,7 @@ func PermissionNewFromInternalPtr(ptr uintptr) *Permission {
41 return cls42 return cls
42 }43 }
43 44
44-var xPermissionAcquire func(uintptr, uintptr) bool45+var xPermissionAcquire func(uintptr, uintptr, **glib.Error) bool
45 46
46 // Attempts to acquire the permission represented by @permission.47 // Attempts to acquire the permission represented by @permission.
47 //48 //
@@ -58,9 +59,14 @@ var xPermissionAcquire func(uintptr, uintptr) bool
58 // This call is blocking, likely for a very long time (in the case that59 // This call is blocking, likely for a very long time (in the case that
59 // user interaction is required). See g_permission_acquire_async() for60 // user interaction is required). See g_permission_acquire_async() for
60 // the non-blocking version.61 // the non-blocking version.
61-func (x *Permission) Acquire(CancellableVar *Cancellable) bool {62+func (x *Permission) Acquire(CancellableVar *Cancellable) (bool, error) {
63+ var cerr *glib.Error
62 64
63- return xPermissionAcquire(x.GoPointer(), CancellableVar.GoPointer())65+ cret := xPermissionAcquire(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
66+ if cerr == nil {
67+ return cret, nil
68+ }
69+ return cret, cerr
64 70
65 }71 }
66 72
@@ -76,16 +82,21 @@ func (x *Permission) AcquireAsync(CancellableVar *Cancellable, CallbackVar Async
76 82
77 }83 }
78 84
79-var xPermissionAcquireFinish func(uintptr, uintptr) bool85+var xPermissionAcquireFinish func(uintptr, uintptr, **glib.Error) bool
80 86
81 // Collects the result of attempting to acquire the permission87 // Collects the result of attempting to acquire the permission
82 // represented by @permission.88 // represented by @permission.
83 //89 //
84 // This is the second half of the asynchronous version of90 // This is the second half of the asynchronous version of
85 // g_permission_acquire().91 // g_permission_acquire().
86-func (x *Permission) AcquireFinish(ResultVar AsyncResult) bool {92+func (x *Permission) AcquireFinish(ResultVar AsyncResult) (bool, error) {
93+ var cerr *glib.Error
87 94
88- return xPermissionAcquireFinish(x.GoPointer(), ResultVar.GoPointer())95+ cret := xPermissionAcquireFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
96+ if cerr == nil {
97+ return cret, nil
98+ }
99+ return cret, cerr
89 100
90 }101 }
91 102
@@ -96,8 +107,8 @@ var xPermissionGetAllowed func(uintptr) bool
96 // @permission represents the permission to perform.107 // @permission represents the permission to perform.
97 func (x *Permission) GetAllowed() bool {108 func (x *Permission) GetAllowed() bool {
98 109
99- return xPermissionGetAllowed(x.GoPointer())110+ cret := xPermissionGetAllowed(x.GoPointer())
100-111+ return cret
101 }112 }
102 113
103 var xPermissionGetCanAcquire func(uintptr) bool114 var xPermissionGetCanAcquire func(uintptr) bool
@@ -107,8 +118,8 @@ var xPermissionGetCanAcquire func(uintptr) bool
107 // g_permission_acquire().118 // g_permission_acquire().
108 func (x *Permission) GetCanAcquire() bool {119 func (x *Permission) GetCanAcquire() bool {
109 120
110- return xPermissionGetCanAcquire(x.GoPointer())121+ cret := xPermissionGetCanAcquire(x.GoPointer())
111-122+ return cret
112 }123 }
113 124
114 var xPermissionGetCanRelease func(uintptr) bool125 var xPermissionGetCanRelease func(uintptr) bool
@@ -118,8 +129,8 @@ var xPermissionGetCanRelease func(uintptr) bool
118 // g_permission_release().129 // g_permission_release().
119 func (x *Permission) GetCanRelease() bool {130 func (x *Permission) GetCanRelease() bool {
120 131
121- return xPermissionGetCanRelease(x.GoPointer())132+ cret := xPermissionGetCanRelease(x.GoPointer())
122-133+ return cret
123 }134 }
124 135
125 var xPermissionImplUpdate func(uintptr, bool, bool, bool)136 var xPermissionImplUpdate func(uintptr, bool, bool, bool)
@@ -135,7 +146,7 @@ func (x *Permission) ImplUpdate(AllowedVar bool, CanAcquireVar bool, CanReleaseV
135 146
136 }147 }
137 148
138-var xPermissionRelease func(uintptr, uintptr) bool149+var xPermissionRelease func(uintptr, uintptr, **glib.Error) bool
139 150
140 // Attempts to release the permission represented by @permission.151 // Attempts to release the permission represented by @permission.
141 //152 //
@@ -152,9 +163,14 @@ var xPermissionRelease func(uintptr, uintptr) bool
152 // This call is blocking, likely for a very long time (in the case that163 // This call is blocking, likely for a very long time (in the case that
153 // user interaction is required). See g_permission_release_async() for164 // user interaction is required). See g_permission_release_async() for
154 // the non-blocking version.165 // the non-blocking version.
155-func (x *Permission) Release(CancellableVar *Cancellable) bool {166+func (x *Permission) Release(CancellableVar *Cancellable) (bool, error) {
167+ var cerr *glib.Error
156 168
157- return xPermissionRelease(x.GoPointer(), CancellableVar.GoPointer())169+ cret := xPermissionRelease(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
170+ if cerr == nil {
171+ return cret, nil
172+ }
173+ return cret, cerr
158 174
159 }175 }
160 176
@@ -170,16 +186,21 @@ func (x *Permission) ReleaseAsync(CancellableVar *Cancellable, CallbackVar Async
170 186
171 }187 }
172 188
173-var xPermissionReleaseFinish func(uintptr, uintptr) bool189+var xPermissionReleaseFinish func(uintptr, uintptr, **glib.Error) bool
174 190
175 // Collects the result of attempting to release the permission191 // Collects the result of attempting to release the permission
176 // represented by @permission.192 // represented by @permission.
177 //193 //
178 // This is the second half of the asynchronous version of194 // This is the second half of the asynchronous version of
179 // g_permission_release().195 // g_permission_release().
180-func (x *Permission) ReleaseFinish(ResultVar AsyncResult) bool {196+func (x *Permission) ReleaseFinish(ResultVar AsyncResult) (bool, error) {
197+ var cerr *glib.Error
181 198
182- return xPermissionReleaseFinish(x.GoPointer(), ResultVar.GoPointer())199+ cret := xPermissionReleaseFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
200+ if cerr == nil {
201+ return cret, nil
202+ }
203+ return cret, cerr
183 204
184 }205 }
185 206
M v4/gio/gpollableinputstream.go +14 -9
@@ -54,8 +54,8 @@ func (x *PollableInputStreamBase) SetGoPointer(ptr uintptr) {
54 // a stream cannot switch from pollable to non-pollable or vice versa.54 // a stream cannot switch from pollable to non-pollable or vice versa.
55 func (x *PollableInputStreamBase) CanPoll() bool {55 func (x *PollableInputStreamBase) CanPoll() bool {
56 56
57- return XGPollableInputStreamCanPoll(x.GoPointer())57+ cret := XGPollableInputStreamCanPoll(x.GoPointer())
58-58+ return cret
59 }59 }
60 60
61 // Creates a #GSource that triggers when @stream can be read, or61 // Creates a #GSource that triggers when @stream can be read, or
@@ -68,8 +68,8 @@ func (x *PollableInputStreamBase) CanPoll() bool {
68 // rather than g_input_stream_read() from the callback.68 // rather than g_input_stream_read() from the callback.
69 func (x *PollableInputStreamBase) CreateSource(CancellableVar *Cancellable) *glib.Source {69 func (x *PollableInputStreamBase) CreateSource(CancellableVar *Cancellable) *glib.Source {
70 70
71- return XGPollableInputStreamCreateSource(x.GoPointer(), CancellableVar.GoPointer())71+ cret := XGPollableInputStreamCreateSource(x.GoPointer(), CancellableVar.GoPointer())
72-72+ return cret
73 }73 }
74 74
75 // Checks if @stream can be read.75 // Checks if @stream can be read.
@@ -82,8 +82,8 @@ func (x *PollableInputStreamBase) CreateSource(CancellableVar *Cancellable) *gli
82 // %G_IO_ERROR_WOULD_BLOCK error rather than blocking.82 // %G_IO_ERROR_WOULD_BLOCK error rather than blocking.
83 func (x *PollableInputStreamBase) IsReadable() bool {83 func (x *PollableInputStreamBase) IsReadable() bool {
84 84
85- return XGPollableInputStreamIsReadable(x.GoPointer())85+ cret := XGPollableInputStreamIsReadable(x.GoPointer())
86-86+ return cret
87 }87 }
88 88
89 // Attempts to read up to @count bytes from @stream into @buffer, as89 // Attempts to read up to @count bytes from @stream into @buffer, as
@@ -97,16 +97,21 @@ func (x *PollableInputStreamBase) IsReadable() bool {
97 // if @cancellable has already been cancelled when you call, which97 // if @cancellable has already been cancelled when you call, which
98 // may happen if you call this method after a source triggers due98 // may happen if you call this method after a source triggers due
99 // to having been cancelled.99 // to having been cancelled.
100-func (x *PollableInputStreamBase) ReadNonblocking(BufferVar uintptr, CountVar uint, CancellableVar *Cancellable) int {100+func (x *PollableInputStreamBase) ReadNonblocking(BufferVar uintptr, CountVar uint, CancellableVar *Cancellable) (int, error) {
101+ var cerr *glib.Error
101 102
102- return XGPollableInputStreamReadNonblocking(x.GoPointer(), BufferVar, CountVar, CancellableVar.GoPointer())103+ cret := XGPollableInputStreamReadNonblocking(x.GoPointer(), BufferVar, CountVar, CancellableVar.GoPointer(), &cerr)
104+ if cerr == nil {
105+ return cret, nil
106+ }
107+ return cret, cerr
103 108
104 }109 }
105 110
106 var XGPollableInputStreamCanPoll func(uintptr) bool111 var XGPollableInputStreamCanPoll func(uintptr) bool
107 var XGPollableInputStreamCreateSource func(uintptr, uintptr) *glib.Source112 var XGPollableInputStreamCreateSource func(uintptr, uintptr) *glib.Source
108 var XGPollableInputStreamIsReadable func(uintptr) bool113 var XGPollableInputStreamIsReadable func(uintptr) bool
109-var XGPollableInputStreamReadNonblocking func(uintptr, uintptr, uint, uintptr) int114+var XGPollableInputStreamReadNonblocking func(uintptr, uintptr, uint, uintptr, **glib.Error) int
110 115
111 func init() {116 func init() {
112 lib, err := purego.Dlopen(core.GetPath("GIO"), purego.RTLD_NOW|purego.RTLD_GLOBAL)117 lib, err := purego.Dlopen(core.GetPath("GIO"), purego.RTLD_NOW|purego.RTLD_GLOBAL)
M v4/gio/gpollableoutputstream.go +22 -12
@@ -61,8 +61,8 @@ func (x *PollableOutputStreamBase) SetGoPointer(ptr uintptr) {
61 // a stream cannot switch from pollable to non-pollable or vice versa.61 // a stream cannot switch from pollable to non-pollable or vice versa.
62 func (x *PollableOutputStreamBase) CanPoll() bool {62 func (x *PollableOutputStreamBase) CanPoll() bool {
63 63
64- return XGPollableOutputStreamCanPoll(x.GoPointer())64+ cret := XGPollableOutputStreamCanPoll(x.GoPointer())
65-65+ return cret
66 }66 }
67 67
68 // Creates a #GSource that triggers when @stream can be written, or68 // Creates a #GSource that triggers when @stream can be written, or
@@ -75,8 +75,8 @@ func (x *PollableOutputStreamBase) CanPoll() bool {
75 // rather than g_output_stream_write() from the callback.75 // rather than g_output_stream_write() from the callback.
76 func (x *PollableOutputStreamBase) CreateSource(CancellableVar *Cancellable) *glib.Source {76 func (x *PollableOutputStreamBase) CreateSource(CancellableVar *Cancellable) *glib.Source {
77 77
78- return XGPollableOutputStreamCreateSource(x.GoPointer(), CancellableVar.GoPointer())78+ cret := XGPollableOutputStreamCreateSource(x.GoPointer(), CancellableVar.GoPointer())
79-79+ return cret
80 }80 }
81 81
82 // Checks if @stream can be written.82 // Checks if @stream can be written.
@@ -89,8 +89,8 @@ func (x *PollableOutputStreamBase) CreateSource(CancellableVar *Cancellable) *gl
89 // %G_IO_ERROR_WOULD_BLOCK error rather than blocking.89 // %G_IO_ERROR_WOULD_BLOCK error rather than blocking.
90 func (x *PollableOutputStreamBase) IsWritable() bool {90 func (x *PollableOutputStreamBase) IsWritable() bool {
91 91
92- return XGPollableOutputStreamIsWritable(x.GoPointer())92+ cret := XGPollableOutputStreamIsWritable(x.GoPointer())
93-93+ return cret
94 }94 }
95 95
96 // Attempts to write up to @count bytes from @buffer to @stream, as96 // Attempts to write up to @count bytes from @buffer to @stream, as
@@ -108,9 +108,14 @@ func (x *PollableOutputStreamBase) IsWritable() bool {
108 // Also note that if %G_IO_ERROR_WOULD_BLOCK is returned some underlying108 // Also note that if %G_IO_ERROR_WOULD_BLOCK is returned some underlying
109 // transports like D/TLS require that you re-send the same @buffer and109 // transports like D/TLS require that you re-send the same @buffer and
110 // @count in the next write call.110 // @count in the next write call.
111-func (x *PollableOutputStreamBase) WriteNonblocking(BufferVar uintptr, CountVar uint, CancellableVar *Cancellable) int {111+func (x *PollableOutputStreamBase) WriteNonblocking(BufferVar uintptr, CountVar uint, CancellableVar *Cancellable) (int, error) {
112+ var cerr *glib.Error
112 113
113- return XGPollableOutputStreamWriteNonblocking(x.GoPointer(), BufferVar, CountVar, CancellableVar.GoPointer())114+ cret := XGPollableOutputStreamWriteNonblocking(x.GoPointer(), BufferVar, CountVar, CancellableVar.GoPointer(), &cerr)
115+ if cerr == nil {
116+ return cret, nil
117+ }
118+ return cret, cerr
114 119
115 }120 }
116 121
@@ -130,17 +135,22 @@ func (x *PollableOutputStreamBase) WriteNonblocking(BufferVar uintptr, CountVar
130 // Also note that if %G_POLLABLE_RETURN_WOULD_BLOCK is returned some underlying135 // Also note that if %G_POLLABLE_RETURN_WOULD_BLOCK is returned some underlying
131 // transports like D/TLS require that you re-send the same @vectors and136 // transports like D/TLS require that you re-send the same @vectors and
132 // @n_vectors in the next write call.137 // @n_vectors in the next write call.
133-func (x *PollableOutputStreamBase) WritevNonblocking(VectorsVar uintptr, NVectorsVar uint, BytesWrittenVar uint, CancellableVar *Cancellable) PollableReturn {138+func (x *PollableOutputStreamBase) WritevNonblocking(VectorsVar uintptr, NVectorsVar uint, BytesWrittenVar uint, CancellableVar *Cancellable) (PollableReturn, error) {
139+ var cerr *glib.Error
134 140
135- return XGPollableOutputStreamWritevNonblocking(x.GoPointer(), VectorsVar, NVectorsVar, BytesWrittenVar, CancellableVar.GoPointer())141+ cret := XGPollableOutputStreamWritevNonblocking(x.GoPointer(), VectorsVar, NVectorsVar, BytesWrittenVar, CancellableVar.GoPointer(), &cerr)
142+ if cerr == nil {
143+ return cret, nil
144+ }
145+ return cret, cerr
136 146
137 }147 }
138 148
139 var XGPollableOutputStreamCanPoll func(uintptr) bool149 var XGPollableOutputStreamCanPoll func(uintptr) bool
140 var XGPollableOutputStreamCreateSource func(uintptr, uintptr) *glib.Source150 var XGPollableOutputStreamCreateSource func(uintptr, uintptr) *glib.Source
141 var XGPollableOutputStreamIsWritable func(uintptr) bool151 var XGPollableOutputStreamIsWritable func(uintptr) bool
142-var XGPollableOutputStreamWriteNonblocking func(uintptr, uintptr, uint, uintptr) int152+var XGPollableOutputStreamWriteNonblocking func(uintptr, uintptr, uint, uintptr, **glib.Error) int
143-var XGPollableOutputStreamWritevNonblocking func(uintptr, uintptr, uint, uint, uintptr) PollableReturn153+var XGPollableOutputStreamWritevNonblocking func(uintptr, uintptr, uint, uint, uintptr, **glib.Error) PollableReturn
144 154
145 func init() {155 func init() {
146 lib, err := purego.Dlopen(core.GetPath("GIO"), purego.RTLD_NOW|purego.RTLD_GLOBAL)156 lib, err := purego.Dlopen(core.GetPath("GIO"), purego.RTLD_NOW|purego.RTLD_GLOBAL)
M v4/gio/gpollableutils.go +28 -13
@@ -17,8 +17,8 @@ var xPollableSourceNew func(uintptr) *glib.Source
17 // sources to it to cause it to trigger.17 // sources to it to cause it to trigger.
18 func PollableSourceNew(PollableStreamVar *gobject.Object) *glib.Source {18 func PollableSourceNew(PollableStreamVar *gobject.Object) *glib.Source {
19 19
20- return xPollableSourceNew(PollableStreamVar.GoPointer())20+ cret := xPollableSourceNew(PollableStreamVar.GoPointer())
21-21+ return cret
22 }22 }
23 23
24 var xPollableSourceNewFull func(uintptr, *glib.Source, uintptr) *glib.Source24 var xPollableSourceNewFull func(uintptr, *glib.Source, uintptr) *glib.Source
@@ -29,11 +29,11 @@ var xPollableSourceNewFull func(uintptr, *glib.Source, uintptr) *glib.Source
29 // dummy callback), and @cancellable, if they are non-%NULL.29 // dummy callback), and @cancellable, if they are non-%NULL.
30 func PollableSourceNewFull(PollableStreamVar *gobject.Object, ChildSourceVar *glib.Source, CancellableVar *Cancellable) *glib.Source {30 func PollableSourceNewFull(PollableStreamVar *gobject.Object, ChildSourceVar *glib.Source, CancellableVar *Cancellable) *glib.Source {
31 31
32- return xPollableSourceNewFull(PollableStreamVar.GoPointer(), ChildSourceVar, CancellableVar.GoPointer())32+ cret := xPollableSourceNewFull(PollableStreamVar.GoPointer(), ChildSourceVar, CancellableVar.GoPointer())
33-33+ return cret
34 }34 }
35 35
36-var xPollableStreamRead func(uintptr, uintptr, uint, bool, uintptr) int36+var xPollableStreamRead func(uintptr, uintptr, uint, bool, uintptr, **glib.Error) int
37 37
38 // Tries to read from @stream, as with g_input_stream_read() (if38 // Tries to read from @stream, as with g_input_stream_read() (if
39 // @blocking is %TRUE) or g_pollable_input_stream_read_nonblocking()39 // @blocking is %TRUE) or g_pollable_input_stream_read_nonblocking()
@@ -44,13 +44,18 @@ var xPollableStreamRead func(uintptr, uintptr, uint, bool, uintptr) int
44 // #GPollableInputStream for which g_pollable_input_stream_can_poll()44 // #GPollableInputStream for which g_pollable_input_stream_can_poll()
45 // returns %TRUE, or else the behavior is undefined. If @blocking is45 // returns %TRUE, or else the behavior is undefined. If @blocking is
46 // %TRUE, then @stream does not need to be a #GPollableInputStream.46 // %TRUE, then @stream does not need to be a #GPollableInputStream.
47-func PollableStreamRead(StreamVar *InputStream, BufferVar uintptr, CountVar uint, BlockingVar bool, CancellableVar *Cancellable) int {47+func PollableStreamRead(StreamVar *InputStream, BufferVar uintptr, CountVar uint, BlockingVar bool, CancellableVar *Cancellable) (int, error) {
48+ var cerr *glib.Error
48 49
49- return xPollableStreamRead(StreamVar.GoPointer(), BufferVar, CountVar, BlockingVar, CancellableVar.GoPointer())50+ cret := xPollableStreamRead(StreamVar.GoPointer(), BufferVar, CountVar, BlockingVar, CancellableVar.GoPointer(), &cerr)
51+ if cerr == nil {
52+ return cret, nil
53+ }
54+ return cret, cerr
50 55
51 }56 }
52 57
53-var xPollableStreamWrite func(uintptr, uintptr, uint, bool, uintptr) int58+var xPollableStreamWrite func(uintptr, uintptr, uint, bool, uintptr, **glib.Error) int
54 59
55 // Tries to write to @stream, as with g_output_stream_write() (if60 // Tries to write to @stream, as with g_output_stream_write() (if
56 // @blocking is %TRUE) or g_pollable_output_stream_write_nonblocking()61 // @blocking is %TRUE) or g_pollable_output_stream_write_nonblocking()
@@ -62,13 +67,18 @@ var xPollableStreamWrite func(uintptr, uintptr, uint, bool, uintptr) int
62 // g_pollable_output_stream_can_poll() returns %TRUE or else the67 // g_pollable_output_stream_can_poll() returns %TRUE or else the
63 // behavior is undefined. If @blocking is %TRUE, then @stream does not68 // behavior is undefined. If @blocking is %TRUE, then @stream does not
64 // need to be a #GPollableOutputStream.69 // need to be a #GPollableOutputStream.
65-func PollableStreamWrite(StreamVar *OutputStream, BufferVar uintptr, CountVar uint, BlockingVar bool, CancellableVar *Cancellable) int {70+func PollableStreamWrite(StreamVar *OutputStream, BufferVar uintptr, CountVar uint, BlockingVar bool, CancellableVar *Cancellable) (int, error) {
71+ var cerr *glib.Error
66 72
67- return xPollableStreamWrite(StreamVar.GoPointer(), BufferVar, CountVar, BlockingVar, CancellableVar.GoPointer())73+ cret := xPollableStreamWrite(StreamVar.GoPointer(), BufferVar, CountVar, BlockingVar, CancellableVar.GoPointer(), &cerr)
74+ if cerr == nil {
75+ return cret, nil
76+ }
77+ return cret, cerr
68 78
69 }79 }
70 80
71-var xPollableStreamWriteAll func(uintptr, uintptr, uint, bool, uint, uintptr) bool81+var xPollableStreamWriteAll func(uintptr, uintptr, uint, bool, uint, uintptr, **glib.Error) bool
72 82
73 // Tries to write @count bytes to @stream, as with83 // Tries to write @count bytes to @stream, as with
74 // g_output_stream_write_all(), but using g_pollable_stream_write()84 // g_output_stream_write_all(), but using g_pollable_stream_write()
@@ -88,9 +98,14 @@ var xPollableStreamWriteAll func(uintptr, uintptr, uint, bool, uint, uintptr) bo
88 // g_pollable_output_stream_can_poll() returns %TRUE or else the98 // g_pollable_output_stream_can_poll() returns %TRUE or else the
89 // behavior is undefined. If @blocking is %TRUE, then @stream does not99 // behavior is undefined. If @blocking is %TRUE, then @stream does not
90 // need to be a #GPollableOutputStream.100 // need to be a #GPollableOutputStream.
91-func PollableStreamWriteAll(StreamVar *OutputStream, BufferVar uintptr, CountVar uint, BlockingVar bool, BytesWrittenVar uint, CancellableVar *Cancellable) bool {101+func PollableStreamWriteAll(StreamVar *OutputStream, BufferVar uintptr, CountVar uint, BlockingVar bool, BytesWrittenVar uint, CancellableVar *Cancellable) (bool, error) {
102+ var cerr *glib.Error
92 103
93- return xPollableStreamWriteAll(StreamVar.GoPointer(), BufferVar, CountVar, BlockingVar, BytesWrittenVar, CancellableVar.GoPointer())104+ cret := xPollableStreamWriteAll(StreamVar.GoPointer(), BufferVar, CountVar, BlockingVar, BytesWrittenVar, CancellableVar.GoPointer(), &cerr)
105+ if cerr == nil {
106+ return cret, nil
107+ }
108+ return cret, cerr
94 109
95 }110 }
96 111
M v4/gio/gpowerprofilemonitor.go +10 -10
@@ -57,8 +57,8 @@ func (x *PowerProfileMonitorBase) SetGoPointer(ptr uintptr) {
57 // changed.57 // changed.
58 func (x *PowerProfileMonitorBase) GetPowerSaverEnabled() bool {58 func (x *PowerProfileMonitorBase) GetPowerSaverEnabled() bool {
59 59
60- return XGPowerProfileMonitorGetPowerSaverEnabled(x.GoPointer())60+ cret := XGPowerProfileMonitorGetPowerSaverEnabled(x.GoPointer())
61-61+ return cret
62 }62 }
63 63
64 var XGPowerProfileMonitorGetPowerSaverEnabled func(uintptr) bool64 var XGPowerProfileMonitorGetPowerSaverEnabled func(uintptr) bool
@@ -67,16 +67,16 @@ var xPowerProfileMonitorDupDefault func() uintptr
67 67
68 // Gets a reference to the default #GPowerProfileMonitor for the system.68 // Gets a reference to the default #GPowerProfileMonitor for the system.
69 func PowerProfileMonitorDupDefault() *PowerProfileMonitorBase {69 func PowerProfileMonitorDupDefault() *PowerProfileMonitorBase {
70+ var cls *PowerProfileMonitorBase
70 71
71- PowerProfileMonitorDupDefaultPtr := xPowerProfileMonitorDupDefault()72+ cret := xPowerProfileMonitorDupDefault()
72- if PowerProfileMonitorDupDefaultPtr == 0 {
73- return nil
74- }
75-
76- PowerProfileMonitorDupDefaultCls := &PowerProfileMonitorBase{}
77- PowerProfileMonitorDupDefaultCls.Ptr = PowerProfileMonitorDupDefaultPtr
78- return PowerProfileMonitorDupDefaultCls
79 73
74+ if cret == 0 {
75+ return cls
76+ }
77+ cls = &PowerProfileMonitorBase{}
78+ cls.Ptr = cret
79+ return cls
80 }80 }
81 81
82 func init() {82 func init() {
M v4/gio/gproxy.go +39 -28
@@ -4,6 +4,7 @@ package gio
4 import (4 import (
5 "github.com/jwijenbergh/purego"5 "github.com/jwijenbergh/purego"
6 "github.com/jwijenbergh/puregotk/internal/core"6 "github.com/jwijenbergh/puregotk/internal/core"
7+ "github.com/jwijenbergh/puregotk/v4/glib"
7 )8 )
8 9
9 // Provides an interface for handling proxy connection and payload.10 // Provides an interface for handling proxy connection and payload.
@@ -41,16 +42,21 @@ func (x *ProxyBase) SetGoPointer(ptr uintptr) {
41 // #GSocketConnection that is connected to the proxy server), this42 // #GSocketConnection that is connected to the proxy server), this
42 // does the necessary handshake to connect to @proxy_address, and if43 // does the necessary handshake to connect to @proxy_address, and if
43 // required, wraps the #GIOStream to handle proxy payload.44 // required, wraps the #GIOStream to handle proxy payload.
44-func (x *ProxyBase) Connect(ConnectionVar *IOStream, ProxyAddressVar *ProxyAddress, CancellableVar *Cancellable) *IOStream {45+func (x *ProxyBase) Connect(ConnectionVar *IOStream, ProxyAddressVar *ProxyAddress, CancellableVar *Cancellable) (*IOStream, error) {
46+ var cls *IOStream
47+ var cerr *glib.Error
45 48
46- ConnectPtr := XGProxyConnect(x.GoPointer(), ConnectionVar.GoPointer(), ProxyAddressVar.GoPointer(), CancellableVar.GoPointer())49+ cret := XGProxyConnect(x.GoPointer(), ConnectionVar.GoPointer(), ProxyAddressVar.GoPointer(), CancellableVar.GoPointer(), &cerr)
47- if ConnectPtr == 0 {
48- return nil
49- }
50 50
51- ConnectCls := &IOStream{}51+ if cret == 0 {
52- ConnectCls.Ptr = ConnectPtr52+ return cls, cerr
53- return ConnectCls53+ }
54+ cls = &IOStream{}
55+ cls.Ptr = cret
56+ if cerr == nil {
57+ return cls, nil
58+ }
59+ return cls, cerr
54 60
55 }61 }
56 62
@@ -62,16 +68,21 @@ func (x *ProxyBase) ConnectAsync(ConnectionVar *IOStream, ProxyAddressVar *Proxy
62 }68 }
63 69
64 // See g_proxy_connect().70 // See g_proxy_connect().
65-func (x *ProxyBase) ConnectFinish(ResultVar AsyncResult) *IOStream {71+func (x *ProxyBase) ConnectFinish(ResultVar AsyncResult) (*IOStream, error) {
72+ var cls *IOStream
73+ var cerr *glib.Error
66 74
67- ConnectFinishPtr := XGProxyConnectFinish(x.GoPointer(), ResultVar.GoPointer())75+ cret := XGProxyConnectFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
68- if ConnectFinishPtr == 0 {
69- return nil
70- }
71 76
72- ConnectFinishCls := &IOStream{}77+ if cret == 0 {
73- ConnectFinishCls.Ptr = ConnectFinishPtr78+ return cls, cerr
74- return ConnectFinishCls79+ }
80+ cls = &IOStream{}
81+ cls.Ptr = cret
82+ if cerr == nil {
83+ return cls, nil
84+ }
85+ return cls, cerr
75 86
76 }87 }
77 88
@@ -84,13 +95,13 @@ func (x *ProxyBase) ConnectFinish(ResultVar AsyncResult) *IOStream {
84 // g_proxy_connect() or g_proxy_connect_async().95 // g_proxy_connect() or g_proxy_connect_async().
85 func (x *ProxyBase) SupportsHostname() bool {96 func (x *ProxyBase) SupportsHostname() bool {
86 97
87- return XGProxySupportsHostname(x.GoPointer())98+ cret := XGProxySupportsHostname(x.GoPointer())
88-99+ return cret
89 }100 }
90 101
91-var XGProxyConnect func(uintptr, uintptr, uintptr, uintptr) uintptr102+var XGProxyConnect func(uintptr, uintptr, uintptr, uintptr, **glib.Error) uintptr
92 var XGProxyConnectAsync func(uintptr, uintptr, uintptr, uintptr, uintptr, uintptr)103 var XGProxyConnectAsync func(uintptr, uintptr, uintptr, uintptr, uintptr, uintptr)
93-var XGProxyConnectFinish func(uintptr, uintptr) uintptr104+var XGProxyConnectFinish func(uintptr, uintptr, **glib.Error) uintptr
94 var XGProxySupportsHostname func(uintptr) bool105 var XGProxySupportsHostname func(uintptr) bool
95 106
96 var xProxyGetDefaultForProtocol func(string) uintptr107 var xProxyGetDefaultForProtocol func(string) uintptr
@@ -98,16 +109,16 @@ var xProxyGetDefaultForProtocol func(string) uintptr
98 // Find the `gio-proxy` extension point for a proxy implementation that supports109 // Find the `gio-proxy` extension point for a proxy implementation that supports
99 // the specified protocol.110 // the specified protocol.
100 func ProxyGetDefaultForProtocol(ProtocolVar string) *ProxyBase {111 func ProxyGetDefaultForProtocol(ProtocolVar string) *ProxyBase {
112+ var cls *ProxyBase
101 113
102- ProxyGetDefaultForProtocolPtr := xProxyGetDefaultForProtocol(ProtocolVar)114+ cret := xProxyGetDefaultForProtocol(ProtocolVar)
103- if ProxyGetDefaultForProtocolPtr == 0 {
104- return nil
105- }
106-
107- ProxyGetDefaultForProtocolCls := &ProxyBase{}
108- ProxyGetDefaultForProtocolCls.Ptr = ProxyGetDefaultForProtocolPtr
109- return ProxyGetDefaultForProtocolCls
110 115
116+ if cret == 0 {
117+ return cls
118+ }
119+ cls = &ProxyBase{}
120+ cls.Ptr = cret
121+ return cls
111 }122 }
112 123
113 func init() {124 func init() {
M v4/gio/gproxyaddress.go +41 -39
@@ -34,14 +34,16 @@ var xNewProxyAddress func(uintptr, uint16, string, string, uint16, string, strin
34 // #GProxyAddress:destination-protocol fields; use g_object_new()34 // #GProxyAddress:destination-protocol fields; use g_object_new()
35 // directly if you want to set those.)35 // directly if you want to set those.)
36 func NewProxyAddress(InetaddrVar *InetAddress, PortVar uint16, ProtocolVar string, DestHostnameVar string, DestPortVar uint16, UsernameVar string, PasswordVar string) *SocketAddress {36 func NewProxyAddress(InetaddrVar *InetAddress, PortVar uint16, ProtocolVar string, DestHostnameVar string, DestPortVar uint16, UsernameVar string, PasswordVar string) *SocketAddress {
37- NewProxyAddressPtr := xNewProxyAddress(InetaddrVar.GoPointer(), PortVar, ProtocolVar, DestHostnameVar, DestPortVar, UsernameVar, PasswordVar)37+ var cls *SocketAddress
38- if NewProxyAddressPtr == 0 {38+
39- return nil39+ cret := xNewProxyAddress(InetaddrVar.GoPointer(), PortVar, ProtocolVar, DestHostnameVar, DestPortVar, UsernameVar, PasswordVar)
40- }
41 40
42- NewProxyAddressCls := &SocketAddress{}41+ if cret == 0 {
43- NewProxyAddressCls.Ptr = NewProxyAddressPtr42+ return cls
44- return NewProxyAddressCls43+ }
44+ cls = &SocketAddress{}
45+ cls.Ptr = cret
46+ return cls
45 }47 }
46 48
47 var xProxyAddressGetDestinationHostname func(uintptr) string49 var xProxyAddressGetDestinationHostname func(uintptr) string
@@ -51,8 +53,8 @@ var xProxyAddressGetDestinationHostname func(uintptr) string
51 // itself.53 // itself.
52 func (x *ProxyAddress) GetDestinationHostname() string {54 func (x *ProxyAddress) GetDestinationHostname() string {
53 55
54- return xProxyAddressGetDestinationHostname(x.GoPointer())56+ cret := xProxyAddressGetDestinationHostname(x.GoPointer())
55-57+ return cret
56 }58 }
57 59
58 var xProxyAddressGetDestinationPort func(uintptr) uint1660 var xProxyAddressGetDestinationPort func(uintptr) uint16
@@ -62,8 +64,8 @@ var xProxyAddressGetDestinationPort func(uintptr) uint16
62 // port number of the proxy itself.64 // port number of the proxy itself.
63 func (x *ProxyAddress) GetDestinationPort() uint16 {65 func (x *ProxyAddress) GetDestinationPort() uint16 {
64 66
65- return xProxyAddressGetDestinationPort(x.GoPointer())67+ cret := xProxyAddressGetDestinationPort(x.GoPointer())
66-68+ return cret
67 }69 }
68 70
69 var xProxyAddressGetDestinationProtocol func(uintptr) string71 var xProxyAddressGetDestinationProtocol func(uintptr) string
@@ -72,8 +74,8 @@ var xProxyAddressGetDestinationProtocol func(uintptr) string
72 // server; eg, "http" or "ftp".74 // server; eg, "http" or "ftp".
73 func (x *ProxyAddress) GetDestinationProtocol() string {75 func (x *ProxyAddress) GetDestinationProtocol() string {
74 76
75- return xProxyAddressGetDestinationProtocol(x.GoPointer())77+ cret := xProxyAddressGetDestinationProtocol(x.GoPointer())
76-78+ return cret
77 }79 }
78 80
79 var xProxyAddressGetPassword func(uintptr) string81 var xProxyAddressGetPassword func(uintptr) string
@@ -81,8 +83,8 @@ var xProxyAddressGetPassword func(uintptr) string
81 // Gets @proxy's password.83 // Gets @proxy's password.
82 func (x *ProxyAddress) GetPassword() string {84 func (x *ProxyAddress) GetPassword() string {
83 85
84- return xProxyAddressGetPassword(x.GoPointer())86+ cret := xProxyAddressGetPassword(x.GoPointer())
85-87+ return cret
86 }88 }
87 89
88 var xProxyAddressGetProtocol func(uintptr) string90 var xProxyAddressGetProtocol func(uintptr) string
@@ -90,8 +92,8 @@ var xProxyAddressGetProtocol func(uintptr) string
90 // Gets @proxy's protocol. eg, "socks" or "http"92 // Gets @proxy's protocol. eg, "socks" or "http"
91 func (x *ProxyAddress) GetProtocol() string {93 func (x *ProxyAddress) GetProtocol() string {
92 94
93- return xProxyAddressGetProtocol(x.GoPointer())95+ cret := xProxyAddressGetProtocol(x.GoPointer())
94-96+ return cret
95 }97 }
96 98
97 var xProxyAddressGetUri func(uintptr) string99 var xProxyAddressGetUri func(uintptr) string
@@ -99,8 +101,8 @@ var xProxyAddressGetUri func(uintptr) string
99 // Gets the proxy URI that @proxy was constructed from.101 // Gets the proxy URI that @proxy was constructed from.
100 func (x *ProxyAddress) GetUri() string {102 func (x *ProxyAddress) GetUri() string {
101 103
102- return xProxyAddressGetUri(x.GoPointer())104+ cret := xProxyAddressGetUri(x.GoPointer())
103-105+ return cret
104 }106 }
105 107
106 var xProxyAddressGetUsername func(uintptr) string108 var xProxyAddressGetUsername func(uintptr) string
@@ -108,8 +110,8 @@ var xProxyAddressGetUsername func(uintptr) string
108 // Gets @proxy's username.110 // Gets @proxy's username.
109 func (x *ProxyAddress) GetUsername() string {111 func (x *ProxyAddress) GetUsername() string {
110 112
111- return xProxyAddressGetUsername(x.GoPointer())113+ cret := xProxyAddressGetUsername(x.GoPointer())
112-114+ return cret
113 }115 }
114 116
115 func (c *ProxyAddress) GoPointer() uintptr {117 func (c *ProxyAddress) GoPointer() uintptr {
@@ -122,16 +124,16 @@ func (c *ProxyAddress) SetGoPointer(ptr uintptr) {
122 124
123 // Creates a #GSocketAddressEnumerator for @connectable.125 // Creates a #GSocketAddressEnumerator for @connectable.
124 func (x *ProxyAddress) Enumerate() *SocketAddressEnumerator {126 func (x *ProxyAddress) Enumerate() *SocketAddressEnumerator {
127+ var cls *SocketAddressEnumerator
125 128
126- EnumeratePtr := XGSocketConnectableEnumerate(x.GoPointer())129+ cret := XGSocketConnectableEnumerate(x.GoPointer())
127- if EnumeratePtr == 0 {
128- return nil
129- }
130-
131- EnumerateCls := &SocketAddressEnumerator{}
132- EnumerateCls.Ptr = EnumeratePtr
133- return EnumerateCls
134 130
131+ if cret == 0 {
132+ return cls
133+ }
134+ cls = &SocketAddressEnumerator{}
135+ cls.Ptr = cret
136+ return cls
135 }137 }
136 138
137 // Creates a #GSocketAddressEnumerator for @connectable that will139 // Creates a #GSocketAddressEnumerator for @connectable that will
@@ -142,16 +144,16 @@ func (x *ProxyAddress) Enumerate() *SocketAddressEnumerator {
142 // g_socket_connectable_proxy_enumerate(), this will fall back to144 // g_socket_connectable_proxy_enumerate(), this will fall back to
143 // calling g_socket_connectable_enumerate().145 // calling g_socket_connectable_enumerate().
144 func (x *ProxyAddress) ProxyEnumerate() *SocketAddressEnumerator {146 func (x *ProxyAddress) ProxyEnumerate() *SocketAddressEnumerator {
147+ var cls *SocketAddressEnumerator
145 148
146- ProxyEnumeratePtr := XGSocketConnectableProxyEnumerate(x.GoPointer())149+ cret := XGSocketConnectableProxyEnumerate(x.GoPointer())
147- if ProxyEnumeratePtr == 0 {
148- return nil
149- }
150-
151- ProxyEnumerateCls := &SocketAddressEnumerator{}
152- ProxyEnumerateCls.Ptr = ProxyEnumeratePtr
153- return ProxyEnumerateCls
154 150
151+ if cret == 0 {
152+ return cls
153+ }
154+ cls = &SocketAddressEnumerator{}
155+ cls.Ptr = cret
156+ return cls
155 }157 }
156 158
157 // Format a #GSocketConnectable as a string. This is a human-readable format for159 // Format a #GSocketConnectable as a string. This is a human-readable format for
@@ -163,8 +165,8 @@ func (x *ProxyAddress) ProxyEnumerate() *SocketAddressEnumerator {
163 // the implementation’s type name will be returned as a fallback.165 // the implementation’s type name will be returned as a fallback.
164 func (x *ProxyAddress) ToString() string {166 func (x *ProxyAddress) ToString() string {
165 167
166- return XGSocketConnectableToString(x.GoPointer())168+ cret := XGSocketConnectableToString(x.GoPointer())
167-169+ return cret
168 }170 }
169 171
170 func init() {172 func init() {
M v4/gio/gproxyresolver.go +28 -18
@@ -4,6 +4,7 @@ package gio
4 import (4 import (
5 "github.com/jwijenbergh/purego"5 "github.com/jwijenbergh/purego"
6 "github.com/jwijenbergh/puregotk/internal/core"6 "github.com/jwijenbergh/puregotk/internal/core"
7+ "github.com/jwijenbergh/puregotk/v4/glib"
7 "github.com/jwijenbergh/puregotk/v4/gobject"8 "github.com/jwijenbergh/puregotk/v4/gobject"
8 )9 )
9 10
@@ -44,8 +45,8 @@ func (x *ProxyResolverBase) SetGoPointer(ptr uintptr) {
44 // resolver that returns %TRUE for this method.)45 // resolver that returns %TRUE for this method.)
45 func (x *ProxyResolverBase) IsSupported() bool {46 func (x *ProxyResolverBase) IsSupported() bool {
46 47
47- return XGProxyResolverIsSupported(x.GoPointer())48+ cret := XGProxyResolverIsSupported(x.GoPointer())
48-49+ return cret
49 }50 }
50 51
51 // Looks into the system proxy configuration to determine what proxy,52 // Looks into the system proxy configuration to determine what proxy,
@@ -63,9 +64,14 @@ func (x *ProxyResolverBase) IsSupported() bool {
63 // `direct://` is used when no proxy is needed.64 // `direct://` is used when no proxy is needed.
64 // Direct connection should not be attempted unless it is part of the65 // Direct connection should not be attempted unless it is part of the
65 // returned array of proxies.66 // returned array of proxies.
66-func (x *ProxyResolverBase) Lookup(UriVar string, CancellableVar *Cancellable) uintptr {67+func (x *ProxyResolverBase) Lookup(UriVar string, CancellableVar *Cancellable) (uintptr, error) {
68+ var cerr *glib.Error
67 69
68- return XGProxyResolverLookup(x.GoPointer(), UriVar, CancellableVar.GoPointer())70+ cret := XGProxyResolverLookup(x.GoPointer(), UriVar, CancellableVar.GoPointer(), &cerr)
71+ if cerr == nil {
72+ return cret, nil
73+ }
74+ return cret, cerr
69 75
70 }76 }
71 77
@@ -80,33 +86,37 @@ func (x *ProxyResolverBase) LookupAsync(UriVar string, CancellableVar *Cancellab
80 // Call this function to obtain the array of proxy URIs when86 // Call this function to obtain the array of proxy URIs when
81 // g_proxy_resolver_lookup_async() is complete. See87 // g_proxy_resolver_lookup_async() is complete. See
82 // g_proxy_resolver_lookup() for more details.88 // g_proxy_resolver_lookup() for more details.
83-func (x *ProxyResolverBase) LookupFinish(ResultVar AsyncResult) uintptr {89+func (x *ProxyResolverBase) LookupFinish(ResultVar AsyncResult) (uintptr, error) {
90+ var cerr *glib.Error
84 91
85- return XGProxyResolverLookupFinish(x.GoPointer(), ResultVar.GoPointer())92+ cret := XGProxyResolverLookupFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
93+ if cerr == nil {
94+ return cret, nil
95+ }
96+ return cret, cerr
86 97
87 }98 }
88 99
89 var XGProxyResolverIsSupported func(uintptr) bool100 var XGProxyResolverIsSupported func(uintptr) bool
90-var XGProxyResolverLookup func(uintptr, string, uintptr) uintptr101+var XGProxyResolverLookup func(uintptr, string, uintptr, **glib.Error) uintptr
91 var XGProxyResolverLookupAsync func(uintptr, string, uintptr, uintptr, uintptr)102 var XGProxyResolverLookupAsync func(uintptr, string, uintptr, uintptr, uintptr)
92-var XGProxyResolverLookupFinish func(uintptr, uintptr) uintptr103+var XGProxyResolverLookupFinish func(uintptr, uintptr, **glib.Error) uintptr
93 104
94 var xProxyResolverGetDefault func() uintptr105 var xProxyResolverGetDefault func() uintptr
95 106
96 // Gets the default #GProxyResolver for the system.107 // Gets the default #GProxyResolver for the system.
97 func ProxyResolverGetDefault() *ProxyResolverBase {108 func ProxyResolverGetDefault() *ProxyResolverBase {
109+ var cls *ProxyResolverBase
98 110
99- ProxyResolverGetDefaultPtr := xProxyResolverGetDefault()111+ cret := xProxyResolverGetDefault()
100- if ProxyResolverGetDefaultPtr == 0 {
101- return nil
102- }
103-
104- gobject.IncreaseRef(ProxyResolverGetDefaultPtr)
105-
106- ProxyResolverGetDefaultCls := &ProxyResolverBase{}
107- ProxyResolverGetDefaultCls.Ptr = ProxyResolverGetDefaultPtr
108- return ProxyResolverGetDefaultCls
109 112
113+ if cret == 0 {
114+ return cls
115+ }
116+ gobject.IncreaseRef(cret)
117+ cls = &ProxyResolverBase{}
118+ cls.Ptr = cret
119+ return cls
110 }120 }
111 121
112 func init() {122 func init() {
M v4/gio/gresolver.go +80 -30
@@ -46,7 +46,7 @@ func ResolverNewFromInternalPtr(ptr uintptr) *Resolver {
46 return cls46 return cls
47 }47 }
48 48
49-var xResolverLookupByAddress func(uintptr, uintptr, uintptr) string49+var xResolverLookupByAddress func(uintptr, uintptr, uintptr, **glib.Error) string
50 50
51 // Synchronously reverse-resolves @address to determine its51 // Synchronously reverse-resolves @address to determine its
52 // associated hostname.52 // associated hostname.
@@ -57,9 +57,14 @@ var xResolverLookupByAddress func(uintptr, uintptr, uintptr) string
57 // If @cancellable is non-%NULL, it can be used to cancel the57 // If @cancellable is non-%NULL, it can be used to cancel the
58 // operation, in which case @error (if non-%NULL) will be set to58 // operation, in which case @error (if non-%NULL) will be set to
59 // %G_IO_ERROR_CANCELLED.59 // %G_IO_ERROR_CANCELLED.
60-func (x *Resolver) LookupByAddress(AddressVar *InetAddress, CancellableVar *Cancellable) string {60+func (x *Resolver) LookupByAddress(AddressVar *InetAddress, CancellableVar *Cancellable) (string, error) {
61+ var cerr *glib.Error
61 62
62- return xResolverLookupByAddress(x.GoPointer(), AddressVar.GoPointer(), CancellableVar.GoPointer())63+ cret := xResolverLookupByAddress(x.GoPointer(), AddressVar.GoPointer(), CancellableVar.GoPointer(), &cerr)
64+ if cerr == nil {
65+ return cret, nil
66+ }
67+ return cret, cerr
63 68
64 }69 }
65 70
@@ -74,7 +79,7 @@ func (x *Resolver) LookupByAddressAsync(AddressVar *InetAddress, CancellableVar
74 79
75 }80 }
76 81
77-var xResolverLookupByAddressFinish func(uintptr, uintptr) string82+var xResolverLookupByAddressFinish func(uintptr, uintptr, **glib.Error) string
78 83
79 // Retrieves the result of a previous call to84 // Retrieves the result of a previous call to
80 // g_resolver_lookup_by_address_async().85 // g_resolver_lookup_by_address_async().
@@ -82,13 +87,18 @@ var xResolverLookupByAddressFinish func(uintptr, uintptr) string
82 // If the DNS resolution failed, @error (if non-%NULL) will be set to87 // If the DNS resolution failed, @error (if non-%NULL) will be set to
83 // a value from #GResolverError. If the operation was cancelled,88 // a value from #GResolverError. If the operation was cancelled,
84 // @error will be set to %G_IO_ERROR_CANCELLED.89 // @error will be set to %G_IO_ERROR_CANCELLED.
85-func (x *Resolver) LookupByAddressFinish(ResultVar AsyncResult) string {90+func (x *Resolver) LookupByAddressFinish(ResultVar AsyncResult) (string, error) {
91+ var cerr *glib.Error
86 92
87- return xResolverLookupByAddressFinish(x.GoPointer(), ResultVar.GoPointer())93+ cret := xResolverLookupByAddressFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
94+ if cerr == nil {
95+ return cret, nil
96+ }
97+ return cret, cerr
88 98
89 }99 }
90 100
91-var xResolverLookupByName func(uintptr, string, uintptr) *glib.List101+var xResolverLookupByName func(uintptr, string, uintptr, **glib.Error) *glib.List
92 102
93 // Synchronously resolves @hostname to determine its associated IP103 // Synchronously resolves @hostname to determine its associated IP
94 // address(es). @hostname may be an ASCII-only or UTF-8 hostname, or104 // address(es). @hostname may be an ASCII-only or UTF-8 hostname, or
@@ -113,9 +123,14 @@ var xResolverLookupByName func(uintptr, string, uintptr) *glib.List
113 // If you are planning to connect to a socket on the resolved IP123 // If you are planning to connect to a socket on the resolved IP
114 // address, it may be easier to create a #GNetworkAddress and use its124 // address, it may be easier to create a #GNetworkAddress and use its
115 // #GSocketConnectable interface.125 // #GSocketConnectable interface.
116-func (x *Resolver) LookupByName(HostnameVar string, CancellableVar *Cancellable) *glib.List {126+func (x *Resolver) LookupByName(HostnameVar string, CancellableVar *Cancellable) (*glib.List, error) {
127+ var cerr *glib.Error
117 128
118- return xResolverLookupByName(x.GoPointer(), HostnameVar, CancellableVar.GoPointer())129+ cret := xResolverLookupByName(x.GoPointer(), HostnameVar, CancellableVar.GoPointer(), &cerr)
130+ if cerr == nil {
131+ return cret, nil
132+ }
133+ return cret, cerr
119 134
120 }135 }
121 136
@@ -131,7 +146,7 @@ func (x *Resolver) LookupByNameAsync(HostnameVar string, CancellableVar *Cancell
131 146
132 }147 }
133 148
134-var xResolverLookupByNameFinish func(uintptr, uintptr) *glib.List149+var xResolverLookupByNameFinish func(uintptr, uintptr, **glib.Error) *glib.List
135 150
136 // Retrieves the result of a call to151 // Retrieves the result of a call to
137 // g_resolver_lookup_by_name_async().152 // g_resolver_lookup_by_name_async().
@@ -139,20 +154,30 @@ var xResolverLookupByNameFinish func(uintptr, uintptr) *glib.List
139 // If the DNS resolution failed, @error (if non-%NULL) will be set to154 // If the DNS resolution failed, @error (if non-%NULL) will be set to
140 // a value from #GResolverError. If the operation was cancelled,155 // a value from #GResolverError. If the operation was cancelled,
141 // @error will be set to %G_IO_ERROR_CANCELLED.156 // @error will be set to %G_IO_ERROR_CANCELLED.
142-func (x *Resolver) LookupByNameFinish(ResultVar AsyncResult) *glib.List {157+func (x *Resolver) LookupByNameFinish(ResultVar AsyncResult) (*glib.List, error) {
158+ var cerr *glib.Error
143 159
144- return xResolverLookupByNameFinish(x.GoPointer(), ResultVar.GoPointer())160+ cret := xResolverLookupByNameFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
161+ if cerr == nil {
162+ return cret, nil
163+ }
164+ return cret, cerr
145 165
146 }166 }
147 167
148-var xResolverLookupByNameWithFlags func(uintptr, string, ResolverNameLookupFlags, uintptr) *glib.List168+var xResolverLookupByNameWithFlags func(uintptr, string, ResolverNameLookupFlags, uintptr, **glib.Error) *glib.List
149 169
150 // This differs from g_resolver_lookup_by_name() in that you can modify170 // This differs from g_resolver_lookup_by_name() in that you can modify
151 // the lookup behavior with @flags. For example this can be used to limit171 // the lookup behavior with @flags. For example this can be used to limit
152 // results with %G_RESOLVER_NAME_LOOKUP_FLAGS_IPV4_ONLY.172 // results with %G_RESOLVER_NAME_LOOKUP_FLAGS_IPV4_ONLY.
153-func (x *Resolver) LookupByNameWithFlags(HostnameVar string, FlagsVar ResolverNameLookupFlags, CancellableVar *Cancellable) *glib.List {173+func (x *Resolver) LookupByNameWithFlags(HostnameVar string, FlagsVar ResolverNameLookupFlags, CancellableVar *Cancellable) (*glib.List, error) {
174+ var cerr *glib.Error
154 175
155- return xResolverLookupByNameWithFlags(x.GoPointer(), HostnameVar, FlagsVar, CancellableVar.GoPointer())176+ cret := xResolverLookupByNameWithFlags(x.GoPointer(), HostnameVar, FlagsVar, CancellableVar.GoPointer(), &cerr)
177+ if cerr == nil {
178+ return cret, nil
179+ }
180+ return cret, cerr
156 181
157 }182 }
158 183
@@ -168,7 +193,7 @@ func (x *Resolver) LookupByNameWithFlagsAsync(HostnameVar string, FlagsVar Resol
168 193
169 }194 }
170 195
171-var xResolverLookupByNameWithFlagsFinish func(uintptr, uintptr) *glib.List196+var xResolverLookupByNameWithFlagsFinish func(uintptr, uintptr, **glib.Error) *glib.List
172 197
173 // Retrieves the result of a call to198 // Retrieves the result of a call to
174 // g_resolver_lookup_by_name_with_flags_async().199 // g_resolver_lookup_by_name_with_flags_async().
@@ -176,13 +201,18 @@ var xResolverLookupByNameWithFlagsFinish func(uintptr, uintptr) *glib.List
176 // If the DNS resolution failed, @error (if non-%NULL) will be set to201 // If the DNS resolution failed, @error (if non-%NULL) will be set to
177 // a value from #GResolverError. If the operation was cancelled,202 // a value from #GResolverError. If the operation was cancelled,
178 // @error will be set to %G_IO_ERROR_CANCELLED.203 // @error will be set to %G_IO_ERROR_CANCELLED.
179-func (x *Resolver) LookupByNameWithFlagsFinish(ResultVar AsyncResult) *glib.List {204+func (x *Resolver) LookupByNameWithFlagsFinish(ResultVar AsyncResult) (*glib.List, error) {
205+ var cerr *glib.Error
180 206
181- return xResolverLookupByNameWithFlagsFinish(x.GoPointer(), ResultVar.GoPointer())207+ cret := xResolverLookupByNameWithFlagsFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
208+ if cerr == nil {
209+ return cret, nil
210+ }
211+ return cret, cerr
182 212
183 }213 }
184 214
185-var xResolverLookupRecords func(uintptr, string, ResolverRecordType, uintptr) *glib.List215+var xResolverLookupRecords func(uintptr, string, ResolverRecordType, uintptr, **glib.Error) *glib.List
186 216
187 // Synchronously performs a DNS record lookup for the given @rrname and returns217 // Synchronously performs a DNS record lookup for the given @rrname and returns
188 // a list of records as #GVariant tuples. See #GResolverRecordType for218 // a list of records as #GVariant tuples. See #GResolverRecordType for
@@ -194,9 +224,14 @@ var xResolverLookupRecords func(uintptr, string, ResolverRecordType, uintptr) *g
194 // If @cancellable is non-%NULL, it can be used to cancel the224 // If @cancellable is non-%NULL, it can be used to cancel the
195 // operation, in which case @error (if non-%NULL) will be set to225 // operation, in which case @error (if non-%NULL) will be set to
196 // %G_IO_ERROR_CANCELLED.226 // %G_IO_ERROR_CANCELLED.
197-func (x *Resolver) LookupRecords(RrnameVar string, RecordTypeVar ResolverRecordType, CancellableVar *Cancellable) *glib.List {227+func (x *Resolver) LookupRecords(RrnameVar string, RecordTypeVar ResolverRecordType, CancellableVar *Cancellable) (*glib.List, error) {
228+ var cerr *glib.Error
198 229
199- return xResolverLookupRecords(x.GoPointer(), RrnameVar, RecordTypeVar, CancellableVar.GoPointer())230+ cret := xResolverLookupRecords(x.GoPointer(), RrnameVar, RecordTypeVar, CancellableVar.GoPointer(), &cerr)
231+ if cerr == nil {
232+ return cret, nil
233+ }
234+ return cret, cerr
200 235
201 }236 }
202 237
@@ -212,7 +247,7 @@ func (x *Resolver) LookupRecordsAsync(RrnameVar string, RecordTypeVar ResolverRe
212 247
213 }248 }
214 249
215-var xResolverLookupRecordsFinish func(uintptr, uintptr) *glib.List250+var xResolverLookupRecordsFinish func(uintptr, uintptr, **glib.Error) *glib.List
216 251
217 // Retrieves the result of a previous call to252 // Retrieves the result of a previous call to
218 // g_resolver_lookup_records_async(). Returns a non-empty list of records as253 // g_resolver_lookup_records_async(). Returns a non-empty list of records as
@@ -222,13 +257,18 @@ var xResolverLookupRecordsFinish func(uintptr, uintptr) *glib.List
222 // If the DNS resolution failed, @error (if non-%NULL) will be set to257 // If the DNS resolution failed, @error (if non-%NULL) will be set to
223 // a value from #GResolverError. If the operation was cancelled,258 // a value from #GResolverError. If the operation was cancelled,
224 // @error will be set to %G_IO_ERROR_CANCELLED.259 // @error will be set to %G_IO_ERROR_CANCELLED.
225-func (x *Resolver) LookupRecordsFinish(ResultVar AsyncResult) *glib.List {260+func (x *Resolver) LookupRecordsFinish(ResultVar AsyncResult) (*glib.List, error) {
261+ var cerr *glib.Error
226 262
227- return xResolverLookupRecordsFinish(x.GoPointer(), ResultVar.GoPointer())263+ cret := xResolverLookupRecordsFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
264+ if cerr == nil {
265+ return cret, nil
266+ }
267+ return cret, cerr
228 268
229 }269 }
230 270
231-var xResolverLookupService func(uintptr, string, string, string, uintptr) *glib.List271+var xResolverLookupService func(uintptr, string, string, string, uintptr, **glib.Error) *glib.List
232 272
233 // Synchronously performs a DNS SRV lookup for the given @service and273 // Synchronously performs a DNS SRV lookup for the given @service and
234 // @protocol in the given @domain and returns an array of #GSrvTarget.274 // @protocol in the given @domain and returns an array of #GSrvTarget.
@@ -251,9 +291,14 @@ var xResolverLookupService func(uintptr, string, string, string, uintptr) *glib.
251 // If you are planning to connect to the service, it is usually easier291 // If you are planning to connect to the service, it is usually easier
252 // to create a #GNetworkService and use its #GSocketConnectable292 // to create a #GNetworkService and use its #GSocketConnectable
253 // interface.293 // interface.
254-func (x *Resolver) LookupService(ServiceVar string, ProtocolVar string, DomainVar string, CancellableVar *Cancellable) *glib.List {294+func (x *Resolver) LookupService(ServiceVar string, ProtocolVar string, DomainVar string, CancellableVar *Cancellable) (*glib.List, error) {
295+ var cerr *glib.Error
255 296
256- return xResolverLookupService(x.GoPointer(), ServiceVar, ProtocolVar, DomainVar, CancellableVar.GoPointer())297+ cret := xResolverLookupService(x.GoPointer(), ServiceVar, ProtocolVar, DomainVar, CancellableVar.GoPointer(), &cerr)
298+ if cerr == nil {
299+ return cret, nil
300+ }
301+ return cret, cerr
257 302
258 }303 }
259 304
@@ -270,7 +315,7 @@ func (x *Resolver) LookupServiceAsync(ServiceVar string, ProtocolVar string, Dom
270 315
271 }316 }
272 317
273-var xResolverLookupServiceFinish func(uintptr, uintptr) *glib.List318+var xResolverLookupServiceFinish func(uintptr, uintptr, **glib.Error) *glib.List
274 319
275 // Retrieves the result of a previous call to320 // Retrieves the result of a previous call to
276 // g_resolver_lookup_service_async().321 // g_resolver_lookup_service_async().
@@ -278,9 +323,14 @@ var xResolverLookupServiceFinish func(uintptr, uintptr) *glib.List
278 // If the DNS resolution failed, @error (if non-%NULL) will be set to323 // If the DNS resolution failed, @error (if non-%NULL) will be set to
279 // a value from #GResolverError. If the operation was cancelled,324 // a value from #GResolverError. If the operation was cancelled,
280 // @error will be set to %G_IO_ERROR_CANCELLED.325 // @error will be set to %G_IO_ERROR_CANCELLED.
281-func (x *Resolver) LookupServiceFinish(ResultVar AsyncResult) *glib.List {326+func (x *Resolver) LookupServiceFinish(ResultVar AsyncResult) (*glib.List, error) {
327+ var cerr *glib.Error
282 328
283- return xResolverLookupServiceFinish(x.GoPointer(), ResultVar.GoPointer())329+ cret := xResolverLookupServiceFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
330+ if cerr == nil {
331+ return cret, nil
332+ }
333+ return cret, cerr
284 334
285 }335 }
286 336
M v4/gio/gresource.go +46 -21
@@ -21,7 +21,7 @@ type StaticResource struct {
21 Padding uintptr21 Padding uintptr
22 }22 }
23 23
24-var xResourceLoad func(string) *Resource24+var xResourceLoad func(string, **glib.Error) *Resource
25 25
26 // Loads a binary resource bundle and creates a #GResource representation of it, allowing26 // Loads a binary resource bundle and creates a #GResource representation of it, allowing
27 // you to query it for data.27 // you to query it for data.
@@ -33,13 +33,18 @@ var xResourceLoad func(string) *Resource
33 // %G_RESOURCE_ERROR_INTERNAL will be returned. If @filename doesn’t exist, or33 // %G_RESOURCE_ERROR_INTERNAL will be returned. If @filename doesn’t exist, or
34 // there is an error in reading it, an error from g_mapped_file_new() will be34 // there is an error in reading it, an error from g_mapped_file_new() will be
35 // returned.35 // returned.
36-func ResourceLoad(FilenameVar string) *Resource {36+func ResourceLoad(FilenameVar string) (*Resource, error) {
37+ var cerr *glib.Error
37 38
38- return xResourceLoad(FilenameVar)39+ cret := xResourceLoad(FilenameVar, &cerr)
40+ if cerr == nil {
41+ return cret, nil
42+ }
43+ return cret, cerr
39 44
40 }45 }
41 46
42-var xResourcesEnumerateChildren func(string, ResourceLookupFlags) []string47+var xResourcesEnumerateChildren func(string, ResourceLookupFlags, **glib.Error) []string
43 48
44 // Returns all the names of children at the specified @path in the set of49 // Returns all the names of children at the specified @path in the set of
45 // globally registered resources.50 // globally registered resources.
@@ -47,25 +52,35 @@ var xResourcesEnumerateChildren func(string, ResourceLookupFlags) []string
47 // be released with g_strfreev().52 // be released with g_strfreev().
48 //53 //
49 // @lookup_flags controls the behaviour of the lookup.54 // @lookup_flags controls the behaviour of the lookup.
50-func ResourcesEnumerateChildren(PathVar string, LookupFlagsVar ResourceLookupFlags) []string {55+func ResourcesEnumerateChildren(PathVar string, LookupFlagsVar ResourceLookupFlags) ([]string, error) {
56+ var cerr *glib.Error
51 57
52- return xResourcesEnumerateChildren(PathVar, LookupFlagsVar)58+ cret := xResourcesEnumerateChildren(PathVar, LookupFlagsVar, &cerr)
59+ if cerr == nil {
60+ return cret, nil
61+ }
62+ return cret, cerr
53 63
54 }64 }
55 65
56-var xResourcesGetInfo func(string, ResourceLookupFlags, uint, uint32) bool66+var xResourcesGetInfo func(string, ResourceLookupFlags, uint, uint32, **glib.Error) bool
57 67
58 // Looks for a file at the specified @path in the set of68 // Looks for a file at the specified @path in the set of
59 // globally registered resources and if found returns information about it.69 // globally registered resources and if found returns information about it.
60 //70 //
61 // @lookup_flags controls the behaviour of the lookup.71 // @lookup_flags controls the behaviour of the lookup.
62-func ResourcesGetInfo(PathVar string, LookupFlagsVar ResourceLookupFlags, SizeVar uint, FlagsVar uint32) bool {72+func ResourcesGetInfo(PathVar string, LookupFlagsVar ResourceLookupFlags, SizeVar uint, FlagsVar uint32) (bool, error) {
73+ var cerr *glib.Error
63 74
64- return xResourcesGetInfo(PathVar, LookupFlagsVar, SizeVar, FlagsVar)75+ cret := xResourcesGetInfo(PathVar, LookupFlagsVar, SizeVar, FlagsVar, &cerr)
76+ if cerr == nil {
77+ return cret, nil
78+ }
79+ return cret, cerr
65 80
66 }81 }
67 82
68-var xResourcesLookupData func(string, ResourceLookupFlags) *glib.Bytes83+var xResourcesLookupData func(string, ResourceLookupFlags, **glib.Error) *glib.Bytes
69 84
70 // Looks for a file at the specified @path in the set of85 // Looks for a file at the specified @path in the set of
71 // globally registered resources and returns a #GBytes that86 // globally registered resources and returns a #GBytes that
@@ -81,29 +96,39 @@ var xResourcesLookupData func(string, ResourceLookupFlags) *glib.Bytes
81 // the heap and automatically uncompress the data.96 // the heap and automatically uncompress the data.
82 //97 //
83 // @lookup_flags controls the behaviour of the lookup.98 // @lookup_flags controls the behaviour of the lookup.
84-func ResourcesLookupData(PathVar string, LookupFlagsVar ResourceLookupFlags) *glib.Bytes {99+func ResourcesLookupData(PathVar string, LookupFlagsVar ResourceLookupFlags) (*glib.Bytes, error) {
100+ var cerr *glib.Error
85 101
86- return xResourcesLookupData(PathVar, LookupFlagsVar)102+ cret := xResourcesLookupData(PathVar, LookupFlagsVar, &cerr)
103+ if cerr == nil {
104+ return cret, nil
105+ }
106+ return cret, cerr
87 107
88 }108 }
89 109
90-var xResourcesOpenStream func(string, ResourceLookupFlags) uintptr110+var xResourcesOpenStream func(string, ResourceLookupFlags, **glib.Error) uintptr
91 111
92 // Looks for a file at the specified @path in the set of112 // Looks for a file at the specified @path in the set of
93 // globally registered resources and returns a #GInputStream113 // globally registered resources and returns a #GInputStream
94 // that lets you read the data.114 // that lets you read the data.
95 //115 //
96 // @lookup_flags controls the behaviour of the lookup.116 // @lookup_flags controls the behaviour of the lookup.
97-func ResourcesOpenStream(PathVar string, LookupFlagsVar ResourceLookupFlags) *InputStream {117+func ResourcesOpenStream(PathVar string, LookupFlagsVar ResourceLookupFlags) (*InputStream, error) {
118+ var cls *InputStream
119+ var cerr *glib.Error
98 120
99- ResourcesOpenStreamPtr := xResourcesOpenStream(PathVar, LookupFlagsVar)121+ cret := xResourcesOpenStream(PathVar, LookupFlagsVar, &cerr)
100- if ResourcesOpenStreamPtr == 0 {
101- return nil
102- }
103 122
104- ResourcesOpenStreamCls := &InputStream{}123+ if cret == 0 {
105- ResourcesOpenStreamCls.Ptr = ResourcesOpenStreamPtr124+ return cls, cerr
106- return ResourcesOpenStreamCls125+ }
126+ cls = &InputStream{}
127+ cls.Ptr = cret
128+ if cerr == nil {
129+ return cls, nil
130+ }
131+ return cls, cerr
107 132
108 }133 }
109 134
M v4/gio/gseekable.go +22 -12
@@ -50,16 +50,16 @@ func (x *SeekableBase) SetGoPointer(ptr uintptr) {
50 // Tests if the stream supports the #GSeekableIface.50 // Tests if the stream supports the #GSeekableIface.
51 func (x *SeekableBase) CanSeek() bool {51 func (x *SeekableBase) CanSeek() bool {
52 52
53- return XGSeekableCanSeek(x.GoPointer())53+ cret := XGSeekableCanSeek(x.GoPointer())
54-54+ return cret
55 }55 }
56 56
57 // Tests if the length of the stream can be adjusted with57 // Tests if the length of the stream can be adjusted with
58 // g_seekable_truncate().58 // g_seekable_truncate().
59 func (x *SeekableBase) CanTruncate() bool {59 func (x *SeekableBase) CanTruncate() bool {
60 60
61- return XGSeekableCanTruncate(x.GoPointer())61+ cret := XGSeekableCanTruncate(x.GoPointer())
62-62+ return cret
63 }63 }
64 64
65 // Seeks in the stream by the given @offset, modified by @type.65 // Seeks in the stream by the given @offset, modified by @type.
@@ -76,17 +76,22 @@ func (x *SeekableBase) CanTruncate() bool {
76 // If @cancellable is not %NULL, then the operation can be cancelled by76 // If @cancellable is not %NULL, then the operation can be cancelled by
77 // triggering the cancellable object from another thread. If the operation77 // triggering the cancellable object from another thread. If the operation
78 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.78 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
79-func (x *SeekableBase) Seek(OffsetVar int64, TypeVar glib.SeekType, CancellableVar *Cancellable) bool {79+func (x *SeekableBase) Seek(OffsetVar int64, TypeVar glib.SeekType, CancellableVar *Cancellable) (bool, error) {
80+ var cerr *glib.Error
80 81
81- return XGSeekableSeek(x.GoPointer(), OffsetVar, TypeVar, CancellableVar.GoPointer())82+ cret := XGSeekableSeek(x.GoPointer(), OffsetVar, TypeVar, CancellableVar.GoPointer(), &cerr)
83+ if cerr == nil {
84+ return cret, nil
85+ }
86+ return cret, cerr
82 87
83 }88 }
84 89
85 // Tells the current position within the stream.90 // Tells the current position within the stream.
86 func (x *SeekableBase) Tell() int64 {91 func (x *SeekableBase) Tell() int64 {
87 92
88- return XGSeekableTell(x.GoPointer())93+ cret := XGSeekableTell(x.GoPointer())
89-94+ return cret
90 }95 }
91 96
92 // Sets the length of the stream to @offset. If the stream was previously97 // Sets the length of the stream to @offset. If the stream was previously
@@ -98,17 +103,22 @@ func (x *SeekableBase) Tell() int64 {
98 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an103 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
99 // operation was partially finished when the operation was cancelled the104 // operation was partially finished when the operation was cancelled the
100 // partial result will be returned, without an error.105 // partial result will be returned, without an error.
101-func (x *SeekableBase) Truncate(OffsetVar int64, CancellableVar *Cancellable) bool {106+func (x *SeekableBase) Truncate(OffsetVar int64, CancellableVar *Cancellable) (bool, error) {
107+ var cerr *glib.Error
102 108
103- return XGSeekableTruncate(x.GoPointer(), OffsetVar, CancellableVar.GoPointer())109+ cret := XGSeekableTruncate(x.GoPointer(), OffsetVar, CancellableVar.GoPointer(), &cerr)
110+ if cerr == nil {
111+ return cret, nil
112+ }
113+ return cret, cerr
104 114
105 }115 }
106 116
107 var XGSeekableCanSeek func(uintptr) bool117 var XGSeekableCanSeek func(uintptr) bool
108 var XGSeekableCanTruncate func(uintptr) bool118 var XGSeekableCanTruncate func(uintptr) bool
109-var XGSeekableSeek func(uintptr, int64, glib.SeekType, uintptr) bool119+var XGSeekableSeek func(uintptr, int64, glib.SeekType, uintptr, **glib.Error) bool
110 var XGSeekableTell func(uintptr) int64120 var XGSeekableTell func(uintptr) int64
111-var XGSeekableTruncate func(uintptr, int64, uintptr) bool121+var XGSeekableTruncate func(uintptr, int64, uintptr, **glib.Error) bool
112 122
113 func init() {123 func init() {
114 lib, err := purego.Dlopen(core.GetPath("GIO"), purego.RTLD_NOW|purego.RTLD_GLOBAL)124 lib, err := purego.Dlopen(core.GetPath("GIO"), purego.RTLD_NOW|purego.RTLD_GLOBAL)
M v4/gio/gsettings.go +125 -115
@@ -386,14 +386,16 @@ var xNewSettings func(string) uintptr
386 // call to g_settings_new(). The new #GSettings will hold a reference386 // call to g_settings_new(). The new #GSettings will hold a reference
387 // on the context. See g_main_context_push_thread_default().387 // on the context. See g_main_context_push_thread_default().
388 func NewSettings(SchemaIdVar string) *Settings {388 func NewSettings(SchemaIdVar string) *Settings {
389- NewSettingsPtr := xNewSettings(SchemaIdVar)389+ var cls *Settings
390- if NewSettingsPtr == 0 {390+
391- return nil391+ cret := xNewSettings(SchemaIdVar)
392- }
393 392
394- NewSettingsCls := &Settings{}393+ if cret == 0 {
395- NewSettingsCls.Ptr = NewSettingsPtr394+ return cls
396- return NewSettingsCls395+ }
396+ cls = &Settings{}
397+ cls.Ptr = cret
398+ return cls
397 }399 }
398 400
399 var xNewFullSettings func(*SettingsSchema, uintptr, string) uintptr401 var xNewFullSettings func(*SettingsSchema, uintptr, string) uintptr
@@ -422,14 +424,16 @@ var xNewFullSettings func(*SettingsSchema, uintptr, string) uintptr
422 // @path is non-%NULL and not equal to the path that the schema does424 // @path is non-%NULL and not equal to the path that the schema does
423 // have.425 // have.
424 func NewFullSettings(SchemaVar *SettingsSchema, BackendVar *SettingsBackend, PathVar string) *Settings {426 func NewFullSettings(SchemaVar *SettingsSchema, BackendVar *SettingsBackend, PathVar string) *Settings {
425- NewFullSettingsPtr := xNewFullSettings(SchemaVar, BackendVar.GoPointer(), PathVar)427+ var cls *Settings
426- if NewFullSettingsPtr == 0 {428+
427- return nil429+ cret := xNewFullSettings(SchemaVar, BackendVar.GoPointer(), PathVar)
428- }
429 430
430- NewFullSettingsCls := &Settings{}431+ if cret == 0 {
431- NewFullSettingsCls.Ptr = NewFullSettingsPtr432+ return cls
432- return NewFullSettingsCls433+ }
434+ cls = &Settings{}
435+ cls.Ptr = cret
436+ return cls
433 }437 }
434 438
435 var xNewWithBackendSettings func(string, uintptr) uintptr439 var xNewWithBackendSettings func(string, uintptr) uintptr
@@ -443,14 +447,16 @@ var xNewWithBackendSettings func(string, uintptr) uintptr
443 // the system to get a settings object that modifies the system default447 // the system to get a settings object that modifies the system default
444 // settings instead of the settings for this user.448 // settings instead of the settings for this user.
445 func NewWithBackendSettings(SchemaIdVar string, BackendVar *SettingsBackend) *Settings {449 func NewWithBackendSettings(SchemaIdVar string, BackendVar *SettingsBackend) *Settings {
446- NewWithBackendSettingsPtr := xNewWithBackendSettings(SchemaIdVar, BackendVar.GoPointer())450+ var cls *Settings
447- if NewWithBackendSettingsPtr == 0 {451+
448- return nil452+ cret := xNewWithBackendSettings(SchemaIdVar, BackendVar.GoPointer())
449- }
450 453
451- NewWithBackendSettingsCls := &Settings{}454+ if cret == 0 {
452- NewWithBackendSettingsCls.Ptr = NewWithBackendSettingsPtr455+ return cls
453- return NewWithBackendSettingsCls456+ }
457+ cls = &Settings{}
458+ cls.Ptr = cret
459+ return cls
454 }460 }
455 461
456 var xNewWithBackendAndPathSettings func(string, uintptr, string) uintptr462 var xNewWithBackendAndPathSettings func(string, uintptr, string) uintptr
@@ -461,14 +467,16 @@ var xNewWithBackendAndPathSettings func(string, uintptr, string) uintptr
461 // This is a mix of g_settings_new_with_backend() and467 // This is a mix of g_settings_new_with_backend() and
462 // g_settings_new_with_path().468 // g_settings_new_with_path().
463 func NewWithBackendAndPathSettings(SchemaIdVar string, BackendVar *SettingsBackend, PathVar string) *Settings {469 func NewWithBackendAndPathSettings(SchemaIdVar string, BackendVar *SettingsBackend, PathVar string) *Settings {
464- NewWithBackendAndPathSettingsPtr := xNewWithBackendAndPathSettings(SchemaIdVar, BackendVar.GoPointer(), PathVar)470+ var cls *Settings
465- if NewWithBackendAndPathSettingsPtr == 0 {471+
466- return nil472+ cret := xNewWithBackendAndPathSettings(SchemaIdVar, BackendVar.GoPointer(), PathVar)
467- }
468 473
469- NewWithBackendAndPathSettingsCls := &Settings{}474+ if cret == 0 {
470- NewWithBackendAndPathSettingsCls.Ptr = NewWithBackendAndPathSettingsPtr475+ return cls
471- return NewWithBackendAndPathSettingsCls476+ }
477+ cls = &Settings{}
478+ cls.Ptr = cret
479+ return cls
472 }480 }
473 481
474 var xNewWithPathSettings func(string, string) uintptr482 var xNewWithPathSettings func(string, string) uintptr
@@ -487,14 +495,16 @@ var xNewWithPathSettings func(string, string) uintptr
487 // begins and ends with '/' and does not contain two consecutive '/'495 // begins and ends with '/' and does not contain two consecutive '/'
488 // characters.496 // characters.
489 func NewWithPathSettings(SchemaIdVar string, PathVar string) *Settings {497 func NewWithPathSettings(SchemaIdVar string, PathVar string) *Settings {
490- NewWithPathSettingsPtr := xNewWithPathSettings(SchemaIdVar, PathVar)498+ var cls *Settings
491- if NewWithPathSettingsPtr == 0 {
492- return nil
493- }
494 499
495- NewWithPathSettingsCls := &Settings{}500+ cret := xNewWithPathSettings(SchemaIdVar, PathVar)
496- NewWithPathSettingsCls.Ptr = NewWithPathSettingsPtr501+
497- return NewWithPathSettingsCls502+ if cret == 0 {
503+ return cls
504+ }
505+ cls = &Settings{}
506+ cls.Ptr = cret
507+ return cls
498 }508 }
499 509
500 var xSettingsApply func(uintptr)510 var xSettingsApply func(uintptr)
@@ -597,16 +607,16 @@ var xSettingsCreateAction func(uintptr, string) uintptr
597 // activations take the new value for the key (which must have the607 // activations take the new value for the key (which must have the
598 // correct type).608 // correct type).
599 func (x *Settings) CreateAction(KeyVar string) *ActionBase {609 func (x *Settings) CreateAction(KeyVar string) *ActionBase {
610+ var cls *ActionBase
600 611
601- CreateActionPtr := xSettingsCreateAction(x.GoPointer(), KeyVar)612+ cret := xSettingsCreateAction(x.GoPointer(), KeyVar)
602- if CreateActionPtr == 0 {
603- return nil
604- }
605-
606- CreateActionCls := &ActionBase{}
607- CreateActionCls.Ptr = CreateActionPtr
608- return CreateActionCls
609 613
614+ if cret == 0 {
615+ return cls
616+ }
617+ cls = &ActionBase{}
618+ cls.Ptr = cret
619+ return cls
610 }620 }
611 621
612 var xSettingsDelay func(uintptr)622 var xSettingsDelay func(uintptr)
@@ -646,8 +656,8 @@ var xSettingsGetBoolean func(uintptr, string) bool
646 // having a boolean type in the schema for @settings.656 // having a boolean type in the schema for @settings.
647 func (x *Settings) GetBoolean(KeyVar string) bool {657 func (x *Settings) GetBoolean(KeyVar string) bool {
648 658
649- return xSettingsGetBoolean(x.GoPointer(), KeyVar)659+ cret := xSettingsGetBoolean(x.GoPointer(), KeyVar)
650-660+ return cret
651 }661 }
652 662
653 var xSettingsGetChild func(uintptr, string) uintptr663 var xSettingsGetChild func(uintptr, string) uintptr
@@ -662,16 +672,16 @@ var xSettingsGetChild func(uintptr, string) uintptr
662 // The created child settings object will inherit the #GSettings:delay-apply672 // The created child settings object will inherit the #GSettings:delay-apply
663 // mode from @settings.673 // mode from @settings.
664 func (x *Settings) GetChild(NameVar string) *Settings {674 func (x *Settings) GetChild(NameVar string) *Settings {
675+ var cls *Settings
665 676
666- GetChildPtr := xSettingsGetChild(x.GoPointer(), NameVar)677+ cret := xSettingsGetChild(x.GoPointer(), NameVar)
667- if GetChildPtr == 0 {
668- return nil
669- }
670-
671- GetChildCls := &Settings{}
672- GetChildCls.Ptr = GetChildPtr
673- return GetChildCls
674 678
679+ if cret == 0 {
680+ return cls
681+ }
682+ cls = &Settings{}
683+ cls.Ptr = cret
684+ return cls
675 }685 }
676 686
677 var xSettingsGetDefaultValue func(uintptr, string) *glib.Variant687 var xSettingsGetDefaultValue func(uintptr, string) *glib.Variant
@@ -699,8 +709,8 @@ var xSettingsGetDefaultValue func(uintptr, string) *glib.Variant
699 // schema for @settings.709 // schema for @settings.
700 func (x *Settings) GetDefaultValue(KeyVar string) *glib.Variant {710 func (x *Settings) GetDefaultValue(KeyVar string) *glib.Variant {
701 711
702- return xSettingsGetDefaultValue(x.GoPointer(), KeyVar)712+ cret := xSettingsGetDefaultValue(x.GoPointer(), KeyVar)
703-713+ return cret
704 }714 }
705 715
706 var xSettingsGetDouble func(uintptr, string) float64716 var xSettingsGetDouble func(uintptr, string) float64
@@ -713,8 +723,8 @@ var xSettingsGetDouble func(uintptr, string) float64
713 // having a 'double' type in the schema for @settings.723 // having a 'double' type in the schema for @settings.
714 func (x *Settings) GetDouble(KeyVar string) float64 {724 func (x *Settings) GetDouble(KeyVar string) float64 {
715 725
716- return xSettingsGetDouble(x.GoPointer(), KeyVar)726+ cret := xSettingsGetDouble(x.GoPointer(), KeyVar)
717-727+ return cret
718 }728 }
719 729
720 var xSettingsGetEnum func(uintptr, string) int730 var xSettingsGetEnum func(uintptr, string) int
@@ -733,8 +743,8 @@ var xSettingsGetEnum func(uintptr, string) int
733 // default value.743 // default value.
734 func (x *Settings) GetEnum(KeyVar string) int {744 func (x *Settings) GetEnum(KeyVar string) int {
735 745
736- return xSettingsGetEnum(x.GoPointer(), KeyVar)746+ cret := xSettingsGetEnum(x.GoPointer(), KeyVar)
737-747+ return cret
738 }748 }
739 749
740 var xSettingsGetFlags func(uintptr, string) uint750 var xSettingsGetFlags func(uintptr, string) uint
@@ -753,8 +763,8 @@ var xSettingsGetFlags func(uintptr, string) uint
753 // value.763 // value.
754 func (x *Settings) GetFlags(KeyVar string) uint {764 func (x *Settings) GetFlags(KeyVar string) uint {
755 765
756- return xSettingsGetFlags(x.GoPointer(), KeyVar)766+ cret := xSettingsGetFlags(x.GoPointer(), KeyVar)
757-767+ return cret
758 }768 }
759 769
760 var xSettingsGetHasUnapplied func(uintptr) bool770 var xSettingsGetHasUnapplied func(uintptr) bool
@@ -763,8 +773,8 @@ var xSettingsGetHasUnapplied func(uintptr) bool
763 // changes. This can only be the case if it is in 'delayed-apply' mode.773 // changes. This can only be the case if it is in 'delayed-apply' mode.
764 func (x *Settings) GetHasUnapplied() bool {774 func (x *Settings) GetHasUnapplied() bool {
765 775
766- return xSettingsGetHasUnapplied(x.GoPointer())776+ cret := xSettingsGetHasUnapplied(x.GoPointer())
767-777+ return cret
768 }778 }
769 779
770 var xSettingsGetInt func(uintptr, string) int780 var xSettingsGetInt func(uintptr, string) int
@@ -777,8 +787,8 @@ var xSettingsGetInt func(uintptr, string) int
777 // having a int32 type in the schema for @settings.787 // having a int32 type in the schema for @settings.
778 func (x *Settings) GetInt(KeyVar string) int {788 func (x *Settings) GetInt(KeyVar string) int {
779 789
780- return xSettingsGetInt(x.GoPointer(), KeyVar)790+ cret := xSettingsGetInt(x.GoPointer(), KeyVar)
781-791+ return cret
782 }792 }
783 793
784 var xSettingsGetInt64 func(uintptr, string) int64794 var xSettingsGetInt64 func(uintptr, string) int64
@@ -791,8 +801,8 @@ var xSettingsGetInt64 func(uintptr, string) int64
791 // having a int64 type in the schema for @settings.801 // having a int64 type in the schema for @settings.
792 func (x *Settings) GetInt64(KeyVar string) int64 {802 func (x *Settings) GetInt64(KeyVar string) int64 {
793 803
794- return xSettingsGetInt64(x.GoPointer(), KeyVar)804+ cret := xSettingsGetInt64(x.GoPointer(), KeyVar)
795-805+ return cret
796 }806 }
797 807
798 var xSettingsGetMapped func(uintptr, string, uintptr, uintptr) uintptr808 var xSettingsGetMapped func(uintptr, string, uintptr, uintptr) uintptr
@@ -826,8 +836,8 @@ var xSettingsGetMapped func(uintptr, string, uintptr, uintptr) uintptr
826 // just as any other value would be.836 // just as any other value would be.
827 func (x *Settings) GetMapped(KeyVar string, MappingVar SettingsGetMapping, UserDataVar uintptr) uintptr {837 func (x *Settings) GetMapped(KeyVar string, MappingVar SettingsGetMapping, UserDataVar uintptr) uintptr {
828 838
829- return xSettingsGetMapped(x.GoPointer(), KeyVar, purego.NewCallback(MappingVar), UserDataVar)839+ cret := xSettingsGetMapped(x.GoPointer(), KeyVar, purego.NewCallback(MappingVar), UserDataVar)
830-840+ return cret
831 }841 }
832 842
833 var xSettingsGetRange func(uintptr, string) *glib.Variant843 var xSettingsGetRange func(uintptr, string) *glib.Variant
@@ -835,8 +845,8 @@ var xSettingsGetRange func(uintptr, string) *glib.Variant
835 // Queries the range of a key.845 // Queries the range of a key.
836 func (x *Settings) GetRange(KeyVar string) *glib.Variant {846 func (x *Settings) GetRange(KeyVar string) *glib.Variant {
837 847
838- return xSettingsGetRange(x.GoPointer(), KeyVar)848+ cret := xSettingsGetRange(x.GoPointer(), KeyVar)
839-849+ return cret
840 }850 }
841 851
842 var xSettingsGetString func(uintptr, string) string852 var xSettingsGetString func(uintptr, string) string
@@ -849,8 +859,8 @@ var xSettingsGetString func(uintptr, string) string
849 // having a string type in the schema for @settings.859 // having a string type in the schema for @settings.
850 func (x *Settings) GetString(KeyVar string) string {860 func (x *Settings) GetString(KeyVar string) string {
851 861
852- return xSettingsGetString(x.GoPointer(), KeyVar)862+ cret := xSettingsGetString(x.GoPointer(), KeyVar)
853-863+ return cret
854 }864 }
855 865
856 var xSettingsGetStrv func(uintptr, string) uintptr866 var xSettingsGetStrv func(uintptr, string) uintptr
@@ -861,8 +871,8 @@ var xSettingsGetStrv func(uintptr, string) uintptr
861 // having an array of strings type in the schema for @settings.871 // having an array of strings type in the schema for @settings.
862 func (x *Settings) GetStrv(KeyVar string) uintptr {872 func (x *Settings) GetStrv(KeyVar string) uintptr {
863 873
864- return xSettingsGetStrv(x.GoPointer(), KeyVar)874+ cret := xSettingsGetStrv(x.GoPointer(), KeyVar)
865-875+ return cret
866 }876 }
867 877
868 var xSettingsGetUint func(uintptr, string) uint878 var xSettingsGetUint func(uintptr, string) uint
@@ -876,8 +886,8 @@ var xSettingsGetUint func(uintptr, string) uint
876 // having a uint32 type in the schema for @settings.886 // having a uint32 type in the schema for @settings.
877 func (x *Settings) GetUint(KeyVar string) uint {887 func (x *Settings) GetUint(KeyVar string) uint {
878 888
879- return xSettingsGetUint(x.GoPointer(), KeyVar)889+ cret := xSettingsGetUint(x.GoPointer(), KeyVar)
880-890+ return cret
881 }891 }
882 892
883 var xSettingsGetUint64 func(uintptr, string) uint64893 var xSettingsGetUint64 func(uintptr, string) uint64
@@ -891,8 +901,8 @@ var xSettingsGetUint64 func(uintptr, string) uint64
891 // having a uint64 type in the schema for @settings.901 // having a uint64 type in the schema for @settings.
892 func (x *Settings) GetUint64(KeyVar string) uint64 {902 func (x *Settings) GetUint64(KeyVar string) uint64 {
893 903
894- return xSettingsGetUint64(x.GoPointer(), KeyVar)904+ cret := xSettingsGetUint64(x.GoPointer(), KeyVar)
895-905+ return cret
896 }906 }
897 907
898 var xSettingsGetUserValue func(uintptr, string) *glib.Variant908 var xSettingsGetUserValue func(uintptr, string) *glib.Variant
@@ -917,8 +927,8 @@ var xSettingsGetUserValue func(uintptr, string) *glib.Variant
917 // schema for @settings.927 // schema for @settings.
918 func (x *Settings) GetUserValue(KeyVar string) *glib.Variant {928 func (x *Settings) GetUserValue(KeyVar string) *glib.Variant {
919 929
920- return xSettingsGetUserValue(x.GoPointer(), KeyVar)930+ cret := xSettingsGetUserValue(x.GoPointer(), KeyVar)
921-931+ return cret
922 }932 }
923 933
924 var xSettingsGetValue func(uintptr, string) *glib.Variant934 var xSettingsGetValue func(uintptr, string) *glib.Variant
@@ -929,8 +939,8 @@ var xSettingsGetValue func(uintptr, string) *glib.Variant
929 // schema for @settings.939 // schema for @settings.
930 func (x *Settings) GetValue(KeyVar string) *glib.Variant {940 func (x *Settings) GetValue(KeyVar string) *glib.Variant {
931 941
932- return xSettingsGetValue(x.GoPointer(), KeyVar)942+ cret := xSettingsGetValue(x.GoPointer(), KeyVar)
933-943+ return cret
934 }944 }
935 945
936 var xSettingsIsWritable func(uintptr, string) bool946 var xSettingsIsWritable func(uintptr, string) bool
@@ -938,8 +948,8 @@ var xSettingsIsWritable func(uintptr, string) bool
938 // Finds out if a key can be written or not948 // Finds out if a key can be written or not
939 func (x *Settings) IsWritable(NameVar string) bool {949 func (x *Settings) IsWritable(NameVar string) bool {
940 950
941- return xSettingsIsWritable(x.GoPointer(), NameVar)951+ cret := xSettingsIsWritable(x.GoPointer(), NameVar)
942-952+ return cret
943 }953 }
944 954
945 var xSettingsListChildren func(uintptr) uintptr955 var xSettingsListChildren func(uintptr) uintptr
@@ -957,8 +967,8 @@ var xSettingsListChildren func(uintptr) uintptr
957 // with it.967 // with it.
958 func (x *Settings) ListChildren() uintptr {968 func (x *Settings) ListChildren() uintptr {
959 969
960- return xSettingsListChildren(x.GoPointer())970+ cret := xSettingsListChildren(x.GoPointer())
961-971+ return cret
962 }972 }
963 973
964 var xSettingsListKeys func(uintptr) uintptr974 var xSettingsListKeys func(uintptr) uintptr
@@ -973,8 +983,8 @@ var xSettingsListKeys func(uintptr) uintptr
973 // with it.983 // with it.
974 func (x *Settings) ListKeys() uintptr {984 func (x *Settings) ListKeys() uintptr {
975 985
976- return xSettingsListKeys(x.GoPointer())986+ cret := xSettingsListKeys(x.GoPointer())
977-987+ return cret
978 }988 }
979 989
980 var xSettingsRangeCheck func(uintptr, string, *glib.Variant) bool990 var xSettingsRangeCheck func(uintptr, string, *glib.Variant) bool
@@ -983,8 +993,8 @@ var xSettingsRangeCheck func(uintptr, string, *glib.Variant) bool
983 // permitted range for @key.993 // permitted range for @key.
984 func (x *Settings) RangeCheck(KeyVar string, ValueVar *glib.Variant) bool {994 func (x *Settings) RangeCheck(KeyVar string, ValueVar *glib.Variant) bool {
985 995
986- return xSettingsRangeCheck(x.GoPointer(), KeyVar, ValueVar)996+ cret := xSettingsRangeCheck(x.GoPointer(), KeyVar, ValueVar)
987-997+ return cret
988 }998 }
989 999
990 var xSettingsReset func(uintptr, string)1000 var xSettingsReset func(uintptr, string)
@@ -1026,8 +1036,8 @@ var xSettingsSet func(uintptr, string, string, ...interface{}) bool
1026 // the type given in the schema.1036 // the type given in the schema.
1027 func (x *Settings) Set(KeyVar string, FormatVar string, varArgs ...interface{}) bool {1037 func (x *Settings) Set(KeyVar string, FormatVar string, varArgs ...interface{}) bool {
1028 1038
1029- return xSettingsSet(x.GoPointer(), KeyVar, FormatVar, varArgs...)1039+ cret := xSettingsSet(x.GoPointer(), KeyVar, FormatVar, varArgs...)
1030-1040+ return cret
1031 }1041 }
1032 1042
1033 var xSettingsSetBoolean func(uintptr, string, bool) bool1043 var xSettingsSetBoolean func(uintptr, string, bool) bool
@@ -1040,8 +1050,8 @@ var xSettingsSetBoolean func(uintptr, string, bool) bool
1040 // having a boolean type in the schema for @settings.1050 // having a boolean type in the schema for @settings.
1041 func (x *Settings) SetBoolean(KeyVar string, ValueVar bool) bool {1051 func (x *Settings) SetBoolean(KeyVar string, ValueVar bool) bool {
1042 1052
1043- return xSettingsSetBoolean(x.GoPointer(), KeyVar, ValueVar)1053+ cret := xSettingsSetBoolean(x.GoPointer(), KeyVar, ValueVar)
1044-1054+ return cret
1045 }1055 }
1046 1056
1047 var xSettingsSetDouble func(uintptr, string, float64) bool1057 var xSettingsSetDouble func(uintptr, string, float64) bool
@@ -1054,8 +1064,8 @@ var xSettingsSetDouble func(uintptr, string, float64) bool
1054 // having a 'double' type in the schema for @settings.1064 // having a 'double' type in the schema for @settings.
1055 func (x *Settings) SetDouble(KeyVar string, ValueVar float64) bool {1065 func (x *Settings) SetDouble(KeyVar string, ValueVar float64) bool {
1056 1066
1057- return xSettingsSetDouble(x.GoPointer(), KeyVar, ValueVar)1067+ cret := xSettingsSetDouble(x.GoPointer(), KeyVar, ValueVar)
1058-1068+ return cret
1059 }1069 }
1060 1070
1061 var xSettingsSetEnum func(uintptr, string, int) bool1071 var xSettingsSetEnum func(uintptr, string, int) bool
@@ -1072,8 +1082,8 @@ var xSettingsSetEnum func(uintptr, string, int) bool
1072 // @value.1082 // @value.
1073 func (x *Settings) SetEnum(KeyVar string, ValueVar int) bool {1083 func (x *Settings) SetEnum(KeyVar string, ValueVar int) bool {
1074 1084
1075- return xSettingsSetEnum(x.GoPointer(), KeyVar, ValueVar)1085+ cret := xSettingsSetEnum(x.GoPointer(), KeyVar, ValueVar)
1076-1086+ return cret
1077 }1087 }
1078 1088
1079 var xSettingsSetFlags func(uintptr, string, uint) bool1089 var xSettingsSetFlags func(uintptr, string, uint) bool
@@ -1091,8 +1101,8 @@ var xSettingsSetFlags func(uintptr, string, uint) bool
1091 // bit in @value.1101 // bit in @value.
1092 func (x *Settings) SetFlags(KeyVar string, ValueVar uint) bool {1102 func (x *Settings) SetFlags(KeyVar string, ValueVar uint) bool {
1093 1103
1094- return xSettingsSetFlags(x.GoPointer(), KeyVar, ValueVar)1104+ cret := xSettingsSetFlags(x.GoPointer(), KeyVar, ValueVar)
1095-1105+ return cret
1096 }1106 }
1097 1107
1098 var xSettingsSetInt func(uintptr, string, int) bool1108 var xSettingsSetInt func(uintptr, string, int) bool
@@ -1105,8 +1115,8 @@ var xSettingsSetInt func(uintptr, string, int) bool
1105 // having a int32 type in the schema for @settings.1115 // having a int32 type in the schema for @settings.
1106 func (x *Settings) SetInt(KeyVar string, ValueVar int) bool {1116 func (x *Settings) SetInt(KeyVar string, ValueVar int) bool {
1107 1117
1108- return xSettingsSetInt(x.GoPointer(), KeyVar, ValueVar)1118+ cret := xSettingsSetInt(x.GoPointer(), KeyVar, ValueVar)
1109-1119+ return cret
1110 }1120 }
1111 1121
1112 var xSettingsSetInt64 func(uintptr, string, int64) bool1122 var xSettingsSetInt64 func(uintptr, string, int64) bool
@@ -1119,8 +1129,8 @@ var xSettingsSetInt64 func(uintptr, string, int64) bool
1119 // having a int64 type in the schema for @settings.1129 // having a int64 type in the schema for @settings.
1120 func (x *Settings) SetInt64(KeyVar string, ValueVar int64) bool {1130 func (x *Settings) SetInt64(KeyVar string, ValueVar int64) bool {
1121 1131
1122- return xSettingsSetInt64(x.GoPointer(), KeyVar, ValueVar)1132+ cret := xSettingsSetInt64(x.GoPointer(), KeyVar, ValueVar)
1123-1133+ return cret
1124 }1134 }
1125 1135
1126 var xSettingsSetString func(uintptr, string, string) bool1136 var xSettingsSetString func(uintptr, string, string) bool
@@ -1133,8 +1143,8 @@ var xSettingsSetString func(uintptr, string, string) bool
1133 // having a string type in the schema for @settings.1143 // having a string type in the schema for @settings.
1134 func (x *Settings) SetString(KeyVar string, ValueVar string) bool {1144 func (x *Settings) SetString(KeyVar string, ValueVar string) bool {
1135 1145
1136- return xSettingsSetString(x.GoPointer(), KeyVar, ValueVar)1146+ cret := xSettingsSetString(x.GoPointer(), KeyVar, ValueVar)
1137-1147+ return cret
1138 }1148 }
1139 1149
1140 var xSettingsSetStrv func(uintptr, string, uintptr) bool1150 var xSettingsSetStrv func(uintptr, string, uintptr) bool
@@ -1148,8 +1158,8 @@ var xSettingsSetStrv func(uintptr, string, uintptr) bool
1148 // having an array of strings type in the schema for @settings.1158 // having an array of strings type in the schema for @settings.
1149 func (x *Settings) SetStrv(KeyVar string, ValueVar uintptr) bool {1159 func (x *Settings) SetStrv(KeyVar string, ValueVar uintptr) bool {
1150 1160
1151- return xSettingsSetStrv(x.GoPointer(), KeyVar, ValueVar)1161+ cret := xSettingsSetStrv(x.GoPointer(), KeyVar, ValueVar)
1152-1162+ return cret
1153 }1163 }
1154 1164
1155 var xSettingsSetUint func(uintptr, string, uint) bool1165 var xSettingsSetUint func(uintptr, string, uint) bool
@@ -1163,8 +1173,8 @@ var xSettingsSetUint func(uintptr, string, uint) bool
1163 // having a uint32 type in the schema for @settings.1173 // having a uint32 type in the schema for @settings.
1164 func (x *Settings) SetUint(KeyVar string, ValueVar uint) bool {1174 func (x *Settings) SetUint(KeyVar string, ValueVar uint) bool {
1165 1175
1166- return xSettingsSetUint(x.GoPointer(), KeyVar, ValueVar)1176+ cret := xSettingsSetUint(x.GoPointer(), KeyVar, ValueVar)
1167-1177+ return cret
1168 }1178 }
1169 1179
1170 var xSettingsSetUint64 func(uintptr, string, uint64) bool1180 var xSettingsSetUint64 func(uintptr, string, uint64) bool
@@ -1178,8 +1188,8 @@ var xSettingsSetUint64 func(uintptr, string, uint64) bool
1178 // having a uint64 type in the schema for @settings.1188 // having a uint64 type in the schema for @settings.
1179 func (x *Settings) SetUint64(KeyVar string, ValueVar uint64) bool {1189 func (x *Settings) SetUint64(KeyVar string, ValueVar uint64) bool {
1180 1190
1181- return xSettingsSetUint64(x.GoPointer(), KeyVar, ValueVar)1191+ cret := xSettingsSetUint64(x.GoPointer(), KeyVar, ValueVar)
1182-1192+ return cret
1183 }1193 }
1184 1194
1185 var xSettingsSetValue func(uintptr, string, *glib.Variant) bool1195 var xSettingsSetValue func(uintptr, string, *glib.Variant) bool
@@ -1193,8 +1203,8 @@ var xSettingsSetValue func(uintptr, string, *glib.Variant) bool
1193 // If @value is floating then this function consumes the reference.1203 // If @value is floating then this function consumes the reference.
1194 func (x *Settings) SetValue(KeyVar string, ValueVar *glib.Variant) bool {1204 func (x *Settings) SetValue(KeyVar string, ValueVar *glib.Variant) bool {
1195 1205
1196- return xSettingsSetValue(x.GoPointer(), KeyVar, ValueVar)1206+ cret := xSettingsSetValue(x.GoPointer(), KeyVar, ValueVar)
1197-1207+ return cret
1198 }1208 }
1199 1209
1200 func (c *Settings) GoPointer() uintptr {1210 func (c *Settings) GoPointer() uintptr {
M v4/gio/gsettingsbackend.go +24 -24
@@ -74,16 +74,16 @@ var xKeyfileSettingsBackendNew func(string, string, string) uintptr
74 // and a list of locked keys from a text file with the name `locks` in74 // and a list of locked keys from a text file with the name `locks` in
75 // the same location.75 // the same location.
76 func KeyfileSettingsBackendNew(FilenameVar string, RootPathVar string, RootGroupVar string) *SettingsBackend {76 func KeyfileSettingsBackendNew(FilenameVar string, RootPathVar string, RootGroupVar string) *SettingsBackend {
77+ var cls *SettingsBackend
77 78
78- KeyfileSettingsBackendNewPtr := xKeyfileSettingsBackendNew(FilenameVar, RootPathVar, RootGroupVar)79+ cret := xKeyfileSettingsBackendNew(FilenameVar, RootPathVar, RootGroupVar)
79- if KeyfileSettingsBackendNewPtr == 0 {
80- return nil
81- }
82-
83- KeyfileSettingsBackendNewCls := &SettingsBackend{}
84- KeyfileSettingsBackendNewCls.Ptr = KeyfileSettingsBackendNewPtr
85- return KeyfileSettingsBackendNewCls
86 80
81+ if cret == 0 {
82+ return cls
83+ }
84+ cls = &SettingsBackend{}
85+ cls.Ptr = cret
86+ return cls
87 }87 }
88 88
89 var xMemorySettingsBackendNew func() uintptr89 var xMemorySettingsBackendNew func() uintptr
@@ -94,16 +94,16 @@ var xMemorySettingsBackendNew func() uintptr
94 // to any backing storage, so the next time you run your application,94 // to any backing storage, so the next time you run your application,
95 // the memory backend will start out with the default values again.95 // the memory backend will start out with the default values again.
96 func MemorySettingsBackendNew() *SettingsBackend {96 func MemorySettingsBackendNew() *SettingsBackend {
97+ var cls *SettingsBackend
97 98
98- MemorySettingsBackendNewPtr := xMemorySettingsBackendNew()99+ cret := xMemorySettingsBackendNew()
99- if MemorySettingsBackendNewPtr == 0 {
100- return nil
101- }
102-
103- MemorySettingsBackendNewCls := &SettingsBackend{}
104- MemorySettingsBackendNewCls.Ptr = MemorySettingsBackendNewPtr
105- return MemorySettingsBackendNewCls
106 100
101+ if cret == 0 {
102+ return cls
103+ }
104+ cls = &SettingsBackend{}
105+ cls.Ptr = cret
106+ return cls
107 }107 }
108 108
109 var xNullSettingsBackendNew func() uintptr109 var xNullSettingsBackendNew func() uintptr
@@ -113,16 +113,16 @@ var xNullSettingsBackendNew func() uintptr
113 // This backend does not allow changes to settings, so all settings113 // This backend does not allow changes to settings, so all settings
114 // will always have their default values.114 // will always have their default values.
115 func NullSettingsBackendNew() *SettingsBackend {115 func NullSettingsBackendNew() *SettingsBackend {
116+ var cls *SettingsBackend
116 117
117- NullSettingsBackendNewPtr := xNullSettingsBackendNew()118+ cret := xNullSettingsBackendNew()
118- if NullSettingsBackendNewPtr == 0 {
119- return nil
120- }
121-
122- NullSettingsBackendNewCls := &SettingsBackend{}
123- NullSettingsBackendNewCls.Ptr = NullSettingsBackendNewPtr
124- return NullSettingsBackendNewCls
125 119
120+ if cret == 0 {
121+ return cls
122+ }
123+ cls = &SettingsBackend{}
124+ cls.Ptr = cret
125+ return cls
126 }126 }
127 127
128 // The #GSettingsBackend interface defines a generic interface for128 // The #GSettingsBackend interface defines a generic interface for
M v4/gio/gsettingsschema.go +2 -2
@@ -132,8 +132,8 @@ var xSettingsSchemaSourceGetDefault func() *SettingsSchemaSource
132 // recursively.132 // recursively.
133 func SettingsSchemaSourceGetDefault() *SettingsSchemaSource {133 func SettingsSchemaSourceGetDefault() *SettingsSchemaSource {
134 134
135- return xSettingsSchemaSourceGetDefault()135+ cret := xSettingsSchemaSourceGetDefault()
136-136+ return cret
137 }137 }
138 138
139 func init() {139 func init() {
M v4/gio/gsimpleactiongroup.go +43 -43
@@ -33,14 +33,16 @@ var xNewSimpleActionGroup func() uintptr
33 33
34 // Creates a new, empty, #GSimpleActionGroup.34 // Creates a new, empty, #GSimpleActionGroup.
35 func NewSimpleActionGroup() *SimpleActionGroup {35 func NewSimpleActionGroup() *SimpleActionGroup {
36- NewSimpleActionGroupPtr := xNewSimpleActionGroup()36+ var cls *SimpleActionGroup
37- if NewSimpleActionGroupPtr == 0 {37+
38- return nil38+ cret := xNewSimpleActionGroup()
39- }
40 39
41- NewSimpleActionGroupCls := &SimpleActionGroup{}40+ if cret == 0 {
42- NewSimpleActionGroupCls.Ptr = NewSimpleActionGroupPtr41+ return cls
43- return NewSimpleActionGroupCls42+ }
43+ cls = &SimpleActionGroup{}
44+ cls.Ptr = cret
45+ return cls
44 }46 }
45 47
46 var xSimpleActionGroupAddEntries func(uintptr, uintptr, int, uintptr)48 var xSimpleActionGroupAddEntries func(uintptr, uintptr, int, uintptr)
@@ -73,18 +75,17 @@ var xSimpleActionGroupLookup func(uintptr, string) uintptr
73 //75 //
74 // If no such action exists, returns %NULL.76 // If no such action exists, returns %NULL.
75 func (x *SimpleActionGroup) Lookup(ActionNameVar string) *ActionBase {77 func (x *SimpleActionGroup) Lookup(ActionNameVar string) *ActionBase {
78+ var cls *ActionBase
76 79
77- LookupPtr := xSimpleActionGroupLookup(x.GoPointer(), ActionNameVar)80+ cret := xSimpleActionGroupLookup(x.GoPointer(), ActionNameVar)
78- if LookupPtr == 0 {
79- return nil
80- }
81-
82- gobject.IncreaseRef(LookupPtr)
83-
84- LookupCls := &ActionBase{}
85- LookupCls.Ptr = LookupPtr
86- return LookupCls
87 81
82+ if cret == 0 {
83+ return cls
84+ }
85+ gobject.IncreaseRef(cret)
86+ cls = &ActionBase{}
87+ cls.Ptr = cret
88+ return cls
88 }89 }
89 90
90 var xSimpleActionGroupRemove func(uintptr, string)91 var xSimpleActionGroupRemove func(uintptr, string)
@@ -204,8 +205,8 @@ func (x *SimpleActionGroup) ChangeActionState(ActionNameVar string, ValueVar *gl
204 // have its state changed from outside callers.205 // have its state changed from outside callers.
205 func (x *SimpleActionGroup) GetActionEnabled(ActionNameVar string) bool {206 func (x *SimpleActionGroup) GetActionEnabled(ActionNameVar string) bool {
206 207
207- return XGActionGroupGetActionEnabled(x.GoPointer(), ActionNameVar)208+ cret := XGActionGroupGetActionEnabled(x.GoPointer(), ActionNameVar)
208-209+ return cret
209 }210 }
210 211
211 // Queries the type of the parameter that must be given when activating212 // Queries the type of the parameter that must be given when activating
@@ -223,8 +224,8 @@ func (x *SimpleActionGroup) GetActionEnabled(ActionNameVar string) bool {
223 // with the same name but a different parameter type.224 // with the same name but a different parameter type.
224 func (x *SimpleActionGroup) GetActionParameterType(ActionNameVar string) *glib.VariantType {225 func (x *SimpleActionGroup) GetActionParameterType(ActionNameVar string) *glib.VariantType {
225 226
226- return XGActionGroupGetActionParameterType(x.GoPointer(), ActionNameVar)227+ cret := XGActionGroupGetActionParameterType(x.GoPointer(), ActionNameVar)
227-228+ return cret
228 }229 }
229 230
230 // Queries the current state of the named action within @action_group.231 // Queries the current state of the named action within @action_group.
@@ -237,8 +238,8 @@ func (x *SimpleActionGroup) GetActionParameterType(ActionNameVar string) *glib.V
237 // g_variant_unref() when it is no longer required.238 // g_variant_unref() when it is no longer required.
238 func (x *SimpleActionGroup) GetActionState(ActionNameVar string) *glib.Variant {239 func (x *SimpleActionGroup) GetActionState(ActionNameVar string) *glib.Variant {
239 240
240- return XGActionGroupGetActionState(x.GoPointer(), ActionNameVar)241+ cret := XGActionGroupGetActionState(x.GoPointer(), ActionNameVar)
241-242+ return cret
242 }243 }
243 244
244 // Requests a hint about the valid range of values for the state of the245 // Requests a hint about the valid range of values for the state of the
@@ -261,8 +262,8 @@ func (x *SimpleActionGroup) GetActionState(ActionNameVar string) *glib.Variant {
261 // g_variant_unref() when it is no longer required.262 // g_variant_unref() when it is no longer required.
262 func (x *SimpleActionGroup) GetActionStateHint(ActionNameVar string) *glib.Variant {263 func (x *SimpleActionGroup) GetActionStateHint(ActionNameVar string) *glib.Variant {
263 264
264- return XGActionGroupGetActionStateHint(x.GoPointer(), ActionNameVar)265+ cret := XGActionGroupGetActionStateHint(x.GoPointer(), ActionNameVar)
265-266+ return cret
266 }267 }
267 268
268 // Queries the type of the state of the named action within269 // Queries the type of the state of the named action within
@@ -283,15 +284,15 @@ func (x *SimpleActionGroup) GetActionStateHint(ActionNameVar string) *glib.Varia
283 // with the same name but a different state type.284 // with the same name but a different state type.
284 func (x *SimpleActionGroup) GetActionStateType(ActionNameVar string) *glib.VariantType {285 func (x *SimpleActionGroup) GetActionStateType(ActionNameVar string) *glib.VariantType {
285 286
286- return XGActionGroupGetActionStateType(x.GoPointer(), ActionNameVar)287+ cret := XGActionGroupGetActionStateType(x.GoPointer(), ActionNameVar)
287-288+ return cret
288 }289 }
289 290
290 // Checks if the named action exists within @action_group.291 // Checks if the named action exists within @action_group.
291 func (x *SimpleActionGroup) HasAction(ActionNameVar string) bool {292 func (x *SimpleActionGroup) HasAction(ActionNameVar string) bool {
292 293
293- return XGActionGroupHasAction(x.GoPointer(), ActionNameVar)294+ cret := XGActionGroupHasAction(x.GoPointer(), ActionNameVar)
294-295+ return cret
295 }296 }
296 297
297 // Lists the actions contained within @action_group.298 // Lists the actions contained within @action_group.
@@ -300,8 +301,8 @@ func (x *SimpleActionGroup) HasAction(ActionNameVar string) bool {
300 // it is no longer required.301 // it is no longer required.
301 func (x *SimpleActionGroup) ListActions() uintptr {302 func (x *SimpleActionGroup) ListActions() uintptr {
302 303
303- return XGActionGroupListActions(x.GoPointer())304+ cret := XGActionGroupListActions(x.GoPointer())
304-305+ return cret
305 }306 }
306 307
307 // Queries all aspects of the named action within an @action_group.308 // Queries all aspects of the named action within an @action_group.
@@ -333,8 +334,8 @@ func (x *SimpleActionGroup) ListActions() uintptr {
333 // fields may or may not have been modified.334 // fields may or may not have been modified.
334 func (x *SimpleActionGroup) QueryAction(ActionNameVar string, EnabledVar bool, ParameterTypeVar **glib.VariantType, StateTypeVar **glib.VariantType, StateHintVar **glib.Variant, StateVar **glib.Variant) bool {335 func (x *SimpleActionGroup) QueryAction(ActionNameVar string, EnabledVar bool, ParameterTypeVar **glib.VariantType, StateTypeVar **glib.VariantType, StateHintVar **glib.Variant, StateVar **glib.Variant) bool {
335 336
336- return XGActionGroupQueryAction(x.GoPointer(), ActionNameVar, EnabledVar, ParameterTypeVar, StateTypeVar, StateHintVar, StateVar)337+ cret := XGActionGroupQueryAction(x.GoPointer(), ActionNameVar, EnabledVar, ParameterTypeVar, StateTypeVar, StateHintVar, StateVar)
337-338+ return cret
338 }339 }
339 340
340 // Adds an action to the @action_map.341 // Adds an action to the @action_map.
@@ -402,18 +403,17 @@ func (x *SimpleActionGroup) AddActionEntries(EntriesVar uintptr, NEntriesVar int
402 //403 //
403 // If no such action exists, returns %NULL.404 // If no such action exists, returns %NULL.
404 func (x *SimpleActionGroup) LookupAction(ActionNameVar string) *ActionBase {405 func (x *SimpleActionGroup) LookupAction(ActionNameVar string) *ActionBase {
406+ var cls *ActionBase
405 407
406- LookupActionPtr := XGActionMapLookupAction(x.GoPointer(), ActionNameVar)408+ cret := XGActionMapLookupAction(x.GoPointer(), ActionNameVar)
407- if LookupActionPtr == 0 {
408- return nil
409- }
410-
411- gobject.IncreaseRef(LookupActionPtr)
412-
413- LookupActionCls := &ActionBase{}
414- LookupActionCls.Ptr = LookupActionPtr
415- return LookupActionCls
416 409
410+ if cret == 0 {
411+ return cls
412+ }
413+ gobject.IncreaseRef(cret)
414+ cls = &ActionBase{}
415+ cls.Ptr = cret
416+ return cls
417 }417 }
418 418
419 // Removes the named action from the action map.419 // Removes the named action from the action map.
M v4/gio/gsimpleasyncresult.go +70 -52
@@ -239,42 +239,48 @@ var xNewSimpleAsyncResult func(uintptr, uintptr, uintptr, uintptr) uintptr
239 // g_simple_async_result_set_check_cancellable() immediately after239 // g_simple_async_result_set_check_cancellable() immediately after
240 // this function returns.240 // this function returns.
241 func NewSimpleAsyncResult(SourceObjectVar *gobject.Object, CallbackVar AsyncReadyCallback, UserDataVar uintptr, SourceTagVar uintptr) *SimpleAsyncResult {241 func NewSimpleAsyncResult(SourceObjectVar *gobject.Object, CallbackVar AsyncReadyCallback, UserDataVar uintptr, SourceTagVar uintptr) *SimpleAsyncResult {
242- NewSimpleAsyncResultPtr := xNewSimpleAsyncResult(SourceObjectVar.GoPointer(), purego.NewCallback(CallbackVar), UserDataVar, SourceTagVar)242+ var cls *SimpleAsyncResult
243- if NewSimpleAsyncResultPtr == 0 {243+
244- return nil244+ cret := xNewSimpleAsyncResult(SourceObjectVar.GoPointer(), purego.NewCallback(CallbackVar), UserDataVar, SourceTagVar)
245- }
246 245
247- NewSimpleAsyncResultCls := &SimpleAsyncResult{}246+ if cret == 0 {
248- NewSimpleAsyncResultCls.Ptr = NewSimpleAsyncResultPtr247+ return cls
249- return NewSimpleAsyncResultCls248+ }
249+ cls = &SimpleAsyncResult{}
250+ cls.Ptr = cret
251+ return cls
250 }252 }
251 253
252 var xNewErrorSimpleAsyncResult func(uintptr, uintptr, uintptr, glib.Quark, int, string, ...interface{}) uintptr254 var xNewErrorSimpleAsyncResult func(uintptr, uintptr, uintptr, glib.Quark, int, string, ...interface{}) uintptr
253 255
254 // Creates a new #GSimpleAsyncResult with a set error.256 // Creates a new #GSimpleAsyncResult with a set error.
255 func NewErrorSimpleAsyncResult(SourceObjectVar *gobject.Object, CallbackVar AsyncReadyCallback, UserDataVar uintptr, DomainVar glib.Quark, CodeVar int, FormatVar string, varArgs ...interface{}) *SimpleAsyncResult {257 func NewErrorSimpleAsyncResult(SourceObjectVar *gobject.Object, CallbackVar AsyncReadyCallback, UserDataVar uintptr, DomainVar glib.Quark, CodeVar int, FormatVar string, varArgs ...interface{}) *SimpleAsyncResult {
256- NewErrorSimpleAsyncResultPtr := xNewErrorSimpleAsyncResult(SourceObjectVar.GoPointer(), purego.NewCallback(CallbackVar), UserDataVar, DomainVar, CodeVar, FormatVar, varArgs...)258+ var cls *SimpleAsyncResult
257- if NewErrorSimpleAsyncResultPtr == 0 {259+
258- return nil260+ cret := xNewErrorSimpleAsyncResult(SourceObjectVar.GoPointer(), purego.NewCallback(CallbackVar), UserDataVar, DomainVar, CodeVar, FormatVar, varArgs...)
259- }
260 261
261- NewErrorSimpleAsyncResultCls := &SimpleAsyncResult{}262+ if cret == 0 {
262- NewErrorSimpleAsyncResultCls.Ptr = NewErrorSimpleAsyncResultPtr263+ return cls
263- return NewErrorSimpleAsyncResultCls264+ }
265+ cls = &SimpleAsyncResult{}
266+ cls.Ptr = cret
267+ return cls
264 }268 }
265 269
266 var xNewFromErrorSimpleAsyncResult func(uintptr, uintptr, uintptr, *glib.Error) uintptr270 var xNewFromErrorSimpleAsyncResult func(uintptr, uintptr, uintptr, *glib.Error) uintptr
267 271
268 // Creates a #GSimpleAsyncResult from an error condition.272 // Creates a #GSimpleAsyncResult from an error condition.
269 func NewFromErrorSimpleAsyncResult(SourceObjectVar *gobject.Object, CallbackVar AsyncReadyCallback, UserDataVar uintptr, ErrorVar *glib.Error) *SimpleAsyncResult {273 func NewFromErrorSimpleAsyncResult(SourceObjectVar *gobject.Object, CallbackVar AsyncReadyCallback, UserDataVar uintptr, ErrorVar *glib.Error) *SimpleAsyncResult {
270- NewFromErrorSimpleAsyncResultPtr := xNewFromErrorSimpleAsyncResult(SourceObjectVar.GoPointer(), purego.NewCallback(CallbackVar), UserDataVar, ErrorVar)274+ var cls *SimpleAsyncResult
271- if NewFromErrorSimpleAsyncResultPtr == 0 {
272- return nil
273- }
274 275
275- NewFromErrorSimpleAsyncResultCls := &SimpleAsyncResult{}276+ cret := xNewFromErrorSimpleAsyncResult(SourceObjectVar.GoPointer(), purego.NewCallback(CallbackVar), UserDataVar, ErrorVar)
276- NewFromErrorSimpleAsyncResultCls.Ptr = NewFromErrorSimpleAsyncResultPtr277+
277- return NewFromErrorSimpleAsyncResultCls278+ if cret == 0 {
279+ return cls
280+ }
281+ cls = &SimpleAsyncResult{}
282+ cls.Ptr = cret
283+ return cls
278 }284 }
279 285
280 var xNewTakeErrorSimpleAsyncResult func(uintptr, uintptr, uintptr, *glib.Error) uintptr286 var xNewTakeErrorSimpleAsyncResult func(uintptr, uintptr, uintptr, *glib.Error) uintptr
@@ -282,14 +288,16 @@ var xNewTakeErrorSimpleAsyncResult func(uintptr, uintptr, uintptr, *glib.Error)
282 // Creates a #GSimpleAsyncResult from an error condition, and takes over the288 // Creates a #GSimpleAsyncResult from an error condition, and takes over the
283 // caller's ownership of @error, so the caller does not need to free it anymore.289 // caller's ownership of @error, so the caller does not need to free it anymore.
284 func NewTakeErrorSimpleAsyncResult(SourceObjectVar *gobject.Object, CallbackVar AsyncReadyCallback, UserDataVar uintptr, ErrorVar *glib.Error) *SimpleAsyncResult {290 func NewTakeErrorSimpleAsyncResult(SourceObjectVar *gobject.Object, CallbackVar AsyncReadyCallback, UserDataVar uintptr, ErrorVar *glib.Error) *SimpleAsyncResult {
285- NewTakeErrorSimpleAsyncResultPtr := xNewTakeErrorSimpleAsyncResult(SourceObjectVar.GoPointer(), purego.NewCallback(CallbackVar), UserDataVar, ErrorVar)291+ var cls *SimpleAsyncResult
286- if NewTakeErrorSimpleAsyncResultPtr == 0 {292+
287- return nil293+ cret := xNewTakeErrorSimpleAsyncResult(SourceObjectVar.GoPointer(), purego.NewCallback(CallbackVar), UserDataVar, ErrorVar)
288- }
289 294
290- NewTakeErrorSimpleAsyncResultCls := &SimpleAsyncResult{}295+ if cret == 0 {
291- NewTakeErrorSimpleAsyncResultCls.Ptr = NewTakeErrorSimpleAsyncResultPtr296+ return cls
292- return NewTakeErrorSimpleAsyncResultCls297+ }
298+ cls = &SimpleAsyncResult{}
299+ cls.Ptr = cret
300+ return cls
293 }301 }
294 302
295 var xSimpleAsyncResultComplete func(uintptr)303 var xSimpleAsyncResultComplete func(uintptr)
@@ -327,8 +335,8 @@ var xSimpleAsyncResultGetOpResGboolean func(uintptr) bool
327 // Gets the operation result boolean from within the asynchronous result.335 // Gets the operation result boolean from within the asynchronous result.
328 func (x *SimpleAsyncResult) GetOpResGboolean() bool {336 func (x *SimpleAsyncResult) GetOpResGboolean() bool {
329 337
330- return xSimpleAsyncResultGetOpResGboolean(x.GoPointer())338+ cret := xSimpleAsyncResultGetOpResGboolean(x.GoPointer())
331-339+ return cret
332 }340 }
333 341
334 var xSimpleAsyncResultGetOpResGpointer func(uintptr) uintptr342 var xSimpleAsyncResultGetOpResGpointer func(uintptr) uintptr
@@ -336,8 +344,8 @@ var xSimpleAsyncResultGetOpResGpointer func(uintptr) uintptr
336 // Gets a pointer result as returned by the asynchronous function.344 // Gets a pointer result as returned by the asynchronous function.
337 func (x *SimpleAsyncResult) GetOpResGpointer() uintptr {345 func (x *SimpleAsyncResult) GetOpResGpointer() uintptr {
338 346
339- return xSimpleAsyncResultGetOpResGpointer(x.GoPointer())347+ cret := xSimpleAsyncResultGetOpResGpointer(x.GoPointer())
340-348+ return cret
341 }349 }
342 350
343 var xSimpleAsyncResultGetOpResGssize func(uintptr) int351 var xSimpleAsyncResultGetOpResGssize func(uintptr) int
@@ -345,8 +353,8 @@ var xSimpleAsyncResultGetOpResGssize func(uintptr) int
345 // Gets a gssize from the asynchronous result.353 // Gets a gssize from the asynchronous result.
346 func (x *SimpleAsyncResult) GetOpResGssize() int {354 func (x *SimpleAsyncResult) GetOpResGssize() int {
347 355
348- return xSimpleAsyncResultGetOpResGssize(x.GoPointer())356+ cret := xSimpleAsyncResultGetOpResGssize(x.GoPointer())
349-357+ return cret
350 }358 }
351 359
352 var xSimpleAsyncResultGetSourceTag func(uintptr) uintptr360 var xSimpleAsyncResultGetSourceTag func(uintptr) uintptr
@@ -354,8 +362,8 @@ var xSimpleAsyncResultGetSourceTag func(uintptr) uintptr
354 // Gets the source tag for the #GSimpleAsyncResult.362 // Gets the source tag for the #GSimpleAsyncResult.
355 func (x *SimpleAsyncResult) GetSourceTag() uintptr {363 func (x *SimpleAsyncResult) GetSourceTag() uintptr {
356 364
357- return xSimpleAsyncResultGetSourceTag(x.GoPointer())365+ cret := xSimpleAsyncResultGetSourceTag(x.GoPointer())
358-366+ return cret
359 }367 }
360 368
361 var xSimpleAsyncResultPropagateError func(uintptr) bool369 var xSimpleAsyncResultPropagateError func(uintptr) bool
@@ -366,9 +374,14 @@ var xSimpleAsyncResultPropagateError func(uintptr) bool
366 // If the #GCancellable given to a prior call to374 // If the #GCancellable given to a prior call to
367 // g_simple_async_result_set_check_cancellable() is cancelled then this375 // g_simple_async_result_set_check_cancellable() is cancelled then this
368 // function will return %TRUE with @dest set appropriately.376 // function will return %TRUE with @dest set appropriately.
369-func (x *SimpleAsyncResult) PropagateError() bool {377+func (x *SimpleAsyncResult) PropagateError() (bool, error) {
378+ var cerr *glib.Error
370 379
371- return xSimpleAsyncResultPropagateError(x.GoPointer())380+ cret := xSimpleAsyncResultPropagateError(x.GoPointer())
381+ if cerr == nil {
382+ return cret, nil
383+ }
384+ return cret, cerr
372 385
373 }386 }
374 387
@@ -498,31 +511,31 @@ func (c *SimpleAsyncResult) SetGoPointer(ptr uintptr) {
498 511
499 // Gets the source object from a #GAsyncResult.512 // Gets the source object from a #GAsyncResult.
500 func (x *SimpleAsyncResult) GetSourceObject() *gobject.Object {513 func (x *SimpleAsyncResult) GetSourceObject() *gobject.Object {
514+ var cls *gobject.Object
501 515
502- GetSourceObjectPtr := XGAsyncResultGetSourceObject(x.GoPointer())516+ cret := XGAsyncResultGetSourceObject(x.GoPointer())
503- if GetSourceObjectPtr == 0 {
504- return nil
505- }
506-
507- GetSourceObjectCls := &gobject.Object{}
508- GetSourceObjectCls.Ptr = GetSourceObjectPtr
509- return GetSourceObjectCls
510 517
518+ if cret == 0 {
519+ return cls
520+ }
521+ cls = &gobject.Object{}
522+ cls.Ptr = cret
523+ return cls
511 }524 }
512 525
513 // Gets the user data from a #GAsyncResult.526 // Gets the user data from a #GAsyncResult.
514 func (x *SimpleAsyncResult) GetUserData() uintptr {527 func (x *SimpleAsyncResult) GetUserData() uintptr {
515 528
516- return XGAsyncResultGetUserData(x.GoPointer())529+ cret := XGAsyncResultGetUserData(x.GoPointer())
517-530+ return cret
518 }531 }
519 532
520 // Checks if @res has the given @source_tag (generally a function533 // Checks if @res has the given @source_tag (generally a function
521 // pointer indicating the function @res was created by).534 // pointer indicating the function @res was created by).
522 func (x *SimpleAsyncResult) IsTagged(SourceTagVar uintptr) bool {535 func (x *SimpleAsyncResult) IsTagged(SourceTagVar uintptr) bool {
523 536
524- return XGAsyncResultIsTagged(x.GoPointer(), SourceTagVar)537+ cret := XGAsyncResultIsTagged(x.GoPointer(), SourceTagVar)
525-538+ return cret
526 }539 }
527 540
528 // If @res is a #GSimpleAsyncResult, this is equivalent to541 // If @res is a #GSimpleAsyncResult, this is equivalent to
@@ -535,9 +548,14 @@ func (x *SimpleAsyncResult) IsTagged(SourceTagVar uintptr) bool {
535 // This should not be used in new code; #GAsyncResult errors that are548 // This should not be used in new code; #GAsyncResult errors that are
536 // set by virtual methods should also be extracted by virtual methods,549 // set by virtual methods should also be extracted by virtual methods,
537 // to enable subclasses to chain up correctly.550 // to enable subclasses to chain up correctly.
538-func (x *SimpleAsyncResult) LegacyPropagateError() bool {551+func (x *SimpleAsyncResult) LegacyPropagateError() (bool, error) {
552+ var cerr *glib.Error
539 553
540- return XGAsyncResultLegacyPropagateError(x.GoPointer())554+ cret := XGAsyncResultLegacyPropagateError(x.GoPointer())
555+ if cerr == nil {
556+ return cret, nil
557+ }
558+ return cret, cerr
541 559
542 }560 }
543 561
M v4/gio/gsimpleproxyresolver.go +17 -6
@@ -4,6 +4,7 @@ package gio
4 import (4 import (
5 "github.com/jwijenbergh/purego"5 "github.com/jwijenbergh/purego"
6 "github.com/jwijenbergh/puregotk/internal/core"6 "github.com/jwijenbergh/puregotk/internal/core"
7+ "github.com/jwijenbergh/puregotk/v4/glib"
7 "github.com/jwijenbergh/puregotk/v4/gobject"8 "github.com/jwijenbergh/puregotk/v4/gobject"
8 )9 )
9 10
@@ -88,8 +89,8 @@ func (c *SimpleProxyResolver) SetGoPointer(ptr uintptr) {
88 // resolver that returns %TRUE for this method.)89 // resolver that returns %TRUE for this method.)
89 func (x *SimpleProxyResolver) IsSupported() bool {90 func (x *SimpleProxyResolver) IsSupported() bool {
90 91
91- return XGProxyResolverIsSupported(x.GoPointer())92+ cret := XGProxyResolverIsSupported(x.GoPointer())
92-93+ return cret
93 }94 }
94 95
95 // Looks into the system proxy configuration to determine what proxy,96 // Looks into the system proxy configuration to determine what proxy,
@@ -107,9 +108,14 @@ func (x *SimpleProxyResolver) IsSupported() bool {
107 // `direct://` is used when no proxy is needed.108 // `direct://` is used when no proxy is needed.
108 // Direct connection should not be attempted unless it is part of the109 // Direct connection should not be attempted unless it is part of the
109 // returned array of proxies.110 // returned array of proxies.
110-func (x *SimpleProxyResolver) Lookup(UriVar string, CancellableVar *Cancellable) uintptr {111+func (x *SimpleProxyResolver) Lookup(UriVar string, CancellableVar *Cancellable) (uintptr, error) {
112+ var cerr *glib.Error
111 113
112- return XGProxyResolverLookup(x.GoPointer(), UriVar, CancellableVar.GoPointer())114+ cret := XGProxyResolverLookup(x.GoPointer(), UriVar, CancellableVar.GoPointer(), &cerr)
115+ if cerr == nil {
116+ return cret, nil
117+ }
118+ return cret, cerr
113 119
114 }120 }
115 121
@@ -124,9 +130,14 @@ func (x *SimpleProxyResolver) LookupAsync(UriVar string, CancellableVar *Cancell
124 // Call this function to obtain the array of proxy URIs when130 // Call this function to obtain the array of proxy URIs when
125 // g_proxy_resolver_lookup_async() is complete. See131 // g_proxy_resolver_lookup_async() is complete. See
126 // g_proxy_resolver_lookup() for more details.132 // g_proxy_resolver_lookup() for more details.
127-func (x *SimpleProxyResolver) LookupFinish(ResultVar AsyncResult) uintptr {133+func (x *SimpleProxyResolver) LookupFinish(ResultVar AsyncResult) (uintptr, error) {
134+ var cerr *glib.Error
128 135
129- return XGProxyResolverLookupFinish(x.GoPointer(), ResultVar.GoPointer())136+ cret := XGProxyResolverLookupFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
137+ if cerr == nil {
138+ return cret, nil
139+ }
140+ return cret, cerr
130 141
131 }142 }
132 143
M v4/gio/gsocket.go +331 -167
@@ -76,7 +76,7 @@ func SocketNewFromInternalPtr(ptr uintptr) *Socket {
76 return cls76 return cls
77 }77 }
78 78
79-var xNewSocket func(SocketFamily, SocketType, SocketProtocol) uintptr79+var xNewSocket func(SocketFamily, SocketType, SocketProtocol, **glib.Error) uintptr
80 80
81 // Creates a new #GSocket with the defined family, type and protocol.81 // Creates a new #GSocket with the defined family, type and protocol.
82 // If @protocol is 0 (%G_SOCKET_PROTOCOL_DEFAULT) the default protocol type82 // If @protocol is 0 (%G_SOCKET_PROTOCOL_DEFAULT) the default protocol type
@@ -91,18 +91,25 @@ var xNewSocket func(SocketFamily, SocketType, SocketProtocol) uintptr
91 // The protocol id is passed directly to the operating91 // The protocol id is passed directly to the operating
92 // system, so you can use protocols not listed in #GSocketProtocol if you92 // system, so you can use protocols not listed in #GSocketProtocol if you
93 // know the protocol number used for it.93 // know the protocol number used for it.
94-func NewSocket(FamilyVar SocketFamily, TypeVar SocketType, ProtocolVar SocketProtocol) *Socket {94+func NewSocket(FamilyVar SocketFamily, TypeVar SocketType, ProtocolVar SocketProtocol) (*Socket, error) {
95- NewSocketPtr := xNewSocket(FamilyVar, TypeVar, ProtocolVar)95+ var cls *Socket
96- if NewSocketPtr == 0 {96+ var cerr *glib.Error
97- return nil97+
98+ cret := xNewSocket(FamilyVar, TypeVar, ProtocolVar, &cerr)
99+
100+ if cret == 0 {
101+ return cls, cerr
102+ }
103+ cls = &Socket{}
104+ cls.Ptr = cret
105+ if cerr == nil {
106+ return cls, nil
98 }107 }
108+ return cls, cerr
99 109
100- NewSocketCls := &Socket{}
101- NewSocketCls.Ptr = NewSocketPtr
102- return NewSocketCls
103 }110 }
104 111
105-var xNewFromFdSocket func(int) uintptr112+var xNewFromFdSocket func(int, **glib.Error) uintptr
106 113
107 // Creates a new #GSocket from a native file descriptor114 // Creates a new #GSocket from a native file descriptor
108 // or winsock SOCKET handle.115 // or winsock SOCKET handle.
@@ -117,18 +124,25 @@ var xNewFromFdSocket func(int) uintptr
117 //124 //
118 // Since GLib 2.46, it is no longer a fatal error to call this on a non-socket125 // Since GLib 2.46, it is no longer a fatal error to call this on a non-socket
119 // descriptor. Instead, a GError will be set with code %G_IO_ERROR_FAILED126 // descriptor. Instead, a GError will be set with code %G_IO_ERROR_FAILED
120-func NewFromFdSocket(FdVar int) *Socket {127+func NewFromFdSocket(FdVar int) (*Socket, error) {
121- NewFromFdSocketPtr := xNewFromFdSocket(FdVar)128+ var cls *Socket
122- if NewFromFdSocketPtr == 0 {129+ var cerr *glib.Error
123- return nil130+
131+ cret := xNewFromFdSocket(FdVar, &cerr)
132+
133+ if cret == 0 {
134+ return cls, cerr
124 }135 }
136+ cls = &Socket{}
137+ cls.Ptr = cret
138+ if cerr == nil {
139+ return cls, nil
140+ }
141+ return cls, cerr
125 142
126- NewFromFdSocketCls := &Socket{}
127- NewFromFdSocketCls.Ptr = NewFromFdSocketPtr
128- return NewFromFdSocketCls
129 }143 }
130 144
131-var xSocketAccept func(uintptr, uintptr) uintptr145+var xSocketAccept func(uintptr, uintptr, **glib.Error) uintptr
132 146
133 // Accept incoming connections on a connection-based socket. This removes147 // Accept incoming connections on a connection-based socket. This removes
134 // the first outstanding connection request from the listening socket and148 // the first outstanding connection request from the listening socket and
@@ -140,20 +154,25 @@ var xSocketAccept func(uintptr, uintptr) uintptr
140 // If there are no outstanding connections then the operation will block154 // If there are no outstanding connections then the operation will block
141 // or return %G_IO_ERROR_WOULD_BLOCK if non-blocking I/O is enabled.155 // or return %G_IO_ERROR_WOULD_BLOCK if non-blocking I/O is enabled.
142 // To be notified of an incoming connection, wait for the %G_IO_IN condition.156 // To be notified of an incoming connection, wait for the %G_IO_IN condition.
143-func (x *Socket) Accept(CancellableVar *Cancellable) *Socket {157+func (x *Socket) Accept(CancellableVar *Cancellable) (*Socket, error) {
158+ var cls *Socket
159+ var cerr *glib.Error
144 160
145- AcceptPtr := xSocketAccept(x.GoPointer(), CancellableVar.GoPointer())161+ cret := xSocketAccept(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
146- if AcceptPtr == 0 {
147- return nil
148- }
149 162
150- AcceptCls := &Socket{}163+ if cret == 0 {
151- AcceptCls.Ptr = AcceptPtr164+ return cls, cerr
152- return AcceptCls165+ }
166+ cls = &Socket{}
167+ cls.Ptr = cret
168+ if cerr == nil {
169+ return cls, nil
170+ }
171+ return cls, cerr
153 172
154 }173 }
155 174
156-var xSocketBind func(uintptr, uintptr, bool) bool175+var xSocketBind func(uintptr, uintptr, bool, **glib.Error) bool
157 176
158 // When a socket is created it is attached to an address family, but it177 // When a socket is created it is attached to an address family, but it
159 // doesn't have an address in this family. g_socket_bind() assigns the178 // doesn't have an address in this family. g_socket_bind() assigns the
@@ -178,9 +197,14 @@ var xSocketBind func(uintptr, uintptr, bool) bool
178 // same address, and they will all receive all of the multicast and197 // same address, and they will all receive all of the multicast and
179 // broadcast packets sent to that address. (The behavior of unicast198 // broadcast packets sent to that address. (The behavior of unicast
180 // UDP packets to an address with multiple listeners is not defined.)199 // UDP packets to an address with multiple listeners is not defined.)
181-func (x *Socket) Bind(AddressVar *SocketAddress, AllowReuseVar bool) bool {200+func (x *Socket) Bind(AddressVar *SocketAddress, AllowReuseVar bool) (bool, error) {
201+ var cerr *glib.Error
182 202
183- return xSocketBind(x.GoPointer(), AddressVar.GoPointer(), AllowReuseVar)203+ cret := xSocketBind(x.GoPointer(), AddressVar.GoPointer(), AllowReuseVar, &cerr)
204+ if cerr == nil {
205+ return cret, nil
206+ }
207+ return cret, cerr
184 208
185 }209 }
186 210
@@ -189,9 +213,14 @@ var xSocketCheckConnectResult func(uintptr) bool
189 // Checks and resets the pending connect error for the socket.213 // Checks and resets the pending connect error for the socket.
190 // This is used to check for errors when g_socket_connect() is214 // This is used to check for errors when g_socket_connect() is
191 // used in non-blocking mode.215 // used in non-blocking mode.
192-func (x *Socket) CheckConnectResult() bool {216+func (x *Socket) CheckConnectResult() (bool, error) {
217+ var cerr *glib.Error
193 218
194- return xSocketCheckConnectResult(x.GoPointer())219+ cret := xSocketCheckConnectResult(x.GoPointer())
220+ if cerr == nil {
221+ return cret, nil
222+ }
223+ return cret, cerr
195 224
196 }225 }
197 226
@@ -226,9 +255,14 @@ var xSocketClose func(uintptr) bool
226 // g_tcp_connection_set_graceful_disconnect(). But of course, this255 // g_tcp_connection_set_graceful_disconnect(). But of course, this
227 // only works if the client will close its connection after the server256 // only works if the client will close its connection after the server
228 // does.)257 // does.)
229-func (x *Socket) Close() bool {258+func (x *Socket) Close() (bool, error) {
259+ var cerr *glib.Error
230 260
231- return xSocketClose(x.GoPointer())261+ cret := xSocketClose(x.GoPointer())
262+ if cerr == nil {
263+ return cret, nil
264+ }
265+ return cret, cerr
232 266
233 }267 }
234 268
@@ -253,11 +287,11 @@ var xSocketConditionCheck func(uintptr, glib.IOCondition) glib.IOCondition
253 // This call never blocks.287 // This call never blocks.
254 func (x *Socket) ConditionCheck(ConditionVar glib.IOCondition) glib.IOCondition {288 func (x *Socket) ConditionCheck(ConditionVar glib.IOCondition) glib.IOCondition {
255 289
256- return xSocketConditionCheck(x.GoPointer(), ConditionVar)290+ cret := xSocketConditionCheck(x.GoPointer(), ConditionVar)
257-291+ return cret
258 }292 }
259 293
260-var xSocketConditionTimedWait func(uintptr, glib.IOCondition, int64, uintptr) bool294+var xSocketConditionTimedWait func(uintptr, glib.IOCondition, int64, uintptr, **glib.Error) bool
261 295
262 // Waits for up to @timeout_us microseconds for @condition to become true296 // Waits for up to @timeout_us microseconds for @condition to become true
263 // on @socket. If the condition is met, %TRUE is returned.297 // on @socket. If the condition is met, %TRUE is returned.
@@ -275,13 +309,18 @@ var xSocketConditionTimedWait func(uintptr, glib.IOCondition, int64, uintptr) bo
275 // other GLib APIs, this function actually only has millisecond309 // other GLib APIs, this function actually only has millisecond
276 // resolution, and the behavior is undefined if @timeout_us is not an310 // resolution, and the behavior is undefined if @timeout_us is not an
277 // exact number of milliseconds.311 // exact number of milliseconds.
278-func (x *Socket) ConditionTimedWait(ConditionVar glib.IOCondition, TimeoutUsVar int64, CancellableVar *Cancellable) bool {312+func (x *Socket) ConditionTimedWait(ConditionVar glib.IOCondition, TimeoutUsVar int64, CancellableVar *Cancellable) (bool, error) {
313+ var cerr *glib.Error
279 314
280- return xSocketConditionTimedWait(x.GoPointer(), ConditionVar, TimeoutUsVar, CancellableVar.GoPointer())315+ cret := xSocketConditionTimedWait(x.GoPointer(), ConditionVar, TimeoutUsVar, CancellableVar.GoPointer(), &cerr)
316+ if cerr == nil {
317+ return cret, nil
318+ }
319+ return cret, cerr
281 320
282 }321 }
283 322
284-var xSocketConditionWait func(uintptr, glib.IOCondition, uintptr) bool323+var xSocketConditionWait func(uintptr, glib.IOCondition, uintptr, **glib.Error) bool
285 324
286 // Waits for @condition to become true on @socket. When the condition325 // Waits for @condition to become true on @socket. When the condition
287 // is met, %TRUE is returned.326 // is met, %TRUE is returned.
@@ -293,13 +332,18 @@ var xSocketConditionWait func(uintptr, glib.IOCondition, uintptr) bool
293 // %G_IO_ERROR_TIMED_OUT).332 // %G_IO_ERROR_TIMED_OUT).
294 //333 //
295 // See also g_socket_condition_timed_wait().334 // See also g_socket_condition_timed_wait().
296-func (x *Socket) ConditionWait(ConditionVar glib.IOCondition, CancellableVar *Cancellable) bool {335+func (x *Socket) ConditionWait(ConditionVar glib.IOCondition, CancellableVar *Cancellable) (bool, error) {
336+ var cerr *glib.Error
297 337
298- return xSocketConditionWait(x.GoPointer(), ConditionVar, CancellableVar.GoPointer())338+ cret := xSocketConditionWait(x.GoPointer(), ConditionVar, CancellableVar.GoPointer(), &cerr)
339+ if cerr == nil {
340+ return cret, nil
341+ }
342+ return cret, cerr
299 343
300 }344 }
301 345
302-var xSocketConnect func(uintptr, uintptr, uintptr) bool346+var xSocketConnect func(uintptr, uintptr, uintptr, **glib.Error) bool
303 347
304 // Connect the socket to the specified remote address.348 // Connect the socket to the specified remote address.
305 //349 //
@@ -317,9 +361,14 @@ var xSocketConnect func(uintptr, uintptr, uintptr) bool
317 // and the user can be notified of the connection finishing by waiting361 // and the user can be notified of the connection finishing by waiting
318 // for the G_IO_OUT condition. The result of the connection must then be362 // for the G_IO_OUT condition. The result of the connection must then be
319 // checked with g_socket_check_connect_result().363 // checked with g_socket_check_connect_result().
320-func (x *Socket) Connect(AddressVar *SocketAddress, CancellableVar *Cancellable) bool {364+func (x *Socket) Connect(AddressVar *SocketAddress, CancellableVar *Cancellable) (bool, error) {
365+ var cerr *glib.Error
321 366
322- return xSocketConnect(x.GoPointer(), AddressVar.GoPointer(), CancellableVar.GoPointer())367+ cret := xSocketConnect(x.GoPointer(), AddressVar.GoPointer(), CancellableVar.GoPointer(), &cerr)
368+ if cerr == nil {
369+ return cret, nil
370+ }
371+ return cret, cerr
323 372
324 }373 }
325 374
@@ -328,16 +377,16 @@ var xSocketConnectionFactoryCreateConnection func(uintptr) uintptr
328 // Creates a #GSocketConnection subclass of the right type for377 // Creates a #GSocketConnection subclass of the right type for
329 // @socket.378 // @socket.
330 func (x *Socket) ConnectionFactoryCreateConnection() *SocketConnection {379 func (x *Socket) ConnectionFactoryCreateConnection() *SocketConnection {
380+ var cls *SocketConnection
331 381
332- ConnectionFactoryCreateConnectionPtr := xSocketConnectionFactoryCreateConnection(x.GoPointer())382+ cret := xSocketConnectionFactoryCreateConnection(x.GoPointer())
333- if ConnectionFactoryCreateConnectionPtr == 0 {
334- return nil
335- }
336-
337- ConnectionFactoryCreateConnectionCls := &SocketConnection{}
338- ConnectionFactoryCreateConnectionCls.Ptr = ConnectionFactoryCreateConnectionPtr
339- return ConnectionFactoryCreateConnectionCls
340 383
384+ if cret == 0 {
385+ return cls
386+ }
387+ cls = &SocketConnection{}
388+ cls.Ptr = cret
389+ return cls
341 }390 }
342 391
343 var xSocketCreateSource func(uintptr, glib.IOCondition, uintptr) *glib.Source392 var xSocketCreateSource func(uintptr, glib.IOCondition, uintptr) *glib.Source
@@ -364,8 +413,8 @@ var xSocketCreateSource func(uintptr, glib.IOCondition, uintptr) *glib.Source
364 // you call will then fail with a %G_IO_ERROR_TIMED_OUT.413 // you call will then fail with a %G_IO_ERROR_TIMED_OUT.
365 func (x *Socket) CreateSource(ConditionVar glib.IOCondition, CancellableVar *Cancellable) *glib.Source {414 func (x *Socket) CreateSource(ConditionVar glib.IOCondition, CancellableVar *Cancellable) *glib.Source {
366 415
367- return xSocketCreateSource(x.GoPointer(), ConditionVar, CancellableVar.GoPointer())416+ cret := xSocketCreateSource(x.GoPointer(), ConditionVar, CancellableVar.GoPointer())
368-417+ return cret
369 }418 }
370 419
371 var xSocketGetAvailableBytes func(uintptr) int420 var xSocketGetAvailableBytes func(uintptr) int
@@ -384,8 +433,8 @@ var xSocketGetAvailableBytes func(uintptr) int
384 // exactly the right size.433 // exactly the right size.
385 func (x *Socket) GetAvailableBytes() int {434 func (x *Socket) GetAvailableBytes() int {
386 435
387- return xSocketGetAvailableBytes(x.GoPointer())436+ cret := xSocketGetAvailableBytes(x.GoPointer())
388-437+ return cret
389 }438 }
390 439
391 var xSocketGetBlocking func(uintptr) bool440 var xSocketGetBlocking func(uintptr) bool
@@ -394,8 +443,8 @@ var xSocketGetBlocking func(uintptr) bool
394 // see g_socket_set_blocking().443 // see g_socket_set_blocking().
395 func (x *Socket) GetBlocking() bool {444 func (x *Socket) GetBlocking() bool {
396 445
397- return xSocketGetBlocking(x.GoPointer())446+ cret := xSocketGetBlocking(x.GoPointer())
398-447+ return cret
399 }448 }
400 449
401 var xSocketGetBroadcast func(uintptr) bool450 var xSocketGetBroadcast func(uintptr) bool
@@ -405,8 +454,8 @@ var xSocketGetBroadcast func(uintptr) bool
405 // addresses.454 // addresses.
406 func (x *Socket) GetBroadcast() bool {455 func (x *Socket) GetBroadcast() bool {
407 456
408- return xSocketGetBroadcast(x.GoPointer())457+ cret := xSocketGetBroadcast(x.GoPointer())
409-458+ return cret
410 }459 }
411 460
412 var xSocketGetCredentials func(uintptr) uintptr461 var xSocketGetCredentials func(uintptr) uintptr
@@ -431,16 +480,21 @@ var xSocketGetCredentials func(uintptr) uintptr
431 // #GUnixCredentialsMessage type and480 // #GUnixCredentialsMessage type and
432 // g_unix_connection_send_credentials() /481 // g_unix_connection_send_credentials() /
433 // g_unix_connection_receive_credentials() functions.482 // g_unix_connection_receive_credentials() functions.
434-func (x *Socket) GetCredentials() *Credentials {483+func (x *Socket) GetCredentials() (*Credentials, error) {
484+ var cls *Credentials
485+ var cerr *glib.Error
435 486
436- GetCredentialsPtr := xSocketGetCredentials(x.GoPointer())487+ cret := xSocketGetCredentials(x.GoPointer())
437- if GetCredentialsPtr == 0 {
438- return nil
439- }
440 488
441- GetCredentialsCls := &Credentials{}489+ if cret == 0 {
442- GetCredentialsCls.Ptr = GetCredentialsPtr490+ return cls, cerr
443- return GetCredentialsCls491+ }
492+ cls = &Credentials{}
493+ cls.Ptr = cret
494+ if cerr == nil {
495+ return cls, nil
496+ }
497+ return cls, cerr
444 498
445 }499 }
446 500
@@ -449,8 +503,8 @@ var xSocketGetFamily func(uintptr) SocketFamily
449 // Gets the socket family of the socket.503 // Gets the socket family of the socket.
450 func (x *Socket) GetFamily() SocketFamily {504 func (x *Socket) GetFamily() SocketFamily {
451 505
452- return xSocketGetFamily(x.GoPointer())506+ cret := xSocketGetFamily(x.GoPointer())
453-507+ return cret
454 }508 }
455 509
456 var xSocketGetFd func(uintptr) int510 var xSocketGetFd func(uintptr) int
@@ -462,8 +516,8 @@ var xSocketGetFd func(uintptr) int
462 // on the socket.516 // on the socket.
463 func (x *Socket) GetFd() int {517 func (x *Socket) GetFd() int {
464 518
465- return xSocketGetFd(x.GoPointer())519+ cret := xSocketGetFd(x.GoPointer())
466-520+ return cret
467 }521 }
468 522
469 var xSocketGetKeepalive func(uintptr) bool523 var xSocketGetKeepalive func(uintptr) bool
@@ -472,8 +526,8 @@ var xSocketGetKeepalive func(uintptr) bool
472 // see g_socket_set_keepalive().526 // see g_socket_set_keepalive().
473 func (x *Socket) GetKeepalive() bool {527 func (x *Socket) GetKeepalive() bool {
474 528
475- return xSocketGetKeepalive(x.GoPointer())529+ cret := xSocketGetKeepalive(x.GoPointer())
476-530+ return cret
477 }531 }
478 532
479 var xSocketGetListenBacklog func(uintptr) int533 var xSocketGetListenBacklog func(uintptr) int
@@ -482,8 +536,8 @@ var xSocketGetListenBacklog func(uintptr) int
482 // see g_socket_set_listen_backlog().536 // see g_socket_set_listen_backlog().
483 func (x *Socket) GetListenBacklog() int {537 func (x *Socket) GetListenBacklog() int {
484 538
485- return xSocketGetListenBacklog(x.GoPointer())539+ cret := xSocketGetListenBacklog(x.GoPointer())
486-540+ return cret
487 }541 }
488 542
489 var xSocketGetLocalAddress func(uintptr) uintptr543 var xSocketGetLocalAddress func(uintptr) uintptr
@@ -491,16 +545,21 @@ var xSocketGetLocalAddress func(uintptr) uintptr
491 // Try to get the local address of a bound socket. This is only545 // Try to get the local address of a bound socket. This is only
492 // useful if the socket has been bound to a local address,546 // useful if the socket has been bound to a local address,
493 // either explicitly or implicitly when connecting.547 // either explicitly or implicitly when connecting.
494-func (x *Socket) GetLocalAddress() *SocketAddress {548+func (x *Socket) GetLocalAddress() (*SocketAddress, error) {
549+ var cls *SocketAddress
550+ var cerr *glib.Error
495 551
496- GetLocalAddressPtr := xSocketGetLocalAddress(x.GoPointer())552+ cret := xSocketGetLocalAddress(x.GoPointer())
497- if GetLocalAddressPtr == 0 {
498- return nil
499- }
500 553
501- GetLocalAddressCls := &SocketAddress{}554+ if cret == 0 {
502- GetLocalAddressCls.Ptr = GetLocalAddressPtr555+ return cls, cerr
503- return GetLocalAddressCls556+ }
557+ cls = &SocketAddress{}
558+ cls.Ptr = cret
559+ if cerr == nil {
560+ return cls, nil
561+ }
562+ return cls, cerr
504 563
505 }564 }
506 565
@@ -511,8 +570,8 @@ var xSocketGetMulticastLoopback func(uintptr) bool
511 // multicast listeners on the same host.570 // multicast listeners on the same host.
512 func (x *Socket) GetMulticastLoopback() bool {571 func (x *Socket) GetMulticastLoopback() bool {
513 572
514- return xSocketGetMulticastLoopback(x.GoPointer())573+ cret := xSocketGetMulticastLoopback(x.GoPointer())
515-574+ return cret
516 }575 }
517 576
518 var xSocketGetMulticastTtl func(uintptr) uint577 var xSocketGetMulticastTtl func(uintptr) uint
@@ -521,11 +580,11 @@ var xSocketGetMulticastTtl func(uintptr) uint
521 // g_socket_set_multicast_ttl() for more details.580 // g_socket_set_multicast_ttl() for more details.
522 func (x *Socket) GetMulticastTtl() uint {581 func (x *Socket) GetMulticastTtl() uint {
523 582
524- return xSocketGetMulticastTtl(x.GoPointer())583+ cret := xSocketGetMulticastTtl(x.GoPointer())
525-584+ return cret
526 }585 }
527 586
528-var xSocketGetOption func(uintptr, int, int, int) bool587+var xSocketGetOption func(uintptr, int, int, int, **glib.Error) bool
529 588
530 // Gets the value of an integer-valued option on @socket, as with589 // Gets the value of an integer-valued option on @socket, as with
531 // getsockopt(). (If you need to fetch a non-integer-valued option,590 // getsockopt(). (If you need to fetch a non-integer-valued option,
@@ -540,9 +599,14 @@ var xSocketGetOption func(uintptr, int, int, int) bool
540 // Note that even for socket options that are a single byte in size,599 // Note that even for socket options that are a single byte in size,
541 // @value is still a pointer to a #gint variable, not a #guchar;600 // @value is still a pointer to a #gint variable, not a #guchar;
542 // g_socket_get_option() will handle the conversion internally.601 // g_socket_get_option() will handle the conversion internally.
543-func (x *Socket) GetOption(LevelVar int, OptnameVar int, ValueVar int) bool {602+func (x *Socket) GetOption(LevelVar int, OptnameVar int, ValueVar int) (bool, error) {
603+ var cerr *glib.Error
544 604
545- return xSocketGetOption(x.GoPointer(), LevelVar, OptnameVar, ValueVar)605+ cret := xSocketGetOption(x.GoPointer(), LevelVar, OptnameVar, ValueVar, &cerr)
606+ if cerr == nil {
607+ return cret, nil
608+ }
609+ return cret, cerr
546 610
547 }611 }
548 612
@@ -552,24 +616,29 @@ var xSocketGetProtocol func(uintptr) SocketProtocol
552 // In case the protocol is unknown, -1 is returned.616 // In case the protocol is unknown, -1 is returned.
553 func (x *Socket) GetProtocol() SocketProtocol {617 func (x *Socket) GetProtocol() SocketProtocol {
554 618
555- return xSocketGetProtocol(x.GoPointer())619+ cret := xSocketGetProtocol(x.GoPointer())
556-620+ return cret
557 }621 }
558 622
559 var xSocketGetRemoteAddress func(uintptr) uintptr623 var xSocketGetRemoteAddress func(uintptr) uintptr
560 624
561 // Try to get the remote address of a connected socket. This is only625 // Try to get the remote address of a connected socket. This is only
562 // useful for connection oriented sockets that have been connected.626 // useful for connection oriented sockets that have been connected.
563-func (x *Socket) GetRemoteAddress() *SocketAddress {627+func (x *Socket) GetRemoteAddress() (*SocketAddress, error) {
628+ var cls *SocketAddress
629+ var cerr *glib.Error
564 630
565- GetRemoteAddressPtr := xSocketGetRemoteAddress(x.GoPointer())631+ cret := xSocketGetRemoteAddress(x.GoPointer())
566- if GetRemoteAddressPtr == 0 {
567- return nil
568- }
569 632
570- GetRemoteAddressCls := &SocketAddress{}633+ if cret == 0 {
571- GetRemoteAddressCls.Ptr = GetRemoteAddressPtr634+ return cls, cerr
572- return GetRemoteAddressCls635+ }
636+ cls = &SocketAddress{}
637+ cls.Ptr = cret
638+ if cerr == nil {
639+ return cls, nil
640+ }
641+ return cls, cerr
573 642
574 }643 }
575 644
@@ -578,8 +647,8 @@ var xSocketGetSocketType func(uintptr) SocketType
578 // Gets the socket type of the socket.647 // Gets the socket type of the socket.
579 func (x *Socket) GetSocketType() SocketType {648 func (x *Socket) GetSocketType() SocketType {
580 649
581- return xSocketGetSocketType(x.GoPointer())650+ cret := xSocketGetSocketType(x.GoPointer())
582-651+ return cret
583 }652 }
584 653
585 var xSocketGetTimeout func(uintptr) uint654 var xSocketGetTimeout func(uintptr) uint
@@ -588,8 +657,8 @@ var xSocketGetTimeout func(uintptr) uint
588 // g_socket_set_timeout().657 // g_socket_set_timeout().
589 func (x *Socket) GetTimeout() uint {658 func (x *Socket) GetTimeout() uint {
590 659
591- return xSocketGetTimeout(x.GoPointer())660+ cret := xSocketGetTimeout(x.GoPointer())
592-661+ return cret
593 }662 }
594 663
595 var xSocketGetTtl func(uintptr) uint664 var xSocketGetTtl func(uintptr) uint
@@ -598,8 +667,8 @@ var xSocketGetTtl func(uintptr) uint
598 // g_socket_set_ttl() for more details.667 // g_socket_set_ttl() for more details.
599 func (x *Socket) GetTtl() uint {668 func (x *Socket) GetTtl() uint {
600 669
601- return xSocketGetTtl(x.GoPointer())670+ cret := xSocketGetTtl(x.GoPointer())
602-671+ return cret
603 }672 }
604 673
605 var xSocketIsClosed func(uintptr) bool674 var xSocketIsClosed func(uintptr) bool
@@ -607,8 +676,8 @@ var xSocketIsClosed func(uintptr) bool
607 // Checks whether a socket is closed.676 // Checks whether a socket is closed.
608 func (x *Socket) IsClosed() bool {677 func (x *Socket) IsClosed() bool {
609 678
610- return xSocketIsClosed(x.GoPointer())679+ cret := xSocketIsClosed(x.GoPointer())
611-680+ return cret
612 }681 }
613 682
614 var xSocketIsConnected func(uintptr) bool683 var xSocketIsConnected func(uintptr) bool
@@ -622,11 +691,11 @@ var xSocketIsConnected func(uintptr) bool
622 // g_socket_check_connect_result().691 // g_socket_check_connect_result().
623 func (x *Socket) IsConnected() bool {692 func (x *Socket) IsConnected() bool {
624 693
625- return xSocketIsConnected(x.GoPointer())694+ cret := xSocketIsConnected(x.GoPointer())
626-695+ return cret
627 }696 }
628 697
629-var xSocketJoinMulticastGroup func(uintptr, uintptr, bool, string) bool698+var xSocketJoinMulticastGroup func(uintptr, uintptr, bool, string, **glib.Error) bool
630 699
631 // Registers @socket to receive multicast messages sent to @group.700 // Registers @socket to receive multicast messages sent to @group.
632 // @socket must be a %G_SOCKET_TYPE_DATAGRAM socket, and must have701 // @socket must be a %G_SOCKET_TYPE_DATAGRAM socket, and must have
@@ -642,13 +711,18 @@ var xSocketJoinMulticastGroup func(uintptr, uintptr, bool, string) bool
642 //711 //
643 // To bind to a given source-specific multicast address, use712 // To bind to a given source-specific multicast address, use
644 // g_socket_join_multicast_group_ssm() instead.713 // g_socket_join_multicast_group_ssm() instead.
645-func (x *Socket) JoinMulticastGroup(GroupVar *InetAddress, SourceSpecificVar bool, IfaceVar string) bool {714+func (x *Socket) JoinMulticastGroup(GroupVar *InetAddress, SourceSpecificVar bool, IfaceVar string) (bool, error) {
715+ var cerr *glib.Error
646 716
647- return xSocketJoinMulticastGroup(x.GoPointer(), GroupVar.GoPointer(), SourceSpecificVar, IfaceVar)717+ cret := xSocketJoinMulticastGroup(x.GoPointer(), GroupVar.GoPointer(), SourceSpecificVar, IfaceVar, &cerr)
718+ if cerr == nil {
719+ return cret, nil
720+ }
721+ return cret, cerr
648 722
649 }723 }
650 724
651-var xSocketJoinMulticastGroupSsm func(uintptr, uintptr, uintptr, string) bool725+var xSocketJoinMulticastGroupSsm func(uintptr, uintptr, uintptr, string, **glib.Error) bool
652 726
653 // Registers @socket to receive multicast messages sent to @group.727 // Registers @socket to receive multicast messages sent to @group.
654 // @socket must be a %G_SOCKET_TYPE_DATAGRAM socket, and must have728 // @socket must be a %G_SOCKET_TYPE_DATAGRAM socket, and must have
@@ -665,13 +739,18 @@ var xSocketJoinMulticastGroupSsm func(uintptr, uintptr, uintptr, string) bool
665 // Note that this function can be called multiple times for the same739 // Note that this function can be called multiple times for the same
666 // @group with different @source_specific in order to receive multicast740 // @group with different @source_specific in order to receive multicast
667 // packets from more than one source.741 // packets from more than one source.
668-func (x *Socket) JoinMulticastGroupSsm(GroupVar *InetAddress, SourceSpecificVar *InetAddress, IfaceVar string) bool {742+func (x *Socket) JoinMulticastGroupSsm(GroupVar *InetAddress, SourceSpecificVar *InetAddress, IfaceVar string) (bool, error) {
743+ var cerr *glib.Error
669 744
670- return xSocketJoinMulticastGroupSsm(x.GoPointer(), GroupVar.GoPointer(), SourceSpecificVar.GoPointer(), IfaceVar)745+ cret := xSocketJoinMulticastGroupSsm(x.GoPointer(), GroupVar.GoPointer(), SourceSpecificVar.GoPointer(), IfaceVar, &cerr)
746+ if cerr == nil {
747+ return cret, nil
748+ }
749+ return cret, cerr
671 750
672 }751 }
673 752
674-var xSocketLeaveMulticastGroup func(uintptr, uintptr, bool, string) bool753+var xSocketLeaveMulticastGroup func(uintptr, uintptr, bool, string, **glib.Error) bool
675 754
676 // Removes @socket from the multicast group defined by @group, @iface,755 // Removes @socket from the multicast group defined by @group, @iface,
677 // and @source_specific (which must all have the same values they had756 // and @source_specific (which must all have the same values they had
@@ -682,13 +761,18 @@ var xSocketLeaveMulticastGroup func(uintptr, uintptr, bool, string) bool
682 //761 //
683 // To unbind to a given source-specific multicast address, use762 // To unbind to a given source-specific multicast address, use
684 // g_socket_leave_multicast_group_ssm() instead.763 // g_socket_leave_multicast_group_ssm() instead.
685-func (x *Socket) LeaveMulticastGroup(GroupVar *InetAddress, SourceSpecificVar bool, IfaceVar string) bool {764+func (x *Socket) LeaveMulticastGroup(GroupVar *InetAddress, SourceSpecificVar bool, IfaceVar string) (bool, error) {
765+ var cerr *glib.Error
686 766
687- return xSocketLeaveMulticastGroup(x.GoPointer(), GroupVar.GoPointer(), SourceSpecificVar, IfaceVar)767+ cret := xSocketLeaveMulticastGroup(x.GoPointer(), GroupVar.GoPointer(), SourceSpecificVar, IfaceVar, &cerr)
768+ if cerr == nil {
769+ return cret, nil
770+ }
771+ return cret, cerr
688 772
689 }773 }
690 774
691-var xSocketLeaveMulticastGroupSsm func(uintptr, uintptr, uintptr, string) bool775+var xSocketLeaveMulticastGroupSsm func(uintptr, uintptr, uintptr, string, **glib.Error) bool
692 776
693 // Removes @socket from the multicast group defined by @group, @iface,777 // Removes @socket from the multicast group defined by @group, @iface,
694 // and @source_specific (which must all have the same values they had778 // and @source_specific (which must all have the same values they had
@@ -696,9 +780,14 @@ var xSocketLeaveMulticastGroupSsm func(uintptr, uintptr, uintptr, string) bool
696 //780 //
697 // @socket remains bound to its address and port, and can still receive781 // @socket remains bound to its address and port, and can still receive
698 // unicast messages after calling this.782 // unicast messages after calling this.
699-func (x *Socket) LeaveMulticastGroupSsm(GroupVar *InetAddress, SourceSpecificVar *InetAddress, IfaceVar string) bool {783+func (x *Socket) LeaveMulticastGroupSsm(GroupVar *InetAddress, SourceSpecificVar *InetAddress, IfaceVar string) (bool, error) {
784+ var cerr *glib.Error
700 785
701- return xSocketLeaveMulticastGroupSsm(x.GoPointer(), GroupVar.GoPointer(), SourceSpecificVar.GoPointer(), IfaceVar)786+ cret := xSocketLeaveMulticastGroupSsm(x.GoPointer(), GroupVar.GoPointer(), SourceSpecificVar.GoPointer(), IfaceVar, &cerr)
787+ if cerr == nil {
788+ return cret, nil
789+ }
790+ return cret, cerr
702 791
703 }792 }
704 793
@@ -712,13 +801,18 @@ var xSocketListen func(uintptr) bool
712 //801 //
713 // To set the maximum amount of outstanding clients, use802 // To set the maximum amount of outstanding clients, use
714 // g_socket_set_listen_backlog().803 // g_socket_set_listen_backlog().
715-func (x *Socket) Listen() bool {804+func (x *Socket) Listen() (bool, error) {
805+ var cerr *glib.Error
716 806
717- return xSocketListen(x.GoPointer())807+ cret := xSocketListen(x.GoPointer())
808+ if cerr == nil {
809+ return cret, nil
810+ }
811+ return cret, cerr
718 812
719 }813 }
720 814
721-var xSocketReceive func(uintptr, uintptr, uint, uintptr) int815+var xSocketReceive func(uintptr, uintptr, uint, uintptr, **glib.Error) int
722 816
723 // Receive data (up to @size bytes) from a socket. This is mainly used by817 // Receive data (up to @size bytes) from a socket. This is mainly used by
724 // connection-oriented sockets; it is identical to g_socket_receive_from()818 // connection-oriented sockets; it is identical to g_socket_receive_from()
@@ -743,13 +837,18 @@ var xSocketReceive func(uintptr, uintptr, uint, uintptr) int
743 // %G_IO_IN condition.837 // %G_IO_IN condition.
744 //838 //
745 // On error -1 is returned and @error is set accordingly.839 // On error -1 is returned and @error is set accordingly.
746-func (x *Socket) Receive(BufferVar uintptr, SizeVar uint, CancellableVar *Cancellable) int {840+func (x *Socket) Receive(BufferVar uintptr, SizeVar uint, CancellableVar *Cancellable) (int, error) {
841+ var cerr *glib.Error
747 842
748- return xSocketReceive(x.GoPointer(), BufferVar, SizeVar, CancellableVar.GoPointer())843+ cret := xSocketReceive(x.GoPointer(), BufferVar, SizeVar, CancellableVar.GoPointer(), &cerr)
844+ if cerr == nil {
845+ return cret, nil
846+ }
847+ return cret, cerr
749 848
750 }849 }
751 850
752-var xSocketReceiveFrom func(uintptr, *uintptr, uintptr, uint, uintptr) int851+var xSocketReceiveFrom func(uintptr, *uintptr, uintptr, uint, uintptr, **glib.Error) int
753 852
754 // Receive data (up to @size bytes) from a socket.853 // Receive data (up to @size bytes) from a socket.
755 //854 //
@@ -758,13 +857,18 @@ var xSocketReceiveFrom func(uintptr, *uintptr, uintptr, uint, uintptr) int
758 // @address is owned by the caller.857 // @address is owned by the caller.
759 //858 //
760 // See g_socket_receive() for additional information.859 // See g_socket_receive() for additional information.
761-func (x *Socket) ReceiveFrom(AddressVar **SocketAddress, BufferVar uintptr, SizeVar uint, CancellableVar *Cancellable) int {860+func (x *Socket) ReceiveFrom(AddressVar **SocketAddress, BufferVar uintptr, SizeVar uint, CancellableVar *Cancellable) (int, error) {
861+ var cerr *glib.Error
762 862
763- return xSocketReceiveFrom(x.GoPointer(), gobject.ConvertPtr(AddressVar), BufferVar, SizeVar, CancellableVar.GoPointer())863+ cret := xSocketReceiveFrom(x.GoPointer(), gobject.ConvertPtr(AddressVar), BufferVar, SizeVar, CancellableVar.GoPointer(), &cerr)
864+ if cerr == nil {
865+ return cret, nil
866+ }
867+ return cret, cerr
764 868
765 }869 }
766 870
767-var xSocketReceiveMessage func(uintptr, *uintptr, uintptr, int, uintptr, int, int, uintptr) int871+var xSocketReceiveMessage func(uintptr, *uintptr, uintptr, int, uintptr, int, int, uintptr, **glib.Error) int
768 872
769 // Receive data from a socket. For receiving multiple messages, see873 // Receive data from a socket. For receiving multiple messages, see
770 // g_socket_receive_messages(); for easier use, see874 // g_socket_receive_messages(); for easier use, see
@@ -825,13 +929,18 @@ var xSocketReceiveMessage func(uintptr, *uintptr, uintptr, int, uintptr, int, in
825 // %G_IO_IN condition.929 // %G_IO_IN condition.
826 //930 //
827 // On error -1 is returned and @error is set accordingly.931 // On error -1 is returned and @error is set accordingly.
828-func (x *Socket) ReceiveMessage(AddressVar **SocketAddress, VectorsVar uintptr, NumVectorsVar int, MessagesVar uintptr, NumMessagesVar int, FlagsVar int, CancellableVar *Cancellable) int {932+func (x *Socket) ReceiveMessage(AddressVar **SocketAddress, VectorsVar uintptr, NumVectorsVar int, MessagesVar uintptr, NumMessagesVar int, FlagsVar int, CancellableVar *Cancellable) (int, error) {
933+ var cerr *glib.Error
829 934
830- return xSocketReceiveMessage(x.GoPointer(), gobject.ConvertPtr(AddressVar), VectorsVar, NumVectorsVar, MessagesVar, NumMessagesVar, FlagsVar, CancellableVar.GoPointer())935+ cret := xSocketReceiveMessage(x.GoPointer(), gobject.ConvertPtr(AddressVar), VectorsVar, NumVectorsVar, MessagesVar, NumMessagesVar, FlagsVar, CancellableVar.GoPointer(), &cerr)
936+ if cerr == nil {
937+ return cret, nil
938+ }
939+ return cret, cerr
831 940
832 }941 }
833 942
834-var xSocketReceiveMessages func(uintptr, uintptr, uint, int, uintptr) int943+var xSocketReceiveMessages func(uintptr, uintptr, uint, int, uintptr, **glib.Error) int
835 944
836 // Receive multiple data messages from @socket in one go. This is the most945 // Receive multiple data messages from @socket in one go. This is the most
837 // complicated and fully-featured version of this call. For easier use, see946 // complicated and fully-featured version of this call. For easier use, see
@@ -881,24 +990,34 @@ var xSocketReceiveMessages func(uintptr, uintptr, uint, int, uintptr) int
881 // On error -1 is returned and @error is set accordingly. An error will only990 // On error -1 is returned and @error is set accordingly. An error will only
882 // be returned if zero messages could be received; otherwise the number of991 // be returned if zero messages could be received; otherwise the number of
883 // messages successfully received before the error will be returned.992 // messages successfully received before the error will be returned.
884-func (x *Socket) ReceiveMessages(MessagesVar uintptr, NumMessagesVar uint, FlagsVar int, CancellableVar *Cancellable) int {993+func (x *Socket) ReceiveMessages(MessagesVar uintptr, NumMessagesVar uint, FlagsVar int, CancellableVar *Cancellable) (int, error) {
994+ var cerr *glib.Error
885 995
886- return xSocketReceiveMessages(x.GoPointer(), MessagesVar, NumMessagesVar, FlagsVar, CancellableVar.GoPointer())996+ cret := xSocketReceiveMessages(x.GoPointer(), MessagesVar, NumMessagesVar, FlagsVar, CancellableVar.GoPointer(), &cerr)
997+ if cerr == nil {
998+ return cret, nil
999+ }
1000+ return cret, cerr
887 1001
888 }1002 }
889 1003
890-var xSocketReceiveWithBlocking func(uintptr, uintptr, uint, bool, uintptr) int1004+var xSocketReceiveWithBlocking func(uintptr, uintptr, uint, bool, uintptr, **glib.Error) int
891 1005
892 // This behaves exactly the same as g_socket_receive(), except that1006 // This behaves exactly the same as g_socket_receive(), except that
893 // the choice of blocking or non-blocking behavior is determined by1007 // the choice of blocking or non-blocking behavior is determined by
894 // the @blocking argument rather than by @socket's properties.1008 // the @blocking argument rather than by @socket's properties.
895-func (x *Socket) ReceiveWithBlocking(BufferVar uintptr, SizeVar uint, BlockingVar bool, CancellableVar *Cancellable) int {1009+func (x *Socket) ReceiveWithBlocking(BufferVar uintptr, SizeVar uint, BlockingVar bool, CancellableVar *Cancellable) (int, error) {
1010+ var cerr *glib.Error
896 1011
897- return xSocketReceiveWithBlocking(x.GoPointer(), BufferVar, SizeVar, BlockingVar, CancellableVar.GoPointer())1012+ cret := xSocketReceiveWithBlocking(x.GoPointer(), BufferVar, SizeVar, BlockingVar, CancellableVar.GoPointer(), &cerr)
1013+ if cerr == nil {
1014+ return cret, nil
1015+ }
1016+ return cret, cerr
898 1017
899 }1018 }
900 1019
901-var xSocketSend func(uintptr, uintptr, uint, uintptr) int1020+var xSocketSend func(uintptr, uintptr, uint, uintptr, **glib.Error) int
902 1021
903 // Tries to send @size bytes from @buffer on the socket. This is1022 // Tries to send @size bytes from @buffer on the socket. This is
904 // mainly used by connection-oriented sockets; it is identical to1023 // mainly used by connection-oriented sockets; it is identical to
@@ -914,13 +1033,18 @@ var xSocketSend func(uintptr, uintptr, uint, uintptr) int
914 // very common due to the way the underlying APIs work.)1033 // very common due to the way the underlying APIs work.)
915 //1034 //
916 // On error -1 is returned and @error is set accordingly.1035 // On error -1 is returned and @error is set accordingly.
917-func (x *Socket) Send(BufferVar uintptr, SizeVar uint, CancellableVar *Cancellable) int {1036+func (x *Socket) Send(BufferVar uintptr, SizeVar uint, CancellableVar *Cancellable) (int, error) {
1037+ var cerr *glib.Error
918 1038
919- return xSocketSend(x.GoPointer(), BufferVar, SizeVar, CancellableVar.GoPointer())1039+ cret := xSocketSend(x.GoPointer(), BufferVar, SizeVar, CancellableVar.GoPointer(), &cerr)
1040+ if cerr == nil {
1041+ return cret, nil
1042+ }
1043+ return cret, cerr
920 1044
921 }1045 }
922 1046
923-var xSocketSendMessage func(uintptr, uintptr, uintptr, int, uintptr, int, int, uintptr) int1047+var xSocketSendMessage func(uintptr, uintptr, uintptr, int, uintptr, int, int, uintptr, **glib.Error) int
924 1048
925 // Send data to @address on @socket. For sending multiple messages see1049 // Send data to @address on @socket. For sending multiple messages see
926 // g_socket_send_messages(); for easier use, see1050 // g_socket_send_messages(); for easier use, see
@@ -964,13 +1088,18 @@ var xSocketSendMessage func(uintptr, uintptr, uintptr, int, uintptr, int, int, u
964 // function.1088 // function.
965 //1089 //
966 // On error -1 is returned and @error is set accordingly.1090 // On error -1 is returned and @error is set accordingly.
967-func (x *Socket) SendMessage(AddressVar *SocketAddress, VectorsVar uintptr, NumVectorsVar int, MessagesVar uintptr, NumMessagesVar int, FlagsVar int, CancellableVar *Cancellable) int {1091+func (x *Socket) SendMessage(AddressVar *SocketAddress, VectorsVar uintptr, NumVectorsVar int, MessagesVar uintptr, NumMessagesVar int, FlagsVar int, CancellableVar *Cancellable) (int, error) {
1092+ var cerr *glib.Error
968 1093
969- return xSocketSendMessage(x.GoPointer(), AddressVar.GoPointer(), VectorsVar, NumVectorsVar, MessagesVar, NumMessagesVar, FlagsVar, CancellableVar.GoPointer())1094+ cret := xSocketSendMessage(x.GoPointer(), AddressVar.GoPointer(), VectorsVar, NumVectorsVar, MessagesVar, NumMessagesVar, FlagsVar, CancellableVar.GoPointer(), &cerr)
1095+ if cerr == nil {
1096+ return cret, nil
1097+ }
1098+ return cret, cerr
970 1099
971 }1100 }
972 1101
973-var xSocketSendMessageWithTimeout func(uintptr, uintptr, uintptr, int, uintptr, int, int, int64, uint, uintptr) PollableReturn1102+var xSocketSendMessageWithTimeout func(uintptr, uintptr, uintptr, int, uintptr, int, int, int64, uint, uintptr, **glib.Error) PollableReturn
974 1103
975 // This behaves exactly the same as g_socket_send_message(), except that1104 // This behaves exactly the same as g_socket_send_message(), except that
976 // the choice of timeout behavior is determined by the @timeout_us argument1105 // the choice of timeout behavior is determined by the @timeout_us argument
@@ -979,13 +1108,18 @@ var xSocketSendMessageWithTimeout func(uintptr, uintptr, uintptr, int, uintptr,
979 // On error %G_POLLABLE_RETURN_FAILED is returned and @error is set accordingly, or1108 // On error %G_POLLABLE_RETURN_FAILED is returned and @error is set accordingly, or
980 // if the socket is currently not writable %G_POLLABLE_RETURN_WOULD_BLOCK is1109 // if the socket is currently not writable %G_POLLABLE_RETURN_WOULD_BLOCK is
981 // returned. @bytes_written will contain 0 in both cases.1110 // returned. @bytes_written will contain 0 in both cases.
982-func (x *Socket) SendMessageWithTimeout(AddressVar *SocketAddress, VectorsVar uintptr, NumVectorsVar int, MessagesVar uintptr, NumMessagesVar int, FlagsVar int, TimeoutUsVar int64, BytesWrittenVar uint, CancellableVar *Cancellable) PollableReturn {1111+func (x *Socket) SendMessageWithTimeout(AddressVar *SocketAddress, VectorsVar uintptr, NumVectorsVar int, MessagesVar uintptr, NumMessagesVar int, FlagsVar int, TimeoutUsVar int64, BytesWrittenVar uint, CancellableVar *Cancellable) (PollableReturn, error) {
1112+ var cerr *glib.Error
983 1113
984- return xSocketSendMessageWithTimeout(x.GoPointer(), AddressVar.GoPointer(), VectorsVar, NumVectorsVar, MessagesVar, NumMessagesVar, FlagsVar, TimeoutUsVar, BytesWrittenVar, CancellableVar.GoPointer())1114+ cret := xSocketSendMessageWithTimeout(x.GoPointer(), AddressVar.GoPointer(), VectorsVar, NumVectorsVar, MessagesVar, NumMessagesVar, FlagsVar, TimeoutUsVar, BytesWrittenVar, CancellableVar.GoPointer(), &cerr)
1115+ if cerr == nil {
1116+ return cret, nil
1117+ }
1118+ return cret, cerr
985 1119
986 }1120 }
987 1121
988-var xSocketSendMessages func(uintptr, uintptr, uint, int, uintptr) int1122+var xSocketSendMessages func(uintptr, uintptr, uint, int, uintptr, **glib.Error) int
989 1123
990 // Send multiple data messages from @socket in one go. This is the most1124 // Send multiple data messages from @socket in one go. This is the most
991 // complicated and fully-featured version of this call. For easier use, see1125 // complicated and fully-featured version of this call. For easier use, see
@@ -1021,33 +1155,48 @@ var xSocketSendMessages func(uintptr, uintptr, uint, int, uintptr) int
1021 // On error -1 is returned and @error is set accordingly. An error will only1155 // On error -1 is returned and @error is set accordingly. An error will only
1022 // be returned if zero messages could be sent; otherwise the number of messages1156 // be returned if zero messages could be sent; otherwise the number of messages
1023 // successfully sent before the error will be returned.1157 // successfully sent before the error will be returned.
1024-func (x *Socket) SendMessages(MessagesVar uintptr, NumMessagesVar uint, FlagsVar int, CancellableVar *Cancellable) int {1158+func (x *Socket) SendMessages(MessagesVar uintptr, NumMessagesVar uint, FlagsVar int, CancellableVar *Cancellable) (int, error) {
1159+ var cerr *glib.Error
1025 1160
1026- return xSocketSendMessages(x.GoPointer(), MessagesVar, NumMessagesVar, FlagsVar, CancellableVar.GoPointer())1161+ cret := xSocketSendMessages(x.GoPointer(), MessagesVar, NumMessagesVar, FlagsVar, CancellableVar.GoPointer(), &cerr)
1162+ if cerr == nil {
1163+ return cret, nil
1164+ }
1165+ return cret, cerr
1027 1166
1028 }1167 }
1029 1168
1030-var xSocketSendTo func(uintptr, uintptr, uintptr, uint, uintptr) int1169+var xSocketSendTo func(uintptr, uintptr, uintptr, uint, uintptr, **glib.Error) int
1031 1170
1032 // Tries to send @size bytes from @buffer to @address. If @address is1171 // Tries to send @size bytes from @buffer to @address. If @address is
1033 // %NULL then the message is sent to the default receiver (set by1172 // %NULL then the message is sent to the default receiver (set by
1034 // g_socket_connect()).1173 // g_socket_connect()).
1035 //1174 //
1036 // See g_socket_send() for additional information.1175 // See g_socket_send() for additional information.
1037-func (x *Socket) SendTo(AddressVar *SocketAddress, BufferVar uintptr, SizeVar uint, CancellableVar *Cancellable) int {1176+func (x *Socket) SendTo(AddressVar *SocketAddress, BufferVar uintptr, SizeVar uint, CancellableVar *Cancellable) (int, error) {
1177+ var cerr *glib.Error
1038 1178
1039- return xSocketSendTo(x.GoPointer(), AddressVar.GoPointer(), BufferVar, SizeVar, CancellableVar.GoPointer())1179+ cret := xSocketSendTo(x.GoPointer(), AddressVar.GoPointer(), BufferVar, SizeVar, CancellableVar.GoPointer(), &cerr)
1180+ if cerr == nil {
1181+ return cret, nil
1182+ }
1183+ return cret, cerr
1040 1184
1041 }1185 }
1042 1186
1043-var xSocketSendWithBlocking func(uintptr, uintptr, uint, bool, uintptr) int1187+var xSocketSendWithBlocking func(uintptr, uintptr, uint, bool, uintptr, **glib.Error) int
1044 1188
1045 // This behaves exactly the same as g_socket_send(), except that1189 // This behaves exactly the same as g_socket_send(), except that
1046 // the choice of blocking or non-blocking behavior is determined by1190 // the choice of blocking or non-blocking behavior is determined by
1047 // the @blocking argument rather than by @socket's properties.1191 // the @blocking argument rather than by @socket's properties.
1048-func (x *Socket) SendWithBlocking(BufferVar uintptr, SizeVar uint, BlockingVar bool, CancellableVar *Cancellable) int {1192+func (x *Socket) SendWithBlocking(BufferVar uintptr, SizeVar uint, BlockingVar bool, CancellableVar *Cancellable) (int, error) {
1193+ var cerr *glib.Error
1049 1194
1050- return xSocketSendWithBlocking(x.GoPointer(), BufferVar, SizeVar, BlockingVar, CancellableVar.GoPointer())1195+ cret := xSocketSendWithBlocking(x.GoPointer(), BufferVar, SizeVar, BlockingVar, CancellableVar.GoPointer(), &cerr)
1196+ if cerr == nil {
1197+ return cret, nil
1198+ }
1199+ return cret, cerr
1051 1200
1052 }1201 }
1053 1202
@@ -1138,7 +1287,7 @@ func (x *Socket) SetMulticastTtl(TtlVar uint) {
1138 1287
1139 }1288 }
1140 1289
1141-var xSocketSetOption func(uintptr, int, int, int) bool1290+var xSocketSetOption func(uintptr, int, int, int, **glib.Error) bool
1142 1291
1143 // Sets the value of an integer-valued option on @socket, as with1292 // Sets the value of an integer-valued option on @socket, as with
1144 // setsockopt(). (If you need to set a non-integer-valued option,1293 // setsockopt(). (If you need to set a non-integer-valued option,
@@ -1149,9 +1298,14 @@ var xSocketSetOption func(uintptr, int, int, int) bool
1149 // standard/portable socket options. For unusual socket protocols or1298 // standard/portable socket options. For unusual socket protocols or
1150 // platform-dependent options, you may need to include additional1299 // platform-dependent options, you may need to include additional
1151 // headers.1300 // headers.
1152-func (x *Socket) SetOption(LevelVar int, OptnameVar int, ValueVar int) bool {1301+func (x *Socket) SetOption(LevelVar int, OptnameVar int, ValueVar int) (bool, error) {
1302+ var cerr *glib.Error
1153 1303
1154- return xSocketSetOption(x.GoPointer(), LevelVar, OptnameVar, ValueVar)1304+ cret := xSocketSetOption(x.GoPointer(), LevelVar, OptnameVar, ValueVar, &cerr)
1305+ if cerr == nil {
1306+ return cret, nil
1307+ }
1308+ return cret, cerr
1155 1309
1156 }1310 }
1157 1311
@@ -1193,7 +1347,7 @@ func (x *Socket) SetTtl(TtlVar uint) {
1193 1347
1194 }1348 }
1195 1349
1196-var xSocketShutdown func(uintptr, bool, bool) bool1350+var xSocketShutdown func(uintptr, bool, bool, **glib.Error) bool
1197 1351
1198 // Shut down part or all of a full-duplex connection.1352 // Shut down part or all of a full-duplex connection.
1199 //1353 //
@@ -1209,9 +1363,14 @@ var xSocketShutdown func(uintptr, bool, bool) bool
1209 // graceful disconnect for TCP connections where you close the sending side,1363 // graceful disconnect for TCP connections where you close the sending side,
1210 // then wait for the other side to close the connection, thus ensuring that the1364 // then wait for the other side to close the connection, thus ensuring that the
1211 // other side saw all sent data.1365 // other side saw all sent data.
1212-func (x *Socket) Shutdown(ShutdownReadVar bool, ShutdownWriteVar bool) bool {1366+func (x *Socket) Shutdown(ShutdownReadVar bool, ShutdownWriteVar bool) (bool, error) {
1367+ var cerr *glib.Error
1213 1368
1214- return xSocketShutdown(x.GoPointer(), ShutdownReadVar, ShutdownWriteVar)1369+ cret := xSocketShutdown(x.GoPointer(), ShutdownReadVar, ShutdownWriteVar, &cerr)
1370+ if cerr == nil {
1371+ return cret, nil
1372+ }
1373+ return cret, cerr
1215 1374
1216 }1375 }
1217 1376
@@ -1228,8 +1387,8 @@ var xSocketSpeaksIpv4 func(uintptr) bool
1228 // of speaking IPv4.1387 // of speaking IPv4.
1229 func (x *Socket) SpeaksIpv4() bool {1388 func (x *Socket) SpeaksIpv4() bool {
1230 1389
1231- return xSocketSpeaksIpv4(x.GoPointer())1390+ cret := xSocketSpeaksIpv4(x.GoPointer())
1232-1391+ return cret
1233 }1392 }
1234 1393
1235 func (c *Socket) GoPointer() uintptr {1394 func (c *Socket) GoPointer() uintptr {
@@ -1278,9 +1437,14 @@ func (c *Socket) SetGoPointer(ptr uintptr) {
1278 // In this pattern, a caller would expect to be able to call g_initable_init()1437 // In this pattern, a caller would expect to be able to call g_initable_init()
1279 // on the result of g_object_new(), regardless of whether it is in fact a new1438 // on the result of g_object_new(), regardless of whether it is in fact a new
1280 // instance.1439 // instance.
1281-func (x *Socket) Init(CancellableVar *Cancellable) bool {1440+func (x *Socket) Init(CancellableVar *Cancellable) (bool, error) {
1441+ var cerr *glib.Error
1282 1442
1283- return XGInitableInit(x.GoPointer(), CancellableVar.GoPointer())1443+ cret := XGInitableInit(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
1444+ if cerr == nil {
1445+ return cret, nil
1446+ }
1447+ return cret, cerr
1284 1448
1285 }1449 }
1286 1450
M v4/gio/gsocketaddress.go +40 -32
@@ -4,6 +4,7 @@ package gio
4 import (4 import (
5 "github.com/jwijenbergh/purego"5 "github.com/jwijenbergh/purego"
6 "github.com/jwijenbergh/puregotk/internal/core"6 "github.com/jwijenbergh/puregotk/internal/core"
7+ "github.com/jwijenbergh/puregotk/v4/glib"
7 "github.com/jwijenbergh/puregotk/v4/gobject"8 "github.com/jwijenbergh/puregotk/v4/gobject"
8 )9 )
9 10
@@ -29,14 +30,16 @@ var xNewFromNativeSocketAddress func(uintptr, uint) uintptr
29 // Creates a #GSocketAddress subclass corresponding to the native30 // Creates a #GSocketAddress subclass corresponding to the native
30 // struct sockaddr @native.31 // struct sockaddr @native.
31 func NewFromNativeSocketAddress(NativeVar uintptr, LenVar uint) *SocketAddress {32 func NewFromNativeSocketAddress(NativeVar uintptr, LenVar uint) *SocketAddress {
32- NewFromNativeSocketAddressPtr := xNewFromNativeSocketAddress(NativeVar, LenVar)33+ var cls *SocketAddress
33- if NewFromNativeSocketAddressPtr == 0 {34+
34- return nil35+ cret := xNewFromNativeSocketAddress(NativeVar, LenVar)
35- }
36 36
37- NewFromNativeSocketAddressCls := &SocketAddress{}37+ if cret == 0 {
38- NewFromNativeSocketAddressCls.Ptr = NewFromNativeSocketAddressPtr38+ return cls
39- return NewFromNativeSocketAddressCls39+ }
40+ cls = &SocketAddress{}
41+ cls.Ptr = cret
42+ return cls
40 }43 }
41 44
42 var xSocketAddressGetFamily func(uintptr) SocketFamily45 var xSocketAddressGetFamily func(uintptr) SocketFamily
@@ -44,8 +47,8 @@ var xSocketAddressGetFamily func(uintptr) SocketFamily
44 // Gets the socket family type of @address.47 // Gets the socket family type of @address.
45 func (x *SocketAddress) GetFamily() SocketFamily {48 func (x *SocketAddress) GetFamily() SocketFamily {
46 49
47- return xSocketAddressGetFamily(x.GoPointer())50+ cret := xSocketAddressGetFamily(x.GoPointer())
48-51+ return cret
49 }52 }
50 53
51 var xSocketAddressGetNativeSize func(uintptr) int54 var xSocketAddressGetNativeSize func(uintptr) int
@@ -55,11 +58,11 @@ var xSocketAddressGetNativeSize func(uintptr) int
55 // g_socket_address_to_native().58 // g_socket_address_to_native().
56 func (x *SocketAddress) GetNativeSize() int {59 func (x *SocketAddress) GetNativeSize() int {
57 60
58- return xSocketAddressGetNativeSize(x.GoPointer())61+ cret := xSocketAddressGetNativeSize(x.GoPointer())
59-62+ return cret
60 }63 }
61 64
62-var xSocketAddressToNative func(uintptr, uintptr, uint) bool65+var xSocketAddressToNative func(uintptr, uintptr, uint, **glib.Error) bool
63 66
64 // Converts a #GSocketAddress to a native struct sockaddr, which can67 // Converts a #GSocketAddress to a native struct sockaddr, which can
65 // be passed to low-level functions like connect() or bind().68 // be passed to low-level functions like connect() or bind().
@@ -67,9 +70,14 @@ var xSocketAddressToNative func(uintptr, uintptr, uint) bool
67 // If not enough space is available, a %G_IO_ERROR_NO_SPACE error70 // If not enough space is available, a %G_IO_ERROR_NO_SPACE error
68 // is returned. If the address type is not known on the system71 // is returned. If the address type is not known on the system
69 // then a %G_IO_ERROR_NOT_SUPPORTED error is returned.72 // then a %G_IO_ERROR_NOT_SUPPORTED error is returned.
70-func (x *SocketAddress) ToNative(DestVar uintptr, DestlenVar uint) bool {73+func (x *SocketAddress) ToNative(DestVar uintptr, DestlenVar uint) (bool, error) {
74+ var cerr *glib.Error
71 75
72- return xSocketAddressToNative(x.GoPointer(), DestVar, DestlenVar)76+ cret := xSocketAddressToNative(x.GoPointer(), DestVar, DestlenVar, &cerr)
77+ if cerr == nil {
78+ return cret, nil
79+ }
80+ return cret, cerr
73 81
74 }82 }
75 83
@@ -83,16 +91,16 @@ func (c *SocketAddress) SetGoPointer(ptr uintptr) {
83 91
84 // Creates a #GSocketAddressEnumerator for @connectable.92 // Creates a #GSocketAddressEnumerator for @connectable.
85 func (x *SocketAddress) Enumerate() *SocketAddressEnumerator {93 func (x *SocketAddress) Enumerate() *SocketAddressEnumerator {
94+ var cls *SocketAddressEnumerator
86 95
87- EnumeratePtr := XGSocketConnectableEnumerate(x.GoPointer())96+ cret := XGSocketConnectableEnumerate(x.GoPointer())
88- if EnumeratePtr == 0 {
89- return nil
90- }
91-
92- EnumerateCls := &SocketAddressEnumerator{}
93- EnumerateCls.Ptr = EnumeratePtr
94- return EnumerateCls
95 97
98+ if cret == 0 {
99+ return cls
100+ }
101+ cls = &SocketAddressEnumerator{}
102+ cls.Ptr = cret
103+ return cls
96 }104 }
97 105
98 // Creates a #GSocketAddressEnumerator for @connectable that will106 // Creates a #GSocketAddressEnumerator for @connectable that will
@@ -103,16 +111,16 @@ func (x *SocketAddress) Enumerate() *SocketAddressEnumerator {
103 // g_socket_connectable_proxy_enumerate(), this will fall back to111 // g_socket_connectable_proxy_enumerate(), this will fall back to
104 // calling g_socket_connectable_enumerate().112 // calling g_socket_connectable_enumerate().
105 func (x *SocketAddress) ProxyEnumerate() *SocketAddressEnumerator {113 func (x *SocketAddress) ProxyEnumerate() *SocketAddressEnumerator {
114+ var cls *SocketAddressEnumerator
106 115
107- ProxyEnumeratePtr := XGSocketConnectableProxyEnumerate(x.GoPointer())116+ cret := XGSocketConnectableProxyEnumerate(x.GoPointer())
108- if ProxyEnumeratePtr == 0 {
109- return nil
110- }
111-
112- ProxyEnumerateCls := &SocketAddressEnumerator{}
113- ProxyEnumerateCls.Ptr = ProxyEnumeratePtr
114- return ProxyEnumerateCls
115 117
118+ if cret == 0 {
119+ return cls
120+ }
121+ cls = &SocketAddressEnumerator{}
122+ cls.Ptr = cret
123+ return cls
116 }124 }
117 125
118 // Format a #GSocketConnectable as a string. This is a human-readable format for126 // Format a #GSocketConnectable as a string. This is a human-readable format for
@@ -124,8 +132,8 @@ func (x *SocketAddress) ProxyEnumerate() *SocketAddressEnumerator {
124 // the implementation’s type name will be returned as a fallback.132 // the implementation’s type name will be returned as a fallback.
125 func (x *SocketAddress) ToString() string {133 func (x *SocketAddress) ToString() string {
126 134
127- return XGSocketConnectableToString(x.GoPointer())135+ cret := XGSocketConnectableToString(x.GoPointer())
128-136+ return cret
129 }137 }
130 138
131 func init() {139 func init() {
M v4/gio/gsocketaddressenumerator.go +29 -18
@@ -4,6 +4,7 @@ package gio
4 import (4 import (
5 "github.com/jwijenbergh/purego"5 "github.com/jwijenbergh/purego"
6 "github.com/jwijenbergh/puregotk/internal/core"6 "github.com/jwijenbergh/puregotk/internal/core"
7+ "github.com/jwijenbergh/puregotk/v4/glib"
7 "github.com/jwijenbergh/puregotk/v4/gobject"8 "github.com/jwijenbergh/puregotk/v4/gobject"
8 )9 )
9 10
@@ -36,7 +37,7 @@ func SocketAddressEnumeratorNewFromInternalPtr(ptr uintptr) *SocketAddressEnumer
36 return cls37 return cls
37 }38 }
38 39
39-var xSocketAddressEnumeratorNext func(uintptr, uintptr) uintptr40+var xSocketAddressEnumeratorNext func(uintptr, uintptr, **glib.Error) uintptr
40 41
41 // Retrieves the next #GSocketAddress from @enumerator. Note that this42 // Retrieves the next #GSocketAddress from @enumerator. Note that this
42 // may block for some amount of time. (Eg, a #GNetworkAddress may need43 // may block for some amount of time. (Eg, a #GNetworkAddress may need
@@ -51,16 +52,21 @@ var xSocketAddressEnumeratorNext func(uintptr, uintptr) uintptr
51 // g_socket_address_enumerator_next() succeeds, then any further52 // g_socket_address_enumerator_next() succeeds, then any further
52 // internal errors (other than @cancellable being triggered) will be53 // internal errors (other than @cancellable being triggered) will be
53 // ignored.54 // ignored.
54-func (x *SocketAddressEnumerator) Next(CancellableVar *Cancellable) *SocketAddress {55+func (x *SocketAddressEnumerator) Next(CancellableVar *Cancellable) (*SocketAddress, error) {
56+ var cls *SocketAddress
57+ var cerr *glib.Error
55 58
56- NextPtr := xSocketAddressEnumeratorNext(x.GoPointer(), CancellableVar.GoPointer())59+ cret := xSocketAddressEnumeratorNext(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
57- if NextPtr == 0 {
58- return nil
59- }
60 60
61- NextCls := &SocketAddress{}61+ if cret == 0 {
62- NextCls.Ptr = NextPtr62+ return cls, cerr
63- return NextCls63+ }
64+ cls = &SocketAddress{}
65+ cls.Ptr = cret
66+ if cerr == nil {
67+ return cls, nil
68+ }
69+ return cls, cerr
64 70
65 }71 }
66 72
@@ -77,22 +83,27 @@ func (x *SocketAddressEnumerator) NextAsync(CancellableVar *Cancellable, Callbac
77 83
78 }84 }
79 85
80-var xSocketAddressEnumeratorNextFinish func(uintptr, uintptr) uintptr86+var xSocketAddressEnumeratorNextFinish func(uintptr, uintptr, **glib.Error) uintptr
81 87
82 // Retrieves the result of a completed call to88 // Retrieves the result of a completed call to
83 // g_socket_address_enumerator_next_async(). See89 // g_socket_address_enumerator_next_async(). See
84 // g_socket_address_enumerator_next() for more information about90 // g_socket_address_enumerator_next() for more information about
85 // error handling.91 // error handling.
86-func (x *SocketAddressEnumerator) NextFinish(ResultVar AsyncResult) *SocketAddress {92+func (x *SocketAddressEnumerator) NextFinish(ResultVar AsyncResult) (*SocketAddress, error) {
93+ var cls *SocketAddress
94+ var cerr *glib.Error
87 95
88- NextFinishPtr := xSocketAddressEnumeratorNextFinish(x.GoPointer(), ResultVar.GoPointer())96+ cret := xSocketAddressEnumeratorNextFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
89- if NextFinishPtr == 0 {
90- return nil
91- }
92 97
93- NextFinishCls := &SocketAddress{}98+ if cret == 0 {
94- NextFinishCls.Ptr = NextFinishPtr99+ return cls, cerr
95- return NextFinishCls100+ }
101+ cls = &SocketAddress{}
102+ cls.Ptr = cret
103+ if cerr == nil {
104+ return cls, nil
105+ }
106+ return cls, cerr
96 107
97 }108 }
98 109
M v4/gio/gsocketclient.go +154 -113
@@ -4,6 +4,7 @@ package gio
4 import (4 import (
5 "github.com/jwijenbergh/purego"5 "github.com/jwijenbergh/purego"
6 "github.com/jwijenbergh/puregotk/internal/core"6 "github.com/jwijenbergh/puregotk/internal/core"
7+ "github.com/jwijenbergh/puregotk/v4/glib"
7 "github.com/jwijenbergh/puregotk/v4/gobject"8 "github.com/jwijenbergh/puregotk/v4/gobject"
8 )9 )
9 10
@@ -41,14 +42,16 @@ var xNewSocketClient func() uintptr
41 42
42 // Creates a new #GSocketClient with the default options.43 // Creates a new #GSocketClient with the default options.
43 func NewSocketClient() *SocketClient {44 func NewSocketClient() *SocketClient {
44- NewSocketClientPtr := xNewSocketClient()45+ var cls *SocketClient
45- if NewSocketClientPtr == 0 {46+
46- return nil47+ cret := xNewSocketClient()
47- }
48 48
49- NewSocketClientCls := &SocketClient{}49+ if cret == 0 {
50- NewSocketClientCls.Ptr = NewSocketClientPtr50+ return cls
51- return NewSocketClientCls51+ }
52+ cls = &SocketClient{}
53+ cls.Ptr = cret
54+ return cls
52 }55 }
53 56
54 var xSocketClientAddApplicationProxy func(uintptr, string)57 var xSocketClientAddApplicationProxy func(uintptr, string)
@@ -78,7 +81,7 @@ func (x *SocketClient) AddApplicationProxy(ProtocolVar string) {
78 81
79 }82 }
80 83
81-var xSocketClientConnect func(uintptr, uintptr, uintptr) uintptr84+var xSocketClientConnect func(uintptr, uintptr, uintptr, **glib.Error) uintptr
82 85
83 // Tries to resolve the @connectable and make a network connection to it.86 // Tries to resolve the @connectable and make a network connection to it.
84 //87 //
@@ -98,16 +101,21 @@ var xSocketClientConnect func(uintptr, uintptr, uintptr) uintptr
98 //101 //
99 // If a local address is specified with g_socket_client_set_local_address() the102 // If a local address is specified with g_socket_client_set_local_address() the
100 // socket will be bound to this address before connecting.103 // socket will be bound to this address before connecting.
101-func (x *SocketClient) Connect(ConnectableVar SocketConnectable, CancellableVar *Cancellable) *SocketConnection {104+func (x *SocketClient) Connect(ConnectableVar SocketConnectable, CancellableVar *Cancellable) (*SocketConnection, error) {
105+ var cls *SocketConnection
106+ var cerr *glib.Error
102 107
103- ConnectPtr := xSocketClientConnect(x.GoPointer(), ConnectableVar.GoPointer(), CancellableVar.GoPointer())108+ cret := xSocketClientConnect(x.GoPointer(), ConnectableVar.GoPointer(), CancellableVar.GoPointer(), &cerr)
104- if ConnectPtr == 0 {
105- return nil
106- }
107 109
108- ConnectCls := &SocketConnection{}110+ if cret == 0 {
109- ConnectCls.Ptr = ConnectPtr111+ return cls, cerr
110- return ConnectCls112+ }
113+ cls = &SocketConnection{}
114+ cls.Ptr = cret
115+ if cerr == nil {
116+ return cls, nil
117+ }
118+ return cls, cerr
111 119
112 }120 }
113 121
@@ -133,23 +141,28 @@ func (x *SocketClient) ConnectAsync(ConnectableVar SocketConnectable, Cancellabl
133 141
134 }142 }
135 143
136-var xSocketClientConnectFinish func(uintptr, uintptr) uintptr144+var xSocketClientConnectFinish func(uintptr, uintptr, **glib.Error) uintptr
137 145
138 // Finishes an async connect operation. See g_socket_client_connect_async()146 // Finishes an async connect operation. See g_socket_client_connect_async()
139-func (x *SocketClient) ConnectFinish(ResultVar AsyncResult) *SocketConnection {147+func (x *SocketClient) ConnectFinish(ResultVar AsyncResult) (*SocketConnection, error) {
148+ var cls *SocketConnection
149+ var cerr *glib.Error
140 150
141- ConnectFinishPtr := xSocketClientConnectFinish(x.GoPointer(), ResultVar.GoPointer())151+ cret := xSocketClientConnectFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
142- if ConnectFinishPtr == 0 {
143- return nil
144- }
145 152
146- ConnectFinishCls := &SocketConnection{}153+ if cret == 0 {
147- ConnectFinishCls.Ptr = ConnectFinishPtr154+ return cls, cerr
148- return ConnectFinishCls155+ }
156+ cls = &SocketConnection{}
157+ cls.Ptr = cret
158+ if cerr == nil {
159+ return cls, nil
160+ }
161+ return cls, cerr
149 162
150 }163 }
151 164
152-var xSocketClientConnectToHost func(uintptr, string, uint16, uintptr) uintptr165+var xSocketClientConnectToHost func(uintptr, string, uint16, uintptr, **glib.Error) uintptr
153 166
154 // This is a helper function for g_socket_client_connect().167 // This is a helper function for g_socket_client_connect().
155 //168 //
@@ -181,16 +194,21 @@ var xSocketClientConnectToHost func(uintptr, string, uint16, uintptr) uintptr
181 // In the event of any failure (DNS error, service not found, no hosts194 // In the event of any failure (DNS error, service not found, no hosts
182 // connectable) %NULL is returned and @error (if non-%NULL) is set195 // connectable) %NULL is returned and @error (if non-%NULL) is set
183 // accordingly.196 // accordingly.
184-func (x *SocketClient) ConnectToHost(HostAndPortVar string, DefaultPortVar uint16, CancellableVar *Cancellable) *SocketConnection {197+func (x *SocketClient) ConnectToHost(HostAndPortVar string, DefaultPortVar uint16, CancellableVar *Cancellable) (*SocketConnection, error) {
198+ var cls *SocketConnection
199+ var cerr *glib.Error
185 200
186- ConnectToHostPtr := xSocketClientConnectToHost(x.GoPointer(), HostAndPortVar, DefaultPortVar, CancellableVar.GoPointer())201+ cret := xSocketClientConnectToHost(x.GoPointer(), HostAndPortVar, DefaultPortVar, CancellableVar.GoPointer(), &cerr)
187- if ConnectToHostPtr == 0 {
188- return nil
189- }
190 202
191- ConnectToHostCls := &SocketConnection{}203+ if cret == 0 {
192- ConnectToHostCls.Ptr = ConnectToHostPtr204+ return cls, cerr
193- return ConnectToHostCls205+ }
206+ cls = &SocketConnection{}
207+ cls.Ptr = cret
208+ if cerr == nil {
209+ return cls, nil
210+ }
211+ return cls, cerr
194 212
195 }213 }
196 214
@@ -207,23 +225,28 @@ func (x *SocketClient) ConnectToHostAsync(HostAndPortVar string, DefaultPortVar
207 225
208 }226 }
209 227
210-var xSocketClientConnectToHostFinish func(uintptr, uintptr) uintptr228+var xSocketClientConnectToHostFinish func(uintptr, uintptr, **glib.Error) uintptr
211 229
212 // Finishes an async connect operation. See g_socket_client_connect_to_host_async()230 // Finishes an async connect operation. See g_socket_client_connect_to_host_async()
213-func (x *SocketClient) ConnectToHostFinish(ResultVar AsyncResult) *SocketConnection {231+func (x *SocketClient) ConnectToHostFinish(ResultVar AsyncResult) (*SocketConnection, error) {
232+ var cls *SocketConnection
233+ var cerr *glib.Error
214 234
215- ConnectToHostFinishPtr := xSocketClientConnectToHostFinish(x.GoPointer(), ResultVar.GoPointer())235+ cret := xSocketClientConnectToHostFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
216- if ConnectToHostFinishPtr == 0 {
217- return nil
218- }
219 236
220- ConnectToHostFinishCls := &SocketConnection{}237+ if cret == 0 {
221- ConnectToHostFinishCls.Ptr = ConnectToHostFinishPtr238+ return cls, cerr
222- return ConnectToHostFinishCls239+ }
240+ cls = &SocketConnection{}
241+ cls.Ptr = cret
242+ if cerr == nil {
243+ return cls, nil
244+ }
245+ return cls, cerr
223 246
224 }247 }
225 248
226-var xSocketClientConnectToService func(uintptr, string, string, uintptr) uintptr249+var xSocketClientConnectToService func(uintptr, string, string, uintptr, **glib.Error) uintptr
227 250
228 // Attempts to create a TCP connection to a service.251 // Attempts to create a TCP connection to a service.
229 //252 //
@@ -239,16 +262,21 @@ var xSocketClientConnectToService func(uintptr, string, string, uintptr) uintptr
239 // In the event of any failure (DNS error, service not found, no hosts262 // In the event of any failure (DNS error, service not found, no hosts
240 // connectable) %NULL is returned and @error (if non-%NULL) is set263 // connectable) %NULL is returned and @error (if non-%NULL) is set
241 // accordingly.264 // accordingly.
242-func (x *SocketClient) ConnectToService(DomainVar string, ServiceVar string, CancellableVar *Cancellable) *SocketConnection {265+func (x *SocketClient) ConnectToService(DomainVar string, ServiceVar string, CancellableVar *Cancellable) (*SocketConnection, error) {
266+ var cls *SocketConnection
267+ var cerr *glib.Error
243 268
244- ConnectToServicePtr := xSocketClientConnectToService(x.GoPointer(), DomainVar, ServiceVar, CancellableVar.GoPointer())269+ cret := xSocketClientConnectToService(x.GoPointer(), DomainVar, ServiceVar, CancellableVar.GoPointer(), &cerr)
245- if ConnectToServicePtr == 0 {
246- return nil
247- }
248 270
249- ConnectToServiceCls := &SocketConnection{}271+ if cret == 0 {
250- ConnectToServiceCls.Ptr = ConnectToServicePtr272+ return cls, cerr
251- return ConnectToServiceCls273+ }
274+ cls = &SocketConnection{}
275+ cls.Ptr = cret
276+ if cerr == nil {
277+ return cls, nil
278+ }
279+ return cls, cerr
252 280
253 }281 }
254 282
@@ -262,23 +290,28 @@ func (x *SocketClient) ConnectToServiceAsync(DomainVar string, ServiceVar string
262 290
263 }291 }
264 292
265-var xSocketClientConnectToServiceFinish func(uintptr, uintptr) uintptr293+var xSocketClientConnectToServiceFinish func(uintptr, uintptr, **glib.Error) uintptr
266 294
267 // Finishes an async connect operation. See g_socket_client_connect_to_service_async()295 // Finishes an async connect operation. See g_socket_client_connect_to_service_async()
268-func (x *SocketClient) ConnectToServiceFinish(ResultVar AsyncResult) *SocketConnection {296+func (x *SocketClient) ConnectToServiceFinish(ResultVar AsyncResult) (*SocketConnection, error) {
297+ var cls *SocketConnection
298+ var cerr *glib.Error
269 299
270- ConnectToServiceFinishPtr := xSocketClientConnectToServiceFinish(x.GoPointer(), ResultVar.GoPointer())300+ cret := xSocketClientConnectToServiceFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
271- if ConnectToServiceFinishPtr == 0 {
272- return nil
273- }
274 301
275- ConnectToServiceFinishCls := &SocketConnection{}302+ if cret == 0 {
276- ConnectToServiceFinishCls.Ptr = ConnectToServiceFinishPtr303+ return cls, cerr
277- return ConnectToServiceFinishCls304+ }
305+ cls = &SocketConnection{}
306+ cls.Ptr = cret
307+ if cerr == nil {
308+ return cls, nil
309+ }
310+ return cls, cerr
278 311
279 }312 }
280 313
281-var xSocketClientConnectToUri func(uintptr, string, uint16, uintptr) uintptr314+var xSocketClientConnectToUri func(uintptr, string, uint16, uintptr, **glib.Error) uintptr
282 315
283 // This is a helper function for g_socket_client_connect().316 // This is a helper function for g_socket_client_connect().
284 //317 //
@@ -301,16 +334,21 @@ var xSocketClientConnectToUri func(uintptr, string, uint16, uintptr) uintptr
301 // In the event of any failure (DNS error, service not found, no hosts334 // In the event of any failure (DNS error, service not found, no hosts
302 // connectable) %NULL is returned and @error (if non-%NULL) is set335 // connectable) %NULL is returned and @error (if non-%NULL) is set
303 // accordingly.336 // accordingly.
304-func (x *SocketClient) ConnectToUri(UriVar string, DefaultPortVar uint16, CancellableVar *Cancellable) *SocketConnection {337+func (x *SocketClient) ConnectToUri(UriVar string, DefaultPortVar uint16, CancellableVar *Cancellable) (*SocketConnection, error) {
338+ var cls *SocketConnection
339+ var cerr *glib.Error
305 340
306- ConnectToUriPtr := xSocketClientConnectToUri(x.GoPointer(), UriVar, DefaultPortVar, CancellableVar.GoPointer())341+ cret := xSocketClientConnectToUri(x.GoPointer(), UriVar, DefaultPortVar, CancellableVar.GoPointer(), &cerr)
307- if ConnectToUriPtr == 0 {
308- return nil
309- }
310 342
311- ConnectToUriCls := &SocketConnection{}343+ if cret == 0 {
312- ConnectToUriCls.Ptr = ConnectToUriPtr344+ return cls, cerr
313- return ConnectToUriCls345+ }
346+ cls = &SocketConnection{}
347+ cls.Ptr = cret
348+ if cerr == nil {
349+ return cls, nil
350+ }
351+ return cls, cerr
314 352
315 }353 }
316 354
@@ -327,19 +365,24 @@ func (x *SocketClient) ConnectToUriAsync(UriVar string, DefaultPortVar uint16, C
327 365
328 }366 }
329 367
330-var xSocketClientConnectToUriFinish func(uintptr, uintptr) uintptr368+var xSocketClientConnectToUriFinish func(uintptr, uintptr, **glib.Error) uintptr
331 369
332 // Finishes an async connect operation. See g_socket_client_connect_to_uri_async()370 // Finishes an async connect operation. See g_socket_client_connect_to_uri_async()
333-func (x *SocketClient) ConnectToUriFinish(ResultVar AsyncResult) *SocketConnection {371+func (x *SocketClient) ConnectToUriFinish(ResultVar AsyncResult) (*SocketConnection, error) {
372+ var cls *SocketConnection
373+ var cerr *glib.Error
334 374
335- ConnectToUriFinishPtr := xSocketClientConnectToUriFinish(x.GoPointer(), ResultVar.GoPointer())375+ cret := xSocketClientConnectToUriFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
336- if ConnectToUriFinishPtr == 0 {
337- return nil
338- }
339 376
340- ConnectToUriFinishCls := &SocketConnection{}377+ if cret == 0 {
341- ConnectToUriFinishCls.Ptr = ConnectToUriFinishPtr378+ return cls, cerr
342- return ConnectToUriFinishCls379+ }
380+ cls = &SocketConnection{}
381+ cls.Ptr = cret
382+ if cerr == nil {
383+ return cls, nil
384+ }
385+ return cls, cerr
343 386
344 }387 }
345 388
@@ -348,8 +391,8 @@ var xSocketClientGetEnableProxy func(uintptr) bool
348 // Gets the proxy enable state; see g_socket_client_set_enable_proxy()391 // Gets the proxy enable state; see g_socket_client_set_enable_proxy()
349 func (x *SocketClient) GetEnableProxy() bool {392 func (x *SocketClient) GetEnableProxy() bool {
350 393
351- return xSocketClientGetEnableProxy(x.GoPointer())394+ cret := xSocketClientGetEnableProxy(x.GoPointer())
352-395+ return cret
353 }396 }
354 397
355 var xSocketClientGetFamily func(uintptr) SocketFamily398 var xSocketClientGetFamily func(uintptr) SocketFamily
@@ -359,8 +402,8 @@ var xSocketClientGetFamily func(uintptr) SocketFamily
359 // See g_socket_client_set_family() for details.402 // See g_socket_client_set_family() for details.
360 func (x *SocketClient) GetFamily() SocketFamily {403 func (x *SocketClient) GetFamily() SocketFamily {
361 404
362- return xSocketClientGetFamily(x.GoPointer())405+ cret := xSocketClientGetFamily(x.GoPointer())
363-406+ return cret
364 }407 }
365 408
366 var xSocketClientGetLocalAddress func(uintptr) uintptr409 var xSocketClientGetLocalAddress func(uintptr) uintptr
@@ -369,18 +412,17 @@ var xSocketClientGetLocalAddress func(uintptr) uintptr
369 //412 //
370 // See g_socket_client_set_local_address() for details.413 // See g_socket_client_set_local_address() for details.
371 func (x *SocketClient) GetLocalAddress() *SocketAddress {414 func (x *SocketClient) GetLocalAddress() *SocketAddress {
415+ var cls *SocketAddress
372 416
373- GetLocalAddressPtr := xSocketClientGetLocalAddress(x.GoPointer())417+ cret := xSocketClientGetLocalAddress(x.GoPointer())
374- if GetLocalAddressPtr == 0 {
375- return nil
376- }
377-
378- gobject.IncreaseRef(GetLocalAddressPtr)
379-
380- GetLocalAddressCls := &SocketAddress{}
381- GetLocalAddressCls.Ptr = GetLocalAddressPtr
382- return GetLocalAddressCls
383 418
419+ if cret == 0 {
420+ return cls
421+ }
422+ gobject.IncreaseRef(cret)
423+ cls = &SocketAddress{}
424+ cls.Ptr = cret
425+ return cls
384 }426 }
385 427
386 var xSocketClientGetProtocol func(uintptr) SocketProtocol428 var xSocketClientGetProtocol func(uintptr) SocketProtocol
@@ -390,8 +432,8 @@ var xSocketClientGetProtocol func(uintptr) SocketProtocol
390 // See g_socket_client_set_protocol() for details.432 // See g_socket_client_set_protocol() for details.
391 func (x *SocketClient) GetProtocol() SocketProtocol {433 func (x *SocketClient) GetProtocol() SocketProtocol {
392 434
393- return xSocketClientGetProtocol(x.GoPointer())435+ cret := xSocketClientGetProtocol(x.GoPointer())
394-436+ return cret
395 }437 }
396 438
397 var xSocketClientGetProxyResolver func(uintptr) uintptr439 var xSocketClientGetProxyResolver func(uintptr) uintptr
@@ -400,18 +442,17 @@ var xSocketClientGetProxyResolver func(uintptr) uintptr
400 // be the resolver returned by g_proxy_resolver_get_default(), but you442 // be the resolver returned by g_proxy_resolver_get_default(), but you
401 // can override it with g_socket_client_set_proxy_resolver().443 // can override it with g_socket_client_set_proxy_resolver().
402 func (x *SocketClient) GetProxyResolver() *ProxyResolverBase {444 func (x *SocketClient) GetProxyResolver() *ProxyResolverBase {
445+ var cls *ProxyResolverBase
403 446
404- GetProxyResolverPtr := xSocketClientGetProxyResolver(x.GoPointer())447+ cret := xSocketClientGetProxyResolver(x.GoPointer())
405- if GetProxyResolverPtr == 0 {
406- return nil
407- }
408-
409- gobject.IncreaseRef(GetProxyResolverPtr)
410-
411- GetProxyResolverCls := &ProxyResolverBase{}
412- GetProxyResolverCls.Ptr = GetProxyResolverPtr
413- return GetProxyResolverCls
414 448
449+ if cret == 0 {
450+ return cls
451+ }
452+ gobject.IncreaseRef(cret)
453+ cls = &ProxyResolverBase{}
454+ cls.Ptr = cret
455+ return cls
415 }456 }
416 457
417 var xSocketClientGetSocketType func(uintptr) SocketType458 var xSocketClientGetSocketType func(uintptr) SocketType
@@ -421,8 +462,8 @@ var xSocketClientGetSocketType func(uintptr) SocketType
421 // See g_socket_client_set_socket_type() for details.462 // See g_socket_client_set_socket_type() for details.
422 func (x *SocketClient) GetSocketType() SocketType {463 func (x *SocketClient) GetSocketType() SocketType {
423 464
424- return xSocketClientGetSocketType(x.GoPointer())465+ cret := xSocketClientGetSocketType(x.GoPointer())
425-466+ return cret
426 }467 }
427 468
428 var xSocketClientGetTimeout func(uintptr) uint469 var xSocketClientGetTimeout func(uintptr) uint
@@ -432,8 +473,8 @@ var xSocketClientGetTimeout func(uintptr) uint
432 // See g_socket_client_set_timeout() for details.473 // See g_socket_client_set_timeout() for details.
433 func (x *SocketClient) GetTimeout() uint {474 func (x *SocketClient) GetTimeout() uint {
434 475
435- return xSocketClientGetTimeout(x.GoPointer())476+ cret := xSocketClientGetTimeout(x.GoPointer())
436-477+ return cret
437 }478 }
438 479
439 var xSocketClientGetTls func(uintptr) bool480 var xSocketClientGetTls func(uintptr) bool
@@ -442,8 +483,8 @@ var xSocketClientGetTls func(uintptr) bool
442 // g_socket_client_set_tls() for details.483 // g_socket_client_set_tls() for details.
443 func (x *SocketClient) GetTls() bool {484 func (x *SocketClient) GetTls() bool {
444 485
445- return xSocketClientGetTls(x.GoPointer())486+ cret := xSocketClientGetTls(x.GoPointer())
446-487+ return cret
447 }488 }
448 489
449 var xSocketClientGetTlsValidationFlags func(uintptr) TlsCertificateFlags490 var xSocketClientGetTlsValidationFlags func(uintptr) TlsCertificateFlags
@@ -456,8 +497,8 @@ var xSocketClientGetTlsValidationFlags func(uintptr) TlsCertificateFlags
456 // information.497 // information.
457 func (x *SocketClient) GetTlsValidationFlags() TlsCertificateFlags {498 func (x *SocketClient) GetTlsValidationFlags() TlsCertificateFlags {
458 499
459- return xSocketClientGetTlsValidationFlags(x.GoPointer())500+ cret := xSocketClientGetTlsValidationFlags(x.GoPointer())
460-501+ return cret
461 }502 }
462 503
463 var xSocketClientSetEnableProxy func(uintptr, bool)504 var xSocketClientSetEnableProxy func(uintptr, bool)
M v4/gio/gsocketconnectable.go +18 -18
@@ -93,16 +93,16 @@ func (x *SocketConnectableBase) SetGoPointer(ptr uintptr) {
93 93
94 // Creates a #GSocketAddressEnumerator for @connectable.94 // Creates a #GSocketAddressEnumerator for @connectable.
95 func (x *SocketConnectableBase) Enumerate() *SocketAddressEnumerator {95 func (x *SocketConnectableBase) Enumerate() *SocketAddressEnumerator {
96+ var cls *SocketAddressEnumerator
96 97
97- EnumeratePtr := XGSocketConnectableEnumerate(x.GoPointer())98+ cret := XGSocketConnectableEnumerate(x.GoPointer())
98- if EnumeratePtr == 0 {
99- return nil
100- }
101-
102- EnumerateCls := &SocketAddressEnumerator{}
103- EnumerateCls.Ptr = EnumeratePtr
104- return EnumerateCls
105 99
100+ if cret == 0 {
101+ return cls
102+ }
103+ cls = &SocketAddressEnumerator{}
104+ cls.Ptr = cret
105+ return cls
106 }106 }
107 107
108 // Creates a #GSocketAddressEnumerator for @connectable that will108 // Creates a #GSocketAddressEnumerator for @connectable that will
@@ -113,16 +113,16 @@ func (x *SocketConnectableBase) Enumerate() *SocketAddressEnumerator {
113 // g_socket_connectable_proxy_enumerate(), this will fall back to113 // g_socket_connectable_proxy_enumerate(), this will fall back to
114 // calling g_socket_connectable_enumerate().114 // calling g_socket_connectable_enumerate().
115 func (x *SocketConnectableBase) ProxyEnumerate() *SocketAddressEnumerator {115 func (x *SocketConnectableBase) ProxyEnumerate() *SocketAddressEnumerator {
116+ var cls *SocketAddressEnumerator
116 117
117- ProxyEnumeratePtr := XGSocketConnectableProxyEnumerate(x.GoPointer())118+ cret := XGSocketConnectableProxyEnumerate(x.GoPointer())
118- if ProxyEnumeratePtr == 0 {
119- return nil
120- }
121-
122- ProxyEnumerateCls := &SocketAddressEnumerator{}
123- ProxyEnumerateCls.Ptr = ProxyEnumeratePtr
124- return ProxyEnumerateCls
125 119
120+ if cret == 0 {
121+ return cls
122+ }
123+ cls = &SocketAddressEnumerator{}
124+ cls.Ptr = cret
125+ return cls
126 }126 }
127 127
128 // Format a #GSocketConnectable as a string. This is a human-readable format for128 // Format a #GSocketConnectable as a string. This is a human-readable format for
@@ -134,8 +134,8 @@ func (x *SocketConnectableBase) ProxyEnumerate() *SocketAddressEnumerator {
134 // the implementation’s type name will be returned as a fallback.134 // the implementation’s type name will be returned as a fallback.
135 func (x *SocketConnectableBase) ToString() string {135 func (x *SocketConnectableBase) ToString() string {
136 136
137- return XGSocketConnectableToString(x.GoPointer())137+ cret := XGSocketConnectableToString(x.GoPointer())
138-138+ return cret
139 }139 }
140 140
141 var XGSocketConnectableEnumerate func(uintptr) uintptr141 var XGSocketConnectableEnumerate func(uintptr) uintptr
M v4/gio/gsocketconnection.go +54 -34
@@ -4,6 +4,7 @@ package gio
4 import (4 import (
5 "github.com/jwijenbergh/purego"5 "github.com/jwijenbergh/purego"
6 "github.com/jwijenbergh/puregotk/internal/core"6 "github.com/jwijenbergh/puregotk/internal/core"
7+ "github.com/jwijenbergh/puregotk/v4/glib"
7 "github.com/jwijenbergh/puregotk/v4/gobject"8 "github.com/jwijenbergh/puregotk/v4/gobject"
8 )9 )
9 10
@@ -40,12 +41,17 @@ func SocketConnectionNewFromInternalPtr(ptr uintptr) *SocketConnection {
40 return cls41 return cls
41 }42 }
42 43
43-var xSocketConnectionConnect func(uintptr, uintptr, uintptr) bool44+var xSocketConnectionConnect func(uintptr, uintptr, uintptr, **glib.Error) bool
44 45
45 // Connect @connection to the specified remote address.46 // Connect @connection to the specified remote address.
46-func (x *SocketConnection) Connect(AddressVar *SocketAddress, CancellableVar *Cancellable) bool {47+func (x *SocketConnection) Connect(AddressVar *SocketAddress, CancellableVar *Cancellable) (bool, error) {
48+ var cerr *glib.Error
47 49
48- return xSocketConnectionConnect(x.GoPointer(), AddressVar.GoPointer(), CancellableVar.GoPointer())50+ cret := xSocketConnectionConnect(x.GoPointer(), AddressVar.GoPointer(), CancellableVar.GoPointer(), &cerr)
51+ if cerr == nil {
52+ return cret, nil
53+ }
54+ return cret, cerr
49 55
50 }56 }
51 57
@@ -63,28 +69,38 @@ func (x *SocketConnection) ConnectAsync(AddressVar *SocketAddress, CancellableVa
63 69
64 }70 }
65 71
66-var xSocketConnectionConnectFinish func(uintptr, uintptr) bool72+var xSocketConnectionConnectFinish func(uintptr, uintptr, **glib.Error) bool
67 73
68 // Gets the result of a g_socket_connection_connect_async() call.74 // Gets the result of a g_socket_connection_connect_async() call.
69-func (x *SocketConnection) ConnectFinish(ResultVar AsyncResult) bool {75+func (x *SocketConnection) ConnectFinish(ResultVar AsyncResult) (bool, error) {
76+ var cerr *glib.Error
70 77
71- return xSocketConnectionConnectFinish(x.GoPointer(), ResultVar.GoPointer())78+ cret := xSocketConnectionConnectFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr)
79+ if cerr == nil {
80+ return cret, nil
81+ }
82+ return cret, cerr
72 83
73 }84 }
74 85
75 var xSocketConnectionGetLocalAddress func(uintptr) uintptr86 var xSocketConnectionGetLocalAddress func(uintptr) uintptr
76 87
77 // Try to get the local address of a socket connection.88 // Try to get the local address of a socket connection.
78-func (x *SocketConnection) GetLocalAddress() *SocketAddress {89+func (x *SocketConnection) GetLocalAddress() (*SocketAddress, error) {
90+ var cls *SocketAddress
91+ var cerr *glib.Error
79 92
80- GetLocalAddressPtr := xSocketConnectionGetLocalAddress(x.GoPointer())93+ cret := xSocketConnectionGetLocalAddress(x.GoPointer())
81- if GetLocalAddressPtr == 0 {
82- return nil
83- }
84 94
85- GetLocalAddressCls := &SocketAddress{}95+ if cret == 0 {
86- GetLocalAddressCls.Ptr = GetLocalAddressPtr96+ return cls, cerr
87- return GetLocalAddressCls97+ }
98+ cls = &SocketAddress{}
99+ cls.Ptr = cret
100+ if cerr == nil {
101+ return cls, nil
102+ }
103+ return cls, cerr
88 104
89 }105 }
90 106
@@ -98,16 +114,21 @@ var xSocketConnectionGetRemoteAddress func(uintptr) uintptr
98 // address that will be used for the connection. This allows114 // address that will be used for the connection. This allows
99 // applications to print e.g. "Connecting to example.com115 // applications to print e.g. "Connecting to example.com
100 // (10.42.77.3)...".116 // (10.42.77.3)...".
101-func (x *SocketConnection) GetRemoteAddress() *SocketAddress {117+func (x *SocketConnection) GetRemoteAddress() (*SocketAddress, error) {
118+ var cls *SocketAddress
119+ var cerr *glib.Error
102 120
103- GetRemoteAddressPtr := xSocketConnectionGetRemoteAddress(x.GoPointer())121+ cret := xSocketConnectionGetRemoteAddress(x.GoPointer())
104- if GetRemoteAddressPtr == 0 {
105- return nil
106- }
107 122
108- GetRemoteAddressCls := &SocketAddress{}123+ if cret == 0 {
109- GetRemoteAddressCls.Ptr = GetRemoteAddressPtr124+ return cls, cerr
110- return GetRemoteAddressCls125+ }
126+ cls = &SocketAddress{}
127+ cls.Ptr = cret
128+ if cerr == nil {
129+ return cls, nil
130+ }
131+ return cls, cerr
111 132
112 }133 }
113 134
@@ -117,18 +138,17 @@ var xSocketConnectionGetSocket func(uintptr) uintptr
117 // This can be useful if you want to do something unusual on it138 // This can be useful if you want to do something unusual on it
118 // not supported by the #GSocketConnection APIs.139 // not supported by the #GSocketConnection APIs.
119 func (x *SocketConnection) GetSocket() *Socket {140 func (x *SocketConnection) GetSocket() *Socket {
141+ var cls *Socket
120 142
121- GetSocketPtr := xSocketConnectionGetSocket(x.GoPointer())143+ cret := xSocketConnectionGetSocket(x.GoPointer())
122- if GetSocketPtr == 0 {
123- return nil
124- }
125-
126- gobject.IncreaseRef(GetSocketPtr)
127-
128- GetSocketCls := &Socket{}
129- GetSocketCls.Ptr = GetSocketPtr
130- return GetSocketCls
131 144
145+ if cret == 0 {
146+ return cls
147+ }
148+ gobject.IncreaseRef(cret)
149+ cls = &Socket{}
150+ cls.Ptr = cret
151+ return cls
132 }152 }
133 153
134 var xSocketConnectionIsConnected func(uintptr) bool154 var xSocketConnectionIsConnected func(uintptr) bool
@@ -137,8 +157,8 @@ var xSocketConnectionIsConnected func(uintptr) bool
137 // g_socket_is_connected() on @connection's underlying #GSocket.157 // g_socket_is_connected() on @connection's underlying #GSocket.
138 func (x *SocketConnection) IsConnected() bool {158 func (x *SocketConnection) IsConnected() bool {
139 159
140- return xSocketConnectionIsConnected(x.GoPointer())160+ cret := xSocketConnectionIsConnected(x.GoPointer())
141-161+ return cret
142 }162 }
143 163
144 func (c *SocketConnection) GoPointer() uintptr {164 func (c *SocketConnection) GoPointer() uintptr {
M v4/gio/gsocketcontrolmessage.go +6 -6
@@ -51,8 +51,8 @@ var xSocketControlMessageGetLevel func(uintptr) int
51 // This is often SOL_SOCKET.51 // This is often SOL_SOCKET.
52 func (x *SocketControlMessage) GetLevel() int {52 func (x *SocketControlMessage) GetLevel() int {
53 53
54- return xSocketControlMessageGetLevel(x.GoPointer())54+ cret := xSocketControlMessageGetLevel(x.GoPointer())
55-55+ return cret
56 }56 }
57 57
58 var xSocketControlMessageGetMsgType func(uintptr) int58 var xSocketControlMessageGetMsgType func(uintptr) int
@@ -61,8 +61,8 @@ var xSocketControlMessageGetMsgType func(uintptr) int
61 // For instance, for UNIX fd passing this would be SCM_RIGHTS.61 // For instance, for UNIX fd passing this would be SCM_RIGHTS.
62 func (x *SocketControlMessage) GetMsgType() int {62 func (x *SocketControlMessage) GetMsgType() int {
63 63
64- return xSocketControlMessageGetMsgType(x.GoPointer())64+ cret := xSocketControlMessageGetMsgType(x.GoPointer())
65-65+ return cret
66 }66 }
67 67
68 var xSocketControlMessageGetSize func(uintptr) uint68 var xSocketControlMessageGetSize func(uintptr) uint
@@ -71,8 +71,8 @@ var xSocketControlMessageGetSize func(uintptr) uint
71 // headers or alignment.71 // headers or alignment.
72 func (x *SocketControlMessage) GetSize() uint {72 func (x *SocketControlMessage) GetSize() uint {
73 73
74- return xSocketControlMessageGetSize(x.GoPointer())74+ cret := xSocketControlMessageGetSize(x.GoPointer())
75-75+ return cret
76 }76 }
77 77
78 var xSocketControlMessageSerialize func(uintptr, uintptr)78 var xSocketControlMessageSerialize func(uintptr, uintptr)
M v4/gio/gsocketlistener.go +98 -55
@@ -4,6 +4,7 @@ package gio
4 import (4 import (
5 "github.com/jwijenbergh/purego"5 "github.com/jwijenbergh/purego"
6 "github.com/jwijenbergh/puregotk/internal/core"6 "github.com/jwijenbergh/puregotk/internal/core"
7+ "github.com/jwijenbergh/puregotk/v4/glib"
7 "github.com/jwijenbergh/puregotk/v4/gobject"8 "github.com/jwijenbergh/puregotk/v4/gobject"
8 )9 )
9 10
@@ -45,17 +46,19 @@ var xNewSocketListener func() uintptr
45 // New listeners can be added with e.g. g_socket_listener_add_address()46 // New listeners can be added with e.g. g_socket_listener_add_address()
46 // or g_socket_listener_add_inet_port().47 // or g_socket_listener_add_inet_port().
47 func NewSocketListener() *SocketListener {48 func NewSocketListener() *SocketListener {
48- NewSocketListenerPtr := xNewSocketListener()49+ var cls *SocketListener
49- if NewSocketListenerPtr == 0 {50+
50- return nil51+ cret := xNewSocketListener()
51- }
52 52
53- NewSocketListenerCls := &SocketListener{}53+ if cret == 0 {
54- NewSocketListenerCls.Ptr = NewSocketListenerPtr54+ return cls
55- return NewSocketListenerCls55+ }
56+ cls = &SocketListener{}
57+ cls.Ptr = cret
58+ return cls
56 }59 }
57 60
58-var xSocketListenerAccept func(uintptr, *uintptr, uintptr) uintptr61+var xSocketListenerAccept func(uintptr, *uintptr, uintptr, **glib.Error) uintptr
59 62
60 // Blocks waiting for a client to connect to any of the sockets added63 // Blocks waiting for a client to connect to any of the sockets added
61 // to the listener. Returns a #GSocketConnection for the socket that was64 // to the listener. Returns a #GSocketConnection for the socket that was
@@ -68,16 +71,21 @@ var xSocketListenerAccept func(uintptr, *uintptr, uintptr) uintptr
68 // If @cancellable is not %NULL, then the operation can be cancelled by71 // If @cancellable is not %NULL, then the operation can be cancelled by
69 // triggering the cancellable object from another thread. If the operation72 // triggering the cancellable object from another thread. If the operation
70 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.73 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
71-func (x *SocketListener) Accept(SourceObjectVar **gobject.Object, CancellableVar *Cancellable) *SocketConnection {74+func (x *SocketListener) Accept(SourceObjectVar **gobject.Object, CancellableVar *Cancellable) (*SocketConnection, error) {
75+ var cls *SocketConnection
76+ var cerr *glib.Error
72 77
73- AcceptPtr := xSocketListenerAccept(x.GoPointer(), gobject.ConvertPtr(SourceObjectVar), CancellableVar.GoPointer())78+ cret := xSocketListenerAccept(x.GoPointer(), gobject.ConvertPtr(SourceObjectVar), CancellableVar.GoPointer(), &cerr)
74- if AcceptPtr == 0 {
75- return nil
76- }
77 79
78- AcceptCls := &SocketConnection{}80+ if cret == 0 {
79- AcceptCls.Ptr = AcceptPtr81+ return cls, cerr
80- return AcceptCls82+ }
83+ cls = &SocketConnection{}
84+ cls.Ptr = cret
85+ if cerr == nil {
86+ return cls, nil
87+ }
88+ return cls, cerr
81 89
82 }90 }
83 91
@@ -94,23 +102,28 @@ func (x *SocketListener) AcceptAsync(CancellableVar *Cancellable, CallbackVar As
94 102
95 }103 }
96 104
97-var xSocketListenerAcceptFinish func(uintptr, uintptr, *uintptr) uintptr105+var xSocketListenerAcceptFinish func(uintptr, uintptr, *uintptr, **glib.Error) uintptr
98 106
99 // Finishes an async accept operation. See g_socket_listener_accept_async()107 // Finishes an async accept operation. See g_socket_listener_accept_async()
100-func (x *SocketListener) AcceptFinish(ResultVar AsyncResult, SourceObjectVar **gobject.Object) *SocketConnection {108+func (x *SocketListener) AcceptFinish(ResultVar AsyncResult, SourceObjectVar **gobject.Object) (*SocketConnection, error) {
109+ var cls *SocketConnection
110+ var cerr *glib.Error
101 111
102- AcceptFinishPtr := xSocketListenerAcceptFinish(x.GoPointer(), ResultVar.GoPointer(), gobject.ConvertPtr(SourceObjectVar))112+ cret := xSocketListenerAcceptFinish(x.GoPointer(), ResultVar.GoPointer(), gobject.ConvertPtr(SourceObjectVar), &cerr)
103- if AcceptFinishPtr == 0 {
104- return nil
105- }
106 113
107- AcceptFinishCls := &SocketConnection{}114+ if cret == 0 {
108- AcceptFinishCls.Ptr = AcceptFinishPtr115+ return cls, cerr
109- return AcceptFinishCls116+ }
117+ cls = &SocketConnection{}
118+ cls.Ptr = cret
119+ if cerr == nil {
120+ return cls, nil
121+ }
122+ return cls, cerr
110 123
111 }124 }
112 125
113-var xSocketListenerAcceptSocket func(uintptr, *uintptr, uintptr) uintptr126+var xSocketListenerAcceptSocket func(uintptr, *uintptr, uintptr, **glib.Error) uintptr
114 127
115 // Blocks waiting for a client to connect to any of the sockets added128 // Blocks waiting for a client to connect to any of the sockets added
116 // to the listener. Returns the #GSocket that was accepted.129 // to the listener. Returns the #GSocket that was accepted.
@@ -126,16 +139,21 @@ var xSocketListenerAcceptSocket func(uintptr, *uintptr, uintptr) uintptr
126 // If @cancellable is not %NULL, then the operation can be cancelled by139 // If @cancellable is not %NULL, then the operation can be cancelled by
127 // triggering the cancellable object from another thread. If the operation140 // triggering the cancellable object from another thread. If the operation
128 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.141 // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
129-func (x *SocketListener) AcceptSocket(SourceObjectVar **gobject.Object, CancellableVar *Cancellable) *Socket {142+func (x *SocketListener) AcceptSocket(SourceObjectVar **gobject.Object, CancellableVar *Cancellable) (*Socket, error) {
143+ var cls *Socket
144+ var cerr *glib.Error
130 145
131- AcceptSocketPtr := xSocketListenerAcceptSocket(x.GoPointer(), gobject.ConvertPtr(SourceObjectVar), CancellableVar.GoPointer())146+ cret := xSocketListenerAcceptSocket(x.GoPointer(), gobject.ConvertPtr(SourceObjectVar), CancellableVar.GoPointer(), &cerr)
132- if AcceptSocketPtr == 0 {
133- return nil
134- }
135 147
136- AcceptSocketCls := &Socket{}148+ if cret == 0 {
137- AcceptSocketCls.Ptr = AcceptSocketPtr149+ return cls, cerr
138- return AcceptSocketCls150+ }
151+ cls = &Socket{}
152+ cls.Ptr = cret
153+ if cerr == nil {
154+ return cls, nil
155+ }
156+ return cls, cerr
139 157
140 }158 }
141 159
@@ -152,23 +170,28 @@ func (x *SocketListener) AcceptSocketAsync(CancellableVar *Cancellable, Callback
152 170
153 }171 }
154 172
155-var xSocketListenerAcceptSocketFinish func(uintptr, uintptr, *uintptr) uintptr173+var xSocketListenerAcceptSocketFinish func(uintptr, uintptr, *uintptr, **glib.Error) uintptr
156 174
157 // Finishes an async accept operation. See g_socket_listener_accept_socket_async()175 // Finishes an async accept operation. See g_socket_listener_accept_socket_async()
158-func (x *SocketListener) AcceptSocketFinish(ResultVar AsyncResult, SourceObjectVar **gobject.Object) *Socket {176+func (x *SocketListener) AcceptSocketFinish(ResultVar AsyncResult, SourceObjectVar **gobject.Object) (*Socket, error) {
177+ var cls *Socket
178+ var cerr *glib.Error
159 179
160- AcceptSocketFinishPtr := xSocketListenerAcceptSocketFinish(x.GoPointer(), ResultVar.GoPointer(), gobject.ConvertPtr(SourceObjectVar))180+ cret := xSocketListenerAcceptSocketFinish(x.GoPointer(), ResultVar.GoPointer(), gobject.ConvertPtr(SourceObjectVar), &cerr)
161- if AcceptSocketFinishPtr == 0 {
162- return nil
163- }
164 181
165- AcceptSocketFinishCls := &Socket{}182+ if cret == 0 {
166- AcceptSocketFinishCls.Ptr = AcceptSocketFinishPtr183+ return cls, cerr
167- return AcceptSocketFinishCls184+ }
185+ cls = &Socket{}
186+ cls.Ptr = cret
187+ if cerr == nil {
188+ return cls, nil
189+ }
190+ return cls, cerr
168 191
169 }192 }
170 193
171-var xSocketListenerAddAddress func(uintptr, uintptr, SocketType, SocketProtocol, uintptr, *uintptr) bool194+var xSocketListenerAddAddress func(uintptr, uintptr, SocketType, SocketProtocol, uintptr, *uintptr, **glib.Error) bool
172 195
173 // Creates a socket of type @type and protocol @protocol, binds196 // Creates a socket of type @type and protocol @protocol, binds
174 // it to @address and adds it to the set of sockets we're accepting197 // it to @address and adds it to the set of sockets we're accepting
@@ -193,13 +216,18 @@ var xSocketListenerAddAddress func(uintptr, uintptr, SocketType, SocketProtocol,
193 // Call g_socket_listener_close() to stop listening on @address; this will not216 // Call g_socket_listener_close() to stop listening on @address; this will not
194 // be done automatically when you drop your final reference to @listener, as217 // be done automatically when you drop your final reference to @listener, as
195 // references may be held internally.218 // references may be held internally.
196-func (x *SocketListener) AddAddress(AddressVar *SocketAddress, TypeVar SocketType, ProtocolVar SocketProtocol, SourceObjectVar *gobject.Object, EffectiveAddressVar **SocketAddress) bool {219+func (x *SocketListener) AddAddress(AddressVar *SocketAddress, TypeVar SocketType, ProtocolVar SocketProtocol, SourceObjectVar *gobject.Object, EffectiveAddressVar **SocketAddress) (bool, error) {
220+ var cerr *glib.Error
197 221
198- return xSocketListenerAddAddress(x.GoPointer(), AddressVar.GoPointer(), TypeVar, ProtocolVar, SourceObjectVar.GoPointer(), gobject.ConvertPtr(EffectiveAddressVar))222+ cret := xSocketListenerAddAddress(x.GoPointer(), AddressVar.GoPointer(), TypeVar, ProtocolVar, SourceObjectVar.GoPointer(), gobject.ConvertPtr(EffectiveAddressVar), &cerr)
223+ if cerr == nil {
224+ return cret, nil
225+ }
226+ return cret, cerr
199 227
200 }228 }
201 229
202-var xSocketListenerAddAnyInetPort func(uintptr, uintptr) uint16230+var xSocketListenerAddAnyInetPort func(uintptr, uintptr, **glib.Error) uint16
203 231
204 // Listens for TCP connections on any available port number for both232 // Listens for TCP connections on any available port number for both
205 // IPv6 and IPv4 (if each is available).233 // IPv6 and IPv4 (if each is available).
@@ -211,13 +239,18 @@ var xSocketListenerAddAnyInetPort func(uintptr, uintptr) uint16
211 // to accept to identify this particular source, which is239 // to accept to identify this particular source, which is
212 // useful if you're listening on multiple addresses and do240 // useful if you're listening on multiple addresses and do
213 // different things depending on what address is connected to.241 // different things depending on what address is connected to.
214-func (x *SocketListener) AddAnyInetPort(SourceObjectVar *gobject.Object) uint16 {242+func (x *SocketListener) AddAnyInetPort(SourceObjectVar *gobject.Object) (uint16, error) {
243+ var cerr *glib.Error
215 244
216- return xSocketListenerAddAnyInetPort(x.GoPointer(), SourceObjectVar.GoPointer())245+ cret := xSocketListenerAddAnyInetPort(x.GoPointer(), SourceObjectVar.GoPointer(), &cerr)
246+ if cerr == nil {
247+ return cret, nil
248+ }
249+ return cret, cerr
217 250
218 }251 }
219 252
220-var xSocketListenerAddInetPort func(uintptr, uint16, uintptr) bool253+var xSocketListenerAddInetPort func(uintptr, uint16, uintptr, **glib.Error) bool
221 254
222 // Helper function for g_socket_listener_add_address() that255 // Helper function for g_socket_listener_add_address() that
223 // creates a TCP/IP socket listening on IPv4 and IPv6 (if256 // creates a TCP/IP socket listening on IPv4 and IPv6 (if
@@ -231,13 +264,18 @@ var xSocketListenerAddInetPort func(uintptr, uint16, uintptr) bool
231 // Call g_socket_listener_close() to stop listening on @port; this will not264 // Call g_socket_listener_close() to stop listening on @port; this will not
232 // be done automatically when you drop your final reference to @listener, as265 // be done automatically when you drop your final reference to @listener, as
233 // references may be held internally.266 // references may be held internally.
234-func (x *SocketListener) AddInetPort(PortVar uint16, SourceObjectVar *gobject.Object) bool {267+func (x *SocketListener) AddInetPort(PortVar uint16, SourceObjectVar *gobject.Object) (bool, error) {
268+ var cerr *glib.Error
235 269
236- return xSocketListenerAddInetPort(x.GoPointer(), PortVar, SourceObjectVar.GoPointer())270+ cret := xSocketListenerAddInetPort(x.GoPointer(), PortVar, SourceObjectVar.GoPointer(), &cerr)
271+ if cerr == nil {
272+ return cret, nil
273+ }
274+ return cret, cerr
237 275
238 }276 }
239 277
240-var xSocketListenerAddSocket func(uintptr, uintptr, uintptr) bool278+var xSocketListenerAddSocket func(uintptr, uintptr, uintptr, **glib.Error) bool
241 279
242 // Adds @socket to the set of sockets that we try to accept280 // Adds @socket to the set of sockets that we try to accept
243 // new clients from. The socket must be bound to a local281 // new clients from. The socket must be bound to a local
@@ -252,9 +290,14 @@ var xSocketListenerAddSocket func(uintptr, uintptr, uintptr) bool
252 // unless the listener held the final reference to the socket. Before GLib 2.42,290 // unless the listener held the final reference to the socket. Before GLib 2.42,
253 // the @socket was automatically closed on finalization of the @listener, even291 // the @socket was automatically closed on finalization of the @listener, even
254 // if references to it were held elsewhere.292 // if references to it were held elsewhere.
255-func (x *SocketListener) AddSocket(SocketVar *Socket, SourceObjectVar *gobject.Object) bool {293+func (x *SocketListener) AddSocket(SocketVar *Socket, SourceObjectVar *gobject.Object) (bool, error) {
294+ var cerr *glib.Error
256 295
257- return xSocketListenerAddSocket(x.GoPointer(), SocketVar.GoPointer(), SourceObjectVar.GoPointer())296+ cret := xSocketListenerAddSocket(x.GoPointer(), SocketVar.GoPointer(), SourceObjectVar.GoPointer(), &cerr)
297+ if cerr == nil {
298+ return cret, nil
299+ }
300+ return cret, cerr
258 301
259 }302 }
260 303
M v4/gio/gsocketservice.go +11 -9
@@ -61,14 +61,16 @@ var xNewSocketService func() uintptr
61 // g_socket_service_start(), unless g_socket_service_stop() has been61 // g_socket_service_start(), unless g_socket_service_stop() has been
62 // called before.62 // called before.
63 func NewSocketService() *SocketService {63 func NewSocketService() *SocketService {
64- NewSocketServicePtr := xNewSocketService()64+ var cls *SocketService
65- if NewSocketServicePtr == 0 {65+
66- return nil66+ cret := xNewSocketService()
67- }
68 67
69- NewSocketServiceCls := &SocketService{}68+ if cret == 0 {
70- NewSocketServiceCls.Ptr = NewSocketServicePtr69+ return cls
71- return NewSocketServiceCls70+ }
71+ cls = &SocketService{}
72+ cls.Ptr = cret
73+ return cls
72 }74 }
73 75
74 var xSocketServiceIsActive func(uintptr) bool76 var xSocketServiceIsActive func(uintptr) bool
@@ -79,8 +81,8 @@ var xSocketServiceIsActive func(uintptr) bool
79 // up until the service is started.81 // up until the service is started.
80 func (x *SocketService) IsActive() bool {82 func (x *SocketService) IsActive() bool {
81 83
82- return xSocketServiceIsActive(x.GoPointer())84+ cret := xSocketServiceIsActive(x.GoPointer())
83-85+ return cret
84 }86 }
85 87
86 var xSocketServiceStart func(uintptr)88 var xSocketServiceStart func(uintptr)
M v4/gio/gsrvtarget.go +2 -2
@@ -12,8 +12,8 @@ var xSrvTargetListSort func(*glib.List) *glib.List
12 // Sorts @targets in place according to the algorithm in RFC 2782.12 // Sorts @targets in place according to the algorithm in RFC 2782.
13 func SrvTargetListSort(TargetsVar *glib.List) *glib.List {13 func SrvTargetListSort(TargetsVar *glib.List) *glib.List {
14 14
15- return xSrvTargetListSort(TargetsVar)15+ cret := xSrvTargetListSort(TargetsVar)
16-16+ return cret
17 }17 }
18 18
19 func init() {19 func init() {
M v4/gio/gtask.go +89 -64
@@ -564,14 +564,16 @@ var xNewTask func(uintptr, uintptr, uintptr, uintptr) uintptr
564 // do not want this behavior, you can use564 // do not want this behavior, you can use
565 // g_task_set_check_cancellable() to change it.565 // g_task_set_check_cancellable() to change it.
566 func NewTask(SourceObjectVar *gobject.Object, CancellableVar *Cancellable, CallbackVar AsyncReadyCallback, CallbackDataVar uintptr) *Task {566 func NewTask(SourceObjectVar *gobject.Object, CancellableVar *Cancellable, CallbackVar AsyncReadyCallback, CallbackDataVar uintptr) *Task {
567- NewTaskPtr := xNewTask(SourceObjectVar.GoPointer(), CancellableVar.GoPointer(), purego.NewCallback(CallbackVar), CallbackDataVar)567+ var cls *Task
568- if NewTaskPtr == 0 {568+
569- return nil569+ cret := xNewTask(SourceObjectVar.GoPointer(), CancellableVar.GoPointer(), purego.NewCallback(CallbackVar), CallbackDataVar)
570- }
571 570
572- NewTaskCls := &Task{}571+ if cret == 0 {
573- NewTaskCls.Ptr = NewTaskPtr572+ return cls
574- return NewTaskCls573+ }
574+ cls = &Task{}
575+ cls.Ptr = cret
576+ return cls
575 }577 }
576 578
577 var xTaskAttachSource func(uintptr, *glib.Source, uintptr)579 var xTaskAttachSource func(uintptr, *glib.Source, uintptr)
@@ -595,18 +597,17 @@ var xTaskGetCancellable func(uintptr) uintptr
595 597
596 // Gets @task's #GCancellable598 // Gets @task's #GCancellable
597 func (x *Task) GetCancellable() *Cancellable {599 func (x *Task) GetCancellable() *Cancellable {
600+ var cls *Cancellable
598 601
599- GetCancellablePtr := xTaskGetCancellable(x.GoPointer())602+ cret := xTaskGetCancellable(x.GoPointer())
600- if GetCancellablePtr == 0 {
601- return nil
602- }
603-
604- gobject.IncreaseRef(GetCancellablePtr)
605-
606- GetCancellableCls := &Cancellable{}
607- GetCancellableCls.Ptr = GetCancellablePtr
608- return GetCancellableCls
609 603
604+ if cret == 0 {
605+ return cls
606+ }
607+ gobject.IncreaseRef(cret)
608+ cls = &Cancellable{}
609+ cls.Ptr = cret
610+ return cls
610 }611 }
611 612
612 var xTaskGetCheckCancellable func(uintptr) bool613 var xTaskGetCheckCancellable func(uintptr) bool
@@ -615,8 +616,8 @@ var xTaskGetCheckCancellable func(uintptr) bool
615 // g_task_set_check_cancellable() for more details.616 // g_task_set_check_cancellable() for more details.
616 func (x *Task) GetCheckCancellable() bool {617 func (x *Task) GetCheckCancellable() bool {
617 618
618- return xTaskGetCheckCancellable(x.GoPointer())619+ cret := xTaskGetCheckCancellable(x.GoPointer())
619-620+ return cret
620 }621 }
621 622
622 var xTaskGetCompleted func(uintptr) bool623 var xTaskGetCompleted func(uintptr) bool
@@ -626,8 +627,8 @@ var xTaskGetCompleted func(uintptr) bool
626 // the callback.627 // the callback.
627 func (x *Task) GetCompleted() bool {628 func (x *Task) GetCompleted() bool {
628 629
629- return xTaskGetCompleted(x.GoPointer())630+ cret := xTaskGetCompleted(x.GoPointer())
630-631+ return cret
631 }632 }
632 633
633 var xTaskGetContext func(uintptr) *glib.MainContext634 var xTaskGetContext func(uintptr) *glib.MainContext
@@ -641,8 +642,8 @@ var xTaskGetContext func(uintptr) *glib.MainContext
641 // context is the default #GMainContext.642 // context is the default #GMainContext.
642 func (x *Task) GetContext() *glib.MainContext {643 func (x *Task) GetContext() *glib.MainContext {
643 644
644- return xTaskGetContext(x.GoPointer())645+ cret := xTaskGetContext(x.GoPointer())
645-646+ return cret
646 }647 }
647 648
648 var xTaskGetName func(uintptr) string649 var xTaskGetName func(uintptr) string
@@ -650,8 +651,8 @@ var xTaskGetName func(uintptr) string
650 // Gets @task’s name. See g_task_set_name().651 // Gets @task’s name. See g_task_set_name().
651 func (x *Task) GetName() string {652 func (x *Task) GetName() string {
652 653
653- return xTaskGetName(x.GoPointer())654+ cret := xTaskGetName(x.GoPointer())
654-655+ return cret
655 }656 }
656 657
657 var xTaskGetPriority func(uintptr) int658 var xTaskGetPriority func(uintptr) int
@@ -659,8 +660,8 @@ var xTaskGetPriority func(uintptr) int
659 // Gets @task's priority660 // Gets @task's priority
660 func (x *Task) GetPriority() int {661 func (x *Task) GetPriority() int {
661 662
662- return xTaskGetPriority(x.GoPointer())663+ cret := xTaskGetPriority(x.GoPointer())
663-664+ return cret
664 }665 }
665 666
666 var xTaskGetReturnOnCancel func(uintptr) bool667 var xTaskGetReturnOnCancel func(uintptr) bool
@@ -669,8 +670,8 @@ var xTaskGetReturnOnCancel func(uintptr) bool
669 // g_task_set_return_on_cancel() for more details.670 // g_task_set_return_on_cancel() for more details.
670 func (x *Task) GetReturnOnCancel() bool {671 func (x *Task) GetReturnOnCancel() bool {
671 672
672- return xTaskGetReturnOnCancel(x.GoPointer())673+ cret := xTaskGetReturnOnCancel(x.GoPointer())
673-674+ return cret
674 }675 }
675 676
676 var xTaskGetSourceObject func(uintptr) uintptr677 var xTaskGetSourceObject func(uintptr) uintptr
@@ -678,18 +679,17 @@ var xTaskGetSourceObject func(uintptr) uintptr
678 // Gets the source object from @task. Like679 // Gets the source object from @task. Like
679 // g_async_result_get_source_object(), but does not ref the object.680 // g_async_result_get_source_object(), but does not ref the object.
680 func (x *Task) GetSourceObject() *gobject.Object {681 func (x *Task) GetSourceObject() *gobject.Object {
682+ var cls *gobject.Object
681 683
682- GetSourceObjectPtr := xTaskGetSourceObject(x.GoPointer())684+ cret := xTaskGetSourceObject(x.GoPointer())
683- if GetSourceObjectPtr == 0 {
684- return nil
685- }
686-
687- gobject.IncreaseRef(GetSourceObjectPtr)
688-
689- GetSourceObjectCls := &gobject.Object{}
690- GetSourceObjectCls.Ptr = GetSourceObjectPtr
691- return GetSourceObjectCls
692 685
686+ if cret == 0 {
687+ return cls
688+ }
689+ gobject.IncreaseRef(cret)
690+ cls = &gobject.Object{}
691+ cls.Ptr = cret
692+ return cls
693 }693 }
694 694
695 var xTaskGetSourceTag func(uintptr) uintptr695 var xTaskGetSourceTag func(uintptr) uintptr
@@ -697,8 +697,8 @@ var xTaskGetSourceTag func(uintptr) uintptr
697 // Gets @task's source tag. See g_task_set_source_tag().697 // Gets @task's source tag. See g_task_set_source_tag().
698 func (x *Task) GetSourceTag() uintptr {698 func (x *Task) GetSourceTag() uintptr {
699 699
700- return xTaskGetSourceTag(x.GoPointer())700+ cret := xTaskGetSourceTag(x.GoPointer())
701-701+ return cret
702 }702 }
703 703
704 var xTaskGetTaskData func(uintptr) uintptr704 var xTaskGetTaskData func(uintptr) uintptr
@@ -706,8 +706,8 @@ var xTaskGetTaskData func(uintptr) uintptr
706 // Gets @task's `task_data`.706 // Gets @task's `task_data`.
707 func (x *Task) GetTaskData() uintptr {707 func (x *Task) GetTaskData() uintptr {
708 708
709- return xTaskGetTaskData(x.GoPointer())709+ cret := xTaskGetTaskData(x.GoPointer())
710-710+ return cret
711 }711 }
712 712
713 var xTaskHadError func(uintptr) bool713 var xTaskHadError func(uintptr) bool
@@ -715,8 +715,8 @@ var xTaskHadError func(uintptr) bool
715 // Tests if @task resulted in an error.715 // Tests if @task resulted in an error.
716 func (x *Task) HadError() bool {716 func (x *Task) HadError() bool {
717 717
718- return xTaskHadError(x.GoPointer())718+ cret := xTaskHadError(x.GoPointer())
719-719+ return cret
720 }720 }
721 721
722 var xTaskPropagateBoolean func(uintptr) bool722 var xTaskPropagateBoolean func(uintptr) bool
@@ -728,9 +728,14 @@ var xTaskPropagateBoolean func(uintptr) bool
728 //728 //
729 // Since this method transfers ownership of the return value (or729 // Since this method transfers ownership of the return value (or
730 // error) to the caller, you may only call it once.730 // error) to the caller, you may only call it once.
731-func (x *Task) PropagateBoolean() bool {731+func (x *Task) PropagateBoolean() (bool, error) {
732+ var cerr *glib.Error
732 733
733- return xTaskPropagateBoolean(x.GoPointer())734+ cret := xTaskPropagateBoolean(x.GoPointer())
735+ if cerr == nil {
736+ return cret, nil
737+ }
738+ return cret, cerr
734 739
735 }740 }
736 741
@@ -743,9 +748,14 @@ var xTaskPropagateInt func(uintptr) int
743 //748 //
744 // Since this method transfers ownership of the return value (or749 // Since this method transfers ownership of the return value (or
745 // error) to the caller, you may only call it once.750 // error) to the caller, you may only call it once.
746-func (x *Task) PropagateInt() int {751+func (x *Task) PropagateInt() (int, error) {
752+ var cerr *glib.Error
747 753
748- return xTaskPropagateInt(x.GoPointer())754+ cret := xTaskPropagateInt(x.GoPointer())
755+ if cerr == nil {
756+ return cret, nil
757+ }
758+ return cret, cerr
749 759
750 }760 }
751 761
@@ -759,13 +769,18 @@ var xTaskPropagatePointer func(uintptr) uintptr
759 //769 //
760 // Since this method transfers ownership of the return value (or770 // Since this method transfers ownership of the return value (or
761 // error) to the caller, you may only call it once.771 // error) to the caller, you may only call it once.
762-func (x *Task) PropagatePointer() uintptr {772+func (x *Task) PropagatePointer() (uintptr, error) {
773+ var cerr *glib.Error
763 774
764- return xTaskPropagatePointer(x.GoPointer())775+ cret := xTaskPropagatePointer(x.GoPointer())
776+ if cerr == nil {
777+ return cret, nil
778+ }
779+ return cret, cerr
765 780
766 }781 }
767 782
768-var xTaskPropagateValue func(uintptr, *gobject.Value) bool783+var xTaskPropagateValue func(uintptr, *gobject.Value, **glib.Error) bool
769 784
770 // Gets the result of @task as a #GValue, and transfers ownership of785 // Gets the result of @task as a #GValue, and transfers ownership of
771 // that value to the caller. As with g_task_return_value(), this is786 // that value to the caller. As with g_task_return_value(), this is
@@ -777,9 +792,14 @@ var xTaskPropagateValue func(uintptr, *gobject.Value) bool
777 //792 //
778 // Since this method transfers ownership of the return value (or793 // Since this method transfers ownership of the return value (or
779 // error) to the caller, you may only call it once.794 // error) to the caller, you may only call it once.
780-func (x *Task) PropagateValue(ValueVar *gobject.Value) bool {795+func (x *Task) PropagateValue(ValueVar *gobject.Value) (bool, error) {
796+ var cerr *glib.Error
781 797
782- return xTaskPropagateValue(x.GoPointer(), ValueVar)798+ cret := xTaskPropagateValue(x.GoPointer(), ValueVar, &cerr)
799+ if cerr == nil {
800+ return cret, nil
801+ }
802+ return cret, cerr
783 803
784 }804 }
785 805
@@ -821,8 +841,8 @@ var xTaskReturnErrorIfCancelled func(uintptr) bool
821 // means).841 // means).
822 func (x *Task) ReturnErrorIfCancelled() bool {842 func (x *Task) ReturnErrorIfCancelled() bool {
823 843
824- return xTaskReturnErrorIfCancelled(x.GoPointer())844+ cret := xTaskReturnErrorIfCancelled(x.GoPointer())
825-845+ return cret
826 }846 }
827 847
828 var xTaskReturnInt func(uintptr, int)848 var xTaskReturnInt func(uintptr, int)
@@ -1023,8 +1043,8 @@ var xTaskSetReturnOnCancel func(uintptr, bool) bool
1023 // will also be completed right away.1043 // will also be completed right away.
1024 func (x *Task) SetReturnOnCancel(ReturnOnCancelVar bool) bool {1044 func (x *Task) SetReturnOnCancel(ReturnOnCancelVar bool) bool {
1025 1045
1026- return xTaskSetReturnOnCancel(x.GoPointer(), ReturnOnCancelVar)1046+ cret := xTaskSetReturnOnCancel(x.GoPointer(), ReturnOnCancelVar)
1027-1047+ return cret
1028 }1048 }
1029 1049
1030 var xTaskSetSourceTag func(uintptr, uintptr)1050 var xTaskSetSourceTag func(uintptr, uintptr)
@@ -1067,16 +1087,16 @@ func (c *Task) SetGoPointer(ptr uintptr) {
1067 // Gets the user data from a #GAsyncResult.1087 // Gets the user data from a #GAsyncResult.
1068 func (x *Task) GetUserData() uintptr {1088 func (x *Task) GetUserData() uintptr {
1069 1089
1070- return XGAsyncResultGetUserData(x.GoPointer())1090+ cret := XGAsyncResultGetUserData(x.GoPointer())
1071-1091+ return cret
1072 }1092 }
1073 1093
1074 // Checks if @res has the given @source_tag (generally a function1094 // Checks if @res has the given @source_tag (generally a function
1075 // pointer indicating the function @res was created by).1095 // pointer indicating the function @res was created by).
1076 func (x *Task) IsTagged(SourceTagVar uintptr) bool {1096 func (x *Task) IsTagged(SourceTagVar uintptr) bool {
1077 1097
1078- return XGAsyncResultIsTagged(x.GoPointer(), SourceTagVar)1098+ cret := XGAsyncResultIsTagged(x.GoPointer(), SourceTagVar)
1079-1099+ return cret
1080 }1100 }
1081 1101
1082 // If @res is a #GSimpleAsyncResult, this is equivalent to1102 // If @res is a #GSimpleAsyncResult, this is equivalent to
@@ -1089,9 +1109,14 @@ func (x *Task) IsTagged(SourceTagVar uintptr) bool {
1089 // This should not be used in new code; #GAsyncResult errors that are1109 // This should not be used in new code; #GAsyncResult errors that are
1090 // set by virtual methods should also be extracted by virtual methods,1110 // set by virtual methods should also be extracted by virtual methods,
1091 // to enable subclasses to chain up correctly.1111 // to enable subclasses to chain up correctly.
1092-func (x *Task) LegacyPropagateError() bool {1112+func (x *Task) LegacyPropagateError() (bool, error) {
1113+ var cerr *glib.Error
1093 1114
1094- return XGAsyncResultLegacyPropagateError(x.GoPointer())1115+ cret := XGAsyncResultLegacyPropagateError(x.GoPointer())
1116+ if cerr == nil {
1117+ return cret, nil
1118+ }
1119+ return cret, cerr
1095 1120
1096 }1121 }
1097 1122
M v4/gio/gtcpconnection.go +2 -2
@@ -31,8 +31,8 @@ var xTcpConnectionGetGracefulDisconnect func(uintptr) bool
31 // g_tcp_connection_set_graceful_disconnect().31 // g_tcp_connection_set_graceful_disconnect().
32 func (x *TcpConnection) GetGracefulDisconnect() bool {32 func (x *TcpConnection) GetGracefulDisconnect() bool {
33 33
34- return xTcpConnectionGetGracefulDisconnect(x.GoPointer())34+ cret := xTcpConnectionGetGracefulDisconnect(x.GoPointer())
35-35+ return cret
36 }36 }
37 37
38 var xTcpConnectionSetGracefulDisconnect func(uintptr, bool)38 var xTcpConnectionSetGracefulDisconnect func(uintptr, bool)
M v4/gio/gtcpwrapperconnection.go +18 -17 collapsed to keep the page light
M v4/gio/gthemedicon.go +35 -29 collapsed to keep the page light
M v4/gio/gthreadedsocketservice.go +9 -7
@@ -44,14 +44,16 @@ var xNewThreadedSocketService func(int) uintptr
44 // Creates a new #GThreadedSocketService with no listeners. Listeners44 // Creates a new #GThreadedSocketService with no listeners. Listeners
45 // must be added with one of the #GSocketListener "add" methods.45 // must be added with one of the #GSocketListener "add" methods.
46 func NewThreadedSocketService(MaxThreadsVar int) *SocketService {46 func NewThreadedSocketService(MaxThreadsVar int) *SocketService {
47- NewThreadedSocketServicePtr := xNewThreadedSocketService(MaxThreadsVar)47+ var cls *SocketService
48- if NewThreadedSocketServicePtr == 0 {48+
49- return nil49+ cret := xNewThreadedSocketService(MaxThreadsVar)
50- }
51 50
52- NewThreadedSocketServiceCls := &SocketService{}51+ if cret == 0 {
53- NewThreadedSocketServiceCls.Ptr = NewThreadedSocketServicePtr52+ return cls
54- return NewThreadedSocketServiceCls53+ }
54+ cls = &SocketService{}
55+ cls.Ptr = cret
56+ return cls
55 }57 }
56 58
57 func (c *ThreadedSocketService) GoPointer() uintptr {59 func (c *ThreadedSocketService) GoPointer() uintptr {
M v4/gio/gtlsbackend.go +33 -34 collapsed to keep the page light
M v4/gio/gtlscertificate.go +115 -74 collapsed to keep the page light
M v4/gio/gtlsclientconnection.go +29 -25 collapsed to keep the page light
M v4/gio/gtlsconnection.go +77 -65 collapsed to keep the page light
M v4/gio/gtlsdatabase.go +90 -50 collapsed to keep the page light
M v4/gio/gtlsfiledatabase.go +15 -9 collapsed to keep the page light
M v4/gio/gtlsinteraction.go +49 -18 collapsed to keep the page light
M v4/gio/gtlspassword.go +17 -15 collapsed to keep the page light
M v4/gio/gtlsserverconnection.go +15 -9 collapsed to keep the page light
M v4/gio/gunixconnection.go +61 -30 collapsed to keep the page light
M v4/gio/gunixcredentialsmessage.go +27 -24 collapsed to keep the page light
M v4/gio/gunixfdlist.go +41 -26 collapsed to keep the page light
M v4/gio/gunixfdmessage.go +38 -29 collapsed to keep the page light
M v4/gio/gunixinputstream.go +26 -19 collapsed to keep the page light
M v4/gio/gunixmounts.go +69 -67 collapsed to keep the page light
M v4/gio/gunixoutputstream.go +33 -21 collapsed to keep the page light
M v4/gio/gunixsocketaddress.go +53 -47 collapsed to keep the page light
M v4/gio/gvfs.go +32 -32 collapsed to keep the page light
M v4/gio/gvolume.go +81 -65 collapsed to keep the page light
M v4/gio/gvolumemonitor.go +22 -22 collapsed to keep the page light
M v4/gio/gzlibcompressor.go +26 -19 collapsed to keep the page light
M v4/gio/gzlibdecompressor.go +26 -19 collapsed to keep the page light
M v4/gio/main.go +2 -2 collapsed to keep the page light
M v4/glib/garray.go +15 -15 collapsed to keep the page light
M v4/glib/gatomic.go +28 -28 collapsed to keep the page light
M v4/glib/gbase64.go +12 -12 collapsed to keep the page light
M v4/glib/gbitlock.go +4 -4 collapsed to keep the page light
M v4/glib/gcharset.go +12 -12 collapsed to keep the page light
M v4/glib/gchecksum.go +8 -8 collapsed to keep the page light
M v4/glib/gconvert.go +84 -39 collapsed to keep the page light
M v4/glib/gdataset.go +16 -16 collapsed to keep the page light
M v4/glib/gdate.go +22 -22 collapsed to keep the page light
M v4/glib/genviron.go +14 -14 collapsed to keep the page light
M v4/glib/gerror.go +7 -2 collapsed to keep the page light
M v4/glib/gfileutils.go +86 -56 collapsed to keep the page light
M v4/glib/ggettext.go +12 -12 collapsed to keep the page light
M v4/glib/ghash.go +42 -42 collapsed to keep the page light
M v4/glib/ghmac.go +6 -6 collapsed to keep the page light
M v4/glib/ghook.go +2 -2 collapsed to keep the page light
M v4/glib/ghostutils.go +10 -10 collapsed to keep the page light
M v4/glib/giochannel.go +10 -10 collapsed to keep the page light
M v4/glib/glib-2.0.go +2 -2 collapsed to keep the page light
M v4/glib/glib-types.go +4 -4 collapsed to keep the page light
M v4/glib/glib-unix.go +36 -21 collapsed to keep the page light
M v4/glib/gmain.go +47 -47 collapsed to keep the page light
M v4/glib/gmarkup.go +8 -8 collapsed to keep the page light
M v4/glib/gmem.go +30 -30 collapsed to keep the page light
M v4/glib/gmessages.go +33 -33 collapsed to keep the page light
M v4/glib/goption.go +6 -6 collapsed to keep the page light
M v4/glib/gpattern.go +6 -6 collapsed to keep the page light
M v4/glib/gpoll.go +2 -2 collapsed to keep the page light
M v4/glib/gprimes.go +2 -2 collapsed to keep the page light
M v4/glib/gprintf.go +14 -14 collapsed to keep the page light
M v4/glib/gquark.go +12 -12 collapsed to keep the page light
M v4/glib/grand.go +8 -8 collapsed to keep the page light
M v4/glib/grcbox.go +20 -20 collapsed to keep the page light
M v4/glib/grefcount.go +8 -8 collapsed to keep the page light
M v4/glib/grefstring.go +10 -10 collapsed to keep the page light
M v4/glib/gregex.go +16 -11 collapsed to keep the page light
M v4/glib/gscanner.go +8 -8 collapsed to keep the page light
M v4/glib/gsequence.go +6 -6 collapsed to keep the page light
M v4/glib/gshell.go +18 -8 collapsed to keep the page light
M v4/glib/gslice.go +10 -10 collapsed to keep the page light
M v4/glib/gspawn.go +72 -27 collapsed to keep the page light
M v4/glib/gstdio.go +16 -11 collapsed to keep the page light
M v4/glib/gstrfuncs.go +126 -116 collapsed to keep the page light
M v4/glib/gstring.go +1 -1 collapsed to keep the page light
M v4/glib/gtestutils.go +45 -45 collapsed to keep the page light
M v4/glib/gthread.go +6 -6 collapsed to keep the page light
M v4/glib/gthreadpool.go +6 -6 collapsed to keep the page light
M v4/glib/gtimer.go +2 -2 collapsed to keep the page light
M v4/glib/gtrashstack.go +6 -6 collapsed to keep the page light
M v4/glib/gunicode.go +166 -136 collapsed to keep the page light
M v4/glib/guri.go +84 -44 collapsed to keep the page light
M v4/glib/gutils.go +53 -53 collapsed to keep the page light
M v4/glib/guuid.go +4 -4 collapsed to keep the page light
M v4/glib/gvariant.go +14 -9 collapsed to keep the page light
M v4/glib/gvarianttype.go +8 -8 collapsed to keep the page light
M v4/glib/gversion.go +2 -2 collapsed to keep the page light
M v4/glib/main.go +32 -32 collapsed to keep the page light
A v4/glib/more.go +15 -0 collapsed to keep the page light
M v4/gmodule/gmodule.go +6 -6 collapsed to keep the page light
M v4/gmodule/main.go +2 -2 collapsed to keep the page light
M v4/gobject/gboxed.go +4 -4 collapsed to keep the page light
M v4/gobject/gclosure.go +6 -6 collapsed to keep the page light
M v4/gobject/genums.go +24 -24 collapsed to keep the page light
M v4/gobject/gobject-2.0.go +75 -74 collapsed to keep the page light
M v4/gobject/gobject.go +122 -120 collapsed to keep the page light
M v4/gobject/gparam.go +50 -51 collapsed to keep the page light
M v4/gobject/gparamspecs.go +184 -184 collapsed to keep the page light
M v4/gobject/gsignal.go +45 -45 collapsed to keep the page light
M v4/gobject/gtype.go +103 -105 collapsed to keep the page light
M v4/gobject/gtypemodule.go +8 -8 collapsed to keep the page light
M v4/gobject/gvalue.go +4 -4 collapsed to keep the page light
M v4/gobject/gvaluetypes.go +6 -6 collapsed to keep the page light
M v4/graphene/graphene-box.go +12 -12 collapsed to keep the page light
M v4/graphene/graphene-point.go +2 -2 collapsed to keep the page light
M v4/graphene/graphene-point3d.go +2 -2 collapsed to keep the page light
M v4/graphene/graphene-rect.go +4 -4 collapsed to keep the page light
M v4/graphene/graphene-size.go +2 -2 collapsed to keep the page light
M v4/graphene/graphene-vec2.go +8 -8 collapsed to keep the page light
M v4/graphene/graphene-vec3.go +10 -10 collapsed to keep the page light
M v4/graphene/graphene-vec4.go +12 -12 collapsed to keep the page light
M v4/gsk/gskbroadwayrenderer.go +9 -7 collapsed to keep the page light
M v4/gsk/gskcairorenderer.go +9 -7 collapsed to keep the page light
M v4/gsk/gskglrenderer.go +9 -7 collapsed to keep the page light
M v4/gsk/gskglshader.go +56 -47 collapsed to keep the page light
M v4/gsk/gskrenderer.go +37 -30 collapsed to keep the page light
M v4/gsk/gskrendernode.go +37 -33 collapsed to keep the page light
M v4/gsk/gskrendernodeimpl.go +497 -465 collapsed to keep the page light
M v4/gsk/gsktransform.go +2 -2 collapsed to keep the page light
M v4/gsk/main.go +11 -9 collapsed to keep the page light
M v4/gtk/gtkaboutdialog.go +88 -92 collapsed to keep the page light
M v4/gtk/gtkaccelgroup.go +16 -16 collapsed to keep the page light
M v4/gtk/gtkaccessible.go +2 -2 collapsed to keep the page light
M v4/gtk/gtkactionable.go +4 -4 collapsed to keep the page light
M v4/gtk/gtkactionbar.go +24 -24 collapsed to keep the page light
M v4/gtk/gtkadjustment.go +23 -22 collapsed to keep the page light
M v4/gtk/gtkappchooser.go +10 -10 collapsed to keep the page light
M v4/gtk/gtkappchooserbutton.go +31 -30 collapsed to keep the page light
M v4/gtk/gtkappchooserdialog.go +79 -82 collapsed to keep the page light
M v4/gtk/gtkappchooserwidget.go +35 -34 collapsed to keep the page light
M v4/gtk/gtkapplication.go +80 -83 collapsed to keep the page light
M v4/gtk/gtkapplicationwindow.go +87 -92 collapsed to keep the page light
M v4/gtk/gtkaspectframe.go +30 -30 collapsed to keep the page light
M v4/gtk/gtkassistant.go +100 -106 collapsed to keep the page light
M v4/gtk/gtkatcontext.go +20 -19 collapsed to keep the page light
M v4/gtk/gtkbinlayout.go +9 -7 collapsed to keep the page light
M v4/gtk/gtkbitset.go +6 -6 collapsed to keep the page light
M v4/gtk/gtkbookmarklist.go +31 -29 collapsed to keep the page light
M v4/gtk/gtkboolfilter.go +20 -19 collapsed to keep the page light
M v4/gtk/gtkbox.go +21 -20 collapsed to keep the page light
M v4/gtk/gtkboxlayout.go +17 -15 collapsed to keep the page light
M v4/gtk/gtkbuildable.go +2 -2 collapsed to keep the page light
M v4/gtk/gtkbuilder.go +149 -94 collapsed to keep the page light
M v4/gtk/gtkbuilderlistitemfactory.go +31 -28 collapsed to keep the page light
M v4/gtk/gtkbuilderscope.go +11 -9 collapsed to keep the page light
M v4/gtk/gtkbutton.go +61 -58 collapsed to keep the page light
M v4/gtk/gtkcalendar.go +23 -22 collapsed to keep the page light
M v4/gtk/gtkcellarea.go +96 -102 collapsed to keep the page light
M v4/gtk/gtkcellareabox.go +26 -26 collapsed to keep the page light
M v4/gtk/gtkcellareacontext.go +9 -10 collapsed to keep the page light
M v4/gtk/gtkcelllayout.go +11 -12 collapsed to keep the page light
M v4/gtk/gtkcellrenderer.go +25 -26 collapsed to keep the page light
M v4/gtk/gtkcellrendereraccel.go +9 -8 collapsed to keep the page light
M v4/gtk/gtkcellrenderercombo.go +9 -8 collapsed to keep the page light
M v4/gtk/gtkcellrendererpixbuf.go +9 -8 collapsed to keep the page light
M v4/gtk/gtkcellrendererprogress.go +11 -10 collapsed to keep the page light
M v4/gtk/gtkcellrendererspin.go +9 -8 collapsed to keep the page light
M v4/gtk/gtkcellrendererspinner.go +9 -8 collapsed to keep the page light
M v4/gtk/gtkcellrenderertext.go +9 -8 collapsed to keep the page light
M v4/gtk/gtkcellrenderertoggle.go +15 -14 collapsed to keep the page light
M v4/gtk/gtkcellview.go +77 -74 collapsed to keep the page light
M v4/gtk/gtkcenterbox.go +44 -46 collapsed to keep the page light
M v4/gtk/gtkcenterlayout.go +40 -41 collapsed to keep the page light
M v4/gtk/gtkcheckbutton.go +52 -50 collapsed to keep the page light
M v4/gtk/gtkcolorbutton.go +28 -26 collapsed to keep the page light
M v4/gtk/gtkcolorchooser.go +2 -2 collapsed to keep the page light
M v4/gtk/gtkcolorchooserdialog.go +51 -54 collapsed to keep the page light
M v4/gtk/gtkcolorchooserwidget.go +15 -14 collapsed to keep the page light
M v4/gtk/gtkcolumnview.go +74 -78 collapsed to keep the page light
M v4/gtk/gtkcolumnviewcolumn.go +55 -57 collapsed to keep the page light
M v4/gtk/gtkcombobox.go +89 -88 collapsed to keep the page light
M v4/gtk/gtkcomboboxtext.go +35 -34 collapsed to keep the page light
M v4/gtk/gtkconstraint.go +54 -52 collapsed to keep the page light
M v4/gtk/gtkconstraintguide.go +13 -11 collapsed to keep the page light
M v4/gtk/gtkconstraintlayout.go +37 -30 collapsed to keep the page light
M v4/gtk/gtkcsserror.go +2 -2 collapsed to keep the page light
M v4/gtk/gtkcssprovider.go +11 -9 collapsed to keep the page light
M v4/gtk/gtkcustomfilter.go +9 -7 collapsed to keep the page light
M v4/gtk/gtkcustomlayout.go +9 -7 collapsed to keep the page light
M v4/gtk/gtkcustomsorter.go +9 -7 collapsed to keep the page light
M v4/gtk/gtkdebug.go +2 -2 collapsed to keep the page light
M v4/gtk/gtkdialog.go +96 -102 collapsed to keep the page light
M v4/gtk/gtkdirectorylist.go +42 -41 collapsed to keep the page light
M v4/gtk/gtkdragicon.go +49 -54 collapsed to keep the page light
M v4/gtk/gtkdragsource.go +29 -29 collapsed to keep the page light
M v4/gtk/gtkdrawingarea.go +17 -16 collapsed to keep the page light
M v4/gtk/gtkdropcontrollermotion.go +22 -21 collapsed to keep the page light
M v4/gtk/gtkdropdown.go +73 -76 collapsed to keep the page light
M v4/gtk/gtkdroptarget.go +37 -37 collapsed to keep the page light
M v4/gtk/gtkdroptargetasync.go +13 -11 collapsed to keep the page light
M v4/gtk/gtkeditable.go +33 -34 collapsed to keep the page light
M v4/gtk/gtkeditablelabel.go +42 -42 collapsed to keep the page light
M v4/gtk/gtkemojichooser.go +31 -32 collapsed to keep the page light
M v4/gtk/gtkentry.go +140 -144 collapsed to keep the page light
M v4/gtk/gtkentrybuffer.go +21 -19 collapsed to keep the page light
M v4/gtk/gtkentrycompletion.go +67 -66 collapsed to keep the page light
M v4/gtk/gtkenums.go +2 -2 collapsed to keep the page light
M v4/gtk/gtkeventcontroller.go +37 -40 collapsed to keep the page light
M v4/gtk/gtkeventcontrollerfocus.go +13 -11 collapsed to keep the page light
M v4/gtk/gtkeventcontrollerkey.go +22 -21 collapsed to keep the page light
M v4/gtk/gtkeventcontrollerlegacy.go +9 -7 collapsed to keep the page light
M v4/gtk/gtkeventcontrollermotion.go +13 -11 collapsed to keep the page light
M v4/gtk/gtkeventcontrollerscroll.go +13 -11 collapsed to keep the page light
M v4/gtk/gtkexpander.go +50 -50 collapsed to keep the page light
M v4/gtk/gtkexpression.go +135 -125 collapsed to keep the page light
M v4/gtk/gtkfilechooser.go +93 -74 collapsed to keep the page light
M v4/gtk/gtkfilechooserdialog.go +137 -120 collapsed to keep the page light
M v4/gtk/gtkfilechoosernative.go +101 -79 collapsed to keep the page light
M v4/gtk/gtkfilechooserwidget.go +101 -80 collapsed to keep the page light
M v4/gtk/gtkfilefilter.go +26 -22 collapsed to keep the page light
M v4/gtk/gtkfilter.go +4 -4 collapsed to keep the page light
M v4/gtk/gtkfilterlistmodel.go +45 -45 collapsed to keep the page light
M v4/gtk/gtkfixed.go +15 -14 collapsed to keep the page light
M v4/gtk/gtkfixedlayout.go +11 -9 collapsed to keep the page light
M v4/gtk/gtkflattenlistmodel.go +41 -41 collapsed to keep the page light
M v4/gtk/gtkflowbox.go +75 -76 collapsed to keep the page light
M v4/gtk/gtkfontbutton.go +72 -72 collapsed to keep the page light
M v4/gtk/gtkfontchooser.go +42 -44 collapsed to keep the page light
M v4/gtk/gtkfontchooserdialog.go +91 -96 collapsed to keep the page light
M v4/gtk/gtkfontchooserwidget.go +55 -56 collapsed to keep the page light
M v4/gtk/gtkframe.go +35 -36 collapsed to keep the page light
M v4/gtk/gtkgesture.go +44 -46 collapsed to keep the page light
M v4/gtk/gtkgestureclick.go +9 -7 collapsed to keep the page light
M v4/gtk/gtkgesturedrag.go +13 -11 collapsed to keep the page light
M v4/gtk/gtkgesturelongpress.go +11 -9 collapsed to keep the page light
M v4/gtk/gtkgesturepan.go +11 -9 collapsed to keep the page light
M v4/gtk/gtkgesturerotate.go +11 -9 collapsed to keep the page light
M v4/gtk/gtkgesturesingle.go +10 -10 collapsed to keep the page light
M v4/gtk/gtkgesturestylus.go +24 -23 collapsed to keep the page light
M v4/gtk/gtkgestureswipe.go +11 -9 collapsed to keep the page light
M v4/gtk/gtkgesturezoom.go +11 -9 collapsed to keep the page light
M v4/gtk/gtkglarea.go +32 -32 collapsed to keep the page light
M v4/gtk/gtkgrid.go +36 -36 collapsed to keep the page light
M v4/gtk/gtkgridlayout.go +29 -27 collapsed to keep the page light
M v4/gtk/gtkgridview.go +65 -68 collapsed to keep the page light
M v4/gtk/gtkheaderbar.go +26 -26 collapsed to keep the page light
M v4/gtk/gtkicontheme.go +85 -82 collapsed to keep the page light
M v4/gtk/gtkiconview.go +135 -136 collapsed to keep the page light
M v4/gtk/gtkimage.go +93 -88 collapsed to keep the page light
M v4/gtk/gtkimcontext.go +10 -10 collapsed to keep the page light
M v4/gtk/gtkimcontextsimple.go +9 -7 collapsed to keep the page light
M v4/gtk/gtkimmulticontext.go +11 -9 collapsed to keep the page light
M v4/gtk/gtkinfobar.go +37 -36 collapsed to keep the page light
M v4/gtk/gtkinscription.go +33 -32 collapsed to keep the page light
M v4/gtk/gtklabel.go +91 -92 collapsed to keep the page light
M v4/gtk/gtklayoutchild.go +18 -20 collapsed to keep the page light
M v4/gtk/gtklayoutmanager.go +20 -22 collapsed to keep the page light
M v4/gtk/gtklevelbar.go +36 -34 collapsed to keep the page light
M v4/gtk/gtklinkbutton.go +30 -28 collapsed to keep the page light
M v4/gtk/gtklistbase.go +30 -32 collapsed to keep the page light
M v4/gtk/gtklistbox.go +100 -104 collapsed to keep the page light
M v4/gtk/gtklistitem.go +26 -28 collapsed to keep the page light
M v4/gtk/gtkliststore.go +82 -78 collapsed to keep the page light
M v4/gtk/gtklistview.go +63 -66 collapsed to keep the page light
M v4/gtk/gtklockbutton.go +26 -26 collapsed to keep the page light
M v4/gtk/gtkmain.go +8 -8 collapsed to keep the page light
M v4/gtk/gtkmaplistmodel.go +34 -33 collapsed to keep the page light
M v4/gtk/gtkmediacontrols.go +22 -22 collapsed to keep the page light
M v4/gtk/gtkmediafile.go +79 -71 collapsed to keep the page light
M v4/gtk/gtkmediastream.go +42 -42 collapsed to keep the page light
M v4/gtk/gtkmenubutton.go +54 -56 collapsed to keep the page light
M v4/gtk/gtkmessagedialog.go +67 -70 collapsed to keep the page light
M v4/gtk/gtkmountoperation.go +29 -29 collapsed to keep the page light
M v4/gtk/gtkmultifilter.go +66 -62 collapsed to keep the page light
M v4/gtk/gtkmultiselection.go +52 -51 collapsed to keep the page light
M v4/gtk/gtkmultisorter.go +25 -23 collapsed to keep the page light
M v4/gtk/gtknative.go +27 -30 collapsed to keep the page light
M v4/gtk/gtknativedialog.go +15 -16 collapsed to keep the page light
M v4/gtk/gtknoselection.go +52 -51 collapsed to keep the page light
M v4/gtk/gtknotebook.go +111 -116 collapsed to keep the page light
M v4/gtk/gtknumericsorter.go +20 -19 collapsed to keep the page light
M v4/gtk/gtkorientable.go +2 -2 collapsed to keep the page light
M v4/gtk/gtkoverlay.go +26 -26 collapsed to keep the page light
M v4/gtk/gtkoverlaylayout.go +13 -11 collapsed to keep the page light
M v4/gtk/gtkpadcontroller.go +11 -9 collapsed to keep the page light
M v4/gtk/gtkpagesetup.go +102 -69 collapsed to keep the page light
M v4/gtk/gtkpagesetupunixdialog.go +67 -72 collapsed to keep the page light
M v4/gtk/gtkpaned.go +45 -46 collapsed to keep the page light
M v4/gtk/gtkpapersize.go +4 -4 collapsed to keep the page light
M v4/gtk/gtkpasswordentry.go +51 -52 collapsed to keep the page light
M v4/gtk/gtkpasswordentrybuffer.go +9 -7 collapsed to keep the page light
M v4/gtk/gtkpicture.go +84 -80 collapsed to keep the page light
M v4/gtk/gtkpopover.go +52 -54 collapsed to keep the page light
M v4/gtk/gtkpopovermenu.go +53 -54 collapsed to keep the page light
M v4/gtk/gtkpopovermenubar.go +26 -26 collapsed to keep the page light
M v4/gtk/gtkprintcontext.go +46 -48 collapsed to keep the page light
M v4/gtk/gtkprinter.go +57 -55 collapsed to keep the page light
M v4/gtk/gtkprintjob.go +76 -61 collapsed to keep the page light
M v4/gtk/gtkprintoperation.go +67 -57 collapsed to keep the page light
M v4/gtk/gtkprintoperationpreview.go +2 -2 collapsed to keep the page light
M v4/gtk/gtkprintsettings.go +150 -117 collapsed to keep the page light
M v4/gtk/gtkprintunixdialog.go +87 -92 collapsed to keep the page light
M v4/gtk/gtkprogressbar.go +27 -26 collapsed to keep the page light
M v4/gtk/gtkrange.go +31 -32 collapsed to keep the page light
M v4/gtk/gtkrecentmanager.go +53 -31 collapsed to keep the page light
M v4/gtk/gtkrevealer.go +30 -30 collapsed to keep the page light
M v4/gtk/gtkroot.go +18 -20 collapsed to keep the page light
M v4/gtk/gtkscale.go +41 -40 collapsed to keep the page light
M v4/gtk/gtkscalebutton.go +53 -56 collapsed to keep the page light
M v4/gtk/gtkscrollable.go +24 -26 collapsed to keep the page light
M v4/gtk/gtkscrollbar.go +24 -24 collapsed to keep the page light
M v4/gtk/gtkscrolledwindow.go +78 -82 collapsed to keep the page light
M v4/gtk/gtksearchbar.go +35 -36 collapsed to keep the page light
M v4/gtk/gtksearchentry.go +51 -52 collapsed to keep the page light
M v4/gtk/gtkselectionfiltermodel.go +32 -31 collapsed to keep the page light
M v4/gtk/gtkselectionmodel.go +20 -20 collapsed to keep the page light
M v4/gtk/gtkseparator.go +15 -14 collapsed to keep the page light
M v4/gtk/gtkshortcut.go +38 -36 collapsed to keep the page light
M v4/gtk/gtkshortcutaction.go +44 -36 collapsed to keep the page light
M v4/gtk/gtkshortcutcontroller.go +38 -34 collapsed to keep the page light
M v4/gtk/gtkshortcutlabel.go +17 -16 collapsed to keep the page light
M v4/gtk/gtkshortcutsgroup.go +6 -6 collapsed to keep the page light
M v4/gtk/gtkshortcutssection.go +6 -6 collapsed to keep the page light
M v4/gtk/gtkshortcutsshortcut.go +4 -4 collapsed to keep the page light
M v4/gtk/gtkshortcutswindow.go +40 -44 collapsed to keep the page light
M v4/gtk/gtkshortcuttrigger.go +74 -68 collapsed to keep the page light
M v4/gtk/gtkshow.go +9 -3 collapsed to keep the page light
M v4/gtk/gtksignallistitemfactory.go +9 -7 collapsed to keep the page light
M v4/gtk/gtksingleselection.go +67 -67 collapsed to keep the page light
M v4/gtk/gtksizegroup.go +15 -13 collapsed to keep the page light
M v4/gtk/gtksizerequest.go +2 -2 collapsed to keep the page light
M v4/gtk/gtkslicelistmodel.go +36 -35 collapsed to keep the page light
M v4/gtk/gtksnapshot.go +43 -41 collapsed to keep the page light
M v4/gtk/gtksorter.go +4 -4 collapsed to keep the page light
M v4/gtk/gtksortlistmodel.go +45 -45 collapsed to keep the page light
M v4/gtk/gtkspinbutton.go +76 -76 collapsed to keep the page light
M v4/gtk/gtkspinner.go +15 -14 collapsed to keep the page light
M v4/gtk/gtkstack.go +112 -118 collapsed to keep the page light
M v4/gtk/gtkstacksidebar.go +22 -22 collapsed to keep the page light
M v4/gtk/gtkstackswitcher.go +24 -24 collapsed to keep the page light
M v4/gtk/gtkstatusbar.go +17 -16 collapsed to keep the page light
M v4/gtk/gtkstringfilter.go +24 -23 collapsed to keep the page light
M v4/gtk/gtkstringlist.go +38 -34 collapsed to keep the page light
M v4/gtk/gtkstringsorter.go +20 -19 collapsed to keep the page light
M v4/gtk/gtkstylecontext.go +19 -20 collapsed to keep the page light
M v4/gtk/gtkswitch.go +21 -20 collapsed to keep the page light
M v4/gtk/gtktestatcontext.go +14 -14 collapsed to keep the page light
M v4/gtk/gtktestutils.go +2 -2 collapsed to keep the page light
M v4/gtk/gtktext.go +97 -98 collapsed to keep the page light
M v4/gtk/gtktextbuffer.go +120 -125 collapsed to keep the page light
M v4/gtk/gtktextchild.go +22 -18 collapsed to keep the page light
M v4/gtk/gtktextmark.go +26 -25 collapsed to keep the page light
M v4/gtk/gtktexttag.go +11 -9 collapsed to keep the page light
M v4/gtk/gtktexttagtable.go +24 -23 collapsed to keep the page light
M v4/gtk/gtktextview.go +151 -156 collapsed to keep the page light
M v4/gtk/gtktogglebutton.go +37 -34 collapsed to keep the page light
M v4/gtk/gtktreednd.go +26 -26 collapsed to keep the page light
M v4/gtk/gtktreeexpander.go +41 -42 collapsed to keep the page light
M v4/gtk/gtktreelistmodel.go +93 -93 collapsed to keep the page light
M v4/gtk/gtktreelistrowsorter.go +18 -17 collapsed to keep the page light
M v4/gtk/gtktreemodel.go +38 -38 collapsed to keep the page light
M v4/gtk/gtktreemodelfilter.go +65 -66 collapsed to keep the page light
M v4/gtk/gtktreemodelsort.go +80 -79 collapsed to keep the page light
M v4/gtk/gtktreeselection.go +25 -26 collapsed to keep the page light
M v4/gtk/gtktreesortable.go +4 -4 collapsed to keep the page light
M v4/gtk/gtktreestore.go +86 -82 collapsed to keep the page light
M v4/gtk/gtktreeview.go +165 -170 collapsed to keep the page light
M v4/gtk/gtktreeviewcolumn.go +105 -106 collapsed to keep the page light
M v4/gtk/gtkversion.go +12 -12 collapsed to keep the page light
M v4/gtk/gtkvideo.go +71 -68 collapsed to keep the page light
M v4/gtk/gtkviewport.go +48 -50 collapsed to keep the page light
M v4/gtk/gtkvolumebutton.go +15 -14 collapsed to keep the page light
M v4/gtk/gtkwidget.go +357 -378 collapsed to keep the page light
M v4/gtk/gtkwidgetpaintable.go +34 -33 collapsed to keep the page light
M v4/gtk/gtkwindow.go +133 -142 collapsed to keep the page light
M v4/gtk/gtkwindowcontrols.go +19 -18 collapsed to keep the page light
M v4/gtk/gtkwindowgroup.go +11 -9 collapsed to keep the page light
M v4/gtk/gtkwindowhandle.go +22 -22 collapsed to keep the page light
M v4/gtk/main.go +10 -10 collapsed to keep the page light
M v4/pango/main.go +2 -2 collapsed to keep the page light
M v4/pango/pango-attributes.go +84 -84 collapsed to keep the page light
M v4/pango/pango-bidi-type.go +8 -8 collapsed to keep the page light
M v4/pango/pango-context.go +54 -53 collapsed to keep the page light
M v4/pango/pango-coverage.go +27 -25 collapsed to keep the page light
M v4/pango/pango-font.go +72 -76 collapsed to keep the page light
M v4/pango/pango-fontmap.go +36 -37 collapsed to keep the page light
M v4/pango/pango-fontset.go +21 -19 collapsed to keep the page light
M v4/pango/pango-glyph-item.go +1 -1 collapsed to keep the page light
M v4/pango/pango-gravity.go +8 -8 collapsed to keep the page light
M v4/pango/pango-item.go +6 -6 collapsed to keep the page light
M v4/pango/pango-language.go +6 -6 collapsed to keep the page light
M v4/pango/pango-layout.go +98 -92 collapsed to keep the page light
M v4/pango/pango-markup.go +18 -8 collapsed to keep the page light
M v4/pango/pango-renderer.go +17 -18 collapsed to keep the page light
M v4/pango/pango-script.go +4 -4 collapsed to keep the page light
M v4/pango/pango-tabs.go +2 -2 collapsed to keep the page light
M v4/pango/pango-types.go +4 -4 collapsed to keep the page light
M v4/pango/pango-utils.go +34 -34 collapsed to keep the page light
M v4/pangocairo/pangocairo.go +61 -62 collapsed to keep the page light

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 102

↑↓ moveenter openesc close