Merge pull request #344 from bnema/chore/upstream-foundations
chore(deps): integrate approved upstream foundations
921 files · +28709 -25527
M docs/first-presentation.md +5 -2
| @@ -46,5 +46,8 @@ labels. Set `DUMBER_MACHINE_GPU_PROFILE` to one of `generic-gpu`, | |||
| 46 | 46 | `integrated-gpu`, `discrete-gpu`, `hybrid-gpu`, `virtual-gpu`, or `unknown-gpu`; | |
| 47 | 47 | do not use a device model or other identifier. Publish only the seven reviewed | |
| 48 | 48 | JSON files to an external Gist. Raw logs and temporary XDG homes are removed and | |
| 49 | - | must not be published. A missing or incomplete timeline, non-DMABUF backend, or | |
| 50 | - | invalid run fails collection. | |
| 49 | + | must not be published. `metadata.json` derives the selected | |
| 50 | + | `github.com/bnema/purego-cef2gtk` pseudo-version and its full immutable Git | |
| 51 | + | origin hash from Go module metadata; branch selectors or missing origin metadata | |
| 52 | + | fail collection. A missing or incomplete timeline, non-DMABUF backend, or invalid | |
| 53 | + | run also fails collection. | |
| @@ -46,5 +46,8 @@ labels. Set `DUMBER_MACHINE_GPU_PROFILE` to one of `generic-gpu`, | |||||
| 46 | `integrated-gpu`, `discrete-gpu`, `hybrid-gpu`, `virtual-gpu`, or `unknown-gpu`; | 46 | `integrated-gpu`, `discrete-gpu`, `hybrid-gpu`, `virtual-gpu`, or `unknown-gpu`; | ||
| 47 | do not use a device model or other identifier. Publish only the seven reviewed | 47 | do not use a device model or other identifier. Publish only the seven reviewed | ||
| 48 | JSON files to an external Gist. Raw logs and temporary XDG homes are removed and | 48 | JSON files to an external Gist. Raw logs and temporary XDG homes are removed and | ||
| 49 | - | must not be published. A missing or incomplete timeline, non-DMABUF backend, or | 49 | + | must not be published. `metadata.json` derives the selected |
| 50 | - | invalid run fails collection. | 50 | + | `github.com/bnema/purego-cef2gtk` pseudo-version and its full immutable Git |
| 51 | + | origin hash from Go module metadata; branch selectors or missing origin metadata | |||
| 52 | + | fail collection. A missing or incomplete timeline, non-DMABUF backend, or invalid | |||
| 53 | + | run also fails collection. | |||
M go.mod +5 -5
| @@ -6,11 +6,11 @@ require ( | |||
| 6 | 6 | github.com/a-h/templ v0.3.1020 | |
| 7 | 7 | github.com/andybalholm/brotli v1.2.2 | |
| 8 | 8 | github.com/bnema/purego v0.11.0-bnema.4 | |
| 9 | - | github.com/bnema/purego-cef v0.13.3 | |
| 10 | - | github.com/bnema/purego-cef2gtk v0.8.4 | |
| 11 | - | github.com/bnema/purego-pipewire v0.1.4 | |
| 12 | - | github.com/bnema/purego-sqlite v0.1.3 | |
| 13 | - | github.com/bnema/puregotk v0.7.0 | |
| 9 | + | github.com/bnema/purego-cef v0.13.4-0.20260714140305-f0b7414af67e | |
| 10 | + | github.com/bnema/purego-cef2gtk v0.8.4-0.20260714160309-bbd397409ebe | |
| 11 | + | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | |
| 12 | + | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | |
| 13 | + | github.com/bnema/puregotk v0.7.1-0.20260714170452-0b6b9b901234 | |
| 14 | 14 | github.com/charmbracelet/bubbles v1.0.0 | |
| 15 | 15 | github.com/charmbracelet/bubbletea v1.3.10 | |
| 16 | 16 | github.com/charmbracelet/lipgloss v1.1.0 | |
| @@ -6,11 +6,11 @@ require ( | |||||
| 6 | github.com/a-h/templ v0.3.1020 | 6 | github.com/a-h/templ v0.3.1020 | ||
| 7 | github.com/andybalholm/brotli v1.2.2 | 7 | github.com/andybalholm/brotli v1.2.2 | ||
| 8 | github.com/bnema/purego v0.11.0-bnema.4 | 8 | github.com/bnema/purego v0.11.0-bnema.4 | ||
| 9 | - | github.com/bnema/purego-cef v0.13.3 | 9 | + | github.com/bnema/purego-cef v0.13.4-0.20260714140305-f0b7414af67e |
| 10 | - | github.com/bnema/purego-cef2gtk v0.8.4 | 10 | + | github.com/bnema/purego-cef2gtk v0.8.4-0.20260714160309-bbd397409ebe |
| 11 | - | github.com/bnema/purego-pipewire v0.1.4 | 11 | + | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a |
| 12 | - | github.com/bnema/purego-sqlite v0.1.3 | 12 | + | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c |
| 13 | - | github.com/bnema/puregotk v0.7.0 | 13 | + | github.com/bnema/puregotk v0.7.1-0.20260714170452-0b6b9b901234 |
| 14 | github.com/charmbracelet/bubbles v1.0.0 | 14 | github.com/charmbracelet/bubbles v1.0.0 | ||
| 15 | github.com/charmbracelet/bubbletea v1.3.10 | 15 | github.com/charmbracelet/bubbletea v1.3.10 | ||
| 16 | github.com/charmbracelet/lipgloss v1.1.0 | 16 | github.com/charmbracelet/lipgloss v1.1.0 | ||
M go.sum +12 -0 generated file: collapsed
A internal/infrastructure/persistence/sqlite/history_repo_benchmark_test.go +71 -0
| @@ -0,0 +1,71 @@ | |||
| 1 | + | package sqlite_test | |
| 2 | + | ||
| 3 | + | import ( | |
| 4 | + | "fmt" | |
| 5 | + | "path/filepath" | |
| 6 | + | "testing" | |
| 7 | + | ||
| 8 | + | "github.com/bnema/dumber/internal/domain/entity" | |
| 9 | + | "github.com/bnema/dumber/internal/domain/repository" | |
| 10 | + | "github.com/bnema/dumber/internal/infrastructure/persistence/sqlite" | |
| 11 | + | ) | |
| 12 | + | ||
| 13 | + | // newHistoryBenchmarkRepository creates a representative local history corpus | |
| 14 | + | // outside the measured operation. Sidebar reads use GetRecent and omnibox | |
| 15 | + | // history suggestions use Search. | |
| 16 | + | func newHistoryBenchmarkRepository(b *testing.B) (repository.HistoryRepository, func()) { | |
| 17 | + | b.Helper() | |
| 18 | + | ||
| 19 | + | ctx := historyTestCtx() | |
| 20 | + | db, err := sqlite.NewConnection(ctx, filepath.Join(b.TempDir(), "dumber.db")) | |
| 21 | + | if err != nil { | |
| 22 | + | b.Fatal(err) | |
| 23 | + | } | |
| 24 | + | ||
| 25 | + | b.Cleanup(func() { | |
| 26 | + | if err := db.Close(); err != nil { | |
| 27 | + | b.Errorf("close benchmark database: %v", err) | |
| 28 | + | } | |
| 29 | + | }) | |
| 30 | + | ||
| 31 | + | repo := sqlite.NewHistoryRepository(db) | |
| 32 | + | for i := range 200 { | |
| 33 | + | entry := &entity.HistoryEntry{ | |
| 34 | + | URL: fmt.Sprintf("https://example%d.test/dumber/history/%d", i%20, i), | |
| 35 | + | Title: fmt.Sprintf("Dumber history entry %d", i), | |
| 36 | + | } | |
| 37 | + | if err := repo.Save(ctx, entry); err != nil { | |
| 38 | + | b.Fatal(err) | |
| 39 | + | } | |
| 40 | + | } | |
| 41 | + | ||
| 42 | + | return repo, func() {} | |
| 43 | + | } | |
| 44 | + | ||
| 45 | + | func BenchmarkHistorySQLiteSidebarRecent(b *testing.B) { | |
| 46 | + | repo, closeDB := newHistoryBenchmarkRepository(b) | |
| 47 | + | defer closeDB() | |
| 48 | + | ctx := historyTestCtx() | |
| 49 | + | ||
| 50 | + | b.ReportAllocs() | |
| 51 | + | b.ResetTimer() | |
| 52 | + | for range b.N { | |
| 53 | + | if _, err := repo.GetRecent(ctx, 50, 0); err != nil { | |
| 54 | + | b.Fatal(err) | |
| 55 | + | } | |
| 56 | + | } | |
| 57 | + | } | |
| 58 | + | ||
| 59 | + | func BenchmarkHistorySQLiteOmniboxSearch(b *testing.B) { | |
| 60 | + | repo, closeDB := newHistoryBenchmarkRepository(b) | |
| 61 | + | defer closeDB() | |
| 62 | + | ctx := historyTestCtx() | |
| 63 | + | ||
| 64 | + | b.ReportAllocs() | |
| 65 | + | b.ResetTimer() | |
| 66 | + | for range b.N { | |
| 67 | + | if _, err := repo.Search(ctx, "dumber history", 10); err != nil { | |
| 68 | + | b.Fatal(err) | |
| 69 | + | } | |
| 70 | + | } | |
| 71 | + | } | |
| @@ -0,0 +1,71 @@ | |||||
| 1 | + | package sqlite_test | |||
| 2 | + | ||||
| 3 | + | import ( | |||
| 4 | + | "fmt" | |||
| 5 | + | "path/filepath" | |||
| 6 | + | "testing" | |||
| 7 | + | ||||
| 8 | + | "github.com/bnema/dumber/internal/domain/entity" | |||
| 9 | + | "github.com/bnema/dumber/internal/domain/repository" | |||
| 10 | + | "github.com/bnema/dumber/internal/infrastructure/persistence/sqlite" | |||
| 11 | + | ) | |||
| 12 | + | ||||
| 13 | + | // newHistoryBenchmarkRepository creates a representative local history corpus | |||
| 14 | + | // outside the measured operation. Sidebar reads use GetRecent and omnibox | |||
| 15 | + | // history suggestions use Search. | |||
| 16 | + | func newHistoryBenchmarkRepository(b *testing.B) (repository.HistoryRepository, func()) { | |||
| 17 | + | b.Helper() | |||
| 18 | + | ||||
| 19 | + | ctx := historyTestCtx() | |||
| 20 | + | db, err := sqlite.NewConnection(ctx, filepath.Join(b.TempDir(), "dumber.db")) | |||
| 21 | + | if err != nil { | |||
| 22 | + | b.Fatal(err) | |||
| 23 | + | } | |||
| 24 | + | ||||
| 25 | + | b.Cleanup(func() { | |||
| 26 | + | if err := db.Close(); err != nil { | |||
| 27 | + | b.Errorf("close benchmark database: %v", err) | |||
| 28 | + | } | |||
| 29 | + | }) | |||
| 30 | + | ||||
| 31 | + | repo := sqlite.NewHistoryRepository(db) | |||
| 32 | + | for i := range 200 { | |||
| 33 | + | entry := &entity.HistoryEntry{ | |||
| 34 | + | URL: fmt.Sprintf("https://example%d.test/dumber/history/%d", i%20, i), | |||
| 35 | + | Title: fmt.Sprintf("Dumber history entry %d", i), | |||
| 36 | + | } | |||
| 37 | + | if err := repo.Save(ctx, entry); err != nil { | |||
| 38 | + | b.Fatal(err) | |||
| 39 | + | } | |||
| 40 | + | } | |||
| 41 | + | ||||
| 42 | + | return repo, func() {} | |||
| 43 | + | } | |||
| 44 | + | ||||
| 45 | + | func BenchmarkHistorySQLiteSidebarRecent(b *testing.B) { | |||
| 46 | + | repo, closeDB := newHistoryBenchmarkRepository(b) | |||
| 47 | + | defer closeDB() | |||
| 48 | + | ctx := historyTestCtx() | |||
| 49 | + | ||||
| 50 | + | b.ReportAllocs() | |||
| 51 | + | b.ResetTimer() | |||
| 52 | + | for range b.N { | |||
| 53 | + | if _, err := repo.GetRecent(ctx, 50, 0); err != nil { | |||
| 54 | + | b.Fatal(err) | |||
| 55 | + | } | |||
| 56 | + | } | |||
| 57 | + | } | |||
| 58 | + | ||||
| 59 | + | func BenchmarkHistorySQLiteOmniboxSearch(b *testing.B) { | |||
| 60 | + | repo, closeDB := newHistoryBenchmarkRepository(b) | |||
| 61 | + | defer closeDB() | |||
| 62 | + | ctx := historyTestCtx() | |||
| 63 | + | ||||
| 64 | + | b.ReportAllocs() | |||
| 65 | + | b.ResetTimer() | |||
| 66 | + | for range b.N { | |||
| 67 | + | if _, err := repo.Search(ctx, "dumber history", 10); err != nil { | |||
| 68 | + | b.Fatal(err) | |||
| 69 | + | } | |||
| 70 | + | } | |||
| 71 | + | } | |||
M internal/logging/first_presentation_collector_test.go +132 -1
| @@ -2,6 +2,7 @@ package logging | |||
| 2 | 2 | ||
| 3 | 3 | import ( | |
| 4 | 4 | "encoding/json" | |
| 5 | + | "fmt" | |
| 5 | 6 | "os" | |
| 6 | 7 | "os/exec" | |
| 7 | 8 | "path/filepath" | |
| @@ -143,8 +144,9 @@ func TestFirstPresentationCollectorSanitizesMachineLocalValues(t *testing.T) { | |||
| 143 | 144 | } | |
| 144 | 145 | for _, required := range []string{ | |
| 145 | 146 | `"measured_source_revision"`, | |
| 147 | + | `"version": "v0.8.4-0.20260714160309-bbd397409ebe"`, | |
| 146 | 148 | `"tag": "v0.8.4"`, | |
| 147 | - | `"revision": "f217ece342dea3ef2a3f98671fcd16a39ad0037d"`, | |
| 149 | + | `"revision": "bbd397409ebed75a5979c1e4566a2ef319f6a484"`, | |
| 148 | 150 | } { | |
| 149 | 151 | require.Contains(t, artifacts.String(), required) | |
| 150 | 152 | } | |
| @@ -166,6 +168,135 @@ func TestFirstPresentationCollectorSanitizesMachineLocalValues(t *testing.T) { | |||
| 166 | 168 | require.Equal(t, "integrated-gpu", metadata.Comparison.MachineGPUProfile) | |
| 167 | 169 | } | |
| 168 | 170 | ||
| 171 | + | func TestFirstPresentationCollectorDerivesSelectedImmutableModuleProvenance(t *testing.T) { | |
| 172 | + | repoRoot, err := filepath.Abs(filepath.Join("..", "..")) | |
| 173 | + | require.NoError(t, err) | |
| 174 | + | temp := t.TempDir() | |
| 175 | + | runtime := filepath.Join(temp, "cef-147-runtime") | |
| 176 | + | require.NoError(t, os.Mkdir(runtime, 0o755)) | |
| 177 | + | binary := filepath.Join(temp, "dumber") | |
| 178 | + | require.NoError(t, os.WriteFile(binary, collectorTestBinary(validFirstPresentationLog), 0o755)) | |
| 179 | + | ||
| 180 | + | // This exact pseudo-version is deliberately newer than the former v0.8.4 | |
| 181 | + | // hardcode; the collector must report what the selected module says. | |
| 182 | + | const version = "v0.8.5-0.20300102030405-bbd397409ebe" | |
| 183 | + | const revision = "bbd397409ebed75a5979c1e4566a2ef319f6a484" | |
| 184 | + | goBin := collectorProvenanceGo(t, temp, version, revision, "") | |
| 185 | + | output := filepath.Join(temp, "artifacts") | |
| 186 | + | cmd := exec.Command(filepath.Join(repoRoot, "scripts", "collect_first_presentation.sh")) | |
| 187 | + | cmd.Dir = repoRoot | |
| 188 | + | cmd.Env = append(os.Environ(), | |
| 189 | + | "DISPLAY=:test", | |
| 190 | + | "DUMBER_CEF_DIR="+runtime, | |
| 191 | + | "DUMBER_FIRST_PRESENTATION_BIN="+binary, | |
| 192 | + | "DUMBER_FIRST_PRESENTATION_OUTPUT="+output, | |
| 193 | + | "DUMBER_FIRST_PRESENTATION_TIMEOUT_SECONDS=1", | |
| 194 | + | "PATH="+filepath.Dir(goBin)+":"+os.Getenv("PATH"), | |
| 195 | + | ) | |
| 196 | + | result, err := cmd.CombinedOutput() | |
| 197 | + | require.NoErrorf(t, err, "collector failed: %s", result) | |
| 198 | + | ||
| 199 | + | var metadata struct { | |
| 200 | + | Upstream struct { | |
| 201 | + | Module string `json:"module"` | |
| 202 | + | Version string `json:"version"` | |
| 203 | + | Tag string `json:"tag"` | |
| 204 | + | Revision string `json:"revision"` | |
| 205 | + | } `json:"upstream"` | |
| 206 | + | } | |
| 207 | + | contents, err := os.ReadFile(filepath.Join(output, "metadata.json")) | |
| 208 | + | require.NoError(t, err) | |
| 209 | + | require.NoError(t, json.Unmarshal(contents, &metadata)) | |
| 210 | + | require.Equal(t, "github.com/bnema/purego-cef2gtk", metadata.Upstream.Module) | |
| 211 | + | require.Equal(t, version, metadata.Upstream.Version) | |
| 212 | + | require.Equal(t, "v0.8.5", metadata.Upstream.Tag) | |
| 213 | + | require.Equal(t, revision, metadata.Upstream.Revision) | |
| 214 | + | ||
| 215 | + | script, err := os.ReadFile(filepath.Join(repoRoot, "scripts", "collect_first_presentation.sh")) | |
| 216 | + | require.NoError(t, err) | |
| 217 | + | require.NotContains(t, string(script), "f217ece342dea3ef2a3f98671fcd16a39ad0037d") | |
| 218 | + | } | |
| 219 | + | ||
| 220 | + | func TestFirstPresentationCollectorRejectsNonImmutableModuleProvenanceWithoutLeaks(t *testing.T) { | |
| 221 | + | repoRoot, err := filepath.Abs(filepath.Join("..", "..")) | |
| 222 | + | require.NoError(t, err) | |
| 223 | + | ||
| 224 | + | for _, test := range []struct { | |
| 225 | + | name, version, revision, ref string | |
| 226 | + | }{ | |
| 227 | + | {name: "branch selector", version: "main", ref: "main"}, | |
| 228 | + | {name: "missing origin", version: "v0.8.5-0.20300102030405-bbd397409ebe"}, | |
| 229 | + | {name: "named origin ref", version: "v0.8.5-0.20300102030405-bbd397409ebe", revision: "bbd397409ebed75a5979c1e4566a2ef319f6a484", ref: "main"}, | |
| 230 | + | } { | |
| 231 | + | t.Run(test.name, func(t *testing.T) { | |
| 232 | + | temp := t.TempDir() | |
| 233 | + | runtime := filepath.Join(temp, "cef-147-runtime") | |
| 234 | + | require.NoError(t, os.Mkdir(runtime, 0o755)) | |
| 235 | + | binary := filepath.Join(temp, "dumber") | |
| 236 | + | require.NoError(t, os.WriteFile(binary, collectorTestBinary(validFirstPresentationLog), 0o755)) | |
| 237 | + | ||
| 238 | + | goBin := collectorProvenanceGo(t, temp, test.version, test.revision, test.ref) | |
| 239 | + | output := filepath.Join(temp, "artifacts") | |
| 240 | + | cmd := exec.Command(filepath.Join(repoRoot, "scripts", "collect_first_presentation.sh")) | |
| 241 | + | cmd.Dir = repoRoot | |
| 242 | + | cmd.Env = append(os.Environ(), | |
| 243 | + | "DISPLAY=:test", | |
| 244 | + | "DUMBER_CEF_DIR="+runtime, | |
| 245 | + | "DUMBER_FIRST_PRESENTATION_BIN="+binary, | |
| 246 | + | "DUMBER_FIRST_PRESENTATION_OUTPUT="+output, | |
| 247 | + | "PATH="+filepath.Dir(goBin)+":"+os.Getenv("PATH"), | |
| 248 | + | ) | |
| 249 | + | result, runErr := cmd.CombinedOutput() | |
| 250 | + | require.Errorf(t, runErr, "collector accepted nonimmutable module provenance: %s", result) | |
| 251 | + | require.Contains(t, string(result), "immutable module provenance is unavailable") | |
| 252 | + | require.NotContains(t, string(result), temp) | |
| 253 | + | require.NoFileExists(t, filepath.Join(output, "metadata.json")) | |
| 254 | + | for _, name := range runArtifactNames() { | |
| 255 | + | require.NoFileExists(t, filepath.Join(output, name)) | |
| 256 | + | } | |
| 257 | + | }) | |
| 258 | + | } | |
| 259 | + | } | |
| 260 | + | ||
| 261 | + | func collectorProvenanceGo(t *testing.T, temp, version, revision, ref string) string { | |
| 262 | + | t.Helper() | |
| 263 | + | infoPath := filepath.Join(temp, "module.info") | |
| 264 | + | info := map[string]any{"Version": version} | |
| 265 | + | if revision != "" { | |
| 266 | + | info["Origin"] = map[string]string{ | |
| 267 | + | "VCS": "git", "URL": "https://github.com/bnema/purego-cef2gtk", "Hash": revision, "Ref": ref, | |
| 268 | + | } | |
| 269 | + | } | |
| 270 | + | infoJSON, err := json.Marshal(info) | |
| 271 | + | require.NoError(t, err) | |
| 272 | + | require.NoError(t, os.WriteFile(infoPath, infoJSON, 0o600)) | |
| 273 | + | ||
| 274 | + | selectedJSON, err := json.Marshal(map[string]string{ | |
| 275 | + | "Path": "github.com/bnema/purego-cef2gtk", "Version": version, | |
| 276 | + | }) | |
| 277 | + | require.NoError(t, err) | |
| 278 | + | downloadedJSON, err := json.Marshal(map[string]string{ | |
| 279 | + | "Path": "github.com/bnema/purego-cef2gtk", "Version": version, "Info": infoPath, | |
| 280 | + | }) | |
| 281 | + | require.NoError(t, err) | |
| 282 | + | binDir := filepath.Join(temp, "bin") | |
| 283 | + | require.NoError(t, os.Mkdir(binDir, 0o755)) | |
| 284 | + | goBin := filepath.Join(binDir, "go") | |
| 285 | + | script := fmt.Sprintf(`#!/bin/sh | |
| 286 | + | if [ "$1" = "list" ] && [ "$2" = "-m" ] && [ "$3" = "-json" ] && [ "$4" = "github.com/bnema/purego-cef2gtk" ]; then | |
| 287 | + | printf '%%s\n' '%s' | |
| 288 | + | exit 0 | |
| 289 | + | fi | |
| 290 | + | if [ "$1" = "mod" ] && [ "$2" = "download" ] && [ "$3" = "-json" ] && [ "$4" = "github.com/bnema/purego-cef2gtk@%s" ]; then | |
| 291 | + | printf '%%s\n' '%s' | |
| 292 | + | exit 0 | |
| 293 | + | fi | |
| 294 | + | exit 1 | |
| 295 | + | `, selectedJSON, version, downloadedJSON) | |
| 296 | + | require.NoError(t, os.WriteFile(goBin, []byte(script), 0o755)) | |
| 297 | + | return goBin | |
| 298 | + | } | |
| 299 | + | ||
| 169 | 300 | func TestFirstPresentationCollectorDefaultsToXDGStateEvidenceDirectory(t *testing.T) { | |
| 170 | 301 | repoRoot, err := filepath.Abs(filepath.Join("..", "..")) | |
| 171 | 302 | require.NoError(t, err) | |
| @@ -2,6 +2,7 @@ package logging | |||||
| 2 | 2 | ||||
| 3 | import ( | 3 | import ( | ||
| 4 | "encoding/json" | 4 | "encoding/json" | ||
| 5 | + | "fmt" | |||
| 5 | "os" | 6 | "os" | ||
| 6 | "os/exec" | 7 | "os/exec" | ||
| 7 | "path/filepath" | 8 | "path/filepath" | ||
| @@ -143,8 +144,9 @@ func TestFirstPresentationCollectorSanitizesMachineLocalValues(t *testing.T) { | |||||
| 143 | } | 144 | } | ||
| 144 | for _, required := range []string{ | 145 | for _, required := range []string{ | ||
| 145 | `"measured_source_revision"`, | 146 | `"measured_source_revision"`, | ||
| 147 | + | `"version": "v0.8.4-0.20260714160309-bbd397409ebe"`, | |||
| 146 | `"tag": "v0.8.4"`, | 148 | `"tag": "v0.8.4"`, | ||
| 147 | - | `"revision": "f217ece342dea3ef2a3f98671fcd16a39ad0037d"`, | 149 | + | `"revision": "bbd397409ebed75a5979c1e4566a2ef319f6a484"`, |
| 148 | } { | 150 | } { | ||
| 149 | require.Contains(t, artifacts.String(), required) | 151 | require.Contains(t, artifacts.String(), required) | ||
| 150 | } | 152 | } | ||
| @@ -166,6 +168,135 @@ func TestFirstPresentationCollectorSanitizesMachineLocalValues(t *testing.T) { | |||||
| 166 | require.Equal(t, "integrated-gpu", metadata.Comparison.MachineGPUProfile) | 168 | require.Equal(t, "integrated-gpu", metadata.Comparison.MachineGPUProfile) | ||
| 167 | } | 169 | } | ||
| 168 | 170 | ||||
| 171 | + | func TestFirstPresentationCollectorDerivesSelectedImmutableModuleProvenance(t *testing.T) { | |||
| 172 | + | repoRoot, err := filepath.Abs(filepath.Join("..", "..")) | |||
| 173 | + | require.NoError(t, err) | |||
| 174 | + | temp := t.TempDir() | |||
| 175 | + | runtime := filepath.Join(temp, "cef-147-runtime") | |||
| 176 | + | require.NoError(t, os.Mkdir(runtime, 0o755)) | |||
| 177 | + | binary := filepath.Join(temp, "dumber") | |||
| 178 | + | require.NoError(t, os.WriteFile(binary, collectorTestBinary(validFirstPresentationLog), 0o755)) | |||
| 179 | + | ||||
| 180 | + | // This exact pseudo-version is deliberately newer than the former v0.8.4 | |||
| 181 | + | // hardcode; the collector must report what the selected module says. | |||
| 182 | + | const version = "v0.8.5-0.20300102030405-bbd397409ebe" | |||
| 183 | + | const revision = "bbd397409ebed75a5979c1e4566a2ef319f6a484" | |||
| 184 | + | goBin := collectorProvenanceGo(t, temp, version, revision, "") | |||
| 185 | + | output := filepath.Join(temp, "artifacts") | |||
| 186 | + | cmd := exec.Command(filepath.Join(repoRoot, "scripts", "collect_first_presentation.sh")) | |||
| 187 | + | cmd.Dir = repoRoot | |||
| 188 | + | cmd.Env = append(os.Environ(), | |||
| 189 | + | "DISPLAY=:test", | |||
| 190 | + | "DUMBER_CEF_DIR="+runtime, | |||
| 191 | + | "DUMBER_FIRST_PRESENTATION_BIN="+binary, | |||
| 192 | + | "DUMBER_FIRST_PRESENTATION_OUTPUT="+output, | |||
| 193 | + | "DUMBER_FIRST_PRESENTATION_TIMEOUT_SECONDS=1", | |||
| 194 | + | "PATH="+filepath.Dir(goBin)+":"+os.Getenv("PATH"), | |||
| 195 | + | ) | |||
| 196 | + | result, err := cmd.CombinedOutput() | |||
| 197 | + | require.NoErrorf(t, err, "collector failed: %s", result) | |||
| 198 | + | ||||
| 199 | + | var metadata struct { | |||
| 200 | + | Upstream struct { | |||
| 201 | + | Module string `json:"module"` | |||
| 202 | + | Version string `json:"version"` | |||
| 203 | + | Tag string `json:"tag"` | |||
| 204 | + | Revision string `json:"revision"` | |||
| 205 | + | } `json:"upstream"` | |||
| 206 | + | } | |||
| 207 | + | contents, err := os.ReadFile(filepath.Join(output, "metadata.json")) | |||
| 208 | + | require.NoError(t, err) | |||
| 209 | + | require.NoError(t, json.Unmarshal(contents, &metadata)) | |||
| 210 | + | require.Equal(t, "github.com/bnema/purego-cef2gtk", metadata.Upstream.Module) | |||
| 211 | + | require.Equal(t, version, metadata.Upstream.Version) | |||
| 212 | + | require.Equal(t, "v0.8.5", metadata.Upstream.Tag) | |||
| 213 | + | require.Equal(t, revision, metadata.Upstream.Revision) | |||
| 214 | + | ||||
| 215 | + | script, err := os.ReadFile(filepath.Join(repoRoot, "scripts", "collect_first_presentation.sh")) | |||
| 216 | + | require.NoError(t, err) | |||
| 217 | + | require.NotContains(t, string(script), "f217ece342dea3ef2a3f98671fcd16a39ad0037d") | |||
| 218 | + | } | |||
| 219 | + | ||||
| 220 | + | func TestFirstPresentationCollectorRejectsNonImmutableModuleProvenanceWithoutLeaks(t *testing.T) { | |||
| 221 | + | repoRoot, err := filepath.Abs(filepath.Join("..", "..")) | |||
| 222 | + | require.NoError(t, err) | |||
| 223 | + | ||||
| 224 | + | for _, test := range []struct { | |||
| 225 | + | name, version, revision, ref string | |||
| 226 | + | }{ | |||
| 227 | + | {name: "branch selector", version: "main", ref: "main"}, | |||
| 228 | + | {name: "missing origin", version: "v0.8.5-0.20300102030405-bbd397409ebe"}, | |||
| 229 | + | {name: "named origin ref", version: "v0.8.5-0.20300102030405-bbd397409ebe", revision: "bbd397409ebed75a5979c1e4566a2ef319f6a484", ref: "main"}, | |||
| 230 | + | } { | |||
| 231 | + | t.Run(test.name, func(t *testing.T) { | |||
| 232 | + | temp := t.TempDir() | |||
| 233 | + | runtime := filepath.Join(temp, "cef-147-runtime") | |||
| 234 | + | require.NoError(t, os.Mkdir(runtime, 0o755)) | |||
| 235 | + | binary := filepath.Join(temp, "dumber") | |||
| 236 | + | require.NoError(t, os.WriteFile(binary, collectorTestBinary(validFirstPresentationLog), 0o755)) | |||
| 237 | + | ||||
| 238 | + | goBin := collectorProvenanceGo(t, temp, test.version, test.revision, test.ref) | |||
| 239 | + | output := filepath.Join(temp, "artifacts") | |||
| 240 | + | cmd := exec.Command(filepath.Join(repoRoot, "scripts", "collect_first_presentation.sh")) | |||
| 241 | + | cmd.Dir = repoRoot | |||
| 242 | + | cmd.Env = append(os.Environ(), | |||
| 243 | + | "DISPLAY=:test", | |||
| 244 | + | "DUMBER_CEF_DIR="+runtime, | |||
| 245 | + | "DUMBER_FIRST_PRESENTATION_BIN="+binary, | |||
| 246 | + | "DUMBER_FIRST_PRESENTATION_OUTPUT="+output, | |||
| 247 | + | "PATH="+filepath.Dir(goBin)+":"+os.Getenv("PATH"), | |||
| 248 | + | ) | |||
| 249 | + | result, runErr := cmd.CombinedOutput() | |||
| 250 | + | require.Errorf(t, runErr, "collector accepted nonimmutable module provenance: %s", result) | |||
| 251 | + | require.Contains(t, string(result), "immutable module provenance is unavailable") | |||
| 252 | + | require.NotContains(t, string(result), temp) | |||
| 253 | + | require.NoFileExists(t, filepath.Join(output, "metadata.json")) | |||
| 254 | + | for _, name := range runArtifactNames() { | |||
| 255 | + | require.NoFileExists(t, filepath.Join(output, name)) | |||
| 256 | + | } | |||
| 257 | + | }) | |||
| 258 | + | } | |||
| 259 | + | } | |||
| 260 | + | ||||
| 261 | + | func collectorProvenanceGo(t *testing.T, temp, version, revision, ref string) string { | |||
| 262 | + | t.Helper() | |||
| 263 | + | infoPath := filepath.Join(temp, "module.info") | |||
| 264 | + | info := map[string]any{"Version": version} | |||
| 265 | + | if revision != "" { | |||
| 266 | + | info["Origin"] = map[string]string{ | |||
| 267 | + | "VCS": "git", "URL": "https://github.com/bnema/purego-cef2gtk", "Hash": revision, "Ref": ref, | |||
| 268 | + | } | |||
| 269 | + | } | |||
| 270 | + | infoJSON, err := json.Marshal(info) | |||
| 271 | + | require.NoError(t, err) | |||
| 272 | + | require.NoError(t, os.WriteFile(infoPath, infoJSON, 0o600)) | |||
| 273 | + | ||||
| 274 | + | selectedJSON, err := json.Marshal(map[string]string{ | |||
| 275 | + | "Path": "github.com/bnema/purego-cef2gtk", "Version": version, | |||
| 276 | + | }) | |||
| 277 | + | require.NoError(t, err) | |||
| 278 | + | downloadedJSON, err := json.Marshal(map[string]string{ | |||
| 279 | + | "Path": "github.com/bnema/purego-cef2gtk", "Version": version, "Info": infoPath, | |||
| 280 | + | }) | |||
| 281 | + | require.NoError(t, err) | |||
| 282 | + | binDir := filepath.Join(temp, "bin") | |||
| 283 | + | require.NoError(t, os.Mkdir(binDir, 0o755)) | |||
| 284 | + | goBin := filepath.Join(binDir, "go") | |||
| 285 | + | script := fmt.Sprintf(`#!/bin/sh | |||
| 286 | + | if [ "$1" = "list" ] && [ "$2" = "-m" ] && [ "$3" = "-json" ] && [ "$4" = "github.com/bnema/purego-cef2gtk" ]; then | |||
| 287 | + | printf '%%s\n' '%s' | |||
| 288 | + | exit 0 | |||
| 289 | + | fi | |||
| 290 | + | if [ "$1" = "mod" ] && [ "$2" = "download" ] && [ "$3" = "-json" ] && [ "$4" = "github.com/bnema/purego-cef2gtk@%s" ]; then | |||
| 291 | + | printf '%%s\n' '%s' | |||
| 292 | + | exit 0 | |||
| 293 | + | fi | |||
| 294 | + | exit 1 | |||
| 295 | + | `, selectedJSON, version, downloadedJSON) | |||
| 296 | + | require.NoError(t, os.WriteFile(goBin, []byte(script), 0o755)) | |||
| 297 | + | return goBin | |||
| 298 | + | } | |||
| 299 | + | ||||
| 169 | func TestFirstPresentationCollectorDefaultsToXDGStateEvidenceDirectory(t *testing.T) { | 300 | func TestFirstPresentationCollectorDefaultsToXDGStateEvidenceDirectory(t *testing.T) { | ||
| 170 | repoRoot, err := filepath.Abs(filepath.Join("..", "..")) | 301 | repoRoot, err := filepath.Abs(filepath.Join("..", "..")) | ||
| 171 | require.NoError(t, err) | 302 | require.NoError(t, err) | ||
M scripts/collect_first_presentation.sh +78 -9
| @@ -31,8 +31,78 @@ else | |||
| 31 | 31 | fi | |
| 32 | 32 | readonly output | |
| 33 | 33 | readonly upstream_module="github.com/bnema/purego-cef2gtk" | |
| 34 | - | readonly upstream_tag="v0.8.4" | |
| 35 | - | readonly upstream_revision="f217ece342dea3ef2a3f98671fcd16a39ad0037d" | |
| 34 | + | ||
| 35 | + | # Resolve the version selected by this checkout, then obtain its immutable VCS | |
| 36 | + | # origin from Go's cached module metadata. Do not infer a revision from a tag, | |
| 37 | + | # a branch, or a truncated pseudo-version suffix. | |
| 38 | + | resolve_upstream_provenance() { | |
| 39 | + | local selected_metadata selected_version downloaded_metadata | |
| 40 | + | ||
| 41 | + | selected_metadata="$(go list -m -json "$upstream_module" 2>/dev/null)" || { | |
| 42 | + | echo "first-presentation: immutable module provenance is unavailable" >&2 | |
| 43 | + | exit 2 | |
| 44 | + | } | |
| 45 | + | selected_version="$(python3 - "$upstream_module" "$selected_metadata" <<'PY' | |
| 46 | + | import json, sys | |
| 47 | + | try: | |
| 48 | + | metadata = json.loads(sys.argv[2]) | |
| 49 | + | if metadata.get("Path") != sys.argv[1] or not isinstance(metadata.get("Version"), str): | |
| 50 | + | raise ValueError | |
| 51 | + | print(metadata["Version"]) | |
| 52 | + | except (AttributeError, TypeError, ValueError, json.JSONDecodeError): | |
| 53 | + | raise SystemExit("first-presentation: immutable module provenance is unavailable") | |
| 54 | + | PY | |
| 55 | + | )" || exit $? | |
| 56 | + | downloaded_metadata="$(go mod download -json "$upstream_module@$selected_version" 2>/dev/null)" || { | |
| 57 | + | echo "first-presentation: immutable module provenance is unavailable" >&2 | |
| 58 | + | exit 2 | |
| 59 | + | } | |
| 60 | + | ||
| 61 | + | python3 - "$upstream_module" "$selected_metadata" "$downloaded_metadata" <<'PY' | |
| 62 | + | import json, re, sys | |
| 63 | + | ||
| 64 | + | module, selected_raw, downloaded_raw = sys.argv[1:] | |
| 65 | + | ||
| 66 | + | def fail(): | |
| 67 | + | # Do not expose Go cache locations or other machine-local values. | |
| 68 | + | raise SystemExit("first-presentation: immutable module provenance is unavailable") | |
| 69 | + | ||
| 70 | + | try: | |
| 71 | + | selected = json.loads(selected_raw) | |
| 72 | + | downloaded = json.loads(downloaded_raw) | |
| 73 | + | version = selected["Version"] | |
| 74 | + | if selected.get("Path") != module or downloaded.get("Path") != module: | |
| 75 | + | fail() | |
| 76 | + | if downloaded.get("Version") != version: | |
| 77 | + | fail() | |
| 78 | + | # A selected pseudo-version is an exact immutable selector, never a branch. | |
| 79 | + | match = re.fullmatch(r"(v\d+\.\d+\.\d+)-0\.\d{14}-([0-9a-f]{12})", version) | |
| 80 | + | if not match: | |
| 81 | + | fail() | |
| 82 | + | info_path = downloaded.get("Info") | |
| 83 | + | if not isinstance(info_path, str) or not info_path: | |
| 84 | + | fail() | |
| 85 | + | with open(info_path, encoding="utf-8") as info_file: | |
| 86 | + | info = json.load(info_file) | |
| 87 | + | origin = info.get("Origin") or downloaded.get("Origin") | |
| 88 | + | if info.get("Version") != version or not isinstance(origin, dict): | |
| 89 | + | fail() | |
| 90 | + | revision = origin.get("Hash") | |
| 91 | + | if origin.get("VCS") != "git" or origin.get("URL") != "https://github.com/bnema/purego-cef2gtk": | |
| 92 | + | fail() | |
| 93 | + | if not isinstance(revision, str) or not re.fullmatch(r"[0-9a-f]{40}", revision): | |
| 94 | + | fail() | |
| 95 | + | if not revision.startswith(match.group(2)): | |
| 96 | + | fail() | |
| 97 | + | # A named ref can move. Only the immutable hash itself is acceptable. | |
| 98 | + | if origin.get("Ref") not in (None, "", revision): | |
| 99 | + | fail() | |
| 100 | + | except (AttributeError, KeyError, OSError, TypeError, ValueError, json.JSONDecodeError): | |
| 101 | + | fail() | |
| 102 | + | ||
| 103 | + | print("\t".join((version, match.group(1), revision))) | |
| 104 | + | PY | |
| 105 | + | } | |
| 36 | 106 | ||
| 37 | 107 | # The artifact destination is caller-controlled. Never empty or recursively | |
| 38 | 108 | # clear it: collection only writes to a newly-created directory whose parent is | |
| @@ -66,10 +136,9 @@ prepare_output | |||
| 66 | 136 | [[ -x "$binary" ]] || { echo "first-presentation: executable not found: $binary" >&2; exit 2; } | |
| 67 | 137 | [[ -d "$runtime" ]] || { echo "first-presentation: CEF runtime not found: $runtime" >&2; exit 2; } | |
| 68 | 138 | [[ -n "${WAYLAND_DISPLAY:-}${DISPLAY:-}" ]] || { echo "first-presentation: a current Wayland/X11 display is required" >&2; exit 2; } | |
| 69 | - | [[ "$(go list -m -f '{{.Version}}' "$upstream_module")" == "$upstream_tag" ]] || { | |
| 70 | - | echo "first-presentation: expected $upstream_module@$upstream_tag" >&2 | |
| 71 | - | exit 2 | |
| 72 | - | } | |
| 139 | + | upstream_provenance="$(resolve_upstream_provenance)" || exit $? | |
| 140 | + | IFS=$'\t' read -r upstream_version upstream_tag upstream_revision <<<"$upstream_provenance" | |
| 141 | + | readonly upstream_version upstream_tag upstream_revision | |
| 73 | 142 | ||
| 74 | 143 | # Raw logs and temporary XDG homes may contain machine-local paths. Keep them | |
| 75 | 144 | # outside the committed artifact directory and always remove them. | |
| @@ -80,9 +149,9 @@ cleanup_work_root() { | |||
| 80 | 149 | rm -rf -- "$work_root" | |
| 81 | 150 | } | |
| 82 | 151 | trap cleanup_work_root EXIT | |
| 83 | - | python3 - "$output/metadata.json" "$binary" "$timeout_seconds" "$upstream_module" "$upstream_tag" "$upstream_revision" <<'PY' | |
| 152 | + | python3 - "$output/metadata.json" "$binary" "$timeout_seconds" "$upstream_module" "$upstream_version" "$upstream_tag" "$upstream_revision" <<'PY' | |
| 84 | 153 | import hashlib, json, os, platform, subprocess, sys | |
| 85 | - | path, binary, timeout, upstream_module, upstream_tag, upstream_revision = sys.argv[1:] | |
| 154 | + | path, binary, timeout, upstream_module, upstream_version, upstream_tag, upstream_revision = sys.argv[1:] | |
| 86 | 155 | with open(binary, "rb") as candidate: | |
| 87 | 156 | binary_sha256 = hashlib.file_digest(candidate, "sha256").hexdigest() | |
| 88 | 157 | ||
| @@ -102,7 +171,7 @@ json.dump({ | |||
| 102 | 171 | "binary": {"label": "dumber", "sha256": binary_sha256}, | |
| 103 | 172 | "timeout_seconds": int(timeout), | |
| 104 | 173 | "measured_source_revision": subprocess.check_output(["git", "-c", f"safe.directory={os.getcwd()}", "rev-parse", "HEAD"], text=True).strip(), | |
| 105 | - | "upstream": {"module": upstream_module, "tag": upstream_tag, "revision": upstream_revision}, | |
| 174 | + | "upstream": {"module": upstream_module, "version": upstream_version, "tag": upstream_tag, "revision": upstream_revision}, | |
| 106 | 175 | "comparison": {"os": os_label, "architecture": architecture, "display_protocol": display_protocol, "machine_gpu_profile": gpu_profile}, | |
| 107 | 176 | "render_configuration": {"backend": "gdk-dmabuf", "buffer_sharing": "dmabuf", "renderer": "vulkan"} | |
| 108 | 177 | }, open(path, "w"), indent=2, sort_keys=True) | |
| @@ -31,8 +31,78 @@ else | |||||
| 31 | fi | 31 | fi | ||
| 32 | readonly output | 32 | readonly output | ||
| 33 | readonly upstream_module="github.com/bnema/purego-cef2gtk" | 33 | readonly upstream_module="github.com/bnema/purego-cef2gtk" | ||
| 34 | - | readonly upstream_tag="v0.8.4" | 34 | + | |
| 35 | - | readonly upstream_revision="f217ece342dea3ef2a3f98671fcd16a39ad0037d" | 35 | + | # Resolve the version selected by this checkout, then obtain its immutable VCS |
| 36 | + | # origin from Go's cached module metadata. Do not infer a revision from a tag, | |||
| 37 | + | # a branch, or a truncated pseudo-version suffix. | |||
| 38 | + | resolve_upstream_provenance() { | |||
| 39 | + | local selected_metadata selected_version downloaded_metadata | |||
| 40 | + | ||||
| 41 | + | selected_metadata="$(go list -m -json "$upstream_module" 2>/dev/null)" || { | |||
| 42 | + | echo "first-presentation: immutable module provenance is unavailable" >&2 | |||
| 43 | + | exit 2 | |||
| 44 | + | } | |||
| 45 | + | selected_version="$(python3 - "$upstream_module" "$selected_metadata" <<'PY' | |||
| 46 | + | import json, sys | |||
| 47 | + | try: | |||
| 48 | + | metadata = json.loads(sys.argv[2]) | |||
| 49 | + | if metadata.get("Path") != sys.argv[1] or not isinstance(metadata.get("Version"), str): | |||
| 50 | + | raise ValueError | |||
| 51 | + | print(metadata["Version"]) | |||
| 52 | + | except (AttributeError, TypeError, ValueError, json.JSONDecodeError): | |||
| 53 | + | raise SystemExit("first-presentation: immutable module provenance is unavailable") | |||
| 54 | + | PY | |||
| 55 | + | )" || exit $? | |||
| 56 | + | downloaded_metadata="$(go mod download -json "$upstream_module@$selected_version" 2>/dev/null)" || { | |||
| 57 | + | echo "first-presentation: immutable module provenance is unavailable" >&2 | |||
| 58 | + | exit 2 | |||
| 59 | + | } | |||
| 60 | + | ||||
| 61 | + | python3 - "$upstream_module" "$selected_metadata" "$downloaded_metadata" <<'PY' | |||
| 62 | + | import json, re, sys | |||
| 63 | + | ||||
| 64 | + | module, selected_raw, downloaded_raw = sys.argv[1:] | |||
| 65 | + | ||||
| 66 | + | def fail(): | |||
| 67 | + | # Do not expose Go cache locations or other machine-local values. | |||
| 68 | + | raise SystemExit("first-presentation: immutable module provenance is unavailable") | |||
| 69 | + | ||||
| 70 | + | try: | |||
| 71 | + | selected = json.loads(selected_raw) | |||
| 72 | + | downloaded = json.loads(downloaded_raw) | |||
| 73 | + | version = selected["Version"] | |||
| 74 | + | if selected.get("Path") != module or downloaded.get("Path") != module: | |||
| 75 | + | fail() | |||
| 76 | + | if downloaded.get("Version") != version: | |||
| 77 | + | fail() | |||
| 78 | + | # A selected pseudo-version is an exact immutable selector, never a branch. | |||
| 79 | + | match = re.fullmatch(r"(v\d+\.\d+\.\d+)-0\.\d{14}-([0-9a-f]{12})", version) | |||
| 80 | + | if not match: | |||
| 81 | + | fail() | |||
| 82 | + | info_path = downloaded.get("Info") | |||
| 83 | + | if not isinstance(info_path, str) or not info_path: | |||
| 84 | + | fail() | |||
| 85 | + | with open(info_path, encoding="utf-8") as info_file: | |||
| 86 | + | info = json.load(info_file) | |||
| 87 | + | origin = info.get("Origin") or downloaded.get("Origin") | |||
| 88 | + | if info.get("Version") != version or not isinstance(origin, dict): | |||
| 89 | + | fail() | |||
| 90 | + | revision = origin.get("Hash") | |||
| 91 | + | if origin.get("VCS") != "git" or origin.get("URL") != "https://github.com/bnema/purego-cef2gtk": | |||
| 92 | + | fail() | |||
| 93 | + | if not isinstance(revision, str) or not re.fullmatch(r"[0-9a-f]{40}", revision): | |||
| 94 | + | fail() | |||
| 95 | + | if not revision.startswith(match.group(2)): | |||
| 96 | + | fail() | |||
| 97 | + | # A named ref can move. Only the immutable hash itself is acceptable. | |||
| 98 | + | if origin.get("Ref") not in (None, "", revision): | |||
| 99 | + | fail() | |||
| 100 | + | except (AttributeError, KeyError, OSError, TypeError, ValueError, json.JSONDecodeError): | |||
| 101 | + | fail() | |||
| 102 | + | ||||
| 103 | + | print("\t".join((version, match.group(1), revision))) | |||
| 104 | + | PY | |||
| 105 | + | } | |||
| 36 | 106 | ||||
| 37 | # The artifact destination is caller-controlled. Never empty or recursively | 107 | # The artifact destination is caller-controlled. Never empty or recursively | ||
| 38 | # clear it: collection only writes to a newly-created directory whose parent is | 108 | # clear it: collection only writes to a newly-created directory whose parent is | ||
| @@ -66,10 +136,9 @@ prepare_output | |||||
| 66 | [[ -x "$binary" ]] || { echo "first-presentation: executable not found: $binary" >&2; exit 2; } | 136 | [[ -x "$binary" ]] || { echo "first-presentation: executable not found: $binary" >&2; exit 2; } | ||
| 67 | [[ -d "$runtime" ]] || { echo "first-presentation: CEF runtime not found: $runtime" >&2; exit 2; } | 137 | [[ -d "$runtime" ]] || { echo "first-presentation: CEF runtime not found: $runtime" >&2; exit 2; } | ||
| 68 | [[ -n "${WAYLAND_DISPLAY:-}${DISPLAY:-}" ]] || { echo "first-presentation: a current Wayland/X11 display is required" >&2; exit 2; } | 138 | [[ -n "${WAYLAND_DISPLAY:-}${DISPLAY:-}" ]] || { echo "first-presentation: a current Wayland/X11 display is required" >&2; exit 2; } | ||
| 69 | - | [[ "$(go list -m -f '{{.Version}}' "$upstream_module")" == "$upstream_tag" ]] || { | 139 | + | upstream_provenance="$(resolve_upstream_provenance)" || exit $? |
| 70 | - | echo "first-presentation: expected $upstream_module@$upstream_tag" >&2 | 140 | + | IFS=$'\t' read -r upstream_version upstream_tag upstream_revision <<<"$upstream_provenance" |
| 71 | - | exit 2 | 141 | + | readonly upstream_version upstream_tag upstream_revision |
| 72 | - | } | |||
| 73 | 142 | ||||
| 74 | # Raw logs and temporary XDG homes may contain machine-local paths. Keep them | 143 | # Raw logs and temporary XDG homes may contain machine-local paths. Keep them | ||
| 75 | # outside the committed artifact directory and always remove them. | 144 | # outside the committed artifact directory and always remove them. | ||
| @@ -80,9 +149,9 @@ cleanup_work_root() { | |||||
| 80 | rm -rf -- "$work_root" | 149 | rm -rf -- "$work_root" | ||
| 81 | } | 150 | } | ||
| 82 | trap cleanup_work_root EXIT | 151 | trap cleanup_work_root EXIT | ||
| 83 | - | python3 - "$output/metadata.json" "$binary" "$timeout_seconds" "$upstream_module" "$upstream_tag" "$upstream_revision" <<'PY' | 152 | + | python3 - "$output/metadata.json" "$binary" "$timeout_seconds" "$upstream_module" "$upstream_version" "$upstream_tag" "$upstream_revision" <<'PY' |
| 84 | import hashlib, json, os, platform, subprocess, sys | 153 | import hashlib, json, os, platform, subprocess, sys | ||
| 85 | - | path, binary, timeout, upstream_module, upstream_tag, upstream_revision = sys.argv[1:] | 154 | + | path, binary, timeout, upstream_module, upstream_version, upstream_tag, upstream_revision = sys.argv[1:] |
| 86 | with open(binary, "rb") as candidate: | 155 | with open(binary, "rb") as candidate: | ||
| 87 | binary_sha256 = hashlib.file_digest(candidate, "sha256").hexdigest() | 156 | binary_sha256 = hashlib.file_digest(candidate, "sha256").hexdigest() | ||
| 88 | 157 | ||||
| @@ -102,7 +171,7 @@ json.dump({ | |||||
| 102 | "binary": {"label": "dumber", "sha256": binary_sha256}, | 171 | "binary": {"label": "dumber", "sha256": binary_sha256}, | ||
| 103 | "timeout_seconds": int(timeout), | 172 | "timeout_seconds": int(timeout), | ||
| 104 | "measured_source_revision": subprocess.check_output(["git", "-c", f"safe.directory={os.getcwd()}", "rev-parse", "HEAD"], text=True).strip(), | 173 | "measured_source_revision": subprocess.check_output(["git", "-c", f"safe.directory={os.getcwd()}", "rev-parse", "HEAD"], text=True).strip(), | ||
| 105 | - | "upstream": {"module": upstream_module, "tag": upstream_tag, "revision": upstream_revision}, | 174 | + | "upstream": {"module": upstream_module, "version": upstream_version, "tag": upstream_tag, "revision": upstream_revision}, |
| 106 | "comparison": {"os": os_label, "architecture": architecture, "display_protocol": display_protocol, "machine_gpu_profile": gpu_profile}, | 175 | "comparison": {"os": os_label, "architecture": architecture, "display_protocol": display_protocol, "machine_gpu_profile": gpu_profile}, | ||
| 107 | "render_configuration": {"backend": "gdk-dmabuf", "buffer_sharing": "dmabuf", "renderer": "vulkan"} | 176 | "render_configuration": {"backend": "gdk-dmabuf", "buffer_sharing": "dmabuf", "renderer": "vulkan"} | ||
| 108 | }, open(path, "w"), indent=2, sort_keys=True) | 177 | }, open(path, "w"), indent=2, sort_keys=True) | ||
M vendor/github.com/bnema/purego-cef/cef/bridge.go +8 -13 generated file: collapsed
M vendor/github.com/bnema/purego-cef2gtk/internal/cefadapter/accelerated_paint.go +34 -37 generated file: collapsed
M vendor/github.com/bnema/purego-cef2gtk/internal/dmabuf/frame.go +38 -19 generated file: collapsed
M vendor/github.com/bnema/purego-cef2gtk/internal/gtkgdk/renderer.go +89 -69 generated file: collapsed
M vendor/github.com/bnema/purego-pipewire/internal/core/player.go +5 -0 generated file: collapsed
M vendor/github.com/bnema/purego-pipewire/internal/core/player_rt.go +10 -6 generated file: collapsed
M vendor/github.com/bnema/purego-pipewire/internal/core/pwbuffer.go +66 -32 generated file: collapsed
M vendor/github.com/bnema/purego-sqlite/driver/driver.go +268 -63 generated file: collapsed
M vendor/github.com/bnema/purego-sqlite/internal/core/db.go +8 -0 generated file: collapsed
M vendor/github.com/bnema/purego-sqlite/internal/core/rows.go +13 -0 generated file: collapsed
M vendor/github.com/bnema/purego-sqlite/internal/loader/loader.go +23 -5 generated file: collapsed
M vendor/github.com/bnema/purego-sqlite/internal/ports/in/ports_gen.go +3 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/internal/core/core.go +197 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/pkg/core/core.go +10 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-dialog.go +99 -64 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-window.go +95 -62 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-accent-color.go +7 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-action-row.go +33 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-alert-dialog.go +66 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-target.go +10 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-util.go +4 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation.go +24 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application-window.go +14 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application.go +3 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-avatar.go +22 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-banner.go +23 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bin.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bottom-sheet.go +47 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint-bin.go +10 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint.go +33 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-content.go +18 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-row.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-dots.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-lines.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel.go +47 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-layout.go +14 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-scrollable.go +17 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp.go +17 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-combo-row.go +34 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-dialog.go +45 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-easing.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-entry-row.go +40 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-enum-list-model.go +13 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-expander-row.go +40 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-flap.go +61 -48 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-fold-threshold-policy.go +10 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-header-bar.go +36 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-inline-view-switcher.go +18 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout-slot.go +4 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout.go +7 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-leaflet.go +69 -56 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-length-unit.go +5 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-main.go +5 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-message-dialog.go +63 -44 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-multi-layout-view.go +17 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-direction.go +10 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-split-view.go +36 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-view.go +60 -49 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-overlay-split-view.go +48 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-password-entry-row.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-dialog.go +23 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-group.go +24 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-page.go +38 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-row.go +18 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-window.go +31 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcut-label.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-dialog.go +4 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-item.go +23 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-section.go +8 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar-item.go +45 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar-section.go +24 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar.go +41 -39 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spin-row.go +40 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spinner-paintable.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spinner.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-split-button.go +39 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spring-animation.go +34 -30 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spring-params.go +17 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-squeezer.go +49 -44 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-status-page.go +20 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-style-manager.go +25 -28 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-swipe-tracker.go +33 -30 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-swipeable.go +33 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-switch-row.go +6 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-bar.go +35 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-button.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-overview.go +45 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-view.go +123 -87 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-timed-animation.go +30 -28 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toast-overlay.go +9 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toast.go +41 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toggle-group.go +64 -51 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toolbar-view.go +40 -35 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-version.go +7 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-stack.go +78 -62 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher-bar.go +9 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher-sidebar.go +15 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher-title.go +19 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher.go +10 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-window-title.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-window.go +14 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-wrap-box.go +66 -46 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-wrap-layout.go +57 -46 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/cairo/main.go +36 -79 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkapplaunchcontext.go +10 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcairo.go +12 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcairocontext.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcicpparams.go +20 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkclipboard.go +34 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcolorstate.go +12 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentdeserializer.go +26 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentformats.go +28 -31 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentprovider.go +23 -28 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentserializer.go +26 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcursor.go +12 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdevice.go +36 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdevicepad.go +27 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdevicetool.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdisplay.go +51 -43 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdisplaymanager.go +10 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdmabuftexture.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdmabuftexturebuilder.go +53 -41 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdrag.go +20 -28 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdragsurface.go +6 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdragsurfacesize.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdrawcontext.go +11 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdrop.go +19 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkenums.go +21 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkevents.go +120 -118 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkframeclock.go +22 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkframetimings.go +17 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkglcontext.go +40 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkgltexture.go +4 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkgltexturebuilder.go +41 -35 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkkeys.go +19 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkmemorytexture.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkmemorytexturebuilder.go +42 -35 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkmonitor.go +27 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkpaintable.go +63 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkpango.go +4 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkpixbuf.go +2 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkpopup.go +47 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkpopuplayout.go +36 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkrgba.go +19 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkseat.go +11 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdksnapshot.go +7 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdksurface.go +46 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdktexture.go +27 -31 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdktoplevel.go +157 -66 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdktoplevellayout.go +24 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdktoplevelsize.go +9 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdktypes.go +95 -72 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkvulkancontext.go +3 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/gdk-pixbuf-animation.go +26 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/gdk-pixbuf-core.go +9 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/gdk-pixbuf-io.go +25 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/gdk-pixbuf-loader.go +13 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/gdk-pixbuf-simple-anim.go +8 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/gdk-pixbuf-transform.go +11 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/gdk-pixbuf.go +102 -79 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/main.go +5 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gaction.go +59 -31 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gactiongroup.go +96 -39 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gactionmap.go +33 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gappinfo.go +244 -116 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gapplication.go +79 -55 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gapplicationcommandline.go +31 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gasyncinitable.go +25 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gasyncresult.go +26 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gbufferedinputstream.go +26 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gbufferedoutputstream.go +11 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gbytesicon.go +4 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gcancellable.go +26 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gcharsetconverter.go +8 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gcontenttype.go +30 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gconverter.go +23 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gconverterinputstream.go +3 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gconverteroutputstream.go +3 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gcredentials.go +12 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdatagrambased.go +45 -30 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdatainputstream.go +31 -35 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdataoutputstream.go +14 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusactiongroup.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusaddress.go +10 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusauthobserver.go +6 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusconnection.go +77 -66 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbuserror.go +16 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusinterface.go +26 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusinterfaceskeleton.go +25 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusintrospection.go +54 -56 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusmenumodel.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusmessage.go +88 -64 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusmethodinvocation.go +35 -30 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusnameowning.go +10 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusnamewatching.go +10 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusobject.go +19 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusobjectmanager.go +26 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusobjectmanagerclient.go +16 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusobjectmanagerserver.go +13 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusobjectproxy.go +3 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusobjectskeleton.go +12 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusproxy.go +42 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusserver.go +14 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusutils.go +24 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdebugcontroller.go +12 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdebugcontrollerdbus.go +4 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdrive.go +214 -82 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdtlsclientconnection.go +34 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdtlsconnection.go +207 -80 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdtlsserverconnection.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gemblem.go +6 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gemblemedicon.go +9 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfile.go +1148 -450 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfileattribute.go +13 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfileenumerator.go +34 -35 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfileicon.go +3 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfileinfo.go +138 -84 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfileinputstream.go +17 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfileiostream.go +23 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfilemonitor.go +9 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfilenamecompleter.go +8 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfileoutputstream.go +23 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfilterinputstream.go +6 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfilteroutputstream.go +6 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gicon.go +32 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/ginetaddress.go +40 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/ginetaddressmask.go +14 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/ginetsocketaddress.go +10 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/ginitable.go +11 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/ginputstream.go +52 -48 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gioenums.go +90 -1 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gioerror.go +6 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/giomodule.go +26 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gioscheduler.go +4 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/giostream.go +25 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/giotypes.go +70 -60 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/giptosmessage.go +6 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gipv6tclassmessage.go +6 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/glistmodel.go +33 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gliststore.go +22 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gloadableicon.go +27 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gmemoryinputstream.go +8 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gmemorymonitor.go +2 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gmemoryoutputstream.go +13 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gmenu.go +62 -50 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gmenumodel.go +31 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gmount.go +215 -86 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gmountoperation.go +40 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gnativesocketaddress.go +2 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gnativevolumemonitor.go +7 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gnetworkaddress.go +11 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gnetworking.go +3 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gnetworkmonitor.go +49 -31 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gnetworkservice.go +12 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gnotification.go +26 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/goutputstream.go +86 -72
| @@ -75,7 +75,7 @@ func (x *OutputStreamClass) OverrideWriteFn(cb func(*OutputStream, []byte, uint, | |||
| 75 | 75 | if cb == nil { | |
| 76 | 76 | x.xWriteFn = 0 | |
| 77 | 77 | } else { | |
| 78 | - | x.xWriteFn = purego.NewCallback(func(StreamVarp uintptr, BufferVarp []byte, CountVarp uint, CancellableVarp uintptr) int { | |
| 78 | + | x.xWriteFn = purego.NewCallback(func(StreamVarp uintptr, BufferVarp []byte, CountVarp uint, CancellableVarp uintptr, cerrp **glib.Error) int { | |
| 79 | 79 | return cb(OutputStreamNewFromInternalPtr(StreamVarp), BufferVarp, CountVarp, CancellableNewFromInternalPtr(CancellableVarp)) | |
| 80 | 80 | }) | |
| 81 | 81 | } | |
| @@ -86,10 +86,11 @@ func (x *OutputStreamClass) GetWriteFn() func(*OutputStream, []byte, uint, *Canc | |||
| 86 | 86 | if x.xWriteFn == 0 { | |
| 87 | 87 | return nil | |
| 88 | 88 | } | |
| 89 | - | var rawCallback func(StreamVarp uintptr, BufferVarp []byte, CountVarp uint, CancellableVarp uintptr) int | |
| 89 | + | var rawCallback func(StreamVarp uintptr, BufferVarp []byte, CountVarp uint, CancellableVarp uintptr, cerrp **glib.Error) int | |
| 90 | 90 | purego.RegisterFunc(&rawCallback, x.xWriteFn) | |
| 91 | 91 | return func(StreamVar *OutputStream, BufferVar []byte, CountVar uint, CancellableVar *Cancellable) int { | |
| 92 | - | return rawCallback(StreamVar.GoPointer(), BufferVar, CountVar, CancellableVar.GoPointer()) | |
| 92 | + | var cerr *glib.Error | |
| 93 | + | return rawCallback(StreamVar.GoPointer(), BufferVar, CountVar, CancellableVar.GoPointer(), &cerr) | |
| 93 | 94 | } | |
| 94 | 95 | } | |
| 95 | 96 | ||
| @@ -98,7 +99,7 @@ func (x *OutputStreamClass) OverrideSplice(cb func(*OutputStream, *InputStream, | |||
| 98 | 99 | if cb == nil { | |
| 99 | 100 | x.xSplice = 0 | |
| 100 | 101 | } else { | |
| 101 | - | x.xSplice = purego.NewCallback(func(StreamVarp uintptr, SourceVarp uintptr, FlagsVarp OutputStreamSpliceFlags, CancellableVarp uintptr) int { | |
| 102 | + | x.xSplice = purego.NewCallback(func(StreamVarp uintptr, SourceVarp uintptr, FlagsVarp OutputStreamSpliceFlags, CancellableVarp uintptr, cerrp **glib.Error) int { | |
| 102 | 103 | return cb(OutputStreamNewFromInternalPtr(StreamVarp), InputStreamNewFromInternalPtr(SourceVarp), FlagsVarp, CancellableNewFromInternalPtr(CancellableVarp)) | |
| 103 | 104 | }) | |
| 104 | 105 | } | |
| @@ -109,10 +110,11 @@ func (x *OutputStreamClass) GetSplice() func(*OutputStream, *InputStream, Output | |||
| 109 | 110 | if x.xSplice == 0 { | |
| 110 | 111 | return nil | |
| 111 | 112 | } | |
| 112 | - | var rawCallback func(StreamVarp uintptr, SourceVarp uintptr, FlagsVarp OutputStreamSpliceFlags, CancellableVarp uintptr) int | |
| 113 | + | var rawCallback func(StreamVarp uintptr, SourceVarp uintptr, FlagsVarp OutputStreamSpliceFlags, CancellableVarp uintptr, cerrp **glib.Error) int | |
| 113 | 114 | purego.RegisterFunc(&rawCallback, x.xSplice) | |
| 114 | 115 | return func(StreamVar *OutputStream, SourceVar *InputStream, FlagsVar OutputStreamSpliceFlags, CancellableVar *Cancellable) int { | |
| 115 | - | return rawCallback(StreamVar.GoPointer(), SourceVar.GoPointer(), FlagsVar, CancellableVar.GoPointer()) | |
| 116 | + | var cerr *glib.Error | |
| 117 | + | return rawCallback(StreamVar.GoPointer(), SourceVar.GoPointer(), FlagsVar, CancellableVar.GoPointer(), &cerr) | |
| 116 | 118 | } | |
| 117 | 119 | } | |
| 118 | 120 | ||
| @@ -121,7 +123,7 @@ func (x *OutputStreamClass) OverrideFlush(cb func(*OutputStream, *Cancellable) b | |||
| 121 | 123 | if cb == nil { | |
| 122 | 124 | x.xFlush = 0 | |
| 123 | 125 | } else { | |
| 124 | - | x.xFlush = purego.NewCallback(func(StreamVarp uintptr, CancellableVarp uintptr) bool { | |
| 126 | + | x.xFlush = purego.NewCallback(func(StreamVarp uintptr, CancellableVarp uintptr, cerrp **glib.Error) bool { | |
| 125 | 127 | return cb(OutputStreamNewFromInternalPtr(StreamVarp), CancellableNewFromInternalPtr(CancellableVarp)) | |
| 126 | 128 | }) | |
| 127 | 129 | } | |
| @@ -132,10 +134,11 @@ func (x *OutputStreamClass) GetFlush() func(*OutputStream, *Cancellable) bool { | |||
| 132 | 134 | if x.xFlush == 0 { | |
| 133 | 135 | return nil | |
| 134 | 136 | } | |
| 135 | - | var rawCallback func(StreamVarp uintptr, CancellableVarp uintptr) bool | |
| 137 | + | var rawCallback func(StreamVarp uintptr, CancellableVarp uintptr, cerrp **glib.Error) bool | |
| 136 | 138 | purego.RegisterFunc(&rawCallback, x.xFlush) | |
| 137 | 139 | return func(StreamVar *OutputStream, CancellableVar *Cancellable) bool { | |
| 138 | - | return rawCallback(StreamVar.GoPointer(), CancellableVar.GoPointer()) | |
| 140 | + | var cerr *glib.Error | |
| 141 | + | return rawCallback(StreamVar.GoPointer(), CancellableVar.GoPointer(), &cerr) | |
| 139 | 142 | } | |
| 140 | 143 | } | |
| 141 | 144 | ||
| @@ -144,7 +147,7 @@ func (x *OutputStreamClass) OverrideCloseFn(cb func(*OutputStream, *Cancellable) | |||
| 144 | 147 | if cb == nil { | |
| 145 | 148 | x.xCloseFn = 0 | |
| 146 | 149 | } else { | |
| 147 | - | x.xCloseFn = purego.NewCallback(func(StreamVarp uintptr, CancellableVarp uintptr) bool { | |
| 150 | + | x.xCloseFn = purego.NewCallback(func(StreamVarp uintptr, CancellableVarp uintptr, cerrp **glib.Error) bool { | |
| 148 | 151 | return cb(OutputStreamNewFromInternalPtr(StreamVarp), CancellableNewFromInternalPtr(CancellableVarp)) | |
| 149 | 152 | }) | |
| 150 | 153 | } | |
| @@ -155,10 +158,11 @@ func (x *OutputStreamClass) GetCloseFn() func(*OutputStream, *Cancellable) bool | |||
| 155 | 158 | if x.xCloseFn == 0 { | |
| 156 | 159 | return nil | |
| 157 | 160 | } | |
| 158 | - | var rawCallback func(StreamVarp uintptr, CancellableVarp uintptr) bool | |
| 161 | + | var rawCallback func(StreamVarp uintptr, CancellableVarp uintptr, cerrp **glib.Error) bool | |
| 159 | 162 | purego.RegisterFunc(&rawCallback, x.xCloseFn) | |
| 160 | 163 | return func(StreamVar *OutputStream, CancellableVar *Cancellable) bool { | |
| 161 | - | return rawCallback(StreamVar.GoPointer(), CancellableVar.GoPointer()) | |
| 164 | + | var cerr *glib.Error | |
| 165 | + | return rawCallback(StreamVar.GoPointer(), CancellableVar.GoPointer(), &cerr) | |
| 162 | 166 | } | |
| 163 | 167 | } | |
| 164 | 168 | ||
| @@ -190,7 +194,7 @@ func (x *OutputStreamClass) OverrideWriteFinish(cb func(*OutputStream, AsyncResu | |||
| 190 | 194 | if cb == nil { | |
| 191 | 195 | x.xWriteFinish = 0 | |
| 192 | 196 | } else { | |
| 193 | - | x.xWriteFinish = purego.NewCallback(func(StreamVarp uintptr, ResultVarp uintptr) int { | |
| 197 | + | x.xWriteFinish = purego.NewCallback(func(StreamVarp uintptr, ResultVarp uintptr, cerrp **glib.Error) int { | |
| 194 | 198 | return cb(OutputStreamNewFromInternalPtr(StreamVarp), &AsyncResultBase{Ptr: ResultVarp}) | |
| 195 | 199 | }) | |
| 196 | 200 | } | |
| @@ -201,10 +205,11 @@ func (x *OutputStreamClass) GetWriteFinish() func(*OutputStream, AsyncResult) in | |||
| 201 | 205 | if x.xWriteFinish == 0 { | |
| 202 | 206 | return nil | |
| 203 | 207 | } | |
| 204 | - | var rawCallback func(StreamVarp uintptr, ResultVarp uintptr) int | |
| 208 | + | var rawCallback func(StreamVarp uintptr, ResultVarp uintptr, cerrp **glib.Error) int | |
| 205 | 209 | purego.RegisterFunc(&rawCallback, x.xWriteFinish) | |
| 206 | 210 | return func(StreamVar *OutputStream, ResultVar AsyncResult) int { | |
| 207 | - | return rawCallback(StreamVar.GoPointer(), ResultVar.GoPointer()) | |
| 211 | + | var cerr *glib.Error | |
| 212 | + | return rawCallback(StreamVar.GoPointer(), ResultVar.GoPointer(), &cerr) | |
| 208 | 213 | } | |
| 209 | 214 | } | |
| 210 | 215 | ||
| @@ -236,7 +241,7 @@ func (x *OutputStreamClass) OverrideSpliceFinish(cb func(*OutputStream, AsyncRes | |||
| 236 | 241 | if cb == nil { | |
| 237 | 242 | x.xSpliceFinish = 0 | |
| 238 | 243 | } else { | |
| 239 | - | x.xSpliceFinish = purego.NewCallback(func(StreamVarp uintptr, ResultVarp uintptr) int { | |
| 244 | + | x.xSpliceFinish = purego.NewCallback(func(StreamVarp uintptr, ResultVarp uintptr, cerrp **glib.Error) int { | |
| 240 | 245 | return cb(OutputStreamNewFromInternalPtr(StreamVarp), &AsyncResultBase{Ptr: ResultVarp}) | |
| 241 | 246 | }) | |
| 242 | 247 | } | |
| @@ -247,10 +252,11 @@ func (x *OutputStreamClass) GetSpliceFinish() func(*OutputStream, AsyncResult) i | |||
| 247 | 252 | if x.xSpliceFinish == 0 { | |
| 248 | 253 | return nil | |
| 249 | 254 | } | |
| 250 | - | var rawCallback func(StreamVarp uintptr, ResultVarp uintptr) int | |
| 255 | + | var rawCallback func(StreamVarp uintptr, ResultVarp uintptr, cerrp **glib.Error) int | |
| 251 | 256 | purego.RegisterFunc(&rawCallback, x.xSpliceFinish) | |
| 252 | 257 | return func(StreamVar *OutputStream, ResultVar AsyncResult) int { | |
| 253 | - | return rawCallback(StreamVar.GoPointer(), ResultVar.GoPointer()) | |
| 258 | + | var cerr *glib.Error | |
| 259 | + | return rawCallback(StreamVar.GoPointer(), ResultVar.GoPointer(), &cerr) | |
| 254 | 260 | } | |
| 255 | 261 | } | |
| 256 | 262 | ||
| @@ -282,7 +288,7 @@ func (x *OutputStreamClass) OverrideFlushFinish(cb func(*OutputStream, AsyncResu | |||
| 282 | 288 | if cb == nil { | |
| 283 | 289 | x.xFlushFinish = 0 | |
| 284 | 290 | } else { | |
| 285 | - | x.xFlushFinish = purego.NewCallback(func(StreamVarp uintptr, ResultVarp uintptr) bool { | |
| 291 | + | x.xFlushFinish = purego.NewCallback(func(StreamVarp uintptr, ResultVarp uintptr, cerrp **glib.Error) bool { | |
| 286 | 292 | return cb(OutputStreamNewFromInternalPtr(StreamVarp), &AsyncResultBase{Ptr: ResultVarp}) | |
| 287 | 293 | }) | |
| 288 | 294 | } | |
| @@ -293,10 +299,11 @@ func (x *OutputStreamClass) GetFlushFinish() func(*OutputStream, AsyncResult) bo | |||
| 293 | 299 | if x.xFlushFinish == 0 { | |
| 294 | 300 | return nil | |
| 295 | 301 | } | |
| 296 | - | var rawCallback func(StreamVarp uintptr, ResultVarp uintptr) bool | |
| 302 | + | var rawCallback func(StreamVarp uintptr, ResultVarp uintptr, cerrp **glib.Error) bool | |
| 297 | 303 | purego.RegisterFunc(&rawCallback, x.xFlushFinish) | |
| 298 | 304 | return func(StreamVar *OutputStream, ResultVar AsyncResult) bool { | |
| 299 | - | return rawCallback(StreamVar.GoPointer(), ResultVar.GoPointer()) | |
| 305 | + | var cerr *glib.Error | |
| 306 | + | return rawCallback(StreamVar.GoPointer(), ResultVar.GoPointer(), &cerr) | |
| 300 | 307 | } | |
| 301 | 308 | } | |
| 302 | 309 | ||
| @@ -328,7 +335,7 @@ func (x *OutputStreamClass) OverrideCloseFinish(cb func(*OutputStream, AsyncResu | |||
| 328 | 335 | if cb == nil { | |
| 329 | 336 | x.xCloseFinish = 0 | |
| 330 | 337 | } else { | |
| 331 | - | x.xCloseFinish = purego.NewCallback(func(StreamVarp uintptr, ResultVarp uintptr) bool { | |
| 338 | + | x.xCloseFinish = purego.NewCallback(func(StreamVarp uintptr, ResultVarp uintptr, cerrp **glib.Error) bool { | |
| 332 | 339 | return cb(OutputStreamNewFromInternalPtr(StreamVarp), &AsyncResultBase{Ptr: ResultVarp}) | |
| 333 | 340 | }) | |
| 334 | 341 | } | |
| @@ -339,10 +346,11 @@ func (x *OutputStreamClass) GetCloseFinish() func(*OutputStream, AsyncResult) bo | |||
| 339 | 346 | if x.xCloseFinish == 0 { | |
| 340 | 347 | return nil | |
| 341 | 348 | } | |
| 342 | - | var rawCallback func(StreamVarp uintptr, ResultVarp uintptr) bool | |
| 349 | + | var rawCallback func(StreamVarp uintptr, ResultVarp uintptr, cerrp **glib.Error) bool | |
| 343 | 350 | purego.RegisterFunc(&rawCallback, x.xCloseFinish) | |
| 344 | 351 | return func(StreamVar *OutputStream, ResultVar AsyncResult) bool { | |
| 345 | - | return rawCallback(StreamVar.GoPointer(), ResultVar.GoPointer()) | |
| 352 | + | var cerr *glib.Error | |
| 353 | + | return rawCallback(StreamVar.GoPointer(), ResultVar.GoPointer(), &cerr) | |
| 346 | 354 | } | |
| 347 | 355 | } | |
| 348 | 356 | ||
| @@ -351,7 +359,7 @@ func (x *OutputStreamClass) OverrideWritevFn(cb func(*OutputStream, []OutputVect | |||
| 351 | 359 | if cb == nil { | |
| 352 | 360 | x.xWritevFn = 0 | |
| 353 | 361 | } else { | |
| 354 | - | x.xWritevFn = purego.NewCallback(func(StreamVarp uintptr, VectorsVarp []OutputVector, NVectorsVarp uint, BytesWrittenVarp *uint, CancellableVarp uintptr) bool { | |
| 362 | + | x.xWritevFn = purego.NewCallback(func(StreamVarp uintptr, VectorsVarp []OutputVector, NVectorsVarp uint, BytesWrittenVarp *uint, CancellableVarp uintptr, cerrp **glib.Error) bool { | |
| 355 | 363 | return cb(OutputStreamNewFromInternalPtr(StreamVarp), VectorsVarp, NVectorsVarp, BytesWrittenVarp, CancellableNewFromInternalPtr(CancellableVarp)) | |
| 356 | 364 | }) | |
| 357 | 365 | } | |
| @@ -362,10 +370,11 @@ func (x *OutputStreamClass) GetWritevFn() func(*OutputStream, []OutputVector, ui | |||
| 362 | 370 | if x.xWritevFn == 0 { | |
| 363 | 371 | return nil | |
| 364 | 372 | } | |
| 365 | - | var rawCallback func(StreamVarp uintptr, VectorsVarp []OutputVector, NVectorsVarp uint, BytesWrittenVarp *uint, CancellableVarp uintptr) bool | |
| 373 | + | var rawCallback func(StreamVarp uintptr, VectorsVarp []OutputVector, NVectorsVarp uint, BytesWrittenVarp *uint, CancellableVarp uintptr, cerrp **glib.Error) bool | |
| 366 | 374 | purego.RegisterFunc(&rawCallback, x.xWritevFn) | |
| 367 | 375 | return func(StreamVar *OutputStream, VectorsVar []OutputVector, NVectorsVar uint, BytesWrittenVar *uint, CancellableVar *Cancellable) bool { | |
| 368 | - | return rawCallback(StreamVar.GoPointer(), VectorsVar, NVectorsVar, BytesWrittenVar, CancellableVar.GoPointer()) | |
| 376 | + | var cerr *glib.Error | |
| 377 | + | return rawCallback(StreamVar.GoPointer(), VectorsVar, NVectorsVar, BytesWrittenVar, CancellableVar.GoPointer(), &cerr) | |
| 369 | 378 | } | |
| 370 | 379 | } | |
| 371 | 380 | ||
| @@ -397,7 +406,7 @@ func (x *OutputStreamClass) OverrideWritevFinish(cb func(*OutputStream, AsyncRes | |||
| 397 | 406 | if cb == nil { | |
| 398 | 407 | x.xWritevFinish = 0 | |
| 399 | 408 | } else { | |
| 400 | - | x.xWritevFinish = purego.NewCallback(func(StreamVarp uintptr, ResultVarp uintptr, BytesWrittenVarp *uint) bool { | |
| 409 | + | x.xWritevFinish = purego.NewCallback(func(StreamVarp uintptr, ResultVarp uintptr, BytesWrittenVarp *uint, cerrp **glib.Error) bool { | |
| 401 | 410 | return cb(OutputStreamNewFromInternalPtr(StreamVarp), &AsyncResultBase{Ptr: ResultVarp}, BytesWrittenVarp) | |
| 402 | 411 | }) | |
| 403 | 412 | } | |
| @@ -408,10 +417,11 @@ func (x *OutputStreamClass) GetWritevFinish() func(*OutputStream, AsyncResult, * | |||
| 408 | 417 | if x.xWritevFinish == 0 { | |
| 409 | 418 | return nil | |
| 410 | 419 | } | |
| 411 | - | var rawCallback func(StreamVarp uintptr, ResultVarp uintptr, BytesWrittenVarp *uint) bool | |
| 420 | + | var rawCallback func(StreamVarp uintptr, ResultVarp uintptr, BytesWrittenVarp *uint, cerrp **glib.Error) bool | |
| 412 | 421 | purego.RegisterFunc(&rawCallback, x.xWritevFinish) | |
| 413 | 422 | return func(StreamVar *OutputStream, ResultVar AsyncResult, BytesWrittenVar *uint) bool { | |
| 414 | - | return rawCallback(StreamVar.GoPointer(), ResultVar.GoPointer(), BytesWrittenVar) | |
| 423 | + | var cerr *glib.Error | |
| 424 | + | return rawCallback(StreamVar.GoPointer(), ResultVar.GoPointer(), BytesWrittenVar, &cerr) | |
| 415 | 425 | } | |
| 416 | 426 | } | |
| 417 | 427 | ||
| @@ -570,6 +580,7 @@ type OutputStream struct { | |||
| 570 | 580 | var xOutputStreamGLibType func() types.GType | |
| 571 | 581 | ||
| 572 | 582 | func OutputStreamGLibType() types.GType { | |
| 583 | + | core.LazyRegister(&xOutputStreamGLibType, "GIO", "g_output_stream_get_type", false) | |
| 573 | 584 | return xOutputStreamGLibType() | |
| 574 | 585 | } | |
| 575 | 586 | ||
| @@ -583,6 +594,8 @@ var xOutputStreamClearPending func(uintptr) | |||
| 583 | 594 | ||
| 584 | 595 | // Clears the pending flag on @stream. | |
| 585 | 596 | func (x *OutputStream) ClearPending() { | |
| 597 | + | core.LazyRegister(&xOutputStreamClearPending, "GIO", "g_output_stream_clear_pending", false) | |
| 598 | + | ||
| 586 | 599 | xOutputStreamClearPending(x.GoPointer()) | |
| 587 | 600 | } | |
| 588 | 601 | ||
| @@ -618,6 +631,7 @@ var xOutputStreamClose func(uintptr, uintptr, **glib.Error) bool | |||
| 618 | 631 | // cancellation (as with any error) there is no guarantee that all written | |
| 619 | 632 | // data will reach the target. | |
| 620 | 633 | func (x *OutputStream) Close(CancellableVar *Cancellable) (bool, error) { | |
| 634 | + | core.LazyRegister(&xOutputStreamClose, "GIO", "g_output_stream_close", false) | |
| 621 | 635 | var cerr *glib.Error | |
| 622 | 636 | ||
| 623 | 637 | cret := xOutputStreamClose(x.GoPointer(), CancellableVar.GoPointer(), &cerr) | |
| @@ -640,6 +654,8 @@ var xOutputStreamCloseAsync func(uintptr, int, uintptr, uintptr, uintptr) | |||
| 640 | 654 | // to implement asynchronicity, so they are optional for inheriting | |
| 641 | 655 | // classes. However, if you override one you must override all. | |
| 642 | 656 | func (x *OutputStream) CloseAsync(IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) { | |
| 657 | + | core.LazyRegister(&xOutputStreamCloseAsync, "GIO", "g_output_stream_close_async", false) | |
| 658 | + | ||
| 643 | 659 | xOutputStreamCloseAsync(x.GoPointer(), IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | |
| 644 | 660 | } | |
| 645 | 661 | ||
| @@ -647,6 +663,7 @@ var xOutputStreamCloseFinish func(uintptr, uintptr, **glib.Error) bool | |||
| 647 | 663 | ||
| 648 | 664 | // Closes an output stream. | |
| 649 | 665 | func (x *OutputStream) CloseFinish(ResultVar AsyncResult) (bool, error) { | |
| 666 | + | core.LazyRegister(&xOutputStreamCloseFinish, "GIO", "g_output_stream_close_finish", false) | |
| 650 | 667 | var cerr *glib.Error | |
| 651 | 668 | ||
| 652 | 669 | cret := xOutputStreamCloseFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr) | |
| @@ -668,6 +685,7 @@ var xOutputStreamFlush func(uintptr, uintptr, **glib.Error) bool | |||
| 668 | 685 | // triggering the cancellable object from another thread. If the operation | |
| 669 | 686 | // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. | |
| 670 | 687 | func (x *OutputStream) Flush(CancellableVar *Cancellable) (bool, error) { | |
| 688 | + | core.LazyRegister(&xOutputStreamFlush, "GIO", "g_output_stream_flush", false) | |
| 671 | 689 | var cerr *glib.Error | |
| 672 | 690 | ||
| 673 | 691 | cret := xOutputStreamFlush(x.GoPointer(), CancellableVar.GoPointer(), &cerr) | |
| @@ -687,6 +705,8 @@ var xOutputStreamFlushAsync func(uintptr, int, uintptr, uintptr, uintptr) | |||
| 687 | 705 | // called. You can then call g_output_stream_flush_finish() to get the | |
| 688 | 706 | // result of the operation. | |
| 689 | 707 | func (x *OutputStream) FlushAsync(IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) { | |
| 708 | + | core.LazyRegister(&xOutputStreamFlushAsync, "GIO", "g_output_stream_flush_async", false) | |
| 709 | + | ||
| 690 | 710 | xOutputStreamFlushAsync(x.GoPointer(), IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | |
| 691 | 711 | } | |
| 692 | 712 | ||
| @@ -694,6 +714,7 @@ var xOutputStreamFlushFinish func(uintptr, uintptr, **glib.Error) bool | |||
| 694 | 714 | ||
| 695 | 715 | // Finishes flushing an output stream. | |
| 696 | 716 | func (x *OutputStream) FlushFinish(ResultVar AsyncResult) (bool, error) { | |
| 717 | + | core.LazyRegister(&xOutputStreamFlushFinish, "GIO", "g_output_stream_flush_finish", false) | |
| 697 | 718 | var cerr *glib.Error | |
| 698 | 719 | ||
| 699 | 720 | cret := xOutputStreamFlushFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr) | |
| @@ -707,6 +728,8 @@ var xOutputStreamHasPending func(uintptr) bool | |||
| 707 | 728 | ||
| 708 | 729 | // Checks if an output stream has pending actions. | |
| 709 | 730 | func (x *OutputStream) HasPending() bool { | |
| 731 | + | core.LazyRegister(&xOutputStreamHasPending, "GIO", "g_output_stream_has_pending", false) | |
| 732 | + | ||
| 710 | 733 | cret := xOutputStreamHasPending(x.GoPointer()) | |
| 711 | 734 | return cret | |
| 712 | 735 | } | |
| @@ -715,6 +738,8 @@ var xOutputStreamIsClosed func(uintptr) bool | |||
| 715 | 738 | ||
| 716 | 739 | // Checks if an output stream has already been closed. | |
| 717 | 740 | func (x *OutputStream) IsClosed() bool { | |
| 741 | + | core.LazyRegister(&xOutputStreamIsClosed, "GIO", "g_output_stream_is_closed", false) | |
| 742 | + | ||
| 718 | 743 | cret := xOutputStreamIsClosed(x.GoPointer()) | |
| 719 | 744 | return cret | |
| 720 | 745 | } | |
| @@ -726,6 +751,8 @@ var xOutputStreamIsClosing func(uintptr) bool | |||
| 726 | 751 | // flush (or other i/o operation) is called from within | |
| 727 | 752 | // the closing operation. | |
| 728 | 753 | func (x *OutputStream) IsClosing() bool { | |
| 754 | + | core.LazyRegister(&xOutputStreamIsClosing, "GIO", "g_output_stream_is_closing", false) | |
| 755 | + | ||
| 729 | 756 | cret := xOutputStreamIsClosing(x.GoPointer()) | |
| 730 | 757 | return cret | |
| 731 | 758 | } | |
| @@ -745,6 +772,8 @@ var xOutputStreamPrintf func(uintptr, *uint, uintptr, **glib.Error, string, ...i | |||
| 745 | 772 | // create you own printf()-like wrapper around g_output_stream_write() | |
| 746 | 773 | // or g_output_stream_write_all(). | |
| 747 | 774 | func (x *OutputStream) Printf(BytesWrittenVar *uint, CancellableVar *Cancellable, ErrorVar **glib.Error, FormatVar string, varArgs ...interface{}) bool { | |
| 775 | + | core.LazyRegister(&xOutputStreamPrintf, "GIO", "g_output_stream_printf", false) | |
| 776 | + | ||
| 748 | 777 | cret := xOutputStreamPrintf(x.GoPointer(), BytesWrittenVar, CancellableVar.GoPointer(), ErrorVar, FormatVar, varArgs...) | |
| 749 | 778 | return cret | |
| 750 | 779 | } | |
| @@ -755,6 +784,7 @@ var xOutputStreamSetPending func(uintptr, **glib.Error) bool | |||
| 755 | 784 | // already set or @stream is closed, it will return %FALSE and set | |
| 756 | 785 | // @error. | |
| 757 | 786 | func (x *OutputStream) SetPending() (bool, error) { | |
| 787 | + | core.LazyRegister(&xOutputStreamSetPending, "GIO", "g_output_stream_set_pending", false) | |
| 758 | 788 | var cerr *glib.Error | |
| 759 | 789 | ||
| 760 | 790 | cret := xOutputStreamSetPending(x.GoPointer(), &cerr) | |
| @@ -768,6 +798,7 @@ var xOutputStreamSplice func(uintptr, uintptr, OutputStreamSpliceFlags, uintptr, | |||
| 768 | 798 | ||
| 769 | 799 | // Splices an input stream into an output stream. | |
| 770 | 800 | func (x *OutputStream) Splice(SourceVar *InputStream, FlagsVar OutputStreamSpliceFlags, CancellableVar *Cancellable) (int, error) { | |
| 801 | + | core.LazyRegister(&xOutputStreamSplice, "GIO", "g_output_stream_splice", false) | |
| 771 | 802 | var cerr *glib.Error | |
| 772 | 803 | ||
| 773 | 804 | cret := xOutputStreamSplice(x.GoPointer(), SourceVar.GoPointer(), FlagsVar, CancellableVar.GoPointer(), &cerr) | |
| @@ -787,6 +818,8 @@ var xOutputStreamSpliceAsync func(uintptr, uintptr, OutputStreamSpliceFlags, int | |||
| 787 | 818 | // For the synchronous, blocking version of this function, see | |
| 788 | 819 | // g_output_stream_splice(). | |
| 789 | 820 | func (x *OutputStream) SpliceAsync(SourceVar *InputStream, FlagsVar OutputStreamSpliceFlags, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) { | |
| 821 | + | core.LazyRegister(&xOutputStreamSpliceAsync, "GIO", "g_output_stream_splice_async", false) | |
| 822 | + | ||
| 790 | 823 | xOutputStreamSpliceAsync(x.GoPointer(), SourceVar.GoPointer(), FlagsVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | |
| 791 | 824 | } | |
| 792 | 825 | ||
| @@ -794,6 +827,7 @@ var xOutputStreamSpliceFinish func(uintptr, uintptr, **glib.Error) int | |||
| 794 | 827 | ||
| 795 | 828 | // Finishes an asynchronous stream splice operation. | |
| 796 | 829 | func (x *OutputStream) SpliceFinish(ResultVar AsyncResult) (int, error) { | |
| 830 | + | core.LazyRegister(&xOutputStreamSpliceFinish, "GIO", "g_output_stream_splice_finish", false) | |
| 797 | 831 | var cerr *glib.Error | |
| 798 | 832 | ||
| 799 | 833 | cret := xOutputStreamSpliceFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr) | |
| @@ -818,6 +852,8 @@ var xOutputStreamVprintf func(uintptr, *uint, uintptr, **glib.Error, string, []i | |||
| 818 | 852 | // create you own printf()-like wrapper around g_output_stream_write() | |
| 819 | 853 | // or g_output_stream_write_all(). | |
| 820 | 854 | func (x *OutputStream) Vprintf(BytesWrittenVar *uint, CancellableVar *Cancellable, ErrorVar **glib.Error, FormatVar string, ArgsVar []interface{}) bool { | |
| 855 | + | core.LazyRegister(&xOutputStreamVprintf, "GIO", "g_output_stream_vprintf", false) | |
| 856 | + | ||
| 821 | 857 | cret := xOutputStreamVprintf(x.GoPointer(), BytesWrittenVar, CancellableVar.GoPointer(), ErrorVar, FormatVar, ArgsVar) | |
| 822 | 858 | return cret | |
| 823 | 859 | } | |
| @@ -845,6 +881,7 @@ var xOutputStreamWrite func(uintptr, []byte, uint, uintptr, **glib.Error) int | |||
| 845 | 881 | // | |
| 846 | 882 | // On error -1 is returned and @error is set accordingly. | |
| 847 | 883 | func (x *OutputStream) Write(BufferVar []byte, CountVar uint, CancellableVar *Cancellable) (int, error) { | |
| 884 | + | core.LazyRegister(&xOutputStreamWrite, "GIO", "g_output_stream_write", false) | |
| 848 | 885 | var cerr *glib.Error | |
| 849 | 886 | ||
| 850 | 887 | cret := xOutputStreamWrite(x.GoPointer(), BufferVar, CountVar, CancellableVar.GoPointer(), &cerr) | |
| @@ -876,6 +913,7 @@ var xOutputStreamWriteAll func(uintptr, []byte, uint, *uint, uintptr, **glib.Err | |||
| 876 | 913 | // language then you must write your own loop around | |
| 877 | 914 | // g_output_stream_write(). | |
| 878 | 915 | func (x *OutputStream) WriteAll(BufferVar []byte, CountVar uint, BytesWrittenVar *uint, CancellableVar *Cancellable) (bool, error) { | |
| 916 | + | core.LazyRegister(&xOutputStreamWriteAll, "GIO", "g_output_stream_write_all", false) | |
| 879 | 917 | var cerr *glib.Error | |
| 880 | 918 | ||
| 881 | 919 | cret := xOutputStreamWriteAll(x.GoPointer(), BufferVar, CountVar, BytesWrittenVar, CancellableVar.GoPointer(), &cerr) | |
| @@ -903,6 +941,8 @@ var xOutputStreamWriteAllAsync func(uintptr, []byte, uint, int, uintptr, uintptr | |||
| 903 | 941 | // Note that no copy of @buffer will be made, so it must stay valid | |
| 904 | 942 | // until @callback is called. | |
| 905 | 943 | func (x *OutputStream) WriteAllAsync(BufferVar []byte, CountVar uint, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) { | |
| 944 | + | core.LazyRegister(&xOutputStreamWriteAllAsync, "GIO", "g_output_stream_write_all_async", false) | |
| 945 | + | ||
| 906 | 946 | xOutputStreamWriteAllAsync(x.GoPointer(), BufferVar, CountVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | |
| 907 | 947 | } | |
| 908 | 948 | ||
| @@ -919,6 +959,7 @@ var xOutputStreamWriteAllFinish func(uintptr, uintptr, *uint, **glib.Error) bool | |||
| 919 | 959 | // language then you must write your own loop around | |
| 920 | 960 | // g_output_stream_write_async(). | |
| 921 | 961 | func (x *OutputStream) WriteAllFinish(ResultVar AsyncResult, BytesWrittenVar *uint) (bool, error) { | |
| 962 | + | core.LazyRegister(&xOutputStreamWriteAllFinish, "GIO", "g_output_stream_write_all_finish", false) | |
| 922 | 963 | var cerr *glib.Error | |
| 923 | 964 | ||
| 924 | 965 | cret := xOutputStreamWriteAllFinish(x.GoPointer(), ResultVar.GoPointer(), BytesWrittenVar, &cerr) | |
| @@ -966,6 +1007,8 @@ var xOutputStreamWriteAsync func(uintptr, []byte, uint, int, uintptr, uintptr, u | |||
| 966 | 1007 | // for a #GBytes version that will automatically hold a reference to | |
| 967 | 1008 | // the contents (without copying) for the duration of the call. | |
| 968 | 1009 | func (x *OutputStream) WriteAsync(BufferVar []byte, CountVar uint, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) { | |
| 1010 | + | core.LazyRegister(&xOutputStreamWriteAsync, "GIO", "g_output_stream_write_async", false) | |
| 1011 | + | ||
| 969 | 1012 | xOutputStreamWriteAsync(x.GoPointer(), BufferVar, CountVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | |
| 970 | 1013 | } | |
| 971 | 1014 | ||
| @@ -983,6 +1026,7 @@ var xOutputStreamWriteBytes func(uintptr, *glib.Bytes, uintptr, **glib.Error) in | |||
| 983 | 1026 | // #GBytes instance multiple times potentially can result in duplicated | |
| 984 | 1027 | // data in the output stream. | |
| 985 | 1028 | func (x *OutputStream) WriteBytes(BytesVar *glib.Bytes, CancellableVar *Cancellable) (int, error) { | |
| 1029 | + | core.LazyRegister(&xOutputStreamWriteBytes, "GIO", "g_output_stream_write_bytes", false) | |
| 986 | 1030 | var cerr *glib.Error | |
| 987 | 1031 | ||
| 988 | 1032 | cret := xOutputStreamWriteBytes(x.GoPointer(), BytesVar, CancellableVar.GoPointer(), &cerr) | |
| @@ -1008,6 +1052,8 @@ var xOutputStreamWriteBytesAsync func(uintptr, *glib.Bytes, int, uintptr, uintpt | |||
| 1008 | 1052 | // For the synchronous, blocking version of this function, see | |
| 1009 | 1053 | // g_output_stream_write_bytes(). | |
| 1010 | 1054 | func (x *OutputStream) WriteBytesAsync(BytesVar *glib.Bytes, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) { | |
| 1055 | + | core.LazyRegister(&xOutputStreamWriteBytesAsync, "GIO", "g_output_stream_write_bytes_async", false) | |
| 1056 | + | ||
| 1011 | 1057 | xOutputStreamWriteBytesAsync(x.GoPointer(), BytesVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | |
| 1012 | 1058 | } | |
| 1013 | 1059 | ||
| @@ -1015,6 +1061,7 @@ var xOutputStreamWriteBytesFinish func(uintptr, uintptr, **glib.Error) int | |||
| 1015 | 1061 | ||
| 1016 | 1062 | // Finishes a stream write-from-#GBytes operation. | |
| 1017 | 1063 | func (x *OutputStream) WriteBytesFinish(ResultVar AsyncResult) (int, error) { | |
| 1064 | + | core.LazyRegister(&xOutputStreamWriteBytesFinish, "GIO", "g_output_stream_write_bytes_finish", false) | |
| 1018 | 1065 | var cerr *glib.Error | |
| 1019 | 1066 | ||
| 1020 | 1067 | cret := xOutputStreamWriteBytesFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr) | |
| @@ -1028,6 +1075,7 @@ var xOutputStreamWriteFinish func(uintptr, uintptr, **glib.Error) int | |||
| 1028 | 1075 | ||
| 1029 | 1076 | // Finishes a stream write operation. | |
| 1030 | 1077 | func (x *OutputStream) WriteFinish(ResultVar AsyncResult) (int, error) { | |
| 1078 | + | core.LazyRegister(&xOutputStreamWriteFinish, "GIO", "g_output_stream_write_finish", false) | |
| 1031 | 1079 | var cerr *glib.Error | |
| 1032 | 1080 | ||
| 1033 | 1081 | cret := xOutputStreamWriteFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr) | |
| @@ -1063,6 +1111,7 @@ var xOutputStreamWritev func(uintptr, []OutputVector, uint, *uint, uintptr, **gl | |||
| 1063 | 1111 | // are exceeded. For example, when writing to a local file on UNIX platforms, | |
| 1064 | 1112 | // the aggregate buffer size must not exceed %G_MAXSSIZE bytes. | |
| 1065 | 1113 | func (x *OutputStream) Writev(VectorsVar []OutputVector, NVectorsVar uint, BytesWrittenVar *uint, CancellableVar *Cancellable) (bool, error) { | |
| 1114 | + | core.LazyRegister(&xOutputStreamWritev, "GIO", "g_output_stream_writev", false) | |
| 1066 | 1115 | var cerr *glib.Error | |
| 1067 | 1116 | ||
| 1068 | 1117 | cret := xOutputStreamWritev(x.GoPointer(), VectorsVar, NVectorsVar, BytesWrittenVar, CancellableVar.GoPointer(), &cerr) | |
| @@ -1097,6 +1146,7 @@ var xOutputStreamWritevAll func(uintptr, []OutputVector, uint, *uint, uintptr, * | |||
| 1097 | 1146 | // The content of the individual elements of @vectors might be changed by this | |
| 1098 | 1147 | // function. | |
| 1099 | 1148 | func (x *OutputStream) WritevAll(VectorsVar []OutputVector, NVectorsVar uint, BytesWrittenVar *uint, CancellableVar *Cancellable) (bool, error) { | |
| 1149 | + | core.LazyRegister(&xOutputStreamWritevAll, "GIO", "g_output_stream_writev_all", false) | |
| 1100 | 1150 | var cerr *glib.Error | |
| 1101 | 1151 | ||
| 1102 | 1152 | cret := xOutputStreamWritevAll(x.GoPointer(), VectorsVar, NVectorsVar, BytesWrittenVar, CancellableVar.GoPointer(), &cerr) | |
| @@ -1125,6 +1175,8 @@ var xOutputStreamWritevAllAsync func(uintptr, []OutputVector, uint, int, uintptr | |||
| 1125 | 1175 | // until @callback is called. The content of the individual elements | |
| 1126 | 1176 | // of @vectors might be changed by this function. | |
| 1127 | 1177 | func (x *OutputStream) WritevAllAsync(VectorsVar []OutputVector, NVectorsVar uint, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) { | |
| 1178 | + | core.LazyRegister(&xOutputStreamWritevAllAsync, "GIO", "g_output_stream_writev_all_async", false) | |
| 1179 | + | ||
| 1128 | 1180 | xOutputStreamWritevAllAsync(x.GoPointer(), VectorsVar, NVectorsVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | |
| 1129 | 1181 | } | |
| 1130 | 1182 | ||
| @@ -1141,6 +1193,7 @@ var xOutputStreamWritevAllFinish func(uintptr, uintptr, *uint, **glib.Error) boo | |||
| 1141 | 1193 | // language then you must write your own loop around | |
| 1142 | 1194 | // g_output_stream_writev_async(). | |
| 1143 | 1195 | func (x *OutputStream) WritevAllFinish(ResultVar AsyncResult, BytesWrittenVar *uint) (bool, error) { | |
| 1196 | + | core.LazyRegister(&xOutputStreamWritevAllFinish, "GIO", "g_output_stream_writev_all_finish", false) | |
| 1144 | 1197 | var cerr *glib.Error | |
| 1145 | 1198 | ||
| 1146 | 1199 | cret := xOutputStreamWritevAllFinish(x.GoPointer(), ResultVar.GoPointer(), BytesWrittenVar, &cerr) | |
| @@ -1183,6 +1236,8 @@ var xOutputStreamWritevAsync func(uintptr, []OutputVector, uint, int, uintptr, u | |||
| 1183 | 1236 | // Note that no copy of @vectors will be made, so it must stay valid | |
| 1184 | 1237 | // until @callback is called. | |
| 1185 | 1238 | func (x *OutputStream) WritevAsync(VectorsVar []OutputVector, NVectorsVar uint, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) { | |
| 1239 | + | core.LazyRegister(&xOutputStreamWritevAsync, "GIO", "g_output_stream_writev_async", false) | |
| 1240 | + | ||
| 1186 | 1241 | xOutputStreamWritevAsync(x.GoPointer(), VectorsVar, NVectorsVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | |
| 1187 | 1242 | } | |
| 1188 | 1243 | ||
| @@ -1190,6 +1245,7 @@ var xOutputStreamWritevFinish func(uintptr, uintptr, *uint, **glib.Error) bool | |||
| 1190 | 1245 | ||
| 1191 | 1246 | // Finishes a stream writev operation. | |
| 1192 | 1247 | func (x *OutputStream) WritevFinish(ResultVar AsyncResult, BytesWrittenVar *uint) (bool, error) { | |
| 1248 | + | core.LazyRegister(&xOutputStreamWritevFinish, "GIO", "g_output_stream_writev_finish", false) | |
| 1193 | 1249 | var cerr *glib.Error | |
| 1194 | 1250 | ||
| 1195 | 1251 | cret := xOutputStreamWritevFinish(x.GoPointer(), ResultVar.GoPointer(), BytesWrittenVar, &cerr) | |
| @@ -1213,46 +1269,4 @@ func (c *OutputStream) SetGoPointer(ptr uintptr) { | |||
| 1213 | 1269 | func init() { | |
| 1214 | 1270 | core.SetPackageName("GIO", "gio-2.0") | |
| 1215 | 1271 | core.SetSharedLibraries("GIO", []string{"libgio-2.0.so.0", "libgio-2.0.0.dylib"}) | |
| 1216 | - | var libs []uintptr | |
| 1217 | - | for _, libPath := range core.GetPaths("GIO") { | |
| 1218 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 1219 | - | if err != nil { | |
| 1220 | - | panic(err) | |
| 1221 | - | } | |
| 1222 | - | libs = append(libs, lib) | |
| 1223 | - | } | |
| 1224 | - | ||
| 1225 | - | core.PuregoSafeRegister(&xOutputStreamGLibType, libs, "g_output_stream_get_type") | |
| 1226 | - | ||
| 1227 | - | core.PuregoSafeRegister(&xOutputStreamClearPending, libs, "g_output_stream_clear_pending") | |
| 1228 | - | core.PuregoSafeRegister(&xOutputStreamClose, libs, "g_output_stream_close") | |
| 1229 | - | core.PuregoSafeRegister(&xOutputStreamCloseAsync, libs, "g_output_stream_close_async") | |
| 1230 | - | core.PuregoSafeRegister(&xOutputStreamCloseFinish, libs, "g_output_stream_close_finish") | |
| 1231 | - | core.PuregoSafeRegister(&xOutputStreamFlush, libs, "g_output_stream_flush") | |
| 1232 | - | core.PuregoSafeRegister(&xOutputStreamFlushAsync, libs, "g_output_stream_flush_async") | |
| 1233 | - | core.PuregoSafeRegister(&xOutputStreamFlushFinish, libs, "g_output_stream_flush_finish") | |
| 1234 | - | core.PuregoSafeRegister(&xOutputStreamHasPending, libs, "g_output_stream_has_pending") | |
| 1235 | - | core.PuregoSafeRegister(&xOutputStreamIsClosed, libs, "g_output_stream_is_closed") | |
| 1236 | - | core.PuregoSafeRegister(&xOutputStreamIsClosing, libs, "g_output_stream_is_closing") | |
| 1237 | - | core.PuregoSafeRegister(&xOutputStreamPrintf, libs, "g_output_stream_printf") | |
| 1238 | - | core.PuregoSafeRegister(&xOutputStreamSetPending, libs, "g_output_stream_set_pending") | |
| 1239 | - | core.PuregoSafeRegister(&xOutputStreamSplice, libs, "g_output_stream_splice") | |
| 1240 | - | core.PuregoSafeRegister(&xOutputStreamSpliceAsync, libs, "g_output_stream_splice_async") | |
| 1241 | - | core.PuregoSafeRegister(&xOutputStreamSpliceFinish, libs, "g_output_stream_splice_finish") | |
| 1242 | - | core.PuregoSafeRegister(&xOutputStreamVprintf, libs, "g_output_stream_vprintf") | |
| 1243 | - | core.PuregoSafeRegister(&xOutputStreamWrite, libs, "g_output_stream_write") | |
| 1244 | - | core.PuregoSafeRegister(&xOutputStreamWriteAll, libs, "g_output_stream_write_all") | |
| 1245 | - | core.PuregoSafeRegister(&xOutputStreamWriteAllAsync, libs, "g_output_stream_write_all_async") | |
| 1246 | - | core.PuregoSafeRegister(&xOutputStreamWriteAllFinish, libs, "g_output_stream_write_all_finish") | |
| 1247 | - | core.PuregoSafeRegister(&xOutputStreamWriteAsync, libs, "g_output_stream_write_async") | |
| 1248 | - | core.PuregoSafeRegister(&xOutputStreamWriteBytes, libs, "g_output_stream_write_bytes") | |
| 1249 | - | core.PuregoSafeRegister(&xOutputStreamWriteBytesAsync, libs, "g_output_stream_write_bytes_async") | |
| 1250 | - | core.PuregoSafeRegister(&xOutputStreamWriteBytesFinish, libs, "g_output_stream_write_bytes_finish") | |
| 1251 | - | core.PuregoSafeRegister(&xOutputStreamWriteFinish, libs, "g_output_stream_write_finish") | |
| 1252 | - | core.PuregoSafeRegister(&xOutputStreamWritev, libs, "g_output_stream_writev") | |
| 1253 | - | core.PuregoSafeRegister(&xOutputStreamWritevAll, libs, "g_output_stream_writev_all") | |
| 1254 | - | core.PuregoSafeRegister(&xOutputStreamWritevAllAsync, libs, "g_output_stream_writev_all_async") | |
| 1255 | - | core.PuregoSafeRegister(&xOutputStreamWritevAllFinish, libs, "g_output_stream_writev_all_finish") | |
| 1256 | - | core.PuregoSafeRegister(&xOutputStreamWritevAsync, libs, "g_output_stream_writev_async") | |
| 1257 | - | core.PuregoSafeRegister(&xOutputStreamWritevFinish, libs, "g_output_stream_writev_finish") | |
| 1258 | 1272 | } | |
| @@ -75,7 +75,7 @@ func (x *OutputStreamClass) OverrideWriteFn(cb func(*OutputStream, []byte, uint, | |||||
| 75 | if cb == nil { | 75 | if cb == nil { | ||
| 76 | x.xWriteFn = 0 | 76 | x.xWriteFn = 0 | ||
| 77 | } else { | 77 | } else { | ||
| 78 | - | x.xWriteFn = purego.NewCallback(func(StreamVarp uintptr, BufferVarp []byte, CountVarp uint, CancellableVarp uintptr) int { | 78 | + | x.xWriteFn = purego.NewCallback(func(StreamVarp uintptr, BufferVarp []byte, CountVarp uint, CancellableVarp uintptr, cerrp **glib.Error) int { |
| 79 | return cb(OutputStreamNewFromInternalPtr(StreamVarp), BufferVarp, CountVarp, CancellableNewFromInternalPtr(CancellableVarp)) | 79 | return cb(OutputStreamNewFromInternalPtr(StreamVarp), BufferVarp, CountVarp, CancellableNewFromInternalPtr(CancellableVarp)) | ||
| 80 | }) | 80 | }) | ||
| 81 | } | 81 | } | ||
| @@ -86,10 +86,11 @@ func (x *OutputStreamClass) GetWriteFn() func(*OutputStream, []byte, uint, *Canc | |||||
| 86 | if x.xWriteFn == 0 { | 86 | if x.xWriteFn == 0 { | ||
| 87 | return nil | 87 | return nil | ||
| 88 | } | 88 | } | ||
| 89 | - | var rawCallback func(StreamVarp uintptr, BufferVarp []byte, CountVarp uint, CancellableVarp uintptr) int | 89 | + | var rawCallback func(StreamVarp uintptr, BufferVarp []byte, CountVarp uint, CancellableVarp uintptr, cerrp **glib.Error) int |
| 90 | purego.RegisterFunc(&rawCallback, x.xWriteFn) | 90 | purego.RegisterFunc(&rawCallback, x.xWriteFn) | ||
| 91 | return func(StreamVar *OutputStream, BufferVar []byte, CountVar uint, CancellableVar *Cancellable) int { | 91 | return func(StreamVar *OutputStream, BufferVar []byte, CountVar uint, CancellableVar *Cancellable) int { | ||
| 92 | - | return rawCallback(StreamVar.GoPointer(), BufferVar, CountVar, CancellableVar.GoPointer()) | 92 | + | var cerr *glib.Error |
| 93 | + | return rawCallback(StreamVar.GoPointer(), BufferVar, CountVar, CancellableVar.GoPointer(), &cerr) | |||
| 93 | } | 94 | } | ||
| 94 | } | 95 | } | ||
| 95 | 96 | ||||
| @@ -98,7 +99,7 @@ func (x *OutputStreamClass) OverrideSplice(cb func(*OutputStream, *InputStream, | |||||
| 98 | if cb == nil { | 99 | if cb == nil { | ||
| 99 | x.xSplice = 0 | 100 | x.xSplice = 0 | ||
| 100 | } else { | 101 | } else { | ||
| 101 | - | x.xSplice = purego.NewCallback(func(StreamVarp uintptr, SourceVarp uintptr, FlagsVarp OutputStreamSpliceFlags, CancellableVarp uintptr) int { | 102 | + | x.xSplice = purego.NewCallback(func(StreamVarp uintptr, SourceVarp uintptr, FlagsVarp OutputStreamSpliceFlags, CancellableVarp uintptr, cerrp **glib.Error) int { |
| 102 | return cb(OutputStreamNewFromInternalPtr(StreamVarp), InputStreamNewFromInternalPtr(SourceVarp), FlagsVarp, CancellableNewFromInternalPtr(CancellableVarp)) | 103 | return cb(OutputStreamNewFromInternalPtr(StreamVarp), InputStreamNewFromInternalPtr(SourceVarp), FlagsVarp, CancellableNewFromInternalPtr(CancellableVarp)) | ||
| 103 | }) | 104 | }) | ||
| 104 | } | 105 | } | ||
| @@ -109,10 +110,11 @@ func (x *OutputStreamClass) GetSplice() func(*OutputStream, *InputStream, Output | |||||
| 109 | if x.xSplice == 0 { | 110 | if x.xSplice == 0 { | ||
| 110 | return nil | 111 | return nil | ||
| 111 | } | 112 | } | ||
| 112 | - | var rawCallback func(StreamVarp uintptr, SourceVarp uintptr, FlagsVarp OutputStreamSpliceFlags, CancellableVarp uintptr) int | 113 | + | var rawCallback func(StreamVarp uintptr, SourceVarp uintptr, FlagsVarp OutputStreamSpliceFlags, CancellableVarp uintptr, cerrp **glib.Error) int |
| 113 | purego.RegisterFunc(&rawCallback, x.xSplice) | 114 | purego.RegisterFunc(&rawCallback, x.xSplice) | ||
| 114 | return func(StreamVar *OutputStream, SourceVar *InputStream, FlagsVar OutputStreamSpliceFlags, CancellableVar *Cancellable) int { | 115 | return func(StreamVar *OutputStream, SourceVar *InputStream, FlagsVar OutputStreamSpliceFlags, CancellableVar *Cancellable) int { | ||
| 115 | - | return rawCallback(StreamVar.GoPointer(), SourceVar.GoPointer(), FlagsVar, CancellableVar.GoPointer()) | 116 | + | var cerr *glib.Error |
| 117 | + | return rawCallback(StreamVar.GoPointer(), SourceVar.GoPointer(), FlagsVar, CancellableVar.GoPointer(), &cerr) | |||
| 116 | } | 118 | } | ||
| 117 | } | 119 | } | ||
| 118 | 120 | ||||
| @@ -121,7 +123,7 @@ func (x *OutputStreamClass) OverrideFlush(cb func(*OutputStream, *Cancellable) b | |||||
| 121 | if cb == nil { | 123 | if cb == nil { | ||
| 122 | x.xFlush = 0 | 124 | x.xFlush = 0 | ||
| 123 | } else { | 125 | } else { | ||
| 124 | - | x.xFlush = purego.NewCallback(func(StreamVarp uintptr, CancellableVarp uintptr) bool { | 126 | + | x.xFlush = purego.NewCallback(func(StreamVarp uintptr, CancellableVarp uintptr, cerrp **glib.Error) bool { |
| 125 | return cb(OutputStreamNewFromInternalPtr(StreamVarp), CancellableNewFromInternalPtr(CancellableVarp)) | 127 | return cb(OutputStreamNewFromInternalPtr(StreamVarp), CancellableNewFromInternalPtr(CancellableVarp)) | ||
| 126 | }) | 128 | }) | ||
| 127 | } | 129 | } | ||
| @@ -132,10 +134,11 @@ func (x *OutputStreamClass) GetFlush() func(*OutputStream, *Cancellable) bool { | |||||
| 132 | if x.xFlush == 0 { | 134 | if x.xFlush == 0 { | ||
| 133 | return nil | 135 | return nil | ||
| 134 | } | 136 | } | ||
| 135 | - | var rawCallback func(StreamVarp uintptr, CancellableVarp uintptr) bool | 137 | + | var rawCallback func(StreamVarp uintptr, CancellableVarp uintptr, cerrp **glib.Error) bool |
| 136 | purego.RegisterFunc(&rawCallback, x.xFlush) | 138 | purego.RegisterFunc(&rawCallback, x.xFlush) | ||
| 137 | return func(StreamVar *OutputStream, CancellableVar *Cancellable) bool { | 139 | return func(StreamVar *OutputStream, CancellableVar *Cancellable) bool { | ||
| 138 | - | return rawCallback(StreamVar.GoPointer(), CancellableVar.GoPointer()) | 140 | + | var cerr *glib.Error |
| 141 | + | return rawCallback(StreamVar.GoPointer(), CancellableVar.GoPointer(), &cerr) | |||
| 139 | } | 142 | } | ||
| 140 | } | 143 | } | ||
| 141 | 144 | ||||
| @@ -144,7 +147,7 @@ func (x *OutputStreamClass) OverrideCloseFn(cb func(*OutputStream, *Cancellable) | |||||
| 144 | if cb == nil { | 147 | if cb == nil { | ||
| 145 | x.xCloseFn = 0 | 148 | x.xCloseFn = 0 | ||
| 146 | } else { | 149 | } else { | ||
| 147 | - | x.xCloseFn = purego.NewCallback(func(StreamVarp uintptr, CancellableVarp uintptr) bool { | 150 | + | x.xCloseFn = purego.NewCallback(func(StreamVarp uintptr, CancellableVarp uintptr, cerrp **glib.Error) bool { |
| 148 | return cb(OutputStreamNewFromInternalPtr(StreamVarp), CancellableNewFromInternalPtr(CancellableVarp)) | 151 | return cb(OutputStreamNewFromInternalPtr(StreamVarp), CancellableNewFromInternalPtr(CancellableVarp)) | ||
| 149 | }) | 152 | }) | ||
| 150 | } | 153 | } | ||
| @@ -155,10 +158,11 @@ func (x *OutputStreamClass) GetCloseFn() func(*OutputStream, *Cancellable) bool | |||||
| 155 | if x.xCloseFn == 0 { | 158 | if x.xCloseFn == 0 { | ||
| 156 | return nil | 159 | return nil | ||
| 157 | } | 160 | } | ||
| 158 | - | var rawCallback func(StreamVarp uintptr, CancellableVarp uintptr) bool | 161 | + | var rawCallback func(StreamVarp uintptr, CancellableVarp uintptr, cerrp **glib.Error) bool |
| 159 | purego.RegisterFunc(&rawCallback, x.xCloseFn) | 162 | purego.RegisterFunc(&rawCallback, x.xCloseFn) | ||
| 160 | return func(StreamVar *OutputStream, CancellableVar *Cancellable) bool { | 163 | return func(StreamVar *OutputStream, CancellableVar *Cancellable) bool { | ||
| 161 | - | return rawCallback(StreamVar.GoPointer(), CancellableVar.GoPointer()) | 164 | + | var cerr *glib.Error |
| 165 | + | return rawCallback(StreamVar.GoPointer(), CancellableVar.GoPointer(), &cerr) | |||
| 162 | } | 166 | } | ||
| 163 | } | 167 | } | ||
| 164 | 168 | ||||
| @@ -190,7 +194,7 @@ func (x *OutputStreamClass) OverrideWriteFinish(cb func(*OutputStream, AsyncResu | |||||
| 190 | if cb == nil { | 194 | if cb == nil { | ||
| 191 | x.xWriteFinish = 0 | 195 | x.xWriteFinish = 0 | ||
| 192 | } else { | 196 | } else { | ||
| 193 | - | x.xWriteFinish = purego.NewCallback(func(StreamVarp uintptr, ResultVarp uintptr) int { | 197 | + | x.xWriteFinish = purego.NewCallback(func(StreamVarp uintptr, ResultVarp uintptr, cerrp **glib.Error) int { |
| 194 | return cb(OutputStreamNewFromInternalPtr(StreamVarp), &AsyncResultBase{Ptr: ResultVarp}) | 198 | return cb(OutputStreamNewFromInternalPtr(StreamVarp), &AsyncResultBase{Ptr: ResultVarp}) | ||
| 195 | }) | 199 | }) | ||
| 196 | } | 200 | } | ||
| @@ -201,10 +205,11 @@ func (x *OutputStreamClass) GetWriteFinish() func(*OutputStream, AsyncResult) in | |||||
| 201 | if x.xWriteFinish == 0 { | 205 | if x.xWriteFinish == 0 { | ||
| 202 | return nil | 206 | return nil | ||
| 203 | } | 207 | } | ||
| 204 | - | var rawCallback func(StreamVarp uintptr, ResultVarp uintptr) int | 208 | + | var rawCallback func(StreamVarp uintptr, ResultVarp uintptr, cerrp **glib.Error) int |
| 205 | purego.RegisterFunc(&rawCallback, x.xWriteFinish) | 209 | purego.RegisterFunc(&rawCallback, x.xWriteFinish) | ||
| 206 | return func(StreamVar *OutputStream, ResultVar AsyncResult) int { | 210 | return func(StreamVar *OutputStream, ResultVar AsyncResult) int { | ||
| 207 | - | return rawCallback(StreamVar.GoPointer(), ResultVar.GoPointer()) | 211 | + | var cerr *glib.Error |
| 212 | + | return rawCallback(StreamVar.GoPointer(), ResultVar.GoPointer(), &cerr) | |||
| 208 | } | 213 | } | ||
| 209 | } | 214 | } | ||
| 210 | 215 | ||||
| @@ -236,7 +241,7 @@ func (x *OutputStreamClass) OverrideSpliceFinish(cb func(*OutputStream, AsyncRes | |||||
| 236 | if cb == nil { | 241 | if cb == nil { | ||
| 237 | x.xSpliceFinish = 0 | 242 | x.xSpliceFinish = 0 | ||
| 238 | } else { | 243 | } else { | ||
| 239 | - | x.xSpliceFinish = purego.NewCallback(func(StreamVarp uintptr, ResultVarp uintptr) int { | 244 | + | x.xSpliceFinish = purego.NewCallback(func(StreamVarp uintptr, ResultVarp uintptr, cerrp **glib.Error) int { |
| 240 | return cb(OutputStreamNewFromInternalPtr(StreamVarp), &AsyncResultBase{Ptr: ResultVarp}) | 245 | return cb(OutputStreamNewFromInternalPtr(StreamVarp), &AsyncResultBase{Ptr: ResultVarp}) | ||
| 241 | }) | 246 | }) | ||
| 242 | } | 247 | } | ||
| @@ -247,10 +252,11 @@ func (x *OutputStreamClass) GetSpliceFinish() func(*OutputStream, AsyncResult) i | |||||
| 247 | if x.xSpliceFinish == 0 { | 252 | if x.xSpliceFinish == 0 { | ||
| 248 | return nil | 253 | return nil | ||
| 249 | } | 254 | } | ||
| 250 | - | var rawCallback func(StreamVarp uintptr, ResultVarp uintptr) int | 255 | + | var rawCallback func(StreamVarp uintptr, ResultVarp uintptr, cerrp **glib.Error) int |
| 251 | purego.RegisterFunc(&rawCallback, x.xSpliceFinish) | 256 | purego.RegisterFunc(&rawCallback, x.xSpliceFinish) | ||
| 252 | return func(StreamVar *OutputStream, ResultVar AsyncResult) int { | 257 | return func(StreamVar *OutputStream, ResultVar AsyncResult) int { | ||
| 253 | - | return rawCallback(StreamVar.GoPointer(), ResultVar.GoPointer()) | 258 | + | var cerr *glib.Error |
| 259 | + | return rawCallback(StreamVar.GoPointer(), ResultVar.GoPointer(), &cerr) | |||
| 254 | } | 260 | } | ||
| 255 | } | 261 | } | ||
| 256 | 262 | ||||
| @@ -282,7 +288,7 @@ func (x *OutputStreamClass) OverrideFlushFinish(cb func(*OutputStream, AsyncResu | |||||
| 282 | if cb == nil { | 288 | if cb == nil { | ||
| 283 | x.xFlushFinish = 0 | 289 | x.xFlushFinish = 0 | ||
| 284 | } else { | 290 | } else { | ||
| 285 | - | x.xFlushFinish = purego.NewCallback(func(StreamVarp uintptr, ResultVarp uintptr) bool { | 291 | + | x.xFlushFinish = purego.NewCallback(func(StreamVarp uintptr, ResultVarp uintptr, cerrp **glib.Error) bool { |
| 286 | return cb(OutputStreamNewFromInternalPtr(StreamVarp), &AsyncResultBase{Ptr: ResultVarp}) | 292 | return cb(OutputStreamNewFromInternalPtr(StreamVarp), &AsyncResultBase{Ptr: ResultVarp}) | ||
| 287 | }) | 293 | }) | ||
| 288 | } | 294 | } | ||
| @@ -293,10 +299,11 @@ func (x *OutputStreamClass) GetFlushFinish() func(*OutputStream, AsyncResult) bo | |||||
| 293 | if x.xFlushFinish == 0 { | 299 | if x.xFlushFinish == 0 { | ||
| 294 | return nil | 300 | return nil | ||
| 295 | } | 301 | } | ||
| 296 | - | var rawCallback func(StreamVarp uintptr, ResultVarp uintptr) bool | 302 | + | var rawCallback func(StreamVarp uintptr, ResultVarp uintptr, cerrp **glib.Error) bool |
| 297 | purego.RegisterFunc(&rawCallback, x.xFlushFinish) | 303 | purego.RegisterFunc(&rawCallback, x.xFlushFinish) | ||
| 298 | return func(StreamVar *OutputStream, ResultVar AsyncResult) bool { | 304 | return func(StreamVar *OutputStream, ResultVar AsyncResult) bool { | ||
| 299 | - | return rawCallback(StreamVar.GoPointer(), ResultVar.GoPointer()) | 305 | + | var cerr *glib.Error |
| 306 | + | return rawCallback(StreamVar.GoPointer(), ResultVar.GoPointer(), &cerr) | |||
| 300 | } | 307 | } | ||
| 301 | } | 308 | } | ||
| 302 | 309 | ||||
| @@ -328,7 +335,7 @@ func (x *OutputStreamClass) OverrideCloseFinish(cb func(*OutputStream, AsyncResu | |||||
| 328 | if cb == nil { | 335 | if cb == nil { | ||
| 329 | x.xCloseFinish = 0 | 336 | x.xCloseFinish = 0 | ||
| 330 | } else { | 337 | } else { | ||
| 331 | - | x.xCloseFinish = purego.NewCallback(func(StreamVarp uintptr, ResultVarp uintptr) bool { | 338 | + | x.xCloseFinish = purego.NewCallback(func(StreamVarp uintptr, ResultVarp uintptr, cerrp **glib.Error) bool { |
| 332 | return cb(OutputStreamNewFromInternalPtr(StreamVarp), &AsyncResultBase{Ptr: ResultVarp}) | 339 | return cb(OutputStreamNewFromInternalPtr(StreamVarp), &AsyncResultBase{Ptr: ResultVarp}) | ||
| 333 | }) | 340 | }) | ||
| 334 | } | 341 | } | ||
| @@ -339,10 +346,11 @@ func (x *OutputStreamClass) GetCloseFinish() func(*OutputStream, AsyncResult) bo | |||||
| 339 | if x.xCloseFinish == 0 { | 346 | if x.xCloseFinish == 0 { | ||
| 340 | return nil | 347 | return nil | ||
| 341 | } | 348 | } | ||
| 342 | - | var rawCallback func(StreamVarp uintptr, ResultVarp uintptr) bool | 349 | + | var rawCallback func(StreamVarp uintptr, ResultVarp uintptr, cerrp **glib.Error) bool |
| 343 | purego.RegisterFunc(&rawCallback, x.xCloseFinish) | 350 | purego.RegisterFunc(&rawCallback, x.xCloseFinish) | ||
| 344 | return func(StreamVar *OutputStream, ResultVar AsyncResult) bool { | 351 | return func(StreamVar *OutputStream, ResultVar AsyncResult) bool { | ||
| 345 | - | return rawCallback(StreamVar.GoPointer(), ResultVar.GoPointer()) | 352 | + | var cerr *glib.Error |
| 353 | + | return rawCallback(StreamVar.GoPointer(), ResultVar.GoPointer(), &cerr) | |||
| 346 | } | 354 | } | ||
| 347 | } | 355 | } | ||
| 348 | 356 | ||||
| @@ -351,7 +359,7 @@ func (x *OutputStreamClass) OverrideWritevFn(cb func(*OutputStream, []OutputVect | |||||
| 351 | if cb == nil { | 359 | if cb == nil { | ||
| 352 | x.xWritevFn = 0 | 360 | x.xWritevFn = 0 | ||
| 353 | } else { | 361 | } else { | ||
| 354 | - | x.xWritevFn = purego.NewCallback(func(StreamVarp uintptr, VectorsVarp []OutputVector, NVectorsVarp uint, BytesWrittenVarp *uint, CancellableVarp uintptr) bool { | 362 | + | x.xWritevFn = purego.NewCallback(func(StreamVarp uintptr, VectorsVarp []OutputVector, NVectorsVarp uint, BytesWrittenVarp *uint, CancellableVarp uintptr, cerrp **glib.Error) bool { |
| 355 | return cb(OutputStreamNewFromInternalPtr(StreamVarp), VectorsVarp, NVectorsVarp, BytesWrittenVarp, CancellableNewFromInternalPtr(CancellableVarp)) | 363 | return cb(OutputStreamNewFromInternalPtr(StreamVarp), VectorsVarp, NVectorsVarp, BytesWrittenVarp, CancellableNewFromInternalPtr(CancellableVarp)) | ||
| 356 | }) | 364 | }) | ||
| 357 | } | 365 | } | ||
| @@ -362,10 +370,11 @@ func (x *OutputStreamClass) GetWritevFn() func(*OutputStream, []OutputVector, ui | |||||
| 362 | if x.xWritevFn == 0 { | 370 | if x.xWritevFn == 0 { | ||
| 363 | return nil | 371 | return nil | ||
| 364 | } | 372 | } | ||
| 365 | - | var rawCallback func(StreamVarp uintptr, VectorsVarp []OutputVector, NVectorsVarp uint, BytesWrittenVarp *uint, CancellableVarp uintptr) bool | 373 | + | var rawCallback func(StreamVarp uintptr, VectorsVarp []OutputVector, NVectorsVarp uint, BytesWrittenVarp *uint, CancellableVarp uintptr, cerrp **glib.Error) bool |
| 366 | purego.RegisterFunc(&rawCallback, x.xWritevFn) | 374 | purego.RegisterFunc(&rawCallback, x.xWritevFn) | ||
| 367 | return func(StreamVar *OutputStream, VectorsVar []OutputVector, NVectorsVar uint, BytesWrittenVar *uint, CancellableVar *Cancellable) bool { | 375 | return func(StreamVar *OutputStream, VectorsVar []OutputVector, NVectorsVar uint, BytesWrittenVar *uint, CancellableVar *Cancellable) bool { | ||
| 368 | - | return rawCallback(StreamVar.GoPointer(), VectorsVar, NVectorsVar, BytesWrittenVar, CancellableVar.GoPointer()) | 376 | + | var cerr *glib.Error |
| 377 | + | return rawCallback(StreamVar.GoPointer(), VectorsVar, NVectorsVar, BytesWrittenVar, CancellableVar.GoPointer(), &cerr) | |||
| 369 | } | 378 | } | ||
| 370 | } | 379 | } | ||
| 371 | 380 | ||||
| @@ -397,7 +406,7 @@ func (x *OutputStreamClass) OverrideWritevFinish(cb func(*OutputStream, AsyncRes | |||||
| 397 | if cb == nil { | 406 | if cb == nil { | ||
| 398 | x.xWritevFinish = 0 | 407 | x.xWritevFinish = 0 | ||
| 399 | } else { | 408 | } else { | ||
| 400 | - | x.xWritevFinish = purego.NewCallback(func(StreamVarp uintptr, ResultVarp uintptr, BytesWrittenVarp *uint) bool { | 409 | + | x.xWritevFinish = purego.NewCallback(func(StreamVarp uintptr, ResultVarp uintptr, BytesWrittenVarp *uint, cerrp **glib.Error) bool { |
| 401 | return cb(OutputStreamNewFromInternalPtr(StreamVarp), &AsyncResultBase{Ptr: ResultVarp}, BytesWrittenVarp) | 410 | return cb(OutputStreamNewFromInternalPtr(StreamVarp), &AsyncResultBase{Ptr: ResultVarp}, BytesWrittenVarp) | ||
| 402 | }) | 411 | }) | ||
| 403 | } | 412 | } | ||
| @@ -408,10 +417,11 @@ func (x *OutputStreamClass) GetWritevFinish() func(*OutputStream, AsyncResult, * | |||||
| 408 | if x.xWritevFinish == 0 { | 417 | if x.xWritevFinish == 0 { | ||
| 409 | return nil | 418 | return nil | ||
| 410 | } | 419 | } | ||
| 411 | - | var rawCallback func(StreamVarp uintptr, ResultVarp uintptr, BytesWrittenVarp *uint) bool | 420 | + | var rawCallback func(StreamVarp uintptr, ResultVarp uintptr, BytesWrittenVarp *uint, cerrp **glib.Error) bool |
| 412 | purego.RegisterFunc(&rawCallback, x.xWritevFinish) | 421 | purego.RegisterFunc(&rawCallback, x.xWritevFinish) | ||
| 413 | return func(StreamVar *OutputStream, ResultVar AsyncResult, BytesWrittenVar *uint) bool { | 422 | return func(StreamVar *OutputStream, ResultVar AsyncResult, BytesWrittenVar *uint) bool { | ||
| 414 | - | return rawCallback(StreamVar.GoPointer(), ResultVar.GoPointer(), BytesWrittenVar) | 423 | + | var cerr *glib.Error |
| 424 | + | return rawCallback(StreamVar.GoPointer(), ResultVar.GoPointer(), BytesWrittenVar, &cerr) | |||
| 415 | } | 425 | } | ||
| 416 | } | 426 | } | ||
| 417 | 427 | ||||
| @@ -570,6 +580,7 @@ type OutputStream struct { | |||||
| 570 | var xOutputStreamGLibType func() types.GType | 580 | var xOutputStreamGLibType func() types.GType | ||
| 571 | 581 | ||||
| 572 | func OutputStreamGLibType() types.GType { | 582 | func OutputStreamGLibType() types.GType { | ||
| 583 | + | core.LazyRegister(&xOutputStreamGLibType, "GIO", "g_output_stream_get_type", false) | |||
| 573 | return xOutputStreamGLibType() | 584 | return xOutputStreamGLibType() | ||
| 574 | } | 585 | } | ||
| 575 | 586 | ||||
| @@ -583,6 +594,8 @@ var xOutputStreamClearPending func(uintptr) | |||||
| 583 | 594 | ||||
| 584 | // Clears the pending flag on @stream. | 595 | // Clears the pending flag on @stream. | ||
| 585 | func (x *OutputStream) ClearPending() { | 596 | func (x *OutputStream) ClearPending() { | ||
| 597 | + | core.LazyRegister(&xOutputStreamClearPending, "GIO", "g_output_stream_clear_pending", false) | |||
| 598 | + | ||||
| 586 | xOutputStreamClearPending(x.GoPointer()) | 599 | xOutputStreamClearPending(x.GoPointer()) | ||
| 587 | } | 600 | } | ||
| 588 | 601 | ||||
| @@ -618,6 +631,7 @@ var xOutputStreamClose func(uintptr, uintptr, **glib.Error) bool | |||||
| 618 | // cancellation (as with any error) there is no guarantee that all written | 631 | // cancellation (as with any error) there is no guarantee that all written | ||
| 619 | // data will reach the target. | 632 | // data will reach the target. | ||
| 620 | func (x *OutputStream) Close(CancellableVar *Cancellable) (bool, error) { | 633 | func (x *OutputStream) Close(CancellableVar *Cancellable) (bool, error) { | ||
| 634 | + | core.LazyRegister(&xOutputStreamClose, "GIO", "g_output_stream_close", false) | |||
| 621 | var cerr *glib.Error | 635 | var cerr *glib.Error | ||
| 622 | 636 | ||||
| 623 | cret := xOutputStreamClose(x.GoPointer(), CancellableVar.GoPointer(), &cerr) | 637 | cret := xOutputStreamClose(x.GoPointer(), CancellableVar.GoPointer(), &cerr) | ||
| @@ -640,6 +654,8 @@ var xOutputStreamCloseAsync func(uintptr, int, uintptr, uintptr, uintptr) | |||||
| 640 | // to implement asynchronicity, so they are optional for inheriting | 654 | // to implement asynchronicity, so they are optional for inheriting | ||
| 641 | // classes. However, if you override one you must override all. | 655 | // classes. However, if you override one you must override all. | ||
| 642 | func (x *OutputStream) CloseAsync(IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) { | 656 | func (x *OutputStream) CloseAsync(IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) { | ||
| 657 | + | core.LazyRegister(&xOutputStreamCloseAsync, "GIO", "g_output_stream_close_async", false) | |||
| 658 | + | ||||
| 643 | xOutputStreamCloseAsync(x.GoPointer(), IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | 659 | xOutputStreamCloseAsync(x.GoPointer(), IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | ||
| 644 | } | 660 | } | ||
| 645 | 661 | ||||
| @@ -647,6 +663,7 @@ var xOutputStreamCloseFinish func(uintptr, uintptr, **glib.Error) bool | |||||
| 647 | 663 | ||||
| 648 | // Closes an output stream. | 664 | // Closes an output stream. | ||
| 649 | func (x *OutputStream) CloseFinish(ResultVar AsyncResult) (bool, error) { | 665 | func (x *OutputStream) CloseFinish(ResultVar AsyncResult) (bool, error) { | ||
| 666 | + | core.LazyRegister(&xOutputStreamCloseFinish, "GIO", "g_output_stream_close_finish", false) | |||
| 650 | var cerr *glib.Error | 667 | var cerr *glib.Error | ||
| 651 | 668 | ||||
| 652 | cret := xOutputStreamCloseFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr) | 669 | cret := xOutputStreamCloseFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr) | ||
| @@ -668,6 +685,7 @@ var xOutputStreamFlush func(uintptr, uintptr, **glib.Error) bool | |||||
| 668 | // triggering the cancellable object from another thread. If the operation | 685 | // triggering the cancellable object from another thread. If the operation | ||
| 669 | // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. | 686 | // was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. | ||
| 670 | func (x *OutputStream) Flush(CancellableVar *Cancellable) (bool, error) { | 687 | func (x *OutputStream) Flush(CancellableVar *Cancellable) (bool, error) { | ||
| 688 | + | core.LazyRegister(&xOutputStreamFlush, "GIO", "g_output_stream_flush", false) | |||
| 671 | var cerr *glib.Error | 689 | var cerr *glib.Error | ||
| 672 | 690 | ||||
| 673 | cret := xOutputStreamFlush(x.GoPointer(), CancellableVar.GoPointer(), &cerr) | 691 | cret := xOutputStreamFlush(x.GoPointer(), CancellableVar.GoPointer(), &cerr) | ||
| @@ -687,6 +705,8 @@ var xOutputStreamFlushAsync func(uintptr, int, uintptr, uintptr, uintptr) | |||||
| 687 | // called. You can then call g_output_stream_flush_finish() to get the | 705 | // called. You can then call g_output_stream_flush_finish() to get the | ||
| 688 | // result of the operation. | 706 | // result of the operation. | ||
| 689 | func (x *OutputStream) FlushAsync(IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) { | 707 | func (x *OutputStream) FlushAsync(IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) { | ||
| 708 | + | core.LazyRegister(&xOutputStreamFlushAsync, "GIO", "g_output_stream_flush_async", false) | |||
| 709 | + | ||||
| 690 | xOutputStreamFlushAsync(x.GoPointer(), IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | 710 | xOutputStreamFlushAsync(x.GoPointer(), IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | ||
| 691 | } | 711 | } | ||
| 692 | 712 | ||||
| @@ -694,6 +714,7 @@ var xOutputStreamFlushFinish func(uintptr, uintptr, **glib.Error) bool | |||||
| 694 | 714 | ||||
| 695 | // Finishes flushing an output stream. | 715 | // Finishes flushing an output stream. | ||
| 696 | func (x *OutputStream) FlushFinish(ResultVar AsyncResult) (bool, error) { | 716 | func (x *OutputStream) FlushFinish(ResultVar AsyncResult) (bool, error) { | ||
| 717 | + | core.LazyRegister(&xOutputStreamFlushFinish, "GIO", "g_output_stream_flush_finish", false) | |||
| 697 | var cerr *glib.Error | 718 | var cerr *glib.Error | ||
| 698 | 719 | ||||
| 699 | cret := xOutputStreamFlushFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr) | 720 | cret := xOutputStreamFlushFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr) | ||
| @@ -707,6 +728,8 @@ var xOutputStreamHasPending func(uintptr) bool | |||||
| 707 | 728 | ||||
| 708 | // Checks if an output stream has pending actions. | 729 | // Checks if an output stream has pending actions. | ||
| 709 | func (x *OutputStream) HasPending() bool { | 730 | func (x *OutputStream) HasPending() bool { | ||
| 731 | + | core.LazyRegister(&xOutputStreamHasPending, "GIO", "g_output_stream_has_pending", false) | |||
| 732 | + | ||||
| 710 | cret := xOutputStreamHasPending(x.GoPointer()) | 733 | cret := xOutputStreamHasPending(x.GoPointer()) | ||
| 711 | return cret | 734 | return cret | ||
| 712 | } | 735 | } | ||
| @@ -715,6 +738,8 @@ var xOutputStreamIsClosed func(uintptr) bool | |||||
| 715 | 738 | ||||
| 716 | // Checks if an output stream has already been closed. | 739 | // Checks if an output stream has already been closed. | ||
| 717 | func (x *OutputStream) IsClosed() bool { | 740 | func (x *OutputStream) IsClosed() bool { | ||
| 741 | + | core.LazyRegister(&xOutputStreamIsClosed, "GIO", "g_output_stream_is_closed", false) | |||
| 742 | + | ||||
| 718 | cret := xOutputStreamIsClosed(x.GoPointer()) | 743 | cret := xOutputStreamIsClosed(x.GoPointer()) | ||
| 719 | return cret | 744 | return cret | ||
| 720 | } | 745 | } | ||
| @@ -726,6 +751,8 @@ var xOutputStreamIsClosing func(uintptr) bool | |||||
| 726 | // flush (or other i/o operation) is called from within | 751 | // flush (or other i/o operation) is called from within | ||
| 727 | // the closing operation. | 752 | // the closing operation. | ||
| 728 | func (x *OutputStream) IsClosing() bool { | 753 | func (x *OutputStream) IsClosing() bool { | ||
| 754 | + | core.LazyRegister(&xOutputStreamIsClosing, "GIO", "g_output_stream_is_closing", false) | |||
| 755 | + | ||||
| 729 | cret := xOutputStreamIsClosing(x.GoPointer()) | 756 | cret := xOutputStreamIsClosing(x.GoPointer()) | ||
| 730 | return cret | 757 | return cret | ||
| 731 | } | 758 | } | ||
| @@ -745,6 +772,8 @@ var xOutputStreamPrintf func(uintptr, *uint, uintptr, **glib.Error, string, ...i | |||||
| 745 | // create you own printf()-like wrapper around g_output_stream_write() | 772 | // create you own printf()-like wrapper around g_output_stream_write() | ||
| 746 | // or g_output_stream_write_all(). | 773 | // or g_output_stream_write_all(). | ||
| 747 | func (x *OutputStream) Printf(BytesWrittenVar *uint, CancellableVar *Cancellable, ErrorVar **glib.Error, FormatVar string, varArgs ...interface{}) bool { | 774 | func (x *OutputStream) Printf(BytesWrittenVar *uint, CancellableVar *Cancellable, ErrorVar **glib.Error, FormatVar string, varArgs ...interface{}) bool { | ||
| 775 | + | core.LazyRegister(&xOutputStreamPrintf, "GIO", "g_output_stream_printf", false) | |||
| 776 | + | ||||
| 748 | cret := xOutputStreamPrintf(x.GoPointer(), BytesWrittenVar, CancellableVar.GoPointer(), ErrorVar, FormatVar, varArgs...) | 777 | cret := xOutputStreamPrintf(x.GoPointer(), BytesWrittenVar, CancellableVar.GoPointer(), ErrorVar, FormatVar, varArgs...) | ||
| 749 | return cret | 778 | return cret | ||
| 750 | } | 779 | } | ||
| @@ -755,6 +784,7 @@ var xOutputStreamSetPending func(uintptr, **glib.Error) bool | |||||
| 755 | // already set or @stream is closed, it will return %FALSE and set | 784 | // already set or @stream is closed, it will return %FALSE and set | ||
| 756 | // @error. | 785 | // @error. | ||
| 757 | func (x *OutputStream) SetPending() (bool, error) { | 786 | func (x *OutputStream) SetPending() (bool, error) { | ||
| 787 | + | core.LazyRegister(&xOutputStreamSetPending, "GIO", "g_output_stream_set_pending", false) | |||
| 758 | var cerr *glib.Error | 788 | var cerr *glib.Error | ||
| 759 | 789 | ||||
| 760 | cret := xOutputStreamSetPending(x.GoPointer(), &cerr) | 790 | cret := xOutputStreamSetPending(x.GoPointer(), &cerr) | ||
| @@ -768,6 +798,7 @@ var xOutputStreamSplice func(uintptr, uintptr, OutputStreamSpliceFlags, uintptr, | |||||
| 768 | 798 | ||||
| 769 | // Splices an input stream into an output stream. | 799 | // Splices an input stream into an output stream. | ||
| 770 | func (x *OutputStream) Splice(SourceVar *InputStream, FlagsVar OutputStreamSpliceFlags, CancellableVar *Cancellable) (int, error) { | 800 | func (x *OutputStream) Splice(SourceVar *InputStream, FlagsVar OutputStreamSpliceFlags, CancellableVar *Cancellable) (int, error) { | ||
| 801 | + | core.LazyRegister(&xOutputStreamSplice, "GIO", "g_output_stream_splice", false) | |||
| 771 | var cerr *glib.Error | 802 | var cerr *glib.Error | ||
| 772 | 803 | ||||
| 773 | cret := xOutputStreamSplice(x.GoPointer(), SourceVar.GoPointer(), FlagsVar, CancellableVar.GoPointer(), &cerr) | 804 | cret := xOutputStreamSplice(x.GoPointer(), SourceVar.GoPointer(), FlagsVar, CancellableVar.GoPointer(), &cerr) | ||
| @@ -787,6 +818,8 @@ var xOutputStreamSpliceAsync func(uintptr, uintptr, OutputStreamSpliceFlags, int | |||||
| 787 | // For the synchronous, blocking version of this function, see | 818 | // For the synchronous, blocking version of this function, see | ||
| 788 | // g_output_stream_splice(). | 819 | // g_output_stream_splice(). | ||
| 789 | func (x *OutputStream) SpliceAsync(SourceVar *InputStream, FlagsVar OutputStreamSpliceFlags, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) { | 820 | func (x *OutputStream) SpliceAsync(SourceVar *InputStream, FlagsVar OutputStreamSpliceFlags, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) { | ||
| 821 | + | core.LazyRegister(&xOutputStreamSpliceAsync, "GIO", "g_output_stream_splice_async", false) | |||
| 822 | + | ||||
| 790 | xOutputStreamSpliceAsync(x.GoPointer(), SourceVar.GoPointer(), FlagsVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | 823 | xOutputStreamSpliceAsync(x.GoPointer(), SourceVar.GoPointer(), FlagsVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | ||
| 791 | } | 824 | } | ||
| 792 | 825 | ||||
| @@ -794,6 +827,7 @@ var xOutputStreamSpliceFinish func(uintptr, uintptr, **glib.Error) int | |||||
| 794 | 827 | ||||
| 795 | // Finishes an asynchronous stream splice operation. | 828 | // Finishes an asynchronous stream splice operation. | ||
| 796 | func (x *OutputStream) SpliceFinish(ResultVar AsyncResult) (int, error) { | 829 | func (x *OutputStream) SpliceFinish(ResultVar AsyncResult) (int, error) { | ||
| 830 | + | core.LazyRegister(&xOutputStreamSpliceFinish, "GIO", "g_output_stream_splice_finish", false) | |||
| 797 | var cerr *glib.Error | 831 | var cerr *glib.Error | ||
| 798 | 832 | ||||
| 799 | cret := xOutputStreamSpliceFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr) | 833 | cret := xOutputStreamSpliceFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr) | ||
| @@ -818,6 +852,8 @@ var xOutputStreamVprintf func(uintptr, *uint, uintptr, **glib.Error, string, []i | |||||
| 818 | // create you own printf()-like wrapper around g_output_stream_write() | 852 | // create you own printf()-like wrapper around g_output_stream_write() | ||
| 819 | // or g_output_stream_write_all(). | 853 | // or g_output_stream_write_all(). | ||
| 820 | func (x *OutputStream) Vprintf(BytesWrittenVar *uint, CancellableVar *Cancellable, ErrorVar **glib.Error, FormatVar string, ArgsVar []interface{}) bool { | 854 | func (x *OutputStream) Vprintf(BytesWrittenVar *uint, CancellableVar *Cancellable, ErrorVar **glib.Error, FormatVar string, ArgsVar []interface{}) bool { | ||
| 855 | + | core.LazyRegister(&xOutputStreamVprintf, "GIO", "g_output_stream_vprintf", false) | |||
| 856 | + | ||||
| 821 | cret := xOutputStreamVprintf(x.GoPointer(), BytesWrittenVar, CancellableVar.GoPointer(), ErrorVar, FormatVar, ArgsVar) | 857 | cret := xOutputStreamVprintf(x.GoPointer(), BytesWrittenVar, CancellableVar.GoPointer(), ErrorVar, FormatVar, ArgsVar) | ||
| 822 | return cret | 858 | return cret | ||
| 823 | } | 859 | } | ||
| @@ -845,6 +881,7 @@ var xOutputStreamWrite func(uintptr, []byte, uint, uintptr, **glib.Error) int | |||||
| 845 | // | 881 | // | ||
| 846 | // On error -1 is returned and @error is set accordingly. | 882 | // On error -1 is returned and @error is set accordingly. | ||
| 847 | func (x *OutputStream) Write(BufferVar []byte, CountVar uint, CancellableVar *Cancellable) (int, error) { | 883 | func (x *OutputStream) Write(BufferVar []byte, CountVar uint, CancellableVar *Cancellable) (int, error) { | ||
| 884 | + | core.LazyRegister(&xOutputStreamWrite, "GIO", "g_output_stream_write", false) | |||
| 848 | var cerr *glib.Error | 885 | var cerr *glib.Error | ||
| 849 | 886 | ||||
| 850 | cret := xOutputStreamWrite(x.GoPointer(), BufferVar, CountVar, CancellableVar.GoPointer(), &cerr) | 887 | cret := xOutputStreamWrite(x.GoPointer(), BufferVar, CountVar, CancellableVar.GoPointer(), &cerr) | ||
| @@ -876,6 +913,7 @@ var xOutputStreamWriteAll func(uintptr, []byte, uint, *uint, uintptr, **glib.Err | |||||
| 876 | // language then you must write your own loop around | 913 | // language then you must write your own loop around | ||
| 877 | // g_output_stream_write(). | 914 | // g_output_stream_write(). | ||
| 878 | func (x *OutputStream) WriteAll(BufferVar []byte, CountVar uint, BytesWrittenVar *uint, CancellableVar *Cancellable) (bool, error) { | 915 | func (x *OutputStream) WriteAll(BufferVar []byte, CountVar uint, BytesWrittenVar *uint, CancellableVar *Cancellable) (bool, error) { | ||
| 916 | + | core.LazyRegister(&xOutputStreamWriteAll, "GIO", "g_output_stream_write_all", false) | |||
| 879 | var cerr *glib.Error | 917 | var cerr *glib.Error | ||
| 880 | 918 | ||||
| 881 | cret := xOutputStreamWriteAll(x.GoPointer(), BufferVar, CountVar, BytesWrittenVar, CancellableVar.GoPointer(), &cerr) | 919 | cret := xOutputStreamWriteAll(x.GoPointer(), BufferVar, CountVar, BytesWrittenVar, CancellableVar.GoPointer(), &cerr) | ||
| @@ -903,6 +941,8 @@ var xOutputStreamWriteAllAsync func(uintptr, []byte, uint, int, uintptr, uintptr | |||||
| 903 | // Note that no copy of @buffer will be made, so it must stay valid | 941 | // Note that no copy of @buffer will be made, so it must stay valid | ||
| 904 | // until @callback is called. | 942 | // until @callback is called. | ||
| 905 | func (x *OutputStream) WriteAllAsync(BufferVar []byte, CountVar uint, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) { | 943 | func (x *OutputStream) WriteAllAsync(BufferVar []byte, CountVar uint, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) { | ||
| 944 | + | core.LazyRegister(&xOutputStreamWriteAllAsync, "GIO", "g_output_stream_write_all_async", false) | |||
| 945 | + | ||||
| 906 | xOutputStreamWriteAllAsync(x.GoPointer(), BufferVar, CountVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | 946 | xOutputStreamWriteAllAsync(x.GoPointer(), BufferVar, CountVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | ||
| 907 | } | 947 | } | ||
| 908 | 948 | ||||
| @@ -919,6 +959,7 @@ var xOutputStreamWriteAllFinish func(uintptr, uintptr, *uint, **glib.Error) bool | |||||
| 919 | // language then you must write your own loop around | 959 | // language then you must write your own loop around | ||
| 920 | // g_output_stream_write_async(). | 960 | // g_output_stream_write_async(). | ||
| 921 | func (x *OutputStream) WriteAllFinish(ResultVar AsyncResult, BytesWrittenVar *uint) (bool, error) { | 961 | func (x *OutputStream) WriteAllFinish(ResultVar AsyncResult, BytesWrittenVar *uint) (bool, error) { | ||
| 962 | + | core.LazyRegister(&xOutputStreamWriteAllFinish, "GIO", "g_output_stream_write_all_finish", false) | |||
| 922 | var cerr *glib.Error | 963 | var cerr *glib.Error | ||
| 923 | 964 | ||||
| 924 | cret := xOutputStreamWriteAllFinish(x.GoPointer(), ResultVar.GoPointer(), BytesWrittenVar, &cerr) | 965 | cret := xOutputStreamWriteAllFinish(x.GoPointer(), ResultVar.GoPointer(), BytesWrittenVar, &cerr) | ||
| @@ -966,6 +1007,8 @@ var xOutputStreamWriteAsync func(uintptr, []byte, uint, int, uintptr, uintptr, u | |||||
| 966 | // for a #GBytes version that will automatically hold a reference to | 1007 | // for a #GBytes version that will automatically hold a reference to | ||
| 967 | // the contents (without copying) for the duration of the call. | 1008 | // the contents (without copying) for the duration of the call. | ||
| 968 | func (x *OutputStream) WriteAsync(BufferVar []byte, CountVar uint, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) { | 1009 | func (x *OutputStream) WriteAsync(BufferVar []byte, CountVar uint, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) { | ||
| 1010 | + | core.LazyRegister(&xOutputStreamWriteAsync, "GIO", "g_output_stream_write_async", false) | |||
| 1011 | + | ||||
| 969 | xOutputStreamWriteAsync(x.GoPointer(), BufferVar, CountVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | 1012 | xOutputStreamWriteAsync(x.GoPointer(), BufferVar, CountVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | ||
| 970 | } | 1013 | } | ||
| 971 | 1014 | ||||
| @@ -983,6 +1026,7 @@ var xOutputStreamWriteBytes func(uintptr, *glib.Bytes, uintptr, **glib.Error) in | |||||
| 983 | // #GBytes instance multiple times potentially can result in duplicated | 1026 | // #GBytes instance multiple times potentially can result in duplicated | ||
| 984 | // data in the output stream. | 1027 | // data in the output stream. | ||
| 985 | func (x *OutputStream) WriteBytes(BytesVar *glib.Bytes, CancellableVar *Cancellable) (int, error) { | 1028 | func (x *OutputStream) WriteBytes(BytesVar *glib.Bytes, CancellableVar *Cancellable) (int, error) { | ||
| 1029 | + | core.LazyRegister(&xOutputStreamWriteBytes, "GIO", "g_output_stream_write_bytes", false) | |||
| 986 | var cerr *glib.Error | 1030 | var cerr *glib.Error | ||
| 987 | 1031 | ||||
| 988 | cret := xOutputStreamWriteBytes(x.GoPointer(), BytesVar, CancellableVar.GoPointer(), &cerr) | 1032 | cret := xOutputStreamWriteBytes(x.GoPointer(), BytesVar, CancellableVar.GoPointer(), &cerr) | ||
| @@ -1008,6 +1052,8 @@ var xOutputStreamWriteBytesAsync func(uintptr, *glib.Bytes, int, uintptr, uintpt | |||||
| 1008 | // For the synchronous, blocking version of this function, see | 1052 | // For the synchronous, blocking version of this function, see | ||
| 1009 | // g_output_stream_write_bytes(). | 1053 | // g_output_stream_write_bytes(). | ||
| 1010 | func (x *OutputStream) WriteBytesAsync(BytesVar *glib.Bytes, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) { | 1054 | func (x *OutputStream) WriteBytesAsync(BytesVar *glib.Bytes, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) { | ||
| 1055 | + | core.LazyRegister(&xOutputStreamWriteBytesAsync, "GIO", "g_output_stream_write_bytes_async", false) | |||
| 1056 | + | ||||
| 1011 | xOutputStreamWriteBytesAsync(x.GoPointer(), BytesVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | 1057 | xOutputStreamWriteBytesAsync(x.GoPointer(), BytesVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | ||
| 1012 | } | 1058 | } | ||
| 1013 | 1059 | ||||
| @@ -1015,6 +1061,7 @@ var xOutputStreamWriteBytesFinish func(uintptr, uintptr, **glib.Error) int | |||||
| 1015 | 1061 | ||||
| 1016 | // Finishes a stream write-from-#GBytes operation. | 1062 | // Finishes a stream write-from-#GBytes operation. | ||
| 1017 | func (x *OutputStream) WriteBytesFinish(ResultVar AsyncResult) (int, error) { | 1063 | func (x *OutputStream) WriteBytesFinish(ResultVar AsyncResult) (int, error) { | ||
| 1064 | + | core.LazyRegister(&xOutputStreamWriteBytesFinish, "GIO", "g_output_stream_write_bytes_finish", false) | |||
| 1018 | var cerr *glib.Error | 1065 | var cerr *glib.Error | ||
| 1019 | 1066 | ||||
| 1020 | cret := xOutputStreamWriteBytesFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr) | 1067 | cret := xOutputStreamWriteBytesFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr) | ||
| @@ -1028,6 +1075,7 @@ var xOutputStreamWriteFinish func(uintptr, uintptr, **glib.Error) int | |||||
| 1028 | 1075 | ||||
| 1029 | // Finishes a stream write operation. | 1076 | // Finishes a stream write operation. | ||
| 1030 | func (x *OutputStream) WriteFinish(ResultVar AsyncResult) (int, error) { | 1077 | func (x *OutputStream) WriteFinish(ResultVar AsyncResult) (int, error) { | ||
| 1078 | + | core.LazyRegister(&xOutputStreamWriteFinish, "GIO", "g_output_stream_write_finish", false) | |||
| 1031 | var cerr *glib.Error | 1079 | var cerr *glib.Error | ||
| 1032 | 1080 | ||||
| 1033 | cret := xOutputStreamWriteFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr) | 1081 | cret := xOutputStreamWriteFinish(x.GoPointer(), ResultVar.GoPointer(), &cerr) | ||
| @@ -1063,6 +1111,7 @@ var xOutputStreamWritev func(uintptr, []OutputVector, uint, *uint, uintptr, **gl | |||||
| 1063 | // are exceeded. For example, when writing to a local file on UNIX platforms, | 1111 | // are exceeded. For example, when writing to a local file on UNIX platforms, | ||
| 1064 | // the aggregate buffer size must not exceed %G_MAXSSIZE bytes. | 1112 | // the aggregate buffer size must not exceed %G_MAXSSIZE bytes. | ||
| 1065 | func (x *OutputStream) Writev(VectorsVar []OutputVector, NVectorsVar uint, BytesWrittenVar *uint, CancellableVar *Cancellable) (bool, error) { | 1113 | func (x *OutputStream) Writev(VectorsVar []OutputVector, NVectorsVar uint, BytesWrittenVar *uint, CancellableVar *Cancellable) (bool, error) { | ||
| 1114 | + | core.LazyRegister(&xOutputStreamWritev, "GIO", "g_output_stream_writev", false) | |||
| 1066 | var cerr *glib.Error | 1115 | var cerr *glib.Error | ||
| 1067 | 1116 | ||||
| 1068 | cret := xOutputStreamWritev(x.GoPointer(), VectorsVar, NVectorsVar, BytesWrittenVar, CancellableVar.GoPointer(), &cerr) | 1117 | cret := xOutputStreamWritev(x.GoPointer(), VectorsVar, NVectorsVar, BytesWrittenVar, CancellableVar.GoPointer(), &cerr) | ||
| @@ -1097,6 +1146,7 @@ var xOutputStreamWritevAll func(uintptr, []OutputVector, uint, *uint, uintptr, * | |||||
| 1097 | // The content of the individual elements of @vectors might be changed by this | 1146 | // The content of the individual elements of @vectors might be changed by this | ||
| 1098 | // function. | 1147 | // function. | ||
| 1099 | func (x *OutputStream) WritevAll(VectorsVar []OutputVector, NVectorsVar uint, BytesWrittenVar *uint, CancellableVar *Cancellable) (bool, error) { | 1148 | func (x *OutputStream) WritevAll(VectorsVar []OutputVector, NVectorsVar uint, BytesWrittenVar *uint, CancellableVar *Cancellable) (bool, error) { | ||
| 1149 | + | core.LazyRegister(&xOutputStreamWritevAll, "GIO", "g_output_stream_writev_all", false) | |||
| 1100 | var cerr *glib.Error | 1150 | var cerr *glib.Error | ||
| 1101 | 1151 | ||||
| 1102 | cret := xOutputStreamWritevAll(x.GoPointer(), VectorsVar, NVectorsVar, BytesWrittenVar, CancellableVar.GoPointer(), &cerr) | 1152 | cret := xOutputStreamWritevAll(x.GoPointer(), VectorsVar, NVectorsVar, BytesWrittenVar, CancellableVar.GoPointer(), &cerr) | ||
| @@ -1125,6 +1175,8 @@ var xOutputStreamWritevAllAsync func(uintptr, []OutputVector, uint, int, uintptr | |||||
| 1125 | // until @callback is called. The content of the individual elements | 1175 | // until @callback is called. The content of the individual elements | ||
| 1126 | // of @vectors might be changed by this function. | 1176 | // of @vectors might be changed by this function. | ||
| 1127 | func (x *OutputStream) WritevAllAsync(VectorsVar []OutputVector, NVectorsVar uint, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) { | 1177 | func (x *OutputStream) WritevAllAsync(VectorsVar []OutputVector, NVectorsVar uint, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) { | ||
| 1178 | + | core.LazyRegister(&xOutputStreamWritevAllAsync, "GIO", "g_output_stream_writev_all_async", false) | |||
| 1179 | + | ||||
| 1128 | xOutputStreamWritevAllAsync(x.GoPointer(), VectorsVar, NVectorsVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | 1180 | xOutputStreamWritevAllAsync(x.GoPointer(), VectorsVar, NVectorsVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | ||
| 1129 | } | 1181 | } | ||
| 1130 | 1182 | ||||
| @@ -1141,6 +1193,7 @@ var xOutputStreamWritevAllFinish func(uintptr, uintptr, *uint, **glib.Error) boo | |||||
| 1141 | // language then you must write your own loop around | 1193 | // language then you must write your own loop around | ||
| 1142 | // g_output_stream_writev_async(). | 1194 | // g_output_stream_writev_async(). | ||
| 1143 | func (x *OutputStream) WritevAllFinish(ResultVar AsyncResult, BytesWrittenVar *uint) (bool, error) { | 1195 | func (x *OutputStream) WritevAllFinish(ResultVar AsyncResult, BytesWrittenVar *uint) (bool, error) { | ||
| 1196 | + | core.LazyRegister(&xOutputStreamWritevAllFinish, "GIO", "g_output_stream_writev_all_finish", false) | |||
| 1144 | var cerr *glib.Error | 1197 | var cerr *glib.Error | ||
| 1145 | 1198 | ||||
| 1146 | cret := xOutputStreamWritevAllFinish(x.GoPointer(), ResultVar.GoPointer(), BytesWrittenVar, &cerr) | 1199 | cret := xOutputStreamWritevAllFinish(x.GoPointer(), ResultVar.GoPointer(), BytesWrittenVar, &cerr) | ||
| @@ -1183,6 +1236,8 @@ var xOutputStreamWritevAsync func(uintptr, []OutputVector, uint, int, uintptr, u | |||||
| 1183 | // Note that no copy of @vectors will be made, so it must stay valid | 1236 | // Note that no copy of @vectors will be made, so it must stay valid | ||
| 1184 | // until @callback is called. | 1237 | // until @callback is called. | ||
| 1185 | func (x *OutputStream) WritevAsync(VectorsVar []OutputVector, NVectorsVar uint, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) { | 1238 | func (x *OutputStream) WritevAsync(VectorsVar []OutputVector, NVectorsVar uint, IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) { | ||
| 1239 | + | core.LazyRegister(&xOutputStreamWritevAsync, "GIO", "g_output_stream_writev_async", false) | |||
| 1240 | + | ||||
| 1186 | xOutputStreamWritevAsync(x.GoPointer(), VectorsVar, NVectorsVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | 1241 | xOutputStreamWritevAsync(x.GoPointer(), VectorsVar, NVectorsVar, IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar) | ||
| 1187 | } | 1242 | } | ||
| 1188 | 1243 | ||||
| @@ -1190,6 +1245,7 @@ var xOutputStreamWritevFinish func(uintptr, uintptr, *uint, **glib.Error) bool | |||||
| 1190 | 1245 | ||||
| 1191 | // Finishes a stream writev operation. | 1246 | // Finishes a stream writev operation. | ||
| 1192 | func (x *OutputStream) WritevFinish(ResultVar AsyncResult, BytesWrittenVar *uint) (bool, error) { | 1247 | func (x *OutputStream) WritevFinish(ResultVar AsyncResult, BytesWrittenVar *uint) (bool, error) { | ||
| 1248 | + | core.LazyRegister(&xOutputStreamWritevFinish, "GIO", "g_output_stream_writev_finish", false) | |||
| 1193 | var cerr *glib.Error | 1249 | var cerr *glib.Error | ||
| 1194 | 1250 | ||||
| 1195 | cret := xOutputStreamWritevFinish(x.GoPointer(), ResultVar.GoPointer(), BytesWrittenVar, &cerr) | 1251 | cret := xOutputStreamWritevFinish(x.GoPointer(), ResultVar.GoPointer(), BytesWrittenVar, &cerr) | ||
| @@ -1213,46 +1269,4 @@ func (c *OutputStream) SetGoPointer(ptr uintptr) { | |||||
| 1213 | func init() { | 1269 | func init() { | ||
| 1214 | core.SetPackageName("GIO", "gio-2.0") | 1270 | core.SetPackageName("GIO", "gio-2.0") | ||
| 1215 | core.SetSharedLibraries("GIO", []string{"libgio-2.0.so.0", "libgio-2.0.0.dylib"}) | 1271 | core.SetSharedLibraries("GIO", []string{"libgio-2.0.so.0", "libgio-2.0.0.dylib"}) | ||
| 1216 | - | var libs []uintptr | |||
| 1217 | - | for _, libPath := range core.GetPaths("GIO") { | |||
| 1218 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 1219 | - | if err != nil { | |||
| 1220 | - | panic(err) | |||
| 1221 | - | } | |||
| 1222 | - | libs = append(libs, lib) | |||
| 1223 | - | } | |||
| 1224 | - | ||||
| 1225 | - | core.PuregoSafeRegister(&xOutputStreamGLibType, libs, "g_output_stream_get_type") | |||
| 1226 | - | ||||
| 1227 | - | core.PuregoSafeRegister(&xOutputStreamClearPending, libs, "g_output_stream_clear_pending") | |||
| 1228 | - | core.PuregoSafeRegister(&xOutputStreamClose, libs, "g_output_stream_close") | |||
| 1229 | - | core.PuregoSafeRegister(&xOutputStreamCloseAsync, libs, "g_output_stream_close_async") | |||
| 1230 | - | core.PuregoSafeRegister(&xOutputStreamCloseFinish, libs, "g_output_stream_close_finish") | |||
| 1231 | - | core.PuregoSafeRegister(&xOutputStreamFlush, libs, "g_output_stream_flush") | |||
| 1232 | - | core.PuregoSafeRegister(&xOutputStreamFlushAsync, libs, "g_output_stream_flush_async") | |||
| 1233 | - | core.PuregoSafeRegister(&xOutputStreamFlushFinish, libs, "g_output_stream_flush_finish") | |||
| 1234 | - | core.PuregoSafeRegister(&xOutputStreamHasPending, libs, "g_output_stream_has_pending") | |||
| 1235 | - | core.PuregoSafeRegister(&xOutputStreamIsClosed, libs, "g_output_stream_is_closed") | |||
| 1236 | - | core.PuregoSafeRegister(&xOutputStreamIsClosing, libs, "g_output_stream_is_closing") | |||
| 1237 | - | core.PuregoSafeRegister(&xOutputStreamPrintf, libs, "g_output_stream_printf") | |||
| 1238 | - | core.PuregoSafeRegister(&xOutputStreamSetPending, libs, "g_output_stream_set_pending") | |||
| 1239 | - | core.PuregoSafeRegister(&xOutputStreamSplice, libs, "g_output_stream_splice") | |||
| 1240 | - | core.PuregoSafeRegister(&xOutputStreamSpliceAsync, libs, "g_output_stream_splice_async") | |||
| 1241 | - | core.PuregoSafeRegister(&xOutputStreamSpliceFinish, libs, "g_output_stream_splice_finish") | |||
| 1242 | - | core.PuregoSafeRegister(&xOutputStreamVprintf, libs, "g_output_stream_vprintf") | |||
| 1243 | - | core.PuregoSafeRegister(&xOutputStreamWrite, libs, "g_output_stream_write") | |||
| 1244 | - | core.PuregoSafeRegister(&xOutputStreamWriteAll, libs, "g_output_stream_write_all") | |||
| 1245 | - | core.PuregoSafeRegister(&xOutputStreamWriteAllAsync, libs, "g_output_stream_write_all_async") | |||
| 1246 | - | core.PuregoSafeRegister(&xOutputStreamWriteAllFinish, libs, "g_output_stream_write_all_finish") | |||
| 1247 | - | core.PuregoSafeRegister(&xOutputStreamWriteAsync, libs, "g_output_stream_write_async") | |||
| 1248 | - | core.PuregoSafeRegister(&xOutputStreamWriteBytes, libs, "g_output_stream_write_bytes") | |||
| 1249 | - | core.PuregoSafeRegister(&xOutputStreamWriteBytesAsync, libs, "g_output_stream_write_bytes_async") | |||
| 1250 | - | core.PuregoSafeRegister(&xOutputStreamWriteBytesFinish, libs, "g_output_stream_write_bytes_finish") | |||
| 1251 | - | core.PuregoSafeRegister(&xOutputStreamWriteFinish, libs, "g_output_stream_write_finish") | |||
| 1252 | - | core.PuregoSafeRegister(&xOutputStreamWritev, libs, "g_output_stream_writev") | |||
| 1253 | - | core.PuregoSafeRegister(&xOutputStreamWritevAll, libs, "g_output_stream_writev_all") | |||
| 1254 | - | core.PuregoSafeRegister(&xOutputStreamWritevAllAsync, libs, "g_output_stream_writev_all_async") | |||
| 1255 | - | core.PuregoSafeRegister(&xOutputStreamWritevAllFinish, libs, "g_output_stream_writev_all_finish") | |||
| 1256 | - | core.PuregoSafeRegister(&xOutputStreamWritevAsync, libs, "g_output_stream_writev_async") | |||
| 1257 | - | core.PuregoSafeRegister(&xOutputStreamWritevFinish, libs, "g_output_stream_writev_finish") | |||
| 1258 | } | 1272 | } | ||